From nobody Mon Jul 15 07:13:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WMths3dcnz5QlZg; Mon, 15 Jul 2024 07:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WMths35twz4g91; Mon, 15 Jul 2024 07:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721027613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6NLI1vSoh5+wH/QXV1GRZ1xEYEfmOn+QK4q9yR8h4/k=; b=KRoKjmSvzwZy4TwIKJ4wqp5NNW5InjPW3edYb6DlJg5pez+3u46eqpo1litxwLa5mHrPIc j5k3vpH07NoefCibSS4CvyczcANJsaDTXk4h7TsDIEp85BemEGAzzgcVSqZs3Lyl1GbQH4 2rl5t0OA66i96iQHZd4mktsVzHUnpZltkEnkX7pDtEVcZaEy2qJS1kufMsV5PyvXDDHnnS P3A4UmGoBmUQ5Pld1KlB2ikcYXz82+piWw4MsMhppp4e2RqlTsvx+EjAXNZFPcnO3ZrHxk 4Nb3yqYuXhqNzpntnr/bDy+/ROdv+y48SqSwA4wFYvnnPDD34HrrJ5VPCLWJTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721027613; a=rsa-sha256; cv=none; b=VA+CpjsDpp8Brao41uG/qEKIIeoCf45QNSZ5bTI/oaZC7LrYCS7/GPOP1ogpspv52XpL4D RgOlXdeQBCtSDxQWlCjqW//F7TjYIJ2XeFuuD5TbsTKMcOfvmc/uC1Yn10HW4LDay9Z4pI XFgKD0emPBOzAxGljBGcDX5hLXXhu5zFSmgJ5TFbXwnD4BFckJaF0yPf+U6kQGq6Flu2N4 jIqHi9Dm1g7XdUr58WwjUO3LabmvgBPfm6voa6uxtiMufrqbCAaow5+e4+7irQRbbr+iZ2 OKJMWUG6Ti8ND6T7be+ueL6znURG53SYhUKSs8T7Lhzw5SG8qDINxbBrQqd6qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721027613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6NLI1vSoh5+wH/QXV1GRZ1xEYEfmOn+QK4q9yR8h4/k=; b=HA2xEOsbmSYsHEvZYKQ1xVi351phyuG66BF4Y3Surb37k/ZAdWH2Ib33drkk+rWUJ8kSOw q3+woPym1P0bPnFTCMWToE/mgvk7yDx/TJAKJT93ezdLPUpb6fsu5EZewTbbQP1Pm10bUM Mk6RqsM/cmHA+BHOVRrGL5QV3BXF/YC/UMW1eZ4FDAJoqAcK0/UF+2DRjCmYXRriBUBqua o+qgj1YDm95jjO6a5Z6npR946gpTaMgfGRRdEFQNOZEZ0g6K/Ius5ojN6gg3/Zkm0BsZXl EuJwnKbgL9f1RwDzUJVcLYNesZsPCeCpofWSA1MMT3R8TMJfORrFK19sGYb8Dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WMths2ft6zjH9; Mon, 15 Jul 2024 07:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46F7DXOk015433; Mon, 15 Jul 2024 07:13:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46F7DXo3015430; Mon, 15 Jul 2024 07:13:33 GMT (envelope-from git) Date: Mon, 15 Jul 2024 07:13:33 GMT Message-Id: <202407150713.46F7DXo3015430@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 45cde0e43918 - main - vm_page: add vm_page_clearref() helper List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45cde0e439188589ca2511f6fd76829cbf68267e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=45cde0e439188589ca2511f6fd76829cbf68267e commit 45cde0e439188589ca2511f6fd76829cbf68267e Author: Konstantin Belousov AuthorDate: 2024-07-08 17:45:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-15 06:15:50 +0000 vm_page: add vm_page_clearref() helper It is supposed to be used for ref_count manipulations when the pages are owned by an object, but ref_count is used for something else than the wiring, e.g. PTE population count on the page table page. Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45910 --- sys/vm/vm_page.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index f419ba8e3d34..49f4c0fbc0cb 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -947,6 +947,17 @@ vm_page_in_laundry(vm_page_t m) return (queue == PQ_LAUNDRY || queue == PQ_UNSWAPPABLE); } +static inline void +vm_page_clearref(vm_page_t m) +{ + u_int r; + + r = m->ref_count; + while (atomic_fcmpset_int(&m->ref_count, &r, r & (VPRC_BLOCKED | + VPRC_OBJREF)) == 0) + ; +} + /* * vm_page_drop: * From nobody Mon Jul 15 07:13:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WMtht4ng0z5QljL; Mon, 15 Jul 2024 07:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WMtht49nzz4gFn; Mon, 15 Jul 2024 07:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721027614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qyn869qAXcD2XwfjMwsS84HtqzMfEjCykzTiTIa71pA=; b=Jjzjepvu5D1iy8SfVAZy8y5V1B/QZXlgMJ82oS3/JZFAxixx9xZmDBxHlF90hYo6Z/vK4i +KC1xpcEg1e+qcSBpvDdOEqHNs4yQbwj2zzm4QWFmtyrP6eED7m2OqUeU/hMS5lPA24m8P WxGnf8Hs9SCmUI/SjXB+HKfSdLOYi0OvO2fivKOvnj6E+tGnPIi8MODMzYf8F3TZXO+MZp FK5ebfd51esln0pqKjhaEPr8p+TzII04+DKhJVUNljr6EB2XuLqvLxYktJV4mdEy/7cozg pUJRlBCfckK1ovWBQ7/rK8N0z10Jycbk0Pi3JFHolJAPH3PKtO9tLzy0zzdxnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721027614; a=rsa-sha256; cv=none; b=Xx0YRnuFbcg5J+JbrVsqsUfnQI1lr64PPaJZ6kNnnEk07GWaYbbx66TuLNfh51O2degm6M xS3FcUgCauS/P03C1YcJgCc7fnXwFyCY6m5h3MVOi+U060v2GqhhcJQP+fhKov/4YT3vGs 9GNeSRFX+LKeJBUTVTBW+s0LaEcc+DD8+UIvy9rcGMcrtUg7kohor6L1FBSRwLHsYNkite BIkmPKAu6r3r7Vg+0B/3x0GuMpnvTGaWYt7PG4rSR0swHnf7UGJd2k/hshlwv1KC1hFo7X +GANFFSJTrsxVhU+HVkiEoA3NVIYjezXO03wTJE5rPl/kOpLcH6EKi2PttFHDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721027614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qyn869qAXcD2XwfjMwsS84HtqzMfEjCykzTiTIa71pA=; b=mb0eo0bE97Xf1QGJBGuxZRiAaIAsN3gSjXB3vCzuogczmLdVq5wc4sVlvDtxqF8SU7KnOw J/cB2rsNRSiolztGBT2WZsqxU51amLuQ0nYj4BJgSiQuLwaQ19yG3LoPa6sNbgpU/BBUoZ 3YKJ7xoolSU9mU+wARVTgVjJQEsakmASezxGy8clQyXGXfg0zH91en3jKu9g/AVIJTREz6 3+ZHypaWnQyDyKRAR+hihhYiV99sal3SSC/eUjN+JvKNQmsBoA8qaSkQ4FpcduxWwJojIh ZmGQoc20aMjiHUVDHarUX8IIHuMO5yS06DXdg5opM8iV3ogIpWIamn/jIJkvJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WMtht3b0Jzjlh; Mon, 15 Jul 2024 07:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46F7DYbV015482; Mon, 15 Jul 2024 07:13:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46F7DYLm015479; Mon, 15 Jul 2024 07:13:34 GMT (envelope-from git) Date: Mon, 15 Jul 2024 07:13:34 GMT Message-Id: <202407150713.46F7DYLm015479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7773023b72de - main - DMAR pagetables pages: handle ref_count special references List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7773023b72de19c6c9a47fd04ac955ec52773f0f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7773023b72de19c6c9a47fd04ac955ec52773f0f commit 7773023b72de19c6c9a47fd04ac955ec52773f0f Author: Konstantin Belousov AuthorDate: 2024-07-07 23:26:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-15 06:15:53 +0000 DMAR pagetables pages: handle ref_count special references Preserve object reference and block bit during refcount arithmetic and obliteration, by using vm_page_wire()/unwire_noq(). Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45910 --- sys/x86/iommu/intel_idpgtbl.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 157afaec75ef..de38a6fece94 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -390,7 +391,7 @@ retry: * pte write and clean while the lock is * dropped. */ - m->ref_count++; + vm_page_wire(m); sfp = NULL; ptep = domain_pgtbl_map_pte(domain, base, lvl - 1, @@ -398,7 +399,7 @@ retry: if (ptep == NULL) { KASSERT(m->pindex != 0, ("loosing root page %p", domain)); - m->ref_count--; + vm_page_unwire_noq(m); iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); return (NULL); @@ -406,8 +407,8 @@ retry: dmar_pte_store(&ptep->pte, DMAR_PTE_R | DMAR_PTE_W | VM_PAGE_TO_PHYS(m)); dmar_flush_pte_to_ram(domain->dmar, ptep); - sf_buf_page(sfp)->ref_count += 1; - m->ref_count--; + vm_page_wire(sf_buf_page(sfp)); + vm_page_unwire_noq(m); iommu_unmap_pgtbl(sfp); /* Only executed once. */ goto retry; @@ -486,7 +487,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, dmar_pte_store(&pte->pte, VM_PAGE_TO_PHYS(ma[pi]) | pflags | (superpage ? DMAR_PTE_SP : 0)); dmar_flush_pte_to_ram(domain->dmar, pte); - sf_buf_page(sf)->ref_count += 1; + vm_page_wire(sf_buf_page(sf)); } if (sf != NULL) iommu_unmap_pgtbl(sf); @@ -592,8 +593,7 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, iommu_unmap_pgtbl(*sf); *sf = NULL; } - m->ref_count--; - if (m->ref_count != 0) + if (!vm_page_unwire_noq(m)) return; KASSERT(lvl != 0, ("lost reference (lvl) on root pg domain %p base %jx lvl %d", @@ -709,7 +709,7 @@ domain_alloc_pgtbl(struct dmar_domain *domain) m = iommu_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO | IOMMU_PGF_OBJL); /* No implicit free of the top level page table page. */ - m->ref_count = 1; + vm_page_wire(m); DMAR_DOMAIN_PGUNLOCK(domain); DMAR_LOCK(domain->dmar); domain->iodom.flags |= IOMMU_DOMAIN_PGTBL_INITED; @@ -741,8 +741,10 @@ domain_free_pgtbl(struct dmar_domain *domain) /* Obliterate ref_counts */ VM_OBJECT_ASSERT_WLOCKED(obj); - for (m = vm_page_lookup(obj, 0); m != NULL; m = vm_page_next(m)) - m->ref_count = 0; + for (m = vm_page_lookup(obj, 0); m != NULL; m = vm_page_next(m)) { + vm_page_clearref(m); + vm_wire_sub(1); + } VM_OBJECT_WUNLOCK(obj); vm_object_deallocate(obj); } From nobody Mon Jul 15 12:55:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN2HV04H7z5Qtht; Mon, 15 Jul 2024 12:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN2HT6RSjz4hK8; Mon, 15 Jul 2024 12:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721048133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JxnXQ6GhtTr4Aj5Fsz0UeRJyGod4H3OWsJyeFjfb50c=; b=UUw5Rmc6MwNWk6fqlnk9mBussGpNLEdrLBy4BjKl1ja31h2Ef52gQVeojio7/JKzEFvnSk YUsx3wK5RBPHr/cUXC0p1bNlfNPBRZ6v9WXsFc8srN2iRFkn1bWdT1/pWH9TfNvwV82bQf D0bJcKq1W+3wkWuoSX47AE06ce+YQidsc3MeLwvc6NotbKPH4q6/sP6wzF5QpaK8bJOV+9 b7GIOZuCpl/sbaKhoLe/vgRJZx6v476DlwMHQax3bRl9OOEx08piXS9eNND0VnbzmKmPzW UC8fbO6iVl0ixCuo5iBGIDJCIM2lWwPS9Q+eHPw0FS4hwaadRG+kw0tg4ZV4pQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721048133; a=rsa-sha256; cv=none; b=QOm8tE4KCPg2YOq/YwdEGRNVVYPR9fHtzJxqiYcGtVHUx13jpKy5vBKBtpwTwnbKOCu0Tc wbLNjUpdd8wti6hXwk3Yv11m1mChPlhlQNrlVi3FCw8eoHXvmD1ONefSFQoECrBc7eGYZs Y2LTKYrD3f0VRij3oeSfLdREAHSUDpBmV2DJ057A2ktkeuRWah4EzrKCW2lCkrDaAmVa2f rrbgJi2SkzbE4SGnhE9gYELLYfP1tkOTKbVasgxpxH1GMhVWDZ0mpAVe9ThkAl5I8JvVov CU5H9P+T7NM1IHaLntgQyNq3J3MAp5V9fnHXK3qTr6EzsivVsw+r8KesvJaG9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721048133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JxnXQ6GhtTr4Aj5Fsz0UeRJyGod4H3OWsJyeFjfb50c=; b=xwHsHPmNiEKLTVXmrukyPPuvA4rfXF2SfeiFECNwUmxLRRs+eoy84o03gd43Vsu1WuAseI Dh+LLM84X2RuJ6ol+J3GMiFprllwTue+dRXhbkuOO+uC0OqJZ+edKWDOBPjI+SXNipNgai bBN42Zs3HGzsWm2G4aXVeXqWoHG00f+K96Qyp9kdpbVxNuNUwN14yqMtMNTfi4ihjrL3zW ZcZkA667xR4a4SDJsOuKh5L2V4xdRCXOggNKTapT3nH805sYiiGdHh9ewVXa0crUY+KGbX 2ri9V/q6ESWZG1vyAeDWf6Ns9z+SSQq4dy0cEmf4kw/SuFe4NXNj5ll+LS7X5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WN2HT63NzztXN; Mon, 15 Jul 2024 12:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FCtX0i095271; Mon, 15 Jul 2024 12:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCtXpl095268; Mon, 15 Jul 2024 12:55:33 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:55:33 GMT Message-Id: <202407151255.46FCtXpl095268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 004d5af853bf - main - splash(4): fix markup around cross-references List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 004d5af853bfef1eb66394a15ac9e94e6dcebc0a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=004d5af853bfef1eb66394a15ac9e94e6dcebc0a commit 004d5af853bfef1eb66394a15ac9e94e6dcebc0a Author: Ed Maste AuthorDate: 2024-07-15 12:53:52 +0000 Commit: Ed Maste CommitDate: 2024-07-15 12:53:52 +0000 splash(4): fix markup around cross-references Fixes: 7504e0e3e517 ("splash(4): Document how to use splash screen ...") Sponsored by: The FreeBSD Foundation --- share/man/man4/splash.4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index 736703317a7f..af2ae2e4369a 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -204,8 +204,8 @@ have the following line in the kernel configuration file. .Dl device splash .Pp Next for -.Xr syscons 4 -, edit +.Xr syscons 4 , +edit .Pa /boot/loader.conf (see .Xr loader.conf 5 ) @@ -244,8 +244,8 @@ bitmap_name="/boot/splash.bin" .Ed .Pp For -.Xr vt 4 -, edit +.Xr vt 4 , +edit .Pa /boot/loader.conf (see .Xr loader.conf 5 ) From nobody Mon Jul 15 13:03:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN2Sh6Rrmz5QvPc; Mon, 15 Jul 2024 13:03:32 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN2Sh0QnFz4hy6; Mon, 15 Jul 2024 13:03:32 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.51 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7fe8d029fbeso144824239f.3; Mon, 15 Jul 2024 06:03:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721048608; x=1721653408; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0g8apwROfei5LIpxKtqt4xFCY8Lo/cw/NPquv9tU1vQ=; b=JdJ3HMI2lT9OumrbhdPAsAB9hQVSHqgFBszWeYWNZOu+4fHN16k6aeql+CzXfsahRG U93a3iZlDB/qP/+kNFAXaJATZaD4DT1HNablA4ogasbJFyTcdI+RSotpSUVP6YF6FBis u0NXtEjiU41v6u32G97c19c4FCrNS4dUO1zHZ6m/EfiWmMPPKyJkwiau7O7ptgXklc6K NJhnHb758tDws7/tzpVko3TwIY0dupARKZ9pzggfMcObQXEgic6KVXyKaGcpANbTsimA u7Y/tXvfe0m4U2/Bn/trEFHWzXEvXj17y0ZJOFImIFBlnX7EyC7jRkfET/iTto3VlNIE ue1w== X-Forwarded-Encrypted: i=1; AJvYcCVxwJ4VWrzBJWe0R20Oq++BUUSEoZS2Euz/RBaYSB11aOtxtXmvXC/f2OtQAnm8YspeRwwUPPYNadAMnM4kTjjbnJ69xD34oSYtoZmZ6zULpmbGZUpW+dCheQIos2SVwZlrSTgWJUq5+thXPZ/IhqC+0g== X-Gm-Message-State: AOJu0YxhLZJCNSSkHTq7GfDNyH8nE1GeFkCDtbHkeHBn/gYBPhFs4MNi /Yhe5LT7y24H3gOKSSvv9FYkjXJuD9bWwb7s4bC2dbeATQdsD7SDI7r0p7aV8guXluKZs3EZjKh LUgZEfvq0ZNljJSHSxfyv2vaJekzvJA== X-Google-Smtp-Source: AGHT+IGJF+DFse6wyrwPgiydo5mLSXBF9nPc832ussTh83nimuONiRuHoyN+molou25tgC/80J5hP5N8Q+wxEf7oId8= X-Received: by 2002:a05:6602:4fd6:b0:7f9:b435:4f5 with SMTP id ca18e2360f4ac-80000ea0ad0mr1986027939f.11.1721048608439; Mon, 15 Jul 2024 06:03:28 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407140600.46E60JKl047510@gitrepo.freebsd.org> In-Reply-To: <202407140600.46E60JKl047510@gitrepo.freebsd.org> From: Ed Maste Date: Mon, 15 Jul 2024 09:03:16 -0400 Message-ID: Subject: Re: git: 60f098f84119 - main - arch: Update to remove armv6 To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: - X-Spamd-Result: default: False [-1.75 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.48)[-0.476]; NEURAL_HAM_MEDIUM(-0.37)[-0.370]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MISSING_XM_UA(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.51:from]; FREEFALL_USER(0.00)[carpeddiem]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.51:from] X-Rspamd-Queue-Id: 4WN2Sh0QnFz4hy6 On Sun, 14 Jul 2024 at 02:00, Warner Losh wrote: > > .Dv aarch64 > will support execution of > -.Dv armv6 > -or > .Dv armv7 > binaries if the CPU implements > .Dv AArch32 > -execution state, however older arm binaries aren't supported. > +execution state, however older arm binaries are not supported by > +.Fx . Do older 32-bit Arm userland binaries actually not work? Would "support execution of 32-bit Arm binaries if the CPU implements the AArch32 execution state" be accurate? From nobody Mon Jul 15 13:31:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN3515XtZz5QxhP; Mon, 15 Jul 2024 13:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN35152k4z4mmV; Mon, 15 Jul 2024 13:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721050293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6fTKnjDdPa7c/8+YrIr4m7ZT2z38/MctvXAHaQ5CS7o=; b=Li3c/OURh9ANkkYB9+vamHY/Xkk2U4lGCLkvSUuzTb+MaS0OFHiPk7cZ6ShXkFx3ntTPlq KKGQGD1hbW2vYhabB/OFqlCPWMvXX1a+EgRhXet8DTCXcltN3tKwNDi4+P4uew4XMttsGT dPI9VW6l72PbsxD8S8zDtkKT/eBIoM5PBa7KuYFRI2kAd8CZYCef3vOhxgCkn9xvre2tjg SwhVjVsRa/zOuFbOAXuHEteV4/h2gIHoH+FNpjdtiEtHxS8lOspCh+gzKqti1ao8PdHcp3 ioab3C4Zq7AfqFsWvHlEwQKI+yLkVrfZ8Qf3an4j4+43odz9Ntdg0eMCcUOgpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721050293; a=rsa-sha256; cv=none; b=oqgKr2syNLKP0WoFrlkc5SwGU7QOSL2dziLa34h/B4AhibqBB6iQAo6jR+Tk6gKEy31Pe7 7wlPGbE5ITYEuIFF/Y8yfeiQESU9DwVRab78eRA9Bu4FnYvHLovjb7cySP5SW84tsG9HXN z6kW18TFouz1QEHP8qtt+/ZDswIZjgLB9BuoCsCHAN6NJ6AyFXa90CU3zuk/OPTJiw4sqH luifSx1jRqv+8r8smJK10R/Tlifxop4mob8X8ovDPzJPok9sVAYuwjpXTilLsSuGEW638h vGTm1hHRJh4kK1WZvKLcgJZTZWLJF8zze7ncxeKx9h0tVl439z2B93AJzr78sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721050293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6fTKnjDdPa7c/8+YrIr4m7ZT2z38/MctvXAHaQ5CS7o=; b=tFSQMK7OOoR3G7HivM4iU1oz/U6KaiBfw7CKERJzWWeowFLzCtmo+D/4CUH5RnJRRZGyLU ZK/32+vK5lFK32Dre2BcPQ6pOj0v3fDW6XECRDFs18z7CVHE6QrOl29W0MgmVYu6UYQL9p VnoQ7UHYnTPisviOeY52x2G2cjm5643cvNvGq8YF8VwxsRfmeNCFONANzIfcKjUH5vtyR2 bkqQg+xxujY2qmpmNJh1rG5ODwwfz1NVilbkNFzOK17MB6ZbeYBC5Ceg/8n5EVHgSgSbi3 oX7APK7MUBSay/D9QnTLG1iiPGcBIzVvAmlF5S/MNtoh+AjYH6zOMLQZaV1bUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WN3514f39ztmn; Mon, 15 Jul 2024 13:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FDVX6M061376; Mon, 15 Jul 2024 13:31:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FDVXkW061373; Mon, 15 Jul 2024 13:31:33 GMT (envelope-from git) Date: Mon, 15 Jul 2024 13:31:33 GMT Message-Id: <202407151331.46FDVXkW061373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 001606523a48 - main - libm: add parens to clarify expressions in fma, fmal List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 001606523a48ca2aa440c985db47327a00671358 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=001606523a48ca2aa440c985db47327a00671358 commit 001606523a48ca2aa440c985db47327a00671358 Author: Ed Maste AuthorDate: 2024-06-18 01:30:44 +0000 Commit: Ed Maste CommitDate: 2024-07-15 13:30:02 +0000 libm: add parens to clarify expressions in fma, fmal Obtained from: NetBSD --- lib/msun/src/s_fma.c | 6 +++--- lib/msun/src/s_fmal.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 16902d321290..6c889a6a46ca 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -222,17 +222,17 @@ fma(double x, double y, double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafter(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafter(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafter(z, INFINITY)); else return (z); diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 9d08bc72e12e..80c835d09c2b 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -203,17 +203,17 @@ fmal(long double x, long double y, long double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafterl(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafterl(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafterl(z, INFINITY)); else return (z); From nobody Mon Jul 15 13:51:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN3XC31psz5R08K; Mon, 15 Jul 2024 13:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN3XC2cLjz4qKP; Mon, 15 Jul 2024 13:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721051499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XAMbQtIHfWqglUEdANrlbL9gDXhkKsJuedgSObZmWJ4=; b=ddi3grJ2Vi04fSGr5tANssnOcAKewlDxGOWKATZtTYPzZHVeMp4pFU0NQQo1audTvPrmrG otIX0QN3TRWlq8xboInWAPVoqKhhePM1ht3Ozx9BrjZ+RnchNbpnIwiG3Jftz+RVqKw+3p YU3/GQAADce/IMJNo2qreflPkmGngz6XytiNpaDeLu8MhflGA15ENGNEJHJXPjlBEF4XK/ kbzgg2oeprMbXws4yhxXteBjcb6jynwDj9zSIvypDHFR3h/9FAfZHgw8QomJa5Gdr5IlzW grUFhUrlb0IaEWmBdWLZOfxHr0Wct84KFem2LWW4DSznH8ahauoV8624tWt75A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721051499; a=rsa-sha256; cv=none; b=aJJKjoV1qVv3KnXjl5N6PdIvUodIuxItDgQJVM+qY/R5mjkmPPEqy7upkM1R+afnI5eKJ7 Zj57YLakkAe+nGTgzo44oLZaQIk/lv5QyRxHwm/3N3Jmyx2NHTYWcyCiqXKSML8comcOkh VPR0ZUaHvLKPaefSST+7/7EXaPoiTE8d8pQSqbe3HNuLMLULOtAv9O7BdxuQEV7Qx5SxDQ I9w5kXIX0U7o0YpWX66az+9rgsJh3MK1lBA8oK8x0LO+oBIqFKHc07ptsuiMTu+3MHNMJq O94A/GMGdpiSox5vKazALDmwMUnHAMKhqv0mXcizgqvm9TMRngHKh3zxaOzZ4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721051499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XAMbQtIHfWqglUEdANrlbL9gDXhkKsJuedgSObZmWJ4=; b=JhA69Ev4CWDBE7UB7C5eibCNXepu5z46Z4zgf01NunimGUzBgLXTkMXVtLfPMWilnNZyO9 ta/Fhs3oFFNGC/02JvuWm6TPZ9u7SuueLkK0rQY7AGUkK9b+UEYHez7OQASd5tPGia/NJH Y5hSxzLbuCGW5SfwOqHfmLIWeBOexU9bQHkjb2wi2dVCSjyEC0uzmpbTN40DC/wFh8NBwx w6Q/EjOfafwxoQHmr27UWpfoOj1pfqcXrut26Mw/vfjkerCPy+i+dcdVvrB1QCbThkr1dc y1RA0MiBTmGAl3zciGx8FFT/rbGEJorU7e+3b63udY1GsIAu/OXqdiFhQoXXHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WN3XC2Cv2zvXC; Mon, 15 Jul 2024 13:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FDpdYF092824; Mon, 15 Jul 2024 13:51:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FDpdWE092821; Mon, 15 Jul 2024 13:51:39 GMT (envelope-from git) Date: Mon, 15 Jul 2024 13:51:39 GMT Message-Id: <202407151351.46FDpdWE092821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 867873b3980c - main - Revert "Makefile.inc1: show time for `make installworld'" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 867873b3980c42c379f1f0e6ac88d92337ddf5dd Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=867873b3980c42c379f1f0e6ac88d92337ddf5dd commit 867873b3980c42c379f1f0e6ac88d92337ddf5dd Author: Ed Maste AuthorDate: 2024-07-15 13:49:26 +0000 Commit: Ed Maste CommitDate: 2024-07-15 13:50:04 +0000 Revert "Makefile.inc1: show time for `make installworld'" It broke `make packages`, so revert until that can be fixed. This reverts commit e5a0202f96948a95bf1b879727e155a4f1d1da93. Reported by: bapt, theraven --- Makefile.inc1 | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 7ff961e22e7a..19ed923702b1 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1241,19 +1241,11 @@ WMAKE_TGTS+= build${libcompat} .endif WMAKE_TGTS+= everything -# record buildworld / install time in seconds +# record buildworld time in seconds .if make(buildworld) _BUILDWORLD_START!= date '+%s' .export _BUILDWORLD_START .endif -.if make(installworld) -_INSTALLWORLD_START!= date '+%s' -.export _INSTALLWORLD_START -.endif -.if make(installkernel) -_INSTALLKERNEL_START!= date '+%s' -.export _INSTALLKERNEL_START -.endif buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue @@ -1321,11 +1313,11 @@ kernel-toolchain: ${KERNEL_TOOLCHAIN_TGTS} .PHONY installcheck: _installcheck_world _installcheck_kernel .PHONY _installcheck_world: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> Install check world started on `LC_ALL=C date`" + @echo ">>> Install check world" @echo "--------------------------------------------------------------" _installcheck_kernel: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> Install check kernel started on `LC_ALL=C date`" + @echo ">>> Install check kernel" @echo "--------------------------------------------------------------" # @@ -1649,8 +1641,6 @@ restage reinstall: .MAKE .PHONY .endfor @echo "--------------------------------------------------------------" @echo ">>> Installing everything completed on `LC_ALL=C date`" - @seconds=$$(($$(date '+%s') - ${_INSTALLWORLD_START})); \ - echo ">>> Install world completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" redistribute: .MAKE .PHONY @@ -1883,9 +1873,6 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel .PHONY @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${INSTALLKERNEL} completed on $$(LC_ALL=C date)" @echo "--------------------------------------------------------------" - @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \ - echo ">>> Install kernel(s) ${INSTALLKERNEL} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" - @echo "--------------------------------------------------------------" .endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} @@ -1900,9 +1887,6 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel .PHONY @echo ">>> Installing kernel ${_kernel} completed on $$(LC_ALL=C date)" @echo "--------------------------------------------------------------" .endfor - @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \ - echo ">>> Install kernel(s) ${BUILDKERNELS} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" - @echo "--------------------------------------------------------------" .endif distributekernel distributekernel.debug: .PHONY From nobody Mon Jul 15 14:14:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN42V4XnLz5R1qC; Mon, 15 Jul 2024 14:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN42V3ZVqz4stS; Mon, 15 Jul 2024 14:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721052866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y/9q84YBF97EVqmRaWaXXlrPUOtWuDv5e1d2Ax5zJ4w=; b=yC6vXGrv1+km2cRshTufT8sjenepm9ze3aXiYSMUD4SsZLwY8GqS//c2ygWHWOpsEmhOeU UCYIoWNz5jK0xfgyNzbQpi9rgKornsaWSYSyR8aeiltS/TpJrJ66jiryHMgzkX5SetFulI wi2bLT00lsHMKhqOZ6tcNvm/0eAF7jKFCIf9VV8wCNVuAC02fvbpCl93hzeah84OmByC18 KQnw6P+RDIflPQOINdziWBCGEUaFJrk97GSBguvy9WaJqmUTqfJ7s1MNrBudI77ChaHhot CoD4hq3tboC4mQuCftTZZp9SoKJt5QD7++pY22bJ4BdQPei/N5DEJ46h0QOEYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721052866; a=rsa-sha256; cv=none; b=q9nPdXcn1BDTv0IgzZNRq9htRvuuIcLgTsyjMQVO+Pv8gte50gpRegGGHBwJmG8HVkcsOy ziW7uFl1SOvPedRvf5RioKu7aIGV4KWNp6pe4WonS0PIIqEfyZrRcOqdCRpo2MX05AALNu VERfdp0uO1L75qG3Y6vfjw4OFx2nzuJY5kbxzoFusbnRlveSh7lpySeDZezX0NtPF4nXHy c/KDiVqXgTV2k7dBDuWFognlm7FQ25N50tsECl6yJW1hcxPaR1nEMreQ8yiB+hYXSLcVdg yNVooErEkMhgHnAFU33bZfXCS+3phllIUXoxZ0gMoPIsFA9dysLyLLDF/SytBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721052866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y/9q84YBF97EVqmRaWaXXlrPUOtWuDv5e1d2Ax5zJ4w=; b=AHHhPNvrrr6XIHgR0CgIfH7tWxgx7lfWDYFs23Inxqb9h7Jo6ku2mxH++DVqeraDgdT2bb xDtUiFkQ+kz2claO5JpC4MaQ8bRG3UxcXmxbxNWw7BMIGx8FWQWwtCUX9jBeoUHNgzSpRY CdN2xEF+pLMnCuBlF5UNubdZC0+5VlzbLX/4qXP4UpMc9B+pP5ftKTUlXeIFw4juMVk95C ryj+mJGhbwmEQSfl720p5cSNUlcB5kFxuiqUQZtBVQs1ZEacQ8qTrmHT2EnjgiAsYLFG9/ ifm6mQxmlcHd1PV1nZaGUFDljK+2QyVgmoOSse6uOY3FeBOSL3RvE+5Ihmiz6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WN42V2ntczw3h; Mon, 15 Jul 2024 14:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FEEQrZ031515; Mon, 15 Jul 2024 14:14:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FEEQM0031512; Mon, 15 Jul 2024 14:14:26 GMT (envelope-from git) Date: Mon, 15 Jul 2024 14:14:26 GMT Message-Id: <202407151414.46FEEQM0031512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e5a18aa2373b - main - splash(4): Subject/verb agreement List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5a18aa2373b9446fd93622acf6a8a7ba10e2589 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e5a18aa2373b9446fd93622acf6a8a7ba10e2589 commit e5a18aa2373b9446fd93622acf6a8a7ba10e2589 Author: John Baldwin AuthorDate: 2024-07-15 13:59:57 +0000 Commit: John Baldwin CommitDate: 2024-07-15 13:59:57 +0000 splash(4): Subject/verb agreement --- share/man/man4/splash.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index af2ae2e4369a..b001663c4fa5 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -304,7 +304,7 @@ and modules were written by .An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . .Sh CAVEATS -The screen saver work with +The screen saver works with .Xr syscons 4 only. .Sh BUGS From nobody Mon Jul 15 14:17:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN45X4dz6z5R2Wn; Mon, 15 Jul 2024 14:17:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN45X47jyz4tgF; Mon, 15 Jul 2024 14:17:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721053024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E6hyfblkeISuomKjGAjGVSATaxveL75XubxU6h/HMf8=; b=XUHrz425w181E1e7uIG8jkaRHfV6fQVxJDM2v6ueDK5KaVggqg5sXpZ7LbmFDyJagc/Kew yjLfnr2ns4KfbKX0bPI/NMEsa21ojNL3NCRn/16ADzCxjyx3qxQ/RllcYYkcuGGLu68QFJ nrAm+ixn9DOPDyZ7Cjh6kTrXLeIMpF0Rjly8EbzGdDAl4kQhpvw2ameIrJcG/rzdbpkL1G uc2CoGkT7yjGCWU1UkYGKbZqKZUihxmDWYZDEOMWUnNN1WMa9mMn95tTorvY4UZ9ywyU5/ TWr+Cze3W7Ca6SQbn2lmn+IrXJ1SLaqbnoET4Y0m9XqWMNa/T2MhhpWKKibksw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721053024; a=rsa-sha256; cv=none; b=xncdEQ1eBfsdGwsosp84m+1Yc7SrSmumc6stY/B9iWXq2PUetGOAg++/MSPzfaDHItGr0l KVDyy+nDkLWCeuCU5LLoDD+LcHgj7Oioa5Hgtp3rMG8fZAMWw1Ct78sPb7rvRymmI2VPnE 5VKfFl4n87K1N65RkC6QVsv/9AnQNO3HxHPg84K8jSi0QJ3DXUWN25N4c2mKUCMnHAwryZ qodF2sJxgFIlDoduxz8K3oCwPEaEI9HzHO4jENqGnJRBqVTKYtFF9htK8/n9jKp0WAC+my jajG/f9pywd0JVcaf0Ej3GiFCeo9bB5F5WH1/vZFs1k1h8XrccZXU0uHB4f7Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721053024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E6hyfblkeISuomKjGAjGVSATaxveL75XubxU6h/HMf8=; b=caNpbLzx2XgJ4y1fi/ljRp1KSsSki93qIxWSCKSh89LlVIKfZJy617jnc1TssrsBFt3+8I x/ar8jKVtNeq8PTHHJPtnfIGPs+1ODHcTje9+dk4dlGPvNYi0WsZwLHHxFgQ+qo34qa6YE xLDMIiNwoXbzka2CSXJQ3HxIywdQSfm3OYjiEehYhExPGgErMthXS1iLVbcVq39Guwj3+r efOElaMBdXoQgCmdiUYLvluWLce0zhNQdzUY/F1CM61gm+dATT5UQMeXpFumNeFnF7B/Cg 12n591EXU47Svx+8d8QLVQeQMTj8N4FXjsG/PhN+kt/RssGeAE2QRzDXAgPi1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WN45X3lGyzwF9; Mon, 15 Jul 2024 14:17:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FEH4Wa032033; Mon, 15 Jul 2024 14:17:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FEH4Bi032030; Mon, 15 Jul 2024 14:17:04 GMT (envelope-from git) Date: Mon, 15 Jul 2024 14:17:04 GMT Message-Id: <202407151417.46FEH4Bi032030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 480cc750a2a8 - main - amd64 GENERIC: Drop hints for fdc0 and ppc0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 480cc750a2a8f92d078803f15eecb1f8a084a1ea Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=480cc750a2a8f92d078803f15eecb1f8a084a1ea commit 480cc750a2a8f92d078803f15eecb1f8a084a1ea Author: John Baldwin AuthorDate: 2024-07-15 14:16:39 +0000 Commit: John Baldwin CommitDate: 2024-07-15 14:16:48 +0000 amd64 GENERIC: Drop hints for fdc0 and ppc0 Modern x86 systems do not ship with ISA floppy disk controllers or LPT ports. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45946 --- sys/amd64/conf/GENERIC.hints | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hints index be3f59cd1950..7c2a3f28b9ce 100644 --- a/sys/amd64/conf/GENERIC.hints +++ b/sys/amd64/conf/GENERIC.hints @@ -1,11 +1,3 @@ -hint.fdc.0.at="isa" -hint.fdc.0.port="0x3F0" -hint.fdc.0.irq="6" -hint.fdc.0.drq="2" -hint.fd.0.at="fdc0" -hint.fd.0.drive="0" -hint.fd.1.at="fdc0" -hint.fd.1.drive="1" hint.atkbdc.0.at="isa" hint.atkbdc.0.port="0x060" hint.atkbd.0.at="atkbdc" @@ -21,8 +13,6 @@ hint.uart.0.irq="4" hint.uart.1.at="isa" hint.uart.1.port="0x2F8" hint.uart.1.irq="3" -hint.ppc.0.at="isa" -hint.ppc.0.irq="7" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" From nobody Mon Jul 15 15:23:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN5Zc0xdQz5R7ng; Mon, 15 Jul 2024 15:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN5Zc0ktrz43W2; Mon, 15 Jul 2024 15:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721057032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EOBwQaFI+U5FsB8MalndvAy5MW5nWLNlZjVnqMLYkyI=; b=Rcdw7fNcHEvK6sn7XmX8sEsbHARUSqapyA+zrt+fj6ZTB5Nye4YIA1rtQGDshzz4jLef2k wsI1U3wn66QkEgKbtvAvxhr9SVMmiQ28HnJrd6h8x8fMmqLkAhXsTaGUqo0D3F8OwIYefe BBogEjefbgodlIYSP8R4Yiqq5i3VJJINNZN3GNNjudOoZDVUOuiI06g5RIXBpX99ksvlz1 iw0aDGHjhVSgNCYxD7hKKA4ucQ5E3fAst9FMYjmh7l8gYP3K6tEbcm+5tO/DrYAGL06U1v oRbwjotdnJPfgQhdCHm5sBPzzrJnyNVuNDp3/qCkj9os7Mf5vzIfoTcTaUpFqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721057032; a=rsa-sha256; cv=none; b=uFTCWF1k1e9AfNpNvs2K32SJRaFLH+UsBximapFtQrXw3Bo9B1F8h6eapUN1zu5X5I+1NG IJhl5cprKOhLIzAnHvdWk2ZhebF3TS+BvHASw5JadYrcK+MKEPL4iOQ6IeKQRaxt7kKsWf n+a0HfziCfG2yOx2mMaV5cxHkb3NM2LvBYUh7TMw4fA1DKNzGo6/6Wbolu8vBaNi8iQdlT mtMlZIngPNuOQS6F2f8snqa0pL8JK/DMTg90D3IRauoxfDvXr0pkGvjTMkGz9QA/uxOxCm dXW8+1YkzvG3dFfe6OKYAnyrBt3jR0Xl1Mwc4si3s0mxRh7kCI6rUSxMDnZC5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721057032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EOBwQaFI+U5FsB8MalndvAy5MW5nWLNlZjVnqMLYkyI=; b=DoWAOP9IaSlvakQ4mNbE//yyLkId8BMiffPPOIc4IOyBtzXiXWYDLo5z1mKDyuRPK6gjbW KW5wzqFN+3icXRKoHV1R00Lk80cIdk5BjbbXq2JRCKtFiBIHFHa4xV8lmPhPGzKth9d0b1 SgGiYPwXjxShdvvKxpcp2xwNpR5KilB8NvZruYUARtBHfWmlPynlwhu3bFmVauytVrf72T AefPglrsCz+mOCVoCbOekYSK+xfpHHAP9ZPEhJI4B7k5PGoCsI2ZHytf+GuVmlWqTbmraE y+sEigk45gwWSoT28GnxEtw2ABHEDGnfJsfDFYHuaU0Qy6FaLh6hHLMFtDkaQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WN5Zc0KmNzyB4; Mon, 15 Jul 2024 15:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FFNpZ0049014; Mon, 15 Jul 2024 15:23:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FFNpxb049011; Mon, 15 Jul 2024 15:23:51 GMT (envelope-from git) Date: Mon, 15 Jul 2024 15:23:51 GMT Message-Id: <202407151523.46FFNpxb049011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 51c8a9c1be57 - main - unbound: Remove backup file List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51c8a9c1be57b6750e7c64e1379e8c33bd0f02c1 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=51c8a9c1be57b6750e7c64e1379e8c33bd0f02c1 commit 51c8a9c1be57b6750e7c64e1379e8c33bd0f02c1 Author: Cy Schubert AuthorDate: 2024-07-15 15:15:27 +0000 Commit: Cy Schubert CommitDate: 2024-07-15 15:15:27 +0000 unbound: Remove backup file Upstream unbound includes a backup configure file which is distributed in the upstream tarball. It must be created by their release process and not deleted prior to packaging the tarball. I've received two emails so far asking about it. Let's remove it so nobody else asks about it. MFC: 1 week --- contrib/unbound/configure~ | 26616 ------------------------------------------- 1 file changed, 26616 deletions(-) diff --git a/contrib/unbound/configure~ b/contrib/unbound/configure~ deleted file mode 100755 index d4a394eb9540..000000000000 --- a/contrib/unbound/configure~ +++ /dev/null @@ -1,26616 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for unbound 1.20.0. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. -as_nl=' -' -export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi - -# The user is always right. -if ${PATH_SEPARATOR+false} :; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : - -else \$as_nop - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null -then : - as_have_required=yes -else $as_nop - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : - -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : - CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : - break 2 -fi -fi - done;; - esac - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi - - - if test "x$CONFIG_SHELL" != x -then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." - else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and -$0: unbound-bugs@nlnetlabs.nl or -$0: https://github.com/NLnetLabs/unbound/issues about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else $as_nop - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else $as_nop - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - printf "%s\n" "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='unbound' -PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.20.0' -PACKAGE_STRING='unbound 1.20.0' -PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include -#endif -#ifdef HAVE_STDLIB_H -# include -#endif -#ifdef HAVE_STRING_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_header_c_list= -ac_func_c_list= -ac_subst_vars='LTLIBOBJS -date -version -INSTALLTARGET -ALLTARGET -SOURCEFILE -SOURCEDETERMINE -IPSET_OBJ -IPSET_SRC -IPSECMOD_HEADER -IPSECMOD_OBJ -CACHEDB_OBJ -CACHEDB_SRC -DNSCRYPT_OBJ -DNSCRYPT_SRC -ENABLE_DNSCRYPT -ENABLE_DNSCRYPT_XCHACHA20 -DNSTAP_OBJ -DNSTAP_SRC -DNSTAP_SOCKET_TESTBIN -DNSTAP_SOCKET_PATH -opt_dnstap_socket_path -ENABLE_DNSTAP -PROTOBUFC_LIBS -PROTOBUFC_CFLAGS -PROTOC_C -UBSYMS -EXTRALINK -COMMON_OBJ_ALL_SYMBOLS -LIBOBJ_WITHOUT_CTIME -LIBOBJ_WITHOUT_CTIMEARC4 -WIN_CHECKCONF_OBJ_LINK -WIN_CONTROL_OBJ_LINK -WIN_UBANCHOR_OBJ_LINK -WIN_HOST_OBJ_LINK -WIN_DAEMON_OBJ_LINK -WIN_DAEMON_OBJ -WIN_DAEMON_SRC -WINAPPS -WINDRES -CHECKLOCK_OBJ -staticexe -PC_LIBEVENT_DEPENDENCY -UNBOUND_EVENT_UNINSTALL -UNBOUND_EVENT_INSTALL -SUBNET_HEADER -SUBNET_OBJ -PC_LIBBSD_DEPENDENCY -SSLLIB -HAVE_SSL -PC_CRYPTO_DEPENDENCY -CONFIG_DATE -GCC_DOCKER_LINTFLAGS -NETBSD_LINTFLAGS -PYUNBOUND_UNINSTALL -PYUNBOUND_INSTALL -PYUNBOUND_TARGET -PYUNBOUND_OBJ -WITH_PYUNBOUND -PYTHONMOD_UNINSTALL -PYTHONMOD_INSTALL -PYTHONMOD_HEADER -PYTHONMOD_OBJ -WITH_PYTHONMODULE -swig -SWIG_LIB -SWIG -PC_PY_DEPENDENCY -PYTHON_LIBS -PY_MAJOR_VERSION -PYTHON_SITE_PKG -PYTHON_LDFLAGS -PYTHON_CPPFLAGS -PYTHON -PYTHON_VERSION -DYNLIBMOD_EXTRALIBS -DYNLIBMOD_HEADER -DYNLIBMOD_OBJ -WITH_DYNLIBMODULE -PTHREAD_CFLAGS_ONLY -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CXX -PTHREAD_CC -ax_pthread_config -ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ -SLDNS_ALLOCCHECK_EXTRA_OBJ -USE_SYSTEMD_FALSE -USE_SYSTEMD_TRUE -SYSTEMD_DAEMON_LIBS -SYSTEMD_DAEMON_CFLAGS -SYSTEMD_LIBS -SYSTEMD_CFLAGS -RUNTIME_PATH -LIBOBJS -CPP -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -AWK -RANLIB -ac_ct_AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -SED -LIBTOOL -AR -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -libtool -STRIP -doxygen -YFLAGS -YACC -LEXLIB -LEX_OUTPUT_ROOT -LEX -debug_enabled -DEPFLAG -GREP -UNBOUND_USERNAME -UNBOUND_ROOTCERT_FILE -UNBOUND_ROOTKEY_FILE -UNBOUND_PIDFILE -UNBOUND_SHARE_DIR -UNBOUND_CHROOT_DIR -UNBOUND_RUN_DIR -ub_conf_dir -ub_conf_file -UNBOUND_LOCALSTATE_DIR -UNBOUND_SYSCONF_DIR -UNBOUND_SBIN_DIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -LIBUNBOUND_AGE -LIBUNBOUND_REVISION -LIBUNBOUND_CURRENT -UNBOUND_VERSION_MICRO -UNBOUND_VERSION_MINOR -UNBOUND_VERSION_MAJOR -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_conf_file -with_run_dir -with_chroot_dir -with_share_dir -with_pidfile -with_rootkey_file -with_rootcert_file -with_username -enable_checking -enable_debug -enable_flto -enable_pie -enable_relro_now -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_rpath -enable_largefile -enable_systemd -enable_alloc_checks -enable_alloc_lite -enable_alloc_nonregional -with_pthreads -with_solaris_threads -with_syslog_facility -with_dynlibmodule -with_pyunbound -with_pythonmodule -enable_swig_version_check -with_nss -with_nettle -with_ssl -with_libbsd -enable_sha1 -enable_sha2 -enable_subnet -enable_gost -enable_ecdsa -enable_dsa -with_deprecate_rsa_1024 -enable_ed25519 -enable_ed448 -enable_event_api -enable_tfo_client -enable_tfo_server -with_libevent -with_libexpat -with_libhiredis -with_libnghttp2 -enable_static_exe -enable_fully_static -enable_lock_checks -enable_allsymbols -enable_dnstap -with_dnstap_socket_path -with_protobuf_c -enable_dnscrypt -with_libsodium -enable_cachedb -enable_ipsecmod -enable_ipset -with_libmnl -enable_explicit_port_randomisation -enable_linux_ip_local_port_range -with_libunbound_only -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -YACC -YFLAGS -LT_SYS_LIBRARY_PATH -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR -CPP -SYSTEMD_CFLAGS -SYSTEMD_LIBS -SYSTEMD_DAEMON_CFLAGS -SYSTEMD_DAEMON_LIBS *** 25657 LINES SKIPPED *** From nobody Mon Jul 15 15:29:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN5hv6mqDz5R7sm; Mon, 15 Jul 2024 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN5hv6DG4z43f4; Mon, 15 Jul 2024 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721057359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHFHzFVZQdO+KzWoQy25K9t2b0h49Pcp8XeimrR2HVI=; b=nWg5h9bIzui1wwPr8LZt6kexKXF1TXb5oPr1RLSJ0u9c8D9PpNwGFnIdGvFVcBcAiX9TIg mehTO4tCdOWe2wOqf517yCwffK1c0NUCKXkQEiit87cGWSHEVhVqfD2PZ1ejsAl5eKeAmM U1EUNVcOjk2HgtDn+AQSy2Jedx34G6k+X3ab+o0eDXfIpJlK3tI1dkWsdMJ0bMdVY/5Kvt eQXJpwKmF4ptDr/crtovb6H9Ta7GrJD8mFT4cnHG95UqBuLQsRYzbBt7qMJudtR8574gVo jX6GqiRweDzg+4UJATRR2OtKW7/15LyRTpKD4mUmIShe9GbOMw+DbbYO6jymXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721057359; a=rsa-sha256; cv=none; b=ORXtAFzXmnaantrzUh79GEEUe6yIJGseAMqAbHIiIkK1TnvMM04oSIh2Rav24C7fg2nuz7 xWiu4jyF8d7pP6eSzOHZikhzlIyrNwL3PrYRTg0TmjTVNblJf+W8vBQuIbCsxj2Pg1Ch6V Xg7iQ+u6bK7xOPThuPijOtrRa4MyxpWbj0gdK4yhgBxAI8G6Xvvl6TYTMjKnXnTYyyZIFw UnHFuJ8Y13ZS/AQlylKOVF1ePTnORuZ8UR2IMLrhXmN0+2l9uaF0QaOpVWVsNAhfb3mAPC OQhhkBxpWBgJecmq3agDI3pHrGwUZYzof9o7LvlD8nr2t9WsWHhr761mlIU0Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721057359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHFHzFVZQdO+KzWoQy25K9t2b0h49Pcp8XeimrR2HVI=; b=FL7GUzkhGMhTBZoZmOw7eDA7LyZNpIkj3mQYtTDoj8fuKMLD8cAgbQHARZyIcPRKu4Pv1e VDUgwvRmbw7fqTIS7BFpJ9Mr756gJQnZYv1Ef9RwfCJj/crTWlddUDcmpv3VGW4hrsyxRJ MRKIT6Jc+YMjP6pC3CgXdeRrhVr+SOAMvH8ZIgWbxmVOErJ4Rd9JyxkJz6kmL/YedARba1 8VuBJNvfZZ6DRE1Px59cwxVLYboUc5LNE6bvfUGV5NxC+pjuCEM99xn/WwyWvxlgdLXlt2 mtXmy0DQhvD3fGUDeqvWh5PwF9sYbDIKBuVzlY+9o0nJv51zw83ym3Qleoue8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WN5hv5qSSzyB5; Mon, 15 Jul 2024 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FFTJrx049846; Mon, 15 Jul 2024 15:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FFTJuT049843; Mon, 15 Jul 2024 15:29:19 GMT (envelope-from git) Date: Mon, 15 Jul 2024 15:29:19 GMT Message-Id: <202407151529.46FFTJuT049843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6af3d5996244 - main - cxgbe: Flush transmitted packets more regularly in netmap mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6af3d59962449c66688361598163dd174cc5fb2a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6af3d59962449c66688361598163dd174cc5fb2a commit 6af3d59962449c66688361598163dd174cc5fb2a Author: Mark Johnston AuthorDate: 2024-05-21 19:18:32 +0000 Commit: Mark Johnston CommitDate: 2024-07-15 15:26:59 +0000 cxgbe: Flush transmitted packets more regularly in netmap mode Previously, when transmitting short runs of packets via cxgbe_nm_tx(), we would wait until a large number of packets were buffered before scheduling a task to clean transmit buffers. Obtained from: np --- sys/dev/cxgbe/t4_netmap.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index 0377f65acc3e..e53fb5054316 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -1025,29 +1025,28 @@ cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_txq, nm_txq->pidx = 0; } - if (npkt == 0 && npkt_remaining == 0) { + if (npkt + npkt_remaining == 0) { /* All done. */ - if (lazy_tx_credit_flush == 0) { + if (lazy_tx_credit_flush == 0 || + NMIDXDIFF(nm_txq, equiqidx) >= nm_txq->sidx / 2) { wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ | F_FW_WR_EQUIQ); nm_txq->equeqidx = nm_txq->pidx; nm_txq->equiqidx = nm_txq->pidx; + } else if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + nm_txq->equeqidx = nm_txq->pidx; } ring_nm_txq_db(sc, nm_txq); return; } - - if (NMIDXDIFF(nm_txq, equiqidx) >= nm_txq->sidx / 2) { - wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ | - F_FW_WR_EQUIQ); - nm_txq->equeqidx = nm_txq->pidx; - nm_txq->equiqidx = nm_txq->pidx; - } else if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { - wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); - nm_txq->equeqidx = nm_txq->pidx; - } - if (NMIDXDIFF(nm_txq, dbidx) >= 2 * SGE_MAX_WR_NDESC) + if (NMIDXDIFF(nm_txq, dbidx) >= 2 * SGE_MAX_WR_NDESC) { + if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + nm_txq->equeqidx = nm_txq->pidx; + } ring_nm_txq_db(sc, nm_txq); + } } /* Will get called again. */ From nobody Mon Jul 15 16:22:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN6tY02gsz5RDt5; Mon, 15 Jul 2024 16:22:45 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN6tX6KRfz48jV; Mon, 15 Jul 2024 16:22:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721060564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pqhiN+bjpxuJlhc9YcJ1i6l5UhZ6AHlgTFyODDS2Gqc=; b=XrgP8h3hu9Gw5iI5Uv7bc4VnokjH5FI09YwjmZ93kdl0DBglCBG7ZoQq/WJDAtKQDAcnYb a/YP2DotmZbrhi3rM5NieX4/jhd7xnUFGjh3qUt8GPM6FGGu3vLKapYR0UQsD73iBe25tF Kt2/ZgCiiA+r/SJSvRNbD5TtVBJfyvgb6IMbyS+GAuVtK2I8UF6V9uqS9LHyHRxEg7C7pk 0TWxmSN97x18EmZ8xwX8+s1wJdW49xs3SajbvOsbt0LVQ126VxJB/QInaq1avh6sM1nEWL SjLpIwgUYckws2XYbG73/dFjiqQHu3SPzolBr/watrX4divt05jI+bE+FGC3sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721060564; a=rsa-sha256; cv=none; b=G/O+kyi+T7fiVPJ4iyS5KMevYjkpBosY4GU36hiBOHzPYULSl32xww1mdiDhVvFd81qbGs zEKu52r2nh261/czIk093wuwP+vgu+HWedQ61IMbhSqbAon0WVreW6UNWpsxFlznbsoBRb pf/5QSPyfdTI+3CuRW6vSPUuNHooK4S/XhLPg8kc7AhRDOGS4TjJsQg+ul0Nz/asyZajP8 DeImp3Qa8l5vy+FeEKq/TXwm+6Xl8sn1AXe48rEMW2XT5FSLD3bzxH/xFnlrrEqtrUR4Yw j9i31sygIeZ6c1rs1tIKPtERJeSiPRSo/pkxYTLHvt4GLjrlyyO42lNCGeMnFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721060564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pqhiN+bjpxuJlhc9YcJ1i6l5UhZ6AHlgTFyODDS2Gqc=; b=f94pD1pOcQ+Yu6Da5P4HuhSSDNzsFKC6jyQXrH9ELIPOeVOhQ78az1xIqj2+1IzlKR4Umd 6KbWRbaHkVCtIx7lbrprQ4kUOxo5BBuunI3wf15Pmgg5T3Q7V74PXxMEllLRSFzaFf8j28 WiLKGQLcRv0Zx1ceCabR1k7e3uq47Fgh8zDXQBPt/Qy/iJfOotjtVnfWAnn4UX9dpeAcBt /5KGMq3tt4HjVJQxhFuhEdaxkXknaV+zwVE2WmWnKNRaqXkxxLZGR8/O7e/HKva74b3ZQd gFPOqIuCfNjZ5KBa2db/SYVZje9vJTSj0ohabfefbMw3VWceewq7Mq1WRTNScw== Received: from [IPV6:2601:5c0:4200:b830:d8c4:b767:290b:ce25] (unknown [IPv6:2601:5c0:4200:b830:d8c4:b767:290b:ce25]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WN6tX4WcTz1N41; Mon, 15 Jul 2024 16:22:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> Date: Mon, 15 Jul 2024 12:22:43 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile Content-Language: en-US To: Mateusz Guzik , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/11/24 07:07, Mateusz Guzik wrote: > The branch main has been updated by mjg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=87ee63bac69dc49291f55590b8baa57cad6c7d85 > > commit 87ee63bac69dc49291f55590b8baa57cad6c7d85 > Author: Mateusz Guzik > AuthorDate: 2024-07-11 00:17:27 +0000 > Commit: Mateusz Guzik > CommitDate: 2024-07-11 11:06:52 +0000 > > locks: add a runtime check for missing turnstile > > There are sometimes bugs which result in the unlock fast path failing, > which in turns causes a not-helpful crash report when dereferencing a > NULL turnstile. Help debugging such cases by pointing out what happened > along with some debug. > > Sponsored by: Rubicon Communications, LLC ("Netgate") > --- > sys/kern/kern_mutex.c | 4 +++- > sys/kern/kern_rwlock.c | 16 ++++++++++++---- > 2 files changed, 15 insertions(+), 5 deletions(-) > > diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c > index 90361b23c09a..0fa624cc4bb1 100644 > --- a/sys/kern/kern_mutex.c > +++ b/sys/kern/kern_mutex.c > @@ -1053,7 +1053,9 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v) > turnstile_chain_lock(&m->lock_object); > _mtx_release_lock_quick(m); > ts = turnstile_lookup(&m->lock_object); > - MPASS(ts != NULL); > + if (__predict_false(ts == NULL)) { > + panic("got NULL turnstile on mutex %p v %zx", m, v); > + } Hmm, this is just an expanded KASSERT() but always on rather than conditional on INVARIANTS? Do you have examples of the type of bugs that cause this? (Is it unlocking a freed mutex or the like?) We generally hide all these types of checks under INVARIANTS rather than shipping them in release kernels. -- John Baldwin From nobody Mon Jul 15 17:08:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN7w46k2cz5RJmh for ; Mon, 15 Jul 2024 17:09:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-19.consmr.mail.gq1.yahoo.com (sonic314-19.consmr.mail.gq1.yahoo.com [98.137.69.82]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN7w35YmPz4FYD for ; Mon, 15 Jul 2024 17:09:07 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=CpSAp4Oi; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.82 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721063345; bh=A6uiv5vYyViYbLXCzuUbeVWgMlSSLOBeiH+3EwNPUIw=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=CpSAp4OiFiWuVSBqpKt70rTCwcVQKukL27JTNsI412oFfimZ0lJSRYUz7V4DeJEQSBS7hpLkbrzjGn2682amXQikWIjqvBMp016pshn3DbBMVjCU8bCrbl6sDQH/XiN4ACrSeEwN/+N1sPtgwkVriIeMh4q07x7/uOoazhaphXviXlionTaZpsmrQOvK0T6kzM2Su0U+mikNd6UAwqlBaMkg3pdr8tc2XtVkN1zRanfQ+GG+5xq/TtRHQ3jOBwYIipdmPMfm18aBpjrvRhjon4Erh1O40DXWcjd4/unjPYXVwxGGdhFqDYk/0fAxPpgljvSxrpVitVn6bNqxG6wWwQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721063345; bh=3QumDswhaNHp+SwTlEaPpH+W5nk8k5tc6M+/IkRkLri=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=rQUd2/7zVYncL9Rmp486s0TjMHRBXtOGQ4ZWK1p2Gw3biUDdUWO1viXQAp2Ding+4QICshR5FHAkZYruONlofvB0ELKifEa3OO8lK0G3UqZf8EKj7UPxZ5q6gf4/RSs1/7tiyipkDuJU+tGRtwdwdLZ3+QMCN2PI75T4devvOkqXxXQF6E6PZtwqwSzS3SYBKcPLyR3zUi0o+3ZJ+hhvK4W8TFQLDZQro73gpfwOe0HrkYz/Z0+Y+ZgxndtMmpzGfQO0pciFGbTCir2yTdYVGVPPMYpXkEc5MP0iEqNVb83wwPbxmxWtJIOk1rO01IWv8eTBo55/FxYEs6G21RkV4w== X-YMail-OSG: UwgNjawVM1kjb54tag6_6bDG_MJ.qvumu_c9uctyY2G8877wWvQcSklPvKaW_1n u50ICYi2M0_irV_eKMiS9Ob_0YaueJ.zvgaWJh0it9GNUE36WBloeHnhTj0sHUa60b6g.XBYHntU nYAkdL6azWy6mNjZTTZxJQD5J9wsOGGaYlwb0NMuFDglycMOU.X9bLO7OAbbwPpWDWkkVprHQjSM f9BUcvK66JC7wj2jiJ0IDh2iugA1J1KP4cWFekzfcVEhUTkABB_VIa03sJ4gyNGDQDmfPOzJkTKv ZDFNvlr_KMu5QqzBvUyX.dkXPHfEVVcxZxLUu2l3AkX8X31BYmAqxsPSvux34f39yfIyIXmQs9L. awb9R.uwyww1gCE1Z1x2SRZYk4L9W54EKWMhCOrctyILfn6oT31lP4iGWnTDCBTTH1ECFC_RP9y6 rA0TrTnmzTF18sZFraHWuAF9VxClS.IypyzS.TVyoP7knPj5uvYCIzE_sREpQVTbCVr2bSW7Mnba yLn9RGhspb_JUL1oMm5n3HRGYTnMAuyBrJ88O4rnasF7l0TB_TCXG8WqdU4SHlb1cunjCIni7JGQ lE83jz8ZRrhQdP6jCgi4fMq11b26_UelVVVALcorhqFAwWHTy.EUu9kKofSM_oeQ_ERGF2nDCoVB fD0esBGpxVuva54nMbv.GlwmkwiliEyjENAs1suq6kRVO76aJD4NnWvbI9ZMldu6sWk26.U0_Zyv nR9r2KhLTFeBd5LXkBu1E1ta48SNZkczCu5DzcYHVM4ywEZKNcc8DIJ.YRdPxUQ1hD4XK9SzlriV sfnysrnogEuBio4tqnNdgEDFX7xzIt_fLVMgRAYgfADlFWu2li9gEQcXnh7N4bCwxDm8Mac_uLNG mSPEcdYZ8Bsm_19bhkCrefwEcz6zeSi4QQVWjyStbH_jzk2m9QLkQ2p4RKT2mcduPK3VuTdCrKdA JMe8SNCECHqnGIExc.SdwtKMBgspSBYi40Q4U2y2qd_ddwqUPmjajuKjFw2K8WHfnAcm6.RlEGZF oOsGOo0rA2.lMR2vWd518RWbNOqO_SxYjBbvZOQnQQtkvdqXmRMRUY4jKo6XxZTadmXdGJR7xo7i AhMNWg3K_zKacKSACmG_6W.6tknX5nsS5VyA5yvZdA11PT30rclJkiYU5D0S4yLetZJp_CX94pJA Y5oFIqn.P7rmQ3kj_tWSKVBcPvTcjc4Xo1X_yXRzYNAuLZQnPsxrQX630EBMLQF.QQRkN_KL6qKK Xn_fHQCZSWO4tbr.If_TewXtwSLK.97RTEe4qCHniMXi_taSFlVzFfuUp55zu0VY544ukzyNjgrD 8.vi2Ec3shCjfC_E7m.NsrEp2W6a..MiEp1fOD3fxRw7JWLwNmVIKZNHAjufcaNvcQ6MQe0dF8jv Q45v0lSHuuCkSM0PQajlrqBgSPx8tH.1yu8gt7kJz6mAigmtP6nHCHwSG8GF.bfujwUsxondZOHp 3RBdwxmTMOsUi3oHK0IysgV5Rc.xNPjOwK.XFJ10Trp0AmoMX_YPSclvOrjTl239APNHQe6KuC_2 ke7CgEK6redHAD8CfpTfOrrY8Ap.fFyefFU1_hkZxafHRQYbj_XdGhlV_R_XGTRVQqk5VUcapr8V 9qwYZou0ZK8quCHzLe9YloSyWYPSk8lSBDOJZNbf_MAJ1WkQrIjdoIqlC.zfOULUiCM7gfmiujz2 cjRr_x7zW2s238MGEc4b16BDQOtbXvQpzvf6oXbFoDI1VlWoOQkIjqqEWe510EorjFRxJhbq0Bx9 KyUdLRAYOHWPW6qqRakxswk61mc48FIwFQV.P23y6boa6RHgdJwOEYCM5s59IjMeTFJJr7WHj4mN D_iNLYBjNPdAV6qqMTKSGblFr3BMCyuX8MyeFJshXHGkScN97kRN2J3Sy7hgkBhaf86hqdhdm5YJ rmu9enAoDtJm2Glesc3dtR1ZNcuQTxpm_Bop4RkoA9iF037nnnmEYK5NZP.eBNlvajWV4FiNz1hY WsAemjk.AjfMFBV0_BJgBdoCF0EQfUaoyrqTJZjt7y9.KvSj951HchBxVkLFXnC2IB9g9wr4q158 bYjrv53v5I0GjONOFtrI3DsFfcHECQ8_dk2fRjm4yz_hNxMQaQjDfceQOCidyHvTCorNKt5Wczks c_oQKwBXph2UJkpJuGhrwFNgXs817ild_s0KFY7nnabEanr.ITG9RgQNFDq1HpiAy.wl0rxOSTVv SfBB.R9jnfL8tAZVZbpSoxyerm.KJaAzQVmiRhz.GwUZObENVJWaqN3CfCbNH62Rv4_udt_BXTw- - X-Sonic-MF: X-Sonic-ID: 1bef8812-89a5-4216-8620-0670121e2726 Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Mon, 15 Jul 2024 17:09:05 +0000 Received: by hermes--production-gq1-799bb7c8cf-hxpdl (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8a2b9b6abbb156645e37eab44f5dfe09; Mon, 15 Jul 2024 17:09:04 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: git: 60f098f84119 - main - arch: Update to remove armv6 Message-Id: Date: Mon, 15 Jul 2024 10:08:53 -0700 To: Ed Maste , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3774.600.62) References: X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.82:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.82:from] X-Rspamd-Queue-Id: 4WN7w35YmPz4FYD Ed Maste wrote on Date: Mon, 15 Jul 2024 13:03:16 UTC : > On Sun, 14 Jul 2024 at 02:00, Warner Losh wrote: > > > > .Dv aarch64 > > will support execution of > > -.Dv armv6 > > -or > > .Dv armv7 > > binaries if the CPU implements > > .Dv AArch32 > > -execution state, however older arm binaries aren't supported. > > +execution state, however older arm binaries are not supported by > > +.Fx . >=20 > Do older 32-bit Arm userland binaries actually not work? Would > "support execution of 32-bit Arm binaries if the CPU implements the > AArch32 execution state" be accurate? # uname -apKU FreeBSD aarch64-main-pbase 15.0-CURRENT FreeBSD 15.0-CURRENT #6 = main-n271165-cb18ba9df52d-dirty: Fri Jul 12 11:09:16 PDT 2024 = root@aarch64-main-pbase:/usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src= /arm64.aarch64/sys/GENERIC-NODBG-CA76 arm64 aarch64 1500020 1500020 # sysctl kern.supported_archs kern.supported_archs: aarch64 armv7 As I understand that "armv7" is historically tied to the likes of (shown via readelf): Notes at offset 0x000001ac with length 0x00000064: Owner Data size Description FreeBSD 0x00000006 NT_FREEBSD_ARCH_TAG Arch tag: armv7 and, for example, attempting to use a file with an armv6 tag would be rejected as not supported historically. Similarly for armv5 and armv4 and the like. One had to modify source code to have kern.supported_archs list, say, armv6 instead of armv7. I helped someone do that once so that they could poudriere bulk to build armv6 on aarch64 by picking which kernel to boot (normal vs. one with armv6 instead). FreeBSD does not have support for having a longer list of alternatives, say: aarch64 armv7 armv6 Such would be a bigger source code change. I think such is part of what Warner is referring to, even if the other aspects of any of armv6/armv5/armv4/... kernel support were left in place. (No claim such has or will be left in place.) =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Mon Jul 15 17:43:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN8h02x87z5RMrZ; Mon, 15 Jul 2024 17:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN8h016vJz4J5l; Mon, 15 Jul 2024 17:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721065424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xaQhgrzg/ocb5pXKRVxhzYQc665x/8dGTPJc8Ser2YY=; b=P3MJwMbnL8oGU/NjdnHzwNiUejdWtVdZpb8NsvujkHscLA2SBarGoz5AojiFzFa77KbaAl /RScpqJrpzyOinv9KFoo5YhiOi+A8lKmbehJZU9MYpbt2XGWEIVQxIjnRaKqo1/ZxSEKOj 9y+2N5lZdDK53Lvn044kcgLat2//tluaB4MlhNosbTOv4jqNtAXQ1UJ8/mtNl71vJZH8IB O0NUAwuiT9g1cTVN7byJn28Q4SGKkZ4uZmNIQg4p3Iv6SMWZANiP7x6hJ8TcsUBGE9s6OQ 7tn/sMHt1lWlKCgSunnnELG9US4H4VqUPWMKFyfA+uAkTnVlbNPCbEnJ4XGNng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721065424; a=rsa-sha256; cv=none; b=bQUEF9HEIGQUqubHULRvYV+3SHIu1KhnhoubgCMw19O/pPaJOonWCnimW2HPYtHcjWcGrQ HHuNasQXChDz+7lgL8rOhTYbH/AisB3H1P6WcMQD8EFttNcuIVrKmDZ/H/G2q0VE36Gj0L /jVydpZLEPAyklv3WIQ1lOfqMv+PT5bmsWlpWkbfEjgx5FwrQ6i8lTzcEPFWlwNPHHXr4w EHhHJzijHKaVwITnCWvomSWXwXAGog8JAo9oKnTlU8QJQwwJsRgES+aKeQJu5H9pluWwhe zYsvIRVviY3ypcfApTny2Jk8ZMyHI5dMExLw3mxg80uk2MJsvyEkCksainMeTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721065424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xaQhgrzg/ocb5pXKRVxhzYQc665x/8dGTPJc8Ser2YY=; b=sL5q2C4KB20vNbDpP/4qotAMObMVno+stL1c3Iy4A7WGngsJY+5joDS/jM1UNPnDVZSuHy A+2f6W67/SdX7Yda0rCSzfPZtW5JmlDcjX0GsTlPqVZmQsAeaqLTvlIVvXrq3G6zZCQlvu InaSgniL1AATFUYCbIvLgVLAndZ9tGdd4Y8kUqtBunp3SH7qAOk4LMfC2vyG0BclL6NCnP CwXdpohJOMPCc9QQXx+haKEDbP45bI4FWStoXac/Rej52eg4ZpydCEAwaBb1WS4OU+LWaX BUegGRQBbC/LqzkPidZT+oyiyoltD0KZ3gIfj0XQzG8/xd2c3rLc1nbGgkphKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WN8h00kJJz12js; Mon, 15 Jul 2024 17:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FHhin5086135; Mon, 15 Jul 2024 17:43:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FHhhaS086132; Mon, 15 Jul 2024 17:43:43 GMT (envelope-from git) Date: Mon, 15 Jul 2024 17:43:43 GMT Message-Id: <202407151743.46FHhhaS086132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: ac6dc5cde729 - main - dhclient: Ignore SIP servers DHCP option defined in RFC 3361 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac6dc5cde729a602252a0b80f82424861d2eb7b5 Auto-Submitted: auto-generated The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=ac6dc5cde729a602252a0b80f82424861d2eb7b5 commit ac6dc5cde729a602252a0b80f82424861d2eb7b5 Author: Yuichiro NAITO AuthorDate: 2024-07-04 07:57:02 +0000 Commit: Michael Osipov CommitDate: 2024-07-15 17:42:17 +0000 dhclient: Ignore SIP servers DHCP option defined in RFC 3361 Ignore SIP servers dhcp option to shut up the warning message. This option is defined in the RFC 3361 and sent from NSD-G1000T router. PR: 280119 Reviewed by: jrm (mentor), brooks MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45873 --- sbin/dhclient/dhclient.c | 1 + sbin/dhclient/dhcp.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 8179a5c34209..62e55eb4d01f 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2618,6 +2618,7 @@ check_option(struct client_lease *l, int option) case DHO_BOOTFILE_NAME: case DHO_DHCP_USER_CLASS_ID: case DHO_URL: + case DHO_SIP_SERVERS: case DHO_END: return (1); case DHO_CLASSLESS_ROUTES: diff --git a/sbin/dhclient/dhcp.h b/sbin/dhclient/dhcp.h index 300deb464238..99b69613934f 100644 --- a/sbin/dhclient/dhcp.h +++ b/sbin/dhclient/dhcp.h @@ -172,6 +172,7 @@ struct dhcp_packet { #define DHO_DHCP_USER_CLASS_ID 77 #define DHO_URL 114 #define DHO_DOMAIN_SEARCH 119 +#define DHO_SIP_SERVERS 120 #define DHO_CLASSLESS_ROUTES 121 #define DHO_END 255 From nobody Mon Jul 15 17:59:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN92j4gTCz5RNWv; Mon, 15 Jul 2024 17:59:57 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN92j2rMLz4KYq; Mon, 15 Jul 2024 17:59:57 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a77ec5d3b0dso581569666b.0; Mon, 15 Jul 2024 10:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721066396; x=1721671196; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2GRnwiHQMUEEXdUbRZ6GSckdat1ZukdaXXDsjKRGehY=; b=CM0NkkQEA01Jko9PHZn8cfu2LTpDRMcGy3zicXjukVFNq/nOXUNjLI8Xwk97MVrhSl yO+RaHex6/rBZxuJhofBmzdKdk7eNnigJDoTrOW2qIqtxGJQ3Ui0A5nk3T8ltY503Zhk 2rfcHS78r6w+ZC+JJfJRLI5OOh5/ZW8/+RjXQHTghoLy2KRVtltvR0WBlpi9HUHJFu7g fqYZAl2aIiQMHWqxC242+FkwxNLES2i8ep/CRAzFQCvQpj0mDAzgJEn8hPee1dS3zPuO Pbs2vO7pq2xF8PbBseMFybL6bTHquUtkmZbFDsDzOo0t5HpT7oSphQHD6bmXF1iCW2aI bJDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721066396; x=1721671196; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2GRnwiHQMUEEXdUbRZ6GSckdat1ZukdaXXDsjKRGehY=; b=DXBHa7G8i9XEoosep2afNU3oIWpNVwJ9I/KO+q215JmaHDdZwVfLh+1i7K/LrSLl/p Fzaf4GnkmuGcTj3a0vHTM1oXTj+r2B2ZFbTTX+wyntUDVIJ9A5mwCQn+qtKnVHbOaxaZ VSznogkVOIs07BE4wisWRumKWsrhaReW1s4ho7L1c5HM8mfhSyuP3gnVir18/TAisdjW dbdmaUoO2dSETdS81Ei3ccgZu91/HuYjtlU3Pa7bCwlhEnUc1eltz5LZURnSDTeZuuCE Nhqq2tXa1VptS80XUAIWnDXQjhHc26P01Nz8ummg74dcIqjNyVGffONJeUh5/VrnNYip 4Ejg== X-Forwarded-Encrypted: i=1; AJvYcCUCaoLnngoRNey19kkFGCX0AzgRB4o0t9AL1AFJWcjHCFvJWNDFKBoNq7Elnb1bGRhdStMbEJhnl8DZ+ZLvi0S58kL+LaZU+cXBIjPR3hKEjrhZh5A3iB9YVUpX8P7Ktnx5EsrHXzJhua2ZAHuQFKz9NNne5E0uXGViWJyI56EEYaDwrABq1KNr5Fu3jGY= X-Gm-Message-State: AOJu0YwZTUK5FdMvonNYJpyNml9bFzyskqySLEhRWpEPzIBxyxULCR19 d2aedS0pyOldrfIVvi9H1ofROWN8rMEXShFc34FX7yZNBjXwfvhhlYf5Jw3jEIBzUkNSIdRlTQo oqahdQunSiKcV/GQLmvXoD1BIDMvoHzfLSpM= X-Google-Smtp-Source: AGHT+IEtn0Eq+xGfJrUcd5FYZbJ7sEI8HGUUtkw0CCzYkxWyRnhOY72GznVYRhDu0tpU37RyMMKvQWaRgGoGMnWSOHI= X-Received: by 2002:a17:906:d69:b0:a75:3c2d:cd90 with SMTP id a640c23a62f3a-a79e6afae3dmr34639766b.65.1721066395563; Mon, 15 Jul 2024 10:59:55 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> In-Reply-To: <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> From: Mateusz Guzik Date: Mon, 15 Jul 2024 19:59:42 +0200 Message-ID: Subject: Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile To: John Baldwin Cc: Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4WN92j2rMLz4KYq On Mon, Jul 15, 2024 at 6:22=E2=80=AFPM John Baldwin wrot= e: > > On 7/11/24 07:07, Mateusz Guzik wrote: > > The branch main has been updated by mjg: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D87ee63bac69dc49291f55590= b8baa57cad6c7d85 > > > > commit 87ee63bac69dc49291f55590b8baa57cad6c7d85 > > Author: Mateusz Guzik > > AuthorDate: 2024-07-11 00:17:27 +0000 > > Commit: Mateusz Guzik > > CommitDate: 2024-07-11 11:06:52 +0000 > > > > locks: add a runtime check for missing turnstile > > > > There are sometimes bugs which result in the unlock fast path fail= ing, > > which in turns causes a not-helpful crash report when dereferencin= g a > > NULL turnstile. Help debugging such cases by pointing out what hap= pened > > along with some debug. > > > > Sponsored by: Rubicon Communications, LLC ("Netgate") > > --- > > sys/kern/kern_mutex.c | 4 +++- > > sys/kern/kern_rwlock.c | 16 ++++++++++++---- > > 2 files changed, 15 insertions(+), 5 deletions(-) > > > > diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c > > index 90361b23c09a..0fa624cc4bb1 100644 > > --- a/sys/kern/kern_mutex.c > > +++ b/sys/kern/kern_mutex.c > > @@ -1053,7 +1053,9 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr= _t v) > > turnstile_chain_lock(&m->lock_object); > > _mtx_release_lock_quick(m); > > ts =3D turnstile_lookup(&m->lock_object); > > - MPASS(ts !=3D NULL); > > + if (__predict_false(ts =3D=3D NULL)) { > > + panic("got NULL turnstile on mutex %p v %zx", m, v); > > + } > > Hmm, this is just an expanded KASSERT() but always on rather than conditi= onal on INVARIANTS? > > Do you have examples of the type of bugs that cause this? (Is it unlocki= ng a freed mutex > or the like?) We generally hide all these types of checks under INVARIAN= TS rather than > shipping them in release kernels. > Use-after-free, overflow, underflow, bitflip or what have you all can fail the fast path. Once that happens and the kernel crashes with a null pointer deref, here is a crash at netgate which prodded this: calltrap() at calltrap+0x8/frame 0xfffffe0106720920 --- trap 0xc, rip =3D 0xffffffff80d5ab70, rsp =3D 0xfffffe01067209f0, rbp =3D 0xfffffe0106720a00 --- turnstile_broadcast() at turnstile_broadcast+0x40/frame 0xfffffe0106720a00 __rw_wunlock_hard() at __rw_wunlock_hard+0x9e/frame 0xfffffe0106720a30 nd6_resolve_slow() at nd6_resolve_slow+0x2d7/frame 0xfffffe0106720aa0 nd6_resolve() at nd6_resolve+0x125/frame 0xfffffe0106720b10 ether_output() at ether_output+0x4e7/frame 0xfffffe0106720ba0 ip_output_send() at ip_output_send+0xdc/frame 0xfffffe0106720be0 ip_output() at ip_output+0x1295/frame 0xfffffe0106720ce0 ip_forward() at ip_forward+0x3c2/frame 0xfffffe0106720d90 ip_input() at ip_input+0x705/frame 0xfffffe0106720df0 swi_net() at swi_net+0x138/frame 0xfffffe0106720e60 ithread_loop() at ithread_loop+0x257/frame 0xfffffe0106720ef0 fork_exit() at fork_exit+0x7f/frame 0xfffffe0106720f30 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0106720f30 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- Neither the register dump nor anything in the backtrace indicate what happe= ned. Since the kernel is going down anyway, one may as well get some debug from = it. --=20 Mateusz Guzik From nobody Mon Jul 15 18:21:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN9X334rsz5RQJy; Mon, 15 Jul 2024 18:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN9X32dS1z4MPH; Mon, 15 Jul 2024 18:21:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721067715; 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=jzuUbGVycZXQs86mrYXN32yYlJIWAprhEjXNy8UvMmc=; b=sUC/DiL1Kk46R4wN35AZPnBg7/ZPtjiCc72kSR7pZLcHbySLGe2O+MA6mWawV62JcVB07P pYAXst9cAxKt8ILiaJCZhE//zt3KI30LggCo/W5QDZyLg75XqatCW6cINktWT8+q6Lmtk9 9/aLzW8F0Kp7rt4DYF10NJgn099rJBzWQjczAoc4QU0AH4DmTLCJzrLjjjNwXfIvdgdJ5j wvo9YxgdPRtYczu2Cq87fhIeIPtjccIGKrQuAKy+tQy3O5PpaWqld4yciO+aFr2mc2PN2U AP/o7gpzOrCJp8n3l78s24cK0iWhfabhCEWGgfvty7rTptmZ8cUs76SDxN3Wfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721067715; a=rsa-sha256; cv=none; b=xT+ll4n4I+JE7l1pIioSsk8tIEw5Y6pGpcvsF3DUgvpvBtgafPyJeIGX2p/xB5Ea+W4OJL QfBNVwQjR/4PNumQSFH2OnDRVzof5Lt4teo4fDZ7aQoErEXEU+WbEb8sRMASM5iH86CpmK lVS0Vayxoavlj+Vs1lxQHIroX1bE3Az9FQYAYcu04zCZLlIliaqewei7a0hZzyrQrnaLSq Pzf3FHviPZ8izNXRWdqfkcwD1FMCG76P5lgszzoy5nyzqb4VZv9sJLpYeB2JTgQL/8PBpu 8WUd6brlRL1h9ZeUeoeZzjPPI0puhdV7KjBpS9hux+dtFdUweSuxbPkIyJPF3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721067715; 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=jzuUbGVycZXQs86mrYXN32yYlJIWAprhEjXNy8UvMmc=; b=kKnYGli4ACaB2fMJ3t+PhMGFx+U98xwjtP+k0drbbZ7vg+hodf/HYiDnChQXMi70q8N1+R al9etB29EEsp3bcdCQlypuAcSsTQvI2mjmDuqGH/G+yp749pmW7MbUo3xneKh+JRjFIzw1 d3eCC6CIEpInRXeswtOoCmeow8u4P/u9QsnMrNGLMz+mPuem1ZMTm1o3Z3wT4SLTW2RYqN Xwc9yxQ6O/mlEDvFIgyFPotpZgSRL5bmCTzyErns31YjIh1eiukmk9p/RMdQgXWhG3zdhn LIz0yfQsCKhZiae6dV3+GBfupSKBwk4jsFmL0P6M3O/nLZsgqpzoHTgspJ3qLA== Received: from [IPV6:2601:5c0:4200:b830:d8c4:b767:290b:ce25] (unknown [IPv6:2601:5c0:4200:b830:d8c4:b767:290b:ce25]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WN9X30cC5z1Q9m; Mon, 15 Jul 2024 18:21:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 15 Jul 2024 14:21:54 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile Content-Language: en-US To: Mateusz Guzik Cc: Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/15/24 13:59, Mateusz Guzik wrote: > On Mon, Jul 15, 2024 at 6:22 PM John Baldwin wrote: >> >> On 7/11/24 07:07, Mateusz Guzik wrote: >>> The branch main has been updated by mjg: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=87ee63bac69dc49291f55590b8baa57cad6c7d85 >>> >>> commit 87ee63bac69dc49291f55590b8baa57cad6c7d85 >>> Author: Mateusz Guzik >>> AuthorDate: 2024-07-11 00:17:27 +0000 >>> Commit: Mateusz Guzik >>> CommitDate: 2024-07-11 11:06:52 +0000 >>> >>> locks: add a runtime check for missing turnstile >>> >>> There are sometimes bugs which result in the unlock fast path failing, >>> which in turns causes a not-helpful crash report when dereferencing a >>> NULL turnstile. Help debugging such cases by pointing out what happened >>> along with some debug. >>> >>> Sponsored by: Rubicon Communications, LLC ("Netgate") >>> --- >>> sys/kern/kern_mutex.c | 4 +++- >>> sys/kern/kern_rwlock.c | 16 ++++++++++++---- >>> 2 files changed, 15 insertions(+), 5 deletions(-) >>> >>> diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c >>> index 90361b23c09a..0fa624cc4bb1 100644 >>> --- a/sys/kern/kern_mutex.c >>> +++ b/sys/kern/kern_mutex.c >>> @@ -1053,7 +1053,9 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v) >>> turnstile_chain_lock(&m->lock_object); >>> _mtx_release_lock_quick(m); >>> ts = turnstile_lookup(&m->lock_object); >>> - MPASS(ts != NULL); >>> + if (__predict_false(ts == NULL)) { >>> + panic("got NULL turnstile on mutex %p v %zx", m, v); >>> + } >> >> Hmm, this is just an expanded KASSERT() but always on rather than conditional on INVARIANTS? >> >> Do you have examples of the type of bugs that cause this? (Is it unlocking a freed mutex >> or the like?) We generally hide all these types of checks under INVARIANTS rather than >> shipping them in release kernels. >> > > Use-after-free, overflow, underflow, bitflip or what have you all can > fail the fast path. > > Once that happens and the kernel crashes with a null pointer deref, > here is a crash at netgate which prodded this: > calltrap() at calltrap+0x8/frame 0xfffffe0106720920 > --- trap 0xc, rip = 0xffffffff80d5ab70, rsp = 0xfffffe01067209f0, rbp > = 0xfffffe0106720a00 --- > turnstile_broadcast() at turnstile_broadcast+0x40/frame 0xfffffe0106720a00 > __rw_wunlock_hard() at __rw_wunlock_hard+0x9e/frame 0xfffffe0106720a30 > nd6_resolve_slow() at nd6_resolve_slow+0x2d7/frame 0xfffffe0106720aa0 > nd6_resolve() at nd6_resolve+0x125/frame 0xfffffe0106720b10 > ether_output() at ether_output+0x4e7/frame 0xfffffe0106720ba0 > ip_output_send() at ip_output_send+0xdc/frame 0xfffffe0106720be0 > ip_output() at ip_output+0x1295/frame 0xfffffe0106720ce0 > ip_forward() at ip_forward+0x3c2/frame 0xfffffe0106720d90 > ip_input() at ip_input+0x705/frame 0xfffffe0106720df0 > swi_net() at swi_net+0x138/frame 0xfffffe0106720e60 > ithread_loop() at ithread_loop+0x257/frame 0xfffffe0106720ef0 > fork_exit() at fork_exit+0x7f/frame 0xfffffe0106720f30 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0106720f30 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > > Neither the register dump nor anything in the backtrace indicate what happened. > > Since the kernel is going down anyway, one may as well get some debug from it. If you don't mind the extra branches for sanity checks, why not just run with INVARIANTS? That is, what makes these particular assertions different from other assertions such that they should be on unconditionally? The last line below applies to pretty much every other assertion in the tree. -- John Baldwin From nobody Mon Jul 15 18:23:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN9ZT4d4Jz5RQSG for ; Mon, 15 Jul 2024 18:24:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN9ZT1YP7z4Mt2 for ; Mon, 15 Jul 2024 18:24:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc2a.google.com with SMTP id 006d021491bc7-5ce88a4531fso1194413eaf.0 for ; Mon, 15 Jul 2024 11:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1721067840; x=1721672640; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+FeK4rsYc3PvyuiwoL3i9ECQcZPHLPXmxK+rGOvob1c=; b=DEknPNOToIGYbcLi/Uo0+PxW5pDlrQZQrdvxQ8RhvsyLhm4fDM6zzXFFPHiE4bjGxV ISuekCf1AAAxoQ23W8jIRTQeEoCD3Xj05qdLs3dNusKcNHs8nEM2GCTuTUyn6zwa2kA6 ScAmdtE4HR30c+2S1VaGYYdVxSJghS3qC99xiouyA/ju9RGfHOS703aJfs6xsJJLD0Dk 0srJ7I5KcE8bumEZHQ0Dx9uHP8M3gDZmtYpTBkx2IvTI42z8+ZTebBDgJiNeLu9rZxs1 WrYgCqFlTQMC5aE3VFcpP2ZaYHNLeHaDFdm1dYgnD4FOc2XrgGP9+Oka7RgoU0Wy/3zf MVMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721067840; x=1721672640; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+FeK4rsYc3PvyuiwoL3i9ECQcZPHLPXmxK+rGOvob1c=; b=YpQTv3UvsdirUystv9t/Q9YN1FTl26S03gKCV0dkSH2qQNiXzc+sZba2BI28qCdU6a lg4IwXkanliHQ7bwewWPhZ2yMD8QbZqYCZFSgN/E5uGCy9zXhhtCeeVu1QuDFibi0kQN IIePJCZkNkXvvtbMLbOzl03I9Twc9O6utlchBOmt5nQ6bTHf/xCX0ksoBIpBeMFqUGzV CAqBzySV10ns01pTmbmwk+fOWWtaFd76MgxO7Kkalm0CoFeLdX/pQzi7BcyXuThSzH4P sv1Fp5vitvUpJ5PJTX7C7oheCd0kE1WS5sIr0z+GLe6okGSIroF9oLWY2YfnuoiWwLnF UduA== X-Forwarded-Encrypted: i=1; AJvYcCUzjnm6iaD+7FrQ4pSCOGtKEYTgpiZmZzkX3d2yO6sWDFokbN77kRgjxFWO62GhUOPXMZAbBK6Ml3BeN8xI3ZTyXPNa9xpuXy4uDHzDuKPLMQ== X-Gm-Message-State: AOJu0YzNR9gFsbCfH4RcoJ5gSSxrqw3TNlpNLICek1NXw7h1LuayCI9W CqqnO6kE35dKdfLv3fBMMWK73IN5RwB0mpdnRp7lCDcTv0UknKptaZKeNFKy+vN2GWMWnX9e/T7 l0mDwEvX+3OVYon/8vcrkit+KrDK4o9yhUGsSy6J2F8oP6ppf2f4= X-Google-Smtp-Source: AGHT+IEjqP8FeQ4Qxmnj7S3na/9H22DqmiiKj7zi2t9NBco/eQaqEkBI35wQ0T24tY8uziwi0l8NQb/OteauYVGL08U= X-Received: by 2002:a05:6871:b20:b0:250:70bb:1a97 with SMTP id 586e51a60fabf-260ba5785d7mr27692fac.24.1721067839928; Mon, 15 Jul 2024 11:23:59 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407140600.46E60JKl047510@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 15 Jul 2024 12:23:48 -0600 Message-ID: Subject: Re: git: 60f098f84119 - main - arch: Update to remove armv6 To: Ed Maste Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000003bde24061d4d550a" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WN9ZT1YP7z4Mt2 --0000000000003bde24061d4d550a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 15, 2024 at 7:03=E2=80=AFAM Ed Maste wrote= : > On Sun, 14 Jul 2024 at 02:00, Warner Losh wrote: > > > > .Dv aarch64 > > will support execution of > > -.Dv armv6 > > -or > > .Dv armv7 > > binaries if the CPU implements > > .Dv AArch32 > > -execution state, however older arm binaries aren't supported. > > +execution state, however older arm binaries are not supported by > > +.Fx . > > Do older 32-bit Arm userland binaries actually not work? Would > "support execution of 32-bit Arm binaries if the CPU implements the > AArch32 execution state" be accurate? > armv7 works. armv6 likely works since they are quite similar to armv7. The only difference is in userland APIs. armv4 and v5 do not work if they used RAS (atomics). We don't implement the kernel part of RAS anymore, so those cannot work today. So nothing threaded will work. Some non-threaded things might work, but I don't think anybody has tested it, or seen if there's other, currently unknown, issues. So if you want to run an armv7 binary AND the CPU implements aarch32 execution states, then you will succeed. if armv6 and aarch64 it may work, but isn't supported. Otherwise, it won't work (though some trivial examples of armv4/armv5 might work). So I omitted the edge case details: armv6 likely will work, but is unsupported. armv4 and armv5 binaries generally won't work, though some restricted cases might work. In both of these cases, if they don't work or break in the future, we don't care (as a project). Clear as mud, eh? Warner --0000000000003bde24061d4d550a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jul 15, 2024 at 7:03=E2=80=AF= AM Ed Maste <emaste@freebsd.org> wrote:
On = Sun, 14 Jul 2024 at 02:00, Warner Losh <imp@freebsd.org> wrote:
>
>=C2=A0 .Dv aarch64
>=C2=A0 will support execution of
> -.Dv armv6
> -or
>=C2=A0 .Dv armv7
>=C2=A0 binaries if the CPU implements
>=C2=A0 .Dv AArch32
> -execution state, however older arm binaries aren't supported.
> +execution state, however older arm binaries are not supported by
> +.Fx .

Do older 32-bit Arm userland binaries actually not work? Would
"support execution of 32-bit Arm binaries if the CPU implements the AArch32 execution state" be accurate?

<= div>armv7 works.

armv6 likely works since they are= quite similar to armv7. The only difference is in userland APIs.

armv4 and v5 do not work if they used RAS (atomics). We don= 't implement the kernel part of RAS anymore, so those cannot work today= . So nothing threaded will work. Some non-threaded things might work, but I= don't think anybody has tested it, or seen if there's other, curre= ntly unknown, issues.

So if you want to run an arm= v7 binary AND the CPU implements aarch32 execution states, then you will su= cceed. if armv6 and aarch64 it may work, but isn't supported. Otherwise= , it won't work (though some trivial examples of armv4/armv5 might work= ).

So I omitted the edge case details: armv6 likel= y will work, but is unsupported. armv4 and armv5 binaries generally won'= ;t work, though some restricted cases might work. In both of these cases, i= f they don't work or break in the future, we don't care (as a proje= ct).

Clear as mud, eh?

Wa= rner
--0000000000003bde24061d4d550a-- From nobody Mon Jul 15 18:33:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN9nZ653qz5RRJV; Mon, 15 Jul 2024 18:33:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN9nZ5LpSz4NWY; Mon, 15 Jul 2024 18:33:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-58be2b8b6b2so5872401a12.3; Mon, 15 Jul 2024 11:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721068417; x=1721673217; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xF1hyUVdsj3LgPWBbm/9cuYRl0QMg1woOnLVTjx/o84=; b=lsRYuYU8c3BJPn2aXq2Yyv7ipRuUaUcwa4+u7mcmsg6Xm5rAQbTdqzLxjypOIq8UDs 4Di3QMwkBYkGIkURsIx4ZwsLbicT4URBoTtbiCfHsXD/2uCCHzbghZppOUizvH50irHd 4ng5rA3BgkHLDacjqublHaPje2XELpa7F/kS9W/LeI/m7URfqU4yMcDSKEbX5SJMwt9X sIcjECelO5lmG6mX05mOu0b9kM+8kw8bNB3xGI7m56RyNx2nBGLuUo2XwwFYBZ6excD/ 1MMD5PbxK1luxotYsVv1l+xWxayqepQjJgZwWCuZPya1g3pUAMSEZOHAp43NpII02i9e ZfFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721068417; x=1721673217; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xF1hyUVdsj3LgPWBbm/9cuYRl0QMg1woOnLVTjx/o84=; b=QxqrJIM5IF8Pf5i3bnX+v98fKQSwEH3GVNhikPrIUl1gQLdWOOu68IYq2b6GfNlz76 me/uw6IgNxRU4KvEruxwMhMcW0ptSrE/lGi9AYXSyBrJjRlmYqTcRLFwtmSuBJCe0cen SA8NEnu6XjvRdJrAPqWwd+0xgix3+KlwsTk2eCmawhHLPqyFpMK791rN2ILx3AlZ19s3 cD+nCNFQJOlLcZroT+ZYCKbJOpe1Cyka6Qc7Ohjt6r/YTXFDLeELflvT1wAvjgzuI+lE NEUK8OQ1wORK8Yjm7kXan+sakO0Kpy4pXZchP3goHgbEWqQNuwN6Dgcm/xvO5g+whSbY jAig== X-Forwarded-Encrypted: i=1; AJvYcCUmryvIzhqg6Jstn9p6UBHCmSxlevv5BVyzEscWQjibE9XUi5VFtuYkh6WiMxWTcOHl38M8EtWAW0VDKIZS97g+P0E/5nmlnyrmnEEI7EiWBlsKcHYWKNc6Wz4JTy3OdK7rptLaN4R4I5BLfDwRR96sgO2hMlgHpbBUNAk3s+A1MbQxcND7cmlMVePaZGU= X-Gm-Message-State: AOJu0Yxz7QWyXg3B+ZZJkty3eouzOd4nmqpXXCJ4KObx24Z5ffm0JJHg E9vB/doP4BSuxQdLjl0Sqn3JneQcjKKMIWxTBRNwaiqaoALLTjamenmtMNIH2nOI2jwZmxSplsg rBAnSeJN/cZ75KURRU+c8oRTt+FtnnvuF X-Google-Smtp-Source: AGHT+IFKGsKaBB/nLKGr+DS41fZ9h1zdnSGvo/+C+yC5j84C3Uuhe4F5uyAnXpMxljcVMY8aUdLeS+IQAYigzpsQU0s= X-Received: by 2002:a17:906:7311:b0:a72:81f5:85b6 with SMTP id a640c23a62f3a-a79e6a48054mr48428466b.18.1721068416843; Mon, 15 Jul 2024 11:33:36 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> In-Reply-To: From: Mateusz Guzik Date: Mon, 15 Jul 2024 20:33:23 +0200 Message-ID: Subject: Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile To: John Baldwin Cc: Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4WN9nZ5LpSz4NWY On Mon, Jul 15, 2024 at 8:21=E2=80=AFPM John Baldwin wrot= e: > > On 7/15/24 13:59, Mateusz Guzik wrote: > > On Mon, Jul 15, 2024 at 6:22=E2=80=AFPM John Baldwin = wrote: > >> > >> On 7/11/24 07:07, Mateusz Guzik wrote: > >>> The branch main has been updated by mjg: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D87ee63bac69dc49291f555= 90b8baa57cad6c7d85 > >>> > >>> commit 87ee63bac69dc49291f55590b8baa57cad6c7d85 > >>> Author: Mateusz Guzik > >>> AuthorDate: 2024-07-11 00:17:27 +0000 > >>> Commit: Mateusz Guzik > >>> CommitDate: 2024-07-11 11:06:52 +0000 > >>> > >>> locks: add a runtime check for missing turnstile > >>> > >>> There are sometimes bugs which result in the unlock fast path f= ailing, > >>> which in turns causes a not-helpful crash report when dereferen= cing a > >>> NULL turnstile. Help debugging such cases by pointing out what = happened > >>> along with some debug. > >>> > >>> Sponsored by: Rubicon Communications, LLC ("Netgate") > >>> --- > >>> sys/kern/kern_mutex.c | 4 +++- > >>> sys/kern/kern_rwlock.c | 16 ++++++++++++---- > >>> 2 files changed, 15 insertions(+), 5 deletions(-) > >>> > >>> diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c > >>> index 90361b23c09a..0fa624cc4bb1 100644 > >>> --- a/sys/kern/kern_mutex.c > >>> +++ b/sys/kern/kern_mutex.c > >>> @@ -1053,7 +1053,9 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintp= tr_t v) > >>> turnstile_chain_lock(&m->lock_object); > >>> _mtx_release_lock_quick(m); > >>> ts =3D turnstile_lookup(&m->lock_object); > >>> - MPASS(ts !=3D NULL); > >>> + if (__predict_false(ts =3D=3D NULL)) { > >>> + panic("got NULL turnstile on mutex %p v %zx", m, v); > >>> + } > >> > >> Hmm, this is just an expanded KASSERT() but always on rather than cond= itional on INVARIANTS? > >> > >> Do you have examples of the type of bugs that cause this? (Is it unlo= cking a freed mutex > >> or the like?) We generally hide all these types of checks under INVAR= IANTS rather than > >> shipping them in release kernels. > >> > > > > Use-after-free, overflow, underflow, bitflip or what have you all can > > fail the fast path. > > > > Once that happens and the kernel crashes with a null pointer deref, > > here is a crash at netgate which prodded this: > > calltrap() at calltrap+0x8/frame 0xfffffe0106720920 > > --- trap 0xc, rip =3D 0xffffffff80d5ab70, rsp =3D 0xfffffe01067209f0, r= bp > > =3D 0xfffffe0106720a00 --- > > turnstile_broadcast() at turnstile_broadcast+0x40/frame 0xfffffe0106720= a00 > > __rw_wunlock_hard() at __rw_wunlock_hard+0x9e/frame 0xfffffe0106720a30 > > nd6_resolve_slow() at nd6_resolve_slow+0x2d7/frame 0xfffffe0106720aa0 > > nd6_resolve() at nd6_resolve+0x125/frame 0xfffffe0106720b10 > > ether_output() at ether_output+0x4e7/frame 0xfffffe0106720ba0 > > ip_output_send() at ip_output_send+0xdc/frame 0xfffffe0106720be0 > > ip_output() at ip_output+0x1295/frame 0xfffffe0106720ce0 > > ip_forward() at ip_forward+0x3c2/frame 0xfffffe0106720d90 > > ip_input() at ip_input+0x705/frame 0xfffffe0106720df0 > > swi_net() at swi_net+0x138/frame 0xfffffe0106720e60 > > ithread_loop() at ithread_loop+0x257/frame 0xfffffe0106720ef0 > > fork_exit() at fork_exit+0x7f/frame 0xfffffe0106720f30 > > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0106720f30 > > --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- > > > > Neither the register dump nor anything in the backtrace indicate what h= appened. > > > > Since the kernel is going down anyway, one may as well get some debug f= rom it. > > If you don't mind the extra branches for sanity checks, why not just run = with > INVARIANTS? That is, what makes these particular assertions different fr= om > other assertions such that they should be on unconditionally? The last l= ine below > applies to pretty much every other assertion in the tree. > This adds a branch in the slowpath, a spot which should relatively rarely execute compared to the fast path. On top of that the branch at hand does not do any extra memory accesses or complex arithmetic. So no, I don't think I may as well run with INVARIANTS. --=20 Mateusz Guzik From nobody Mon Jul 15 18:40:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WN9xM0BB9z5RRkh; Mon, 15 Jul 2024 18:40:23 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN9xL1fjyz4PCk; Mon, 15 Jul 2024 18:40:22 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=QBcJW8t9; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::52e as permitted sender) smtp.mailfrom=mjguzik@gmail.com Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-58ba3e38028so6093881a12.0; Mon, 15 Jul 2024 11:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721068819; x=1721673619; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=G+6QyDVCDF7/HAcqlVRTaApi0lrEQ0HqhF3gG5u5Ez8=; b=QBcJW8t9tcLKrq4MCQUPdgVQ2lgVV5Hb+iwJ5B0gaWdM+oOndglsiZgnc8FOwGdlHn zKNsF3Fq3ukWs84QudyQ/KXuII03Cirk4M5GzmdWCM4PyRL6i+3BVTAC2bDfIz0CjDVV xRX8GRWsOv4XlVa4zhgnrpSVIR/AntcYqF6apb2S0bVxNugnZ3nKTOBr/vstLoXhwUGU vrBDm0MGCEKccE/ZKGRCBYiUvnob3/amTWBGdQ6chaNx7Q7mheFYTcZd4U6xiHV+gyJ9 2FewMQZi+gMyQfQRGYcLo/2ZYReSGzElOv1wi+zFQJuHV1FaGWW79gRwCuZ/lU9m83gz /ctA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721068819; x=1721673619; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G+6QyDVCDF7/HAcqlVRTaApi0lrEQ0HqhF3gG5u5Ez8=; b=kbn1AHCOcVDLk25HqUF/wDGg5ZmI0iHzYxO8R3m1fboPqqfjhOjOUyHOKrvwTCnBFE Gv0wB7ax99zUerXYnv0Ei8EFIGsWsR++qM7muEQoa4Veufz8fetBGP4FmqtzuShEPOJC sCjl1bbH1SjbcncISWDvIp99AeDxd0j8U+SLjQg1NcoIwR+sBV0NnWffk1P5UKPvJ4hH wiOvyaJ8Aljt21KVyoJjgdTJTdOrP2jqQvVxHhxtuwyA3GdfCaLEmAB1cUql+NW8kOHV jVDlThBf35f/2r0GicKpRvPp7mGQ80LnKi4rTfAoI46SfYq+GIS5UHNSkG4+uJDfYA9Q yaxQ== X-Forwarded-Encrypted: i=1; AJvYcCV6JM8ejYqYgMBsPIBGx2KtIYEgXVp/h2gNlgJk/10Z+gK5/rt99YnFRN16nzhy2+J2fuEJpD11nd+b8h1JMlr1mbMctEoYta3ndL8nNwv4WYYCGhKdGXduEHuVnQn1IVp3iY9Qp58LurlnNfxfnEg2+k0QABKPMdlYfac5LE5HmknA7V107YH7o9KUPQY= X-Gm-Message-State: AOJu0YyQ3fXomxwhv0JbHXjuEgh85YsPNYWsFz6zMNfRzHROqNc+Sq10 iEVshNKSHCG1aQVKG8+Z+EXUqpNmTpf6mpZVJkFU5HYDgnOIWI9E7WCzc6txE6mfiYTvn8Se+sT gCKxaoQa1qZ79WsOI6SVpg16RmP6prLoQ X-Google-Smtp-Source: AGHT+IESwKX3NnCWob+lxqX043NKTYDAH5Xpct/KYn5G84AcgL+z7ES9xeGIi3tDMRM/SWomNUTY4QbeeehrRtMhTpI= X-Received: by 2002:a17:906:1545:b0:a77:dd1c:6273 with SMTP id a640c23a62f3a-a79e69389a6mr31211866b.12.1721068818592; Mon, 15 Jul 2024 11:40:18 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> In-Reply-To: From: Mateusz Guzik Date: Mon, 15 Jul 2024 20:40:05 +0200 Message-ID: Subject: Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile To: John Baldwin Cc: Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.983]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52e:from]; RCPT_COUNT_FIVE(0.00)[5]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4WN9xL1fjyz4PCk On Mon, Jul 15, 2024 at 8:33=E2=80=AFPM Mateusz Guzik w= rote: > > On Mon, Jul 15, 2024 at 8:21=E2=80=AFPM John Baldwin wr= ote: > > > > On 7/15/24 13:59, Mateusz Guzik wrote: > > > On Mon, Jul 15, 2024 at 6:22=E2=80=AFPM John Baldwin wrote: > > >> > > >> On 7/11/24 07:07, Mateusz Guzik wrote: > > >>> The branch main has been updated by mjg: > > >>> > > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D87ee63bac69dc49291f5= 5590b8baa57cad6c7d85 > > >>> > > >>> commit 87ee63bac69dc49291f55590b8baa57cad6c7d85 > > >>> Author: Mateusz Guzik > > >>> AuthorDate: 2024-07-11 00:17:27 +0000 > > >>> Commit: Mateusz Guzik > > >>> CommitDate: 2024-07-11 11:06:52 +0000 > > >>> > > >>> locks: add a runtime check for missing turnstile > > >>> > > >>> There are sometimes bugs which result in the unlock fast path= failing, > > >>> which in turns causes a not-helpful crash report when derefer= encing a > > >>> NULL turnstile. Help debugging such cases by pointing out wha= t happened > > >>> along with some debug. > > >>> > > >>> Sponsored by: Rubicon Communications, LLC ("Netgate") > > >>> --- > > >>> sys/kern/kern_mutex.c | 4 +++- > > >>> sys/kern/kern_rwlock.c | 16 ++++++++++++---- > > >>> 2 files changed, 15 insertions(+), 5 deletions(-) > > >>> > > >>> diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c > > >>> index 90361b23c09a..0fa624cc4bb1 100644 > > >>> --- a/sys/kern/kern_mutex.c > > >>> +++ b/sys/kern/kern_mutex.c > > >>> @@ -1053,7 +1053,9 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uin= tptr_t v) > > >>> turnstile_chain_lock(&m->lock_object); > > >>> _mtx_release_lock_quick(m); > > >>> ts =3D turnstile_lookup(&m->lock_object); > > >>> - MPASS(ts !=3D NULL); > > >>> + if (__predict_false(ts =3D=3D NULL)) { > > >>> + panic("got NULL turnstile on mutex %p v %zx", m, v); > > >>> + } > > >> > > >> Hmm, this is just an expanded KASSERT() but always on rather than co= nditional on INVARIANTS? > > >> > > >> Do you have examples of the type of bugs that cause this? (Is it un= locking a freed mutex > > >> or the like?) We generally hide all these types of checks under INV= ARIANTS rather than > > >> shipping them in release kernels. > > >> > > > > > > Use-after-free, overflow, underflow, bitflip or what have you all can > > > fail the fast path. > > > > > > Once that happens and the kernel crashes with a null pointer deref, > > > here is a crash at netgate which prodded this: > > > calltrap() at calltrap+0x8/frame 0xfffffe0106720920 > > > --- trap 0xc, rip =3D 0xffffffff80d5ab70, rsp =3D 0xfffffe01067209f0,= rbp > > > =3D 0xfffffe0106720a00 --- > > > turnstile_broadcast() at turnstile_broadcast+0x40/frame 0xfffffe01067= 20a00 > > > __rw_wunlock_hard() at __rw_wunlock_hard+0x9e/frame 0xfffffe0106720a3= 0 > > > nd6_resolve_slow() at nd6_resolve_slow+0x2d7/frame 0xfffffe0106720aa0 > > > nd6_resolve() at nd6_resolve+0x125/frame 0xfffffe0106720b10 > > > ether_output() at ether_output+0x4e7/frame 0xfffffe0106720ba0 > > > ip_output_send() at ip_output_send+0xdc/frame 0xfffffe0106720be0 > > > ip_output() at ip_output+0x1295/frame 0xfffffe0106720ce0 > > > ip_forward() at ip_forward+0x3c2/frame 0xfffffe0106720d90 > > > ip_input() at ip_input+0x705/frame 0xfffffe0106720df0 > > > swi_net() at swi_net+0x138/frame 0xfffffe0106720e60 > > > ithread_loop() at ithread_loop+0x257/frame 0xfffffe0106720ef0 > > > fork_exit() at fork_exit+0x7f/frame 0xfffffe0106720f30 > > > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0106720f30 > > > --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- > > > > > > Neither the register dump nor anything in the backtrace indicate what= happened. > > > > > > Since the kernel is going down anyway, one may as well get some debug= from it. > > > > If you don't mind the extra branches for sanity checks, why not just ru= n with > > INVARIANTS? That is, what makes these particular assertions different = from > > other assertions such that they should be on unconditionally? The last= line below > > applies to pretty much every other assertion in the tree. > > > > This adds a branch in the slowpath, a spot which should relatively > rarely execute compared to the fast path. On top of that the branch at > hand does not do any extra memory accesses or complex arithmetic. > > So no, I don't think I may as well run with INVARIANTS. How about this: if you strongly about this branch, feel free to revert the commit, I'm just going to keep the change at Netgate. But should you do it, make sure to not add avoidable branches in your stuff= . Cheers. --=20 Mateusz Guzik From nobody Mon Jul 15 18:46:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNB4Y4Vcpz5RS69; Mon, 15 Jul 2024 18:46:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNB4Y3wkTz4QTf; Mon, 15 Jul 2024 18:46:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721069197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U/19X+NuUI1oqMaMf64+Lx6v/8WPFbM87CDXMhgX5aY=; b=RAAJh1AQaTjRW0O/qKyXF0SPMDpXJY/dzZSg+earqgWJWoqXpX1ikURFMUHsIEWXcso+HI D+eaJVk/CNAgbWumg+hdFSlaPeIl6DSHsltxKTUFEy/h9PN7ebdlw6PWBnSNyaMCLRBcto rftBWfvZS+DoXSqxJyJ4X8G2WdapwY68EXROBpIoXKWHFM0DaHbH+ouD8M8b3HQPrqHXYG uByq5BHkP+U2ZtqwUI6QyPeYJXLSad31aSV8VcAj4mxKsAE4IVZdjmFbx1jwXFp+0odfll 1R0kwNtBKo3oBmXORPEQhSpQfFpafnBxoJOtRNUXLJHP3wKMkhWiAaVpzx+kcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721069197; a=rsa-sha256; cv=none; b=p3jzZYncYIdymlgy5iHKTI/6Zmy8MsIm5ZnKUFcJYZmsRjVS+GttDD/yAqLTTux7mPNpYq jWN8XmEusk8nWfg/GUpwEQI1OHbns35mb0l/nUdCMmGW+B6UNep6/kYukOyYPOTcTJt3LE WVlyL+chuLEv3Y3ESGuMYvO/SrnMiDetbNKMHXBRB9purAM75H7NuSTKb/sLvgBH9pZsEJ kuwmFq/ShXNflCwR4cdi+f5u2w7ov2wiRuBn0ViiPv2K/zp3g4MCFwXOiWc4YYHtlMfm+/ MLYzRvdGYKZ9aj2W3mcxah673NEWclzrEyDW8GX/dHX5IZQHsHjwVmcUCHMkeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721069197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U/19X+NuUI1oqMaMf64+Lx6v/8WPFbM87CDXMhgX5aY=; b=aNYOaShZFitVLYfjQRhW58HuwJaPoKv8RMJCXAyJiQxLqFjycuPAqEgYEzs8Bf0rXPULW7 LurSa8D5S6NOBdxbgc4YzTRsWItWjOyVEwCJLUXZY97/hbIAWtkvh5qlvnQjy8lLe429vZ nlN6GWBm2AkN6TYAmdwdYw0Vd/qDuitey47fIY88DZTbzBlke5R4+OH2egF3PMOwgMc5MZ vEpnZOhSHb5PNAxS6JFGPCaqjD4n0qFTTlFYNcEJxizJu0QRAZU9gmoS/FY5non/ARu7Vh uva7mJfdAeJgbyID+qijApBU8eTylXZBSJZFwGRkWf6xkFk+D0c2kk4P1udo3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNB4Y3R1nz13vK; Mon, 15 Jul 2024 18:46:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FIkb57087651; Mon, 15 Jul 2024 18:46:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FIkbX3087648; Mon, 15 Jul 2024 18:46:37 GMT (envelope-from git) Date: Mon, 15 Jul 2024 18:46:37 GMT Message-Id: <202407151846.46FIkbX3087648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 2589197adb19 - main - net80211: migrate the group/unicast key check into inline functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2589197adb199ec37f132dd7e279eb0795713f1e Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=2589197adb199ec37f132dd7e279eb0795713f1e commit 2589197adb199ec37f132dd7e279eb0795713f1e Author: Adrian Chadd AuthorDate: 2024-06-06 17:28:03 +0000 Commit: Adrian Chadd CommitDate: 2024-07-15 18:45:30 +0000 net80211: migrate the group/unicast key check into inline functions The way that net80211 and drivers are checking for the /type/ of key is to check if it's in the vap WEP key array and if so, it's a group key. If not, it's a unicast key. That's not only kind of terrible, but it's also going to be problematic with future 802.11 support (for multiple unicast keys and IGTK keys for management frame protection.) So as part of this, remove the places where this is done and instead use a pair inline functions - ieee80211_is_key_global() and ieee80211_is_key_unicast(). They currenly still use the same logic but the drivers and net80211 stack isn't doing it itself. There are still open questions about why keys are not being correctly tagged as GROUP, GTK, PTK, etc. That will be investigated and addressed in follow-up work as a pre-cursor to MFP, IGTK, etc. as mentioned above. Testing: * iwn, rtwn - STA mode Differential Revision: https://reviews.freebsd.org/D45516 --- sys/dev/ath/if_ath_keycache.c | 3 +-- sys/dev/mwl/if_mwl.c | 3 +-- sys/dev/rtwn/if_rtwn_cam.c | 6 ++---- sys/dev/usb/wlan/if_rsu.c | 7 +++---- sys/dev/usb/wlan/if_rum.c | 10 ++++------ sys/dev/wpi/if_wpi.c | 11 +++++------ sys/net80211/ieee80211.c | 31 +++++++++++++++++++++++++++++++ sys/net80211/ieee80211_crypto.c | 16 ++++++++-------- sys/net80211/ieee80211_var.h | 5 +++++ 9 files changed, 60 insertions(+), 32 deletions(-) diff --git a/sys/dev/ath/if_ath_keycache.c b/sys/dev/ath/if_ath_keycache.c index bc94273bf5ce..a58625ad2803 100644 --- a/sys/dev/ath/if_ath_keycache.c +++ b/sys/dev/ath/if_ath_keycache.c @@ -434,8 +434,7 @@ ath_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, /* * Only global keys should have key index assigned. */ - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { + if (!ieee80211_is_key_global(vap, k)) { /* should not happen */ DPRINTF(sc, ATH_DEBUG_KEYCACHE, "%s: bogus group key\n", __func__); diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 479f3144dce3..49b8b3279c7f 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -1519,8 +1519,7 @@ mwl_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, if (k->wk_keyix != IEEE80211_KEYIX_NONE || (k->wk_flags & IEEE80211_KEY_GROUP)) { - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { + if (!ieee80211_is_key_global(vap, k)) { /* should not happen */ DPRINTF(sc, MWL_DEBUG_KEYCACHE, "%s: bogus group key\n", __func__); diff --git a/sys/dev/rtwn/if_rtwn_cam.c b/sys/dev/rtwn/if_rtwn_cam.c index 864c13d78285..d142cd0476e4 100644 --- a/sys/dev/rtwn/if_rtwn_cam.c +++ b/sys/dev/rtwn/if_rtwn_cam.c @@ -113,8 +113,7 @@ rtwn_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, struct rtwn_softc *sc = vap->iv_ic->ic_softc; int i, start; - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { *keyix = ieee80211_crypto_get_key_wepidx(vap, k); if (sc->sc_hwcrypto != RTWN_CRYPTO_FULL) k->wk_flags |= IEEE80211_KEY_SWCRYPT; @@ -308,8 +307,7 @@ rtwn_process_key(struct ieee80211vap *vap, const struct ieee80211_key *k, return (1); } - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { if (sc->sc_hwcrypto == RTWN_CRYPTO_FULL) { struct rtwn_vap *rvp = RTWN_VAP(vap); diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index e000d1fb5992..c967435250ee 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -1526,10 +1526,10 @@ rsu_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, struct rsu_softc *sc = vap->iv_ic->ic_softc; int is_checked = 0; - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { *keyix = ieee80211_crypto_get_key_wepidx(vap, k); } else { + /* Note: assumes this is a pairwise key */ if (vap->iv_opmode != IEEE80211_M_STA) { *keyix = 0; /* TODO: obtain keyix from node id */ @@ -1570,8 +1570,7 @@ rsu_process_key(struct ieee80211vap *vap, const struct ieee80211_key *k, } /* Handle group keys. */ - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { KASSERT(k->wk_keyix < nitems(sc->group_keys), ("keyix %u > %zu\n", k->wk_keyix, nitems(sc->group_keys))); diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index 2720f2ffedcb..edf92e2222b4 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -1468,8 +1468,7 @@ rum_tx_crypto_flags(struct rum_softc *sc, struct ieee80211_node *ni, flags |= RT2573_TX_CIP_MODE(mode); /* Do not trust GROUP flag */ - if (!(k >= &vap->iv_nw_keys[0] && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) + if (ieee80211_is_key_unicast(vap, k)) flags |= RT2573_TX_KEY_PAIR; else pos += 0 * RT2573_SKEY_MAX; /* vap id */ @@ -3006,8 +3005,7 @@ rum_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, struct rum_softc *sc = vap->iv_ic->ic_softc; uint8_t i; - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { + if (ieee80211_is_key_unicast(vap, k)) { if (!(k->wk_flags & IEEE80211_KEY_SWCRYPT)) { RUM_LOCK(sc); for (i = 0; i < RT2573_ADDR_MAX; i++) { @@ -3044,7 +3042,7 @@ rum_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) return 1; } - group = k >= &vap->iv_nw_keys[0] && k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]; + group = ieee80211_is_key_global(vap, k); return !rum_cmd_sleepable(sc, k, sizeof(*k), 0, group ? rum_group_key_set_cb : rum_pair_key_set_cb); @@ -3061,7 +3059,7 @@ rum_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) return 1; } - group = k >= &vap->iv_nw_keys[0] && k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]; + group = ieee80211_is_key_global(vap, k); return !rum_cmd_sleepable(sc, k, sizeof(*k), 0, group ? rum_group_key_del_cb : rum_pair_key_del_cb); diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index fc5cf02f3a25..11b8a749090d 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -4641,8 +4641,8 @@ again: return !error; } - if (!(kflags & WPI_KFLAG_MULTICAST) && &vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (!(kflags & WPI_KFLAG_MULTICAST) && + ieee80211_is_key_global(vap, k)) { kflags |= WPI_KFLAG_MULTICAST; node.kflags = htole16(kflags); @@ -4726,8 +4726,8 @@ again: return !error; } - if (!(kflags & WPI_KFLAG_MULTICAST) && &vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (!(kflags & WPI_KFLAG_MULTICAST) && + ieee80211_is_key_global(vap, k)) { kflags |= WPI_KFLAG_MULTICAST; node.kflags = htole16(kflags); @@ -4782,8 +4782,7 @@ wpi_process_key(struct ieee80211vap *vap, const struct ieee80211_key *k, } /* Handle group keys. */ - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { WPI_NT_LOCK(sc); if (set) wvp->wv_gtk |= WPI_VAP_KEY(k->wk_keyix); diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 9f91e31d13a6..ecf87020b066 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -2679,3 +2679,34 @@ ieee80211_channel_type_char(const struct ieee80211_channel *c) return 'b'; return 'f'; } + +/* + * Determine whether the given key in the given VAP is a global key. + * (key index 0..3, shared between all stations on a VAP.) + * + * This is either a WEP key or a GROUP key. + * + * Note this will NOT return true if it is a IGTK key. + */ +bool +ieee80211_is_key_global(const struct ieee80211vap *vap, + const struct ieee80211_key *key) +{ + return (&vap->iv_nw_keys[0] <= key && + key < &vap->iv_nw_keys[IEEE80211_WEP_NKID]); +} + +/* + * Determine whether the given key in the given VAP is a unicast key. + */ +bool +ieee80211_is_key_unicast(const struct ieee80211vap *vap, + const struct ieee80211_key *key) +{ + /* + * This is a short-cut for now; eventually we will need + * to support multiple unicast keys, IGTK, etc) so we + * will absolutely need to fix the key flags. + */ + return (!ieee80211_is_key_global(vap, key)); +} diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index 829653ff1335..d70b3aa4a24a 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -62,8 +62,8 @@ static int null_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, ieee80211_keyix *keyix, ieee80211_keyix *rxkeyix) { - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { + + if (!ieee80211_is_key_global(vap, k)) { /* * Not in the global key table, the driver should handle this * by allocating a slot in the h/w key table/cache. In @@ -606,9 +606,9 @@ ieee80211_crypto_get_key_wepidx(const struct ieee80211vap *vap, const struct ieee80211_key *k) { - if (k >= &vap->iv_nw_keys[0] && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) + if (ieee80211_is_key_global(vap, k)) { return (k - vap->iv_nw_keys); + } return (-1); } @@ -618,11 +618,11 @@ ieee80211_crypto_get_key_wepidx(const struct ieee80211vap *vap, uint8_t ieee80211_crypto_get_keyid(struct ieee80211vap *vap, struct ieee80211_key *k) { - if (k >= &vap->iv_nw_keys[0] && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) + if (ieee80211_is_key_global(vap, k)) { return (k - vap->iv_nw_keys); - else - return (0); + } + + return (0); } struct ieee80211_key * diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index c827984b5f37..53139a3852b8 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -824,6 +824,11 @@ char ieee80211_channel_type_char(const struct ieee80211_channel *c); #define ieee80211_get_home_channel(_ic) ((_ic)->ic_bsschan) #define ieee80211_get_vap_desired_channel(_iv) ((_iv)->iv_des_chan) +bool ieee80211_is_key_global(const struct ieee80211vap *vap, + const struct ieee80211_key *key); +bool ieee80211_is_key_unicast(const struct ieee80211vap *vap, + const struct ieee80211_key *key); + void ieee80211_radiotap_attach(struct ieee80211com *, struct ieee80211_radiotap_header *th, int tlen, uint32_t tx_radiotap, From nobody Mon Jul 15 18:46:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNB4Z5VGYz5RSBd; Mon, 15 Jul 2024 18:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNB4Z508Rz4QZJ; Mon, 15 Jul 2024 18:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721069198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ofI+1mYPVlBQCzjLcQ+7Nz2nVNQ5QUIDBi6PgiHF5ak=; b=IbyflN9JykeVMpxXlxq/4JDZ6XQwFLkL5afXsSRZnlyUY9PBb6ohLqYYG3sIeloNCR4Zln cTTkUBhFB1kCy4BGkA835yxAt7yYTTxZuFbUhSEWRI7RIsBhvDJAcnRJFX6s13GnUsSXXJ mG5S0iO+SdWrWVP2NReRN7q44UB46torpfbOEpV4emfGZjdS97w6uoeI60Q2DwfAY+91s5 vgrTCBh/U5wNEztY0xTqg3fZsMGXeRXzozPjBY4v5z37yzMvmOII1x5HspGQVKi6U2U2tI YZf3C3Q36G6+c0He/H6aFqeJyhPJlc+5z1I5w0efHPg1r9a4z5/kuCVjfYAhVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721069198; a=rsa-sha256; cv=none; b=j2tK/sUUA7xoHm/KI8FN5eZNVFlmZiX8tEWANtNEJsfSvfAdZ/ilxEc1KmQUapnIsDFwrX hfXH52iu0i4Brj3jSmVUwSukvd0pUXbIO3PxA+BTsznzBHetOJX4WTrRcWMGqO7b3hm6j+ Wiz6Gakd8WKM7dyovoydGoF7Luh7Ly96l3UdyW5+H4hryj3CZxggs/cN1xEO8KflNdsvmG vMTXATGQCUqeZJv8pVT1Gt3baP9Z0+EH2HHF28lLY+GVzD8iW7aOJk/9UDGRDRe8v0w2h3 C8T0K78U5K7KYBfyuO6htT2uKXwf7d+IotiqVQSPbvhoa3oXcYKi4/MuYfjHmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721069198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ofI+1mYPVlBQCzjLcQ+7Nz2nVNQ5QUIDBi6PgiHF5ak=; b=f0FNmhn2o26kyTmHqG9Wi5enZDl5sc4L/orJDsUyv5cQL+dOXnV1Sl50SL4MxPB6Q5obRg fD47AN4ty0/g/+J9LuHuRjrG9iLdcKtqcjZtDHuBDKcTU9PP2jmgs2f50k+lQS9/4dTvjS jEW5dclrNO5uPJtchFcuPPNeC+6nrfrzYC0tE7zyfUN38Dg0BWrqmUV7Bjli2iDVMnCn2x r9VJczFrYjPO0uGu7HsCkl83txKtCY66VryIMy5NfrzeT2rq6iFiNk8NN3FWi7KH89g7uY BFFjlnfNJOOmFl7HHh1U7JY8rN2c50Mjolf8y4fYwQsl2ZzEPA2N6doVpnIROg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNB4Z4blNz13jm; Mon, 15 Jul 2024 18:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FIkcWj087693; Mon, 15 Jul 2024 18:46:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FIkc3i087690; Mon, 15 Jul 2024 18:46:38 GMT (envelope-from git) Date: Mon, 15 Jul 2024 18:46:38 GMT Message-Id: <202407151846.46FIkc3i087690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 3ab5e2977883 - main - net80211: fix RSN capability parsing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ab5e29778835065d80cbb6610ece981ac65c4c7 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=3ab5e29778835065d80cbb6610ece981ac65c4c7 commit 3ab5e29778835065d80cbb6610ece981ac65c4c7 Author: Adrian Chadd AuthorDate: 2024-07-09 16:54:21 +0000 Commit: Adrian Chadd CommitDate: 2024-07-15 18:45:40 +0000 net80211: fix RSN capability parsing The RSN capability field may be the last two bytes in the IE. 802.11-2016 9.4.2.25.1 (General) doesn't require anything afterwards - the PMKID/List and Group Management Cipher Suite are optional. Thus having a check of len > 2 will miss the situation where it IS the last field. This showed up when developing MFP, as I'm using optional MFP at home and optional MFP doesn't encrypt group management frames. (It should only add the BIP message integrity check IE in each action frame.) Differential Revision: https://reviews.freebsd.org/D45936 --- sys/net80211/ieee80211_hostap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 82d8f8b2907b..1d741ca4d7bf 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -1539,9 +1539,14 @@ ieee80211_parse_rsn(struct ieee80211vap *vap, const uint8_t *frm, rsn->rsn_keymgmt = RSN_ASE_8021X_PSK; /* optional RSN capabilities */ - if (len > 2) + if (len >= 2) { rsn->rsn_caps = le16dec(frm); - /* XXXPMKID */ + frm += 2, len -= 2; + } + + /* XXX PMK Count / PMKID */ + + /* XXX Group Cipher Management Suite */ return 0; } From nobody Mon Jul 15 19:15:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNBkJ5lVMz5RVTq; Mon, 15 Jul 2024 19:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNBkJ5JHFz4Wgl; Mon, 15 Jul 2024 19:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721070952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yAxBPDXfYLpgTC8ygs+gYqX3hmB2HyJa89aA0k4ajJw=; b=lamCgb2fIxJuZSl2AHQgShZ0VSw/OXZ+eaCjr4pFTOMY7w1IdVwQLuvG2Eurf15slNov2d 8aXh2iCAglJ1ia2wpufpIhCLoiuBpCG8VqleFIoK3k/xVFQSe8X5UrCTPanCXpm9bCKN1L Us7WBcrxXqHoalN20dJZ7UvTVq2ZhdPc/KvueStY9cX7qUfH2oeUbgXYkKRJ443UiuMXan 8bRemOX9jLwWM8mQT1zHc7MQ+M9YYMlO9mIA0qUIyz9RblUU4fZQ68AnNPhVngnpW5JhCz OrdXw2WaIUGfHaERlgpzE76Jgi0ulT5JdYBMot+jq0PFdvukzq34xND6X7U0oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721070952; a=rsa-sha256; cv=none; b=YjJD4n4J+6o3EP6cGq4MslWszDO47qL92I29NYp84SnHqbzf6U5s28q3efQAmQdgw48t7c 7wwk+ZwNbPEfE6C2GhlVY8yYk1ZOIH+XjuJOG4zvFzkmNxMUPINIcYfCd4uNvL0DCyJk07 yYoeNRkdNEV6IF656n7L00BLtympTz0TnlPiq3CEWc+H1dcQ0ctDs3Q7EvRxt/mML9QUEA j5U7/Y44OPe3tRFPqYKC03wSvP3kBXaqU3RNZHFiCR6mYC80zFjWZqZQFc3D1XrW2aSzT9 qg2xuS0KeEsYawfe/L97r5zwCIJiRj1H9wapEzAt5u2SSMrz9bJtVd8kAyAtsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721070952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yAxBPDXfYLpgTC8ygs+gYqX3hmB2HyJa89aA0k4ajJw=; b=h+tu1/JdOOlMt/dqA6hvE1pNolriZzdK+L5ZIadQqQv7y/qgz3mMxXawmv0Ab/7OGfMJlq TZnSOTkOavxavCwfWGVyrnk2mOLadUwINWpFqdgfQrFLTyrVIYuGLP5PKNtdLiGQ57xXvq yExCc7rrTnBNs0m68T0LN64pcw/Xm/k87Yy3l1ciWkTWAM8ZHT8ZPZfezqThajtXRU1ipq +/rmXgKMcD8TyNMcMf1CNPVzBhVnJPJF/WXKfU166F9FzmPJytHw1fWPamC+I49LB4yXyA PzcIzje2LCe8U83FjAlvjbsKuOTPC2w7g1RWzGz5K34pYE4dx9B4nW30pNzNYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNBkJ4mThz14qh; Mon, 15 Jul 2024 19:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FJFq9I039307; Mon, 15 Jul 2024 19:15:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FJFqdO039304; Mon, 15 Jul 2024 19:15:52 GMT (envelope-from git) Date: Mon, 15 Jul 2024 19:15:52 GMT Message-Id: <202407151915.46FJFqdO039304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0a34d050ae8e - main - acpi: Narrow workaround for broken interrupt settings on x86 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a34d050ae8ea14feddd3d2a62fd2f612613b2c5 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0a34d050ae8ea14feddd3d2a62fd2f612613b2c5 commit 0a34d050ae8ea14feddd3d2a62fd2f612613b2c5 Author: John Baldwin AuthorDate: 2024-07-15 19:13:08 +0000 Commit: John Baldwin CommitDate: 2024-07-15 19:13:51 +0000 acpi: Narrow workaround for broken interrupt settings on x86 Commit 9a7bf07ccdc1 from 2016 introduced a workaround for some broken BIOSes that specified active-lo instead of active-hi polarity for ISA IRQs for UARTs. The workaround assumed that edge-sensitive ISA IRQs on x86 should always be active-hi. However, some recent AMD systems actually use active-lo edge-sensitive ISA IRQs (and not just for UARTs, but also for the keyboard and PS/2 mouse devices) and the override causes interrupts to be dropped resulting in boot time hangs, non-working keyboards, etc. Add a hw.acpi.override_isa_irq_polarity tunable (readable as a sysctl post-boot) to control this quirk. It can be set to 1 to force enable the override and 0 to disable it. The log of original message mentions an Intel motherboard as the sample case, so default the tunable to 1 on systems with an Intel CPU and 0 otherwise. Special thanks to Matthias Lanter for tracking down boot time issues on recent AMD systems to mismatched interrupt polarity. PR: 270707 Reported by: aixdroix_OSS@protonmail.com, Michael Dexter Reported by: mfw_burn@pm.me, Hannes Hfauswedell Reported by: Matthias Lanter Reported by: William Bulley Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45554 --- share/man/man4/acpi.4 | 8 +++++++- sys/dev/acpica/acpi.c | 19 +++++++++++++++++++ sys/dev/acpica/acpi_resource.c | 11 ++++------- sys/dev/acpica/acpivar.h | 12 ++++++++++++ 4 files changed, 42 insertions(+), 8 deletions(-) diff --git a/share/man/man4/acpi.4 b/share/man/man4/acpi.4 index 434e97d529f5..cdad3ceeedfc 100644 --- a/share/man/man4/acpi.4 +++ b/share/man/man4/acpi.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 12, 2021 +.Dd July 15, 2024 .Dt ACPI 4 .Os .Sh NAME @@ -256,6 +256,12 @@ is a valid list of two interfaces .Qq Li FreeBSD and .Qq Li Linux . +.It Va hw.acpi.hw.acpi.override_isa_irq_polarity (x86) +Forces active-lo polarity for edge-triggered ISA interrupts. +Some older systems incorrectly specify active-lo polarity for ISA +interrupts and this override fixes those systems. +This override is enabled by default on systems with Intel CPUs, +but can be enabled or disabled by setting the tunable explicitly. .It Va hw.acpi.reset_video Enables calling the VESA reset BIOS vector on the resume path. This can fix some graphics cards that have problems such as LCD white-out diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 24d7027f165d..91a1636f2808 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -55,6 +55,8 @@ #if defined(__i386__) || defined(__amd64__) #include #include +#include +#include #endif #include #include @@ -297,6 +299,10 @@ int acpi_susp_bounce; SYSCTL_INT(_debug_acpi, OID_AUTO, suspend_bounce, CTLFLAG_RW, &acpi_susp_bounce, 0, "Don't actually suspend, just test devices."); +#if defined(__amd64__) || defined(__i386__) +int acpi_override_isa_irq_polarity; +#endif + /* * ACPI standard UUID for Device Specific Data Package * "Device Properties UUID for _DSD" Rev. 2.0 @@ -611,6 +617,19 @@ acpi_attach(device_t dev) OID_AUTO, "handle_reboot", CTLFLAG_RW, &sc->acpi_handle_reboot, 0, "Use ACPI Reset Register to reboot"); +#if defined(__amd64__) || defined(__i386__) + /* + * Enable workaround for incorrect ISA IRQ polarity by default on + * systems with Intel CPUs. + */ + if (cpu_vendor_id == CPU_VENDOR_INTEL) + acpi_override_isa_irq_polarity = 1; + SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), + OID_AUTO, "override_isa_irq_polarity", CTLFLAG_RDTUN, + &acpi_override_isa_irq_polarity, 0, + "Force active-hi polarity for edge-triggered ISA IRQs"); +#endif + /* * Default to 1 second before sleeping to give some machines time to * stabilize. diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index 87b82a574beb..1257ed30cc65 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -159,14 +159,11 @@ acpi_config_intr(device_t dev, ACPI_RESOURCE *res) } #if defined(__amd64__) || defined(__i386__) - /* - * XXX: Certain BIOSes have buggy AML that specify an IRQ that is - * edge-sensitive and active-lo. However, edge-sensitive IRQs - * should be active-hi. Force IRQs with an ISA IRQ value to be - * active-hi instead. - */ - if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW) + if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW && + acpi_override_isa_irq_polarity) { + device_printf(dev, "forcing active-hi polarity for IRQ %u\n", irq); pol = ACPI_ACTIVE_HIGH; + } #endif BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ? INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ? diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 2322ab96014b..a71eb9b47eb7 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -234,6 +234,18 @@ extern int acpi_quirks; #define ACPI_Q_TIMER (1 << 1) #define ACPI_Q_MADT_IRQ0 (1 << 2) +#if defined(__amd64__) || defined(__i386__) +/* + * Certain Intel BIOSes have buggy AML that specify an IRQ that is + * edge-sensitive and active-lo. Normally, edge-sensitive IRQs should + * be active-hi. If this value is non-zero, edge-sensitive ISA IRQs + * are forced to be active-hi instead. At least some AMD systems use + * active-lo edge-sensitive ISA IRQs, so this setting is only enabled + * by default on systems with Intel CPUs. + */ +extern int acpi_override_isa_irq_polarity; +#endif + /* * Plug and play information for device matching. Matching table format * is compatible with ids parameter of ACPI_ID_PROBE bus method. From nobody Mon Jul 15 19:15:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNBkL0r8Jz5RVRT; Mon, 15 Jul 2024 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNBkK5vspz4WS4; Mon, 15 Jul 2024 19:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721070953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=raARJ4BItTPCU43qM4kVSTknuC8xF3EvU4v74IfQyUA=; b=VgyfzeCNSKcH8FSUkCB8IomJEzuwuRKVcq+SAV2VG6ppFrJacAjqoKeM+ti1XqbyWOZoPU y312hhXlD5X2F+WaY4Vl9gtMVmFsANHBEwEE8F3nfodialLf8kL8Aabf+8zXGK3ehDfPEI AO7+MvmfYdIkhvI6Ld0ZOKt+brvy61O5lWpk+PF/dlhOvU3X+2LVUBQbcSpinnSLOh5k71 KaonQ23JsxcA2tbKjmZmnFzKRRv7mCDMnIEoRiA+Gi33JYGoFZ8uhiucGlynN9WT1yvhDl 3+524taCXVqS2u5j/QWqVBJj0xHllF7IflNKDU5T3TcFIWv86RAdeHrdOqU27Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721070953; a=rsa-sha256; cv=none; b=oxUuMw1qaAuW7Qo2ncfU7cyoT8yxBzcLalMZLfOfs9YE7ZwL/3lqeHUGSdN5E6YAaU0/jX 5zGcs3JTdI0fBhxt5SRC5f3tA7yWAjh8lD02JANRMyvQ212VpRRSx0w+LUv03DuR5BDs1q 7waix3WFgWWW1FLsKTIl/eu4a8kYUAW1pqPBgCVcYpqdBQ06dhZk/nNisXmPw8GbUPeAxq UPk1uB7toMNzlE+s6+Hyqc2LqTpSscyA79gKmm/s5BpIkEPbV/7jBZZFU8xIVGs4ri2F5V 46R6+E+un2W/mg9XHDCJ7u5+1s2dfzCexZztV+Xk0Cw3Xkja4u++lPjshTzlkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721070953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=raARJ4BItTPCU43qM4kVSTknuC8xF3EvU4v74IfQyUA=; b=GDtqYqEDvGLpPijUpM1HCdGTQXL9bQaogOJIPu+R8hJQHyeoNrsXxB3amriB7hbFiE/44f YO9eJ5D7I8dJYtXre9Mov9oiwGhTz54OqjiTOV/m4kLs6Sb6CXD5UykTqsrI39uYHZMdAp QxJjaXAy2nHIugY1AtizNXLfaAseZQckC5sVd3PCgI2FYDN85eKQV5tbTIFv7tmdWyiYav A5gFuR5OfS6Mxj8QTOQE/HL9WM1GPng9ef5lKOG9/49k1gr6CErItwYnP0xcya8BnFBAIK 3QrDY56yZXdowrnELg+GSfuS4K0y9aZ/1Zcl2hD8lZe926Zbno18yldBjqwOYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNBkK5VlDz14FK; Mon, 15 Jul 2024 19:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FJFrVr039365; Mon, 15 Jul 2024 19:15:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FJFr7L039362; Mon, 15 Jul 2024 19:15:53 GMT (envelope-from git) Date: Mon, 15 Jul 2024 19:15:53 GMT Message-Id: <202407151915.46FJFr7L039362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9cc06bf7aa28 - main - amd64 GENERIC: Switch uart hints from "isa" to "acpi" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cc06bf7aa2846c35483de567779bb8afc289f53 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9cc06bf7aa2846c35483de567779bb8afc289f53 commit 9cc06bf7aa2846c35483de567779bb8afc289f53 Author: John Baldwin AuthorDate: 2024-07-15 19:14:01 +0000 Commit: John Baldwin CommitDate: 2024-07-15 19:15:29 +0000 amd64 GENERIC: Switch uart hints from "isa" to "acpi" This causes these hints to be only used to wire device unit numbers for serial ports enumerated by ACPI but will not create ISA device nodes if ACPI doesn't enumerate them. Note that IRQ hints are not used for wiring so have been removed. PR: 270707 Reported by: aixdroix_OSS@protonmail.com, Michael Dexter Reported by: mfw_burn@pm.me, Hannes Hfauswedell Reported by: Matthias Lanter Reported by: William Bulley Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45945 --- sys/amd64/conf/GENERIC.hints | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hints index 7c2a3f28b9ce..4f6121c7cf77 100644 --- a/sys/amd64/conf/GENERIC.hints +++ b/sys/amd64/conf/GENERIC.hints @@ -6,13 +6,11 @@ hint.psm.0.at="atkbdc" hint.psm.0.irq="12" hint.sc.0.at="isa" hint.sc.0.flags="0x100" -hint.uart.0.at="isa" +hint.uart.0.at="acpi" hint.uart.0.port="0x3F8" hint.uart.0.flags="0x10" -hint.uart.0.irq="4" -hint.uart.1.at="isa" +hint.uart.1.at="acpi" hint.uart.1.port="0x2F8" -hint.uart.1.irq="3" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" From nobody Mon Jul 15 19:20:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNBqv0Vg0z5RVqY; Mon, 15 Jul 2024 19:20:43 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNBqt5bGlz4Xkk; Mon, 15 Jul 2024 19:20:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721071242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EPAPmbwXKfNrY2d0Wx8aNxbT7JKNQHKGC1yXxefQjzc=; b=ydzJQo637h4nldceTZbAasKodsaIQgauFa/a0RPGTyemXU2+sJ7DxI325/RNvzEIw7cwRl wrRemVsWqaF4uD5789S+q4K4VCtKpOvN5SjLi0CpDPwd4XI2TGTlCN218Soc+IswVmgnmP R5YKFRM+9lTjtVuMdW7Fw4E/pRo6XrAtXJlRB8TWKF5gok6K06HEARy+mlmmP+1Q6mQHWh ZeLopzu3NRUxbkYQaiiI97fuxGYd5e+s+MIcUZs7wh05X/kE7hi4XlRU/oeUShOtPY/aZS om1RNTu6ggfsRE9/lFHpJ1lZzt7zeT6vzliThF/pYrXh34XixHeFM6lQVgC+CA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721071242; a=rsa-sha256; cv=none; b=G7OEQdqaBLZDYLdyKCvOVF7Un8riyDH630DEdbYaNodNNRfBguAUZ0+iILOac5ceOQyxTA GWyQKfSryrErb8cPwoVl1zVtLvzjV7A7dPh1sxryc/HOLtf/ksu6ctIDCjM3lqjRBU+SJw 8lUQK+4jmKVQs2opnJHK1H9u8nJ2fQmn7D0HvUpdJkkyTArDWnlbP1aMGD1XIMm5S1unlG oGjVn+PJ9ngE4jBl2GBK62Xb7njn6nQGygdSkqEVPMCrxxu16nOnwlBHk9UGznLVaE6tVz VBSzirORKzCSk+NRtuiIMMIvf6MaRPk2WQdxErvXZ6H74BKu0QzjJS3GOTVClg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721071242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EPAPmbwXKfNrY2d0Wx8aNxbT7JKNQHKGC1yXxefQjzc=; b=wO9WRZueAZPyqQpr4sQKJI9b1thk1VUo4tb047H7WV6pxEykKgsheZL0Xb1pA+S6oY5VKE xvFttndNSB4va/1Iwr7/l24OSWcK1hT9nTkt0hPA5QTPaUay48hS3UJTwVNxJ6itknXTQ/ 1AU+PR2v9TZeuxyKGSPQIDroamp6kAQHWXXI7DulJWSMMDn0dOI75Adpe6fZCrXgfpUOew xJod4mGQ7b7e7IHkAlks3wHBqXRdhIGk8FMexkTR28DfgHaOrw2tP9xR80VvMaslm/WLbP DnNjCguBYm6VAgWVCBc1gdK4flDb+drH8aKgIHo/Ewue8CMEXb2BHp4DMlIHzw== Received: from [IPV6:2601:5c0:4200:b830:28d3:efa9:9f5c:a97f] (unknown [IPv6:2601:5c0:4200:b830:28d3:efa9:9f5c:a97f]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WNBqt3xt2z1Prx; Mon, 15 Jul 2024 19:20:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 15 Jul 2024 15:20:41 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 9cc06bf7aa28 - main - amd64 GENERIC: Switch uart hints from "isa" to "acpi" Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407151915.46FJFr7L039362@gitrepo.freebsd.org> In-Reply-To: <202407151915.46FJFr7L039362@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/15/24 15:15, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9cc06bf7aa2846c35483de567779bb8afc289f53 > > commit 9cc06bf7aa2846c35483de567779bb8afc289f53 > Author: John Baldwin > AuthorDate: 2024-07-15 19:14:01 +0000 > Commit: John Baldwin > CommitDate: 2024-07-15 19:15:29 +0000 > > amd64 GENERIC: Switch uart hints from "isa" to "acpi" > > This causes these hints to be only used to wire device unit numbers > for serial ports enumerated by ACPI but will not create ISA device > nodes if ACPI doesn't enumerate them. Note that IRQ hints are not > used for wiring so have been removed. > > PR: 270707 > Reported by: aixdroix_OSS@protonmail.com, Michael Dexter > Reported by: mfw_burn@pm.me, Hannes Hfauswedell > Reported by: Matthias Lanter > Reported by: William Bulley > Reviewed by: imp > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D45945 > --- > sys/amd64/conf/GENERIC.hints | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hints > index 7c2a3f28b9ce..4f6121c7cf77 100644 > --- a/sys/amd64/conf/GENERIC.hints > +++ b/sys/amd64/conf/GENERIC.hints > @@ -6,13 +6,11 @@ hint.psm.0.at="atkbdc" > hint.psm.0.irq="12" > hint.sc.0.at="isa" > hint.sc.0.flags="0x100" > -hint.uart.0.at="isa" > +hint.uart.0.at="acpi" > hint.uart.0.port="0x3F8" > hint.uart.0.flags="0x10" > -hint.uart.0.irq="4" > -hint.uart.1.at="isa" > +hint.uart.1.at="acpi" > hint.uart.1.port="0x2F8" > -hint.uart.1.irq="3" > hint.atrtc.0.at="isa" > hint.atrtc.0.port="0x70" > hint.atrtc.0.irq="8" Warner would like to purge more of this file (almost all of it) which is probably correct. Warner believes that the uart0 flags to set serial console aren't needed for loaders from FreeBSD 9+ due to the hw.uart.* tunables modern loaders set. I'm less certain about hints for "fixed" devices such as attimer0, atrtc0, and atkbdc0. I feel like some systems have failed to enumerate those in the past, though such systems may be i386-only. The sc0 hints I think can go away once we fully deprecate sc(4) in favor of only vt(4). I've chosen to leave i386 alone as there's still some ancient i386 cruft, but on amd64 we have a higher bar (e.g. ACPI is de facto required for amd64). Also, i386 kernels have one foot in the grave already. This commit is also somewhat narrow in scope as I plan to merge it back to 13 and 14. -- John Baldwin From nobody Mon Jul 15 20:13:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WND0Z57h0z5RZ4j; Mon, 15 Jul 2024 20:13:18 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WND0Z410tz4cjL; Mon, 15 Jul 2024 20:13:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721074398; 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=U1wox1LMz6GN2mnC/H1991KjuCABxi23L7xTfPwshLY=; b=jv9PFZUaFXK0wzbjb39OkuHlyiEZbwIP2vEadNGwEJBLL3kWgiCOskOmdgnCm7TpOI3YPI pm7ImG0qO23HtyVMUxREYHX0dFzJDuoaDsCRvfe20qWSol3dTeKeuIdmfi46VffhAu3IbQ u0vU5Qnc/dRXiN8x3AQHE3Rq//H3fddWot889JSZCh+87a1pUF7IPhQbtjwHD+nXNF/6SP LwU6TrduDL9r10hngAlVc8YcQf81judUKvohs7bND5U/harKRGRNB6AEfr228GVPSavq0Y g0v15NvMi5C/9rNUNbZA3hKtvL9tOZir36/svPWPUGn2scRYk1IbZTQx5kFMcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721074398; a=rsa-sha256; cv=none; b=afADPdE70DXWmjP4Jj4R8+lO8DDifv81aiNBJahIA/Fzd5sf2UVYnApn8LnoOkDNTE0Yon 6KJ4Gv7Z7Sv5bANEzryqoVYDXyot7Iv0ZZsVM932xda8k1aa/b/3D4ru0PO5911Y7cmkue HCElLx2+CVQHeDZjRHR5zV2IOnzQYgKeeF7+7bsFx4FYg7gSSIILd3GO7vqig9xrXlbYMN I6kMqxElMKGUtCAdov0naJ0EtIVGvmbyfIkvOuVswX7r05Tk14bHE32aBIxa8cHV5galI3 odXO9wUOoyKVKA+mPabL6kUhX9y2yRSSejhv+m55GlHAh8s9oE+auT4XHRP3Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721074398; 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=U1wox1LMz6GN2mnC/H1991KjuCABxi23L7xTfPwshLY=; b=eMofur4F4DERStJ7RDGMW3UdLdA2SUR1YJ2gOTDqTa0mN8jC6/6CyobablIt8kgdPUekX+ VI1PpUiBeEQKmkmFCcx8UVtl5u7vIy0AE/gIVfJd8dkbo/ANlUKg5nA5yCc1t3ajdrB8af j+F5sFO7GhxEOMb22wZ4mbQnThAGSiddDSaNr58q5is/F1q4Ig0fxXWYkqYb5D1gmVuiA4 L32/xEb5Xjjngz1L6zzL5HfNKPbQeqldZvmiTmsaIeU7Wj4OVb5sXVehKqZQBAYUaDK5qo 2dV0Ww5QmWrMijZT14Mr70VwGdShfIr9GLnN/t43wGktvjLrh/7TSIydsSZZXQ== Received: from [IPV6:2601:5c0:4200:b830:28d3:efa9:9f5c:a97f] (unknown [IPv6:2601:5c0:4200:b830:28d3:efa9:9f5c:a97f]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WND0Z1qqQz1RLl; Mon, 15 Jul 2024 20:13:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <752a3f0a-438e-4465-a8ae-47700e79306d@FreeBSD.org> Date: Mon, 15 Jul 2024 16:13:17 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile Content-Language: en-US To: Mateusz Guzik Cc: Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/15/24 14:40, Mateusz Guzik wrote: > On Mon, Jul 15, 2024 at 8:33 PM Mateusz Guzik wrote: >> >> On Mon, Jul 15, 2024 at 8:21 PM John Baldwin wrote: >>> >>> On 7/15/24 13:59, Mateusz Guzik wrote: >>>> On Mon, Jul 15, 2024 at 6:22 PM John Baldwin wrote: >>>>> >>>>> On 7/11/24 07:07, Mateusz Guzik wrote: >>>>>> The branch main has been updated by mjg: >>>>>> >>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=87ee63bac69dc49291f55590b8baa57cad6c7d85 >>>>>> >>>>>> commit 87ee63bac69dc49291f55590b8baa57cad6c7d85 >>>>>> Author: Mateusz Guzik >>>>>> AuthorDate: 2024-07-11 00:17:27 +0000 >>>>>> Commit: Mateusz Guzik >>>>>> CommitDate: 2024-07-11 11:06:52 +0000 >>>>>> >>>>>> locks: add a runtime check for missing turnstile >>>>>> >>>>>> There are sometimes bugs which result in the unlock fast path failing, >>>>>> which in turns causes a not-helpful crash report when dereferencing a >>>>>> NULL turnstile. Help debugging such cases by pointing out what happened >>>>>> along with some debug. >>>>>> >>>>>> Sponsored by: Rubicon Communications, LLC ("Netgate") >>>>>> --- >>>>>> sys/kern/kern_mutex.c | 4 +++- >>>>>> sys/kern/kern_rwlock.c | 16 ++++++++++++---- >>>>>> 2 files changed, 15 insertions(+), 5 deletions(-) >>>>>> >>>>>> diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c >>>>>> index 90361b23c09a..0fa624cc4bb1 100644 >>>>>> --- a/sys/kern/kern_mutex.c >>>>>> +++ b/sys/kern/kern_mutex.c >>>>>> @@ -1053,7 +1053,9 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v) >>>>>> turnstile_chain_lock(&m->lock_object); >>>>>> _mtx_release_lock_quick(m); >>>>>> ts = turnstile_lookup(&m->lock_object); >>>>>> - MPASS(ts != NULL); >>>>>> + if (__predict_false(ts == NULL)) { >>>>>> + panic("got NULL turnstile on mutex %p v %zx", m, v); >>>>>> + } >>>>> >>>>> Hmm, this is just an expanded KASSERT() but always on rather than conditional on INVARIANTS? >>>>> >>>>> Do you have examples of the type of bugs that cause this? (Is it unlocking a freed mutex >>>>> or the like?) We generally hide all these types of checks under INVARIANTS rather than >>>>> shipping them in release kernels. >>>>> >>>> >>>> Use-after-free, overflow, underflow, bitflip or what have you all can >>>> fail the fast path. >>>> >>>> Once that happens and the kernel crashes with a null pointer deref, >>>> here is a crash at netgate which prodded this: >>>> calltrap() at calltrap+0x8/frame 0xfffffe0106720920 >>>> --- trap 0xc, rip = 0xffffffff80d5ab70, rsp = 0xfffffe01067209f0, rbp >>>> = 0xfffffe0106720a00 --- >>>> turnstile_broadcast() at turnstile_broadcast+0x40/frame 0xfffffe0106720a00 >>>> __rw_wunlock_hard() at __rw_wunlock_hard+0x9e/frame 0xfffffe0106720a30 >>>> nd6_resolve_slow() at nd6_resolve_slow+0x2d7/frame 0xfffffe0106720aa0 >>>> nd6_resolve() at nd6_resolve+0x125/frame 0xfffffe0106720b10 >>>> ether_output() at ether_output+0x4e7/frame 0xfffffe0106720ba0 >>>> ip_output_send() at ip_output_send+0xdc/frame 0xfffffe0106720be0 >>>> ip_output() at ip_output+0x1295/frame 0xfffffe0106720ce0 >>>> ip_forward() at ip_forward+0x3c2/frame 0xfffffe0106720d90 >>>> ip_input() at ip_input+0x705/frame 0xfffffe0106720df0 >>>> swi_net() at swi_net+0x138/frame 0xfffffe0106720e60 >>>> ithread_loop() at ithread_loop+0x257/frame 0xfffffe0106720ef0 >>>> fork_exit() at fork_exit+0x7f/frame 0xfffffe0106720f30 >>>> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0106720f30 >>>> --- trap 0, rip = 0, rsp = 0, rbp = 0 --- >>>> >>>> Neither the register dump nor anything in the backtrace indicate what happened. >>>> >>>> Since the kernel is going down anyway, one may as well get some debug from it. >>> >>> If you don't mind the extra branches for sanity checks, why not just run with >>> INVARIANTS? That is, what makes these particular assertions different from >>> other assertions such that they should be on unconditionally? The last line below >>> applies to pretty much every other assertion in the tree. >>> >> >> This adds a branch in the slowpath, a spot which should relatively >> rarely execute compared to the fast path. On top of that the branch at >> hand does not do any extra memory accesses or complex arithmetic. >> >> So no, I don't think I may as well run with INVARIANTS. > > How about this: if you strongly about this branch, feel free to revert > the commit, I'm just going to keep the change at Netgate. > > But should you do it, make sure to not add avoidable branches in your stuff. It's more that I think this is an unusual case (unconditional assertions rather than conditional on INVARIANTS) such that it's probably worth being a bit more explicit about that in the log with the rationale, etc. That is, I don't think "runtime check" quite communicates that you are intentionally doing an unconditional assertion, and a bit more detail about the specific types of bugs might have been useful in the log as well. I think it's fine if we want to have some checks that are always on, but it's currently quite rare so needs a bit more rationale in the log than other changes is all. -- John Baldwin From nobody Mon Jul 15 20:18:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WND662Y00z5RZhQ; Mon, 15 Jul 2024 20:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WND6622nGz4dD2; Mon, 15 Jul 2024 20:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721074686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xoe3szaHstUvtgEZAHAl36dMXFLwd+zRetXm223FeKo=; b=uBRNn9HMBT1Ir9QZ3QpbnVsX+janaZH06BTNuuU9FgbD/OfHDLv8wCURImIyltDRMXTGyw OdPv9wIFL3xF2Gg6n4XLWzehbBLP5mau2062F50x8flUWBATLyctiLJQNupG/juSsJWK+S qjZ8qqrF5LBFyB5yRwmmgONavRUv8Q5u4J/ShnmWqN8EexZms3/h8YNz51lfTO0VOJ58jv nqLKj7Vq3hBk4Wxmf8WUIh/yFfbfUyr9RY5t+efs+Chww+pDsog4/uS2LtiPqXB8ddgkt1 o0feTfzoE3/m51EwxnHZ9PqxGCSo7NY+HwtU3UPJdg8gYiinvb3tUi6RMG/PYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721074686; a=rsa-sha256; cv=none; b=BRE3StriMm1FpB7/iVc3jeAzx7taGrpmzQecx+7971Hb2Foagr2GvgrP8Z2cxnsV/MsT98 fQ29Lk0LZmi2tbBTnP238CYl8TXaLQt+g6ry8FPWjn09JcTYQLV1r8lpNrDXObgCSHwWbV qbBMElmg8CVb0mrD8JSViIh/yWaGqfVx0+9euNDoVZ2j9I8erNLgVM3n9OOAO72hc3jbFT /HqvyBzY0pg1vf35vf4XIk4KsIInxG2t7AgjBnBAjtk2eyutYklrBJxNRVxyCikcOUJ0y6 DyVx8iYwfhQ3S8XjGKP9Hj9uUWeS9Fb8ylv/ZfqghWbFmsSdkDeJgHY7W0yw1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721074686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xoe3szaHstUvtgEZAHAl36dMXFLwd+zRetXm223FeKo=; b=ds9gowrEQhbVebciQ6LINzHnyeyWaAi3TBp2uGQZKA8nJvHP1tIo/4bVhqMWy0DdoqUUxP tvOuu/YrUqgksrRazQBCkN+MLXwcCO+s3zKZQZ4LHz6Q6q8hOqcchsIrAxe5gHYNbYuifW WgAvva0Qr6mKne+1AIBkUGER2FSVbyvCgC/GK2SwLt8G54/Qle7T8IsnqFss718P8OoTZ2 zSN67RqfofMyGLwua90g9JHtRtFqEEaT9PZtSVnJUO6rGOO/jhjxJn7JrkF2H+YV0epG9V 3uuupW6MofQdfPHZLizGFcmavorGH7534OUlcG2D8JqhSAMVcXlBhoysLqrJ6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WND661XNLz15fv; Mon, 15 Jul 2024 20:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FKI6mo041764; Mon, 15 Jul 2024 20:18:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FKI6pV041761; Mon, 15 Jul 2024 20:18:06 GMT (envelope-from git) Date: Mon, 15 Jul 2024 20:18:06 GMT Message-Id: <202407152018.46FKI6pV041761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 5862c891bb7c - main - kern: zero out stack buffer after copying out random bits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5862c891bb7c588aa00538d85eb26ffe77d3f709 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5862c891bb7c588aa00538d85eb26ffe77d3f709 commit 5862c891bb7c588aa00538d85eb26ffe77d3f709 Author: Kyle Evans AuthorDate: 2024-07-15 20:17:47 +0000 Commit: Kyle Evans CommitDate: 2024-07-15 20:17:47 +0000 kern: zero out stack buffer after copying out random bits The kern.arandom sysctl handler uses an intermediate buffer on the stack to hold random data that it subsequently copies out to the sysctl request. Err on the side of caution and zero out the stack buffer after we're done with it to avoid a potential entropy leak later on. Reviewed by: cem, emaste, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45978 --- sys/kern/kern_mib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 5724ed3f6932..fe6e49865682 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -182,10 +182,14 @@ sysctl_kern_arnd(SYSCTL_HANDLER_ARGS) { char buf[256]; size_t len; + int error; len = MIN(req->oldlen, sizeof(buf)); read_random(buf, len); - return (SYSCTL_OUT(req, buf, len)); + + error = SYSCTL_OUT(req, buf, len); + explicit_bzero(buf, len); + return (error); } SYSCTL_PROC(_kern, KERN_ARND, arandom, From nobody Mon Jul 15 20:22:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNDCR2TwKz5Rb4p; Mon, 15 Jul 2024 20:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNDCR1psFz4f2R; Mon, 15 Jul 2024 20:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721074963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/jCwvTx4uNjZsenYc+ZGXdPoMFtIqkCaatHFbFgVZZk=; b=ZcfbwAQ04QW9bBlqug8OSNhXN+WTkASu5Q+C0I9euuw4TX4+i7urQeJSeIXqmqEb4ajyMT ua6Ajc3Gc+yQJb5siiUJhksbu08pXI78urZqZa2cvkawEAROnWhSMn9Dz8teGKBcl3PZ/U o/j4HDjSIQKFK2MsySfrDtjotRfWoVsUcEkPU09Jg/RMe2XbU+9fmSq4LCOD1kSNDHkhjR j1ffYatD4gWj6YoHszXLNKY8HCg5iDlfts4YOt1eIXPiVvd0nsmJpUPH0eCSNh49fa95iL oE4H+WqOtF58Iqhj3/vtvNuBHIPFk15/U4U1G6unlBqey1DDVOpm5Rpw4XEdGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721074963; a=rsa-sha256; cv=none; b=jtvMS5HMpTZrOSENxIuQ+LL3m3yJ9s/kwfcuiZgvFpjLPtCiRK7prji9lw9IR1+BBHj2lB Ahyo3g9Cbek9N4+fdK5ucs7RGCqUbj7nYlmG9m0SfURKJklcMAw/G/7TNLDTFtjzm1bXjq lJ3Hk/o0oc4uJbibYUg7GE8CfT5GoSWnHUU2W/EmGnZJsTIFcWVbT7j2IyvrJsNaqjQWws Xb6gPlL4ROPFwHqJthQL2kGLl88LbK0lOsBZ1U67Gz4vVzhnHQtiuNoVXrLLAU3TpFYCb1 GHTudBfsr4yo+OTbFs3eY4/BEcUa7OsJek2byOFnA4dPqV0tx/nJkqy8dhpSzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721074963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/jCwvTx4uNjZsenYc+ZGXdPoMFtIqkCaatHFbFgVZZk=; b=DR9xcwUlcYN4wjdEeIokMJRGJKqahTZesA2sqrDxVlEBtlvIXZtiWPbDtQmnUgedjuOpum tCTomdkjonWHwIyxaUwh94hHMoksnvk9NYndvur1NGaR9ixOTVLdUT0y5vWRiVqdoCb7a7 UWAM+fPW08C85OHUj0JlJ9syDbU8RHPeABnBZy0NLVIiIWF4dYVxmVPIMFEuVuVh7XXpVK hhufCNeGHsLLkFKEfizq2KSSv00fGnzWb++XZ9LyrpsCXgOkASTweV9o3BvAdxtMOH6pge Cz3XSIBNfYUHfaao76+qbR20ou3wPIxj+2wo/9WNe36a/kdreHgWihgTU6/gRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNDCR1L9Vz16M8; Mon, 15 Jul 2024 20:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FKMhmM057608; Mon, 15 Jul 2024 20:22:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FKMhGQ057605; Mon, 15 Jul 2024 20:22:43 GMT (envelope-from git) Date: Mon, 15 Jul 2024 20:22:43 GMT Message-Id: <202407152022.46FKMhGQ057605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b3877767883e - main - ndp: Fix libxo formatting for the prefix expiry string List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3877767883e9b26fbcce47c015ba3eab323bf1b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b3877767883e9b26fbcce47c015ba3eab323bf1b commit b3877767883e9b26fbcce47c015ba3eab323bf1b Author: Mark Johnston AuthorDate: 2024-07-15 20:06:24 +0000 Commit: Mark Johnston CommitDate: 2024-07-15 20:22:00 +0000 ndp: Fix libxo formatting for the prefix expiry string Fixes: e1c7783e220b ("ndp(8): add structured output formatting via libxo") MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Bell Tower Integration --- usr.sbin/ndp/ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index dcb3b5e3571b..637aac2823ed 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1334,7 +1334,7 @@ plist(void) if (p->expire == 0) xo_emit(", expire=Never{en:permanent/true}"); else if (p->expire >= now.tv_sec) - xo_emit(", expire=%s{e:expires_sec/%d}", + xo_emit(", expire={:expires/%s}{e:expires_sec/%d}", sec2str(expire_in), expire_in); else xo_emit(", expired{e:expires_sec/%d}", expire_in); From nobody Mon Jul 15 20:39:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNDZd38W0z5RcbH for ; Mon, 15 Jul 2024 20:39:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNDZd1Bvyz4j3r for ; Mon, 15 Jul 2024 20:39:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-706a1711ee5so3183665b3a.0 for ; Mon, 15 Jul 2024 13:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1721075959; x=1721680759; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EozCT/G+qHiCfkOJCIVheGyMLt1uyN/SsGhzb/hewYY=; b=QAka6FczISfIDb7rULCUzg7LBbIDIdFJo047OrssaQI3fzN0hTtitQKhXRV67NcgBF OfH60ZxbxnAnUUYSpjY7b2VkR/eNAMG98ZQdIIo6U9zNOMQoQNTAdzqTLQkpvkCrC191 6QJdIphfRprn3KyMpUkSWj2MnhI563vpN7zxRy6drOSmqi8qJaRFSqJdeYUZLiLR73ka 99USnOLJAZo+iZd3jQszT2DlYMZP2OFmVhy0N9ir36Kqv5leHens9n19jFiKsnDpiK/M corOSP5jEgiuXxmpXBA9zIBKpjDJtF8eAaGf0Bt8IamqJURiGtKGANopOEyth+N14ZWW p0ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721075959; x=1721680759; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EozCT/G+qHiCfkOJCIVheGyMLt1uyN/SsGhzb/hewYY=; b=mOAbNXRxrXsOf8+mzHj9DBVaoqI0bN56B7pBiNYAMYjjPRRaJiL9XMVFUwtoFN5uxu XcHMbsFUlzCJ9EXh2aDeQPqvfwbyzzPeuCSeLSgidTItxZ6VlsIdMomMr4X4GoZrDT3o BAc5ifDg+dfyBeOBpPAr2QdAl9HT8T8rBAKyKf9c4rI/hbqZz2pZMTA2Jv9e62Fths9j UnVmMjHPn16n6Pncs9ND2ODRJf0BsUU66roTeOJPRmWo6aNG2AI2YFaUTif81vj2ecHF Lqe5ADPi7H7mvyMcJ97pw8hgSdcyCdQfu0N7wm74w8zf4HBNM2lZAAs/uBGrV7eqMSY2 Ailg== X-Forwarded-Encrypted: i=1; AJvYcCXdzcTwa+xqBPEzjFJS7dzZ4OXVONrO7pBSfEDtcy0Aw4yIxxJHRYsFFVRgZVH3BZY5GRteRtozlvCwQCpLoKoDPobVKCYVNHE9q93ZpFw8Kw== X-Gm-Message-State: AOJu0YzN3f/k4IAkJ9eM0di0JjJYwlcx4PIELVltLj8r9GfHcVG0o9Rc 9SdcX2ot4tl42YlO8nCIk1Rlz8K/tn0pzP8tPtIhB84RIEtD/8TA03TUcaLsnI/kEwKDXsL0q/Z Oi7H5SFRqr3TJ94FLRnqLYBacCbKbcAXO43WuZw== X-Google-Smtp-Source: AGHT+IHY1iyZAUe6KJtPCTweyjkPmF4sOp4cDlRZOI3ZzFUMPOMgg2+F49xr89imsFigsyHJN7+Cy/caP1t8oM7mH/M= X-Received: by 2002:a05:6a00:3916:b0:706:6af8:e088 with SMTP id d2e1a72fcca58-70c1fb4a270mr281158b3a.3.1721075959420; Mon, 15 Jul 2024 13:39:19 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407151915.46FJFr7L039362@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 15 Jul 2024 14:39:07 -0600 Message-ID: Subject: Re: git: 9cc06bf7aa28 - main - amd64 GENERIC: Switch uart hints from "isa" to "acpi" To: John Baldwin Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000003177a1061d4f39af" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WNDZd1Bvyz4j3r --0000000000003177a1061d4f39af Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 15, 2024, 1:20=E2=80=AFPM John Baldwin wrote: > On 7/15/24 15:15, John Baldwin wrote: > > The branch main has been updated by jhb: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D9cc06bf7aa2846c35483de567779bb8= afc289f53 > > > > commit 9cc06bf7aa2846c35483de567779bb8afc289f53 > > Author: John Baldwin > > AuthorDate: 2024-07-15 19:14:01 +0000 > > Commit: John Baldwin > > CommitDate: 2024-07-15 19:15:29 +0000 > > > > amd64 GENERIC: Switch uart hints from "isa" to "acpi" > > > > This causes these hints to be only used to wire device unit number= s > > for serial ports enumerated by ACPI but will not create ISA device > > nodes if ACPI doesn't enumerate them. Note that IRQ hints are not > > used for wiring so have been removed. > > > > PR: 270707 > > Reported by: aixdroix_OSS@protonmail.com, Michael Dexter > > Reported by: mfw_burn@pm.me, Hannes Hfauswedell < > h2+fbsdports@fsfe.org> > > Reported by: Matthias Lanter > > Reported by: William Bulley > > Reviewed by: imp > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D45945 > > --- > > sys/amd64/conf/GENERIC.hints | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hint= s > > index 7c2a3f28b9ce..4f6121c7cf77 100644 > > --- a/sys/amd64/conf/GENERIC.hints > > +++ b/sys/amd64/conf/GENERIC.hints > > @@ -6,13 +6,11 @@ hint.psm.0.at=3D"atkbdc" > > hint.psm.0.irq=3D"12" > > hint.sc.0.at=3D"isa" > > hint.sc.0.flags=3D"0x100" > > -hint.uart.0.at=3D"isa" > > +hint.uart.0.at=3D"acpi" > > hint.uart.0.port=3D"0x3F8" > > hint.uart.0.flags=3D"0x10" > > -hint.uart.0.irq=3D"4" > > -hint.uart.1.at=3D"isa" > > +hint.uart.1.at=3D"acpi" > > hint.uart.1.port=3D"0x2F8" > > -hint.uart.1.irq=3D"3" > > hint.atrtc.0.at=3D"isa" > > hint.atrtc.0.port=3D"0x70" > > hint.atrtc.0.irq=3D"8" > > Warner would like to purge more of this file (almost all of it) which is > probably correct. Warner believes that the uart0 flags to set serial > console aren't needed for loaders from FreeBSD 9+ due to the hw.uart.* > tunables modern loaders set. I'm less certain about hints for "fixed" > devices such as attimer0, atrtc0, and atkbdc0. I feel like some systems > have failed to enumerate those in the past, though such systems may be > i386-only. The sc0 hints I think can go away once we fully deprecate > sc(4) in favor of only vt(4). > atkbdc likely needs to go. Legacy free systems don't have it and I've helped at least one person in the past whose system hung after accessing ports 60 and 61. attimer is unused on modern systems that have several other options. It likely can go. atrtc isn't needed for uefi, since efirt can get the time much faster. I think it is in acpi but I'm not entirely sure. Sc is unused by and large and is set for removal :) people using it may have to take extra actions... I've chosen to leave i386 alone as there's still some ancient i386 cruft, > but on amd64 we have a higher bar (e.g. ACPI is de facto required for > amd64). Also, i386 kernels have one foot in the grave already. > > This commit is also somewhat narrow in scope as I plan to merge it back > to 13 and 14. > Sounds like a plan. We have time. Warner --=20 > John Baldwin > > --0000000000003177a1061d4f39af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jul 15, 2024, 1:20=E2=80=AFPM John Baldwin <= ;jhb@freebsd.org> wrote:
On 7/15/24 15:15, John Baldwin wrote:
> The branch main has been updated by jhb:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D9cc06bf7aa2846c35483de567779bb= 8afc289f53
>
> commit 9cc06bf7aa2846c35483de567779bb8afc289f53
> Author:=C2=A0 =C2=A0 =C2=A0John Baldwin <jhb@FreeBSD.org>
> AuthorDate: 2024-07-15 19:14:01 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0John Baldwin <jhb@FreeBSD.org>
> CommitDate: 2024-07-15 19:15:29 +0000
>
>=C2=A0 =C2=A0 =C2=A0 amd64 GENERIC: Switch uart hints from "isa&qu= ot; to "acpi"
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 This causes these hints to be only used to wire de= vice unit numbers
>=C2=A0 =C2=A0 =C2=A0 for serial ports enumerated by ACPI but will not c= reate ISA device
>=C2=A0 =C2=A0 =C2=A0 nodes if ACPI doesn't enumerate them.=C2=A0 No= te that IRQ hints are not
>=C2=A0 =C2=A0 =C2=A0 used for wiring so have been removed.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0270707
>=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 aixdroix_OSS@pr= otonmail.com, Michael Dexter
>=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 mfw_burn@pm.me, Hannes H= fauswedell <h2+fbsdports@fsfe.org>
>=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 Matthias Lanter <fr= eebsd@lanter-it.ch>
>=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 William Bulley <web@umich.= edu>
>=C2=A0 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 imp
>=C2=A0 =C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 1 week
>=C2=A0 =C2=A0 =C2=A0 Differential Revision:=C2=A0 h= ttps://reviews.freebsd.org/D45945
> ---
>=C2=A0 =C2=A0sys/amd64/conf/GENERIC.hints | 6 ++----
>=C2=A0 =C2=A01 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hin= ts
> index 7c2a3f28b9ce..4f6121c7cf77 100644
> --- a/sys/amd64/conf/GENERIC.hints
> +++ b/sys/amd64/conf/GENERIC.hints
> @@ -6,13 +6,11 @@ hint.psm.0.at=3D"atkbdc"
>=C2=A0 =C2=A0hint.psm.0.irq=3D"12"
>=C2=A0 =C2=A0hint.sc.0.at=3D"isa"
>=C2=A0 =C2=A0hint.sc.0.flags=3D"0x100"
> -hint.uart.0.at=3D"isa"
> +hint.uart.0.at=3D"acpi"
>=C2=A0 =C2=A0hint.uart.0.port=3D"0x3F8"
>=C2=A0 =C2=A0hint.uart.0.flags=3D"0x10"
> -hint.uart.0.irq=3D"4"
> -hint.uart.1.at=3D"isa"
> +hint.uart.1.at=3D"acpi"
>=C2=A0 =C2=A0hint.uart.1.port=3D"0x2F8"
> -hint.uart.1.irq=3D"3"
>=C2=A0 =C2=A0hint.atrtc.0.at=3D"isa"
>=C2=A0 =C2=A0hint.atrtc.0.port=3D"0x70"
>=C2=A0 =C2=A0hint.atrtc.0.irq=3D"8"

Warner would like to purge more of this file (almost all of it) which is probably correct.=C2=A0 Warner believes that the uart0 flags to set serial<= br> console aren't needed for loaders from FreeBSD 9+ due to the hw.uart.*<= br> tunables modern loaders set.=C2=A0 I'm less certain about hints for &qu= ot;fixed"
devices such as attimer0, atrtc0, and atkbdc0.=C2=A0 I feel like some syste= ms
have failed to enumerate those in the past, though such systems may be
i386-only.=C2=A0 The sc0 hints I think can go away once we fully deprecate<= br> sc(4) in favor of only vt(4).

atkbdc likely needs to go. Legacy free systems= don't have it and I've helped at least one person in the past whos= e system hung after accessing ports 60 and 61.

<= /div>
attimer is unused on modern systems that have severa= l other options. It likely can go.

atrtc isn't needed for uefi, since efirt can get the time mu= ch faster. I think it is in acpi but I'm not entirely sure.

Sc is unused by and large and is se= t for removal :)=C2=A0 people using it may have to take extra actions...

I've chosen to leave i386 alone as there's still some ancient i386 = cruft,
but on amd64 we have a higher bar (e.g. ACPI is de facto required for
amd64).=C2=A0 Also, i386 kernels have one foot in the grave already.

This commit is also somewhat narrow in scope as I plan to merge it back
to 13 and 14.

Sounds like a plan. We have time.

<= /div>
Warner

--
John Baldwin

--0000000000003177a1061d4f39af-- From nobody Mon Jul 15 22:44:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNHLk0HGsz5QLPb; Mon, 15 Jul 2024 22:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNHLj6n70z43B1; Mon, 15 Jul 2024 22:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721083454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gz0o6St523a/33lZqGhCG90oGDP7ow1EtyFZmQS2FI=; b=vkxXLWDPpv9R8rulD+SY6J4cUOK0jZbZm9xoDblAZDori0HBHakp0OcECjr2lly2owEwg2 CKAx0j6DgnVdK+xT2r9h8P5LkJg3OtQnobZVyIuFAQ0hlOPupr10C4wyYfYioNf+v39Q7E eQTyfcHnlGgzxBwTBn4lAd83lIEWciQm8Um+8Mz1V2Xc/Qejeoq4KQVAAxTdEBwLH3F9hy GwhXDe6k4AEcyQWLYEMnSRAtd6ZbhpeN0AsPkkRIUUvecBxv5S1zcs8yfZBGrSMmGfbUHH u/DvOqFd4Hz+Y/mTMwS7xIhd/DpM27mQ4phJ1cCWWuaIVtaD8K4Uh4ipIw+SGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721083454; a=rsa-sha256; cv=none; b=ll5a9frL4rFiSPz588xkLDiQiCimCg9MMRMKVEnA/f2eWHGZEwbamNDcaBKt6qE5L2O1a1 Cg+QeDYBoWbGPuHGMZOhjDXKRY3XYxbwGKKHFsl05nBCG5NxWHRkTBTbdKCtsvy5X8Vuyh GV9474Wk+kQY/I3+w6RbgBhP7+WPmH+YE9htSM63AurRK4DbrbNvayMVA9UCHyqhJIzgYq ccwb/WT8rGfEu81PFXItdKIIMa27zZ8pLkn2nPrcCom7F3TkTCnWMb1BVgFO+7jgS2Km51 gb/dCZH/UXkXgXe5WeMqj3aLNLm8c+D7UgY06giIEWFbFKmhhjWKsJ+lzNnhIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721083454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gz0o6St523a/33lZqGhCG90oGDP7ow1EtyFZmQS2FI=; b=hcrAOX5/m071CN3wL8MDBJn1KcERv5xj3HHEeX5JpVcPLB4o1O5Aw6vz72+P+lhoqC/r5B aEJio80aLoDevMPgTb/lpCohyRW7U0ibJCQrcRIclKrEGMdFhD5xFMmDfnBA8NDbz95TVV JriTEfexor5Fholx9BGdlJ8Lz16QxtXe5ss2P69nnlebh8Zd48wzyQggf5hRcEBgzmiGde p2gqHDWfMgd7z+0o2f0aVrb5Lj40Y/yLHALdikyx4WeMj2LPDS78k3UPlqrCHMs1hzYOIr 6Wnqfgw5hO0Bj18hX9R3axvWNqhyAaL4br5MFy53IxUOyhqNk/ITt2D5H/sUlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNHLj6MwGz19k4; Mon, 15 Jul 2024 22:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FMiDt9093865; Mon, 15 Jul 2024 22:44:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FMiDZG093862; Mon, 15 Jul 2024 22:44:13 GMT (envelope-from git) Date: Mon, 15 Jul 2024 22:44:13 GMT Message-Id: <202407152244.46FMiDZG093862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e9ac41698b2f - main - Remove residual blank line at start of Makefile List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9ac41698b2f322d55ccf9da50a3596edb2c1800 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800 commit e9ac41698b2f322d55ccf9da50a3596edb2c1800 Author: Warner Losh AuthorDate: 2024-07-15 04:46:32 +0000 Commit: Warner Losh CommitDate: 2024-07-15 22:43:39 +0000 Remove residual blank line at start of Makefile This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix --- Makefile.libcompat | 1 - bin/Makefile | 1 - bin/Makefile.inc | 1 - bin/cat/Makefile | 1 - bin/cat/tests/Makefile | 1 - bin/chflags/Makefile | 1 - bin/chflags/tests/Makefile | 1 - bin/chio/Makefile | 1 - bin/chmod/Makefile | 1 - bin/chmod/tests/Makefile | 1 - bin/cp/Makefile | 1 - bin/cp/tests/Makefile | 1 - bin/cpuset/Makefile | 1 - bin/date/Makefile | 1 - bin/date/tests/Makefile | 1 - bin/dd/Makefile | 1 - bin/dd/tests/Makefile | 1 - bin/df/Makefile | 1 - bin/domainname/Makefile | 1 - bin/echo/Makefile | 1 - bin/echo/tests/Makefile | 1 - bin/ed/Makefile | 1 - bin/ed/test/Makefile | 1 - bin/expr/Makefile | 1 - bin/expr/tests/Makefile | 1 - bin/freebsd-version/Makefile | 1 - bin/getfacl/Makefile | 1 - bin/kenv/Makefile | 1 - bin/kill/Makefile | 1 - bin/ln/Makefile | 1 - bin/ln/tests/Makefile | 1 - bin/ls/Makefile | 1 - bin/ls/tests/Makefile | 1 - bin/mkdir/Makefile | 1 - bin/mkdir/tests/Makefile | 1 - bin/mv/Makefile | 1 - bin/mv/tests/Makefile | 1 - bin/pax/Makefile | 1 - bin/pax/tests/Makefile | 1 - bin/pkill/tests/Makefile | 1 - bin/ps/Makefile | 1 - bin/pwait/Makefile | 1 - bin/pwait/tests/Makefile | 1 - bin/pwd/Makefile | 1 - bin/realpath/Makefile | 1 - bin/rm/Makefile | 1 - bin/rm/tests/Makefile | 1 - bin/rmail/Makefile | 1 - bin/rmdir/Makefile | 1 - bin/rmdir/tests/Makefile | 1 - bin/setfacl/Makefile | 1 - bin/sh/Makefile | 1 - bin/sh/tests/Makefile | 1 - bin/sh/tests/builtins/Makefile | 1 - bin/sh/tests/errors/Makefile | 1 - bin/sh/tests/execution/Makefile | 1 - bin/sh/tests/expansion/Makefile | 1 - bin/sh/tests/invocation/Makefile | 1 - bin/sh/tests/parameters/Makefile | 1 - bin/sh/tests/parser/Makefile | 1 - bin/sh/tests/set-e/Makefile | 1 - bin/sleep/Makefile | 1 - bin/sleep/tests/Makefile | 1 - bin/stty/Makefile | 1 - bin/sync/Makefile | 1 - bin/test/Makefile | 1 - bin/test/tests/Makefile | 1 - bin/tests/Makefile | 1 - bin/timeout/Makefile | 1 - bin/timeout/tests/Makefile | 1 - bin/uuidgen/Makefile | 1 - cddl/Makefile | 1 - cddl/Makefile.inc | 1 - cddl/lib/Makefile | 1 - cddl/lib/Makefile.inc | 1 - cddl/lib/drti/Makefile | 1 - cddl/lib/libavl/Makefile | 1 - cddl/lib/libctf/Makefile | 1 - cddl/lib/libdtrace/Makefile | 1 - cddl/lib/libicp/Makefile | 1 - cddl/lib/libicp_rescue/Makefile | 1 - cddl/lib/libnvpair/Makefile | 1 - cddl/lib/libspl/Makefile | 1 - cddl/lib/libtpool/Makefile | 1 - cddl/lib/libumem/Makefile | 1 - cddl/lib/libuutil/Makefile | 1 - cddl/lib/libzfs/Makefile | 1 - cddl/lib/libzfs_core/Makefile | 1 - cddl/lib/libzfsbootenv/Makefile | 1 - cddl/lib/libzpool/Makefile | 1 - cddl/lib/libzutil/Makefile | 1 - cddl/lib/tests/Makefile | 1 - cddl/sbin/Makefile | 1 - cddl/sbin/Makefile.inc | 1 - cddl/sbin/tests/Makefile | 1 - cddl/sbin/zfs/Makefile | 1 - cddl/sbin/zpool/Makefile | 1 - cddl/share/Makefile | 1 - cddl/share/zfs/Makefile | 1 - cddl/share/zfs/compatibility.d/Makefile | 1 - cddl/tests/Makefile | 1 - cddl/usr.bin/Makefile | 1 - cddl/usr.bin/Makefile.inc | 1 - cddl/usr.bin/ctfconvert/Makefile | 1 - cddl/usr.bin/ctfconvert/tests/Makefile | 1 - cddl/usr.bin/ctfdump/Makefile | 1 - cddl/usr.bin/ctfmerge/Makefile | 1 - cddl/usr.bin/tests/Makefile | 1 - cddl/usr.bin/zinject/Makefile | 1 - cddl/usr.bin/zstream/Makefile | 1 - cddl/usr.bin/ztest/Makefile | 1 - cddl/usr.bin/ztest/tests/Makefile | 1 - cddl/usr.libexec/Makefile | 1 - cddl/usr.libexec/zfs_prepare_disk/Makefile | 1 - cddl/usr.libexec/zpool_influxdb/Makefile | 1 - cddl/usr.sbin/Makefile | 1 - cddl/usr.sbin/Makefile.inc | 1 - cddl/usr.sbin/dtrace/Makefile | 1 - cddl/usr.sbin/dtrace/tests/Makefile | 1 - cddl/usr.sbin/dtrace/tests/amd64/Makefile | 1 - cddl/usr.sbin/dtrace/tests/common/Makefile | 1 - cddl/usr.sbin/dtrace/tests/i386/Makefile | 1 - cddl/usr.sbin/dwatch/Makefile | 1 - cddl/usr.sbin/dwatch/examples/Makefile | 1 - cddl/usr.sbin/dwatch/libexec/Makefile | 1 - cddl/usr.sbin/lockstat/Makefile | 1 - cddl/usr.sbin/plockstat/Makefile | 1 - cddl/usr.sbin/tests/Makefile | 1 - cddl/usr.sbin/zdb/Makefile | 1 - cddl/usr.sbin/zfsd/Makefile | 1 - cddl/usr.sbin/zfsd/Makefile.common | 1 - cddl/usr.sbin/zfsd/tests/Makefile | 1 - cddl/usr.sbin/zhack/Makefile | 1 - contrib/elftoolchain/nm/Makefile | 1 - contrib/file/python/Makefile.am | 1 - contrib/sqlite3/Makefile.am | 1 - crypto/heimdal/base/Makefile.am | 1 - etc/Makefile | 1 - etc/gss/Makefile | 1 - etc/sendmail/Makefile | 1 - gnu/Makefile | 1 - gnu/Makefile.inc | 1 - gnu/lib/Makefile | 1 - gnu/lib/Makefile.inc | 1 - gnu/lib/libdialog/Makefile | 1 - gnu/lib/tests/Makefile | 1 - gnu/tests/Makefile | 1 - gnu/usr.bin/Makefile | 1 - gnu/usr.bin/Makefile.inc | 1 - gnu/usr.bin/dialog/Makefile | 1 - gnu/usr.bin/diff3/Makefile | 1 - gnu/usr.bin/tests/Makefile | 1 - include/arpa/Makefile | 1 - include/gssapi/Makefile | 1 - include/protocols/Makefile | 1 - include/rpc/Makefile | 1 - include/rpcsvc/Makefile | 1 - include/xlocale/Makefile | 1 - kerberos5/Makefile | 1 - kerberos5/Makefile.inc | 1 - kerberos5/lib/Makefile | 1 - kerberos5/lib/Makefile.inc | 1 - kerberos5/lib/libasn1/Makefile | 1 - kerberos5/lib/libgssapi_krb5/Makefile | 1 - kerberos5/lib/libgssapi_ntlm/Makefile | 1 - kerberos5/lib/libgssapi_spnego/Makefile | 1 - kerberos5/lib/libhdb/Makefile | 1 - kerberos5/lib/libheimbase/Makefile | 1 - kerberos5/lib/libheimipcc/Makefile | 1 - kerberos5/lib/libheimipcs/Makefile | 1 - kerberos5/lib/libheimntlm/Makefile | 1 - kerberos5/lib/libhx509/Makefile | 1 - kerberos5/lib/libkadm5clnt/Makefile | 1 - kerberos5/lib/libkadm5srv/Makefile | 1 - kerberos5/lib/libkafs5/Makefile | 1 - kerberos5/lib/libkdc/Makefile | 1 - kerberos5/lib/libkrb5/Makefile | 1 - kerberos5/lib/libroken/Makefile | 1 - kerberos5/lib/libsl/Makefile | 1 - kerberos5/lib/libvers/Makefile | 1 - kerberos5/lib/libwind/Makefile | 1 - kerberos5/libexec/Makefile | 1 - kerberos5/libexec/Makefile.inc | 1 - kerberos5/libexec/digest-service/Makefile | 1 - kerberos5/libexec/hprop/Makefile | 1 - kerberos5/libexec/hpropd/Makefile | 1 - kerberos5/libexec/ipropd-master/Makefile | 1 - kerberos5/libexec/ipropd-slave/Makefile | 1 - kerberos5/libexec/kadmind/Makefile | 1 - kerberos5/libexec/kcm/Makefile | 1 - kerberos5/libexec/kdc/Makefile | 1 - kerberos5/libexec/kdigest/Makefile | 1 - kerberos5/libexec/kfd/Makefile | 1 - kerberos5/libexec/kimpersonate/Makefile | 1 - kerberos5/libexec/kpasswdd/Makefile | 1 - kerberos5/tools/Makefile | 1 - kerberos5/tools/Makefile.inc | 1 - kerberos5/tools/asn1_compile/Makefile | 1 - kerberos5/tools/make-roken/Makefile | 1 - kerberos5/tools/slc/Makefile | 1 - kerberos5/usr.bin/Makefile | 1 - kerberos5/usr.bin/Makefile.inc | 1 - kerberos5/usr.bin/hxtool/Makefile | 1 - kerberos5/usr.bin/kadmin/Makefile | 1 - kerberos5/usr.bin/kcc/Makefile | 1 - kerberos5/usr.bin/kdestroy/Makefile | 1 - kerberos5/usr.bin/kf/Makefile | 1 - kerberos5/usr.bin/kgetcred/Makefile | 1 - kerberos5/usr.bin/kinit/Makefile | 1 - kerberos5/usr.bin/kpasswd/Makefile | 1 - kerberos5/usr.bin/krb5-config/Makefile | 1 - kerberos5/usr.bin/ksu/Makefile | 1 - kerberos5/usr.bin/string2key/Makefile | 1 - kerberos5/usr.bin/verify_krb5_conf/Makefile | 1 - kerberos5/usr.sbin/Makefile | 1 - kerberos5/usr.sbin/Makefile.inc | 1 - kerberos5/usr.sbin/iprop-log/Makefile | 1 - kerberos5/usr.sbin/kstash/Makefile | 1 - kerberos5/usr.sbin/ktutil/Makefile | 1 - lib/Makefile | 1 - lib/atf/libatf-c++/Makefile.inc | 1 - lib/atf/libatf-c++/tests/Makefile | 1 - lib/atf/libatf-c++/tests/Makefile.inc | 1 - lib/atf/libatf-c++/tests/detail/Makefile | 1 - lib/atf/libatf-c/Makefile.inc | 1 - lib/atf/libatf-c/tests/Makefile | 1 - lib/atf/libatf-c/tests/Makefile.inc | 1 - lib/atf/libatf-c/tests/detail/Makefile | 1 - lib/atf/tests/Makefile | 1 - lib/atf/tests/test-programs/Makefile | 1 - lib/clang/Makefile | 1 - lib/clang/Makefile.inc | 1 - lib/clang/headers/Makefile | 1 - lib/clang/libclang/Makefile | 1 - lib/clang/libclangminimal/Makefile | 1 - lib/clang/liblldb/Makefile | 1 - lib/clang/libllvm/Makefile | 1 - lib/clang/libllvmminimal/Makefile | 1 - lib/csu/Makefile | 1 - lib/csu/aarch64/Makefile | 1 - lib/csu/amd64/Makefile | 1 - lib/csu/arm/Makefile | 1 - lib/csu/i386/Makefile | 1 - lib/csu/powerpc/Makefile | 1 - lib/csu/powerpc64/Makefile | 1 - lib/csu/riscv/Makefile | 1 - lib/csu/tests/Makefile | 1 - lib/csu/tests/Makefile.inc | 1 - lib/csu/tests/Makefile.tests | 1 - lib/csu/tests/dso/Makefile | 1 - lib/csu/tests/dynamic/Makefile | 1 - lib/csu/tests/dynamiclib/Makefile | 1 - lib/csu/tests/dynamicpie/Makefile | 1 - lib/csu/tests/static/Makefile | 1 - lib/flua/libjail/Makefile | 1 - lib/geom/Makefile | 1 - lib/geom/Makefile.classes | 1 - lib/geom/Makefile.inc | 1 - lib/geom/cache/Makefile | 1 - lib/geom/concat/Makefile | 1 - lib/geom/eli/Makefile | 1 - lib/geom/journal/Makefile | 1 - lib/geom/label/Makefile | 1 - lib/geom/mirror/Makefile | 1 - lib/geom/mountver/Makefile | 1 - lib/geom/multipath/Makefile | 1 - lib/geom/nop/Makefile | 1 - lib/geom/part/Makefile | 1 - lib/geom/raid/Makefile | 1 - lib/geom/raid3/Makefile | 1 - lib/geom/shsec/Makefile | 1 - lib/geom/stripe/Makefile | 1 - lib/geom/union/Makefile | 1 - lib/geom/virstor/Makefile | 1 - lib/googletest/Makefile | 1 - lib/googletest/Makefile.inc | 1 - lib/googletest/gmock/Makefile | 1 - lib/googletest/gmock/Makefile.inc | 1 - lib/googletest/gmock_main/Makefile | 1 - lib/googletest/gmock_main/Makefile.inc | 1 - lib/googletest/gtest/Makefile | 1 - lib/googletest/gtest/Makefile.inc | 1 - lib/googletest/gtest_main/Makefile | 1 - lib/googletest/gtest_main/Makefile.inc | 1 - lib/googletest/tests/Makefile | 1 - lib/googletest/tests/Makefile.inc | 1 - lib/googletest/tests/gmock/Makefile | 1 - lib/googletest/tests/gmock_main/Makefile | 1 - lib/googletest/tests/gtest/Makefile | 1 - lib/googletest/tests/gtest_main/Makefile | 1 - lib/lib80211/Makefile | 1 - lib/lib9p/Makefile | 1 - lib/libalias/Makefile | 1 - lib/libalias/Makefile.inc | 1 - lib/libalias/libalias/Makefile | 1 - lib/libalias/modules/Makefile | 1 - lib/libalias/modules/Makefile.inc | 1 - lib/libalias/modules/dummy/Makefile | 1 - lib/libalias/modules/ftp/Makefile | 1 - lib/libalias/modules/irc/Makefile | 1 - lib/libalias/modules/nbt/Makefile | 1 - lib/libalias/modules/pptp/Makefile | 1 - lib/libalias/modules/skinny/Makefile | 1 - lib/libalias/modules/smedia/Makefile | 1 - lib/libbe/Makefile | 1 - lib/libbe/tests/Makefile | 1 - lib/libbearssl/Makefile | 1 - lib/libbearssl/Makefile.inc | 1 - lib/libbearssl/Makefile.libsa.inc | 1 - lib/libbegemot/Makefile | 1 - lib/libblacklist/Makefile | 1 - lib/libblocksruntime/Makefile | 1 - lib/libbsdstat/Makefile | 1 - lib/libbsnmp/Makefile | 1 - lib/libbsnmp/Makefile.inc | 1 - lib/libbsnmp/tests/Makefile | 1 - lib/libbz2/Makefile | 1 - lib/libc++/Makefile | 1 - lib/libc++experimental/Makefile | 1 - lib/libc/Makefile | 1 - lib/libc/aarch64/gen/Makefile.inc | 1 - lib/libc/amd64/gen/Makefile.inc | 1 - lib/libc/amd64/stdlib/Makefile.inc | 1 - lib/libc/arm/aeabi/Makefile.inc | 1 - lib/libc/arm/gen/Makefile.inc | 1 - lib/libc/arm/string/Makefile.inc | 1 - lib/libc/capability/Makefile.inc | 1 - lib/libc/compat-43/Makefile.inc | 1 - lib/libc/db/btree/Makefile.inc | 1 - lib/libc/db/db/Makefile.inc | 1 - lib/libc/db/hash/Makefile.inc | 1 - lib/libc/db/man/Makefile.inc | 1 - lib/libc/db/mpool/Makefile.inc | 1 - lib/libc/db/recno/Makefile.inc | 1 - lib/libc/db/test/Makefile | 1 - lib/libc/gdtoa/Makefile.inc | 1 - lib/libc/gen/Makefile.inc | 1 - lib/libc/gmon/Makefile.inc | 1 - lib/libc/i386/Makefile.inc | 1 - lib/libc/i386/gen/Makefile.inc | 1 - lib/libc/i386/stdlib/Makefile.inc | 1 - lib/libc/i386/string/Makefile.inc | 1 - lib/libc/iconv/Makefile.inc | 1 - lib/libc/inet/Makefile.inc | 1 - lib/libc/isc/Makefile.inc | 1 - lib/libc/locale/Makefile.inc | 1 - lib/libc/md/Makefile.inc | 1 - lib/libc/nameser/Makefile.inc | 1 - lib/libc/net/Makefile.inc | 1 - lib/libc/posix1e/Makefile.inc | 1 - lib/libc/powerpc/Makefile.inc | 1 - lib/libc/powerpc/gen/Makefile.common | 1 - lib/libc/powerpc/gen/Makefile.inc | 1 - lib/libc/powerpc64/Makefile.inc | 1 - lib/libc/powerpc64/gen/Makefile.inc | 1 - lib/libc/powerpc64/string/Makefile.inc | 1 - lib/libc/powerpcspe/Makefile.inc | 1 - lib/libc/powerpcspe/gen/Makefile.inc | 1 - lib/libc/quad/Makefile.inc | 1 - lib/libc/quad/TESTS/Makefile | 1 - lib/libc/regex/Makefile.inc | 1 - lib/libc/resolv/Makefile.inc | 1 - lib/libc/riscv/gen/Makefile.inc | 1 - lib/libc/rpc/Makefile.inc | 1 - lib/libc/stdio/Makefile.inc | 1 - lib/libc/stdlib/Makefile.inc | 1 - lib/libc/string/Makefile.inc | 1 - lib/libc/tests/Makefile | 1 - lib/libc/tests/Makefile.netbsd-tests | 1 - lib/libc/tests/c063/Makefile | 1 - lib/libc/tests/db/Makefile | 1 - lib/libc/tests/gen/Makefile | 1 - lib/libc/tests/gen/execve/Makefile | 1 - lib/libc/tests/gen/posix_spawn/Makefile | 1 - lib/libc/tests/hash/Makefile | 1 - lib/libc/tests/iconv/Makefile | 1 - lib/libc/tests/inet/Makefile | 1 - lib/libc/tests/locale/Makefile | 1 - lib/libc/tests/net/Makefile | 1 - lib/libc/tests/net/getaddrinfo/Makefile | 1 - lib/libc/tests/nss/Makefile | 1 - lib/libc/tests/regex/Makefile | 1 - lib/libc/tests/regex/Makefile.inc | 1 - lib/libc/tests/resolv/Makefile | 1 - lib/libc/tests/rpc/Makefile | 1 - lib/libc/tests/setjmp/Makefile | 1 - lib/libc/tests/ssp/Makefile | 1 - lib/libc/tests/stdio/Makefile | 1 - lib/libc/tests/stdlib/Makefile | 1 - lib/libc/tests/stdlib/dynthr_mod/Makefile | 1 - lib/libc/tests/string/Makefile | 1 - lib/libc/tests/sys/Makefile | 1 - lib/libc/tests/termios/Makefile | 1 - lib/libc/tests/time/Makefile | 1 - lib/libc/tests/tls/Makefile | 1 - lib/libc/tests/tls/dso/Makefile | 1 - lib/libc/tests/tls_dso/Makefile | 1 - lib/libc/tests/ttyio/Makefile | 1 - lib/libc/uuid/Makefile.inc | 1 - lib/libc/x86/gen/Makefile.inc | 1 - lib/libc/xdr/Makefile.inc | 1 - lib/libc/yp/Makefile.inc | 1 - lib/libc_nonshared/Makefile | 1 - lib/libc_nonshared/Makefile.iconv | 1 - lib/libcalendar/Makefile | 1 - lib/libcam/Makefile | 1 - lib/libcam/tests/Makefile | 1 - lib/libcapsicum/Makefile | 1 - lib/libcasper/Makefile | 1 - lib/libcasper/Makefile.inc | 1 - lib/libcasper/libcasper/Makefile | 1 - lib/libcasper/services/Makefile | 1 - lib/libcasper/services/Makefile.inc | 1 - lib/libcasper/services/cap_dns/Makefile | 1 - lib/libcasper/services/cap_dns/tests/Makefile | 1 - lib/libcasper/services/cap_fileargs/Makefile | 1 - lib/libcasper/services/cap_fileargs/tests/Makefile | 1 - lib/libcasper/services/cap_grp/Makefile | 1 - lib/libcasper/services/cap_grp/tests/Makefile | 1 - lib/libcasper/services/cap_net/Makefile | 1 - lib/libcasper/services/cap_net/tests/Makefile | 1 - lib/libcasper/services/cap_netdb/Makefile | 1 - lib/libcasper/services/cap_netdb/tests/Makefile | 1 - lib/libcasper/services/cap_pwd/Makefile | 1 - lib/libcasper/services/cap_pwd/tests/Makefile | 1 - lib/libcasper/services/cap_sysctl/Makefile | 1 - lib/libcasper/services/cap_sysctl/tests/Makefile | 1 - lib/libcasper/services/cap_syslog/Makefile | 1 - lib/libcasper/services/tests/Makefile | 1 - lib/libcasper/tests/Makefile | 1 - lib/libcbor/Makefile | 1 - lib/libclang_rt/Makefile | 1 - lib/libclang_rt/Makefile.inc | 1 - lib/libclang_rt/asan-preinit/Makefile | 1 - lib/libclang_rt/asan/Makefile | 1 - lib/libclang_rt/asan_cxx/Makefile | 1 - lib/libclang_rt/asan_dynamic/Makefile | 1 - lib/libclang_rt/asan_static/Makefile | 1 - lib/libclang_rt/cfi/Makefile | 1 - lib/libclang_rt/cfi_diag/Makefile | 1 - lib/libclang_rt/dd/Makefile | 1 - lib/libclang_rt/fuzzer/Makefile | 1 - lib/libclang_rt/fuzzer_interceptors/Makefile | 1 - lib/libclang_rt/fuzzer_no_main/Makefile | 1 - lib/libclang_rt/include/Makefile | 1 - lib/libclang_rt/msan/Makefile | 1 - lib/libclang_rt/msan_cxx/Makefile | 1 - lib/libclang_rt/profile/Makefile | 1 - lib/libclang_rt/safestack/Makefile | 1 - lib/libclang_rt/stats/Makefile | 1 - lib/libclang_rt/stats_client/Makefile | 1 - lib/libclang_rt/tsan/Makefile | 1 - lib/libclang_rt/tsan_cxx/Makefile | 1 - lib/libclang_rt/ubsan_minimal/Makefile | 1 - lib/libclang_rt/ubsan_standalone/Makefile | 1 - lib/libclang_rt/ubsan_standalone_cxx/Makefile | 1 - lib/libclang_rt/xray-basic/Makefile | 1 - lib/libclang_rt/xray-fdr/Makefile | 1 - lib/libclang_rt/xray-profiling/Makefile | 1 - lib/libclang_rt/xray/Makefile | 1 - lib/libcom_err/Makefile | 1 - lib/libcompat/Makefile | 1 - lib/libcompiler_rt/Makefile | 1 - lib/libcrypt/tests/Makefile | 1 - lib/libdevctl/Makefile | 1 - lib/libdevdctl/Makefile | 1 - lib/libdevdctl/tests/Makefile | 1 - lib/libdevinfo/Makefile | 1 - lib/libdevstat/Makefile | 1 - lib/libdl/Makefile | 1 - lib/libdpv/Makefile | 1 - lib/libedit/readline/Makefile | 1 - lib/libelf/Makefile | 1 - lib/libevent1/Makefile | 1 - lib/libexecinfo/Makefile | 1 - lib/libexecinfo/tests/Makefile | 1 - lib/libexpat/Makefile | 1 - lib/libfetch/Makefile | 1 - lib/libfigpar/Makefile | 1 - lib/libgcc_eh/Makefile | 1 - lib/libgcc_eh/Makefile.inc | 1 - lib/libgcc_s/Makefile | 1 - lib/libgeom/Makefile | 1 - lib/libgpio/Makefile | 1 - lib/libgssapi/Makefile | 1 - lib/libiconv_modules/BIG5/Makefile | 1 - lib/libiconv_modules/DECHanyu/Makefile | 1 - lib/libiconv_modules/EUC/Makefile | 1 - lib/libiconv_modules/EUCTW/Makefile | 1 - lib/libiconv_modules/GBK2K/Makefile | 1 - lib/libiconv_modules/HZ/Makefile | 1 - lib/libiconv_modules/ISO2022/Makefile | 1 - lib/libiconv_modules/JOHAB/Makefile | 1 - lib/libiconv_modules/MSKanji/Makefile | 1 - lib/libiconv_modules/Makefile | 1 - lib/libiconv_modules/Makefile.inc | 1 - lib/libiconv_modules/UES/Makefile | 1 - lib/libiconv_modules/UTF1632/Makefile | 1 - lib/libiconv_modules/UTF7/Makefile | 1 - lib/libiconv_modules/UTF8/Makefile | 1 - lib/libiconv_modules/VIQR/Makefile | 1 - lib/libiconv_modules/ZW/Makefile | 1 - lib/libiconv_modules/iconv_none/Makefile | 1 - lib/libiconv_modules/iconv_std/Makefile | 1 - lib/libiconv_modules/mapper_646/Makefile | 1 - lib/libiconv_modules/mapper_none/Makefile | 1 - lib/libiconv_modules/mapper_parallel/Makefile | 1 - lib/libiconv_modules/mapper_serial/Makefile | 1 - lib/libiconv_modules/mapper_std/Makefile | 1 - lib/libiconv_modules/mapper_zone/Makefile | 1 - lib/libifconfig/Makefile | 1 - lib/libipt/Makefile | 1 - lib/libjail/Makefile | 1 - lib/libkiconv/Makefile | 1 - lib/libkvm/Makefile | 1 - lib/libkvm/tests/Makefile | 1 - lib/libldns/Makefile | 1 - lib/liblua/Makefile | 1 - lib/liblutok/Makefile | 1 - lib/liblzma/Makefile | 1 - lib/libmd/Makefile | 1 - lib/libmemstat/Makefile | 1 - lib/libmilter/Makefile | 1 - lib/libmixer/Makefile | 1 - lib/libmp/Makefile | 1 - lib/libmp/tests/Makefile | 1 - lib/libmt/Makefile | 1 - lib/libnetbsd/Makefile | 1 - lib/libnv/Makefile | 1 - lib/libnv/tests/Makefile | 1 - lib/libomp/Makefile | 1 - lib/libopenbsd/Makefile | 1 - lib/libopencsd/Makefile | 1 - lib/libpam/modules/Makefile.inc | 1 - lib/libpam/modules/pam_chroot/Makefile | 1 - lib/libpam/modules/pam_echo/Makefile | 1 - lib/libpam/modules/pam_exec/Makefile | 1 - lib/libpam/modules/pam_ftpusers/Makefile | 1 - lib/libpam/modules/pam_group/Makefile | 1 - lib/libpam/modules/pam_guest/Makefile | 1 - lib/libpam/modules/pam_passwdqc/Makefile | 1 - lib/libpam/modules/pam_rhosts/Makefile | 1 - lib/libpam/modules/pam_xdg/Makefile | 1 - lib/libpam/pam.d/Makefile | 1 - lib/libpathconv/Makefile | 1 - lib/libpathconv/tests/Makefile | 1 - lib/libpfctl/Makefile | 1 - lib/libpmc/Makefile | 1 - lib/libpmc/Makefile.inc | 1 - lib/libpmc/pmu-events/Makefile | 1 - lib/libproc/Makefile | 1 - lib/libproc/Makefile.inc | 1 - lib/libproc/tests/Makefile | 1 - lib/libprocstat/Makefile | 1 - lib/libprocstat/zfs/Makefile | 1 - lib/libregex/Makefile | 1 - lib/libregex/tests/Makefile | 1 - lib/librpcsec_gss/Makefile | 1 - lib/librpcsvc/Makefile | 1 - lib/librss/Makefile | 1 - lib/librt/tests/Makefile | 1 - lib/librtld_db/Makefile | 1 - lib/libsbuf/Makefile | 1 - lib/libsbuf/tests/Makefile | 1 - lib/libsecureboot/Makefile | 1 - lib/libsecureboot/Makefile.inc | 1 - lib/libsecureboot/Makefile.libsa.inc | 1 - lib/libsecureboot/openpgp/Makefile.inc | 1 - lib/libsecureboot/tests/Makefile | 1 - lib/libsm/Makefile | 1 - lib/libsmb/Makefile | 1 - lib/libsmdb/Makefile | 1 - lib/libsmutil/Makefile | 1 - lib/libsqlite3/Makefile | 1 - lib/libssp/Makefile | 1 - lib/libssp_nonshared/Makefile | 1 - lib/libstats/Makefile | 1 - lib/libstdbuf/Makefile | 1 - lib/libstdthreads/Makefile | 1 - lib/libsysdecode/Makefile | 1 - lib/libtelnet/Makefile | 1 - lib/libthr/Makefile | 1 - lib/libthr/arch/aarch64/Makefile.inc | 1 - lib/libthr/sys/Makefile.inc | 1 - lib/libthr/tests/Makefile | 1 - lib/libthr/tests/dlopen/Makefile | 1 - lib/libthr/tests/dlopen/dso/Makefile | 1 - lib/libthr/thread/Makefile.inc | 1 - lib/libthread_db/Makefile | 1 - lib/libucl/Makefile | 1 - lib/libufs/Makefile | 1 - lib/libugidfw/Makefile | 1 - lib/libulog/Makefile | 1 - lib/libunbound/Makefile | 1 - lib/libutil/Makefile | 1 - lib/libutil/tests/Makefile | 1 - lib/libveriexec/Makefile | 1 - lib/libxo/Makefile | 1 - lib/libxo/encoder/Makefile | 1 - lib/libxo/encoder/csv/Makefile | 1 - lib/libxo/libxo/Makefile | 1 - lib/libxo/tests/Makefile | 1 - lib/libxo/tests/encoder/Makefile | 1 - lib/liby/Makefile | 1 - lib/libypclnt/Makefile | 1 - lib/libzstd/Makefile | 1 - lib/msun/aarch64/Makefile.inc | 1 - lib/msun/amd64/Makefile.inc | 1 - lib/msun/arm/Makefile.inc | 1 - lib/msun/i387/Makefile.inc | 1 - lib/msun/powerpc/Makefile.inc | 1 - lib/msun/riscv/Makefile.inc | 1 - lib/msun/tests/Makefile | 1 - lib/ncurses/Makefile | 1 - lib/ncurses/Makefile.inc | 1 - lib/ncurses/form/Makefile | 1 - lib/ncurses/menu/Makefile | 1 - lib/ncurses/ncurses/Makefile | 1 - lib/ncurses/panel/Makefile | 1 - lib/ncurses/tinfo/Makefile | 1 - lib/ofed/Makefile | 1 - lib/ofed/Makefile.inc | 1 - lib/ofed/complib/Makefile | 1 - lib/ofed/include/Makefile | 1 - lib/ofed/libcxgb4/Makefile | 1 - lib/ofed/libibcm/Makefile | 1 - lib/ofed/libibmad/Makefile | 1 - lib/ofed/libibnetdisc/Makefile | 1 - lib/ofed/libibumad/Makefile | 1 - lib/ofed/libibverbs/Makefile | 1 - lib/ofed/libmlx4/Makefile | 1 - lib/ofed/libmlx5/Makefile | 1 - lib/ofed/libopensm/Makefile | 1 - lib/ofed/librdmacm/Makefile | 1 - lib/ofed/libvendor/Makefile | 1 - lib/tests/Makefile | 1 - libexec/Makefile.inc | 1 - libexec/atf/atf-check/Makefile.inc | 1 - libexec/atf/atf-check/tests/Makefile | 1 - libexec/atf/atf-sh/tests/Makefile | 1 - libexec/atf/tests/Makefile | 1 - libexec/atrun/Makefile | 1 - libexec/blacklistd-helper/Makefile | 1 - libexec/bootpd/Makefile.inc | 1 - libexec/comsat/Makefile | 1 - libexec/dma/Makefile | 1 - libexec/dma/Makefile.inc | 1 - libexec/dma/dma-mbox-create/Makefile | 1 - libexec/dma/dmagent/Makefile | 1 - libexec/fingerd/Makefile | 1 - libexec/flua/Makefile | 1 - libexec/ftpd/Makefile | 1 - libexec/getty/Makefile | 1 - libexec/hyperv/Makefile | 1 - libexec/mail.local/Makefile | 1 - libexec/makewhatis.local/Makefile | 1 - libexec/mknetid/Makefile | 1 - libexec/phttpget/Makefile | 1 - libexec/pppoed/Makefile | 1 - libexec/rbootd/Makefile | 1 - libexec/rc/Makefile | 1 - libexec/rc/rc.d/Makefile | 1 - libexec/revnetgroup/Makefile | 1 - libexec/rpc.rquotad/Makefile | 1 - libexec/rpc.rstatd/Makefile | 1 - libexec/rpc.rusersd/Makefile | 1 - libexec/rpc.rwalld/Makefile | 1 - libexec/rpc.sprayd/Makefile | 1 - libexec/rtld-elf/Makefile | 1 - libexec/rtld-elf/amd64/Makefile.inc | 1 - libexec/rtld-elf/arm/Makefile.inc | 1 - libexec/rtld-elf/i386/Makefile.inc | 1 - libexec/rtld-elf/powerpc64/Makefile.inc | 1 - libexec/rtld-elf/tests/Makefile | 1 - libexec/rtld-elf/tests/Makefile.inc | 1 - libexec/rtld-elf/tests/libdeep/Makefile | 1 - libexec/rtld-elf/tests/libpythagoras/Makefile | 1 - libexec/rtld-elf/tests/libval/Makefile | 1 - libexec/rtld-elf/tests/libval2/Makefile | 1 - libexec/rtld-elf/tests/rtld_deepbind/Makefile | 1 - libexec/rtld-elf/tests/target/Makefile | 1 - libexec/rtld-elf32/Makefile | 1 - libexec/save-entropy/Makefile | 1 - libexec/smrsh/Makefile | 1 - libexec/talkd/Makefile | 1 - libexec/tcpd/Makefile | 1 - libexec/tests/Makefile | 1 - libexec/tftp-proxy/Makefile | 1 - libexec/tftpd/Makefile | 1 - libexec/tftpd/tests/Makefile | 1 - libexec/ulog-helper/Makefile | 1 - libexec/ypxfr/Makefile | 1 - rescue/Makefile | 1 - rescue/rescue/Makefile | 1 - sbin/Makefile | 1 - sbin/Makefile.amd64 | 1 - sbin/Makefile.arm | 1 - sbin/Makefile.i386 | 1 - sbin/Makefile.inc | 1 - sbin/Makefile.powerpc64 | 1 - sbin/adjkerntz/Makefile | 1 - sbin/bectl/Makefile | 1 - sbin/bectl/tests/Makefile | 1 - sbin/bsdlabel/Makefile | 1 - sbin/camcontrol/Makefile | 1 - sbin/ccdconfig/Makefile | 1 - sbin/clri/Makefile | 1 - sbin/comcontrol/Makefile | 1 - sbin/conscontrol/Makefile | 1 - sbin/ddb/Makefile | 1 - sbin/decryptcore/Makefile | 1 - sbin/devd/Makefile | 1 - sbin/devd/tests/Makefile | 1 - sbin/devfs/Makefile | 1 - sbin/devmatch/Makefile | 1 - sbin/dhclient/tests/Makefile | 1 - sbin/dmesg/Makefile | 1 - sbin/dump/Makefile | 1 - sbin/dumpfs/Makefile | 1 - sbin/dumpon/Makefile | 1 - sbin/etherswitchcfg/Makefile | 1 - sbin/fdisk/Makefile | 1 - sbin/fsck_ffs/Makefile | 1 - sbin/geom/Makefile | 1 - sbin/ggate/Makefile | 1 - sbin/ggate/Makefile.inc | 1 - sbin/ggate/ggatec/Makefile | 1 - sbin/ggate/ggated/Makefile | 1 - sbin/ggate/ggatel/Makefile | 1 - sbin/growfs/tests/Makefile | 1 - sbin/gvinum/Makefile | 1 - sbin/hastctl/Makefile | 1 - sbin/hastd/Makefile | 1 - sbin/ifconfig/Makefile | 1 - sbin/ifconfig/tests/Makefile | 1 - sbin/init/Makefile | 1 - sbin/ipf/Makefile | 1 - sbin/ipf/Makefile.inc | 1 - sbin/ipf/ipf/Makefile | 1 - sbin/ipf/ipfs/Makefile | 1 - sbin/ipf/ipfstat/Makefile | 1 - sbin/ipf/ipftest/Makefile | 1 - sbin/ipf/ipmon/Makefile | 1 - sbin/ipf/ipnat/Makefile | 1 - sbin/ipf/ippool/Makefile | 1 - sbin/ipf/ipresend/Makefile | 1 - sbin/ipf/ipscan/Makefile | 1 - sbin/ipf/libipf/Makefile | 1 - sbin/ipfw/Makefile | 1 - sbin/ldconfig/Makefile | 1 - sbin/md5/Makefile | 1 - sbin/md5/tests/Makefile | 1 - sbin/mdconfig/Makefile | 1 - sbin/mdconfig/tests/Makefile | 1 - sbin/mdmfs/Makefile | 1 - sbin/mknod/Makefile | 1 - sbin/mksnap_ffs/Makefile | 1 - sbin/mount/Makefile | 1 - sbin/mount_cd9660/Makefile | 1 - sbin/mount_fusefs/Makefile | 1 - sbin/mount_nfs/Makefile | 1 - sbin/mount_nullfs/Makefile | 1 - sbin/mount_udf/Makefile | 1 - sbin/mount_unionfs/Makefile | 1 - sbin/natd/Makefile | 1 - sbin/newfs/Makefile | 1 - sbin/newfs_msdos/Makefile | 1 - sbin/nfsiod/Makefile | 1 - sbin/nos-tun/Makefile | 1 - sbin/nvmecontrol/modules/Makefile | 1 - sbin/nvmecontrol/modules/Makefile.inc | 1 - sbin/nvmecontrol/modules/intel/Makefile | 1 - sbin/nvmecontrol/modules/samsung/Makefile | 1 - sbin/nvmecontrol/modules/wdc/Makefile | 1 - sbin/nvmecontrol/tests/Makefile | 1 - sbin/pfctl/Makefile | 1 - sbin/pfctl/tests/Makefile | 1 - sbin/pfctl/tests/files/Makefile | 1 - sbin/pfilctl/Makefile | 1 - sbin/pflogd/Makefile | 1 - sbin/pflowctl/Makefile | 1 - sbin/ping/Makefile | 1 - sbin/ping/tests/Makefile | 1 - sbin/quotacheck/Makefile | 1 - sbin/reboot/Makefile | 1 - sbin/recoverdisk/Makefile | 1 - sbin/resolvconf/Makefile | 1 - sbin/restore/Makefile | 1 - sbin/route/Makefile | 1 - sbin/route/tests/Makefile | 1 - sbin/routed/Makefile.inc | 1 - sbin/savecore/Makefile | 1 - sbin/shutdown/Makefile | 1 - sbin/swapon/Makefile | 1 - sbin/sysctl/Makefile | 1 - sbin/sysctl/tests/Makefile | 1 - sbin/tests/Makefile | 1 - sbin/tunefs/Makefile | 1 - sbin/umount/Makefile | 1 - sbin/veriexec/Makefile | 1 - secure/Makefile | 1 - secure/Makefile.inc | 1 - secure/caroot/Makefile | 1 - secure/caroot/Makefile.inc | 1 - secure/caroot/trusted/Makefile | 1 - secure/caroot/untrusted/Makefile | 1 - secure/lib/Makefile | 1 - secure/lib/Makefile.inc | 1 - secure/lib/libcrypto/Makefile | 1 - secure/lib/libcrypto/Makefile.common | 1 - secure/lib/libcrypto/Makefile.inc | 1 - secure/lib/libcrypto/engines/Makefile | 1 - secure/lib/libcrypto/engines/Makefile.inc | 1 - secure/lib/libcrypto/engines/capi/Makefile | 1 - secure/lib/libcrypto/engines/devcrypto/Makefile | 1 - secure/lib/libcrypto/engines/loader_attic/Makefile | 1 - secure/lib/libcrypto/engines/padlock/Makefile | 1 - secure/lib/libcrypto/modules/Makefile | 1 - secure/lib/libcrypto/modules/Makefile.inc | 1 - secure/lib/libcrypto/modules/fips/Makefile | 1 - secure/lib/libcrypto/modules/legacy/Makefile | 1 - secure/lib/libssh/Makefile | 1 - secure/lib/libssl/Makefile | 1 - secure/lib/tests/Makefile | 1 - secure/libexec/Makefile | 1 - secure/libexec/Makefile.inc | 1 - secure/libexec/sftp-server/Makefile | 1 - secure/libexec/ssh-keysign/Makefile | 1 - secure/libexec/ssh-pkcs11-helper/Makefile | 1 - secure/libexec/tests/Makefile | 1 - secure/tests/Makefile | 1 - secure/usr.bin/Makefile | 1 - secure/usr.bin/Makefile.inc | 1 - secure/usr.bin/openssl/Makefile | 1 - secure/usr.bin/scp/Makefile | 1 - secure/usr.bin/sftp/Makefile | 1 - secure/usr.bin/ssh-add/Makefile | 1 - secure/usr.bin/ssh-agent/Makefile | 1 - secure/usr.bin/ssh-keygen/Makefile | 1 - secure/usr.bin/ssh-keyscan/Makefile | 1 - secure/usr.bin/ssh/Makefile | 1 - secure/usr.bin/tests/Makefile | 1 - secure/usr.sbin/Makefile | 1 - secure/usr.sbin/Makefile.inc | 1 - secure/usr.sbin/sshd/Makefile | 1 - secure/usr.sbin/tests/Makefile | 1 - share/Makefile | 1 - share/Makefile.inc | 1 - share/colldef/Makefile | 1 - share/ctypedef/Makefile | 1 - share/dict/Makefile | 1 - share/doc/IPv6/Makefile | 1 - share/doc/Makefile | 1 - share/doc/legal/Makefile | 1 - share/doc/legal/Makefile.armv7 | 1 - share/doc/legal/imx/Makefile | 1 - share/doc/legal/intel_ipw/Makefile | 1 - share/doc/legal/intel_iwi/Makefile | 1 - share/doc/legal/intel_iwlwififw/Makefile | 1 - share/doc/legal/intel_iwn/Makefile | 1 - share/doc/legal/intel_wpi/Makefile | 1 - share/doc/legal/realtek/Makefile | 1 - share/doc/llvm/Makefile | 1 - share/doc/llvm/clang/Makefile | 1 - share/doc/papers/Makefile | 1 - share/doc/papers/beyond4.3/Makefile | 1 - share/doc/papers/bufbio/Makefile | 1 - share/doc/papers/contents/Makefile | 1 - share/doc/papers/devfs/Makefile | 1 - share/doc/papers/diskperf/Makefile | 1 - share/doc/papers/fsinterface/Makefile | 1 - share/doc/papers/jail/Makefile | 1 - share/doc/papers/kernmalloc/Makefile | 1 - share/doc/papers/kerntune/Makefile | 1 - share/doc/papers/malloc/Makefile | 1 - share/doc/papers/newvm/Makefile | 1 - share/doc/papers/relengr/Makefile | 1 - share/doc/papers/sysperf/Makefile | 1 - share/doc/papers/timecounter/Makefile | 1 - share/doc/pjdfstest/Makefile | 1 - share/doc/psd/01.cacm/Makefile | 1 - share/doc/psd/02.implement/Makefile | 1 - share/doc/psd/03.iosys/Makefile | 1 - share/doc/psd/04.uprog/Makefile | 1 - share/doc/psd/05.sysman/Makefile | 1 - share/doc/psd/06.Clang/Makefile | 1 - share/doc/psd/12.make/Makefile | 1 - share/doc/psd/15.yacc/Makefile | 1 - share/doc/psd/16.lex/Makefile | 1 - share/doc/psd/17.m4/Makefile | 1 - share/doc/psd/18.gprof/Makefile | 1 - share/doc/psd/20.ipctut/Makefile | 1 - share/doc/psd/21.ipc/Makefile | 1 - share/doc/psd/22.rpcgen/Makefile | 1 - share/doc/psd/23.rpc/Makefile | 1 - share/doc/psd/24.xdr/Makefile | 1 - share/doc/psd/25.xdrrfc/Makefile | 1 - share/doc/psd/26.rpcrfc/Makefile | 1 - share/doc/psd/27.nfsrpc/Makefile | 1 - share/doc/psd/Makefile | 1 - share/doc/psd/contents/Makefile | 1 - share/doc/psd/title/Makefile | 1 - share/doc/smm/01.setup/Makefile | 1 - share/doc/smm/02.config/Makefile | 1 - share/doc/smm/03.fsck/Makefile | 1 - share/doc/smm/04.quotas/Makefile | 1 - share/doc/smm/05.fastfs/Makefile | 1 - share/doc/smm/06.nfs/Makefile | 1 - share/doc/smm/07.lpd/Makefile | 1 - share/doc/smm/08.sendmailop/Makefile | 1 - share/doc/smm/11.timedop/Makefile | 1 - share/doc/smm/12.timed/Makefile | 1 - share/doc/smm/18.net/Makefile | 1 - share/doc/smm/Makefile | 1 - share/doc/smm/contents/Makefile | 1 - share/doc/smm/title/Makefile | 1 - share/doc/usd/04.csh/Makefile | 1 - share/doc/usd/05.dc/Makefile | 1 - share/doc/usd/06.bc/Makefile | 1 - share/doc/usd/07.mail/Makefile | 1 - share/doc/usd/10.exref/Makefile | 1 - share/doc/usd/10.exref/Makefile.inc | 1 - share/doc/usd/10.exref/exref/Makefile | 1 - share/doc/usd/10.exref/summary/Makefile | 1 - share/doc/usd/11.vitut/Makefile | 1 - share/doc/usd/12.vi/Makefile | 1 - share/doc/usd/12.vi/Makefile.inc | 1 - share/doc/usd/12.vi/summary/Makefile | 1 - share/doc/usd/12.vi/vi/Makefile | 1 - share/doc/usd/12.vi/viapwh/Makefile | 1 - share/doc/usd/13.viref/Makefile | 1 - share/doc/usd/18.msdiffs/Makefile | 1 - share/doc/usd/19.memacros/Makefile | 1 - share/doc/usd/20.meref/Makefile | 1 - share/doc/usd/21.troff/Makefile | 1 - share/doc/usd/Makefile | 1 - share/doc/usd/contents/Makefile | 1 - share/doc/usd/title/Makefile | 1 - share/examples/FreeBSD_version/Makefile | 1 - share/examples/find_interface/Makefile | 1 - share/examples/hwpmc/Makefile | 1 - share/examples/ipfilter/Makefile | 1 - share/examples/kld/cdev/Makefile | 1 - share/examples/kld/dyn_sysctl/Makefile | 1 - share/examples/kld/firmware/Makefile | 1 - share/examples/kld/firmware/fwconsumer/Makefile | 1 - share/examples/kld/firmware/fwimage/Makefile | 1 - share/examples/kld/khelp/Makefile | 1 - share/examples/kld/random_adaptor/Makefile | 1 - share/examples/kld/syscall/Makefile | 1 - share/examples/libusb20/Makefile | 1 - share/examples/libvgl/Makefile | 1 - share/examples/perfmon/Makefile | 1 - share/examples/pf/Makefile | 1 - share/examples/scsi_target/Makefile | 1 - share/examples/smbfs/Makefile | 1 - share/examples/smbfs/print/Makefile | 1 - share/examples/tests/Makefile | 1 - share/examples/tests/tests/Makefile | 1 - share/examples/tests/tests/atf/Makefile | 1 - share/examples/tests/tests/plain/Makefile | 1 - share/examples/tests/tests/tap/Makefile | 1 - share/i18n/csmapper/Makefile.inc | 1 - share/i18n/esdb/Makefile.inc | 1 - share/keys/Makefile | 1 - share/keys/pkg/Makefile | 1 - share/keys/pkg/trusted/Makefile | 1 - share/man/Makefile | 1 - share/man/man1/Makefile | 1 - *** 30668 LINES SKIPPED *** From nobody Tue Jul 16 01:38:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNMCH67Mpz5QfH2; Tue, 16 Jul 2024 01:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNMCH5f08z4PRG; Tue, 16 Jul 2024 01:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721093883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I9Kn0W2ZNBseNffDE1hK3XXUkUZGX8YA4ivT8TTpQMI=; b=J5NE0zWQ+3o7CPoOwlVaAPCHwbZmqiTAgM72uHmRfGNKtykhbvr67v0moOzz9PUIQdsQa8 syEJR1m8V3KYhTjuppGjrgO6WxzuRkjmzS5tEDwsu1tgWBUe80FFtTyeUx5w2o/wTKxmrx 13VzzKm88ntT4Lcz8XeMxxKoqWKvhWeBbL96xZShdHaGgw64PQ5ajSW09SYmEK1CFDYb++ gVXxW7ST8sKAk6HvGBYwQ9y0Imv144yf/JzX3cU+z7gC1a09cBpzkKs3LLsBpLo7aDMkAQ A5svr/wfgJshY0vbEu1MTqU+5XrEua8/zBrjQbDj42XJ3Yrjj/lME20MZ2BpSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721093883; a=rsa-sha256; cv=none; b=SGcbVrLtJsWZ1B+yN05JQTFJLC9K8+KhoqpVjhebt1YB3lESeGI6PZmt6/Eoae43KD7AtU VS3uShfeiDfeu35yiMEoBxDUDkG8ZU8EMoUpZU8Q8sBm+Drw7g72eTr9GpsjtBdSnaIuAU zarV1P+VWxCv5gPHaiTpfnP9FIzpOZoxoC6zvwfY0SPWP0phbmnL3cHB4LoFGhzr4HhVLD t5L4iHlw6xpCbq7kjSgH6rts7PkuUjdvtDceDIIWT8ZWwIrl/ezWEGBKFLcqhbCZ8p4jf/ JLD0LYqxLjqAoKC3eJwcOSMTl7OPqrIbQ5DV3GA/b1tA52pWbEOTZ8QnD7BnbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721093883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I9Kn0W2ZNBseNffDE1hK3XXUkUZGX8YA4ivT8TTpQMI=; b=EPzpdLLVXL8SkEwxp45gjI16YxUxRp3lmq4gw16epD06LpNdpEvfQ9O85MCPBo60VYcEv0 dfAa8eIuzRj6F7Is+XsRRkHjzgiHgIH56IK53ZrDYz4ddddKzXPCHwDSku/wNdkX6Bk7st lybi7qj/DzpvK8LrhupYQC3sxgsACIEcinxd7y7atGWJi86nJ5zK+vtFT+WKFv+Cvtf55d pqu5Ogv5bAHL6d9+puMssC9MHLozNUOt381gqVAxCQe4txNoBZamqJtCUcz4hqy1NX/s7H 09QIZwp2nSj75O3OYmdqYRdTqeGDzyvskcc5NuTHA7LGbXGHRDEXWTSMygcxmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNMCH5BgnzGth; Tue, 16 Jul 2024 01:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G1c3f7081868; Tue, 16 Jul 2024 01:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G1c31B081865; Tue, 16 Jul 2024 01:38:03 GMT (envelope-from git) Date: Tue, 16 Jul 2024 01:38:03 GMT Message-Id: <202407160138.46G1c31B081865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a39decd73f82 - main - etcupdate: remove mergemaster cross-reference List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a39decd73f82c74cbe2cecb8f71ca5d3417e5978 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a39decd73f82c74cbe2cecb8f71ca5d3417e5978 commit a39decd73f82c74cbe2cecb8f71ca5d3417e5978 Author: Ed Maste AuthorDate: 2024-07-16 01:36:34 +0000 Commit: Ed Maste CommitDate: 2024-07-16 01:37:14 +0000 etcupdate: remove mergemaster cross-reference It will be retired soon. Sponsored by: The FreeBSD Foundation --- usr.sbin/etcupdate/etcupdate.8 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index 82c36fc9cb68..22d3d91bb6eb 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 9, 2022 +.Dd July 15, 2024 .Dt ETCUPDATE 8 .Os .Sh NAME @@ -894,7 +894,6 @@ but it has been removed in the destination directory. .Xr make 1 , .Xr newaliases 1 , .Xr sh 1 , -.Xr mergemaster 8 , .Xr pwd_mkdb 8 , .Xr services_mkdb 8 , .Xr tzsetup 8 From nobody Tue Jul 16 04:48:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNRQZ6h0Jz5QyKr; Tue, 16 Jul 2024 04:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNRQZ69bkz4g4g; Tue, 16 Jul 2024 04:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721105286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JkBvu6u+9hC++dEp9bBmCrwBd6KY5pXGNfVhpet53VU=; b=sFHrkNY2cVVoCbgzTChAFtyEsQ0+9WJ8S8wyOXY9cN55kncpH59AcNwqHpOunjCIUigszM DAkWyQYsK/ZjzFaFBKtKA+oNZff10gFYlpmy+wEH0t+Y/wcwzQzeEwcSp9qAo2xR+SY10m wu6lElPPhZhuS3Uf9yXK4J4PwZdpvFEP7jj01h7DYRCyL6g91IxmPfaGyt2OGhca5MuVSE +5nMtAFN7MKSt/1BdhYxOgQ3w+STpW1+hL2qKKmcRyCzZgFC6fGjQZiK+cMICw/AXf30y+ 9jMsi60ijgVMIY/xfKkace1CfFaO0WDCilwz9OO1IlnVob3Bl4hnmdKA6t/Z7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721105286; a=rsa-sha256; cv=none; b=KfcT9JkQKzvsXHdhDpDLscYkxlcdI+RXDvqCLgqhpvsCSAp2OL31PtQtGD2p8c3rIpdW9W lvbUyToywnSNpDEYgy8M3WhUrXdohTEYjglaNiH4L3yl9sEBG3W4ziHmK3vSFX1i0B4Ap0 xbLv26S7cCtH1dPNIQ7co4gXBvcmmqjQglf/FCkn315CY2tY6zUtxXJ42wTQ/3v/3nFbjj q/TIk2FZ3zMP8VTp9KkkmPbDU4nAusTY2UIS9hMyz1VbknQdL8H+V6qNHBV76niX4VF+3F OERyebuanVeaMt9CYpWTKmSNaiN6rRFK4PHu8cU6DvRowW0X0CanN/5KKVUsEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721105286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JkBvu6u+9hC++dEp9bBmCrwBd6KY5pXGNfVhpet53VU=; b=tIw7UtzLq1wyfEiSKqCMcIDNdnSwBKTkC5RzMZV4UvXG7X5+ZRbsfaSRmOacaUipJiuD0I bbdVieFnGBxgfKUnbiaVaHB55UgCsuZbxnOLVIGxUn3yIVGdL6noDidpq36571+EF5OCV4 swEqpZ+UzlIKpO8AH6dbBhlyqwZmgp6IdkVD5ByiLTbEzmnzdLBRRHU8MOhzxLdsD96HmG ZFbtCkQIVIqLSTy6i9t2Ls0p+6McOVlFcAOQ42b7Qk6zvdoRVbH8vyxcWDbPJa5o5MwYax nyVGIFfTtYoVSHvnjOqrNbJoaeNqYiVgDgXm255r9ZqI3ThPcO+pAKRk/H3aJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNRQZ5mbszMcm; Tue, 16 Jul 2024 04:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G4m62C006027; Tue, 16 Jul 2024 04:48:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G4m6Cq006024; Tue, 16 Jul 2024 04:48:06 GMT (envelope-from git) Date: Tue, 16 Jul 2024 04:48:06 GMT Message-Id: <202407160448.46G4m6Cq006024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 9c73f38cd3ab - main - stress2: Add a new test scenario. Update the exclude list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c73f38cd3abc21e88ec446d44a35b27ee4439ea Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=9c73f38cd3abc21e88ec446d44a35b27ee4439ea commit 9c73f38cd3abc21e88ec446d44a35b27ee4439ea Author: Peter Holm AuthorDate: 2024-07-16 04:47:28 +0000 Commit: Peter Holm CommitDate: 2024-07-16 04:47:28 +0000 stress2: Add a new test scenario. Update the exclude list --- tools/test/stress2/misc/all.exclude | 3 ++- tools/test/stress2/misc/swapoff6.sh | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 07cff21a1d9a..f8936d9efee8 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -60,6 +60,7 @@ suj36.sh https://people.freebsd.org/~pho/stress/log/log0392.txt 20221114 swapoff2.sh swap_pager_force_pagein: read from swap failed 20171223 swapoff3.sh Excessive OOM killing 20220403 swapoff5.sh log0005.txt, known issue 20210111 +swapoff6.sh https://people.freebsd.org/~pho/stress/log/log0540.txt 20240716 systrace.sh WiP 20200227 systrace2.sh WiP 20200227 syzkaller16.sh zonelimit issue 20210722 @@ -70,8 +71,8 @@ syzkaller59.sh Page fault 20220625 syzkaller65.sh panic: in_pcblookup_hash_locked: invalid local address 20230318 syzkaller66.sh panic: in_pcbconnect: inp is already connected 20230621 syzkaller67.sh panic: ASan: Invalid access, 8-byte read at ... 20230621 +quota6.sh https://people.freebsd.org/~pho/stress/log/log0456.txt 20240707 truss3.sh WiP 20200915 -unionfs19.sh https://people.freebsd.org/~pho/stress/log/log0519.txt 20240702 # Test not to run for other reasons: diff --git a/tools/test/stress2/misc/swapoff6.sh b/tools/test/stress2/misc/swapoff6.sh new file mode 100755 index 000000000000..b6ab08784f87 --- /dev/null +++ b/tools/test/stress2/misc/swapoff6.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# A swap test scenario, using swapoff(8) and sort(1) for VM pressure + +# Out of free pages seen:://people.freebsd.org/~pho/stress/log/log0540.txt + +. ../default.cfg +[ `id -u` -ne 0 ] && echo "Must be root!" && exit 1 + +[ `swapinfo | wc -l` -eq 1 ] && exit 0 +set -u +nmax=`sysctl -n hw.ncpu` +[ $nmax -gt 4 ] && nmax=4 + +for i in `jot $nmax`; do + timeout -k 2m 1m sort /dev/zero & + sleep .`jot -r 1 1 9` +done +while [ `swapinfo | tail -1 | awk '{sub("%","");print $NF}'` -lt 2 ]; do sleep 1; done + +start=`date +%s` +while [ $((`date +%s` - start)) -lt 300 ]; do + while ! swapoff -a > /dev/null 2>&1; do sleep .1; done + swapon -a > /dev/null + ncur=`pgrep sort | wc -l` + if [ $ncur -lt $nmax ]; then + echo "Starting $((nmax - ncur)) sort" + for i in `jot $((nmax - ncur))`; do + timeout -k 2m 1m sort /dev/zero & + sleep .`jot -r 1 1 9` + done + fi +done +pkill -9 sort +wait +exit 0 From nobody Tue Jul 16 05:12:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNRz13tqvz5R18Z; Tue, 16 Jul 2024 05:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNRz13HfDz4hfG; Tue, 16 Jul 2024 05:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z0iL5jmQtQaUjTcp0jSnlvGBdAOQPO6aTvFbApFlIHE=; b=W3coQ/yUPYNQD9BjYlmSFxXRAxo332XqcYekh2JvvoQtclWuMjaZKAUeTb29OF2MjxNHkA egWWBWLTIaZlTc4SuIPe1gjUH7zZdnmlZFUoP4xnOxUGd3AFKKJ1SqPFjJptwkv5sxQ4mU Q5TiMMtGenBeBmafLbSHaLj5HtY0NmeYPmbmPRutaIHA+51c8lq0eV53pHnRdAGLuRnvQK T5FulqqOLkqfUTwKSarJLeQpFOC91L0R2/cGh8RrncGUtyxgeB6IpmDLe+fzozFq/QIRbL WKntf2S0N7/krwtrU+yoSgpK/aPnoYMbMcvTS9UcPKUg9dDxCVnLvRWmEV4muw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721106765; a=rsa-sha256; cv=none; b=iXRDRzXjP+j1yc/RwD4Cu0OU5/WyHILBRqv+LZ91fofxhM71BPzb3dwJqulvGuMcubtGQh oqfWQN8zdy8YKWfkMveO9ye2e8L6V2j0rwhEDQ4TJBWtG0KQEbjYEHC8+g2hPs2tfZrrpi qPmYl9sitZli4/KkXbAh2CjpEW23gxJ2kewQVPbIzQGIqUHBxwgzcyp4nWIifkUxv1zXh1 IpPIBBmjlKX2Uxltzf+HScWV96Zs9iVelHsHTV1pxW1xmyo5xVMkH3jET2mc9BMuGIrw4T bboV6xCt3S3sde8lQDH/v3c2UGX7c02fJ7r2WJD+w01TU0VCx+tThF6NMs89hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z0iL5jmQtQaUjTcp0jSnlvGBdAOQPO6aTvFbApFlIHE=; b=Qx0vWTKULFS8J6/oZNXl2jXm2kAr5rPnjQ6OhSBReSpwDkrnzOY1Cgg6rGq6MgE4JzZW5r 53/MyC0l8jtRLZEgmtsDYJ+e3xCVrDMv3Ud2BBdsiTdQvZFfCT3SHi/fEmWY+VoFIvrCeZ bCG9FR6zWf7UZFwFEgRqWB5Vzy5m7CoqQM1wja4L4FqZNBhoyhkzAZLfls28hgNZ1/NIXX uHFONbQ6DwDqSl2VUOVcHZTGPBIvjamfT37RIw2ls4Bj2/VBlG1ZjiIONX6ZdXO9vNpXnt jyuEsZOKWIY5qBXT8lOlUCWteuMOFxg8nEyYW21i7rLBxIvVmUfmP+zsYC+/Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNRz12b9ZzNK2; Tue, 16 Jul 2024 05:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G5Cj5t056394; Tue, 16 Jul 2024 05:12:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G5CjpV056391; Tue, 16 Jul 2024 05:12:45 GMT (envelope-from git) Date: Tue, 16 Jul 2024 05:12:45 GMT Message-Id: <202407160512.46G5CjpV056391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 838b6caababb - main - openssl: use getrandom(2) instead of probing for getentropy(2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 838b6caababbaaab65659d40a41c2dd46b3a5fd2 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=838b6caababbaaab65659d40a41c2dd46b3a5fd2 commit 838b6caababbaaab65659d40a41c2dd46b3a5fd2 Author: Kyle Evans AuthorDate: 2024-07-16 05:12:27 +0000 Commit: Kyle Evans CommitDate: 2024-07-16 05:12:27 +0000 openssl: use getrandom(2) instead of probing for getentropy(2) The probing for getentropy(2) relies on re-declaring getentropy(2) as weak and checking the address, but this is incompatible with the _FORTIFY_SOURCE symbol renaming scheme. It's always present on all supported FreeBSD versions now so we could cut it down to unconditional use, but there's another segment for getrandom(2) already that's cleaner to just add us to. We should upstream this. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- .../openssl/providers/implementations/rands/seeding/rand_unix.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c index 750afca58ed7..eadacedbe40c 100644 --- a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c +++ b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c @@ -356,7 +356,7 @@ static ssize_t syscall_random(void *buf, size_t buflen) * Note: Sometimes getentropy() can be provided but not implemented * internally. So we need to check errno for ENOSYS */ -# if !defined(__DragonFly__) && !defined(__NetBSD__) +# if !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__FreeBSD__) # if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux) extern int getentropy(void *buffer, size_t length) __attribute__((weak)); @@ -393,11 +393,12 @@ static ssize_t syscall_random(void *buf, size_t buflen) /* Linux supports this since version 3.17 */ # if defined(__linux) && defined(__NR_getrandom) return syscall(__NR_getrandom, buf, buflen, 0); -# elif (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND) - return sysctl_random(buf, buflen); # elif (defined(__DragonFly__) && __DragonFly_version >= 500700) \ - || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000) + || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000) \ + || defined(__FreeBSD__) return getrandom(buf, buflen, 0); +# elif defined(__NetBSD__) && defined(KERN_ARND) + return sysctl_random(buf, buflen); # else errno = ENOSYS; return -1; From nobody Tue Jul 16 05:12:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNRz24WX5z5R12V; Tue, 16 Jul 2024 05:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNRz23znXz4hcS; Tue, 16 Jul 2024 05:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNtd19RWvU8J/GiTsAovoUptwPrNcBFrYvYpyRLscd0=; b=lB+IM94zPCj8KQyIR3YNFpEjfMUwJXFdbc2UrPP06mlithoqiNE77VPkVxF2LhsPZL6lI8 sehQ1W0k2QU2jJ7Ykhm0gK4AvXGGK2+YlwDd4ipBU+cC/bJZl9NwLzO0QaQfcCOxlYPuqq MAoYFJ88yRal1qctTuAwqSnhAzgruaCsvIYxWCVPZ9k7PUhsL59zMCNOe6bCg6Df7v43tl ASlJHkP4JQSILaR5qP1oLhT904jV2snm7IDds/UF3piDwC+UlJuWb9IxmBQXUT2GZqAA8H VD3vwual5yrSeMeHMG9ANFz0lQ6xRSz7/61P3pl3/lSrpgL5Aa8eG0C7J7C9Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721106766; a=rsa-sha256; cv=none; b=USw+vG5KpTg9jAE4789d9SApz2uDxwzLcOD3mNq4n2SgFqrfOKdoDua5+5DXAHkwzKy9rn 5X5Dj+2Zy99gh547FnqdYPAZ39+DBqhkCS5DqnvXEuk4NBzCWlFqWgUREmvp2Ima+9sChP XIP4THhle4GlWJ8ORKOJPTPKnNthdGLUujf0NV4sYGbv7B2J932nx/LZWrKskFUKkg4qYZ NXFIRjxvj97MSmHbeu/vdCXzoM5jx//KZ3o4TJVvz9IM3viv/8Frf9vB41LnoOpstTXPNb QsJkbRp0CliwW1YYC9xUTpNh3c63Ppm6SIcS/Oo35Io4Yb54D3UQqvkLf7Yr/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNtd19RWvU8J/GiTsAovoUptwPrNcBFrYvYpyRLscd0=; b=vemSdQrVf8IxVBcnuKWnJUUog5eAmGgS5noF8z6HYF5wieRZE3U24xDZGg8OH5kD/dVb7V 9r+5QEM78/dik3RE+6+u+7wzId1GxK4VgGC8ItRy/ZJIQjmJgNfWttevlL/5q9VeMoI//8 aWx7NStHtU3K6PTRE6TxZWjTwEpmrRCQdow5r38xCDj35ZaesBRwqgXGtOt1PmG+AVOsM9 jxmOkVI6sXISwU9ZLn4BfLwUusMEsEmpK7KR90yN+tnSWzHQ4cQJuUPN/X+G1CzIhLijC4 QiyoeXxrQkJj3v9JBNFg6Q/MzNAaO1D3mpMZ6y8rQgo06refGhHXEMjHeWCxKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNRz23cDHzNQ0; Tue, 16 Jul 2024 05:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G5CkeS056448; Tue, 16 Jul 2024 05:12:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G5CkwD056445; Tue, 16 Jul 2024 05:12:46 GMT (envelope-from git) Date: Tue, 16 Jul 2024 05:12:46 GMT Message-Id: <202407160512.46G5CkwD056445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: b8730c11a395 - main - include: ssp: fix the build with earlier C standards List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8730c11a395dacc089311ead1c9e015682a1ccb Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b8730c11a395dacc089311ead1c9e015682a1ccb commit b8730c11a395dacc089311ead1c9e015682a1ccb Author: Kyle Evans AuthorDate: 2024-07-16 05:12:27 +0000 Commit: Kyle Evans CommitDate: 2024-07-16 05:12:27 +0000 include: ssp: fix the build with earlier C standards `inline` isn't always a keyword, so we should be using __ssp_inline as we do everywhere else in the _FORTIFY_SOURCE support. Variable declarations in a loop initializer are also not always supported, so declare any loop vars in advance. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- include/ssp/socket.h | 3 ++- include/ssp/ssp.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/ssp/socket.h b/include/ssp/socket.h index 6c0051ad72dc..30a8f0adf1ea 100644 --- a/include/ssp/socket.h +++ b/include/ssp/socket.h @@ -101,11 +101,12 @@ __ssp_redirect_raw_impl(ssize_t, recvmmsg, recvmmsg, const struct timespec *__restrict timeout)) { const size_t vecsz = __ssp_bos(hdrvec); + size_t i; if (vecsz != (size_t)-1 && vecsz / sizeof(*hdrvec) < vlen) __chk_fail(); - for (size_t i = 0; i < vlen; i++) { + for (i = 0; i < vlen; i++) { __ssp_check_msghdr(&hdrvec[i].msg_hdr); } diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h index bdc14137d45b..a161df31d3d4 100644 --- a/include/ssp/ssp.h +++ b/include/ssp/ssp.h @@ -89,7 +89,7 @@ __ssp_redirect_raw_impl(rtype, fun, symbol, args) { \ #include -static inline int +__ssp_inline int __ssp_overlap(const void *leftp, const void *rightp, __size_t sz) { __uintptr_t left = (__uintptr_t)leftp; @@ -112,11 +112,12 @@ __ssp_inline void __ssp_check_iovec(const struct iovec *iov, int iovcnt) { const size_t iovsz = __ssp_bos(iov); + int i; if (iovsz != (size_t)-1 && iovsz / sizeof(*iov) < (size_t)iovcnt) __chk_fail(); - for (int i = 0; i < iovcnt; i++) { + for (i = 0; i < iovcnt; i++) { if (__ssp_bos(iov[i].iov_base) < iov[i].iov_len) __chk_fail(); } From nobody Tue Jul 16 05:12:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNRz40bwFz5R18c; Tue, 16 Jul 2024 05:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNRz356pLz4j26; Tue, 16 Jul 2024 05:12:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qg/1v5jpPMMWrCRlzgACbNcHIHk/dTldV6Uq1BtZWw4=; b=xci5oTD6J1EPMwnofAzxNBto1k342P/ZjyCAgXjqbIf22nvsjVt3rK//i+ND7c+cbbWm28 P0HJ/a94aMxSpVp9pOzdVheXqKc0Tmlg/6+gohHoWFiFfMHSjqGFHtToBv4Img8Gg38pE/ m5sGO870cs3LFHftFxNonqBNoC6V6xwIpCfKu58qKu7IXQTzW6HhnP379K2pqGmzuPfjJT QVUIWsiGJwNXJGMaYMXgfX9owv4fqsF4xpzARWt4vPsE1+KiWu1aJu5dihSOhtMmKQESk2 MpktgfwKuRY/OG2K4NTkbqhV2pFs8sf36wtDZEDF7ZTPzIKvpZ8tQzrR1+29ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721106767; a=rsa-sha256; cv=none; b=JMo6KUyvecUItNZB6Ccx3pmCvQi+LgQb0Q8mSaJOmPoQa+bs9rdaKatG65rZ3iMD7sMInI +1l4sqm5IiA9V79PZOanZGfCl7xP4Jw6JqeaRhodQfYgGtWiLsP2gZ2bz2E6NZ6ylGwDB7 8HGtPM6HstitvbX4fC47fzkynQXr2L99I84vozCbHf+VDqvjaHqtpPlnZTUQaKoZftx4vi br9SlkL3OcvjVp2nhhokFeu1kBGzr6xlIW85qGBcT6rkFznKsOFvC+WDfsT4E1jze2eBLY 0vF45OICkyvwjJOrMFGCRVIxrA+0DIzIo2dbq5FzYXzCZjB0JvRhwz46oubMGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qg/1v5jpPMMWrCRlzgACbNcHIHk/dTldV6Uq1BtZWw4=; b=SG2e4doG+L4mYIEswloFS6IEdzQ9n0VEH2qW6mUzi6OC//VPLc/NaHPGGmZa3TaOn3x73T y/AFddeh2h6bDz8iKrzG6jEgdPI9hXXHYm/CdbNDxwtJQIC5sj5CAgyCwdp7/N3Vh0PGc/ a9e4/Q/GjbUQ+k7xmmbl3jgSvSleAaGdT7f+hKIoTgqg9zHSLxpvavAUoA6oAU6D/xZKsF yzcNSq8YfzEYC5ZAKskyjir47+RiMRhvN3zCEVYA2/Unr3Za8942uggO+N2xiQ9wxRVVxA bIYrMq1pnvl004/8PkmzJSxk7XA+lxozttEfaOOj3/V4KIk7qS274Y2nNXiEEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNRz34fLPzNQ1; Tue, 16 Jul 2024 05:12:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G5ClHM056496; Tue, 16 Jul 2024 05:12:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G5Cljm056493; Tue, 16 Jul 2024 05:12:47 GMT (envelope-from git) Date: Tue, 16 Jul 2024 05:12:47 GMT Message-Id: <202407160512.46G5Cljm056493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0c47b9c211ed - main - include: ssp: don't shadow the mempcpy builtin List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c47b9c211ede221629914ae0c5553586e772109 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0c47b9c211ede221629914ae0c5553586e772109 commit 0c47b9c211ede221629914ae0c5553586e772109 Author: Kyle Evans AuthorDate: 2024-07-16 05:12:28 +0000 Commit: Kyle Evans CommitDate: 2024-07-16 05:12:28 +0000 include: ssp: don't shadow the mempcpy builtin GCC emits a warning about shadowing a builtin with our mempcpy declaration, so switch it to using the same model as memcpy() and use the apparently-existing __builtin___mempcpy_chk(). Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- include/ssp/string.h | 16 ++------------ include/string.h | 2 +- lib/libc/secure/Makefile.inc | 2 +- lib/libc/secure/Symbol.map | 1 + lib/libc/secure/mempcpy_chk.c | 49 +++++++++++++++++++++++++++++++++++++++++++ lib/libc/string/mempcpy.c | 2 +- 6 files changed, 55 insertions(+), 17 deletions(-) diff --git a/include/ssp/string.h b/include/ssp/string.h index b9f2dceb1df5..9f24254d9c01 100644 --- a/include/ssp/string.h +++ b/include/ssp/string.h @@ -106,6 +106,7 @@ __ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src) { \ __BEGIN_DECLS __ssp_bos_icheck3_restrict(memcpy, void *, const void *) +__ssp_bos_icheck3_restrict(mempcpy, void *, const void *) __ssp_bos_icheck3(memmove, void *, const void *) __ssp_bos_icheck3(memset, void *, int) __ssp_bos_icheck2_restrict(stpcpy, char *, const char *) @@ -116,23 +117,10 @@ __ssp_redirect0(int, strerror_r, (int __errnum, char *__buf, size_t __len), (__errnum, __buf, __len)); __ssp_bos_icheck3_restrict(strncpy, char *, const char *) __ssp_bos_icheck3_restrict(strncat, char *, const char *) - -__ssp_redirect_raw_impl(void *, mempcpy, mempcpy, - (void *__restrict buf, const void *__restrict src, size_t len)) -{ - const size_t slen = __ssp_bos(buf); - - if (len > slen) - __chk_fail(); - - if (__ssp_overlap(src, buf, len)) - __chk_fail(); - - return (__ssp_real(mempcpy)(buf, src, len)); -} __END_DECLS #define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len) +#define mempcpy(dst, src, len) __ssp_bos_check3(mempcpy, dst, src, len) #define memmove(dst, src, len) __ssp_bos_check3(memmove, dst, src, len) #define memset(dst, val, len) \ __ssp_bos_check3_typed(memset, void *, dst, int, val, len) diff --git a/include/string.h b/include/string.h index c9d3e1add1a1..d9adcf4e0e41 100644 --- a/include/string.h +++ b/include/string.h @@ -68,7 +68,7 @@ void *memmem(const void *, size_t, const void *, size_t) __pure; #endif void *(memmove)(void *, const void *, size_t); #if __BSD_VISIBLE -void *mempcpy(void * __restrict, const void * __restrict, size_t); +void *(mempcpy)(void * __restrict, const void * __restrict, size_t); #endif void *(memset)(void *, int, size_t); #if __POSIX_VISIBLE >= 200809 diff --git a/lib/libc/secure/Makefile.inc b/lib/libc/secure/Makefile.inc index 5d10612e67a8..e5286a5a380f 100644 --- a/lib/libc/secure/Makefile.inc +++ b/lib/libc/secure/Makefile.inc @@ -4,7 +4,7 @@ .PATH: ${LIBC_SRCTOP}/secure # _FORTIFY_SOURCE -SRCS+= fgets_chk.c memcpy_chk.c memmove_chk.c memset_chk.c \ +SRCS+= fgets_chk.c memcpy_chk.c memmove_chk.c mempcpy_chk.c memset_chk.c \ snprintf_chk.c sprintf_chk.c stpcpy_chk.c stpncpy_chk.c \ strcat_chk.c strcpy_chk.c strlcat_chk.c strncat_chk.c strlcpy_chk.c \ strncpy_chk.c vsnprintf_chk.c vsprintf_chk.c diff --git a/lib/libc/secure/Symbol.map b/lib/libc/secure/Symbol.map index 1f12fe059367..df0a2d1ac93d 100644 --- a/lib/libc/secure/Symbol.map +++ b/lib/libc/secure/Symbol.map @@ -8,6 +8,7 @@ FBSD_1.8 { __fgets_chk; __memcpy_chk; __memmove_chk; + __mempcpy_chk; __memset_chk; __snprintf_chk; __sprintf_chk; diff --git a/lib/libc/secure/mempcpy_chk.c b/lib/libc/secure/mempcpy_chk.c new file mode 100644 index 000000000000..ca4ae150bc94 --- /dev/null +++ b/lib/libc/secure/mempcpy_chk.c @@ -0,0 +1,49 @@ +/*- + * + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2006 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include +#undef mempcpy + +void * +__mempcpy_chk(void * __restrict dst, const void * __restrict src, size_t len, + size_t slen) +{ + if (len > slen) + __chk_fail(); + + if (__ssp_overlap(src, dst, len)) + __chk_fail(); + + return (mempcpy(dst, src, len)); +} diff --git a/lib/libc/string/mempcpy.c b/lib/libc/string/mempcpy.c index 86e44cdebb85..4ea0af87aef1 100644 --- a/lib/libc/string/mempcpy.c +++ b/lib/libc/string/mempcpy.c @@ -32,7 +32,7 @@ #include void * -__ssp_real(mempcpy)(void *__restrict dst, const void *__restrict src, +(mempcpy)(void *__restrict dst, const void *__restrict src, size_t len) { return ((char *)memcpy(dst, src, len) + len); From nobody Tue Jul 16 05:12:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNRz50TD3z5R1By; Tue, 16 Jul 2024 05:12:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNRz463qnz4hyx; Tue, 16 Jul 2024 05:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jlZWmQMBljwOg5w/hhfQeBuWwNQRxNS11GMOSGvMcX8=; b=H28E00VqkVAbd4p0SbNqruRzxHp3aM+fwuQ24FMnwjTh9/0Mca9USUbL5pGPAHuLdtq/FY oVcIkhEOqh4z0yT46EwjizOEs+rnVAHEf5evymOiTvIK/KKHu8rPaAayvqjpv3E7OTDDQ/ cWEe4kCGgZPsGin3SYv+ZL7B3hJdVAPpoqwdMp4x0uhWlxeMql9FvwakCRohPoB9EJv8Ys pgL6rPw1/wifBdOltYQVzsYCvASg1lbeXHbKWb3Tkez4EJZPMYlHVxwSzBVJIhu6pd+BdP xXbVpisp3AOYZPKDm0+S2MZy+Ftq/Y6kbB4uqZ+a1GpQ09Wi9XioB/mOB2Titw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721106768; a=rsa-sha256; cv=none; b=ZtEgsw1RWbqn+07tzaWTDTAFxR3UatrSrHLJCHBreKp2ilPIzbecDj3C4OGEJqjsjPQS2N 4N6XhhuGq88eEMYrYplAFAqLTOiBqJzyBzkMTd9UwLJEiFg1iDJPSoRSYKE/KR5FiEI/QN nIsiMXVt8deSBkMXj0cL9if3R5tjzIxCrBoW8eOuMTmo6ptcGl3whLtZGcj031Wtz33Zrt tuWZCsbV/yemtNQVbBGghuGw946NN2OenwFe4yYg29cs7CIQOP+y4P+WyC+ikcsOnuHuVr bca+8RM0T2Qont5hplc83KbcFqb+UkF9YmJHWrF+S+Pd07+l9qks4xFMYNollg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jlZWmQMBljwOg5w/hhfQeBuWwNQRxNS11GMOSGvMcX8=; b=CcH9dGxiUy7Q5SUV1cd5MHTodjQ3X33wkfC8znSZ+9HDe+5svsxvmMUNpgQz2lGFI8drOL vs6Xj98q7KdyssmvbpPKtwethgMApnXly6cupMGXRzy9Ae4pkrenBvU4pYKzF/5Y4yBuN5 moiG60d5m7EZgsHvqSYhzAZEHyALs2BCoMG12izKFIkfDSlkAWaaHnaIZtMyXJqq5w1lBB XsvNhc8Sb8umuy0uzZrUcf6pmnbtxc6cm6EwlPXT92nqr6IJ6saCGrK5bo5GpTdhIsIUFY dvVWqDFMJlYbdF0h6HANzvGV8LdYcR+hFMcSOaA4YT6fZNS1RNX14Z34s0UQRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNRz45gZ8zNQ2; Tue, 16 Jul 2024 05:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G5Cmx7056554; Tue, 16 Jul 2024 05:12:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G5CmgB056551; Tue, 16 Jul 2024 05:12:48 GMT (envelope-from git) Date: Tue, 16 Jul 2024 05:12:48 GMT Message-Id: <202407160512.46G5CmgB056551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: d5f8270917bf - main - libc: switch to __weak_symbol for fortified interpose stubs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5f8270917bfee4242778544b990bb7f82f8a4de Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d5f8270917bfee4242778544b990bb7f82f8a4de commit d5f8270917bfee4242778544b990bb7f82f8a4de Author: Kyle Evans AuthorDate: 2024-07-16 05:12:28 +0000 Commit: Kyle Evans CommitDate: 2024-07-16 05:12:28 +0000 libc: switch to __weak_symbol for fortified interpose stubs GCC doesn't like `#pragma weak macro(foo)`, but that's fine; just slap a __weak_symbol on the definition to more reliably make it weak anyways. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- lib/libc/sys/poll.c | 3 +-- lib/libc/sys/ppoll.c | 3 +-- lib/libc/sys/readv.c | 3 +-- lib/libc/sys/recvfrom.c | 3 +-- lib/libc/sys/recvmsg.c | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/libc/sys/poll.c b/lib/libc/sys/poll.c index 7a418afbbf49..5e000f7e728f 100644 --- a/lib/libc/sys/poll.c +++ b/lib/libc/sys/poll.c @@ -36,8 +36,7 @@ __weak_reference(__sys_poll, __poll); -#pragma weak __ssp_real(poll) -int +int __weak_symbol __ssp_real(poll)(struct pollfd pfd[], nfds_t nfds, int timeout) { return (INTERPOS_SYS(poll, pfd, nfds, timeout)); diff --git a/lib/libc/sys/ppoll.c b/lib/libc/sys/ppoll.c index ef72a902548b..72c0b5d5e421 100644 --- a/lib/libc/sys/ppoll.c +++ b/lib/libc/sys/ppoll.c @@ -36,8 +36,7 @@ __weak_reference(__sys_ppoll, __ppoll); -#pragma weak __ssp_real(ppoll) -int +int __weak_symbol __ssp_real(ppoll)(struct pollfd pfd[], nfds_t nfds, const struct timespec *__restrict timeout, const sigset_t *__restrict newsigmask) diff --git a/lib/libc/sys/readv.c b/lib/libc/sys/readv.c index d58dba1fc47e..2729f6ed99da 100644 --- a/lib/libc/sys/readv.c +++ b/lib/libc/sys/readv.c @@ -38,8 +38,7 @@ __weak_reference(__sys_readv, __readv); -#pragma weak readv -ssize_t +ssize_t __weak_symbol __ssp_real(readv)(int fd, const struct iovec *iov, int iovcnt) { return (INTERPOS_SYS(readv, fd, iov, iovcnt)); diff --git a/lib/libc/sys/recvfrom.c b/lib/libc/sys/recvfrom.c index 6247b315d078..0cdbd8a4ccaa 100644 --- a/lib/libc/sys/recvfrom.c +++ b/lib/libc/sys/recvfrom.c @@ -37,8 +37,7 @@ __weak_reference(__sys_recvfrom, __recvfrom); -#pragma weak recvfrom -ssize_t +ssize_t __weak_symbol __ssp_real(recvfrom)(int s, void *buf, size_t len, int flags, struct sockaddr * __restrict from, socklen_t * __restrict fromlen) { diff --git a/lib/libc/sys/recvmsg.c b/lib/libc/sys/recvmsg.c index 334049d6cfad..ce0f5e0478cd 100644 --- a/lib/libc/sys/recvmsg.c +++ b/lib/libc/sys/recvmsg.c @@ -37,8 +37,7 @@ __weak_reference(__sys_recvmsg, __recvmsg); -#pragma weak recvmsg -ssize_t +ssize_t __weak_symbol __ssp_real(recvmsg)(int s, struct msghdr *msg, int flags) { return (INTERPOS_SYS(recvmsg, s, msg, flags)); From nobody Tue Jul 16 05:12:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNRz6269Xz5R152; Tue, 16 Jul 2024 05:12:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNRz56qlMz4j51; Tue, 16 Jul 2024 05:12:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRKddcn7Me6Lzr/VR9oErbuY3Ce/86DHeXYK6EdNkiA=; b=b6YQB2ky5oidXJm7XEuvoiC2rsQe/6LIH8SO8L9LGr1gn8h3L/bjtWtXH5ctQRIGr4SYRf 0iQapQYgwLeWfIWHQ7KwI43TdxsrSw5nEv9tSU0gTQdhGumQFZbUpLrp/TIncmPfq9KtfQ 5/QDro3ok0IXLEdVZhBDuBKkZLQ4wFVrTtBQ4x9O1PV6VwWojp6eYlmmPpRf8xKDp0HmoT QU+vvmfMIO3R3O7zYTFln7xNJ8h2UH9x9a3BP/DzCA/0exDZac1x1jDXZfrQwhS2dS0OCO gUI+QCWD51JRCQrUkCHL7pLKhOe5pCrLiL2MFatSh3f3NcOXsH+gRCL1oDkxdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721106770; a=rsa-sha256; cv=none; b=H8L5XZp+gCy/aVK9Kyb8wRMTle7xuiSVWER2H9GON0RPmJg925+1s+ERuyeV/29L+sHkdz 9gjJ9L5NmQ02sJM5FbdkdwcXOureuAztM7DL4O/8r+z0+984Yw6Kl9oBvDoO7FGG/EJPdR kX56YLMhWdmHnZyMK2MM+TmSkeSPzW14CaNrsPw+2cENWOtKW7rgblJVg+vD3fqsMTI4/W 1vbVmCmW94+H51hpDdjjshAO/Oti162g4unm9+1gJWX2vo9usUHhwRQbKsTq451mIqKcdW yzi87EgkzmHj42YLSxF1QNXBO2ryqaehfFNZYYjcP7gHsFAzIt41/uQ2W0yNIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRKddcn7Me6Lzr/VR9oErbuY3Ce/86DHeXYK6EdNkiA=; b=gXyXS2nHDrTo8+bQQ/pfDaNw08KuDViX4Aa5bpDIdP/aRsHLL1dIuL9fIH9JX6yzv3h1pY 8P8j8xCP/NF+EVOtEUGoq8R6AXKIpW3pGTTXjp4Yaf7ex/GjzeQ06taCLkb3B69Ifv+957 TS62xCH1ACDNbP09v22t+F7maSK6kYb6/4MV5//ZAqFyAlQScCMb7T72jvhsHAyZetB1qs oZIaZJOH1MjoBgAxgoijbehAGz4/PxCFxWPEOkTsr/x9dKsx8HvoqpDVdvC2CsqRgU2bG/ Dh4aIiGQPe29HsZFazDHCrK10aLZqTqKyKZk81pbtsuimTHtSxP3oM+A9UFDkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNRz56L0bzNQ3; Tue, 16 Jul 2024 05:12:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G5CncE056602; Tue, 16 Jul 2024 05:12:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G5CnB6056599; Tue, 16 Jul 2024 05:12:49 GMT (envelope-from git) Date: Tue, 16 Jul 2024 05:12:49 GMT Message-Id: <202407160512.46G5CnB6056599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 4928dcc0ebdb - main - sys/select.h: const'ify the fd_set that __fdset_idx() takes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4928dcc0ebdb7bac56840930e44c38f8f061f09e Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4928dcc0ebdb7bac56840930e44c38f8f061f09e commit 4928dcc0ebdb7bac56840930e44c38f8f061f09e Author: Kyle Evans AuthorDate: 2024-07-16 05:12:28 +0000 Commit: Kyle Evans CommitDate: 2024-07-16 05:12:28 +0000 sys/select.h: const'ify the fd_set that __fdset_idx() takes Some callers may be operating on a const fd_set and we don't particularly care, so const'ify it. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- sys/sys/select.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/select.h b/sys/sys/select.h index 9b734754b944..fefc9961d63a 100644 --- a/sys/sys/select.h +++ b/sys/sys/select.h @@ -86,7 +86,7 @@ typedef struct fd_set { #define __fdset_idx(p, n) __fdset_idx_(p, n) #else __ssp_inline unsigned long -__fdset_idx(fd_set *p, unsigned long idx) +__fdset_idx(const fd_set *p, unsigned long idx) { __size_t psz = __ssp_bos0(p); unsigned long sidx = __fdset_idx_(p, idx); From nobody Tue Jul 16 05:12:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNRz72Xtkz5R1C0; Tue, 16 Jul 2024 05:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNRz70dK4z4j5D; Tue, 16 Jul 2024 05:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OaRToo7BwhFLuKh+1Ro6CO6VKQbSKmZ34TSMuBMRG+E=; b=fPT4avXypfgXyQV0CjBlKPiWvNJoqetwR9sx1ogIQ2lHaOPyd2IV8/Mrf0Prp/vMifoQfI TRnfBPmlfTEtGxiHm1gGJ4UFI65DG+Xf6AtcajalakQGOnuxSdyIvPnSdqa0zE89+lNT1G evqw8m3Z9PXFou/qVIH8289O1OAqZz7S4/X2C3fYklpusHkh2Bb9uFPrTXzHcbtc8yfJ0g OUVhoZ+UNSgiWsN3iQZ3QRD55fitsXCkOqDA21di9PTefnAVFHXSxVYuNFX23k3IPKo3pF 03aVHwzJLB9watpYBeYNCZm7Bds9GuxTSOxiS2Q7iHR3Qf7KIDF9/Gr4yQ5jfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721106771; a=rsa-sha256; cv=none; b=cKLcTHd3rL0dMmpCHz7o7WGaD8O0Np2s332gkDVvuzw7AeiX4lo7MzKpHeU2/ygCE1/VSd YDhlyrgEQjVV4k3/PBCkZmnti1IifFJZiakyWneugv9LRD+RLaoPVKSyjgQeDMO3mqSkBT euBBoeQ/V6NHQCkY4oza9d081/xmskJEQhowCtecmcPRefGNqe4gAy82+49O+rYJ7a2Tr1 tDpUs0teaQisjf6GkCLW+ffAKd/3k2CtjuJw2Xwzgks9yQ0DStdI15vYLDXJP1ACqunQpy THLI1UQFORnfpmBJ7zTUlKH0TdxCSKl2sihznMVwdkgHiMJZMF6JQRRCGYJCNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OaRToo7BwhFLuKh+1Ro6CO6VKQbSKmZ34TSMuBMRG+E=; b=bIOyv0Q2uEwT1fIxejOHwt2vLBMMgqiOfIugEMS1YOrzxkeCPJNBCvBvVuuFzGVG3Wu/Yd ldZYEWrUFbo9w0HXJyR+V8OclJ4m3H1CAqHUuHZKIphqMxnNZFXNrkUA7TivhnabtqPFno 51KoCJ6wPcZkc3eKVDcDW0fzpYUzWFrybKMxePyB/hrTXCfJ9DDHg1nv4/YfEWeR9WTt4x W+U+oNuopw+gC5uo5ED6KxmO71vNmwuZrmN22wDhUcHGuMvNI8AGQGQA5mPLZFgY9lK8jB 40uEEscIEkInLNk40y3x3PkXdeTZKqGThQPLnRykY0Z3kR/rqWjBH/wSrhzW5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNRz70DTPzN4x; Tue, 16 Jul 2024 05:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G5CorT056641; Tue, 16 Jul 2024 05:12:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G5CoBL056638; Tue, 16 Jul 2024 05:12:50 GMT (envelope-from git) Date: Tue, 16 Jul 2024 05:12:50 GMT Message-Id: <202407160512.46G5CoBL056638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: db3a524c8a96 - main - bsnmpd: FreeBSD has strlcpy(3) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db3a524c8a965d3adcf03fe08b28b37f63e1126b Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=db3a524c8a965d3adcf03fe08b28b37f63e1126b commit db3a524c8a965d3adcf03fe08b28b37f63e1126b Author: Kyle Evans AuthorDate: 2024-07-16 05:12:29 +0000 Commit: Kyle Evans CommitDate: 2024-07-16 05:12:29 +0000 bsnmpd: FreeBSD has strlcpy(3) Fixes the fortified build of bsnmp, which otherwise fails because of the shadowed declaration. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- usr.sbin/bsnmpd/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bsnmpd/Makefile.inc b/usr.sbin/bsnmpd/Makefile.inc index 876d6f891e7f..7f666307467c 100644 --- a/usr.sbin/bsnmpd/Makefile.inc +++ b/usr.sbin/bsnmpd/Makefile.inc @@ -1,2 +1,3 @@ +CFLAGS+= -DHAVE_STRLCPY PACKAGE= bsnmp .include "../Makefile.inc" From nobody Tue Jul 16 07:35:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNW8Y22XZz5Ql9w; Tue, 16 Jul 2024 07:36:13 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (mailgate.leidinger.net [IPv6:2a00:1828:2000:313::1:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNW8X5mF9z4w1v; Tue, 16 Jul 2024 07:36:12 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; none List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1721115356; 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=1603q+GmBkN3MqMH4LDM9c8JhL+PoDWWcyOC8TCwnn8=; b=ETaW6Iv+9FWSddVBxM20cVK+l2IP+TlPwh0Y+sOMPQeG7m9tJBojEByGoQOqp3SwPvYTe4 KK7azuThdxmAUZs/FH0HCo9QBbwcSJHxm4zkBU2C7h4Q46eXnv1N+m4Rm6SG8v++64OAmQ RyzYmf1dx7+Cb/qrVCK9DOei2IsyWCKpNzLpXqt+wmtCFbEUQgjTZawB6k4IALixItygkH qJWSiIicvAKw6tFkvjMoe8BbA8qCPwsvJWyXpIDL9LTAbltDUGzfr8RH3UNjTI1pPxuamO S7AekynswONIaI4JMJInL6Gh6rt2WlITWzUDc0i0u7PMOgMuhQg1+BsytZT60A== Date: Tue, 16 Jul 2024 09:35:01 +0200 From: Alexander Leidinger To: John Baldwin Cc: Mateusz Guzik , Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile In-Reply-To: <752a3f0a-438e-4465-a8ae-47700e79306d@FreeBSD.org> References: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> <752a3f0a-438e-4465-a8ae-47700e79306d@FreeBSD.org> Message-ID: <281b2b20d14c3a90614e6ee8127666dd@Leidinger.net> Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_9fc0b88989e8e38f60dd43ff24786617"; micalg=pgp-sha256 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34240, ipnet:2a00:1828::/32, country:DE] X-Rspamd-Queue-Id: 4WNW8X5mF9z4w1v This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_9fc0b88989e8e38f60dd43ff24786617 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Am 2024-07-15 22:13, schrieb John Baldwin: > bugs might have been useful in the log as well. I think it's fine if > we want > to have some checks that are always on, but it's currently quite rare > so > needs a bit more rationale in the log than other changes is all. Is this a "we want to keep this permanent" change, or is this a "we see bugs, we don't know more, let's add this to have more people stumble upon it with more info until we know what is causing this and then remove it together with a fix" change? I would tend to understand it as the later (which maybe should lead to a commit to comment this part as such). Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_9fc0b88989e8e38f60dd43ff24786617 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmaWIrQACgkQEg2wmwP4 2Ia65g/9HiFZJNNmbByeSuE59TVZ6jOL+CwLAepcZd7Lbv1U0p7PwXheYn41cCnb YbMQPiPv0nLdF5N/chs8XQwrIC9gxje80Sf2uJlNM7NTTlCyuDUiAnP+WaqhHOdu NxSsXrgltiZRbS6toVWlP348wFMR5FJ/gtjihlHV23D13mR1RkFdaxGnqn/Ru5cZ m5ICMs6NZm+aN+DokWPSri+sXmqkMKmDTwKhQG6ZOctgXGj9EFpRuaQs/F53DVZR Dhaysotl+78qdz4FK9iKYLZetBJvHHyxOGmOeTPWE5+tkH1QbBzK/lXV4A2mAPL/ 5aZ/Md7W/lNXjqnwrb7jV9tSfDwn5inieoKMj0EzkjNriN33XOOxiRotP25Es+Qx vpKQ2nQshNArRgGSrg4+jZcKZHPgawri3tgLM1DGJW01vuN7H9pt0LMnMhlLgLq1 8BlAVARN49ebV3o8SqXfpSWnIvqjNemz/R9SypMsRFvpmTnBCqo2xNKMWPQl47yI bhY06ulpByTl/cKyxFB/JG4cx3PMeMhv21+SnrtatnBxhUhge5GzncGyMO0nAmrm 6B44A3ExTu/IHm8UgjJONLBujyeg2mGYRoBpUmQHFNtdX/06bbqEyj1a5y0cBaUD k8s74bI/7y9fRnJAIuJjAKiH/E2kqd5+Q4PvcWlsA4O2inDvKvk= =kqCO -----END PGP SIGNATURE----- --=_9fc0b88989e8e38f60dd43ff24786617-- From nobody Tue Jul 16 12:26:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNdbx0Qm5z5RDTJ; Tue, 16 Jul 2024 12:26:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNdbx06qyz47D7; Tue, 16 Jul 2024 12:26:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721132813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYgYPgYvyBNe63eZDzLoKza6Md7QoPrLEnHyweV6nBU=; b=ZE/YyJiL9pE+b3Ztar9Jhq9LVxbZ/1v6KGDAudTi13kZwOlr8PrqSezhNhG6FI1JzKsE2j Pbd+iEr2/2AwPbvmJzxXT30qeJMRt+DQPH+kEtGgEqtHUaqRYHYiZH8CmpWYS/1O4bIDWH /5BRaCA6Z1QXgU8/XuXsFbwEWDQxNH2nyMtW7gXa2vfnEcLHSYjAAXMKgK/EE+uuvlU7Jd 3+hSrcgT2+0jcQkSJLp43IoqZtHOzYndC6IcCy36JoAPhkN18OFwD3DxT4fV9JtoP0iz29 YrN7d1pH84QgxJq7I7kVSqqdjqA4LkM1YyM5fu05cWSwCd0p0vpXMsnNfmooaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721132813; a=rsa-sha256; cv=none; b=kEIQvTMaG1/h0Du7kAkffp2JSD0CyFC3EmcGBOLNScV3PV5OjYkk68Oh+YdE1jdRNtydoW VkWfVkXXAHa5fBo2dM+frccBBRXsN59XWlWfh32qqpDIFq9idpQNLiP4nHFGTqyTWCbTaU QpMnPiuFkDsGZ38PQmxTg/sY3gH0UUJdE7pUU1Kl44WoyIlauX/NQNyE6HoYQCaTKWOFzR o1lIwLZ9qWpnaXMhooq5XSp3sm89llaihESIfjOS2Ehba9DKyKWyy7NQDp+N/y5rxR9ksD mJj5WUXszQn2hhhsJo7z/gwjBvwSzfkP9VAU7ZPuhaiXumrSgfTxMTVgl6CfKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721132813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYgYPgYvyBNe63eZDzLoKza6Md7QoPrLEnHyweV6nBU=; b=bwF3+rE74fZtDC5165EjvER4OE1WpRbe35j5ZeL2tv+LIbwbiYSaG+TO8w6sCPeBeMu7Z7 p9CsCvJZDcGOkJKK7H/zFIBOYLO9RVS6oZ+q1eNakBitxQ7FpD8u57ymo16ZAVFRbY9d3Y 1YBJcw2plxb0Nx03RQ7dEQ+nfh/P6M9iUmWZtjztIdm9hqkkCxYskyWYBf46rw4t22Rtqt RbbpK3wYZ8Yhrg2cotknGEVT4Zl/oKY9l3CIdGYkBvdT1jamazF673AvQX9/lj6ntbV40j 5kPEeY6T/pQ05id3FWvR/R9h1Fn0yP/ZD0nAExJIJiDqd06JbGjmo4DESwEtuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNdbw6jBMzc2Y; Tue, 16 Jul 2024 12:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46GCQqFH084133; Tue, 16 Jul 2024 12:26:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46GCQq3B084130; Tue, 16 Jul 2024 12:26:52 GMT (envelope-from git) Date: Tue, 16 Jul 2024 12:26:52 GMT Message-Id: <202407161226.46GCQq3B084130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f2055611fe56 - main - mergemaster: remove from the tree List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2055611fe5624017bd7769c8dc6419c348806ff Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f2055611fe5624017bd7769c8dc6419c348806ff commit f2055611fe5624017bd7769c8dc6419c348806ff Author: Ed Maste AuthorDate: 2023-09-09 13:17:16 +0000 Commit: Ed Maste CommitDate: 2024-07-16 12:25:54 +0000 mergemaster: remove from the tree Mergemaster has been deprecated for many years, replaced by etcupdate(8). Remove it now, in advance of FreeBSD 15.0. PR: 252417 Reviewed by: imp Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45622 --- ObsoleteFiles.inc | 4 + targets/pseudo/userland/Makefile.depend | 1 - usr.sbin/Makefile | 1 - usr.sbin/mergemaster/Makefile | 5 - usr.sbin/mergemaster/Makefile.depend | 10 - usr.sbin/mergemaster/mergemaster.8 | 485 ---------- usr.sbin/mergemaster/mergemaster.sh | 1568 ------------------------------- 7 files changed, 4 insertions(+), 2070 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 19eefda42fe9..f8f0309d6ccf 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20240716: retire mergemaster +OLD_FILES+=usr/sbin/mergemaster +OLD_FILES+=usr/share/man/man8/mergemaster.8.gz + # 20240527: csh: Remove hardlink /.cshrc OLD_FILES+=.cshrc diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend index 378531b68cc1..6a844630c999 100644 --- a/targets/pseudo/userland/Makefile.depend +++ b/targets/pseudo/userland/Makefile.depend @@ -589,7 +589,6 @@ DIRDEPS+= \ usr.sbin/makemap \ usr.sbin/manctl \ usr.sbin/memcontrol \ - usr.sbin/mergemaster \ usr.sbin/mfiutil \ usr.sbin/mixer \ usr.sbin/mld6query \ diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 9d6c90d09461..e039cea6ee16 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -38,7 +38,6 @@ SUBDIR= adduser \ mailwrapper \ makefs \ memcontrol \ - mergemaster \ mfiutil \ mixer \ mlxcontrol \ diff --git a/usr.sbin/mergemaster/Makefile b/usr.sbin/mergemaster/Makefile deleted file mode 100644 index 2edda1b9bc05..000000000000 --- a/usr.sbin/mergemaster/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SCRIPTS=mergemaster.sh -MAN= mergemaster.8 - -.include - diff --git a/usr.sbin/mergemaster/Makefile.depend b/usr.sbin/mergemaster/Makefile.depend deleted file mode 100644 index 11aba52f82cf..000000000000 --- a/usr.sbin/mergemaster/Makefile.depend +++ /dev/null @@ -1,10 +0,0 @@ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/usr.sbin/mergemaster/mergemaster.8 b/usr.sbin/mergemaster/mergemaster.8 deleted file mode 100644 index 20d746de347c..000000000000 --- a/usr.sbin/mergemaster/mergemaster.8 +++ /dev/null @@ -1,485 +0,0 @@ -.\" Copyright (c) 1998-2011 Douglas Barton -.\" 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. -.\" -.Dd April 16, 2024 -.Dt MERGEMASTER 8 -.Os -.Sh NAME -.Nm mergemaster -.Nd merge configuration files, et al during an upgrade -.Sh SYNOPSIS -.Nm -.Op Fl scrvhpCP -.Op Fl a|iFU -.Op Fl -run-updates=[always|never] -.Op Fl m Ar /path/to/sources -.Op Fl t Ar /path/to/temp/root -.Op Fl d -.Op Fl u Ar N -.Op Fl w Ar N -.Op Fl A Ar Target architecture -.Op Fl D Ar /destdir/path -.Sh DESCRIPTION -.Bf -symbolic -The -.Nm -utility is deprecated and may not be available in -.Fx 15.0 -or later. -Users are advised to use -.Xr etcupdate 8 -instead. -.Ef -.Pp -The -.Nm -utility is a Bourne shell script which is designed to aid you -in updating the various configuration and other files -associated with -.Fx . -It is -.Sy HIGHLY -recommended that you back up your -.Pa /etc -directory before beginning this process. -.Pp -The script uses -.Pa /usr/src/Makefile -to build a temporary root environment from -.Pa / -down, populating that environment with the various -files. -You can specify a different source directory -with the -.Fl m -command line option, or specify the destination -directory with the -.Fl D -option. -It then compares each file in that environment -to its installed counterpart. -When the script finds a -change in the new file, or there is no installed -version of the new file it gives you four options to -deal with it. -You can install the new file as is, -delete the new file, merge the old and new -files (as appropriate) using -.Xr sdiff 1 -or leave the file in the temporary root environment to -merge by hand later. -.Pp -By default it creates the temporary root in -.Pa /var/tmp/temproot -and compares the -Version Control System (VCS) Id strings ($FreeBSD) -for files that have them, deleting -the temporary file if the strings match. -If there is -no Id string, or if the strings are different it -compares the files themselves. -You can -also specify that the script ignore the Id strings and -compare every file with the -.Fl s -option. -Using the -.Fl F -option -.Nm -will install the new file for you if they differ only by -VCS strings. -.Pp -The merge menu option is designed to let you easily combine your -customizations from the old version of a file into the new one. -While you can use the merge function to incorporate changes from -files that you have not customized, -it is not recommended. -.Pp -The -.Nm -utility checks your umask and issues a warning for anything -other than 022. -While it is not mandatory to grant -world read permissions for most configuration files, you -may run into problems without them. -If you choose a -umask other than 022 and experience trouble later this -could be the cause. -.Pa /etc/master.passwd -is treated as a special case. -If you choose to install -this file or a merged version of it the file permissions -are always 600 (rw-------) for security reasons. -After -installing an updated version of this file you should -probably run -.Xr pwd_mkdb 8 -with the -.Fl p -option to rebuild your password databases -and recreate -.Pa /etc/passwd . -.Pp -The script uses the owner and group ids -that the files are created with by -.Pa /usr/src/etc/Makefile , -and file permissions as specified by the umask. -Unified diffs are used by default to display any -differences unless you choose context diffs. -.Pp -The -.Nm -utility will source scripts that you specify right before -it starts the comparison, and after it is done running. -The easiest way to handle this is to place the path -to the script(s) in the appropriate variables in your -.Pa .mergemasterrc -file. -The script sourced before comparison is named in -.Ev MM_PRE_COMPARE_SCRIPT , -and the one sourced after the script is done is -.Ev MM_EXIT_SCRIPT . -This is the recommended way to specify local modifications, -or files that you want to give special handling to. -This includes files that you want to be deleted without -being compared. -Because the named scripts are sourced from within -.Nm , -all of the script's variables are available for use in -your custom script. -You can also use -.Pa /etc/mergemaster.rc -which will be read before -.Pa .mergemasterrc . -Options specified on the command line are updated last, -and therefore can override both files. -.Pp -When the comparison is done if there are any files remaining -in the temproot directory they will be listed, and if the -.Fl a -option is not in use the user will be given the option of -deleting the temproot directory. -If there are no files remaining in the temproot directory -it will be deleted. -.Pp -The options are as follows: -.Bl -tag -width Fl -.It Fl s -Perform a strict comparison, diffing every pair of files. -This comparison is performed line by line, -without regard to VCS Ids. -.It Fl c -Use context diffs instead of unified diffs. -.It Fl r -Re-run -.Nm -on a previously cleaned directory, skipping the creation of -the temporary root environment. -This option is compatible -with all other options. -.It Fl v -Be more verbose about the process. -You should probably use -this option the first time you run -.Nm . -This option also gives you a list of files that exist -only in the installed version of -.Pa /etc . -.It Fl a -Run automatically. -This option will leave all the files that -differ from the installed versions in the temporary directory -to be dealt with by hand. -If the -.Pa temproot -directory exists, it creates a new one in a previously -non-existent directory. -This option unsets the verbose flag, -and is not compatible with -.Fl i , -.Fl F , -or -.Fl U . -Setting -.Fl a -makes -.Fl w -superfluous. -.It Fl h -Display usage and help information. -.It Fl i -Automatically install any files that do not exist in the -destination directory. -.It Fl p -Pre-buildworld mode. -Compares only files known to be essential to the success of -{build|install}world, i.e., -.Pa /etc/group -and -.Pa /etc/master.passwd . -.It Fl F -If the files differ only by VCS Id ($FreeBSD) -install the new file. -.It Fl C -After a standard -.Nm -run, -compares your rc.conf[.local] options to the defaults. -.It Fl P -Preserve files that you replace in -.Pa /var/tmp/mergemaster/preserved-files- , -or another directory you specify in your -.Nm -rc file. -.It Fl U -Attempt to auto upgrade files that have not been user modified. -This option can be dangerous when there are critical changes -in the new versions that affect your running system. -.It Fl -run-updates=[always|never] -Specify always or never to run newaliases, pwd_mkdb, etc. -at the end of the comparison run. -If this option is omitted the default is to prompt the user -for each update as necessary. -.It Fl m Ar /path/to/sources -Specify the path to the directory where you want to do the -.Xr make 1 . -(In other words, where your sources are, but -s was already -taken.) -In older versions of -.Nm -the path to -.Pa src/etc -was required. -.Nm -will convert the path if this older method is used. -.It Fl t Ar /path/to/temp/root -Create the temporary root environment in -.Pa /path/to/temp/root -instead of the default -.Pa /var/tmp/temproot . -.It Fl d -Add the date and time to the name of the temporary -root directory. -If -.Fl t -is specified, this option must -follow it if you want the date added too. -.It Fl u Ar N -Specify a numeric umask. -The default is 022. -.It Fl w Ar N -Supply an alternate screen width to the -.Xr sdiff 1 -command in numbers of columns. -The default is 80. -.It Fl A Ar Target architecture -Specify an alternative -.Ev TARGET_ARCH -architecture name. -.It Fl D Ar /path -Specify the destination directory for the installed files. -.El -.Sh ENVIRONMENT -The -.Nm -utility uses the -.Ev PAGER -environment variable if set. -Otherwise it uses -.Xr less 1 . -If -.Ev PAGER -specifies a program outside -its -limited -.Ev PATH -without specifying the full path, -.Nm -prompts you with options on how to proceed. -The -.Ev MM_PRE_COMPARE_SCRIPT -and -.Ev MM_EXIT_SCRIPT -variables are used as described above. -Other variables that are used by the script internally -can be specified in -.Pa .mergemasterrc -as described in more detail below. -.Sh FILES -.Bl -tag -width $HOME/.mergemasterrc -compact -.It Pa /etc/mergemaster.rc -.It Pa $HOME/.mergemasterrc -.El -.Pp -The -.Nm -utility will -.Ic .\& -(source) these files if they exist. -Command line options -will override rc file options. -.Pa $HOME/.mergemasterrc -overrides -.Pa /etc/mergemaster.rc . -Here is an example -with all values commented out: -.Bd -literal -# These are options for mergemaster, with their default values listed -# The following options have command line overrides -# -# The target architecture (-A, unset by default) -#ARCHSTRING='TARGET_ARCH=' -# -# Sourcedir is the directory to do the 'make' in (-m) -#SOURCEDIR='/usr/src' -# -# Directory to install the temporary root environment into (-t) -#TEMPROOT='/var/tmp/temproot' -# -# Specify the destination directory for the installed files (-D) -#DESTDIR= -# -# Strict comparison skips the VCS Id test and compares every file (-s) -#STRICT=no -# -# Type of diff, such as unified, context, etc. (-c) -#DIFF_FLAG='-u' -# -# Install the new file if it differs only by VCS Id ($FreeBSD, -F) -#FREEBSD_ID= -# -# Verbose mode includes more details and additional checks (-v) -#VERBOSE= -# -# Automatically install files that do not exist on the system already (-i) -#AUTO_INSTALL= -# -# Automatically upgrade files that have not been user modified (-U) -# ***DANGEROUS*** -#AUTO_UPGRADE= -# -# Either always or never run newaliases, pwd_mkdb at the end (--run-updates) -#RUN_UPDATES= -# -# Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf (-C) -#COMP_CONFS= -# -# Preserve files that you replace (-P) -#PRESERVE_FILES= -#PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` -# -# The umask for mergemaster to compare the default file's modes to (-u) -#NEW_UMASK=022 -# -# The following options have no command line overrides -# -# Files to always avoid comparing -#IGNORE_FILES='/etc/motd /etc/printcap foo bar' -# -# Additional options for diff. This will get unset when using -s. -#DIFF_OPTIONS='-Bb' # Ignore changes in whitespace -# -# Location to store the list of mtree values for AUTO_UPGRADE purposes -#MTREEDB='/var/db' -# -# For those who just cannot stand including the full path to PAGER -#DONT_CHECK_PAGER= -# -# If you set 'yes' above, make sure to include the PATH to your pager -#PATH=/bin:/usr/bin:/usr/sbin -# -# Delete stale files in /etc/rc.d without prompting -#DELETE_STALE_RC_FILES= -# -# Specify the path to scripts to run before the comparison starts, -# and/or after the script has finished its work -#MM_PRE_COMPARE_SCRIPT= -#MM_EXIT_SCRIPT= -.Ed -.Sh EXIT STATUS -Exit status is 0 on successful completion, or if the user bails out -manually at some point during execution. -.Pp -Exit status is 1 if it fails for one of the following reasons: -.Pp -Invalid command line option -.Pp -Failure to create the temporary root environment -.Pp -Failure to populate the temporary root -.Pp -Presence of the 'nodev' option in -.Pa /etc/fstab -.Pp -Failure to install a file -.Sh EXAMPLES -Typically all you will need to do is type -.Nm -at the prompt and the script will do all the work for you. -.Pp -To use context diffs and have -.Nm -explain more things as it goes along, use: -.Pp -.Dl # mergemaster -cv -.Pp -To specify that -.Nm -put the temporary root environment in -.Pa /usr/tmp/root , -use: -.Pp -.Dl # mergemaster -t /usr/tmp/root -.Pp -To specify a 110 column screen with a strict -comparison, use: -.Pp -.Dl # mergemaster -sw 110 -.Sh SEE ALSO -.Xr diff 1 , -.Xr make 1 , -.Xr less 1 , -.Xr sdiff 1 , -.Xr etcupdate 8 , -.Xr pwd_mkdb 8 -.Pp -.Pa /usr/src/etc/Makefile -.Rs -.%U https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld -.%T The FreeBSD Handbook -.Re -.Sh HISTORY -The -.Nm -utility was first publicly available on one of my -web pages in a much simpler form under the name -.Pa comproot -on 13 March 1998. -The idea for creating the -temporary root environment comes from Nik Clayton's -make world tutorial which is referenced above. -.Sh AUTHORS -This manual page and the script itself were written by -.An Douglas Barton Aq Mt dougb@FreeBSD.org . diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh deleted file mode 100755 index 572415164101..000000000000 --- a/usr.sbin/mergemaster/mergemaster.sh +++ /dev/null @@ -1,1568 +0,0 @@ -#!/bin/sh - -# mergemaster - -# Compare files created by /usr/src/etc/Makefile (or the directory -# the user specifies) with the currently installed copies. - -# Copyright (c) 1998-2012 Douglas Barton, All rights reserved -# Please see detailed copyright below - -PATH=/bin:/usr/bin:/usr/sbin - -display_usage () { - VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` - echo "mergemaster version ${VERSION_NUMBER}" - echo 'Usage: mergemaster [-scrvhpCP] [-a|[-iFU]] [--run-updates=always|never]' - echo ' [-m /path] [-t /path] [-d] [-u N] [-w N] [-A arch] [-D /path]' - echo "Options:" - echo " -s Strict comparison (diff every pair of files)" - echo " -c Use context diff instead of unified diff" - echo " -r Re-run on a previously cleaned directory (skip temproot creation)" - echo " -v Be more verbose about the process, include additional checks" - echo " -a Leave all files that differ to merge by hand" - echo " -h Display more complete help" - echo ' -i Automatically install files that do not exist in destination directory' - echo ' -p Pre-buildworld mode, only compares crucial files' - echo ' -F Install files that differ only by revision control Id ($FreeBSD)' - echo ' -C Compare local rc.conf variables to the defaults' - echo ' -P Preserve files that are overwritten' - echo " -U Attempt to auto upgrade files that have not been user modified" - echo ' ***DANGEROUS***' - echo ' --run-updates= Specify always or never to run newalises, pwd_mkdb, etc.' - echo '' - echo " -m /path/directory Specify location of source to do the make in" - echo " -t /path/directory Specify temp root directory" - echo " -d Add date and time to directory name (e.g., /var/tmp/temproot.`date +%m%d.%H.%M`)" - echo " -u N Specify a numeric umask" - echo " -w N Specify a screen width in columns to sdiff" - echo " -A architecture Alternative architecture name to pass to make" - echo ' -D /path/directory Specify the destination directory to install files to' - echo '' -} - -display_help () { - echo "* To specify a directory other than /var/tmp/temproot for the" - echo " temporary root environment, use -t /path/to/temp/root" - echo "* The -w option takes a number as an argument for the column width" - echo " of the screen. The default is 80." - echo '* The -a option causes mergemaster to run without prompting.' -} - -# Loop allowing the user to use sdiff to merge files and display the merged -# file. -merge_loop () { - case "${VERBOSE}" in - '') ;; - *) - echo " *** Type h at the sdiff prompt (%) to get usage help" - ;; - esac - echo '' - MERGE_AGAIN=yes - while [ "${MERGE_AGAIN}" = "yes" ]; do - # Prime file.merged so we don't blat the owner/group id's - cp -p "${COMPFILE}" "${COMPFILE}.merged" - sdiff -o "${COMPFILE}.merged" --text --suppress-common-lines \ - --width=${SCREEN_WIDTH:-80} "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" - INSTALL_MERGED=V - while [ "${INSTALL_MERGED}" = "v" -o "${INSTALL_MERGED}" = "V" ]; do - echo '' - echo " Use 'i' to install merged file" - echo " Use 'r' to re-do the merge" - echo " Use 'v' to view the merged file" - echo " Default is to leave the temporary file to deal with by hand" - echo '' - echo -n " *** How should I deal with the merged file? [Leave it for later] " - read INSTALL_MERGED - - case "${INSTALL_MERGED}" in - [iI]) - mv "${COMPFILE}.merged" "${COMPFILE}" - echo '' - if mm_install "${COMPFILE}"; then - echo " *** Merged version of ${COMPFILE} installed successfully" - else - echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand later" - fi - unset MERGE_AGAIN - ;; - [rR]) - rm "${COMPFILE}.merged" - ;; - [vV]) - ${PAGER} "${COMPFILE}.merged" - ;; - '') - echo " *** ${COMPFILE} will remain for your consideration" - unset MERGE_AGAIN - ;; - *) - echo "invalid choice: ${INSTALL_MERGED}" - INSTALL_MERGED=V - ;; - esac - done - done -} - -# Loop showing user differences between files, allow merge, skip or install -# options -diff_loop () { - - HANDLE_COMPFILE=v - - while [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" -o \ - "${HANDLE_COMPFILE}" = "NOT V" ]; do - if [ -f "${DESTDIR}${COMPFILE#.}" -a -f "${COMPFILE}" ]; then - if [ -n "${AUTO_UPGRADE}" -a -n "${CHANGED}" ]; then - case "${CHANGED}" in - *:${DESTDIR}${COMPFILE#.}:*) ;; # File has been modified - *) - echo '' - echo " *** ${COMPFILE} has not been user modified." - echo '' - - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} upgraded successfully" - echo '' - # Make the list print one file per line - AUTO_UPGRADED_FILES="${AUTO_UPGRADED_FILES} ${DESTDIR}${COMPFILE#.} -" - else - echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" - fi - return - ;; - esac - fi - if [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" ]; then - echo '' - echo ' ====================================================================== ' - echo '' - ( - echo " *** Displaying differences between installed version and ${COMPFILE}:" - echo '' - diff ${DIFF_FLAG} ${DIFF_OPTIONS} "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" - ) | ${PAGER} - echo '' - fi - else - echo '' - echo " *** There is no installed version of ${COMPFILE}" - echo '' - case "${AUTO_INSTALL}" in - [Yy][Ee][Ss]) - echo '' - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} installed successfully" - echo '' - # Make the list print one file per line - AUTO_INSTALLED_FILES="${AUTO_INSTALLED_FILES} ${DESTDIR}${COMPFILE#.} -" - else - echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand" - fi - return - ;; - *) - NO_INSTALLED=yes - ;; - esac - fi - - echo " Use 'd' to delete the temporary ${COMPFILE}" - echo " Use 'i' to install the temporary ${COMPFILE}" - case "${NO_INSTALLED}" in - '') - echo " Use 'm' to merge the temporary and installed versions" - echo " Use 'v' to view the diff results again" - ;; - esac - echo '' - echo " Default is to leave the temporary file to deal with by hand" - echo '' - echo -n "How should I deal with this? [Leave it for later] " - read HANDLE_COMPFILE - - case "${HANDLE_COMPFILE}" in - [dD]) - rm "${COMPFILE}" - echo '' - echo " *** Deleting ${COMPFILE}" - ;; - [iI]) - echo '' - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} installed successfully" - else - echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand" - fi - ;; - [mM]) - case "${NO_INSTALLED}" in - '') - # interact with user to merge files - merge_loop - ;; - *) - echo '' - echo " *** There is no installed version of ${COMPFILE}" - echo '' - HANDLE_COMPFILE="NOT V" - ;; - esac # End of "No installed version of file but user selected merge" test - ;; - [vV]) - continue - ;; - '') - echo '' - echo " *** ${COMPFILE} will remain for your consideration" - ;; - *) - # invalid choice, show menu again. - echo "invalid choice: ${HANDLE_COMPFILE}" - echo '' - HANDLE_COMPFILE="NOT V" - continue - ;; - esac # End of "How to handle files that are different" - done - unset NO_INSTALLED - echo '' - case "${VERBOSE}" in - '') ;; - *) - sleep 3 - ;; - esac -} - -press_to_continue () { - local DISCARD - echo -n ' *** Press the [Enter] or [Return] key to continue ' - read DISCARD -} - -# Set the default path for the temporary root environment -# -TEMPROOT='/var/tmp/temproot' - -# Read /etc/mergemaster.rc first so the one in $HOME can override -# -if [ -r /etc/mergemaster.rc ]; then - . /etc/mergemaster.rc -fi - -# Read .mergemasterrc before command line so CLI can override -# -if [ -r "$HOME/.mergemasterrc" ]; then - . "$HOME/.mergemasterrc" -fi - -for var in "$@" ; do - case "$var" in - --run-updates*) - RUN_UPDATES=`echo ${var#--run-updates=} | tr [:upper:] [:lower:]` - ;; - *) - newopts="$newopts $var" - ;; - esac -done - -set -- $newopts -unset var newopts - -# Check the command line options -# -while getopts ":ascrvhipCPm:t:du:w:D:A:FU" COMMAND_LINE_ARGUMENT ; do - case "${COMMAND_LINE_ARGUMENT}" in - A) - ARCHSTRING='TARGET_ARCH='${OPTARG} - ;; - F) - FREEBSD_ID=yes - ;; - U) - AUTO_UPGRADE=yes - ;; - s) - STRICT=yes - unset DIFF_OPTIONS - ;; - c) - DIFF_FLAG='-c' - ;; - r) - RERUN=yes - ;; - v) - case "${AUTO_RUN}" in - '') VERBOSE=yes ;; - esac - ;; - a) - AUTO_RUN=yes - unset VERBOSE - ;; - h) - display_usage - display_help - exit 0 - ;; - i) - AUTO_INSTALL=yes - ;; - C) - COMP_CONFS=yes - ;; - P) - PRESERVE_FILES=yes - ;; - p) - PRE_WORLD=yes - unset COMP_CONFS - unset AUTO_RUN - ;; - m) - SOURCEDIR=${OPTARG} - ;; - t) - TEMPROOT=${OPTARG} - ;; - d) - TEMPROOT=${TEMPROOT}.`date +%m%d.%H.%M` - ;; - u) - NEW_UMASK=${OPTARG} - ;; - w) - SCREEN_WIDTH=${OPTARG} - ;; - D) - DESTDIR=${OPTARG} - ;; - *) - display_usage - exit 1 - ;; - esac -done - -if [ -n "$AUTO_RUN" ]; then - if [ -n "$FREEBSD_ID" -o -n "$AUTO_UPGRADE" -o -n "$AUTO_INSTALL" ]; then - echo '' - echo "*** You have included the -a option along with one or more options" - echo ' that indicate that you wish mergemaster to actually make updates' - echo ' (-F, -U, or -i), however these options are not compatible.' - echo ' Please read mergemaster(8) for more information.' - echo '' - exit 1 - fi -fi - -# Assign the location of the mtree database -# -MTREEDB=${MTREEDB:-${DESTDIR}/var/db} -MTREEFILE="${MTREEDB}/mergemaster.mtree" - -# Don't force the user to set this in the mergemaster rc file -if [ -n "${PRESERVE_FILES}" -a -z "${PRESERVE_FILES_DIR}" ]; then - PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` - mkdir -p ${PRESERVE_FILES_DIR} -fi - -# Check for the mtree database in DESTDIR -case "${AUTO_UPGRADE}" in -'') ;; # If the option is not set no need to run the test or warn the user -*) - if [ ! -s "${MTREEFILE}" ]; then - echo '' - echo "*** Unable to find mtree database (${MTREEFILE})." - echo " Skipping auto-upgrade on this run." - echo " It will be created for the next run when this one is complete." - echo '' - case "${AUTO_RUN}" in - '') - press_to_continue - ;; - esac - unset AUTO_UPGRADE - fi *** 1175 LINES SKIPPED *** From nobody Tue Jul 16 19:17:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNpk21r94z5Rp3Z; Tue, 16 Jul 2024 19:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNpk219Zkz41QX; Tue, 16 Jul 2024 19:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721157466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Q1I72ln81V8Mew8u4dYyWVSfdhSOcLpypEuL/cr9Tw=; b=eNTrRGiSf2hV96w4+75+XkjPQcOWBtzt6l3Xx4B+NBO8Hdx3N4kz5EYQwdAkNzLapZndrh KaDPe6IBJvRSbS6+RJlhypc31UZkmSzMcPrUs6YL7eWfvuiXa+WVQCSafsDATESnF9vEM1 9A9ba+0Z2iz5H8x4SawY5Gwjj6oYMvBCL/C9Hl5wEUQGwg8xlUBlqa4qvy5reP2Wp13e7S 91PJy3enRV8Ga6nMGzQUCIuhnfSPbCI74GzDi4JboSQ8cVsUUnQ30VdVcSWDRgruU/mkSM DY6DDnkplba68cu6Zz3Putg7108rdN9qVLwMJvpyM54k5Digi58zw1ApMeARCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721157466; a=rsa-sha256; cv=none; b=yIodWv7nZfnv4jY+sCAJwvI5XPvpCqxd02GPXyafVNn6RFZYHxC2xXY2/nkGgWI48k3hcE oi9P7WU5AwYsFJQo7DXtWd7xyx2cOIaKZye/jjR9FyTsYWBsAlWZJOTugxNFY6j+Z9TjXd MtuzeGdGCk5V6cI175owvwasfjBt8Q3faVr+7kvZPKgZyOr6d+Osbrto0ruxip98zjLJgT rYHH9/CfLHIjCCv0SXPfyqI41HmS+uV1PsvYqyvyfBIN9rgNMa19hNNUPZK4+NiiFPHGKx 8TIYKW/jbFftJIfq3cvPkgQpWrDGIzRNLzGILIS4V1HnycUHFoT28uA8Yi+DbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721157466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Q1I72ln81V8Mew8u4dYyWVSfdhSOcLpypEuL/cr9Tw=; b=FqCLmWjgGK+zVHyBitbiD5FgY6Hxn/DejQF3SQPM/aBqfoTRJkqnwj9gWwZGpj22J3fh1e /1uZKnferdOZjpXFQoeKJjHWsOftNvaH12ZdrT0TUzbh8EY1+K0vx4ngLXwU3NTHewHtUg 0cpGdPpPikiA7SLSTM/L33hC6DWNsjcca5V7teSTZ3IUmCENNVoEJqYUlG2xBcmugDq8fZ +5Ar5wI/McEm1qwpBeDzQRcMtAiUgxueOdBxHmcTDeORqGpLdim3gJXXn74Cd4RdBIpOSC wGYQU6pEEb78wdNQmIcZf8gve/MTZ38ypjNSVWkcIu/lYQyjpEMLu06tIxw8Fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNpk20ZVPzpSH; Tue, 16 Jul 2024 19:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46GJHjZl081590; Tue, 16 Jul 2024 19:17:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46GJHjMk081587; Tue, 16 Jul 2024 19:17:45 GMT (envelope-from git) Date: Tue, 16 Jul 2024 19:17:45 GMT Message-Id: <202407161917.46GJHjMk081587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: afd67a167799 - main - etcupdate(8): improve phrasing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afd67a1677999b0f9d82d29bfd7c767f665e76e8 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=afd67a1677999b0f9d82d29bfd7c767f665e76e8 commit afd67a1677999b0f9d82d29bfd7c767f665e76e8 Author: Ed Maste AuthorDate: 2024-07-16 01:44:11 +0000 Commit: Ed Maste CommitDate: 2024-07-16 19:17:31 +0000 etcupdate(8): improve phrasing Reported by: igor(1) --- usr.sbin/etcupdate/etcupdate.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index 22d3d91bb6eb..bf7ddb792907 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -485,7 +485,7 @@ as additional parameters to when building a .Dq current tree. -This can be used for to set the +This can be used to set the .Dv TARGET or .Dv TARGET_ARCH From nobody Tue Jul 16 20:19:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNr4r2WtVz5Q9SS; Tue, 16 Jul 2024 20:19:08 +0000 (UTC) (envelope-from glebius@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNr4r209cz49X5; Tue, 16 Jul 2024 20:19:08 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721161148; 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=kh1a91itd20Zg/y/ZUW2AeWOcBfItErMltGS6TmU2yQ=; b=whAsJzF6FtTZDKelFXWjpHa/Ym+nIfWIvFqpvc5msxIT6gREjj8It/j/T/8Mm5XggQ/8OC 3f8GvUl/IRUc8A2kSsNLYL52uUgod16ZQ5hjEtbI0iLTV5ld+1naeVktm6jg2ivY8UPmnS bZOjtwDa6gniT8BUTn3WQzuYX8sXZZ8/uHi3dV1ibxvSlRw+ZUXhT0T9Y7qq4gTEu+yvlT 540JkWgphBQBPvfLMowGR987Y2K+F265XnWcTBauavTJubsNruUQTbqU6zVcLp90DYSnhM uXrKrGtDDSWBnLu5T55ZISPJu/xQAmZtMw6zEWn4WpyRKQ28RTrqNagq9JYUbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721161148; a=rsa-sha256; cv=none; b=G7JFT1FIyibSsYlrXvSabUptsbIexXtMTNpOSPVF1V6fbjHkvbRv9bb1br+eMFOP507LbI mdff6Ipmr7qYW0oDzHqaGUqipQg337yj7VTWMv0gGaqiy/m3LtbnU1RzMxpLKEvWwoyKkk LldqT6QteriERttyqyBI/Su9M4mE4fDoVW7smEwGwy0+s8bgUYbS7dx0Mt/93OqeihV0pi 7ALrPjUze2btP1nLIwdX/1dDGh/OfYdWT0WxgPiJnbMXVqmiSPHlAIamrDDFapb2UrlI50 vpr0rqaXuiS672s8Czpo7k/V3jEqxFvqrSOhfz9/Is0K4jSHWw4DCxdixkshvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721161148; 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=kh1a91itd20Zg/y/ZUW2AeWOcBfItErMltGS6TmU2yQ=; b=VWmfphwF5lNQiG2U/swQ83XK+5SVXwHI/YMZVc5JCLkYDn/6KHTu8lZNsOQfvkSBn6sX5Q xriGsqS29hSRtpuN/rchmqBVcMQW3ZChJrC59Kctjo3QB7ddiYjWqnOf04kFbYtOGQuPFc ociDnkKyPDX/ww65fE+x8z3qTBUInSGb79sBUIO88rYLf4pKud8tow0vyEZ2Rqo/y6/f8M QhVvKTuMLzP4fZemlLSX5lOFXFYqe6NhP5gsL4+7lp7YkOCdz4/56JhXXemfTwCcEKhg41 2rsCvOFbVOYpOepUWLsZkVow1Y4CneYaG9fBeCpEGur5NIE4hvg/I+F7hmdhmg== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.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) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WNr4q2mn8zjJp; Tue, 16 Jul 2024 20:19:07 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 16 Jul 2024 13:19:04 -0700 From: Gleb Smirnoff To: Mateusz Guzik Cc: John Baldwin , Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 87ee63bac69d - main - locks: add a runtime check for missing turnstile Message-ID: References: <202407111107.46BB7uSb007077@gitrepo.freebsd.org> <81cfe7ad-cbee-4122-abef-e47ce2b34f05@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Mateusz, On Mon, Jul 15, 2024 at 07:59:42PM +0200, Mateusz Guzik wrote: M> > > locks: add a runtime check for missing turnstile M> > > M> > > There are sometimes bugs which result in the unlock fast path failing, M> > > which in turns causes a not-helpful crash report when dereferencing a M> > > NULL turnstile. Help debugging such cases by pointing out what happened M> > > along with some debug. M> > > M> > > Sponsored by: Rubicon Communications, LLC ("Netgate") I am quite surprised to see such commit from you. You are known to cut a few instruction branches even pessimizing other people setups (yeah, talking about commits like 5091ca26507b), and now you are adding an absolutely useless branch for literally everyone. The fingerprint of the non-INVARIANTS panic for a destroyed or already unlocked mutex/rwlock is well known to anybody who has been hacking on the FreeBSD kernel for the last 20 years. I am very much surprised it is not familiar to you. The sample panic quoted below just immediately rings the bell for me, and giving feedback on this commit for many people, too. Please revert this. Here is what we have at Netflix and I would suggest you to use same practice at Netgate. If there is a panic/issue that we anticipate at our setup and we want extra debugging to be enabled without INVARIANTS, but we don't want to pollute the open source FreeBSD with our own hacks, we provided NASSERT macro in kassert.h, that works exactly same as KASSERT, but is enabled always. "N" stands for Netflix, but it would equally well work for Netgate ;) So, for a KASSERT that we want to be always enabled, we just flip one character K -> N and of course this diff is super easy to resolve during merges. M> Use-after-free, overflow, underflow, bitflip or what have you all can M> fail the fast path. M> M> Once that happens and the kernel crashes with a null pointer deref, M> here is a crash at netgate which prodded this: M> calltrap() at calltrap+0x8/frame 0xfffffe0106720920 M> --- trap 0xc, rip = 0xffffffff80d5ab70, rsp = 0xfffffe01067209f0, rbp M> = 0xfffffe0106720a00 --- M> turnstile_broadcast() at turnstile_broadcast+0x40/frame 0xfffffe0106720a00 M> __rw_wunlock_hard() at __rw_wunlock_hard+0x9e/frame 0xfffffe0106720a30 M> nd6_resolve_slow() at nd6_resolve_slow+0x2d7/frame 0xfffffe0106720aa0 M> nd6_resolve() at nd6_resolve+0x125/frame 0xfffffe0106720b10 M> ether_output() at ether_output+0x4e7/frame 0xfffffe0106720ba0 M> ip_output_send() at ip_output_send+0xdc/frame 0xfffffe0106720be0 M> ip_output() at ip_output+0x1295/frame 0xfffffe0106720ce0 M> ip_forward() at ip_forward+0x3c2/frame 0xfffffe0106720d90 M> ip_input() at ip_input+0x705/frame 0xfffffe0106720df0 M> swi_net() at swi_net+0x138/frame 0xfffffe0106720e60 M> ithread_loop() at ithread_loop+0x257/frame 0xfffffe0106720ef0 M> fork_exit() at fork_exit+0x7f/frame 0xfffffe0106720f30 M> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0106720f30 M> --- trap 0, rip = 0, rsp = 0, rbp = 0 --- M> M> Neither the register dump nor anything in the backtrace indicate what happened. M> M> Since the kernel is going down anyway, one may as well get some debug from it. -- Gleb Smirnoff From nobody Wed Jul 17 07:31:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WP7162kRBz5Ql6S; Wed, 17 Jul 2024 07:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WP7160gw2z4H5w; Wed, 17 Jul 2024 07:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721201514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JXxeCMMmsRI8baQr/Xh8X6PYrc2S8pnzUNkh4LEFRjA=; b=kKp43zTSq6zxL8SKoZh8eUZWx7aPL4lQ/0KqvAtMwp948EUpOJkCMZwiAvPCjBAMjMqZyQ K1WJquQrIzOufRZko5XXIZK10L8B+ASRhgm46AlxF3+V6Ff4arIzJvKxOfVBa1XB4uZ6r3 mA8R/xZIB1NvveLNOtofxVIHOhgerWUc+w3loNQ7IkRMLaP+iRytuPwx8vxmaedkmeACbz zmW2DDALruM1neLU3Jb3f1CoDgqVQasxK71Q0bgf2wJ1pwuTK8O2ExbstlL6c4JN7i72Vs g5YORUB7+JBrj0A0UAgj7UI2NHvDWECSfdrZZU9GBAGSnidQ7N1u6EMbHV77LQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721201514; a=rsa-sha256; cv=none; b=Cq3Q/IFrW/5NZYNXv4zfhk9q3wIK/5+4gAD9X4V/oLHw3zzrfcDSmd2DbgRxODJ3yMZ/b7 YDDI3EROCa7PGcUaHN2juNsdIIaEBrNHfjvfXIgIabsmRLoygfJKHlmuZB2lDAlz2oB2Uo hMUSePpczD6PG+ZqyScEsqKuGf9483CqiCe8OdH4Q9wfvANq3lbjv/IltzS6f8e1t+7EyT ahIB6+HHV9S/MLkK19XqnMJ6aqFNu5LVyxmhqmj588bODqqkFBz3LLgsLy0FaNgM4jnXwe O8u99+KWxDQLEf1rk+/kG+LuFscbadMYEWKoKJr7rNrNHPe88n/QepDyNeodXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721201514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JXxeCMMmsRI8baQr/Xh8X6PYrc2S8pnzUNkh4LEFRjA=; b=ZWw9Dze6J+y8dm3hPCZLY0WtEl96GMIzEpBmPbdueRlusckzcf9aSz3wq1tBERvniX7xUM oHZeaKm8j/eeE6+z2LHSlCo9P3OW3+LRX6w0PRMEubVvRc5UPRX2XAmMTq5sMfWvC6czdo 9/7eHINKWOW4eoqnsGr0yikRW0vzKWRJRzK3wvzGLcH2PIdVInxRCbNO8yKcBxqk/EF8kd fPpzbyKrFGrkURW+CONcrOyYkAiqw0T71c1Mfswj5CXWhgSrDr1jURnM0StRz40icY44mt 2EjZxbfKinamq4z/N8427ed3e3SvhiTc2fLRelJLjzwx2lM19Xrs01xZbR4gcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WP7160Fxqz19rv; Wed, 17 Jul 2024 07:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46H7VrE1033318; Wed, 17 Jul 2024 07:31:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46H7Vr03033315; Wed, 17 Jul 2024 07:31:53 GMT (envelope-from git) Date: Wed, 17 Jul 2024 07:31:53 GMT Message-Id: <202407170731.46H7Vr03033315@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d909f06b907d - main - pf: convert DIOCADDADDR to netlink List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d909f06b907d53ac4cbf9444ae75ca278900b0f3 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d909f06b907d53ac4cbf9444ae75ca278900b0f3 commit d909f06b907d53ac4cbf9444ae75ca278900b0f3 Author: Kristof Provost AuthorDate: 2024-07-16 16:58:59 +0000 Commit: Kristof Provost CommitDate: 2024-07-17 05:52:55 +0000 pf: convert DIOCADDADDR to netlink Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 52 +++++++++++++++++++++ lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/pfctl.c | 2 +- sys/net/pfvar.h | 1 + sys/netpfil/pf/pf_ioctl.c | 117 ++++++++++++++++++++++++---------------------- sys/netpfil/pf/pf_nl.c | 48 +++++++++++++++++++ sys/netpfil/pf/pf_nl.h | 20 ++++++++ 7 files changed, 185 insertions(+), 56 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index b9fba232b8ca..398595c4715f 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1105,6 +1105,19 @@ snl_add_msg_attr_addr_wrap(struct snl_writer *nw, uint32_t type, const struct pf snl_end_attr_nested(nw, off); } +static void +snl_add_msg_attr_pool_addr(struct snl_writer *nw, uint32_t type, const struct pf_pooladdr *pa) +{ + int off; + + off = snl_add_msg_attr_nested(nw, type); + + snl_add_msg_attr_string(nw, PF_PA_IFNAME, pa->ifname); + snl_add_msg_attr_addr_wrap(nw, PF_PA_ADDR, &pa->addr); + + snl_end_attr_nested(nw, off); +} + static void snl_add_msg_attr_rule_addr(struct snl_writer *nw, uint32_t type, const struct pf_rule_addr *addr) { @@ -2737,3 +2750,42 @@ pfctl_begin_addrs(struct pfctl_handle *h, uint32_t *ticket) return (e.error); } +int +pfctl_add_addr(struct pfctl_handle *h, const struct pfioc_pooladdr *pa) +{ + struct snl_writer nw; + struct snl_errmsg_data e = {}; + struct nlmsghdr *hdr; + uint32_t seq_id; + int family_id; + + family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); + if (family_id == 0) + return (ENOTSUP); + + snl_init_writer(&h->ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_ADD_ADDR); + + snl_add_msg_attr_u32(&nw, PF_AA_ACTION, pa->action); + snl_add_msg_attr_u32(&nw, PF_AA_TICKET, pa->ticket); + snl_add_msg_attr_u32(&nw, PF_AA_NR, pa->nr); + snl_add_msg_attr_u32(&nw, PF_AA_R_NUM, pa->r_num); + snl_add_msg_attr_u8(&nw, PF_AA_R_ACTION, pa->r_action); + snl_add_msg_attr_u8(&nw, PF_AA_R_LAST, pa->r_last); + snl_add_msg_attr_u8(&nw, PF_AA_AF, pa->af); + snl_add_msg_attr_string(&nw, PF_AA_ANCHOR, pa->anchor); + snl_add_msg_attr_pool_addr(&nw, PF_AA_ADDR, &pa->addr); + + if ((hdr = snl_finalize_msg(&nw)) == NULL) + return (ENXIO); + + seq_id = hdr->nlmsg_seq; + + if (! snl_send_message(&h->ss, hdr)) + return (ENXIO); + + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + } + + return (e.error); +} diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index eebc97c52565..dd09b061efea 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -498,5 +498,6 @@ int pfctl_get_timeout(struct pfctl_handle *h, uint32_t timeout, uint32_t *second int pfctl_set_limit(struct pfctl_handle *h, const int index, const uint limit); int pfctl_get_limit(struct pfctl_handle *h, const int index, uint *limit); int pfctl_begin_addrs(struct pfctl_handle *h, uint32_t *ticket); +int pfctl_add_addr(struct pfctl_handle *h, const struct pfioc_pooladdr *pa); #endif diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 450c64785b9c..a49e82809f9e 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1727,7 +1727,7 @@ pfctl_add_pool(struct pfctl *pf, struct pfctl_pool *p, sa_family_t af) TAILQ_FOREACH(pa, &p->list, entries) { memcpy(&pf->paddr.addr, pa, sizeof(struct pf_pooladdr)); if ((pf->opts & PF_OPT_NOACTION) == 0) { - if (ioctl(pf->dev, DIOCADDADDR, &pf->paddr)) + if (pfctl_add_addr(pf->h, &pf->paddr) != 0) err(1, "DIOCADDADDR"); } } diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 0b90600a69ae..aa6dd52a7e69 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2525,6 +2525,7 @@ int pf_ioctl_set_timeout(int, int, int *); int pf_ioctl_get_limit(int, unsigned int *); int pf_ioctl_set_limit(int, unsigned int, unsigned int *); int pf_ioctl_begin_addrs(uint32_t *); +int pf_ioctl_add_addr(struct pfioc_pooladdr *); void pf_krule_free(struct pf_krule *); void pf_krule_clear_counters(struct pf_krule *); diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 2cb6923e1e69..2df6bcd30533 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2528,6 +2528,67 @@ pf_ioctl_begin_addrs(uint32_t *ticket) return (0); } +int +pf_ioctl_add_addr(struct pfioc_pooladdr *pp) +{ + struct pf_kpooladdr *pa = NULL; + struct pfi_kkif *kif = NULL; + int error; + +#ifndef INET + if (pp->af == AF_INET) + return (EAFNOSUPPORT); +#endif /* INET */ +#ifndef INET6 + if (pp->af == AF_INET6) + return (EAFNOSUPPORT); +#endif /* INET6 */ + + if (pp->addr.addr.type != PF_ADDR_ADDRMASK && + pp->addr.addr.type != PF_ADDR_DYNIFTL && + pp->addr.addr.type != PF_ADDR_TABLE) + return (EINVAL); + + if (pp->addr.addr.p.dyn != NULL) + return (EINVAL); + + pa = malloc(sizeof(*pa), M_PFRULE, M_WAITOK); + error = pf_pooladdr_to_kpooladdr(&pp->addr, pa); + if (error != 0) + goto out; + if (pa->ifname[0]) + kif = pf_kkif_create(M_WAITOK); + PF_RULES_WLOCK(); + if (pp->ticket != V_ticket_pabuf) { + PF_RULES_WUNLOCK(); + if (pa->ifname[0]) + pf_kkif_free(kif); + error = EBUSY; + goto out; + } + if (pa->ifname[0]) { + pa->kif = pfi_kkif_attach(kif, pa->ifname); + kif = NULL; + pfi_kkif_ref(pa->kif); + } else + pa->kif = NULL; + if (pa->addr.type == PF_ADDR_DYNIFTL && ((error = + pfi_dynaddr_setup(&pa->addr, pp->af)) != 0)) { + if (pa->ifname[0]) + pfi_kkif_unref(pa->kif); + PF_RULES_WUNLOCK(); + goto out; + } + TAILQ_INSERT_TAIL(&V_pf_pabuf, pa, entries); + PF_RULES_WUNLOCK(); + + return (0); + +out: + free(pa, M_PFRULE); + return (error); +} + static int pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { @@ -4199,62 +4260,8 @@ DIOCGETSTATESV2_full: case DIOCADDADDR: { struct pfioc_pooladdr *pp = (struct pfioc_pooladdr *)addr; - struct pf_kpooladdr *pa; - struct pfi_kkif *kif = NULL; -#ifndef INET - if (pp->af == AF_INET) { - error = EAFNOSUPPORT; - break; - } -#endif /* INET */ -#ifndef INET6 - if (pp->af == AF_INET6) { - error = EAFNOSUPPORT; - break; - } -#endif /* INET6 */ - if (pp->addr.addr.type != PF_ADDR_ADDRMASK && - pp->addr.addr.type != PF_ADDR_DYNIFTL && - pp->addr.addr.type != PF_ADDR_TABLE) { - error = EINVAL; - break; - } - if (pp->addr.addr.p.dyn != NULL) { - error = EINVAL; - break; - } - pa = malloc(sizeof(*pa), M_PFRULE, M_WAITOK); - error = pf_pooladdr_to_kpooladdr(&pp->addr, pa); - if (error != 0) - break; - if (pa->ifname[0]) - kif = pf_kkif_create(M_WAITOK); - PF_RULES_WLOCK(); - if (pp->ticket != V_ticket_pabuf) { - PF_RULES_WUNLOCK(); - if (pa->ifname[0]) - pf_kkif_free(kif); - free(pa, M_PFRULE); - error = EBUSY; - break; - } - if (pa->ifname[0]) { - pa->kif = pfi_kkif_attach(kif, pa->ifname); - kif = NULL; - pfi_kkif_ref(pa->kif); - } else - pa->kif = NULL; - if (pa->addr.type == PF_ADDR_DYNIFTL && ((error = - pfi_dynaddr_setup(&pa->addr, pp->af)) != 0)) { - if (pa->ifname[0]) - pfi_kkif_unref(pa->kif); - PF_RULES_WUNLOCK(); - free(pa, M_PFRULE); - break; - } - TAILQ_INSERT_TAIL(&V_pf_pabuf, pa, entries); - PF_RULES_WUNLOCK(); + error = pf_ioctl_add_addr(pp); break; } diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 401baddde948..e855815dd73b 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1509,6 +1509,45 @@ pf_handle_begin_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) return (0); } +#define _OUT(_field) offsetof(struct pf_pooladdr, _field) +static const struct nlattr_parser nla_p_pool_addr[] = { + { .type = PF_PA_ADDR, .off = _OUT(addr), .arg = &addr_wrap_parser, .cb = nlattr_get_nested }, + { .type = PF_PA_IFNAME, .off = _OUT(ifname), .arg = (void *)IFNAMSIZ, .cb = nlattr_get_chara }, +}; +NL_DECLARE_ATTR_PARSER(pool_addr_parser, nla_p_pool_addr); +#undef _OUT + +#define _OUT(_field) offsetof(struct pfioc_pooladdr, _field) +static const struct nlattr_parser nla_p_add_addr[] = { + { .type = PF_AA_ACTION, .off = _OUT(action), .cb = nlattr_get_uint32 }, + { .type = PF_AA_TICKET, .off = _OUT(ticket), .cb = nlattr_get_uint32 }, + { .type = PF_AA_NR, .off = _OUT(nr), .cb = nlattr_get_uint32 }, + { .type = PF_AA_R_NUM, .off = _OUT(r_num), .cb = nlattr_get_uint32 }, + { .type = PF_AA_R_ACTION, .off = _OUT(r_action), .cb = nlattr_get_uint8 }, + { .type = PF_AA_R_LAST, .off = _OUT(r_last), .cb = nlattr_get_uint8 }, + { .type = PF_AA_AF, .off = _OUT(af), .cb = nlattr_get_uint8 }, + { .type = PF_AA_ANCHOR, .off = _OUT(anchor), .arg = (void *)MAXPATHLEN, .cb = nlattr_get_chara }, + { .type = PF_AA_ADDR, .off = _OUT(addr), .arg = &pool_addr_parser, .cb = nlattr_get_nested }, +}; +static const struct nlfield_parser nlf_p_add_addr[] = {}; +#undef _OUT +NL_DECLARE_PARSER(add_addr_parser, struct genlmsghdr, nlf_p_add_addr, nla_p_add_addr); + +static int +pf_handle_add_addr(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + struct pfioc_pooladdr attrs = { 0 }; + int error; + + error = nl_parse_nlmsg(hdr, &add_addr_parser, npt, &attrs); + if (error != 0) + return (error); + + error = pf_ioctl_add_addr(&attrs); + + return (error); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser, &addrule_parser, @@ -1519,6 +1558,8 @@ static const struct nlhdr_parser *all_parsers[] = { &set_debug_parser, &set_timeout_parser, &set_limit_parser, + &pool_addr_parser, + &add_addr_parser, }; static int family_id; @@ -1657,6 +1698,13 @@ static const struct genl_cmd pf_cmds[] = { .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, }, + { + .cmd_num = PFNL_CMD_ADD_ADDR, + .cmd_name = "ADD_ADDR", + .cmd_cb = pf_handle_add_addr, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index d50b5a1e9d43..2459fdc15a63 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -55,6 +55,7 @@ enum { PFNL_CMD_SET_LIMIT = 17, PFNL_CMD_GET_LIMIT = 18, PFNL_CMD_BEGIN_ADDRS = 19, + PFNL_CMD_ADD_ADDR = 20, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) @@ -356,6 +357,25 @@ enum pf_begin_addrs_types_t { PF_BA_TICKET = 1, /* u32 */ }; +enum pf_pool_addr_types_t { + PF_PA_UNSPEC, + PF_PA_ADDR = 1, /* nested, pf_addr_wrap */ + PF_PA_IFNAME = 2, /* string */ +}; + +enum pf_add_addr_types_t { + PF_AA_UNSPEC, + PF_AA_ACTION = 1, /* u32 */ + PF_AA_TICKET = 2, /* u32 */ + PF_AA_NR = 3, /* u32 */ + PF_AA_R_NUM = 4, /* u32 */ + PF_AA_R_ACTION = 5, /* u8 */ + PF_AA_R_LAST = 6, /* u8 */ + PF_AA_AF = 7, /* u8 */ + PF_AA_ANCHOR = 8, /* string */ + PF_AA_ADDR = 9, /* nested, pf_pooladdr */ +}; + #ifdef _KERNEL void pf_nl_register(void); From nobody Wed Jul 17 12:43:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPFwc2fjZz5RFYx; Wed, 17 Jul 2024 12:43:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPFwc1qF5z4kG8; Wed, 17 Jul 2024 12:43:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721220208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IqyN/awVg6nPk85Vcj4NB1/TsYM1eOQzWwYqGYZutO8=; b=hwYbTJyorcyjBbNM/zYNYrlE8AXLYy/dQMnI9UYCNDikwsh5r4DH5Cri3gELAy2lbUJ4HP LnlnxkUnkZjeSNthOY8nwW/4Xnjj5HQllQB6uYED9tKkLVxT//xUhCl7pjQb3chXj34xe1 yhKD7SMFqWZRVTnR5I3TEHNvvCh24gmuSw1znJL+O5McWZNFbWim2pW45GcPxYzrmEfUCy 4qrEYH9CIkWapANuhj0imby57Rlw1Wy00U86Bl6dV3ZkOs1wXb7tRvztul1ajrgFfi2aNe mpG2snP2+wNmxqnpYROPsns6CF0elV8AGlcogRidPluZ7/AXiSVo4Qj+oEjTmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721220208; a=rsa-sha256; cv=none; b=OLBS7br8y9cuyUom6+4oIFLCkgYfrPOMUBBp4aF6xV1ayCxaZHtslYZ9YM0u+fB8yXuW+K 1/gxG3W+5RzWfcudupr7TCbOQnN0NJgsw9qeIIsTebXSHG++UIMamfpbmUHfM/tgrViWLA X/vAHpAZr0pC865cvUYDlia8kUuVKibvR6iYaSBkBdP21FIOz8ThDQ6lVlCLL1Xe90jHzF eYZVZPyVwbKpfN1amGuqAQotLDiFqHebOpMsKDroOXvbzNMh408bM8/AMnEB8NfYlbmKXF l+VnE9Ul97Y9KV/xy9l+LWUFE/PXSWkX5jZagiqPumNE63rKG9kAGKAk9/57Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721220208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IqyN/awVg6nPk85Vcj4NB1/TsYM1eOQzWwYqGYZutO8=; b=jORC7wMh0hOasWaB/ZCPmOHufdh5A9DXex+dU19GGHii3x5FslzgzgReP1RUJRdeMxO8Ad WFjq+iPlmlMmq5nPP5nH25hQEjr0LbvGJV4IS0QxtW/Qo6cscvT9AaZOacHUcxtFUgNZMt vzfnzbHWMVB3r+xBIaBUh7dJ257Sv2lPyfI4gPwBNcSiKlkBfgNC1a+mTa6o8ZK4bQNE/5 BbQkCsBqkvKfvX9RI4/E6TWdH8PvWoTHDv+CVaorjsUOlTwVcZnyHIV6QpRDjv78KOtTmW yg/JemwnLL80up8h9Wn//AAqpd16w7QjBpt3MbXSv6ATopFvNq2QChg9wlYu5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPFwc1Qdyz1KZl; Wed, 17 Jul 2024 12:43:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46HChSnj062425; Wed, 17 Jul 2024 12:43:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HChSZQ062422; Wed, 17 Jul 2024 12:43:28 GMT (envelope-from git) Date: Wed, 17 Jul 2024 12:43:28 GMT Message-Id: <202407171243.46HChSZQ062422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: e21e8c918086 - main - tools/build: Unbreak cross build by providing stub ssp/ssp.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e21e8c918086ad130a3caa5116efc64e86f4574f Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=e21e8c918086ad130a3caa5116efc64e86f4574f commit e21e8c918086ad130a3caa5116efc64e86f4574f Author: Jessica Clarke AuthorDate: 2024-07-17 12:11:25 +0000 Commit: Jessica Clarke CommitDate: 2024-07-17 12:11:25 +0000 tools/build: Unbreak cross build by providing stub ssp/ssp.h We build arc4random.c on non-FreeBSD, which now wants the header for __ssp_real. Fixes: d0b7445904f5 ("include: ssp: fortify ") --- tools/build/cross-build/include/common/ssp/ssp.h | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tools/build/cross-build/include/common/ssp/ssp.h b/tools/build/cross-build/include/common/ssp/ssp.h new file mode 100644 index 000000000000..2d8b43235baf --- /dev/null +++ b/tools/build/cross-build/include/common/ssp/ssp.h @@ -0,0 +1,34 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Jessica Clarke + * + * 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. + */ + +#ifndef _SSP_SSP_H_ +#define _SSP_SSP_H_ + +#define __ssp_real_(fun) fun +#define __ssp_real(fun) __ssp_real_(fun) + +#endif From nobody Wed Jul 17 13:00:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPGHs3mZTz5RHLV; Wed, 17 Jul 2024 13:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPGHs38Xyz4lBy; Wed, 17 Jul 2024 13:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721221209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j57qyDQZmzHnZJwbz/d/cwlK9sl0+rmflmhfz466Fn8=; b=BQbC28LsVHxkhHSuvorazyJf01bk+oC1TPJNTyTVRunoFXSwCrqoc3BS5CNE36KesaNIMQ 0zpK5qyNZHFuIVV95LBagUWNPWean3xnm18Mz2RIo2ZhdUeYAALz/kKyAPGkRajx2skSXC qonpO66YTmzmGXSndcPieEnz1mGMzM6R5/od0NsdIl/F1sEy4HnBuFNoyZdJnQ2OEr3Uw7 +ZtjEfijHlmaW6RXYUAFmaUKKk1dBNgqiQAv8/6G6B9nkzfqk5PK8ZTgyQK0mO4qm83vh6 l96WABA55rG5z/XKea5DFnBBDZRQBdcNxXan7ZkUVseJvYcwZV9eDwmZkKwhEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721221209; a=rsa-sha256; cv=none; b=KuD0R4wKzpHuHiOC5Cy9Dth8D5mDrWegzu8JN+3GZ7aB6tMwyYZ1gICICKeI0i5rO/Vw2G sBMuiYkQBU1z5TipQFT7lASM9TYak0ySQ0MrNrK/l2KNvsajxYAbImTvAFETYJ63ggxDBu j0OKoQ4tSKpZ36kBqmwYOpgMWxFUnkrzGrzs+WJKUJTTatVrsGfF/JZ8JYWy3HbSMQuwqy qflF3RLe+qGNewYFnLBr41RWpm/+XkXf4ol+nBUAVBpLfp94NqvV4nOsfMMHSsz1puljqu jhtEemYz0+gKCvU2scX04miHoH280TZHF2vvco7OJ5xeQZqSmQoTSN0cEee22A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721221209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j57qyDQZmzHnZJwbz/d/cwlK9sl0+rmflmhfz466Fn8=; b=UeeQsl+MtTj8Usabc+b3CvVOud9NhrLEwgufBwNytM4JUuEdMHXD/1voz2L4uh3/ioRt1W PqbQX9T6GQ9MrfTn6x7oETu0xeeLoH2RjHXNQWP/YGAsW0dEb7avT9B1v339SaKsFNsnWJ NFGCa1H4NyuZJ/abxX+1kBiFcPkHQb8OgQnaqplWrTos8SSkFmntVFnynY4SWpqqpK4VEY 1kWo/p0hwAVbw95IDDdPP2sB7TrIhfFiyRlyxdfVY4xWnXlr9IokfYt2wjiVj7N8mf9tBV e6/RND4sX/GzpwJefUbSKfd+5hBsVnT0t7gfk7sSc7VlzqSb4QkEZSxsnfNnww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPGHs2hvTz1Kb7; Wed, 17 Jul 2024 13:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46HD099J084374; Wed, 17 Jul 2024 13:00:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HD09us084362; Wed, 17 Jul 2024 13:00:09 GMT (envelope-from git) Date: Wed, 17 Jul 2024 13:00:09 GMT Message-Id: <202407171300.46HD09us084362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: ac0c8c1186f7 - main - dts: Fix arm/qcom-ipq4018-rt-ac58u.dts for recent device-tree versions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac0c8c1186f7a45f106b16ef57e303476ce6741a Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=ac0c8c1186f7a45f106b16ef57e303476ce6741a commit ac0c8c1186f7a45f106b16ef57e303476ce6741a Author: Jessica Clarke AuthorDate: 2024-07-17 12:55:49 +0000 Commit: Jessica Clarke CommitDate: 2024-07-17 12:55:49 +0000 dts: Fix arm/qcom-ipq4018-rt-ac58u.dts for recent device-tree versions The included file has recently moved to a subdirectory. This fixes building arm.armv7 ASUS_AC1300 (marked NO_UNIVERSE). Fixes: f126890ac538 ("Import device-tree files from Linux 6.5") --- sys/dts/arm/qcom-ipq4018-rt-ac58u.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts b/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts index 7db535b881dc..baaa4c2e9d5f 100644 --- a/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts +++ b/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "qcom-ipq4019.dtsi" +#include "qcom/qcom-ipq4019.dtsi" #include "qcom-ipq4019-ethernet.dtsi" #include From nobody Wed Jul 17 13:00:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPGHt4W1Dz5RHTw; Wed, 17 Jul 2024 13:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPGHt3zcLz4lC2; Wed, 17 Jul 2024 13:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721221210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Vp1b9eKHjBV5Df1wwk41QS/AaV9ycVDMo5EsUrIOmM=; b=s2pl6v5xB9IWsl87o+h1hfCph8OoIhDQQP8Qj/CzLmzkhfnkzak/tejBkBujBAcjMbia3C 5hM/ss9yK9G1wWFsmB4lPPZXRR/XOCGjs+OWPa1LnCpcUH/7GClmr/NHsow3lcnEt/fIt0 jPXtpbcepGpM7Y1TqhJLvQp4byQG9OsOs+6JYz6dEvNOpSGVPo2vV2yejisR4JKBuwNNp2 2m/PjwZtJQRWx0zi1rrqP4BdwoGQjMmukz8QKJaqlI63hAgeOhibuLzgnU4bjJCs3U3ufN CJbHV5YhnRT+cY1Or4XIjdAzNeN6Bh0sp6ACTVswHMhoDLJxenL61vqeRBmBUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721221210; a=rsa-sha256; cv=none; b=cS1mUdC8o/zSZWyGHgvs3lDO4IpEU2HhbV7HKiWhsfGQP4OwDbRB2m3aL63Y7ss0rrXY1P aBV7NZ6DpqdvUSXaMqKTNWFU1hDoV93Z92ecHa0TNIz2sVJpcilxoJeiiv8VlW3ztkdEQk B/rqolKSVKsqw2WmJ8aJFUS9eA1gKk7we+o7J2KYNVZ6njdCntfKkiiwZhADsx6LTp9Epi xjBcN0uDs4V5vYKs7cq4hQjGzAIrmovkFRTBldSmi/lm0z9oE8M82eVyRso4ZPR/SD59dN 3HDuQGALb/IC6GEOHC3A5gQt45Cm6QXg7A0yQTXEXEQ9C36QUVZ5qIDF29Kdiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721221210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Vp1b9eKHjBV5Df1wwk41QS/AaV9ycVDMo5EsUrIOmM=; b=LXSP5UPGQqq34+gopmFm1FcqFMQqa8ikqjwqYSYe2vQGfNUkqCUtfX8uegghLg67O9OELy yIdP/tlOr/0Qwgbu7yaUmV4dV4yz9dN9NFxZPBjLxYMQ5cOD+PJ7oua3vDYulBiHeMHqQH +P/5gg1btkj/p2ZY70vlvlfb6P1zB3LVzvREwCVPAmz/3jwklsJBX/xR8qobBzm/6S+gZR xR5q5IyoMmpr/XDwdUqRGrWswhBndtS/vDCeBouMaMlTD0MGilVthDqPAZADj+pvjOTr/4 v/gsM9Cy6jTD4M2xFDqiy4FaAweEYy5UkXNmWJ204++BGp6WflwPsNVnunH32Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPGHt3c40z1KhT; Wed, 17 Jul 2024 13:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46HD0AXT085048; Wed, 17 Jul 2024 13:00:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HD0AHq085043; Wed, 17 Jul 2024 13:00:10 GMT (envelope-from git) Date: Wed, 17 Jul 2024 13:00:10 GMT Message-Id: <202407171300.46HD0AHq085043@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: c24e5fcca9c2 - main - mvs: Fix to use rman_get_rid rather than non-existent rid argument List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c24e5fcca9c2f2cacaf3d7883f0ecb4d5a4747cc Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c24e5fcca9c2f2cacaf3d7883f0ecb4d5a4747cc commit c24e5fcca9c2f2cacaf3d7883f0ecb4d5a4747cc Author: Jessica Clarke AuthorDate: 2024-07-17 12:59:13 +0000 Commit: Jessica Clarke CommitDate: 2024-07-17 12:59:13 +0000 mvs: Fix to use rman_get_rid rather than non-existent rid argument This got missed as it's not built in a normal tinderbox build. This fixes building arm.armv7 ARMADAXP (marked NO_UNIVERSE). Fixes: 9dbf5b0e6876 ("new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE") --- sys/dev/mvs/mvs_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c index 00a868140a0e..b48321b04955 100644 --- a/sys/dev/mvs/mvs_soc.c +++ b/sys/dev/mvs/mvs_soc.c @@ -372,7 +372,7 @@ mvs_release_resource(device_t dev, device_t child, struct resource *r) rman_release_resource(r); return (0); case SYS_RES_IRQ: - if (rid != ATA_IRQ_RID) + if (rman_get_rid(r) != ATA_IRQ_RID) return ENOENT; return (0); } From nobody Wed Jul 17 13:52:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPHRx6dcqz5RMbV; Wed, 17 Jul 2024 13:52:13 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPHRx69yPz4qsw; Wed, 17 Jul 2024 13:52:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721224333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RALK9G/2qEus3rr0U9iVQh85REoDxY2ijR0AsS/6AcQ=; b=p4Pnl0wVprY1l9A7eps5dNQFwL1+63/I26upCiTjkre+jIFU5J4/8vrEcA5o5cCFPi/QL6 S3RyqyCSmeENKAz5ouWi4mzIcIYh4KxUS5HmZ+VOXLBcnWuujj7rwSmHJL39y6pDA3p5z1 bJyQ1KXzHLupCeROkN003+QosgtOsSqeMBll0nIfpzrM0DjQbiOMbSCUPPP5n7QKTwSP2Z o+uRxAO72HJdkBRX+4700FlKxaweowhTX0ujJUIm2VmMhKhFlERBLSYfr7mILc0JJyhnQ0 bD7WQjKt+5/cbxO0Hl02SprDJd0dwBsJcSI7ra7nZR3fbPiQ9TNcbrxdswS6Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721224333; a=rsa-sha256; cv=none; b=jBcA6cVuQzmk+4fxIcBYCWK2M3j9PJjpR08tW62p00zo2KIuHB1RHMn3uilktS5lZY3Xlq lIPZ6RkBYoPEaXKvYozM/Z6X04v9vCIJ7dl/hY0fjKyMyPfhWJYAsKFT2xPPpPLpoS6AKp /Mjt5yN1nUAo1OHpqPuRgq1OM+ZDr7tIZrsQ7eRp7uCd8MLzolYI61Lsn1NVVBeGRDq4H4 gtlPx95bpNKafuipFsWpMEbJM3/pfWHAouNyJpx7WS/tbW8zhFyAIcKH1BJYR5ijPWkyAz i4EJRQqpRP/gA9dfciNmj7Z8xZRi5BHmR+Q+TjeOHCuPMpIP3OQVamLHOMXxbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721224333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RALK9G/2qEus3rr0U9iVQh85REoDxY2ijR0AsS/6AcQ=; b=cqfIT3sJf6d38tVg/ojZUmr/5HTeDKMtk32Ec8IvjWkLprs14OqxP8dNKiC5EW8J9AY0tG nYH3t6B/pOHwVEAWhRdhvBNX3g7zZdLv2aTNtDUPyj29JFKhqpwuSLDRD1xWHL2XfqSV1C 0YG2AKbt+iwqil917CDynUH+Yut4KVFwujXl38XevAQmOWGzjciLppYl0a+yXapJ/OTMj+ +MHhqyx2HUd4lA6RY5cVGpnqH6wUwLURNC5OibVULcJeZHKlfR4gRE6qmBviVfzPl7Qtyk FG3+IvFEvQX7uZvDCJWO8ywAVR6sY/MQgglRYE0gvkJjOF32X6Cx78kmzKilTw== Received: from [IPV6:2601:5c0:4200:b830:692e:5caf:134a:ed7b] (unknown [IPv6:2601:5c0:4200:b830:692e:5caf:134a:ed7b]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WPHRx4KlZz1KXg; Wed, 17 Jul 2024 13:52:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <692c082f-c6e5-4988-911b-3215838510c3@FreeBSD.org> Date: Wed, 17 Jul 2024 09:52:12 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 838b6caababb - main - openssl: use getrandom(2) instead of probing for getentropy(2) Content-Language: en-US To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407160512.46G5CjpV056391@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202407160512.46G5CjpV056391@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 T24gNy8xNi8yNCAwMToxMiwgS3lsZSBFdmFucyB3cm90ZToNCj4gVGhlIGJyYW5jaCBtYWlu IGhhcyBiZWVuIHVwZGF0ZWQgYnkga2V2YW5zOg0KPiANCj4gVVJMOiBodHRwczovL2NnaXQu RnJlZUJTRC5vcmcvc3JjL2NvbW1pdC8/aWQ9ODM4YjZjYWFiYWJiYWFhYjY1NjU5ZDQwYTQx YzJkZDQ2YjNhNWZkMg0KPiANCj4gY29tbWl0IDgzOGI2Y2FhYmFiYmFhYWI2NTY1OWQ0MGE0 MWMyZGQ0NmIzYTVmZDINCj4gQXV0aG9yOiAgICAgS3lsZSBFdmFucyA8a2V2YW5zQEZyZWVC U0Qub3JnPg0KPiBBdXRob3JEYXRlOiAyMDI0LTA3LTE2IDA1OjEyOjI3ICswMDAwDQo+IENv bW1pdDogICAgIEt5bGUgRXZhbnMgPGtldmFuc0BGcmVlQlNELm9yZz4NCj4gQ29tbWl0RGF0 ZTogMjAyNC0wNy0xNiAwNToxMjoyNyArMDAwMA0KPiANCj4gICAgICBvcGVuc3NsOiB1c2Ug Z2V0cmFuZG9tKDIpIGluc3RlYWQgb2YgcHJvYmluZyBmb3IgZ2V0ZW50cm9weSgyKQ0KPiAg ICAgIA0KPiAgICAgIFRoZSBwcm9iaW5nIGZvciBnZXRlbnRyb3B5KDIpIHJlbGllcyBvbiBy ZS1kZWNsYXJpbmcgZ2V0ZW50cm9weSgyKQ0KPiAgICAgIGFzIHdlYWsgYW5kIGNoZWNraW5n IHRoZSBhZGRyZXNzLCBidXQgdGhpcyBpcyBpbmNvbXBhdGlibGUgd2l0aA0KPiAgICAgIHRo ZSBfRk9SVElGWV9TT1VSQ0Ugc3ltYm9sIHJlbmFtaW5nIHNjaGVtZS4gIEl0J3MgYWx3YXlz IHByZXNlbnQgb24NCj4gICAgICBhbGwgc3VwcG9ydGVkIEZyZWVCU0QgdmVyc2lvbnMgbm93 IHNvIHdlIGNvdWxkIGN1dCBpdCBkb3duIHRvDQo+ICAgICAgdW5jb25kaXRpb25hbCB1c2Us IGJ1dCB0aGVyZSdzIGFub3RoZXIgc2VnbWVudCBmb3IgZ2V0cmFuZG9tKDIpDQo+ICAgICAg YWxyZWFkeSB0aGF0J3MgY2xlYW5lciB0byBqdXN0IGFkZCB1cyB0by4NCj4gICAgICANCj4g ICAgICBXZSBzaG91bGQgdXBzdHJlYW0gdGhpcy4NCj4gICAgICANCj4gICAgICBSZXZpZXdl ZCBieTogICAga2liIChlYXJsaWVyIHZlcnNpb24pLCBtYXJrag0KPiAgICAgIFNwb25zb3Jl ZCBieTogICBLbGFyYSwgSW5jLg0KPiAgICAgIFNwb25zb3JlZCBieTogICBTdG9ybXNoaWVs ZA0KPiAgICAgIERpZmZlcmVudGlhbCBSZXZpc2lvbjogIGh0dHBzOi8vcmV2aWV3cy5mcmVl YnNkLm9yZy9ENDU5NzYNCg0KQ3VyaW91c2x5LCB3aGlsZSB0aGlzIGJ1aWxkcyBmaW5lIG9u IEdDQyAxMywgaXQgZmFpbHMgZm9yIG1lIG9uIEdDQyAxNCAod2hpY2gNCkkndmUganVzdCBt YWRlIGEgcG9ydCBmb3IgYW5kIHN0YXJ0ZWQgdGVzdGluZyk6DQoNCi91c3IvbG9jYWwvYmlu L3g4Nl82NC11bmtub3duLWZyZWVic2QxNC4xLWdjYzE0IC0tc3lzcm9vdD0vdXNyL29iai9n Y2MxNC91c3IvaG9tZS9qb2huL3dvcmsvZnJlZWJzZC9tYWluL2FtZDY0LmFtZDY0L3RtcCAt Qi91c3IvbG9jYWwveDg2XzY0LXVua25vd24tZnJlZWJzZDE0LjEvYmluLyAgLU8yIC1waXBl IC1mbm8tY29tbW9uICAgLUkvdXNyL2hvbWUvam9obi93b3JrL2ZyZWVic2QvbWFpbi9jcnlw dG8vb3BlbnNzbCAtSS91c3IvaG9tZS9qb2huL3dvcmsvZnJlZWJzZC9tYWluL2NyeXB0by9v cGVuc3NsL2luY2x1ZGUgLUkvdXNyL2hvbWUvam9obi93b3JrL2ZyZWVic2QvbWFpbi9jcnlw dG8vb3BlbnNzbC9wcm92aWRlcnMvY29tbW9uL2luY2x1ZGUgLUkvdXNyL2hvbWUvam9obi93 b3JrL2ZyZWVic2QvbWFpbi9jcnlwdG8vb3BlbnNzbC9wcm92aWRlcnMvaW1wbGVtZW50YXRp b25zL2luY2x1ZGUgLURMX0VORElBTiAtRE9QRU5TU0xfQ1BVSURfT0JKIC1ET1BFTlNTTF9J QTMyX1NTRTIgLURPUEVOU1NMX0JOX0FTTV9NT05UIC1ET1BFTlNTTF9CTl9BU01fTU9OVDUg LURPUEVOU1NMX0JOX0FTTV9HRjJtIC1EU0hBMV9BU00gLURTSEEyNTZfQVNNIC1EU0hBNTEy X0FTTSAtREtFQ0NBSzE2MDBfQVNNIC1EUkM0X0FTTSAtRE1ENV9BU00gLURBRVNfQVNNIC1E QlNBRVNfQVNNIC1EVlBBRVNfQVNNIC1EV0hJUkxQT09MX0FTTSAtREdIQVNIX0FTTSAtRENN TExfQVNNIC1ERUNQX05JU1RaMjU2X0FTTSAtRFgyNTUxOV9BU00gLURQQURMT0NLX0FTTSAt RFBPTFkxMzA1X0FTTSAtRE9QRU5TU0xESVI9IlwiL2V0Yy9zc2xcIiIgLURFTkdJTkVTRElS PSJcIi91c3IvbGliL2VuZ2luZXMtM1wiIiAtRE1PRFVMRVNESVI9IlwiL3Vzci9saWIvb3Nz bC1tb2R1bGVzXCIiIC1ETkRFQlVHIC1JL3Vzci9ob21lL2pvaG4vd29yay9mcmVlYnNkL21h aW4vY3J5cHRvL29wZW5zc2wvY3J5cHRvIC1JL3Vzci9ob21lL2pvaG4vd29yay9mcmVlYnNk L21haW4vY3J5cHRvL29wZW5zc2wvY3J5cHRvL2VjL2N1cnZlNDQ4IC1JL3Vzci9ob21lL2pv aG4vd29yay9mcmVlYnNkL21haW4vY3J5cHRvL29wZW5zc2wvY3J5cHRvL2VjL2N1cnZlNDQ4 L2FyY2hfMzIgLUkvdXNyL2hvbWUvam9obi93b3JrL2ZyZWVic2QvbWFpbi9jcnlwdG8vb3Bl bnNzbC9jcnlwdG8vbW9kZXMgLUkvdXNyL29iai9nY2MxNC91c3IvaG9tZS9qb2huL3dvcmsv ZnJlZWJzZC9tYWluL2FtZDY0LmFtZDY0L3NlY3VyZS9saWIvbGliY3J5cHRvIC1nIC1NRCAg LU1GLmRlcGVuZC5yYW5kX3VuaXgubyAtTVRyYW5kX3VuaXgubyAtc3RkPWdudTk5IC1Xbm8t Zm9ybWF0LXplcm8tbGVuZ3RoIC1mc3RhY2stcHJvdGVjdG9yLXN0cm9uZyAtV25vLXBvaW50 ZXItc2lnbiAtV2RhdGUtdGltZSAtV25vLWVycm9yPWFkZHJlc3MgLVduby1lcnJvcj1hcnJh eS1ib3VuZHMgLVduby1lcnJvcj1hdHRyaWJ1dGVzIC1Xbm8tZXJyb3I9Ym9vbC1jb21wYXJl IC1Xbm8tZXJyb3I9Y2FzdC1hbGlnbiAtV25vLWVycm9yPWNsb2JiZXJlZCAtV25vLWVycm9y PWRlcHJlY2F0ZWQtZGVjbGFyYXRpb25zIC1Xbm8tZXJyb3I9ZW51bS1jb21wYXJlIC1Xbm8t ZXJyb3I9ZXh0cmEgLVduby1lcnJvcj1sb2dpY2FsLW5vdC1wYXJlbnRoZXNlcyAtV25vLWVy cm9yPXN0cmljdC1hbGlhc2luZyAtV25vLWVycm9yPXVuaW5pdGlhbGl6ZWQgLVduby1lcnJv cj11bnVzZWQtZnVuY3Rpb24gLVduby1lcnJvcj11bnVzZWQtdmFsdWUgLVduby1lcnJvcj1l bXB0eS1ib2R5IC1Xbm8tZXJyb3I9bWF5YmUtdW5pbml0aWFsaXplZCAtV25vLWVycm9yPW5v bm51bGwtY29tcGFyZSAtV25vLWVycm9yPXNoaWZ0LW5lZ2F0aXZlLXZhbHVlIC1Xbm8tZXJy b3I9dGF1dG9sb2dpY2FsLWNvbXBhcmUgLVduby1lcnJvcj11bnVzZWQtY29uc3QtdmFyaWFi bGUgLVduby1lcnJvcj1ib29sLW9wZXJhdGlvbiAtV25vLWVycm9yPWRlcHJlY2F0ZWQgLVdu by1lcnJvcj1leHBhbnNpb24tdG8tZGVmaW5lZCAtV25vLWVycm9yPWZvcm1hdC1vdmVyZmxv dyAtV25vLWVycm9yPWZvcm1hdC10cnVuY2F0aW9uIC1Xbm8tZXJyb3I9aW1wbGljaXQtZmFs bHRocm91Z2ggLVduby1lcnJvcj1pbnQtaW4tYm9vbC1jb250ZXh0IC1Xbm8tZXJyb3I9bWVt c2V0LWVsdC1zaXplIC1Xbm8tZXJyb3I9bm9leGNlcHQtdHlwZSAtV25vLWVycm9yPW5vbm51 bGwgLVduby1lcnJvcj1wb2ludGVyLWNvbXBhcmUgLVduby1lcnJvcj1zdHJpbmdvcC1vdmVy ZmxvdyAtV25vLWVycm9yPWFnZ3Jlc3NpdmUtbG9vcC1vcHRpbWl6YXRpb25zIC1Xbm8tZXJy b3I9Y2FzdC1mdW5jdGlvbi10eXBlIC1Xbm8tZXJyb3I9Y2F0Y2gtdmFsdWUgLVduby1lcnJv cj1tdWx0aXN0YXRlbWVudC1tYWNyb3MgLVduby1lcnJvcj1yZXN0cmljdCAtV25vLWVycm9y PXNpemVvZi1wb2ludGVyLW1lbWFjY2VzcyAtV25vLWVycm9yPXN0cmluZ29wLXRydW5jYXRp b24gLVduby1yZXR1cm4tdHlwZSAtV25vLWFkZHJlc3Mtb2YtcGFja2VkLW1lbWJlciAgICAg ICAtYyAvdXNyL2hvbWUvam9obi93b3JrL2ZyZWVic2QvbWFpbi9jcnlwdG8vb3BlbnNzbC9w cm92aWRlcnMvaW1wbGVtZW50YXRpb25zL3JhbmRzL3NlZWRpbmcvcmFuZF91bml4LmMgLW8g cmFuZF91bml4Lm8NCi91c3IvaG9tZS9qb2huL3dvcmsvZnJlZWJzZC9tYWluL2NyeXB0by9v cGVuc3NsL3Byb3ZpZGVycy9pbXBsZW1lbnRhdGlvbnMvcmFuZHMvc2VlZGluZy9yYW5kX3Vu aXguYzogSW4gZnVuY3Rpb24gJ3N5c2NhbGxfcmFuZG9tJzoNCi91c3IvaG9tZS9qb2huL3dv cmsvZnJlZWJzZC9tYWluL2NyeXB0by9vcGVuc3NsL3Byb3ZpZGVycy9pbXBsZW1lbnRhdGlv bnMvcmFuZHMvc2VlZGluZy9yYW5kX3VuaXguYzozOTk6MTI6IGVycm9yOiBpbXBsaWNpdCBk ZWNsYXJhdGlvbiBvZiBmdW5jdGlvbiAnZ2V0cmFuZG9tJzsgZGlkIHlvdSBtZWFuICdzcmFu ZG9tJz8gWy1XaW1wbGljaXQtZnVuY3Rpb24tZGVjbGFyYXRpb25dDQogICAzOTkgfCAgICAg cmV0dXJuIGdldHJhbmRvbShidWYsIGJ1ZmxlbiwgMCk7DQogICAgICAgfCAgICAgICAgICAg IF5+fn5+fn5+fg0KICAgICAgIHwgICAgICAgICAgICBzcmFuZG9tDQoqKiogRXJyb3IgY29k ZSAxDQoNClN0b3AuDQoNCkFuZCBpbiBmYWN0LCBnZXRyYW5kb20oKSBpcyBkZWNsYXJlZCBp biA8c3lzL3JhbmRvbS5oPiB3aGljaCBpc24ndCBpbmNsdWRlZA0KaW4gcmFuZF91bml4LmMg ZXhjZXB0IGZvciBEcmFnb25GbHk6DQoNCiNpZmRlZiBfX2xpbnV4DQojIGluY2x1ZGUgPHN5 cy9zeXNjYWxsLmg+DQojIGlmZGVmIERFVlJBTkRPTV9XQUlUDQojICBpbmNsdWRlIDxzeXMv c2htLmg+DQojICBpbmNsdWRlIDxzeXMvdXRzbmFtZS5oPg0KIyBlbmRpZg0KI2VuZGlmDQoj aWYgKGRlZmluZWQoX19GcmVlQlNEX18pIHx8IGRlZmluZWQoX19OZXRCU0RfXykpICYmICFk ZWZpbmVkKE9QRU5TU0xfU1lTX1VFRkkpDQojIGluY2x1ZGUgPHN5cy90eXBlcy5oPg0KIyBp bmNsdWRlIDxzeXMvc3lzY3RsLmg+DQojIGluY2x1ZGUgPHN5cy9wYXJhbS5oPg0KI2VuZGlm DQojaWYgZGVmaW5lZChfX09wZW5CU0RfXykNCiMgaW5jbHVkZSA8c3lzL3BhcmFtLmg+DQoj ZW5kaWYNCiNpZiBkZWZpbmVkKF9fRHJhZ29uRmx5X18pDQojIGluY2x1ZGUgPHN5cy9wYXJh bS5oPg0KIyBpbmNsdWRlIDxzeXMvcmFuZG9tLmg+DQojZW5kaWYNCg0KSSB0aGluayB3ZSBz aG91bGQgZml4IHRoaXMgaW5zdGVhZCB0byBtb3ZlIHRoZSBGcmVlQlNEIGRvd24gdG8gdGhl IERyYWdvbmZseSBjYXNlPw0KVGhhdCB3b3VsZCBiZXR0ZXIgbWF0Y2ggd2hhdCB5b3UgZGlk IGluIHRoZSBjb2RlIGNoYW5nZXMgYmVsb3cgSSB0aGluay4NCg0KWW91IGFsc28gbGVmdCBz eXNjdGxfcmFuZG9tKCkgZGVmaW5lZCAoYnV0IHVudXNlZCkgb24gRnJlZUJTRC4NCg0KPiAt LS0NCj4gICAuLi4vb3BlbnNzbC9wcm92aWRlcnMvaW1wbGVtZW50YXRpb25zL3JhbmRzL3Nl ZWRpbmcvcmFuZF91bml4LmMgIHwgOSArKysrKy0tLS0NCj4gICAxIGZpbGUgY2hhbmdlZCwg NSBpbnNlcnRpb25zKCspLCA0IGRlbGV0aW9ucygtKQ0KPiANCj4gZGlmZiAtLWdpdCBhL2Ny eXB0by9vcGVuc3NsL3Byb3ZpZGVycy9pbXBsZW1lbnRhdGlvbnMvcmFuZHMvc2VlZGluZy9y YW5kX3VuaXguYyBiL2NyeXB0by9vcGVuc3NsL3Byb3ZpZGVycy9pbXBsZW1lbnRhdGlvbnMv cmFuZHMvc2VlZGluZy9yYW5kX3VuaXguYw0KPiBpbmRleCA3NTBhZmNhNThlZDcuLmVhZGFj ZWRiZTQwYyAxMDA2NDQNCj4gLS0tIGEvY3J5cHRvL29wZW5zc2wvcHJvdmlkZXJzL2ltcGxl bWVudGF0aW9ucy9yYW5kcy9zZWVkaW5nL3JhbmRfdW5peC5jDQo+ICsrKyBiL2NyeXB0by9v cGVuc3NsL3Byb3ZpZGVycy9pbXBsZW1lbnRhdGlvbnMvcmFuZHMvc2VlZGluZy9yYW5kX3Vu aXguYw0KPiBAQCAtMzU2LDcgKzM1Niw3IEBAIHN0YXRpYyBzc2l6ZV90IHN5c2NhbGxfcmFu ZG9tKHZvaWQgKmJ1Ziwgc2l6ZV90IGJ1ZmxlbikNCj4gICAgICAgICogTm90ZTogU29tZXRp bWVzIGdldGVudHJvcHkoKSBjYW4gYmUgcHJvdmlkZWQgYnV0IG5vdCBpbXBsZW1lbnRlZA0K PiAgICAgICAgKiBpbnRlcm5hbGx5LiBTbyB3ZSBuZWVkIHRvIGNoZWNrIGVycm5vIGZvciBF Tk9TWVMNCj4gICAgICAgICovDQo+IC0jICBpZiAhZGVmaW5lZChfX0RyYWdvbkZseV9fKSAm JiAhZGVmaW5lZChfX05ldEJTRF9fKQ0KPiArIyAgaWYgIWRlZmluZWQoX19EcmFnb25GbHlf XykgJiYgIWRlZmluZWQoX19OZXRCU0RfXykgJiYgIWRlZmluZWQoX19GcmVlQlNEX18pDQo+ ICAgIyAgICBpZiBkZWZpbmVkKF9fR05VQ19fKSAmJiBfX0dOVUNfXz49MiAmJiBkZWZpbmVk KF9fRUxGX18pICYmICFkZWZpbmVkKF9faHB1eCkNCj4gICAgICAgZXh0ZXJuIGludCBnZXRl bnRyb3B5KHZvaWQgKmJ1ZmZlciwgc2l6ZV90IGxlbmd0aCkgX19hdHRyaWJ1dGVfXygod2Vh aykpOw0KPiAgIA0KPiBAQCAtMzkzLDExICszOTMsMTIgQEAgc3RhdGljIHNzaXplX3Qgc3lz Y2FsbF9yYW5kb20odm9pZCAqYnVmLCBzaXplX3QgYnVmbGVuKQ0KPiAgICAgICAvKiBMaW51 eCBzdXBwb3J0cyB0aGlzIHNpbmNlIHZlcnNpb24gMy4xNyAqLw0KPiAgICMgIGlmIGRlZmlu ZWQoX19saW51eCkgJiYgZGVmaW5lZChfX05SX2dldHJhbmRvbSkNCj4gICAgICAgcmV0dXJu IHN5c2NhbGwoX19OUl9nZXRyYW5kb20sIGJ1ZiwgYnVmbGVuLCAwKTsNCj4gLSMgIGVsaWYg KGRlZmluZWQoX19GcmVlQlNEX18pIHx8IGRlZmluZWQoX19OZXRCU0RfXykpICYmIGRlZmlu ZWQoS0VSTl9BUk5EKQ0KPiAtICAgIHJldHVybiBzeXNjdGxfcmFuZG9tKGJ1ZiwgYnVmbGVu KTsNCj4gICAjICBlbGlmIChkZWZpbmVkKF9fRHJhZ29uRmx5X18pICAmJiBfX0RyYWdvbkZs eV92ZXJzaW9uID49IDUwMDcwMCkgXA0KPiAtICAgICB8fCAoZGVmaW5lZChfX05ldEJTRF9f KSAmJiBfX05ldEJTRF9WZXJzaW9uID49IDEwMDAwMDAwMDApDQo+ICsgICAgIHx8IChkZWZp bmVkKF9fTmV0QlNEX18pICYmIF9fTmV0QlNEX1ZlcnNpb24gPj0gMTAwMDAwMDAwMCkgXA0K PiArICAgICB8fCBkZWZpbmVkKF9fRnJlZUJTRF9fKQ0KPiAgICAgICByZXR1cm4gZ2V0cmFu ZG9tKGJ1ZiwgYnVmbGVuLCAwKTsNCj4gKyMgIGVsaWYgZGVmaW5lZChfX05ldEJTRF9fKSAm JiBkZWZpbmVkKEtFUk5fQVJORCkNCj4gKyAgICByZXR1cm4gc3lzY3RsX3JhbmRvbShidWYs IGJ1Zmxlbik7DQo+ICAgIyAgZWxzZQ0KPiAgICAgICBlcnJubyA9IEVOT1NZUzsNCj4gICAg ICAgcmV0dXJuIC0xOw0KDQotLSANCkpvaG4gQmFsZHdpbg0KDQo= From nobody Wed Jul 17 14:25:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPJBZ6cThz5RQ07; Wed, 17 Jul 2024 14:25:42 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPJBZ18lQz4447; Wed, 17 Jul 2024 14:25:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721226342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fBcb49d5Xj1ak5M/BXSteHM/q5CWJonmj5Sk7GvFsDk=; b=SsZFYwNoM9bCxMmKMySAqb+Jsh9j5l1oUfCtKZ+/5V2gYlqPZJLjP/Jk3AW7icJJxqNDsQ SrPkn87QdZtRJTZnybNOUtR4g67FPROWhFDTYnQqnPOc5SzggCfJjamf8M2QpLz28oeXLD XCTAKZCIUqBQL264Oxo+NwS1sgAc/+kgJhnAdgxIfxCTR34cRHKbxxtd2yUtkMa7J/iY/V fTkLDOf37hapOMRqfhPBRxwv/7mAq7eZ0OHoXo0gm6tAa6tPwoCWdxRStBhvtd4yg20jj2 71DaJjNPgBXPpbtWj7NQkNWHoUXrQoB0Qo0o/++6r03pNa9rlvkmO/J+bEGfxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721226342; a=rsa-sha256; cv=none; b=QS6b8JjUT9dAGbRQlHYk03JnEZi4CaE6NN5GynYb3PXv69L/dDHrK0o4dn4D1GGsqpPmnb AwGvnPQ+Obrl/Md7mL4wWuAYdGUJlC6ioYLIL78P+1CP0hcTjWSC8s119Vz1ECvTVQ9ZgJ TQHI968RZI9mBjgLnlP8m8zoqmrEeUAFX+CxRRq5EHVZ6xgqxPIqCP+soSooha5YYjDe9P TUJdVPh97AwRDpUaqNtZYCoI73J1xax1aMxr02rU+Wqy2L9fPaenvJEC1dtBi9Q2BBJmZL DARSlyAqxgEz08GTSnEyYopPuNxOPDjm7+wacthnw9ZaxiWp7CBz4kuq8GFZ4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721226342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fBcb49d5Xj1ak5M/BXSteHM/q5CWJonmj5Sk7GvFsDk=; b=j6178l/jgGqIxvItvIN9WdRP0G6OY+U9mUCyQwB10ruEDwtcubE+r+x2WXErmApiJJ9Btw LjQ/wWZG5tUM2D3bXuIwtNEuWhrG0Ox41oNh+o34XN6YFptm6hahM6S5MhkaL4USXj/SSR 9K4CcZCe6boEIeb/ceAu0It92XLrGO52berpScMtEp3ulhsSl6+vWm1fxxefF+9Ehmg09g aeUb5cnNT69gEwhDr6oTRL7zJ1YCuHGUraKqBD8Bb2kto7SctjvemrRLlYLWIIn9jo/YLr ui8+wiaK2p8H1fMLXclQeruJn9yLkDNAYg/NitU2zrgeaPBf3zOs0iCR+sIOEg== Received: from [IPV6:2601:5c0:4200:b830:692e:5caf:134a:ed7b] (unknown [IPv6:2601:5c0:4200:b830:692e:5caf:134a:ed7b]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WPJBY6LBRz1Kbh; Wed, 17 Jul 2024 14:25:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <4daa2b3e-3d6e-4e85-aa28-72d99271b70a@FreeBSD.org> Date: Wed, 17 Jul 2024 10:25:41 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: c24e5fcca9c2 - main - mvs: Fix to use rman_get_rid rather than non-existent rid argument Content-Language: en-US To: Jessica Clarke , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407171300.46HD0AHq085043@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202407171300.46HD0AHq085043@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/17/24 09:00, Jessica Clarke wrote: > The branch main has been updated by jrtc27: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c24e5fcca9c2f2cacaf3d7883f0ecb4d5a4747cc > > commit c24e5fcca9c2f2cacaf3d7883f0ecb4d5a4747cc > Author: Jessica Clarke > AuthorDate: 2024-07-17 12:59:13 +0000 > Commit: Jessica Clarke > CommitDate: 2024-07-17 12:59:13 +0000 > > mvs: Fix to use rman_get_rid rather than non-existent rid argument > > This got missed as it's not built in a normal tinderbox build. > > This fixes building arm.armv7 ARMADAXP (marked NO_UNIVERSE). > > Fixes: 9dbf5b0e6876 ("new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE") Oops, thanks -- John Baldwin From nobody Wed Jul 17 15:35:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPKkp0fH4z5RWHp; Wed, 17 Jul 2024 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPKkp0MQSz49th; Wed, 17 Jul 2024 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721230514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z6j0I/HRyaSrjeOHbagUJjjksfIZ60cNCQ1JbJHhl/E=; b=v5n/lUD5i/K/pk2DuhrVu7qKFgx6VW3tdpbbiNTu7LZG1efFPJrS986z90W3urDmFGFvXG kwo3C+EKv65PRcC5zYv3tNz0uYRtUssuhgM+aeCNGRI3Gmf/WxCZ0YWr/CQfkRS9g0861l +t8rnAiFcfsz8CtE9vzsPdAzhWof5p0Q8TNRuhmPztCPXQybcPD3C+p8zSqCnHoF8Jxtpu sNUcLfaCXkfNjeWardAVWPJfK1zb2ZaBFaMnwPtAx71aNi+q72LrX9qRSpeUTNrxQcAyH5 DZNo9wMtze65k/3XJJ5/cBYCFdPMawMZdZLpDoZSYQbSfg75WHQWXNk3/Aj+og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721230514; a=rsa-sha256; cv=none; b=bvVOZmm2kQaii6/ikNbpDqpaWn+JHHan5VZ6FMZAV0HUK32gvBxPw7jl7RHcSuDs0hdVuG 2e9u2cTLc4tAreD3hJrDOsTX3HBHgno2uVJmY+9lmTVDqPz44Ge8Y+Dsr9PRUAaiM166SZ ZCdXhYx1tKAzCPEdBSCSp0lWKcsM1ir/Ox+NlNy4FgPRzL/LNXnI83R9v3Jpw4jO9YcRpl bHyOPAEpyF2mWh3RWVM9Ja2Oickq4aNpIubJhSH5+rk5gu884m+DKc2NL2tUaUnTPYMRiJ 6iGt3oNgpXhvBucsLB1IuD409earCorqvzpolJcSxn9vavGXNczG+e3Y8EF2Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721230514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z6j0I/HRyaSrjeOHbagUJjjksfIZ60cNCQ1JbJHhl/E=; b=DSgIUd2LKKi9tZk/Q4uGu2wzHbHNYTgYX573gN8wp1KjZy2guJd6btzCu+JQKp6u/+HSUc Fef+naO0cPXyJXZFxLQBw/HjCF6rcxPCnBjza+lF6CykssY/I5zUmeYasPhjFX7PX+BIqQ jIZm+0Tu3ekpw8+06p4p+FiXJV6gP0o0wgBrudJ3nfwmwTNLdagPpx8oRHpZrueBFXEeVP x4d6Vo9nFV9sn6wGbW6VYN9ylum7eP5sZtGmCVEDeM1+voc4z8JPUtEj3gysoKZZXxtoc6 dVq9FlkI+8MVTAJxheCszcZa4s4/neWplBZM8h6qYb7ABRC67K0N3Lbwg6CyHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPKkn74Pfz1P6y; Wed, 17 Jul 2024 15:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46HFZDqv052716; Wed, 17 Jul 2024 15:35:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HFZD1J052713; Wed, 17 Jul 2024 15:35:13 GMT (envelope-from git) Date: Wed, 17 Jul 2024 15:35:13 GMT Message-Id: <202407171535.46HFZD1J052713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 271f14695564 - main - pf: vnet-ify pf_hashsize, pf_hashmask, pf_srchashsize and V_pf_srchashmask List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 271f146955641857c93705b5b1916b8004e5623c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=271f146955641857c93705b5b1916b8004e5623c commit 271f146955641857c93705b5b1916b8004e5623c Author: Kristof Provost AuthorDate: 2024-07-17 13:52:13 +0000 Commit: Kristof Provost CommitDate: 2024-07-17 14:00:49 +0000 pf: vnet-ify pf_hashsize, pf_hashmask, pf_srchashsize and V_pf_srchashmask These variables are tunables, so in principle they never change at runtime. That would mean they don't need to be tracked per-vnet. However, they both can be decreased (back to their default values) if the memory allocations for their respective tables fail, and these allocations are per-vnet. That is, it's possible for a few vnets to be started and have the tuned size for the hash and srchash tables only to have later vnets fail the initial allocation and fall back to smaller allocations. That would confuse the previously created vnets (because their actual table size and size/mask variables would no longer match). Avoid this by turning these into per-vnet variables. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 8 +++-- sys/netpfil/pf/if_pfsync.c | 12 +++++--- sys/netpfil/pf/pf.c | 74 ++++++++++++++++++++++++---------------------- sys/netpfil/pf/pf_ioctl.c | 22 +++++++------- sys/netpfil/pf/pf_nl.c | 4 +-- 5 files changed, 64 insertions(+), 56 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index aa6dd52a7e69..b38a1bebcc1f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2125,8 +2125,10 @@ struct pf_idhash { }; extern u_long pf_ioctl_maxcount; -extern u_long pf_hashmask; -extern u_long pf_srchashmask; +VNET_DECLARE(u_long, pf_hashmask); +#define V_pf_hashmask VNET(pf_hashmask) +VNET_DECLARE(u_long, pf_srchashmask); +#define V_pf_srchashmask VNET(pf_srchashmask) #define PF_HASHSIZ (131072) #define PF_SRCHASHSIZ (PF_HASHSIZ/4) VNET_DECLARE(struct pf_keyhash *, pf_keyhash); @@ -2136,7 +2138,7 @@ VNET_DECLARE(struct pf_idhash *, pf_idhash); VNET_DECLARE(struct pf_srchash *, pf_srchash); #define V_pf_srchash VNET(pf_srchash) -#define PF_IDHASH(s) (be64toh((s)->id) % (pf_hashmask + 1)) +#define PF_IDHASH(s) (be64toh((s)->id) % (V_pf_hashmask + 1)) VNET_DECLARE(void *, pf_swi_cookie); #define V_pf_swi_cookie VNET(pf_swi_cookie) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 67011d16c788..82a42c874a8f 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -979,7 +979,7 @@ pfsync_in_clr(struct mbuf *m, int offset, int count, int flags, int action) pfi_kkif_find(clr[i].ifname) == NULL) continue; - for (int i = 0; i <= pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; relock: @@ -2080,7 +2080,11 @@ pfsync_defer_tmo(void *arg) struct pfsync_softc *sc = pd->pd_sc; struct mbuf *m = pd->pd_m; struct pf_kstate *st = pd->pd_st; - struct pfsync_bucket *b = pfsync_get_bucket(sc, st); + struct pfsync_bucket *b; + + CURVNET_SET(sc->sc_ifp->if_vnet); + + b = pfsync_get_bucket(sc, st); PFSYNC_BUCKET_LOCK_ASSERT(b); @@ -2093,11 +2097,11 @@ pfsync_defer_tmo(void *arg) if (sc->sc_sync_if == NULL) { pf_release_state(st); m_freem(m); + CURVNET_RESTORE(); return; } NET_EPOCH_ENTER(et); - CURVNET_SET(sc->sc_sync_if->if_vnet); pfsync_tx(sc, m); @@ -2483,7 +2487,7 @@ pfsync_bulk_update(void *arg) else i = sc->sc_bulk_hashid; - for (; i <= pf_hashmask; i++) { + for (; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; if (s != NULL) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 764d2fa54179..dfa87b515cd1 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -486,16 +486,18 @@ VNET_DEFINE(struct pf_srchash *, pf_srchash); SYSCTL_NODE(_net, OID_AUTO, pf, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "pf(4)"); -u_long pf_hashmask; -u_long pf_srchashmask; -static u_long pf_hashsize; -static u_long pf_srchashsize; +VNET_DEFINE(u_long, pf_hashmask); +VNET_DEFINE(u_long, pf_srchashmask); +VNET_DEFINE_STATIC(u_long, pf_hashsize); +#define V_pf_hashsize VNET(pf_hashsize) +VNET_DEFINE_STATIC(u_long, pf_srchashsize); +#define V_pf_srchashsize VNET(pf_srchashsize) u_long pf_ioctl_maxcount = 65535; -SYSCTL_ULONG(_net_pf, OID_AUTO, states_hashsize, CTLFLAG_RDTUN, - &pf_hashsize, 0, "Size of pf(4) states hashtable"); -SYSCTL_ULONG(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_RDTUN, - &pf_srchashsize, 0, "Size of pf(4) source nodes hashtable"); +SYSCTL_ULONG(_net_pf, OID_AUTO, states_hashsize, CTLFLAG_VNET | CTLFLAG_RDTUN, + &VNET_NAME(pf_hashsize), 0, "Size of pf(4) states hashtable"); +SYSCTL_ULONG(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_VNET | CTLFLAG_RDTUN, + &VNET_NAME(pf_srchashsize), 0, "Size of pf(4) source nodes hashtable"); SYSCTL_ULONG(_net_pf, OID_AUTO, request_maxcount, CTLFLAG_RWTUN, &pf_ioctl_maxcount, 0, "Maximum number of tables, addresses, ... in a single ioctl() call"); @@ -662,7 +664,7 @@ pf_hashkey(const struct pf_state_key *sk) sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), V_pf_hashseed); - return (h & pf_hashmask); + return (h & V_pf_hashmask); } static __inline uint32_t @@ -683,7 +685,7 @@ pf_hashsrc(struct pf_addr *addr, sa_family_t af) panic("%s: unknown address family %u", __func__, af); } - return (h & pf_srchashmask); + return (h & V_pf_srchashmask); } #ifdef ALTQ @@ -885,7 +887,7 @@ pf_overload_task(void *v, int pending) return; } - for (int i = 0; i <= pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_state_key *sk; struct pf_kstate *s; @@ -1075,10 +1077,10 @@ pf_initialize(void) struct pf_srchash *sh; u_int i; - if (pf_hashsize == 0 || !powerof2(pf_hashsize)) - pf_hashsize = PF_HASHSIZ; - if (pf_srchashsize == 0 || !powerof2(pf_srchashsize)) - pf_srchashsize = PF_SRCHASHSIZ; + if (V_pf_hashsize == 0 || !powerof2(V_pf_hashsize)) + V_pf_hashsize = PF_HASHSIZ; + if (V_pf_srchashsize == 0 || !powerof2(V_pf_srchashsize)) + V_pf_srchashsize = PF_SRCHASHSIZ; V_pf_hashseed = arc4random(); @@ -1093,26 +1095,26 @@ pf_initialize(void) sizeof(struct pf_state_key), pf_state_key_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - V_pf_keyhash = mallocarray(pf_hashsize, sizeof(struct pf_keyhash), + V_pf_keyhash = mallocarray(V_pf_hashsize, sizeof(struct pf_keyhash), M_PFHASH, M_NOWAIT | M_ZERO); - V_pf_idhash = mallocarray(pf_hashsize, sizeof(struct pf_idhash), + V_pf_idhash = mallocarray(V_pf_hashsize, sizeof(struct pf_idhash), M_PFHASH, M_NOWAIT | M_ZERO); if (V_pf_keyhash == NULL || V_pf_idhash == NULL) { printf("pf: Unable to allocate memory for " - "state_hashsize %lu.\n", pf_hashsize); + "state_hashsize %lu.\n", V_pf_hashsize); free(V_pf_keyhash, M_PFHASH); free(V_pf_idhash, M_PFHASH); - pf_hashsize = PF_HASHSIZ; - V_pf_keyhash = mallocarray(pf_hashsize, + V_pf_hashsize = PF_HASHSIZ; + V_pf_keyhash = mallocarray(V_pf_hashsize, sizeof(struct pf_keyhash), M_PFHASH, M_WAITOK | M_ZERO); - V_pf_idhash = mallocarray(pf_hashsize, + V_pf_idhash = mallocarray(V_pf_hashsize, sizeof(struct pf_idhash), M_PFHASH, M_WAITOK | M_ZERO); } - pf_hashmask = pf_hashsize - 1; - for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= pf_hashmask; + V_pf_hashmask = V_pf_hashsize - 1; + for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= V_pf_hashmask; i++, kh++, ih++) { mtx_init(&kh->lock, "pf_keyhash", NULL, MTX_DEF | MTX_DUPOK); mtx_init(&ih->lock, "pf_idhash", NULL, MTX_DEF); @@ -1126,19 +1128,19 @@ pf_initialize(void) uma_zone_set_max(V_pf_sources_z, PFSNODE_HIWAT); uma_zone_set_warning(V_pf_sources_z, "PF source nodes limit reached"); - V_pf_srchash = mallocarray(pf_srchashsize, + V_pf_srchash = mallocarray(V_pf_srchashsize, sizeof(struct pf_srchash), M_PFHASH, M_NOWAIT | M_ZERO); if (V_pf_srchash == NULL) { printf("pf: Unable to allocate memory for " - "source_hashsize %lu.\n", pf_srchashsize); + "source_hashsize %lu.\n", V_pf_srchashsize); - pf_srchashsize = PF_SRCHASHSIZ; - V_pf_srchash = mallocarray(pf_srchashsize, + V_pf_srchashsize = PF_SRCHASHSIZ; + V_pf_srchash = mallocarray(V_pf_srchashsize, sizeof(struct pf_srchash), M_PFHASH, M_WAITOK | M_ZERO); } - pf_srchashmask = pf_srchashsize - 1; - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) + V_pf_srchashmask = V_pf_srchashsize - 1; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) mtx_init(&sh->lock, "pf_srchash", NULL, MTX_DEF); /* ALTQ */ @@ -1177,7 +1179,7 @@ pf_cleanup(void) struct pf_send_entry *pfse, *next; u_int i; - for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= pf_hashmask; + for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= V_pf_hashmask; i++, kh++, ih++) { KASSERT(LIST_EMPTY(&kh->keys), ("%s: key hash not empty", __func__)); @@ -1189,7 +1191,7 @@ pf_cleanup(void) free(V_pf_keyhash, M_PFHASH); free(V_pf_idhash, M_PFHASH); - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) { + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { KASSERT(LIST_EMPTY(&sh->nodes), ("%s: source node hash not empty", __func__)); mtx_destroy(&sh->lock); @@ -1589,7 +1591,7 @@ pf_find_state_byid(uint64_t id, uint32_t creatorid) pf_counter_u64_add(&V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); - ih = &V_pf_idhash[(be64toh(id) % (pf_hashmask + 1))]; + ih = &V_pf_idhash[(be64toh(id) % (V_pf_hashmask + 1))]; PF_HASHROW_LOCK(ih); LIST_FOREACH(s, &ih->states, entry) @@ -1981,7 +1983,7 @@ pf_purge_thread(void *unused __unused) * table every run. */ V_pf_purge_idx = - pf_purge_expired_states(V_pf_purge_idx, pf_hashmask / + pf_purge_expired_states(V_pf_purge_idx, V_pf_hashmask / (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); /* @@ -2026,7 +2028,7 @@ pf_unload_vnet_purge(void) /* * Now purge everything. */ - pf_purge_expired_states(0, pf_hashmask); + pf_purge_expired_states(0, V_pf_hashmask); pf_purge_fragments(UINT_MAX); pf_purge_expired_src_nodes(); @@ -2086,7 +2088,7 @@ pf_purge_expired_src_nodes(void) int i; LIST_INIT(&freelist); - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) { + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH_SAFE(cur, &sh->nodes, entry, next) if (cur->states == 0 && cur->expire <= time_uptime) { @@ -2261,7 +2263,7 @@ relock: SDT_PROBE2(pf, purge, state, rowcount, i, count); /* Return when we hit end of hash. */ - if (++i > pf_hashmask) { + if (++i > V_pf_hashmask) { V_pf_status.states = uma_zone_get_cur(V_pf_state_z); return (0); } diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 2df6bcd30533..f5a216666076 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -3778,7 +3778,7 @@ DIOCCHANGERULE_error: sizeof(struct pfsync_state_1301), M_TEMP, M_WAITOK | M_ZERO); nr = 0; - for (i = 0; i <= pf_hashmask; i++) { + for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; DIOCGETSTATES_retry: @@ -3857,7 +3857,7 @@ DIOCGETSTATES_full: sizeof(struct pf_state_export), M_TEMP, M_WAITOK | M_ZERO); nr = 0; - for (i = 0; i <= pf_hashmask; i++) { + for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; DIOCGETSTATESV2_retry: @@ -5363,7 +5363,7 @@ DIOCCHANGEADDR_error: struct pf_src_node *p, *pstore; uint32_t i, nr = 0; - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) @@ -5382,7 +5382,7 @@ DIOCCHANGEADDR_error: nr = 0; p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK | M_ZERO); - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) { @@ -5854,7 +5854,7 @@ pf_clear_all_states(void) u_int i; NET_EPOCH_ENTER(et); - for (i = 0; i <= pf_hashmask; i++) { + for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; relock: PF_HASHROW_LOCK(ih); @@ -5891,7 +5891,7 @@ pf_clear_srcnodes(struct pf_ksrc_node *n) struct pf_kstate *s; int i; - for (i = 0; i <= pf_hashmask; i++) { + for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; PF_HASHROW_LOCK(ih); @@ -5907,7 +5907,7 @@ pf_clear_srcnodes(struct pf_ksrc_node *n) if (n == NULL) { struct pf_srchash *sh; - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) { @@ -5929,7 +5929,7 @@ pf_kill_srcnodes(struct pfioc_src_node_kill *psnk) struct pf_ksrc_node_list kill; LIST_INIT(&kill); - for (int i = 0; i <= pf_srchashmask; i++) { + for (int i = 0; i <= V_pf_srchashmask; i++) { struct pf_srchash *sh = &V_pf_srchash[i]; struct pf_ksrc_node *sn, *tmp; @@ -5950,7 +5950,7 @@ pf_kill_srcnodes(struct pfioc_src_node_kill *psnk) PF_HASHROW_UNLOCK(sh); } - for (int i = 0; i <= pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; @@ -6013,7 +6013,7 @@ pf_clear_states(const struct pf_kstate_kill *kill) NET_EPOCH_ASSERT(); - for (unsigned int i = 0; i <= pf_hashmask; i++) { + for (unsigned int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; relock_DIOCCLRSTATES: @@ -6088,7 +6088,7 @@ pf_killstates(struct pf_kstate_kill *kill, unsigned int *killed) return; } - for (unsigned int i = 0; i <= pf_hashmask; i++) + for (unsigned int i = 0; i <= V_pf_hashmask; i++) *killed += pf_killstates_row(kill, &V_pf_idhash[i]); } diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index e855815dd73b..6c98a50d8e06 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -231,7 +231,7 @@ handle_dumpstates(struct nlpcb *nlp, struct nl_parsed_state *attrs, hdr->nlmsg_flags |= NLM_F_MULTI; - for (int i = 0; i <= pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; @@ -346,7 +346,7 @@ pf_handle_getcreators(struct nlmsghdr *hdr, struct nl_pstate *npt) bzero(creators, sizeof(creators)); - for (int i = 0; i < pf_hashmask; i++) { + for (int i = 0; i < V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; From nobody Wed Jul 17 15:35:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPKkq26lFz5RWCZ; Wed, 17 Jul 2024 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPKkq13q7z4C8c; Wed, 17 Jul 2024 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721230515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mRmBJ4J/X1XzpMHF3ao/NoYI7Ewvm0mD4cbHYMP2Y4Y=; b=cvLFBEit5wALm5vfh1JtLvN0I1+iJl2ukkoeZA9eLJFdab8TwxjdKorCgOGuR7OyAWx41W 2DRMCbJd/dBpPFWIJfFr7gKXPfV9EmMkxXlmQ47q5KWtyVoFQeLbHG5eoIrmnaY6oIpCBG RP45Fur2Iaq5IEcIhGrP09KJ7Aq8IVBNl7BIcngKiAFZv835vUvMvJfQgn4Vdg5zqz4sCG MflxyqpAql3Z15unOxBaBfOjEBh3yi97GZ8N4hzR5UHPhD5FrZrXIyrtyQuipm4+d8Ndbv q3Jx6Leqgr5ahUf/I76vQxdX6qzExYVwSdUfD9k2FyQEPqTJ2X85LNPdej0z2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721230515; a=rsa-sha256; cv=none; b=FMLNLBJOnQj6ozph8LolFL4CcnZYK/AFimi8QDQSgWhnuKuTwNkjYW8zEMqMNRQ+7r2f4j 5BZNPgmxvEGoP+rz7AJpqnTnsmNwWZgJHF3FN1IEdALAXknWBOszUn9h0N3stqUaogxKQM DjOa/X0LYTfZFHZg9D1UBBJCn38+TDligKv7UL82UV6SoxGV5WEiAEN+FeTbx3OsNiF0y3 VIeLe7zKQ8zM2761HJcgLOuqhuzZiloQeRNlJyxhdBTmJRYOIlGQbe90mPImE0n+3cBK9J l7uwTlLNe4vkdSxF8Qo+biDmMMncJW/9o7zv9yXtHFZh/dfET19WcQ3VJ4nG0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721230515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mRmBJ4J/X1XzpMHF3ao/NoYI7Ewvm0mD4cbHYMP2Y4Y=; b=uFIpo91oiZJX9PxFdwstmRkl5W8hYAJLIphifb65tQ2z9GKtFXoOmdrmZhs7wRJAu8Hpq3 Iorr76Ws9eoGFfvOBRg2Vf8rllkfGlUEJSjIXzYDBEQGZTIBnc7NBiHOhdYv9zgREn5uC4 +xrUyfRVyTbbEvZpBd05Ac7W/tIAQ8vfbrD1CzYmLq2MN6zEWTEgXwe0gT1JUH6vmntQmK 1x4HqEvhtU03LwF1SG3+nYd8vGWeHpg7SrQGdnRJE4Xjmh5db/3eF/Eo0JK3V5Zv6N9wDt t3//Ps8hXcVnBwhLdm1f94SFUn9aFQBqXhVEWgJDBwF/hRKlvL5jU/NmHGh4sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPKkq0dc1z1Phw; Wed, 17 Jul 2024 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46HFZFF2052765; Wed, 17 Jul 2024 15:35:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HFZFoC052762; Wed, 17 Jul 2024 15:35:15 GMT (envelope-from git) Date: Wed, 17 Jul 2024 15:35:15 GMT Message-Id: <202407171535.46HFZFoC052762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: fe0c82a603ce - main - pf tests: fix sctp:timeout test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe0c82a603ce069786ee81604315f499fd965546 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fe0c82a603ce069786ee81604315f499fd965546 commit fe0c82a603ce069786ee81604315f499fd965546 Author: Kristof Provost AuthorDate: 2024-07-17 13:56:49 +0000 Commit: Kristof Provost CommitDate: 2024-07-17 14:01:24 +0000 pf tests: fix sctp:timeout test The test body somehow wound up in the cleanup function. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/sctp.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index c3e1301238b0..d07d1122048b 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -666,11 +666,6 @@ timeout_head() timeout_body() { sctp_init -} - -timeout_cleanup() -{ - pft_cleanup vnet_mkjail timeout @@ -687,6 +682,11 @@ timeout_cleanup() jexec timeout pfctl -st } +timeout_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic_v4" From nobody Wed Jul 17 18:19:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPPNj4JRLz5Rr9s; Wed, 17 Jul 2024 18:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPPNj3bqBz4SrR; Wed, 17 Jul 2024 18:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721240389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EjX9c4CIg6X0eNfHA8mLLUVoYZd7H0073lcRJkBD/NI=; b=U9Lfo+hjm3hTr8P2KUhJ2vq4dEEnSZoLZqLUCvUB53TV7p4PS7aOS2wpu5ZV955/xprr3l VoTw9xvwVJsA5XzKCz40dBsTILuNLfQr3xvO2mS2UZyKR6u0LrHXq0vAbt3C7SZYxF/qqR d0A04IMnlriD6vkLf9+TRbBt6g30YB8NbRyLs1DferH6uV1H5qMf3IgFJjgatk4yJhB1dM 0bmJcPg/mMzLjcNUHZs5VbEMqrqcabacQb8UvkPONg1VGSow3h0V8P5l/HiX3LmY46ehcX +XKwO2eeMXCoLoKF97NrVor+e0RURaKav5ug0mCKsROrMXRuKcQBYFn7W8rgpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721240389; a=rsa-sha256; cv=none; b=QiXrXUzlnklwBYR0/rs4R9oF+S1qHd+ain5i4PSiv7gB+rAFDOLCvp2Czn9dPBJMxMuFX4 5TW90bWAHdFsczdS4JnodSwEl+QJ56q6DRmyVNZKbH0sEKa6Nc/wVnFA53tmJJdykQw83r /8WYAt4iY8uUKc4z4rr+/nmbdVelokUV7PxIoeIcjszmJZwa+lzYBQcHq1B8dymzucg0Xn rIjCXrFMJgUjfo9IgYDxj4DbIjy6iUqhf/z0aswlymONCmDwCLq0dYvsoZodqKXAvPCi/t KBL2IyCn28QVtjUD5nvCjR9Ca4fa0VAetgVdvOtWy6QNguXI7MuFnOfASXexyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721240389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EjX9c4CIg6X0eNfHA8mLLUVoYZd7H0073lcRJkBD/NI=; b=x2amFi8ekDT+PlmGwIxyjfbybLCbOnDG+dbBQnkL7jSSeSEYNT6eXGbEOjf4aAB/VYssIX +83O59P8tYC7yWKh4MG3I7nCGI9yivuESK/v3kbZV9FFcQpus7HJjTh+f3p+29AmTnSzPe 9p1U73Tj7V3TGW3wonwRH2zrN9EXO3UBVqHAtsrnS9gvQ+wUmXTlTKcGjuVj3ztW6227Uk XLZh6Z55c1bFFUWzs4K/mQ5AEh7hk/tgTBM5ufPg7J/Q/BnC+9jRL0HaXCiIeXTzepQfwq i05REmhXpTD1gIhZmdv26UJHJ1skzprZU/J/tmL7njZI8tmTW2lXwpvkFGiYaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPPNj35p9zFg8; Wed, 17 Jul 2024 18:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46HIJnkv023299; Wed, 17 Jul 2024 18:19:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HIJnLL023296; Wed, 17 Jul 2024 18:19:49 GMT (envelope-from git) Date: Wed, 17 Jul 2024 18:19:49 GMT Message-Id: <202407171819.46HIJnLL023296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: b3bbc6cc79a3 - main - cxgbe(4): Tidy up t4_l2t.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3bbc6cc79a3b76d342b2a8fd68e5266eb50ff11 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=b3bbc6cc79a3b76d342b2a8fd68e5266eb50ff11 commit b3bbc6cc79a3b76d342b2a8fd68e5266eb50ff11 Author: Navdeep Parhar AuthorDate: 2024-07-17 17:41:37 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-17 17:53:16 +0000 cxgbe(4): Tidy up t4_l2t.h Align the comment for if_t with the rest and remove the declaration of t4_l2t_set_switching, which was removed in 061bbaf7e7fe. No functional change. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_l2t.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_l2t.h b/sys/dev/cxgbe/t4_l2t.h index be6337a60eab..36a41e459a5d 100644 --- a/sys/dev/cxgbe/t4_l2t.h +++ b/sys/dev/cxgbe/t4_l2t.h @@ -64,7 +64,7 @@ struct l2t_entry { uint32_t addr[4]; /* next hop IP or IPv6 address */ uint32_t iqid; /* iqid for reply to write_l2e */ struct sge_wrq *wrq; /* queue to use for write_l2e */ - if_t ifp; /* outgoing interface */ + if_t ifp; /* outgoing interface */ uint16_t smt_idx; /* SMT index */ uint16_t vlan; /* VLAN TCI (id: 0-11, prio: 13-15) */ struct l2t_entry *first; /* start of hash chain */ @@ -94,8 +94,6 @@ struct l2t_entry *t4_l2t_alloc_switching(struct adapter *, uint16_t, uint8_t, uint8_t *); struct l2t_entry *t4_l2t_alloc_tls(struct adapter *, struct sge_txq *, void *, int *, uint16_t, uint8_t, uint8_t *); -int t4_l2t_set_switching(struct adapter *, struct l2t_entry *, uint16_t, - uint8_t, uint8_t *); int t4_write_l2e(struct l2t_entry *, int); int do_l2t_write_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); From nobody Wed Jul 17 21:45:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPTyC1FHrz5QSRr; Wed, 17 Jul 2024 21:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPTyC0lMMz4nFf; Wed, 17 Jul 2024 21:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721252739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mr0fTzNS7e8gT5Krj5FxrzEX2JbldNFp81I95DejKHs=; b=LSrvJH2DENDt+fRlo6uplka0j5DhFg/6o46aIKhkP7qDVRL3pdc+1rJknKj2Iu1CMInreu EdtzRWTzVBvZL7qiFCKtTdy43JHTXorWEBcda85aUv23bT8QYcqkwznZCfp/nLde27+sww MZyAeccaCiJOk/HQ7geQC/wsS7l+lvBv9pKGALXORIMw1ZurWQ9w9Rgyl9gyQ4/ewepwXw cDTQpySVMNd3nvGp3ooO7mB0aaoMnG78KGBpyk0vtcgyPfTrjEzNA196CcsPIP/bttCcwu nN/iDBGa0mptymWk9K8ic22x4Vmv6hJFpUo6aHPBbQEvcmezAOfggPamBo24jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721252739; a=rsa-sha256; cv=none; b=AkaubuawqmmIV8bZYyvrEGjbFfRhkwFPO9VARiZmRY2jCr8YNfF5N8EiLf0k9k5QSoSqzU yt3Oq27AOYggSDotKiRMHAbHmWatWSG9ziIydPo3vuQc5/1Y32L7qHAsfILS8OS6IcEqXy +liThmnrkmqihKLKMrq1mBu58Cd709fFPyfLJUqtdv7yT/2nM55hamoMWjoZvgtnOf41wE cDUrV2ZqLixEFL3Wvu2TNquFGHWuJ4KRCDiqUuQk6M7iAksopZA0TR8JHs3Pi040ZrzFKu sm/9jlOj2xgGPIzJduSvAIg3QW0OPDEUb7oj+k9I6/hERS1lqN6SJ94yTYchAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721252739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mr0fTzNS7e8gT5Krj5FxrzEX2JbldNFp81I95DejKHs=; b=CFzRvUTWnPvDe+a4gFc6JfqodS2NbQyuP4yjIKh8SMPzwB0KaBofPh7rJSIFSZOjsYlyP5 jQ9AJy9OT7I5dQopyMPlA7gbCd6sBVJnuQ55gjN4MSg+KyiynPtKHJwaYt8SiJ1NUpsPtW KGnEs0GCDelcruppLcHnozBdr9Xrc1YLOi3uThF3ZjgZAcsQeVy8MVuFtjuyCr4uiZemmP mPPegDbf78+Njy08ZZzUV60IGejtMYUX4n4sPg/1aDfL5Ghwpj1xEXzI64f3/P/AGM0Jsh jPBxf8DOQY44gUQLOCmHb/44s3buc2aRACbkk4NHf6hK+yRtrXhiTNZ4GMSBAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPTyC0LVpzL9g; Wed, 17 Jul 2024 21:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46HLjcxL079915; Wed, 17 Jul 2024 21:45:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HLjcJp079912; Wed, 17 Jul 2024 21:45:38 GMT (envelope-from git) Date: Wed, 17 Jul 2024 21:45:38 GMT Message-Id: <202407172145.46HLjcJp079912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: a4469a0d19b6 - main - pipe: convert pipelock flag argument to bool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4469a0d19b64bf518c12e8c24c81ec513a45e7d Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a4469a0d19b64bf518c12e8c24c81ec513a45e7d commit a4469a0d19b64bf518c12e8c24c81ec513a45e7d Author: Mateusz Guzik AuthorDate: 2024-07-17 19:07:07 +0000 Commit: Mateusz Guzik CommitDate: 2024-07-17 21:45:32 +0000 pipe: convert pipelock flag argument to bool No functional changes, preparatory cleanup. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/sys_pipe.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 1d48728139c2..70b2a03e0140 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -225,7 +225,7 @@ static void pipeclose(struct pipe *cpipe); static void pipe_free_kmem(struct pipe *cpipe); static int pipe_create(struct pipe *pipe, bool backing); static int pipe_paircreate(struct thread *td, struct pipepair **p_pp); -static __inline int pipelock(struct pipe *cpipe, int catch); +static __inline int pipelock(struct pipe *cpipe, bool catch); static __inline void pipeunlock(struct pipe *cpipe); static void pipe_timestamp(struct timespec *tsp); #ifndef PIPE_NODIRECT @@ -633,7 +633,7 @@ pipespace(struct pipe *cpipe, int size) * lock a pipe for I/O, blocking other access */ static __inline int -pipelock(struct pipe *cpipe, int catch) +pipelock(struct pipe *cpipe, bool catch) { int error, prio; @@ -738,7 +738,7 @@ pipe_read(struct file *fp, struct uio *uio, struct ucred *active_cred, PIPE_LOCK(rpipe); ++rpipe->pipe_busy; - error = pipelock(rpipe, 1); + error = pipelock(rpipe, true); if (error) goto unlocked_error; @@ -854,7 +854,7 @@ pipe_read(struct file *fp, struct uio *uio, struct ucred *active_cred, if ((error = msleep(rpipe, PIPE_MTX(rpipe), PRIBIO | PCATCH, "piperd", 0)) == 0) - error = pipelock(rpipe, 1); + error = pipelock(rpipe, true); } if (error) goto unlocked_error; @@ -1034,7 +1034,7 @@ retry: pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(wpipe), PRIBIO | PCATCH, "pipdww", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) goto error1; goto retry; @@ -1049,7 +1049,7 @@ retry: pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(wpipe), PRIBIO | PCATCH, "pipdwc", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) goto error1; goto retry; @@ -1071,7 +1071,7 @@ retry: pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(wpipe), PRIBIO | PCATCH, "pipdwt", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) break; } @@ -1107,7 +1107,7 @@ pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred, rpipe = fp->f_data; wpipe = PIPE_PEER(rpipe); PIPE_LOCK(rpipe); - error = pipelock(wpipe, 1); + error = pipelock(wpipe, true); if (error) { PIPE_UNLOCK(rpipe); return (error); @@ -1206,7 +1206,7 @@ pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred, pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(rpipe), PRIBIO | PCATCH, "pipbww", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) break; continue; @@ -1311,7 +1311,7 @@ pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred, pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(rpipe), PRIBIO | PCATCH, "pipewr", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) break; continue; @@ -1671,7 +1671,7 @@ pipeclose(struct pipe *cpipe) KASSERT(cpipe != NULL, ("pipeclose: cpipe == NULL")); PIPE_LOCK(cpipe); - pipelock(cpipe, 0); + pipelock(cpipe, false); #ifdef MAC pp = cpipe->pipe_pair; #endif @@ -1686,7 +1686,7 @@ pipeclose(struct pipe *cpipe) cpipe->pipe_state |= PIPE_WANT; pipeunlock(cpipe); msleep(cpipe, PIPE_MTX(cpipe), PRIBIO, "pipecl", 0); - pipelock(cpipe, 0); + pipelock(cpipe, false); } pipeselwakeup(cpipe); From nobody Thu Jul 18 09:08:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPn5s6yfRz5R53p; Thu, 18 Jul 2024 09:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPn5s50L2z4ZjH; Thu, 18 Jul 2024 09:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721293697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FyBKXFbpS8PlIbrSo6oHr3s6MFUYVpquI957C7h9b/c=; b=hPs0k9TyF8rqPhokzoYwlE1wWP8+V3eTK/Xs0TDKJI/0GuWoErFGf7uHGLAVDQ9x4RV6nv fAIXU0EVgxmYuF0eeTq4nCpI1wG4G5IWYeDv6iUwynzncQM7h8015ZZsiVJGQcEqnKSJxi zN+eC8IVPRsVzDypfp513bruNLVLydfPUu7OTiPvg7mx5r41wq23kCdCfUcN5h2WT2VIIy 6HbqMPwsmGWymDJmjPnLaSWTgkx5v4OhIDjhSOTRTBVDMJyAWKYMeCQYx5fkK3rgkYgxio BK6koI6xJput+7p1FZfm+714V/qmIzaVeMsIxZwbPrus5wFberSZqpMUFXwAmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721293697; a=rsa-sha256; cv=none; b=fl0jBdSocvUbILXslJ3BZdejss0ac06Up1T0UDlyC8l5snxDuAlpz5WmRQBlW+wEUz/7Qs wg9keQ+A8tf5kd1NgLRqMBgVCXPzk9RnRfQOFALsolHL4WijAtFViGqEuofAS2qTvV9hlk JUHAHqGMJIC2ihgU2jvoi43uzdMIstBujgjC9gQyI9gwb6eLBVNZzR3t25gtfiwCsxoza1 ZTmEcgFWADwz2Dkfx5x7x3qpeECeFeR/ld3P7z34E5Fr7CRVUp0UYV2PIjnKf+B8FRDfZx zhnwOfjyuONf77fOQKrwoMhmwrStxilz2xWgjWIQx3MglhYR1NDPqkS4dg2Ptw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721293697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FyBKXFbpS8PlIbrSo6oHr3s6MFUYVpquI957C7h9b/c=; b=gUV+M0oQLtAUcA+7hxt/YmHY7efWo1CBU+3v6WOsvkJJVHHb7p3mcvC7Cw+BCl+CTSacgU ARujIT8I0OIBJwPXD4mDErVpPgca5XY2ndrCnfHCSx6+loUcTexWiigaDbwryoOuJp7t4E j1n7FQZCtnoN0u9uYvedJvYrNpaYDthrrcTRW087k/8s2JC8hgUqovQ5WPJErMWqseE9E6 MUCC/au/B3RSMJcquud+tF5Q47GJUwPJ4xrpDjUZy5OIaeQTWcewQqrzVGe8aC+oqche70 +8rE51WmSPwsytE4RtrOk52Vlv4MDMDaRafcG8jMljB/HAVU4Gce8PRonDizKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPn5s4bnYzhjc; Thu, 18 Jul 2024 09:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46I98HOL033145; Thu, 18 Jul 2024 09:08:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46I98E72033136; Thu, 18 Jul 2024 09:08:14 GMT (envelope-from git) Date: Thu, 18 Jul 2024 09:08:14 GMT Message-Id: <202407180908.46I98E72033136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 75e1fea68aaa - main - zfs: merge openzfs/zfs@1147a2797 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75e1fea68aaa613a20dfdcd0c59dd403aca02c49 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=75e1fea68aaa613a20dfdcd0c59dd403aca02c49 commit 75e1fea68aaa613a20dfdcd0c59dd403aca02c49 Merge: a4469a0d19b6 1147a2797853 Author: Martin Matuska AuthorDate: 2024-07-18 07:44:47 +0000 Commit: Martin Matuska CommitDate: 2024-07-18 08:02:12 +0000 zfs: merge openzfs/zfs@1147a2797 Notable upstream pull request merges: #16209 --multi-- icp: rip out everything we don't use #16230 20c8bdd85 FreeBSD: Update use of UMA-related symbols in arc_available_memory #16242 121a2d335 FreeBSD: unregister mountroot eventhandler on unload #16258 5de3ac223 vdev_open: clear async fault flag after reopen #16270 436731276 zvol: Fix suspend lock leaks #16273 c87cb22ba head_errlog: fix use-after-free #16284 f72e081fb FreeBSD: Use a statement expression to implement SET_ERROR() #16300 a10faf5ce FreeBSD: Use the new freeuio() helper to free dynamically allocated UIOs #16302 a7fc4c85e zstd: don't call zstd_mempool_reap if there are no buffers #16334 dc91e7452 zdb: dump ZAP_FLAG_UINT64_KEY ZAPs properly Obtained from: OpenZFS OpenZFS commit: 1147a279785329a2eaeb01c0610c35fe835a62a6 cddl/lib/libicp/Makefile | 4 - cddl/lib/libicp_rescue/Makefile | 4 - sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 96 ++- sys/contrib/openzfs/config/kernel-blk-queue.m4 | 4 +- sys/contrib/openzfs/config/kernel-blkdev.m4 | 26 + .../openzfs/config/kernel-kmap-local-page.m4 | 23 + sys/contrib/openzfs/config/kernel.m4 | 2 + sys/contrib/openzfs/config/zfs-build.m4 | 10 +- .../openzfs/contrib/bash_completion.d/zfs.in | 2 +- sys/contrib/openzfs/include/libzfs_core.h | 1 + .../openzfs/include/os/freebsd/spl/sys/sdt.h | 2 +- .../include/os/linux/kernel/linux/kmap_compat.h | 10 +- .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 19 +- .../openzfs/include/os/linux/zfs/sys/trace_dbuf.h | 2 +- sys/contrib/openzfs/include/sys/avl_impl.h | 1 + sys/contrib/openzfs/include/sys/crypto/common.h | 27 - sys/contrib/openzfs/include/sys/crypto/icp.h | 3 - sys/contrib/openzfs/include/sys/sha2.h | 27 +- sys/contrib/openzfs/include/sys/skein.h | 9 - sys/contrib/openzfs/include/sys/spa.h | 3 +- sys/contrib/openzfs/lib/libicp/Makefile.am | 4 - sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 2 +- .../openzfs/lib/libzfs_core/libzfs_core.abi | 6 + sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c | 6 + sys/contrib/openzfs/man/man4/zfs.4 | 4 +- sys/contrib/openzfs/man/man7/dracut.zfs.7 | 2 +- sys/contrib/openzfs/man/man7/zfsprops.7 | 2 +- sys/contrib/openzfs/man/man8/zdb.8 | 3 +- sys/contrib/openzfs/module/Kbuild.in | 5 +- .../openzfs/module/icp/algs/aes/aes_modes.c | 37 +- sys/contrib/openzfs/module/icp/algs/modes/cbc.c | 264 ------- sys/contrib/openzfs/module/icp/algs/modes/ctr.c | 227 ------ sys/contrib/openzfs/module/icp/algs/modes/ecb.c | 127 --- sys/contrib/openzfs/module/icp/algs/modes/gcm.c | 79 +- sys/contrib/openzfs/module/icp/algs/modes/modes.c | 20 +- .../openzfs/module/icp/algs/sha2/sha2_generic.c | 75 +- .../openzfs/module/icp/core/kcf_mech_tabs.c | 8 +- sys/contrib/openzfs/module/icp/illumos-crypto.c | 7 - .../openzfs/module/icp/include/aes/aes_impl.h | 5 - .../openzfs/module/icp/include/modes/modes.h | 142 +--- .../openzfs/module/icp/include/sys/crypto/impl.h | 44 +- .../openzfs/module/icp/include/sys/crypto/spi.h | 40 - sys/contrib/openzfs/module/icp/include/sys/stack.h | 36 - sys/contrib/openzfs/module/icp/include/sys/trap.h | 36 - sys/contrib/openzfs/module/icp/io/aes.c | 854 +-------------------- sys/contrib/openzfs/module/icp/io/sha2_mod.c | 444 +---------- sys/contrib/openzfs/module/icp/io/skein_mod.c | 656 ---------------- .../openzfs/module/os/freebsd/spl/spl_uio.c | 12 +- sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c | 18 +- .../openzfs/module/os/freebsd/zfs/kmod_core.c | 21 +- .../openzfs/module/os/freebsd/zfs/zvol_os.c | 2 + .../openzfs/module/os/linux/spl/spl-kmem-cache.c | 12 +- sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 8 +- .../openzfs/module/os/linux/zfs/vdev_disk.c | 14 +- sys/contrib/openzfs/module/os/linux/zfs/zfs_uio.c | 8 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 289 +++++-- sys/contrib/openzfs/module/zfs/dsl_dataset.c | 7 +- sys/contrib/openzfs/module/zfs/vdev.c | 1 + sys/contrib/openzfs/scripts/dkms.mkconf | 1 + sys/contrib/openzfs/tests/runfiles/linux.run | 2 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 1 + .../tests/zfs-tests/cmd/checksum/sha2_test.c | 70 +- .../openzfs/tests/zfs-tests/include/libtest.shlib | 30 +- .../openzfs/tests/zfs-tests/tests/Makefile.am | 1 + .../functional/fault/suspend_resume_single.ksh | 102 +++ .../functional/redacted_send/redacted_deleted.ksh | 2 +- .../functional/redacted_send/redacted_mounts.ksh | 6 +- sys/modules/zfs/zfs_config.h | 12 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 70 files changed, 704 insertions(+), 3329 deletions(-) diff --cc cddl/lib/libicp/Makefile index b1d926d65368,000000000000..b8bd3dc6df95 mode 100644,000000..100644 --- a/cddl/lib/libicp/Makefile +++ b/cddl/lib/libicp/Makefile @@@ -1,141 -1,0 +1,137 @@@ +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp + +PACKAGE= zfs +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/sha2/sha256-x86_64.S \ + asm-x86_64/sha2/sha512-x86_64.S \ + asm-x86_64/blake3/blake3_avx2.S \ + asm-x86_64/blake3/blake3_avx512.S \ + asm-x86_64/blake3/blake3_sse2.S \ + asm-x86_64/blake3/blake3_sse41.S + +CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES +.elif ${MACHINE_CPUARCH} == "arm" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-arm/sha2/sha256-armv7.S \ + asm-arm/sha2/sha512-armv7.S +.elif ${MACHINE_ARCH} == "aarch64" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-aarch64/blake3/b3_aarch64_sse2.S \ + asm-aarch64/blake3/b3_aarch64_sse41.S \ + asm-aarch64/sha2/sha256-armv8.S \ + asm-aarch64/sha2/sha512-armv8.S +.elif ${MACHINE_ARCH} == "powerpc64" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-ppc64/sha2/sha256-ppc.S \ + asm-ppc64/sha2/sha512-ppc.S \ + asm-ppc64/sha2/sha256-p8.S \ + asm-ppc64/sha2/sha512-p8.S +.elif ${MACHINE_ARCH} == "powerpc64le" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-ppc64/blake3/b3_ppc64le_sse2.S \ + asm-ppc64/blake3/b3_ppc64le_sse41.S \ + asm-ppc64/sha2/sha256-ppc.S \ + asm-ppc64/sha2/sha512-ppc.S \ + asm-ppc64/sha2/sha256-p8.S \ + asm-ppc64/sha2/sha512-p8.S +.else +ASM_SOURCES_C = +ASM_SOURCES_AS = +.endif + +KERNEL_C = \ + spi/kcf_spi.c \ + api/kcf_ctxops.c \ + api/kcf_cipher.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/blake3/blake3.c \ + algs/blake3/blake3_generic.c \ + algs/blake3/blake3_impl.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/sha2/sha2_generic.c \ + algs/sha2/sha256_impl.c \ + algs/sha2/sha512_impl.c \ + algs/skein/skein.c \ + algs/skein/skein_block.c \ + algs/skein/skein_iv.c \ + illumos-crypto.c \ + io/aes.c \ + io/sha2_mod.c \ - io/skein_mod.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) + +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs +KERNEL_C+= zfs_impl.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.sha256-x86_64.S+= -DLOCORE +CFLAGS.sha512-x86_64.S+= -DLOCORE +CFLAGS.blake3_avx2.S = -DLOCORE +CFLAGS.blake3_avx512.S = -DLOCORE +CFLAGS.blake3_sse2.S = -DLOCORE +CFLAGS.blake3_sse41.S = -DLOCORE +CFLAGS.b3_aarch64_sse2.S = -DLOCORE +CFLAGS.b3_aarch64_sse41.S = -DLOCORE +CFLAGS.sha256-armv7.S = -DLOCORE +CFLAGS.sha256-armv8.S = -DLOCORE +CFLAGS.sha512-armv7.S = -DLOCORE +CFLAGS.sha512-armv8.S = -DLOCORE +CFLAGS.b3_ppc64le_sse2.S = -DLOCORE +CFLAGS.b3_ppc64le_sse41.S = -DLOCORE +CFLAGS.sha256-p8.S = -DLOCORE +CFLAGS.sha256-ppc.S = -DLOCORE +CFLAGS.sha512-p8.S = -DLOCORE +CFLAGS.sha512-ppc.S = -DLOCORE + + +LDFLAGS.bfd+= -Wl,-znoexecstack + +.include diff --cc cddl/lib/libicp_rescue/Makefile index c969b209a785,000000000000..3b332f736bde mode 100644,000000..100644 --- a/cddl/lib/libicp_rescue/Makefile +++ b/cddl/lib/libicp_rescue/Makefile @@@ -1,138 -1,0 +1,134 @@@ +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp + +PACKAGE= utilities +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/sha2/sha256-x86_64.S \ + asm-x86_64/sha2/sha512-x86_64.S \ + asm-x86_64/blake3/blake3_avx2.S \ + asm-x86_64/blake3/blake3_avx512.S \ + asm-x86_64/blake3/blake3_sse2.S \ + asm-x86_64/blake3/blake3_sse41.S + +CFLAGS+= -D__amd64 -D_SYS_STACK_H +.elif ${MACHINE_CPUARCH} == "arm" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-arm/sha2/sha256-armv7.S \ + asm-arm/sha2/sha512-armv7.S +.elif ${MACHINE_ARCH} == "aarch64" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-aarch64/blake3/b3_aarch64_sse2.S \ + asm-aarch64/blake3/b3_aarch64_sse41.S \ + asm-aarch64/sha2/sha256-armv8.S \ + asm-aarch64/sha2/sha512-armv8.S +.elif ${MACHINE_ARCH} == "powerpc64" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-ppc64/sha2/sha256-ppc.S \ + asm-ppc64/sha2/sha512-ppc.S \ + asm-ppc64/sha2/sha256-p8.S \ + asm-ppc64/sha2/sha512-p8.S +.elif ${MACHINE_ARCH} == "powerpc64le" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-ppc64/blake3/b3_ppc64le_sse2.S \ + asm-ppc64/blake3/b3_ppc64le_sse41.S \ + asm-ppc64/sha2/sha256-ppc.S \ + asm-ppc64/sha2/sha512-ppc.S \ + asm-ppc64/sha2/sha256-p8.S \ + asm-ppc64/sha2/sha512-p8.S +.else +ASM_SOURCES_C = +ASM_SOURCES_AS = +.endif + +KERNEL_C = \ + spi/kcf_spi.c \ + api/kcf_ctxops.c \ + api/kcf_cipher.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/blake3/blake3.c \ + algs/blake3/blake3_generic.c \ + algs/blake3/blake3_impl.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/sha2/sha2_generic.c \ + algs/sha2/sha256_impl.c \ + algs/sha2/sha512_impl.c \ + algs/skein/skein_block.c \ + illumos-crypto.c \ + io/aes.c \ + io/sha2_mod.c \ - io/skein_mod.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) + +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs +KERNEL_C+= zfs_impl.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.sha256-x86_64.S+= -DLOCORE +CFLAGS.sha512-x86_64.S+= -DLOCORE +CFLAGS.gcm.c+= -UCAN_USE_GCM_ASM +CFLAGS.blake3_avx2.S = -DLOCORE +CFLAGS.blake3_avx512.S = -DLOCORE +CFLAGS.blake3_sse2.S = -DLOCORE +CFLAGS.blake3_sse41.S = -DLOCORE +CFLAGS.b3_aarch64_sse2.S = -DLOCORE +CFLAGS.b3_aarch64_sse41.S = -DLOCORE +CFLAGS.sha256-armv7.S = -DLOCORE +CFLAGS.sha512-armv7.S = -DLOCORE +CFLAGS.sha256-armv8.S = -DLOCORE +CFLAGS.sha512-armv8.S = -DLOCORE +CFLAGS.b3_ppc64le_sse2.S = -DLOCORE +CFLAGS.b3_ppc64le_sse41.S = -DLOCORE +CFLAGS.sha256-ppc.S = -DLOCORE +CFLAGS.sha256-p8.S = -DLOCORE +CFLAGS.sha512-ppc.S = -DLOCORE +CFLAGS.sha512-p8.S = -DLOCORE + +LDFLAGS.bfd+= -Wl,-znoexecstack + +.include diff --cc sys/contrib/openzfs/config/kernel-kmap-local-page.m4 index 000000000000,1990914d493d..1990914d493d mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-kmap-local-page.m4 +++ b/sys/contrib/openzfs/config/kernel-kmap-local-page.m4 diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh index 000000000000,041dadb1eadb..041dadb1eadb mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh diff --cc sys/modules/zfs/zfs_config.h index d5e9cebfffc7,000000000000..920bb59e2fc9 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1233 -1,0 +1,1239 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* backtrace() is available */ +/* #undef HAVE_BACKTRACE */ + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_file_open_by_path() exists */ +/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + ++/* bdev_nr_bytes() is available */ ++/* #undef HAVE_BDEV_NR_BYTES */ ++ +/* bdev_open_by_path() exists */ +/* #undef HAVE_BDEV_OPEN_BY_PATH */ + +/* bdev_release() exists */ +/* #undef HAVE_BDEV_RELEASE */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* __blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */ + +/* __blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */ + +/* blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() exists */ +/* #undef HAVE_BLKDEV_PUT */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_disk() exists and takes 2 args */ +/* #undef HAVE_BLK_ALLOC_DISK_2ARG */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* block multiqueue hardware context is cached in struct request */ +/* #undef HAVE_BLK_MQ_RQ_HCTX */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* Define to 1 if you have the 'execvpe' function. */ +#define HAVE_EXECVPE 1 + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the 'gettid' function. */ +/* #undef HAVE_GETTID */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* mnt_idmap does not have user_namespace */ +/* #undef HAVE_IDMAP_NO_USERNS */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_atime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_ATIME */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* inode_get_mtime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_MTIME */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_atime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_ATIME_TO_TS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode_set_mtime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_MTIME_TO_TS */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ *** 673 LINES SKIPPED *** From nobody Thu Jul 18 13:19:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPtgv5ZStz5RQt4; Thu, 18 Jul 2024 13:19:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPtgv47cnz40qg; Thu, 18 Jul 2024 13:19:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721308779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gp9Si0yl+x3L+QcwBnuNxuthXnqAPi+6G8omwPt1k0I=; b=DH2GNK84tYsWRsSR+TASZ5LBHZS/dalGV3oGOf0FxV/U0dL4FafA6fmpBmbqNOZuiElYAX 7THArBB3tSXNytuUtcMM20hfXKzdH8inHnp2FbNao5gxOwc/8GfRnqhTj3Ej3FgaC4cQJi +SPV09SDVIHNzpATQBf80hwfip+JSf8qIBCTMAviNdnkUANph9wMcHacX7QRCCyekOryHd TL0gypeK47srX/1ltLvF/7PqPUQEATxJTA/WC4u29TA/02xGhwvVBWwNGCosiIH9DAI56U c6OFzaCSRQ/aCnklZGWQeqtQmH+pSqP8PkvJ9iiWFDltxrWDFNzTW7FDDzJBcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721308779; a=rsa-sha256; cv=none; b=uY5iGUemhcfBK8L+j7gpnZo+xQ6W/QMOw0xqLgjbXLonIl10eenAYblpkrHHMARWjcMCki fN6PEOc0wrizmmFmpAeF7hmFzQBmHIwCx49+ItRS51zo/+Oyn/tLjQKtaRWWUSF31ktHrU 3AxHNO8yQxctSdoE6LK5WP2oReFWKmg9ciptTWGld97OM19O+Bw43jq5rQrt7CLw96x8gW VNe1x1l/V03qScJt7ggrV/ztm7KcOAq+u6GCfSAm55utmg1ADGTnDoXXz6/hHtJNyNakUT YFnMaKaAgU+w0QmK7QMIKSeDfxIlva9WYg6ejtMpr4cxb6Au/Bn36qpiJtjhPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721308779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gp9Si0yl+x3L+QcwBnuNxuthXnqAPi+6G8omwPt1k0I=; b=aAdQPAQrd22uutMUB336A21iov4oE359YFgmAx2vQkXOy/PtK0ETtvuVcdF0Ip6LZ7Xblv yEO45S14HlnQ1zBmqgu6D4x3RlwZDZzL+DZoRAj8AP4HTIAC5Wcyj0cJWjmgwlXfcOTSmt yBk34g/dDTgcn2coNFtXSmTMME1IzjHhXBLzU1feVBD2XwRcSOxAhTKYpHBm0XGmAGfaNP AiblbYvqmYp0IqPJC84Ixwx/Bmn/tADDaeQAjwCdv+nMMp7Ti5MN3H/EoPaAwv2nUmrvto 3Vr8rSuTat46Ro8m/8sm4MXfIbWgJm/mTUMBhcIWD+sRsPFqQmnM8AAilBGm7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPtgv3dQWzpmh; Thu, 18 Jul 2024 13:19:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IDJd07055011; Thu, 18 Jul 2024 13:19:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IDJdBj055008; Thu, 18 Jul 2024 13:19:39 GMT (envelope-from git) Date: Thu, 18 Jul 2024 13:19:39 GMT Message-Id: <202407181319.46IDJdBj055008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 257e70f1d5ee - main - kyua: Add FreeBSD Jail execution environment support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 257e70f1d5ee61037c8c59b116538d3b6b1427a2 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=257e70f1d5ee61037c8c59b116538d3b6b1427a2 commit 257e70f1d5ee61037c8c59b116538d3b6b1427a2 Author: Igor Ostapenko AuthorDate: 2024-07-16 18:41:12 +0000 Commit: Mark Johnston CommitDate: 2024-07-18 13:18:28 +0000 kyua: Add FreeBSD Jail execution environment support A new Kyua concept is added -- "execution environment". A test can be configured to be run within a specific environment. The test case lifecycle is extended respectively: - execenv init (creates a jail or does nothing for default execenv="host") - test exec - cleanup exec (optional) - execenv cleanup (removes a jail or does nothing for default execenv="host") The following new functionality is provided, from bottom to top: 1 ATF based tests - The new "execenv" metadata property can be set to explicitly ask for an execution environment: "host" or "jail". If it's not defined, as all existing tests do, then it implicitly means "host". - The new "execenv.jail.params" metadata property can be optionally defined to ask Kyua to use specific jail(8) parameters during creation of a temporary jail. An example is "vnet allow.raw_sockets". Kyua implicitly adds "children.max" to "execenv_jail_params" parameters with the maximum possible value. A test case can override it. 2 Kyuafile - The same new metadata properties can be defined on Kyuafile level: "execenv" and "execenv_jail_params". - Note that historically ATF uses dotted style of metadata naming, while Kyua uses underscore style. Hence "execenv.jail.params" vs. "execenv_jail_params". 3 kyua.conf, kyua CLI - The new "execenvs" engine configuration variable can be set to a list of execution environments to run only tests designed for. Tests of not listed environments are skipped. - By default, this variable lists all execution environments supported by a Kyua binary, e.g. execenvs="host jail". - This variable can be changed via "kyua.conf" or via kyua CLI's "-v" parameter. For example, "kyua -v execenvs=host test" will run only host-based tests and skip jail-based ones. - Current value of this variable can be examined with "kyua config". [markj] This feature has not landed upstream yet. See the discussion in https://github.com/freebsd/kyua/pull/224 . Having the ability to automatically jail tests allows many network tests to run in parallel, giving a drastic speedup. So, let's import the feature and start using it in main. Signed-off-by: Igor Ostapenko Reviewed by: markj, kp Tested by: markj, kp MFC after: 3 months Differential Revision: https://reviews.freebsd.org/D45865 --- contrib/kyua/AUTHORS | 1 + contrib/kyua/cli/cmd_config_test.cpp | 12 +- contrib/kyua/doc/kyua.conf.5.in | 13 +- contrib/kyua/doc/kyuafile.5.in | 103 +++++++- contrib/kyua/drivers/report_junit_test.cpp | 8 + contrib/kyua/engine/atf.cpp | 11 +- contrib/kyua/engine/atf_list.cpp | 4 + contrib/kyua/engine/config.cpp | 18 ++ contrib/kyua/engine/execenv/execenv.cpp | 74 ++++++ contrib/kyua/engine/execenv/execenv.hpp | 149 +++++++++++ contrib/kyua/engine/execenv/execenv_host.cpp | 52 ++++ contrib/kyua/engine/execenv/execenv_host.hpp | 63 +++++ contrib/kyua/engine/plain.cpp | 7 +- contrib/kyua/engine/requirements.cpp | 33 +++ contrib/kyua/engine/scheduler.cpp | 274 ++++++++++++++++++- contrib/kyua/engine/scheduler.hpp | 1 + contrib/kyua/engine/tap.cpp | 7 +- contrib/kyua/examples/kyua.conf | 3 + contrib/kyua/integration/cmd_config_test.sh | 2 + contrib/kyua/integration/cmd_report_junit_test.sh | 8 + contrib/kyua/integration/cmd_report_test.sh | 2 + contrib/kyua/main.cpp | 3 + contrib/kyua/model/metadata.cpp | 76 ++++++ contrib/kyua/model/metadata.hpp | 5 + contrib/kyua/model/metadata_test.cpp | 8 +- contrib/kyua/model/test_case_test.cpp | 3 +- contrib/kyua/model/test_program_test.cpp | 13 +- contrib/kyua/os/freebsd/execenv_jail.cpp | 78 ++++++ contrib/kyua/os/freebsd/execenv_jail.hpp | 65 +++++ contrib/kyua/os/freebsd/execenv_jail_manager.cpp | 63 +++++ contrib/kyua/os/freebsd/execenv_jail_manager.hpp | 54 ++++ contrib/kyua/os/freebsd/execenv_jail_stub.cpp | 75 ++++++ contrib/kyua/os/freebsd/main.cpp | 54 ++++ contrib/kyua/os/freebsd/main.hpp | 41 +++ contrib/kyua/os/freebsd/utils/jail.cpp | 306 ++++++++++++++++++++++ contrib/kyua/os/freebsd/utils/jail.hpp | 64 +++++ contrib/kyua/utils/config/nodes.ipp | 9 +- contrib/kyua/utils/process/executor.cpp | 42 +++ contrib/kyua/utils/process/executor.hpp | 1 + usr.bin/kyua/Makefile | 15 +- 40 files changed, 1792 insertions(+), 28 deletions(-) diff --git a/contrib/kyua/AUTHORS b/contrib/kyua/AUTHORS index c7bd72ce776b..4cf65083015a 100644 --- a/contrib/kyua/AUTHORS +++ b/contrib/kyua/AUTHORS @@ -10,3 +10,4 @@ * The FreeBSD Foundation * Google Inc. +* Igor Ostapenko diff --git a/contrib/kyua/cli/cmd_config_test.cpp b/contrib/kyua/cli/cmd_config_test.cpp index f084f99bb90a..a5f6930ba027 100644 --- a/contrib/kyua/cli/cmd_config_test.cpp +++ b/contrib/kyua/cli/cmd_config_test.cpp @@ -61,6 +61,7 @@ fake_config(void) { config::tree user_config = engine::default_config(); user_config.set_string("architecture", "the-architecture"); + user_config.set_string("execenvs", "the-env"); user_config.set_string("parallelism", "128"); user_config.set_string("platform", "the-platform"); //user_config.set_string("unprivileged_user", ""); @@ -83,12 +84,13 @@ ATF_TEST_CASE_BODY(all) cmdline::ui_mock ui; ATF_REQUIRE_EQ(EXIT_SUCCESS, cmd.main(&ui, args, fake_config())); - ATF_REQUIRE_EQ(5, ui.out_log().size()); + ATF_REQUIRE_EQ(6, ui.out_log().size()); ATF_REQUIRE_EQ("architecture = the-architecture", ui.out_log()[0]); - ATF_REQUIRE_EQ("parallelism = 128", ui.out_log()[1]); - ATF_REQUIRE_EQ("platform = the-platform", ui.out_log()[2]); - ATF_REQUIRE_EQ("test_suites.foo.bar = first", ui.out_log()[3]); - ATF_REQUIRE_EQ("test_suites.foo.baz = second", ui.out_log()[4]); + ATF_REQUIRE_EQ("execenvs = the-env", ui.out_log()[1]); + ATF_REQUIRE_EQ("parallelism = 128", ui.out_log()[2]); + ATF_REQUIRE_EQ("platform = the-platform", ui.out_log()[3]); + ATF_REQUIRE_EQ("test_suites.foo.bar = first", ui.out_log()[4]); + ATF_REQUIRE_EQ("test_suites.foo.baz = second", ui.out_log()[5]); ATF_REQUIRE(ui.err_log().empty()); } diff --git a/contrib/kyua/doc/kyua.conf.5.in b/contrib/kyua/doc/kyua.conf.5.in index 05a9499b48c4..7188bb8888c3 100644 --- a/contrib/kyua/doc/kyua.conf.5.in +++ b/contrib/kyua/doc/kyua.conf.5.in @@ -1,4 +1,4 @@ -.\" Copyright 2012 The Kyua Authors. +.\" Copyright 2012-2024 The Kyua Authors. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" 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. -.Dd February 20, 2015 +.Dd March 22, 2024 .Dt KYUA.CONF 5 .Os .Sh NAME @@ -36,6 +36,7 @@ .Pp Variables: .Va architecture , +.Va execenvs , .Va platform , .Va test_suites , .Va unprivileged_user . @@ -72,6 +73,14 @@ The following variables are internally recognized by .Bl -tag -width XX -offset indent .It Va architecture Name of the system architecture (aka processor type). +.It Va execenvs +Whitespace-separated list of execution environment names. +.Pp +Only tests which require one of the given execution environments will be run. +.Pp +See +.Xr kyuafile 5 +for the list of possible execution environments. .It Va parallelism Maximum number of test cases to execute concurrently. .It Va platform diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in index 06cb2dbc42a8..a667f5dc2816 100644 --- a/contrib/kyua/doc/kyuafile.5.in +++ b/contrib/kyua/doc/kyuafile.5.in @@ -1,4 +1,4 @@ -.\" Copyright 2012 The Kyua Authors. +.\" Copyright 2012-2024 The Kyua Authors. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" 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. -.Dd July 3, 2015 +.Dd March 23, 2024 .Dt KYUAFILE 5 .Os .Sh NAME @@ -173,6 +173,75 @@ Refer to the section below for clarification. .It Va description Textual description of the test. +.It Va execenv +The name of the execution environment to be used for running the test. +If empty or not defined, the +.Sq host +execution environment is meant. +The possible values are: +.Bl -tag -width xUnnnnnnn +.It host +The default environment which runs the test as a usual child process. +.It jail +The +.Fx +.Xr jail 8 +environment. +It creates a temporary jail to run the test and its optional cleanup logic +within. +.Pp +This feature requires +.Xr kyua 1 +to be running with superuser privileges. +.Pp +The difference between +.Va security.jail.children.max +and +.Va security.jail.children.cur +sysctl of the jail +.Xr kyua 1 +is running within must have a value high enough for the jail based tests +planned to be run. +For instance, the value 1 should be enough for a sequential run of simple +tests. +Otherwise, such aspects as parallel test execution and sub-jails spawned +by specific test cases should be considered. +.Pp +The formula of a temporary jail name is +.Sq kyua ++ +.Va test program path ++ +.Sq _ ++ +.Va test case name . +All non-alphanumeric characters are replaced with +.Sq _ . +.Sq kyua_usr_tests_sys_netpfil_pf_pass_block_v4 +is an example for /usr/tests/sys/netpfil/pf/pass_block:v4 test case. +.El +.It Va execenv_jail_params +Additional test-specific whitespace-separated parameters of +.Fx +.Xr jail 8 +to create a temporary jail within which the test is run. +It makes sense only if execenv is set to +.Sq jail . +.sp +.Xr kyua 1 +implicitly passes +.Sq children.max +parameter to +.Xr jail 8 +for a temporary jail with the maximum possible value according to +the jail +.Xr kyua 1 +itself is running within. +It allows tests to easily spawn their own sub-jails without additional +configuration. +It can be overridden via +.Va execenv_jail_params +if needed. .It Va is_exclusive If true, indicates that this test program cannot be executed along any other programs at the same time. @@ -360,6 +429,36 @@ test_suite('FreeBSD') plain_test_program{name='the_test', ['custom.FreeBSD-Bug-Id']='category/12345'} .Ed +.Ss FreeBSD jail execution environment +The following example configures the test to be run within a temporary jail +with +.Xr vnet 9 +support and the permission to create raw sockets: +.Bd -literal -offset indent +syntax(2) + +test_suite('FreeBSD') + +atf_test_program{name='network_test', + execenv='jail', + execenv_jail_params='vnet allow.raw_sockets', + required_user='root'} +.Ed +.Pp +A test case itself may have no requirements in superuser privileges, +but required_user='root' metadata property reminds that the jail execution +environment requires +.Xr kyua 1 +being running with root privileges, and the test is skipped otherwise with +the respective message. The combination of +.Va execenv +set to +.Sq jail +and +.Va required_user +set to +.Sq unprivileged +does not work respectively. .Ss Connecting disjoint test suites Now suppose you had various test suites on your file system and you would like to connect them together so that they could be executed and treated as diff --git a/contrib/kyua/drivers/report_junit_test.cpp b/contrib/kyua/drivers/report_junit_test.cpp index 462dca72f9be..0f009c6befd3 100644 --- a/contrib/kyua/drivers/report_junit_test.cpp +++ b/contrib/kyua/drivers/report_junit_test.cpp @@ -63,6 +63,8 @@ static const char* const default_metadata = "allowed_architectures is empty\n" "allowed_platforms is empty\n" "description is empty\n" + "execenv is empty\n" + "execenv_jail_params is empty\n" "has_cleanup = false\n" "is_exclusive = false\n" "required_configs is empty\n" @@ -80,6 +82,8 @@ static const char* const overriden_metadata = "allowed_architectures is empty\n" "allowed_platforms is empty\n" "description = Textual description\n" + "execenv is empty\n" + "execenv_jail_params is empty\n" "has_cleanup = false\n" "is_exclusive = false\n" "required_configs is empty\n" @@ -199,6 +203,8 @@ ATF_TEST_CASE_BODY(junit_metadata__overrides) .add_allowed_architecture("arch1") .add_allowed_platform("platform1") .set_description("This is a test") + .set_execenv("jail") + .set_execenv_jail_params("vnet") .set_has_cleanup(true) .set_is_exclusive(true) .add_required_config("config1") @@ -215,6 +221,8 @@ ATF_TEST_CASE_BODY(junit_metadata__overrides) + "allowed_architectures = arch1\n" + "allowed_platforms = platform1\n" + "description = This is a test\n" + + "execenv = jail\n" + + "execenv_jail_params = vnet\n" + "has_cleanup = true\n" + "is_exclusive = true\n" + "required_configs = config1\n" diff --git a/contrib/kyua/engine/atf.cpp b/contrib/kyua/engine/atf.cpp index eb63be20b0e7..f6746dd2f29f 100644 --- a/contrib/kyua/engine/atf.cpp +++ b/contrib/kyua/engine/atf.cpp @@ -39,6 +39,7 @@ extern "C" { #include "engine/atf_list.hpp" #include "engine/atf_result.hpp" #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "model/test_case.hpp" #include "model/test_program.hpp" #include "model/test_result.hpp" @@ -54,6 +55,7 @@ extern "C" { #include "utils/stream.hpp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace process = utils::process; @@ -190,7 +192,10 @@ engine::atf_interface::exec_test(const model::test_program& test_program, args.push_back(F("-r%s") % (control_directory / result_name)); args.push_back(test_case_name); - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->init(); + e->exec(args); } @@ -219,7 +224,9 @@ engine::atf_interface::exec_cleanup( } args.push_back(F("%s:cleanup") % test_case_name); - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->exec(args); } diff --git a/contrib/kyua/engine/atf_list.cpp b/contrib/kyua/engine/atf_list.cpp index a16b889c74f0..c9c2fed70175 100644 --- a/contrib/kyua/engine/atf_list.cpp +++ b/contrib/kyua/engine/atf_list.cpp @@ -121,6 +121,10 @@ engine::parse_atf_metadata(const model::properties_map& props) mdbuilder.set_string("has_cleanup", value); } else if (name == "require.arch") { mdbuilder.set_string("allowed_architectures", value); + } else if (name == "execenv") { + mdbuilder.set_string("execenv", value); + } else if (name == "execenv.jail.params") { + mdbuilder.set_string("execenv_jail_params", value); } else if (name == "require.config") { mdbuilder.set_string("required_configs", value); } else if (name == "require.files") { diff --git a/contrib/kyua/engine/config.cpp b/contrib/kyua/engine/config.cpp index 3f162a94fbb5..a7c418e3164c 100644 --- a/contrib/kyua/engine/config.cpp +++ b/contrib/kyua/engine/config.cpp @@ -35,6 +35,7 @@ #include #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "utils/config/exceptions.hpp" #include "utils/config/parser.hpp" #include "utils/config/tree.ipp" @@ -43,6 +44,7 @@ #include "utils/text/operations.ipp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace passwd = utils::passwd; namespace text = utils::text; @@ -59,6 +61,7 @@ static void init_tree(config::tree& tree) { tree.define< config::string_node >("architecture"); + tree.define< config::strings_set_node >("execenvs"); tree.define< config::positive_int_node >("parallelism"); tree.define< config::string_node >("platform"); tree.define< engine::user_node >("unprivileged_user"); @@ -74,6 +77,14 @@ static void set_defaults(config::tree& tree) { tree.set< config::string_node >("architecture", KYUA_ARCHITECTURE); + + std::set< std::string > supported; + for (auto em : execenv::execenvs()) + if (em->is_supported()) + supported.insert(em->name()); + supported.insert(execenv::default_execenv_name); + tree.set< config::strings_set_node >("execenvs", supported); + // TODO(jmmv): Automatically derive this from the number of CPUs in the // machine and forcibly set to a value greater than 1. Still testing // the new parallel implementation as of 2015-02-27 though. @@ -229,6 +240,13 @@ engine::empty_config(void) { config::tree tree(false); init_tree(tree); + + // Tests of Kyua itself tend to use an empty config, i.e. default + // execution environment is used. Let's allow it. + std::set< std::string > supported; + supported.insert(engine::execenv::default_execenv_name); + tree.set< config::strings_set_node >("execenvs", supported); + return tree; } diff --git a/contrib/kyua/engine/execenv/execenv.cpp b/contrib/kyua/engine/execenv/execenv.cpp new file mode 100644 index 000000000000..b043bcda52cb --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv.cpp @@ -0,0 +1,74 @@ +// Copyright 2023 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * 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. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT +// OWNER 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 "engine/execenv/execenv.hpp" + +#include "engine/execenv/execenv_host.hpp" + +namespace execenv = engine::execenv; + +using utils::none; + + +const char* execenv::default_execenv_name = "host"; + + +/// List of registered execution environments, except default host one. +/// +/// Use register_execenv() to add an entry to this global list. +static std::vector< std::shared_ptr< execenv::manager > > + execenv_managers; + + +void +execenv::register_execenv(const std::shared_ptr< execenv::manager > manager) +{ + execenv_managers.push_back(manager); +} + + +const std::vector< std::shared_ptr< execenv::manager> > +execenv::execenvs() +{ + return execenv_managers; +} + + +std::unique_ptr< execenv::interface > +execenv::get(const model::test_program& test_program, + const std::string& test_case_name) +{ + for (auto m : execenv_managers) { + auto e = m->probe(test_program, test_case_name); + if (e != nullptr) + return e; + } + + return std::unique_ptr< execenv::interface >( + new execenv::execenv_host(test_program, test_case_name)); +} diff --git a/contrib/kyua/engine/execenv/execenv.hpp b/contrib/kyua/engine/execenv/execenv.hpp new file mode 100644 index 000000000000..e667ff205d85 --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv.hpp @@ -0,0 +1,149 @@ +// Copyright 2023 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * 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. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT +// OWNER 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. + +/// \file engine/execenv/execenv.hpp +/// Execution environment subsystem interface. + +#if !defined(ENGINE_EXECENV_EXECENV_HPP) +#define ENGINE_EXECENV_EXECENV_HPP + +#include "model/test_program.hpp" +#include "utils/optional.ipp" +#include "utils/process/operations_fwd.hpp" + +using utils::process::args_vector; +using utils::optional; + +namespace engine { +namespace execenv { + + +extern const char* default_execenv_name; + + +/// Abstract interface of an execution environment. +class interface { +protected: + const model::test_program& _test_program; + const std::string& _test_case_name; + +public: + /// Constructor. + /// + /// \param program The test program. + /// \param test_case_name Name of the test case. + interface(const model::test_program& test_program, + const std::string& test_case_name) : + _test_program(test_program), + _test_case_name(test_case_name) + {} + + /// Destructor. + virtual ~interface() {} + + /// Initializes execution environment. + /// + /// It's expected to be called inside a fork which runs + /// scheduler::interface::exec_test(), so we can fail a test fast if its + /// execution environment setup fails, and test execution could use the + /// configured proc environment, if expected. + virtual void init() const = 0; + + /// Cleanups or removes execution environment. + /// + /// It's expected to be called inside a fork for execenv cleanup. + virtual void cleanup() const = 0; + + /// Executes a test within the execution environment. + /// + /// It's expected to be called inside a fork which runs + /// scheduler::interface::exec_test() or exec_cleanup(). + /// + /// \param args The arguments to pass to the binary. + virtual void exec(const args_vector& args) const UTILS_NORETURN = 0; +}; + + +/// Abstract interface of an execution environment manager. +class manager { +public: + /// Destructor. + virtual ~manager() {} + + /// Returns name of an execution environment. + virtual const std::string& name() const = 0; + + /// Returns whether this execution environment is actually supported. + /// + /// It can be compile time and/or runtime check. + virtual bool is_supported() const = 0; + + /// Returns execution environment for a test. + /// + /// It checks if the given test is designed for this execution environment. + /// + /// \param program The test program. + /// \param test_case_name Name of the test case. + /// + /// \return An execenv object if the test conforms, or none. + virtual std::unique_ptr< interface > probe( + const model::test_program& test_program, + const std::string& test_case_name) const = 0; + + // TODO: execenv related extra metadata could be provided by a manager + // not to know how exactly and where it should be added to the kyua +}; + + +/// Registers an execution environment. +/// +/// \param manager Execution environment manager. +void register_execenv(const std::shared_ptr< manager > manager); + + +/// Returns list of registered execenv managers, except default host one. +/// +/// \return A vector of pointers to execenv managers. +const std::vector< std::shared_ptr< manager> > execenvs(); + + +/// Returns execution environment for a test case. +/// +/// \param program The test program. +/// \param test_case_name Name of the test case. +/// +/// \return An execution environment of a test. +std::unique_ptr< execenv::interface > get( + const model::test_program& test_program, + const std::string& test_case_name); + + +} // namespace execenv +} // namespace engine + +#endif // !defined(ENGINE_EXECENV_EXECENV_HPP) diff --git a/contrib/kyua/engine/execenv/execenv_host.cpp b/contrib/kyua/engine/execenv/execenv_host.cpp new file mode 100644 index 000000000000..4e37fca3e7d3 --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv_host.cpp @@ -0,0 +1,52 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * 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. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT +// OWNER 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 "engine/execenv/execenv_host.hpp" + +#include "utils/fs/path.hpp" +#include "utils/process/operations.hpp" + +void +execenv::execenv_host::init() const +{ + // nothing to do +} + + +void +execenv::execenv_host::cleanup() const +{ + // nothing to do +} + + +void +execenv::execenv_host::exec(const args_vector& args) const +{ + utils::process::exec(_test_program.absolute_path(), args); +} diff --git a/contrib/kyua/engine/execenv/execenv_host.hpp b/contrib/kyua/engine/execenv/execenv_host.hpp new file mode 100644 index 000000000000..2742366cfd6f --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv_host.hpp @@ -0,0 +1,63 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * 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. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT +// OWNER 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. + +/// \file engine/execenv/execenv_host.hpp +/// Default execution environment. + +#if !defined(ENGINE_EXECENV_EXECENV_HOST_HPP) +#define ENGINE_EXECENV_EXECENV_HOST_HPP + +#include "engine/execenv/execenv.hpp" + +#include "utils/process/operations_fwd.hpp" + +namespace execenv = engine::execenv; + +using utils::process::args_vector; + +namespace engine { +namespace execenv { + + +class execenv_host : public execenv::interface { +public: + execenv_host(const model::test_program& test_program, + const std::string& test_case_name) : + execenv::interface(test_program, test_case_name) + {} + + void init() const; + void cleanup() const; + void exec(const args_vector& args) const UTILS_NORETURN; +}; + + +} // namespace execenv +} // namespace engine + +#endif // !defined(ENGINE_EXECENV_EXECENV_HOST_HPP) diff --git a/contrib/kyua/engine/plain.cpp b/contrib/kyua/engine/plain.cpp index 8346e50bbecf..9a2c63f8b663 100644 --- a/contrib/kyua/engine/plain.cpp +++ b/contrib/kyua/engine/plain.cpp @@ -34,6 +34,7 @@ extern "C" { #include +#include "engine/execenv/execenv.hpp" #include "model/test_case.hpp" #include "model/test_program.hpp" #include "model/test_result.hpp" @@ -47,6 +48,7 @@ extern "C" { #include "utils/sanity.hpp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace process = utils::process; @@ -104,7 +106,10 @@ engine::plain_interface::exec_test( } process::args_vector args; - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->init(); + e->exec(args); } diff --git a/contrib/kyua/engine/requirements.cpp b/contrib/kyua/engine/requirements.cpp index a7b0a90d97db..a6a4cae7511c 100644 --- a/contrib/kyua/engine/requirements.cpp +++ b/contrib/kyua/engine/requirements.cpp @@ -28,6 +28,7 @@ #include "engine/requirements.hpp" +#include "engine/execenv/execenv.hpp" #include "model/metadata.hpp" #include "model/types.hpp" #include "utils/config/nodes.ipp" @@ -100,6 +101,34 @@ check_allowed_architectures(const model::strings_set& allowed_architectures, } +/// Checks if test's execenv matches the user configuration. +/// +/// \param execenv Execution environment name a test is designed for. +/// \param user_config Runtime user configuration. +/// +/// \return Empty if the execenv is in the list or an error message otherwise. +static std::string +check_execenv(const std::string& execenv, const config::tree& user_config) +{ + std::string name = execenv; + if (name.empty()) + name = engine::execenv::default_execenv_name; // if test claims nothing + + std::set< std::string > execenvs; + try { + execenvs = user_config.lookup< config::strings_set_node >("execenvs"); + } catch (const config::unknown_key_error&) { + // okay, user config does not define it, empty set then + } + + if (execenvs.find(name) == execenvs.end()) + return F("'%s' execenv is not supported or not allowed by " + "the runtime user configuration") % name; + + return ""; +} + + /// Checks if the allowed platforms match the current architecture. /// /// \param allowed_platforms Set of allowed platforms. @@ -263,6 +292,10 @@ engine::check_reqs(const model::metadata& md, const config::tree& cfg, if (!reason.empty()) return reason; + reason = check_execenv(md.execenv(), cfg); + if (!reason.empty()) + return reason; + reason = check_allowed_platforms(md.allowed_platforms(), cfg); if (!reason.empty()) return reason; diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index e7b51d23acca..e75091a40e38 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -40,6 +40,7 @@ extern "C" { #include "engine/config.hpp" #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "engine/requirements.hpp" #include "model/context.hpp" #include "model/metadata.hpp" @@ -68,6 +69,7 @@ extern "C" { namespace config = utils::config; namespace datetime = utils::datetime; +namespace execenv = engine::execenv; namespace executor = utils::process::executor; namespace fs = utils::fs; namespace logging = utils::logging; @@ -87,6 +89,10 @@ using utils::optional; datetime::delta scheduler::cleanup_timeout(60, 0); +/// Timeout for the test case execenv cleanup operation. +datetime::delta scheduler::execenv_cleanup_timeout(60, 0); + + /// Timeout for the test case listing operation. /// /// TODO(jmmv): This is here only for testing purposes. Maybe we should expose @@ -206,6 +212,18 @@ struct test_exec_data : public exec_data { /// denote that no further attempts shall be made at cleaning this up. bool needs_cleanup; + /// Whether this test case still needs to have its execenv cleanup executed. + /// + /// This is set externally when the cleanup routine is actually invoked to + /// denote that no further attempts shall be made at cleaning this up. + bool needs_execenv_cleanup; + + /// Original PID of the test case subprocess. + /// + /// This is used for the cleanup upon termination by a signal, to reap the + /// leftovers and form missing exit_handle. + pid_t pid; + /// The exit_handle for this test once it has completed. /// *** 1720 LINES SKIPPED *** From nobody Thu Jul 18 14:11:18 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPvqW3BdHz5RVSd; Thu, 18 Jul 2024 14:11:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPvqV5Gs8z46Ty; Thu, 18 Jul 2024 14:11:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721311878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yPVVWrVMil2JdFBCMotDJHy/X7v6F9TH6tuev9/urBs=; b=ep2Sv5XcheoEEhe9vGF3H9bkL92+0SyDmLq88Jf/402S/Zc4CsqBGrEzb/vrnkl0Ykfkm8 2QqidpNtNG7YtgwxB6ynBrndzWboczzkyMBnp8nw0WAR5QbtHEqEYP/c9Kav4vvgH1Ml5p o0ZCzI0hWej9u0Ycj1FfDLadhBYRP0Q/3FLXiEt1x67jVAbrqnqdVCNZZyk9QG+LqYhXCf +G4iHew9J4aVuFTs5h9rkAq2EB9QHcuOKG0D21zxh77nW8SQOOrQ+IDWRhFxYoIni/4OGv F12CU/UA5e67piODp2P57dfM/z2Ekoc2VfpcPm+AZp7MFpAUkA3HnJODuhq6Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721311878; a=rsa-sha256; cv=none; b=pJYIimQyJVLI17djPtXsIgwK2DlJ3Dex6q+OmuxGeTa4cQUJACN5a610Uoj5/B70xrO9sw OYjmhrmXe8/nDSdU+/lHHiau5D9VbcyyqNunzqmFxvn9tpPtBlmFnCyi8hWG9d/ufanFEV 5cVni0/fBhwyDjNc+xrZh/YJ8+p3hfmOd5eMQCcjRtgUAsv3EfCTYZcVfHvEFCjhwSsCNw cbs0ZZI1nJPjb4cpuCD1zzAJkqMxuDg3b6Vs7WBLYwA4Hs5WUXo0f1iCrWLO/D0rHvgTgZ SokedLXHBxqUoeiMj76Ad8U54rpjqqqPlIz6kgPUzrSnlGw4XU0vgBrmr1ro0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721311878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yPVVWrVMil2JdFBCMotDJHy/X7v6F9TH6tuev9/urBs=; b=Wc5zpl+8XnIVeVWoUIrnZKzt8mi00nbN9GT9X90FqRTY3Sq083mnLIzT5Neglm5/XlQt4S kMBK2fQy8l6X92IgTpWjw9lLnx9LEcnr0T1/Z5OD0YlaDfShbH7CP2sJzyCec0OdDiIKe7 /gE/WT0AvGfkd6iofT+HM73Pll2PoJOIk2477Ebt/rG3ByVD3rwxusc1HH1HIbkd0VLXI4 ziZrfjLKrhVXaOHDFkMrzfwGLrjK8w0fyKGmNfG70VfAXIw0Zt4AVfDFNPIWRkHoCXDbJ5 jU2jpysp+KtOAHQCgwXHfQUVr+nm76+BrskVZ/RWRXX/9WsFrXGnR3nxLUkwNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPvqV4tCTzrgg; Thu, 18 Jul 2024 14:11:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IEBIiA050196; Thu, 18 Jul 2024 14:11:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IEBI0u050193; Thu, 18 Jul 2024 14:11:18 GMT (envelope-from git) Date: Thu, 18 Jul 2024 14:11:18 GMT Message-Id: <202407181411.46IEBI0u050193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2aeb3e204af3 - main - zdb: Chase a missing library dependency List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2aeb3e204af3ce61fefa727035e68e80498218c1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2aeb3e204af3ce61fefa727035e68e80498218c1 commit 2aeb3e204af3ce61fefa727035e68e80498218c1 Author: Mark Johnston AuthorDate: 2024-07-18 13:57:38 +0000 Commit: Mark Johnston CommitDate: 2024-07-18 13:57:38 +0000 zdb: Chase a missing library dependency Fixes: 75e1fea68aaa ("zfs: merge openzfs/zfs@1147a2797") --- cddl/usr.sbin/zdb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile index 22ab4421b30a..31013a1d8100 100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@ -22,7 +22,7 @@ CFLAGS+= \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ -DHAVE_ISSETUGID -LIBADD= nvpair umem uutil zdb zfs spl avl zutil zpool crypto +LIBADD= nvpair umem uutil zdb zfs_core zfs spl avl zutil zpool crypto CFLAGS.gcc+= -fms-extensions # Since there are many asserts in this program, it makes no sense to compile From nobody Thu Jul 18 14:54:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPwns0mSFz5RYvc; Thu, 18 Jul 2024 14:54:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPwns0GCGz4Cgp; Thu, 18 Jul 2024 14:54:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721314497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3R8ozw3e7g//YUFlQUunk+1PryIZ+tnkPgpy3hGaVgs=; b=u6hIQeb1KNrwEYsKk7Delc04VJAzMfTVplKuTAhMiatSDkZf/VUkI4iGEbGjNNpRhHWK0S m/Cd3TURHo7Ma8SVxH5SpUCugSA7Xhx/14BqTBCnl5Gl3mv1l8k5Z7IYHEplRuLWHb1ZO0 CiNlGxk8hElLl6qi5SKeSOqZfmAcYQfmpCfVBrVxbqiTUh+2e+MdQtanpHh+RFzAIBbXBG /oGTwgM1a1GsM29PTU6Pq6t9TCP2TigwHv7/2Nh37HTHtEjvL4jRLs+GsiBN2nWdKnDUkB UzgVj8BqIcMoFaiyTgclGYnXkG9kfggGaUDFRGYNnzZLNjFFbMu1IZySlW/Nlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721314497; a=rsa-sha256; cv=none; b=IPMLm1SQJfwkhJp5hSRUerGL+LUTdflWuO9RBAk8hiUGO7DRCkIdWdoAUzWYWCUX9beyED /I0ocX/O+FqnkdYc7ZtKcfWbHywIgMkUsEOYR99Eb5sda9aYMGeNsGZrXTL92YTPHqtq1v ezY4Th7nJ1vVi7USsOJFALIQ49WK/MhUGLLYOXJxDv/38eD6/Qzt5l1eZcKFQzw1wdPoiO V/Lyk2wJcI2tub+Kjde+PnQM81aCCfdSzsBQ17VY1DFCAxCLrGq6ScWpipr/cA+ecRGfM6 nPYO3wyjXIj5j4NC4xnzB3PWNP4D9a95P8YLA5A5bYK49zoq8ddqlwAxNuP+Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721314497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3R8ozw3e7g//YUFlQUunk+1PryIZ+tnkPgpy3hGaVgs=; b=HBVRsjXFJC2B0SpiKMXWon+q/BkaqsadNCWeM2pErpvdgLYTc6xHGBzftz1SaRwbDCi8MX oX3Wi73kMlNIL4rKLm9Zy04uitAJswWTHNCabOdhSduv2lLB5l6km3LLqDJNyOEGRzCDLi 1w0Enj2AGsJINWRi281CPzY9pDuU1SN0EJr712m1q2WAO5/xIo+n+hTPrpRmNOcytFZG0E 0YmCk5Js7R6gLwXbRY9tNuJNTAdphrLkHIMgXnvUxENGgmR8Phrz2Jp6riS2ISnzjz+ycU lUAIcUByTS0/8PzQ1pz+e7JSRK1YPoiIpDlgnAIxM1x8FArbfyE7hwJreh6Q2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPwnr707Qzsxh; Thu, 18 Jul 2024 14:54:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IEsuZJ022072; Thu, 18 Jul 2024 14:54:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IEsuUJ022069; Thu, 18 Jul 2024 14:54:56 GMT (envelope-from git) Date: Thu, 18 Jul 2024 14:54:56 GMT Message-Id: <202407181454.46IEsuUJ022069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f029f6277996 - main - zdb: Fix printf formatting of a uint64_t List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f029f6277996760be4be42148295231af425cc2d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f029f6277996760be4be42148295231af425cc2d commit f029f6277996760be4be42148295231af425cc2d Author: Mark Johnston AuthorDate: 2024-07-18 14:52:52 +0000 Commit: Mark Johnston CommitDate: 2024-07-18 14:52:52 +0000 zdb: Fix printf formatting of a uint64_t This fixes the build on 32-bit platforms. Fixes: dc91e7452482 ("zdb: dump ZAP_FLAG_UINT64_KEY ZAPs properly (#16334)") --- sys/contrib/openzfs/cmd/zdb/zdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/cmd/zdb/zdb.c b/sys/contrib/openzfs/cmd/zdb/zdb.c index f55c7f7b8176..6063dc3b7cd3 100644 --- a/sys/contrib/openzfs/cmd/zdb/zdb.c +++ b/sys/contrib/openzfs/cmd/zdb/zdb.c @@ -1131,8 +1131,8 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size) !!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY); if (key64) - (void) printf("\t\t0x%010lx = ", - *(uint64_t *)attr.za_name); + (void) printf("\t\t0x%010llx = ", + (u_longlong_t)*(uint64_t *)attr.za_name); else (void) printf("\t\t%s = ", attr.za_name); From nobody Thu Jul 18 17:29:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQ0DK4dMvz5RnG1; Thu, 18 Jul 2024 17:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQ0DK3gXKz4hT8; Thu, 18 Jul 2024 17:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721323777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7C6QM9VcKvwtxE6RAIa37LwWdHudq0LROwPBzq641E=; b=mkX6d7A8uweCKcA7lYrX/lopu26nLh1Y13vYtbfNdZhYPK8lNaWw1BtUGSIFflMsyxSMxZ BJg+IKnxfrBPz2oFDEBeIazmC926KT4bKfm7eBk2qDHapjY4LwPWfPXEWOFvZGtBXaBJbp R2wSlyQ50/vr/SYJZJTx6wYGOn5nXRHI8NVSgK6CFKOj1cAgrtuPNXF4mKxry8haRIu5cZ GIcFHx15iEnTGONtP5RSg81po38pPAoifU74AzR7u9+kyAry+kcDiVRHQFzaCMfiZ+Euze /AcpI3Pv/sUFhEkuCz3sNcKNxzDuo8fwbyoOnw4XgBp/K40r300U2cYMC4DWcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721323777; a=rsa-sha256; cv=none; b=B9Xt73IxGoed+N/RLzjsOr0mQ0TajXCiX9VvHUUPKXx8fTHypbbNy22kJDw6rYuxgZBdiH bs39Pzww5YqG87i4dJZQIMHsWkLl9qvlSK/05npJ9aVsh6o7OmiMloM5o51rNzMXBNG4cj x1MIoqkjSbPmmDWTn4ca2iwepawsOG2QuMbr23adoAx0aawIkVTLFMDkR6wAK1etTmiDns PatmCPj1v1tzOVJZkUgCiqR4pi1jIx5yxpcat2je/RyQlmIgPnjetd+F0sYtT6VArzubMW v3CS5kgNaamex5UB8sX5lv9mQ/bsm80K1H41Kodon3Bx4wFI8gcZqFP+2atmzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721323777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7C6QM9VcKvwtxE6RAIa37LwWdHudq0LROwPBzq641E=; b=O06vsdsKX1VCfV+1emsMitCaV8c72nhKCZV30dS1ID2ESMon5VhiErvTvqaC++be9UNRsO ULR9NYI43hpnWVkDTzkh2fiNo1SreymQTP1DW+Vp6fq0bnfHtTwJjsvQy6rhxKvWhE4LfT lIYiEGLoA7Xep8hQ34ldT2+ysP5GLhUFxHrgF2pEFfAUGYtdcOceIQtX+C6wDn3+qVAoEK rpk45LbFt+i6g6bQs6Wee8C6r3/pwpaQM6TOk/2dOStnYTtKKo6TeuQvKwy9BLlGCJqz1T +Q7lOk4V9UV0oSBUmVWR9xLtfVbZOA1aBBE6yO+4kD9hIjpW6lWvmUgp6Bifmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQ0DK3GPyzxYH; Thu, 18 Jul 2024 17:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IHTbkb082230; Thu, 18 Jul 2024 17:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IHTbXL082227; Thu, 18 Jul 2024 17:29:37 GMT (envelope-from git) Date: Thu, 18 Jul 2024 17:29:37 GMT Message-Id: <202407181729.46IHTbXL082227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 03248b3f5079 - main - NOTES: Correct swapped descriptions of virtio_scmi and virtio_scsi List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03248b3f5079c490d949f4e8725a37624d707e14 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=03248b3f5079c490d949f4e8725a37624d707e14 commit 03248b3f5079c490d949f4e8725a37624d707e14 Author: John Baldwin AuthorDate: 2024-07-18 17:28:57 +0000 Commit: John Baldwin CommitDate: 2024-07-18 17:28:57 +0000 NOTES: Correct swapped descriptions of virtio_scmi and virtio_scsi Sponsored by: Chelsio Communications --- sys/conf/NOTES | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index ecfa7aa5b33a..685125b782ca 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2433,8 +2433,8 @@ device virtio_blk # VirtIO Block device device virtio_console # VirtIO Console device device virtio_gpu # VirtIO GPU device device virtio_random # VirtIO Entropy device -device virtio_scmi # VirtIO SCSI device -device virtio_scsi # VirtIO SCMI device +device virtio_scmi # VirtIO SCMI device +device virtio_scsi # VirtIO SCSI device ##################################################################### # HID support From nobody Thu Jul 18 17:56:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQ0qG2w8bz5Rq0n; Thu, 18 Jul 2024 17:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQ0qG2VRrz4lSn; Thu, 18 Jul 2024 17:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721325386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ilTZCeE++EZ6ncrkb5Kot0qk4FPBJseZ2NB7H4bcflA=; b=KKJh2gXIY60KihhA6M6Q0I12JW8TBNNKqRlnbCdJuMmS3TjUKA6SQQHYeH98bUZCXbYRpL CoTyJGYYXNBC6Vl66tWVivh6iFKEgcMq3FZibRDCEI088t1wv9jj97opTjsUScwDrgmo48 BJ6ZcHIC8Wm//FFjUAXSq/LNjXoM4yq/cVgbbFiEF6S59BTtWTOwq8ZaMXZL5euMwavoFr dlOTcPlR/nIf1LMSivRv/p+tMiem/kP0UfDUBWld6phMkGnzB4gpsN725bIJ6WK9YO7ixh QwFzj/FT96HKWfy3gDTJ/kBPwF3CVkt69MxnolB/P0cw3s6TNCqgIIza7cqSZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721325386; a=rsa-sha256; cv=none; b=RPKXfoop8y0ipooQmZHAFOuzWl68Q1e5KeFV7Wu3BFWhOZZctY8pBjClTy2QxkhPBfeH/5 ermrsMcvRkX+ftC9gCdKSx8D7q9nz5ZsRLfr5iS5g6aDGJUNBU2Ycrp1iQcXlJHJgIFtfD DXXiUiln3pgkp4SUtqX/FGOar0nhQvKV79Hbobq7hERvgNlD4vLxNWvfrlvlR2Tzrp34j+ 3Vdsu+SBsB0/SBBuYxJHBnxMfZnJiEz3Ojv7wJeuKb5Vzr9JKRp4I5Ad3mUO6uhIqHpGDd 602GRubkJkFYoH19h/bI/nMd4mEsbxzqHJ6KkPBPeLnTnT18Q6lx7AaSdpcWAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721325386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ilTZCeE++EZ6ncrkb5Kot0qk4FPBJseZ2NB7H4bcflA=; b=M9Lq4w1QrnIddCy84TedFKSStiZpbI7ekPmtlRZvGn0aWiqSVCjUWkGQ0DVrZFNR49u+zD egjZmwjiK2uZG83Kt9K9CEQJxZ2ky4eSGZ8KA/SwhckhiadMPrB/h5/5y/Cf0aAFZCd58G AQqt/6C3YOhdiehC+itWVE424s+vqeFwmZpvgn2Y3SDMXB8PZyMAJM1Og5LG7OnSuQsUaY l9JW4weiXBFI72rvMVk500dFoAmq1JG2mqXdXbLdBTmy11hqMp5aHpsLQaq+w5Eove40Jr kgbcck0Angio+l27PoHXBEzB/RZKpM7xY8dshfyLQBzwRBefZoffB5O2pl/Lcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQ0qG25Kbzycq; Thu, 18 Jul 2024 17:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IHuQDX032212; Thu, 18 Jul 2024 17:56:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IHuQfZ032209; Thu, 18 Jul 2024 17:56:26 GMT (envelope-from git) Date: Thu, 18 Jul 2024 17:56:26 GMT Message-Id: <202407181756.46IHuQfZ032209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 8415a654d02e - main - Retire non-NEW_PCIB code and remove config option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8415a654d02e1c4268885e667c539873db570576 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=8415a654d02e1c4268885e667c539873db570576 commit 8415a654d02e1c4268885e667c539873db570576 Author: Jessica Clarke AuthorDate: 2024-07-18 17:55:12 +0000 Commit: Jessica Clarke CommitDate: 2024-07-18 17:55:12 +0000 Retire non-NEW_PCIB code and remove config option All architectures enable NEW_PCIB in DEFAULTS (arm being the most recent to do so in 121be555997b (arm: Set NEW_PCIB in DEFAULTS rather than a subset of kernel configs")), so it's time we removed the legacy code that no longer sees much testing and has a significant maintenance burden. Reviewed by: jhb, andrew, emaste Differential Revision: https://reviews.freebsd.org/D32954 --- sys/amd64/conf/DEFAULTS | 2 - sys/amd64/include/resource.h | 2 - sys/arm/conf/DEFAULTS | 1 - sys/arm/include/resource.h | 2 - sys/arm64/cavium/thunder_pcie_pem.c | 18 +- sys/arm64/conf/DEFAULTS | 1 - sys/arm64/include/resource.h | 2 - sys/conf/config.mk | 6 +- sys/conf/options | 1 - sys/dev/acpica/acpi_pcib_acpi.c | 31 +-- sys/dev/hyperv/pcib/vmbus_pcib.c | 3 - sys/dev/hyperv/vmbus/vmbus.c | 11 +- sys/dev/hyperv/vmbus/vmbus_var.h | 2 - sys/dev/ofw/ofw_pcib.c | 20 +- sys/dev/pccbb/pccbb_pci.c | 14 +- sys/dev/pci/pci.c | 12 +- sys/dev/pci/pci_host_generic.c | 26 +-- sys/dev/pci/pci_pci.c | 374 +----------------------------------- sys/dev/pci/pci_subr.c | 3 - sys/dev/pci/pcib_private.h | 19 +- sys/i386/conf/DEFAULTS | 2 - sys/i386/include/resource.h | 2 - sys/modules/cardbus/Makefile | 4 - sys/modules/cbb/Makefile | 4 - sys/powerpc/conf/DEFAULTS | 2 - sys/riscv/conf/DEFAULTS | 1 - sys/riscv/include/resource.h | 2 - sys/x86/include/mptable.h | 4 - sys/x86/pci/pci_bus.c | 6 +- sys/x86/pci/qpi.c | 4 +- sys/x86/x86/mptable.c | 12 -- sys/x86/x86/mptable_pci.c | 11 +- 32 files changed, 64 insertions(+), 540 deletions(-) diff --git a/sys/amd64/conf/DEFAULTS b/sys/amd64/conf/DEFAULTS index 5167cf4d98d0..eb8ee6b76a69 100644 --- a/sys/amd64/conf/DEFAULTS +++ b/sys/amd64/conf/DEFAULTS @@ -25,6 +25,4 @@ options GEOM_PART_GPT # Default congestion control algorithm options CC_CUBIC # include CUBIC congestion control -options NEW_PCIB - options NETLINK # netlink(4) support diff --git a/sys/amd64/include/resource.h b/sys/amd64/include/resource.h index 368a13b88d3a..9477572176e0 100644 --- a/sys/amd64/include/resource.h +++ b/sys/amd64/include/resource.h @@ -39,8 +39,6 @@ #define SYS_RES_DRQ 2 /* isa dma lines */ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ -#ifdef NEW_PCIB #define PCI_RES_BUS 5 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/arm/conf/DEFAULTS b/sys/arm/conf/DEFAULTS index 85d090dfa782..1acfe6349b4b 100644 --- a/sys/arm/conf/DEFAULTS +++ b/sys/arm/conf/DEFAULTS @@ -7,5 +7,4 @@ device mem # Default congestion control algorithm options CC_CUBIC # include CUBIC congestion control -options NEW_PCIB options INTRNG # All arm systems use INTRNG these days diff --git a/sys/arm/include/resource.h b/sys/arm/include/resource.h index d6b544d662d4..f7c2633c5f0d 100644 --- a/sys/arm/include/resource.h +++ b/sys/arm/include/resource.h @@ -40,8 +40,6 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ -#ifdef NEW_PCIB #define PCI_RES_BUS 6 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index a27ed810c618..c334342afe4a 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -254,13 +254,13 @@ thunder_pem_write_ivar(device_t dev, device_t child, int index, static int thunder_pem_activate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(r)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->id, child, r)); #endif @@ -276,13 +276,13 @@ static int thunder_pem_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(r)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->id, child, r)); #endif @@ -350,13 +350,13 @@ static int thunder_pem_adjust_resource(device_t dev, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->id, child, res, start, end)); #endif @@ -671,7 +671,7 @@ thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, device_t parent_dev; switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->id, child, rid, start, end, count, flags)); @@ -718,12 +718,12 @@ static int thunder_pem_release_resource(device_t dev, device_t child, struct resource *res) { device_t parent_dev; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc = device_get_softc(dev); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->id, child, res)); #endif diff --git a/sys/arm64/conf/DEFAULTS b/sys/arm64/conf/DEFAULTS index 5d267af4b7d7..fb8b74783867 100644 --- a/sys/arm64/conf/DEFAULTS +++ b/sys/arm64/conf/DEFAULTS @@ -15,7 +15,6 @@ options GEOM_PART_GPT # Default congestion control algorithm options CC_CUBIC # include CUBIC congestion control -options NEW_PCIB options INTRNG options NETLINK # netlink(4) support diff --git a/sys/arm64/include/resource.h b/sys/arm64/include/resource.h index d4cffb1ae854..336fc11a435a 100644 --- a/sys/arm64/include/resource.h +++ b/sys/arm64/include/resource.h @@ -44,9 +44,7 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ -#ifdef NEW_PCIB #define PCI_RES_BUS 6 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/conf/config.mk b/sys/conf/config.mk index 729111b4ef3a..9ef3e7936a48 100644 --- a/sys/conf/config.mk +++ b/sys/conf/config.mk @@ -59,9 +59,9 @@ opt_sctp.h: opt_wlan.h: echo "#define IEEE80211_DEBUG 1" > ${.TARGET} echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET} -KERN_OPTS.i386=NEW_PCIB DEV_PCI -KERN_OPTS.amd64=NEW_PCIB DEV_PCI -KERN_OPTS.powerpc=NEW_PCIB DEV_PCI +KERN_OPTS.i386=DEV_PCI +KERN_OPTS.amd64=DEV_PCI +KERN_OPTS.powerpc=DEV_PCI KERN_OPTS=MROUTING IEEE80211_DEBUG \ IEEE80211_SUPPORT_MESH DEV_BPF \ ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA} diff --git a/sys/conf/options b/sys/conf/options index 928927fe99df..8464fd919ff0 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -186,7 +186,6 @@ MFI_DEBUG opt_mfi.h MFI_DECODE_LOG opt_mfi.h MPROF_BUFFERS opt_mprof.h MPROF_HASH_SIZE opt_mprof.h -NEW_PCIB opt_global.h NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NO_ADAPTIVE_SX diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 4c3d62a66d58..18fece293183 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -67,9 +67,7 @@ struct acpi_hpcib_softc { int ap_addr; /* device/func of PCI-Host bridge */ ACPI_BUFFER ap_prt; /* interrupt routing table */ -#ifdef NEW_PCIB struct pcib_host_resources ap_host_res; -#endif }; static int acpi_pcib_acpi_probe(device_t bus); @@ -95,7 +93,6 @@ static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); -#ifdef NEW_PCIB static int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end); @@ -107,7 +104,6 @@ static int acpi_pcib_acpi_activate_resource(device_t dev, static int acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, struct resource *r); #endif -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature); static bus_dma_tag_t acpi_pcib_get_dma_tag(device_t bus, device_t child); @@ -124,12 +120,8 @@ static device_method_t acpi_pcib_acpi_methods[] = { DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar), DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, acpi_pcib_acpi_alloc_resource), -#ifdef NEW_PCIB DEVMETHOD(bus_adjust_resource, acpi_pcib_acpi_adjust_resource), -#else - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), -#endif -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), DEVMETHOD(bus_activate_resource, acpi_pcib_acpi_activate_resource), DEVMETHOD(bus_deactivate_resource, acpi_pcib_acpi_deactivate_resource), @@ -183,7 +175,6 @@ acpi_pcib_acpi_probe(device_t dev) return (0); } -#ifdef NEW_PCIB static ACPI_STATUS acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) { @@ -290,9 +281,8 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) } return (AE_OK); } -#endif -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static bool get_decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp, rman_res_t *endp) @@ -371,7 +361,7 @@ acpi_pcib_acpi_attach(device_t dev) ACPI_STATUS status; static int bus0_seen = 0; u_int slot, func, busok; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct resource *bus_res; rman_res_t end, start; int rid; @@ -421,7 +411,6 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_addr = -1; } -#ifdef NEW_PCIB /* * Determine which address ranges this bridge decodes and setup * resource managers for those ranges. @@ -435,7 +424,6 @@ acpi_pcib_acpi_attach(device_t dev) device_printf(sc->ap_dev, "failed to parse resources: %s\n", AcpiFormatException(status)); } -#endif /* * Get our base bus number by evaluating _BBN. @@ -491,7 +479,7 @@ acpi_pcib_acpi_attach(device_t dev) } } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) /* * If nothing else worked, hope that ACPI at least lays out the * Host-PCI bridges in order and that as a result the next free @@ -578,7 +566,7 @@ acpi_pcib_acpi_attach(device_t dev) errout: device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) pcib_host_res_free(dev, &sc->ap_host_res); #endif return (error); @@ -704,16 +692,13 @@ struct resource * acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#ifdef NEW_PCIB struct acpi_hpcib_softc *sc; struct resource *res; -#endif #if defined(__i386__) || defined(__amd64__) start = hostb_alloc_start(type, start, end, count); #endif -#ifdef NEW_PCIB sc = device_get_softc(dev); #ifdef PCI_RES_BUS if (type == PCI_RES_BUS) @@ -734,13 +719,8 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, res = bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags); return (res); -#else - return (bus_generic_alloc_resource(dev, child, type, rid, start, end, - count, flags)); -#endif } -#ifdef NEW_PCIB int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end) @@ -793,7 +773,6 @@ acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, return (bus_generic_deactivate_resource(dev, child, r)); } #endif -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index f6237535cce3..9aec2fac698a 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -25,7 +25,6 @@ */ #include -#ifdef NEW_PCIB #include "opt_acpi.h" #include @@ -2042,5 +2041,3 @@ DEFINE_CLASS_0(pcib, vmbus_pcib_driver, vmbus_pcib_methods, DRIVER_MODULE(vmbus_pcib, vmbus, vmbus_pcib_driver, 0, 0); MODULE_DEPEND(vmbus_pcib, vmbus, 1, 1, 1); MODULE_DEPEND(vmbus_pcib, pci, 1, 1, 1); - -#endif /* NEW_PCIB */ diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index dee738f6e373..4157a4c41cea 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -1069,15 +1069,12 @@ vmbus_alloc_resource(device_t dev, device_t child, int type, int *rid, device_t parent = device_get_parent(dev); struct resource *res; -#ifdef NEW_PCIB if (type == SYS_RES_MEMORY) { struct vmbus_softc *sc = device_get_softc(dev); res = pcib_host_res_alloc(&sc->vmbus_mmio_res, child, type, rid, start, end, count, flags); - } else -#endif - { + } else { res = BUS_ALLOC_RESOURCE(parent, child, type, rid, start, end, count, flags); } @@ -1158,7 +1155,6 @@ vmbus_get_eventtq_method(device_t bus, device_t dev __unused, int cpu) return (VMBUS_PCPU_GET(sc, event_tq, cpu)); } -#ifdef NEW_PCIB #define VTPM_BASE_ADDR 0xfed40000 #define FOUR_GB (1ULL << 32) @@ -1375,7 +1371,6 @@ vmbus_free_mmio_res(device_t dev) if (hv_fb_res) hv_fb_res = NULL; } -#endif /* NEW_PCIB */ static void vmbus_identify(driver_t *driver, device_t parent) @@ -1460,10 +1455,8 @@ vmbus_doattach(struct vmbus_softc *sc) if (sc->vmbus_flags & VMBUS_FLAG_ATTACHED) return (0); -#ifdef NEW_PCIB vmbus_get_mmio_res(sc->vmbus_dev); vmbus_fb_mmio_res(sc->vmbus_dev); -#endif sc->vmbus_flags |= VMBUS_FLAG_ATTACHED; @@ -1681,9 +1674,7 @@ vmbus_detach(device_t dev) mtx_destroy(&sc->vmbus_prichan_lock); mtx_destroy(&sc->vmbus_chan_lock); -#ifdef NEW_PCIB vmbus_free_mmio_res(dev); -#endif #if defined(__aarch64__) bus_release_resource(device_get_parent(dev), SYS_RES_IRQ, sc->vector, diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index 4e0a769402d5..cadcaa45aae5 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -127,10 +127,8 @@ struct vmbus_softc { struct intr_config_hook vmbus_intrhook; -#ifdef NEW_PCIB /* The list of usable MMIO ranges for PCIe pass-through */ struct pcib_host_resources vmbus_mmio_res; -#endif #if defined(__aarch64__) struct resource *ires; diff --git a/sys/dev/ofw/ofw_pcib.c b/sys/dev/ofw/ofw_pcib.c index ebc09fccd93e..3f55e45f5b92 100644 --- a/sys/dev/ofw/ofw_pcib.c +++ b/sys/dev/ofw/ofw_pcib.c @@ -421,13 +421,13 @@ static struct resource * ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->sc_pci_domain, child, rid, start, end, count, flags)); @@ -445,13 +445,13 @@ ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, static int ofw_pcib_release_resource(device_t bus, device_t child, struct resource *res) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->sc_pci_domain, child, res)); #endif @@ -505,13 +505,13 @@ ofw_pcib_translate_resource(device_t bus, int type, rman_res_t start, static int ofw_pcib_activate_resource(device_t bus, device_t child, struct resource *res) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->sc_pci_domain, child, res)); #endif @@ -621,13 +621,13 @@ ofw_pcib_bus_get_bus_tag(device_t bus, device_t child) static int ofw_pcib_deactivate_resource(device_t bus, device_t child, struct resource *res) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->sc_pci_domain, child, res)); @@ -644,13 +644,13 @@ static int ofw_pcib_adjust_resource(device_t bus, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->sc_pci_domain, child, res, start, end)); diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index 3b66b3df3852..eca370d17ca5 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -276,7 +276,7 @@ cbb_print_config(device_t dev) static int cbb_pci_attach(device_t brdev) { -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) static int curr_bus_number = 2; /* XXX EVILE BAD (see below) */ uint32_t pribus; #endif @@ -293,7 +293,7 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->domain = pci_get_domain(brdev); sc->pribus = pcib_get_bus(parent); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); #else @@ -351,7 +351,7 @@ cbb_pci_attach(device_t brdev) CTLFLAG_RD, &sc->subbus, 0, "io range 2 open"); #endif -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) /* * This is a gross hack. We should be scanning the entire pci * tree, assigning bus numbers in a way such that we (1) can @@ -429,13 +429,13 @@ err: static int cbb_pci_detach(device_t brdev) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct cbb_softc *sc = device_get_softc(brdev); #endif int error; error = cbb_detach(brdev); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (error == 0) pcib_free_secbus(brdev, &sc->bus); #endif @@ -787,7 +787,7 @@ cbb_pci_filt(void *arg) return retval; } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static struct resource * cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -931,7 +931,7 @@ static device_method_t cbb_methods[] = { /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), DEVMETHOD(bus_write_ivar, cbb_write_ivar), -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_alloc_resource, cbb_pci_alloc_resource), DEVMETHOD(bus_adjust_resource, cbb_pci_adjust_resource), DEVMETHOD(bus_release_resource, cbb_pci_release_resource), diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 171c6b710a32..efe017f9a3ba 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -405,7 +405,7 @@ static int pci_clear_bars; SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0, "Ignore firmware-assigned resources for BARs."); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static int pci_clear_buses; SYSCTL_INT(_hw_pci, OID_AUTO, clear_buses, CTLFLAG_RDTUN, &pci_clear_buses, 0, "Ignore firmware-assigned bus numbers."); @@ -3706,7 +3706,7 @@ xhci_early_takeover(device_t self) bus_release_resource(self, SYS_RES_MEMORY, rid, res); } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static void pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, struct resource_list *rl) @@ -4118,7 +4118,7 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) uhci_early_takeover(dev); } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) /* * Reserve resources for secondary bus ranges behind bridge * devices. @@ -5551,7 +5551,7 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, rl = &dinfo->resources; cfg = &dinfo->cfg; switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_alloc_secbus(dev, child, rid, start, end, count, flags)); @@ -5576,7 +5576,6 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, break; case SYS_RES_IOPORT: case SYS_RES_MEMORY: -#ifdef NEW_PCIB /* * PCI-PCI bridge I/O window resources are not BARs. * For those allocations just pass the request up the @@ -5595,7 +5594,6 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, type, rid, start, end, count, flags)); } } -#endif /* Reserve resources for this BAR if needed. */ rle = resource_list_find(rl, type, *rid); if (rle == NULL) { @@ -5668,7 +5666,6 @@ pci_release_resource(device_t dev, device_t child, struct resource *r) } #endif -#ifdef NEW_PCIB /* * PCI-PCI bridge I/O window resources are not BARs. For * those allocations just pass the request up the tree. @@ -5683,7 +5680,6 @@ pci_release_resource(device_t dev, device_t child, struct resource *r) return (bus_generic_release_resource(dev, child, r)); } } -#endif rl = &dinfo->resources; return (resource_list_release(rl, dev, child, r)); diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index c3dba9d72484..c3f4f03b76ad 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -416,13 +416,13 @@ int pci_host_generic_core_release_resource(device_t dev, device_t child, struct resource *res) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->ecam, child, res)); #endif @@ -506,17 +506,17 @@ struct resource * pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; #endif struct resource *res; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) sc = device_get_softc(dev); #endif switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: res = pci_domain_alloc_bus(sc->ecam, child, rid, start, end, count, flags); @@ -543,13 +543,13 @@ pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, static int generic_pcie_activate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(r)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->ecam, child, r)); #endif @@ -565,13 +565,13 @@ static int generic_pcie_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(r)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->ecam, child, r)); #endif @@ -587,13 +587,13 @@ static int generic_pcie_adjust_resource(device_t dev, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->ecam, child, res, start, end)); @@ -619,7 +619,7 @@ generic_pcie_map_resource(device_t dev, device_t child, struct resource *r, type = rman_get_type(r); switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (EINVAL); #endif @@ -658,7 +658,7 @@ generic_pcie_unmap_resource(device_t dev, device_t child, struct resource *r, type = rman_get_type(r); switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (EINVAL); #endif diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 40b22c9802c4..7977b9148c9b 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -58,19 +58,16 @@ #include "pcib_if.h" static int pcib_probe(device_t dev); -static int pcib_suspend(device_t dev); static int pcib_resume(device_t dev); static bus_child_present_t pcib_child_present; static bus_alloc_resource_t pcib_alloc_resource; -#ifdef NEW_PCIB static bus_adjust_resource_t pcib_adjust_resource; static bus_release_resource_t pcib_release_resource; static bus_activate_resource_t pcib_activate_resource; static bus_deactivate_resource_t pcib_deactivate_resource; static bus_map_resource_t pcib_map_resource; static bus_unmap_resource_t pcib_unmap_resource; -#endif static int pcib_reset_child(device_t dev, device_t child, int flags); static int pcib_power_for_sleep(device_t pcib, device_t dev, @@ -101,7 +98,7 @@ static device_method_t pcib_methods[] = { DEVMETHOD(device_attach, pcib_attach), DEVMETHOD(device_detach, pcib_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, pcib_suspend), + DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, pcib_resume), /* Bus interface */ @@ -109,19 +106,12 @@ static device_method_t pcib_methods[] = { DEVMETHOD(bus_read_ivar, pcib_read_ivar), DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), -#ifdef NEW_PCIB DEVMETHOD(bus_adjust_resource, pcib_adjust_resource), DEVMETHOD(bus_release_resource, pcib_release_resource), DEVMETHOD(bus_activate_resource, pcib_activate_resource), DEVMETHOD(bus_deactivate_resource, pcib_deactivate_resource), DEVMETHOD(bus_map_resource, pcib_map_resource), DEVMETHOD(bus_unmap_resource, pcib_unmap_resource), -#else - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), -#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_reset_child, pcib_reset_child), @@ -150,11 +140,8 @@ static device_method_t pcib_methods[] = { DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc)); EARLY_DRIVER_MODULE(pcib, pci, pcib_driver, NULL, NULL, BUS_PASS_BUS); -#if defined(NEW_PCIB) || defined(PCI_HP) SYSCTL_DECL(_hw_pci); -#endif -#ifdef NEW_PCIB static int pci_clear_pcib; SYSCTL_INT(_hw_pci, OID_AUTO, clear_pcib, CTLFLAG_RDTUN, &pci_clear_pcib, 0, "Clear firmware-assigned resources for PCI-PCI bridge I/O windows."); @@ -808,140 +795,6 @@ pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid, } #endif -#else - -/* - * Is the prefetch window open (eg, can we allocate memory in it?) - */ -static int -pcib_is_prefetch_open(struct pcib_softc *sc) -{ - return (sc->pmembase > 0 && sc->pmembase < sc->pmemlimit); -} - -/* - * Is the nonprefetch window open (eg, can we allocate memory in it?) - */ -static int -pcib_is_nonprefetch_open(struct pcib_softc *sc) -{ - return (sc->membase > 0 && sc->membase < sc->memlimit); -} - -/* - * Is the io window open (eg, can we allocate ports in it?) - */ -static int -pcib_is_io_open(struct pcib_softc *sc) -{ - return (sc->iobase > 0 && sc->iobase < sc->iolimit); -} - -/* - * Get current I/O decode. - */ -static void -pcib_get_io_decode(struct pcib_softc *sc) -{ - device_t dev; - uint32_t iolow; - - dev = sc->dev; - - iolow = pci_read_config(dev, PCIR_IOBASEL_1, 1); - if ((iolow & PCIM_BRIO_MASK) == PCIM_BRIO_32) - sc->iobase = PCI_PPBIOBASE( - pci_read_config(dev, PCIR_IOBASEH_1, 2), iolow); - else - sc->iobase = PCI_PPBIOBASE(0, iolow); - - iolow = pci_read_config(dev, PCIR_IOLIMITL_1, 1); - if ((iolow & PCIM_BRIO_MASK) == PCIM_BRIO_32) - sc->iolimit = PCI_PPBIOLIMIT( - pci_read_config(dev, PCIR_IOLIMITH_1, 2), iolow); - else - sc->iolimit = PCI_PPBIOLIMIT(0, iolow); -} - -/* - * Get current memory decode. - */ -static void -pcib_get_mem_decode(struct pcib_softc *sc) -{ - device_t dev; - pci_addr_t pmemlow; - - dev = sc->dev; - - sc->membase = PCI_PPBMEMBASE(0, - pci_read_config(dev, PCIR_MEMBASE_1, 2)); - sc->memlimit = PCI_PPBMEMLIMIT(0, - pci_read_config(dev, PCIR_MEMLIMIT_1, 2)); - - pmemlow = pci_read_config(dev, PCIR_PMBASEL_1, 2); - if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) - sc->pmembase = PCI_PPBMEMBASE( - pci_read_config(dev, PCIR_PMBASEH_1, 4), pmemlow); - else - sc->pmembase = PCI_PPBMEMBASE(0, pmemlow); - - pmemlow = pci_read_config(dev, PCIR_PMLIMITL_1, 2); - if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) - sc->pmemlimit = PCI_PPBMEMLIMIT( - pci_read_config(dev, PCIR_PMLIMITH_1, 4), pmemlow); - else - sc->pmemlimit = PCI_PPBMEMLIMIT(0, pmemlow); -} - -/* - * Restore previous I/O decode. - */ -static void -pcib_set_io_decode(struct pcib_softc *sc) -{ - device_t dev; - uint32_t iohi; - - dev = sc->dev; - - iohi = sc->iobase >> 16; - if (iohi > 0) - pci_write_config(dev, PCIR_IOBASEH_1, iohi, 2); - pci_write_config(dev, PCIR_IOBASEL_1, sc->iobase >> 8, 1); - - iohi = sc->iolimit >> 16; - if (iohi > 0) - pci_write_config(dev, PCIR_IOLIMITH_1, iohi, 2); - pci_write_config(dev, PCIR_IOLIMITL_1, sc->iolimit >> 8, 1); -} - -/* - * Restore previous memory decode. - */ -static void -pcib_set_mem_decode(struct pcib_softc *sc) -{ - device_t dev; - pci_addr_t pmemhi; - - dev = sc->dev; - - pci_write_config(dev, PCIR_MEMBASE_1, sc->membase >> 16, 2); *** 719 LINES SKIPPED *** From nobody Thu Jul 18 17:56:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQ0qH3P7Zz5Rq7N; Thu, 18 Jul 2024 17:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQ0qH2zqXz4lW3; Thu, 18 Jul 2024 17:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721325387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ASS/AkQJBamgADECYD/FERyobeFDoS9ByA8DdYOXG+Q=; b=tIDXOBBETe9RNe5D/SRFGVJldc3KNomCgiBQiK1KuSyg06MqrHoyG89MIg8RBvx+1psFM0 o+sRVg+91jGZ2cT2UIC0HsY27am2L+LKKN8itw1Jr994iwkXlIN6zYNwqho9P6TQJGad0F 0545ZBnoqgpV2VlwUf66UTV/0keqx/YqC7HgFHVTrVHMXs7hSFa1FhazBnuDZytwLsvmsA NqkyKmjq+pU2Yc+K/l0fdt2mqrXst4REz7STld/bzBmpuACH4X3lQSDD+26yLMYUUqqx8P I1HfqbVfUU+67t7SArbbBVcp11/zJe96scmaLqtZ5zrA4vnDC2DUYv8nKB1waQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721325387; a=rsa-sha256; cv=none; b=R73t+ePFr+0ViVc94Epa+rAdt4idXPJNj6etW4ExERq2EQl70yx2TUzWeXqKnt+jxS81qb nWAGXjH1/BxKz8uRfOBYiej1IrIZYPKjNr6Z/Q4E9ThrkqKh+NVVSg8E8PdzwyBe5G03vg l1E4ViN5iQO4xmLrahcjD0lEiX9Sxn/rhMqSXX/NWYPzD6r5ujDFEZtbDCBs3cwbfDnapQ Ogb3aXQtDQaM8Qp38FDVp6AY1LZQ+lPwtHwUMp/g3Tkfg2NUB8x64Prpb7E//+gJTteb0k hQ5ePHazH5LBgxz+TGrBuIJXLf/i9xSw8tmSHRRuydNIPRumE0cpzHv7YDq0ZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721325387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ASS/AkQJBamgADECYD/FERyobeFDoS9ByA8DdYOXG+Q=; b=pWAc4Hk0YAGS2pUjV7MkPPIISt5JzL+lhsppW2d8eSDRpwDAALT6NEMpU7R089vlCWvuwC 0DTb/6/DFKzu0WuzSGiqqc5LDC7wBM61yp0u2AYNNAf/zCYNCtSIOXCyDNWiYsDf+0dGn9 taxZawFko4thFkODThgJF/UzRG/g5XhTi4EJ9BoGjFIMD9LxwAoMCS57aD+OIDMQR8F/4R irqKJh+ZhXcrh0z5+SOFPAlLs9foRlf22aNkXiHN1FCR5ZSfJwZk9te0Y3bdKpqbTTBW4F UzJ5Ot+6d4tQDtSSBWXgzaQK4Vho18o6KIh7VV/Te+G+AgJC8L8gVT9b67RhfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQ0qH2XwzzyXt; Thu, 18 Jul 2024 17:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IHuRLk032251; Thu, 18 Jul 2024 17:56:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IHuRhK032248; Thu, 18 Jul 2024 17:56:27 GMT (envelope-from git) Date: Thu, 18 Jul 2024 17:56:27 GMT Message-Id: <202407181756.46IHuRhK032248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: e1d442a6db14 - main - Retire unused non-PCI_RES_BUS code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1d442a6db14adcfc11fc204225037da4332dd21 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=e1d442a6db14adcfc11fc204225037da4332dd21 commit e1d442a6db14adcfc11fc204225037da4332dd21 Author: Jessica Clarke AuthorDate: 2024-07-18 17:55:33 +0000 Commit: Jessica Clarke CommitDate: 2024-07-18 17:55:33 +0000 Retire unused non-PCI_RES_BUS code All architectures define PCI_RES_BUS unconditionally now that only NEW_PCIB is supported, so we no longer need the legacy code. Reviewed by: jhb, andrew Differential Revision: https://reviews.freebsd.org/D32955 --- sys/arm/mv/mv_pci.c | 18 ----------- sys/arm64/cavium/thunder_pcie_pem.c | 18 ----------- sys/dev/acpica/acpi_pcib_acpi.c | 35 --------------------- sys/dev/cardbus/cardbus.c | 10 ------ sys/dev/cardbus/cardbusvar.h | 2 -- sys/dev/ofw/ofw_pcib.c | 20 ------------ sys/dev/pccbb/pccbb_pci.c | 46 ---------------------------- sys/dev/pci/pci.c | 18 ----------- sys/dev/pci/pci_host_generic.c | 26 ---------------- sys/dev/pci/pci_pci.c | 61 +------------------------------------ sys/dev/pci/pci_private.h | 2 -- sys/dev/pci/pci_subr.c | 2 -- sys/dev/pci/pcib_private.h | 4 --- sys/x86/pci/pci_bus.c | 11 ------- sys/x86/pci/qpi.c | 9 ------ sys/x86/x86/mptable_pci.c | 10 ------ 16 files changed, 1 insertion(+), 291 deletions(-) diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c index eb1af5a4e237..87c6fbae3ca4 100644 --- a/sys/arm/mv/mv_pci.c +++ b/sys/arm/mv/mv_pci.c @@ -913,11 +913,9 @@ mv_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, case SYS_RES_IOPORT: case SYS_RES_MEMORY: break; -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->ap_segment, child, rid, start, end, count, flags)); -#endif default: return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, type, rid, start, end, count, flags)); @@ -941,20 +939,16 @@ static int mv_pcib_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end) { -#ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_adjust_resource(dev, child, r, start, end)); -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->ap_segment, child, r, start, end)); -#endif default: return (bus_generic_adjust_resource(dev, child, r, start, end)); } @@ -963,18 +957,14 @@ mv_pcib_adjust_resource(device_t dev, device_t child, static int mv_pcib_release_resource(device_t dev, device_t child, struct resource *res) { -#ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_release_resource(dev, child, res)); -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_release_bus(sc->ap_segment, child, res)); -#endif default: return (bus_generic_release_resource(dev, child, res)); } @@ -983,18 +973,14 @@ mv_pcib_release_resource(device_t dev, device_t child, struct resource *res) static int mv_pcib_activate_resource(device_t dev, device_t child, struct resource *r) { -#ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_activate_resource(dev, child, r)); -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_activate_bus(sc->ap_segment, child, r)); -#endif default: return (bus_generic_activate_resource(dev, child, r)); } @@ -1003,18 +989,14 @@ mv_pcib_activate_resource(device_t dev, device_t child, struct resource *r) static int mv_pcib_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_deactivate_resource(dev, child, r)); -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->ap_segment, child, r)); -#endif default: return (bus_generic_deactivate_resource(dev, child, r)); } diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index c334342afe4a..89393d9701d0 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -254,16 +254,12 @@ thunder_pem_write_ivar(device_t dev, device_t child, int index, static int thunder_pem_activate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->id, child, r)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_activate_resource(dev, child, r)); @@ -276,16 +272,12 @@ static int thunder_pem_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->id, child, r)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_deactivate_resource(dev, child, r)); @@ -350,16 +342,12 @@ static int thunder_pem_adjust_resource(device_t dev, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->id, child, res, start, end)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_adjust_resource(dev, child, res, start, @@ -671,11 +659,9 @@ thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, device_t parent_dev; switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->id, child, rid, start, end, count, flags)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: break; @@ -718,15 +704,11 @@ static int thunder_pem_release_resource(device_t dev, device_t child, struct resource *res) { device_t parent_dev; -#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->id, child, res)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_release_resource(dev, child, res)); diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 18fece293183..ff211102cc3c 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -96,14 +96,12 @@ static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev, static int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end); -#ifdef PCI_RES_BUS static int acpi_pcib_acpi_release_resource(device_t dev, device_t child, struct resource *r); static int acpi_pcib_acpi_activate_resource(device_t dev, device_t child, struct resource *r); static int acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, struct resource *r); -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature); static bus_dma_tag_t acpi_pcib_get_dma_tag(device_t bus, device_t child); @@ -121,15 +119,9 @@ static device_method_t acpi_pcib_acpi_methods[] = { DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, acpi_pcib_acpi_alloc_resource), DEVMETHOD(bus_adjust_resource, acpi_pcib_acpi_adjust_resource), -#if defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), DEVMETHOD(bus_activate_resource, acpi_pcib_acpi_activate_resource), DEVMETHOD(bus_deactivate_resource, acpi_pcib_acpi_deactivate_resource), -#else - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), -#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_cpus, acpi_pcib_get_cpus), @@ -243,11 +235,9 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) case ACPI_IO_RANGE: type = SYS_RES_IOPORT; break; -#ifdef PCI_RES_BUS case ACPI_BUS_NUMBER_RANGE: type = PCI_RES_BUS; break; -#endif default: return (AE_OK); } @@ -282,7 +272,6 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) return (AE_OK); } -#if defined(PCI_RES_BUS) static bool get_decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp, rman_res_t *endp) @@ -296,7 +285,6 @@ get_decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp, *endp = rle->end; return (true); } -#endif static int acpi_pcib_osc(struct acpi_hpcib_softc *sc, uint32_t osc_ctl) @@ -361,11 +349,9 @@ acpi_pcib_acpi_attach(device_t dev) ACPI_STATUS status; static int bus0_seen = 0; u_int slot, func, busok; -#if defined(PCI_RES_BUS) struct resource *bus_res; rman_res_t end, start; int rid; -#endif int error, domain; uint8_t busno; @@ -479,7 +465,6 @@ acpi_pcib_acpi_attach(device_t dev) } } -#if defined(PCI_RES_BUS) /* * If nothing else worked, hope that ACPI at least lays out the * Host-PCI bridges in order and that as a result the next free @@ -524,18 +509,6 @@ acpi_pcib_acpi_attach(device_t dev) } } } -#else - /* - * If nothing else worked, hope that ACPI at least lays out the - * host-PCI bridges in order and that as a result our unit number - * is actually our bus number. There are several reasons this - * might not be true. - */ - if (busok == 0) { - sc->ap_bus = device_get_unit(dev); - device_printf(dev, "trying bus number %d\n", sc->ap_bus); - } -#endif /* If this is bus 0 on segment 0, note that it has been seen already. */ if (sc->ap_segment == 0 && sc->ap_bus == 0) @@ -566,9 +539,7 @@ acpi_pcib_acpi_attach(device_t dev) errout: device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); -#if defined(PCI_RES_BUS) pcib_host_res_free(dev, &sc->ap_host_res); -#endif return (error); } @@ -700,11 +671,9 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, #endif sc = device_get_softc(dev); -#ifdef PCI_RES_BUS if (type == PCI_RES_BUS) return (pci_domain_alloc_bus(sc->ap_segment, child, rid, start, end, count, flags)); -#endif res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end, count, flags); @@ -728,15 +697,12 @@ acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, struct acpi_hpcib_softc *sc; sc = device_get_softc(dev); -#ifdef PCI_RES_BUS if (rman_get_type(r) == PCI_RES_BUS) return (pci_domain_adjust_bus(sc->ap_segment, child, r, start, end)); -#endif return (pcib_host_res_adjust(&sc->ap_host_res, child, r, start, end)); } -#ifdef PCI_RES_BUS int acpi_pcib_acpi_release_resource(device_t dev, device_t child, struct resource *r) @@ -772,7 +738,6 @@ acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, return (pci_domain_deactivate_bus(sc->ap_segment, child, r)); return (bus_generic_deactivate_resource(dev, child, r)); } -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index ffa90ebb6224..ff6a0992c6b9 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -93,13 +93,10 @@ static int cardbus_attach(device_t cbdev) { struct cardbus_softc *sc; -#ifdef PCI_RES_BUS int rid; -#endif sc = device_get_softc(cbdev); sc->sc_dev = cbdev; -#ifdef PCI_RES_BUS rid = 0; sc->sc_bus = bus_alloc_resource(cbdev, PCI_RES_BUS, &rid, pcib_get_bus(cbdev), pcib_get_bus(cbdev), 1, 0); @@ -107,25 +104,18 @@ cardbus_attach(device_t cbdev) device_printf(cbdev, "failed to allocate bus number\n"); return (ENXIO); } -#else - device_printf(cbdev, "Your bus numbers may be AFU\n"); -#endif return (0); } static int cardbus_detach(device_t cbdev) { -#ifdef PCI_RES_BUS struct cardbus_softc *sc; -#endif cardbus_detach_card(cbdev); -#ifdef PCI_RES_BUS sc = device_get_softc(cbdev); device_printf(cbdev, "Freeing up the allocatd bus\n"); (void)bus_release_resource(cbdev, PCI_RES_BUS, 0, sc->sc_bus); -#endif return (0); } diff --git a/sys/dev/cardbus/cardbusvar.h b/sys/dev/cardbus/cardbusvar.h index 5ebedf2e2621..12ad42ee94f7 100644 --- a/sys/dev/cardbus/cardbusvar.h +++ b/sys/dev/cardbus/cardbusvar.h @@ -68,9 +68,7 @@ struct cardbus_devinfo struct cardbus_softc { device_t sc_dev; -#ifdef PCI_RES_BUS struct resource *sc_bus; -#endif }; /* diff --git a/sys/dev/ofw/ofw_pcib.c b/sys/dev/ofw/ofw_pcib.c index 3f55e45f5b92..3dd90ab5002c 100644 --- a/sys/dev/ofw/ofw_pcib.c +++ b/sys/dev/ofw/ofw_pcib.c @@ -421,17 +421,13 @@ static struct resource * ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->sc_pci_domain, child, rid, start, end, count, flags)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_alloc_resource(bus, child, type, rid, @@ -445,16 +441,12 @@ ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, static int ofw_pcib_release_resource(device_t bus, device_t child, struct resource *res) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->sc_pci_domain, child, res)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_release_resource(bus, child, res)); @@ -505,16 +497,12 @@ ofw_pcib_translate_resource(device_t bus, int type, rman_res_t start, static int ofw_pcib_activate_resource(device_t bus, device_t child, struct resource *res) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->sc_pci_domain, child, res)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_activate_resource(bus, child, res)); @@ -621,17 +609,13 @@ ofw_pcib_bus_get_bus_tag(device_t bus, device_t child) static int ofw_pcib_deactivate_resource(device_t bus, device_t child, struct resource *res) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->sc_pci_domain, child, res)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_deactivate_resource(bus, child, res)); @@ -644,17 +628,13 @@ static int ofw_pcib_adjust_resource(device_t bus, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->sc_pci_domain, child, res, start, end)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_adjust_resource(bus, child, res, diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index eca370d17ca5..263ef0fd8aa8 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -276,10 +276,6 @@ cbb_print_config(device_t dev) static int cbb_pci_attach(device_t brdev) { -#if !defined(PCI_RES_BUS) - static int curr_bus_number = 2; /* XXX EVILE BAD (see below) */ - uint32_t pribus; -#endif struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; @@ -293,13 +289,8 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->domain = pci_get_domain(brdev); sc->pribus = pcib_get_bus(parent); -#if defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); -#else - sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); -#endif SLIST_INIT(&sc->rl); rid = CBBR_SOCKBASE; @@ -351,32 +342,6 @@ cbb_pci_attach(device_t brdev) CTLFLAG_RD, &sc->subbus, 0, "io range 2 open"); #endif -#if !defined(PCI_RES_BUS) - /* - * This is a gross hack. We should be scanning the entire pci - * tree, assigning bus numbers in a way such that we (1) can - * reserve 1 extra bus just in case and (2) all sub buses - * are in an appropriate range. - */ - DEVPRINTF((brdev, "Secondary bus is %d\n", sc->bus.sec)); - pribus = pci_read_config(brdev, PCIR_PRIBUS_2, 1); - if (sc->bus.sec == 0 || sc->pribus != pribus) { - if (curr_bus_number <= sc->pribus) - curr_bus_number = sc->pribus + 1; - if (pribus != sc->pribus) { - DEVPRINTF((brdev, "Setting primary bus to %d\n", - sc->pribus)); - pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); - } - sc->bus.sec = curr_bus_number++; - sc->bus.sub = curr_bus_number++; - DEVPRINTF((brdev, "Secondary bus set to %d subbus %d\n", - sc->bus.sec, sc->bus.sub)); - pci_write_config(brdev, PCIR_SECBUS_2, sc->bus.sec, 1); - pci_write_config(brdev, PCIR_SUBBUS_2, sc->bus.sub, 1); - } -#endif - /* Map and establish the interrupt. */ rid = 0; sc->irq_res = bus_alloc_resource_any(brdev, SYS_RES_IRQ, &rid, @@ -429,16 +394,12 @@ err: static int cbb_pci_detach(device_t brdev) { -#if defined(PCI_RES_BUS) struct cbb_softc *sc = device_get_softc(brdev); -#endif int error; error = cbb_detach(brdev); -#if defined(PCI_RES_BUS) if (error == 0) pcib_free_secbus(brdev, &sc->bus); -#endif return (error); } @@ -787,7 +748,6 @@ cbb_pci_filt(void *arg) return retval; } -#if defined(PCI_RES_BUS) static struct resource * cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -836,7 +796,6 @@ cbb_pci_release_resource(device_t bus, device_t child, struct resource *r) } return (cbb_release_resource(bus, child, r)); } -#endif /************************************************************************/ /* PCI compat methods */ @@ -931,14 +890,9 @@ static device_method_t cbb_methods[] = { /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), DEVMETHOD(bus_write_ivar, cbb_write_ivar), -#if defined(PCI_RES_BUS) DEVMETHOD(bus_alloc_resource, cbb_pci_alloc_resource), DEVMETHOD(bus_adjust_resource, cbb_pci_adjust_resource), DEVMETHOD(bus_release_resource, cbb_pci_release_resource), -#else - DEVMETHOD(bus_alloc_resource, cbb_alloc_resource), - DEVMETHOD(bus_release_resource, cbb_release_resource), -#endif DEVMETHOD(bus_activate_resource, cbb_activate_resource), DEVMETHOD(bus_deactivate_resource, cbb_deactivate_resource), DEVMETHOD(bus_driver_added, cbb_driver_added), diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index efe017f9a3ba..bda6919e9552 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -405,11 +405,9 @@ static int pci_clear_bars; SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0, "Ignore firmware-assigned resources for BARs."); -#if defined(PCI_RES_BUS) static int pci_clear_buses; SYSCTL_INT(_hw_pci, OID_AUTO, clear_buses, CTLFLAG_RDTUN, &pci_clear_buses, 0, "Ignore firmware-assigned bus numbers."); -#endif static int pci_enable_ari = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, @@ -3706,7 +3704,6 @@ xhci_early_takeover(device_t self) bus_release_resource(self, SYS_RES_MEMORY, rid, res); } -#if defined(PCI_RES_BUS) static void pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, struct resource_list *rl) @@ -3862,7 +3859,6 @@ pci_alloc_secbus(device_t dev, device_t child, int *rid, rman_res_t start, return (resource_list_alloc(rl, dev, child, PCI_RES_BUS, rid, start, end, count, flags)); } -#endif static int pci_ea_bei_to_rid(device_t dev, int bei) @@ -4118,13 +4114,11 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) uhci_early_takeover(dev); } -#if defined(PCI_RES_BUS) /* * Reserve resources for secondary bus ranges behind bridge * devices. */ pci_reserve_secbus(bus, dev, cfg, rl); -#endif } static struct pci_devinfo * @@ -4470,14 +4464,11 @@ pci_attach_common(device_t dev) { struct pci_softc *sc; int busno, domain; -#ifdef PCI_RES_BUS int rid; -#endif sc = device_get_softc(dev); domain = pcib_get_domain(dev); busno = pcib_get_bus(dev); -#ifdef PCI_RES_BUS rid = 0; sc->sc_bus = bus_alloc_resource(dev, PCI_RES_BUS, &rid, busno, busno, 1, 0); @@ -4485,7 +4476,6 @@ pci_attach_common(device_t dev) device_printf(dev, "failed to allocate bus number\n"); return (ENXIO); } -#endif if (bootverbose) device_printf(dev, "domain=%d, physical bus=%d\n", domain, busno); @@ -4517,20 +4507,16 @@ pci_attach(device_t dev) int pci_detach(device_t dev) { -#ifdef PCI_RES_BUS struct pci_softc *sc; -#endif int error; error = bus_generic_detach(dev); if (error) return (error); -#ifdef PCI_RES_BUS sc = device_get_softc(dev); error = bus_release_resource(dev, PCI_RES_BUS, 0, sc->sc_bus); if (error) return (error); -#endif return (device_delete_children(dev)); } @@ -5111,10 +5097,8 @@ pci_child_detached(device_t dev, device_t child) pci_printf(&dinfo->cfg, "Device leaked memory resources\n"); if (resource_list_release_active(rl, dev, child, SYS_RES_IOPORT) != 0) pci_printf(&dinfo->cfg, "Device leaked I/O resources\n"); -#ifdef PCI_RES_BUS if (resource_list_release_active(rl, dev, child, PCI_RES_BUS) != 0) pci_printf(&dinfo->cfg, "Device leaked PCI bus numbers\n"); -#endif pci_cfg_save(child, dinfo, 1); } @@ -5551,11 +5535,9 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, rl = &dinfo->resources; cfg = &dinfo->cfg; switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_alloc_secbus(dev, child, rid, start, end, count, flags)); -#endif case SYS_RES_IRQ: /* * Can't alloc legacy interrupt once MSI messages have diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index c3f4f03b76ad..b47a90348388 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -416,16 +416,12 @@ int pci_host_generic_core_release_resource(device_t dev, device_t child, struct resource *res) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->ecam, child, res)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_release_resource(dev, child, res)); @@ -506,22 +502,16 @@ struct resource * pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; -#endif struct resource *res; -#if defined(PCI_RES_BUS) sc = device_get_softc(dev); -#endif switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: res = pci_domain_alloc_bus(sc->ecam, child, rid, start, end, count, flags); break; -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: res = bus_generic_rman_alloc_resource(dev, child, type, rid, @@ -543,16 +533,12 @@ pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, static int generic_pcie_activate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->ecam, child, r)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_activate_resource(dev, child, r)); @@ -565,16 +551,12 @@ static int generic_pcie_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->ecam, child, r)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_deactivate_resource(dev, child, r)); @@ -587,17 +569,13 @@ static int generic_pcie_adjust_resource(device_t dev, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->ecam, child, res, start, end)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_adjust_resource(dev, child, res, @@ -619,10 +597,8 @@ generic_pcie_map_resource(device_t dev, device_t child, struct resource *r, type = rman_get_type(r); switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (EINVAL); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: break; @@ -658,10 +634,8 @@ generic_pcie_unmap_resource(device_t dev, device_t child, struct resource *r, type = rman_get_type(r); switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (EINVAL); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: break; diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 7977b9148c9b..0d74cfcf907e 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -178,10 +178,8 @@ static int pcib_is_resource_managed(struct pcib_softc *sc, struct resource *r) { -#ifdef PCI_RES_BUS if (rman_get_type(r) == PCI_RES_BUS) return (rman_is_region_manager(r, &sc->bus.rman)); -#endif return (pcib_get_resource_window(sc, r) != NULL); } @@ -605,7 +603,6 @@ pcib_free_windows(struct pcib_softc *sc) pcib_release_window(sc, &sc->io, SYS_RES_IOPORT); } -#ifdef PCI_RES_BUS /* * Allocate a suitable secondary bus for this bridge if needed and * initialize the resource manager for the secondary bus range. Note @@ -793,7 +790,6 @@ pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid, flags)); return (NULL); } -#endif #ifdef PCI_HP /* @@ -1400,10 +1396,6 @@ pcib_attach_common(device_t dev) * Get current bridge configuration. */ sc->domain = pci_get_domain(dev); -#if !defined(PCI_RES_BUS) - sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); - sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); -#endif sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); /* @@ -1431,20 +1423,6 @@ pcib_attach_common(device_t dev) * Quirk handling. */ switch (pci_get_devid(dev)) { -#if !defined(PCI_RES_BUS) - case 0x12258086: /* Intel 82454KX/GX (Orion) */ - { - uint8_t supbus; - - supbus = pci_read_config(dev, 0x41, 1); - if (supbus != 0xff) { - sc->bus.sec = supbus + 1; - sc->bus.sub = supbus + 1; - } - break; - } -#endif - /* * The i82380FB mobile docking controller is a PCI-PCI bridge, * and it is a subtractive bridge. However, the ProgIf is wrong @@ -1457,34 +1435,6 @@ pcib_attach_common(device_t dev) case 0x060513d7: /* Toshiba ???? */ sc->flags |= PCIB_SUBTRACTIVE; break; - -#if !defined(PCI_RES_BUS) - /* Compaq R3000 BIOS sets wrong subordinate bus number. */ - case 0x00dd10de: - { - char *cp; - - if ((cp = kern_getenv("smbios.planar.maker")) == NULL) - break; - if (strncmp(cp, "Compal", 6) != 0) { - freeenv(cp); - break; - } - freeenv(cp); - if ((cp = kern_getenv("smbios.planar.product")) == NULL) - break; - if (strncmp(cp, "08A0", 4) != 0) { - freeenv(cp); - break; - } - freeenv(cp); - if (sc->bus.sub < 0xa) { - pci_write_config(dev, PCIR_SUBBUS_1, 0xa, 1); - sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); - } - break; - } -#endif } if (pci_msi_device_blacklisted(dev)) @@ -1508,9 +1458,7 @@ pcib_attach_common(device_t dev) #ifdef PCI_HP pcib_probe_hotplug(sc); #endif -#ifdef PCI_RES_BUS pcib_setup_secbus(dev, &sc->bus, 1); -#endif pcib_probe_windows(sc); #ifdef PCI_HP if (sc->flags & PCIB_HOTPLUG) @@ -1617,9 +1565,7 @@ pcib_detach(device_t dev) if (error) return (error); pcib_free_windows(sc); -#ifdef PCI_RES_BUS pcib_free_secbus(dev, &sc->bus); -#endif return (0); } @@ -2097,11 +2043,9 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, } switch (type) { -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pcib_alloc_subbus(&sc->bus, child, rid, start, end, count, flags)); -#endif case SYS_RES_IOPORT: if (pcib_is_isa_range(sc, start, end, count)) return (NULL); @@ -2181,7 +2125,6 @@ pcib_adjust_resource(device_t bus, device_t child, struct resource *r, if (!pcib_is_resource_managed(sc, r)) return (bus_generic_adjust_resource(bus, child, r, start, end)); *** 210 LINES SKIPPED *** From nobody Thu Jul 18 18:33:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQ1db2mgYz5RsHL; Thu, 18 Jul 2024 18:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQ1db22Rbz4pWr; Thu, 18 Jul 2024 18:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721327587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YLd7tMipG/XnB46zHsDoxcXNAv7bPe6uZ2ak6jjbpF8=; b=pf6AWg9aS7jZznCfGSM7LJKL25VWzwsaBsCLzkaYSMTkkBz1FD61CS5GWXvAyQdUCwpEmn xsRcRZfgK7XwSYxipzJUG6DiWfdq/Ehx8lqkb1Hw+vkKduRVAQKUlAtc/uaiZFRVP7izpI jU5U6p4Vp8H6VcgfBPAsrsDcmqicRNvhbLcL922fElBhyeSgMHIzRmK79Y03nECSmzDHJl 3M9OvC44E7oMH0OI7i6qtbqx6wcpM30NwuO9rbNkkEOc+4/lcr8aeuQuwxncoVe9XidyKj 5JmP2YjQr0WFhvZkmHl5hcU98vReqLiwnQUctCKmTh3LllOVKLSquWoj4bA8VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721327587; a=rsa-sha256; cv=none; b=YWIlFGjDtoVH712r4CRlT2Ud9zzheSaTFjLO5HzGpjRbeUxLNTvMu/4WyYf+IS3ffxrodc Rm5zOxgAoH8sseMkkqP5kbKR6fLWQRp48x9DQrV9XNZ4KGBKVkRIB32dVeuv1iXaS8qa7z Qpt7cM9GVLizCsWz3L922WyWnDOIShXc0Yg52QBGJmC1s2vPwHQ7lqlmEpTV5SqUTBOGN7 m45qGzBKUxeC6mOFefv5fFwxzBfR0a2Q9YlFMJD0IZgoQQRPvIcke8jqs4DaXsqyMZMXVB P+ydzOFxfPFj7n4/aoV2NTeSeuBKBCtTmmNxV3elg6Tp/kx/q+63NHABVJcDSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721327587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YLd7tMipG/XnB46zHsDoxcXNAv7bPe6uZ2ak6jjbpF8=; b=Tc6CCcgd2hgMWP47yeNVqqZsWP5houkGokFqQo/xi5lsChS2FI3fT3CH2tfjJ7nNsCE/Fk C24/byNgMF/uvjQog4xSGvVgxX5H6KEI5cX1gXm0ijie7hiCSIi63vdq73l5NtXkwrTCpG FHqtIkH7SaDzhnWly0h0YxuxTpRa2NkQ3WeHuHK+dg83bdgmC5IxYsLf94JqEXDFIh2mWY DnYR52zben1K3HmufsRZQyVW4LCgVV1zBkFiK4Wemc2qnnNsH9+J3UxH4WhABlXd9E1N0b RKvJSt6yrQUW42BAVL5R2t0VNzh5bjPPjEaPk7VCXB2gmxfe0tlR+3GdKFmtRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQ1db1dqDz10Sl; Thu, 18 Jul 2024 18:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IIX7Jq000118; Thu, 18 Jul 2024 18:33:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IIX72t000115; Thu, 18 Jul 2024 18:33:07 GMT (envelope-from git) Date: Thu, 18 Jul 2024 18:33:07 GMT Message-Id: <202407181833.46IIX72t000115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: f38669ef6d6a - main - tarfs.4: update title after move to section four List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f38669ef6d6aab32e9e17e9631345b188f00b583 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f38669ef6d6aab32e9e17e9631345b188f00b583 commit f38669ef6d6aab32e9e17e9631345b188f00b583 Author: Alexander Ziaee AuthorDate: 2024-07-14 08:47:37 +0000 Commit: Mitchell Horne CommitDate: 2024-07-18 18:32:33 +0000 tarfs.4: update title after move to section four Reviewed by: imp Fixes: 1687d7 (move filesystems to s4) Pull Request: https://github.com/freebsd/freebsd-src/pull/1325 --- share/man/man4/tarfs.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/tarfs.4 b/share/man/man4/tarfs.4 index 56c56ac43287..50cd287b3302 100644 --- a/share/man/man4/tarfs.4 +++ b/share/man/man4/tarfs.4 @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .Dd February 14, 2023 -.Dt TARFS 5 +.Dt TARFS 4 .Os .Sh NAME .Nm tarfs From nobody Thu Jul 18 18:55:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQ27N2CFTz5QB9g; Thu, 18 Jul 2024 18:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQ27N1Xvlz4rnn; Thu, 18 Jul 2024 18:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721328928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POfW/+rgrpz7Tq7s2YGQ9jWDaL5KHYPpdaOyRE2pNWY=; b=op98G1IKgLC8rAcRfmoxYSWYSYxjISV0Z9FLMM20z4AeZIcgUZVARqwapgydL1UaQm3fSy HNvgjQhUYnZx/sXX+8XbhIZopsGKGzPF7i5SQ9jkOrWNV+ceom0sHzXWfDdEuSlF0Hl23M UVLlBwUwlHPmSyh4ESRYTDNa63XVo5T3xbxV80zfkghs39M3PPuO+YwlQHEp5E6ywND1m/ 1Eeehm8G/1Kktmb53HWyCWKfLpjDsxPqrAYMHvWBVgmwg8opA46axJbRYooXd8/qLkPxtt AZE8N1ofNl64ZX7xNbDVnF4N/cwmgSJGJkszw3u59mRXq/FzilRsW2gQ9f2+2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721328928; a=rsa-sha256; cv=none; b=D14HJ+ql9jId0YCqtjnIeFOseT2+Ev0lopWPHjL9sd2niv6m/r4NzF7NQWF5/QKCRWkrEk b/IkT1uuuToEabCvECah9W+Wcbc7CHC6T94c5mVtS9cPPJnqlz0cf5WVUcjpNDWmiT6NZu xiZVuFV79KZ6PYrkTzqraQ8fNUwxIr8hBUt9c2uy7CM3QOqDcGZLYmlb89KwHPqOCmRIZw bEKQRzIpFsoByZzIK0DEHatZsOqohrIzGnumkKgCYihZuz4oO5Oi405T6dO5a3qzAlgbJO TzHjcjz4bGYMQWHV3ZPNtgTvZugxhF36eYREAIFvQxI7Bt0iWDwx8QiJezO+Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721328928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POfW/+rgrpz7Tq7s2YGQ9jWDaL5KHYPpdaOyRE2pNWY=; b=h4oa/SWhWgWIg1WgbLtbm9lmyzR0huabGKmUtx6/qw/MONOb2ZGA4dG0qFFRi9XXIfyw6o 6RLBcPDqQw3jex1MIsGfhQqC82SH5tiGNvbWoru4ua1oylzrnXEDm+lUSwbW4GMkxke/aO cRv5DLn7TryUl/qMeC5phCImhVqUiSLTvFV+uYTyppL/IjfEch76nppOz1YRWW4qEbKSf0 A36BL2q2lK3AFKaGvlj+MKZXC1oChcMyoJzei6n4xz2U3vmOC2FGPlEfQeuN/dtewXTmir Dxe/oz7UD19TRwUcE+rfVrpbypVmA4JktxzzqwIxELE+8Xs0LRqdluVM70DZqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQ27N12BJz10nn; Thu, 18 Jul 2024 18:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IItSd1034243; Thu, 18 Jul 2024 18:55:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IItS87034240; Thu, 18 Jul 2024 18:55:28 GMT (envelope-from git) Date: Thu, 18 Jul 2024 18:55:28 GMT Message-Id: <202407181855.46IItS87034240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ee912ee57a21 - main - nvmecontrol: Treat requested KeepAlive timeout as seconds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee912ee57a213b25fc9e559054e5869b4a6b2f61 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ee912ee57a213b25fc9e559054e5869b4a6b2f61 commit ee912ee57a213b25fc9e559054e5869b4a6b2f61 Author: John Baldwin AuthorDate: 2024-07-18 18:54:43 +0000 Commit: John Baldwin CommitDate: 2024-07-18 18:54:43 +0000 nvmecontrol: Treat requested KeepAlive timeout as seconds The internal KATO is stored in milliseconds, so convert the command line argument (given in seconds) to milliseconds before passing to nvmf_connect(). Sponsored by: Chelsio Communications --- sbin/nvmecontrol/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/nvmecontrol/connect.c b/sbin/nvmecontrol/connect.c index 14bd0cce1f8f..ef614eca2e2a 100644 --- a/sbin/nvmecontrol/connect.c +++ b/sbin/nvmecontrol/connect.c @@ -82,7 +82,7 @@ connect_nvm_controller(enum nvmf_trtype trtype, int adrfam, const char *address, io = calloc(opt.num_io_queues, sizeof(*io)); error = connect_nvm_queues(&aparams, trtype, adrfam, address, port, - cntlid, subnqn, opt.hostnqn, opt.kato, &admin, io, + cntlid, subnqn, opt.hostnqn, opt.kato * 1000, &admin, io, opt.num_io_queues, opt.queue_size, &cdata); if (error != 0) { free(io); From nobody Thu Jul 18 18:59:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQ2CY3zrJz5QBHP; Thu, 18 Jul 2024 18:59:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQ2CY3TMnz4s8T; Thu, 18 Jul 2024 18:59:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721329145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZHkhcry8T5Isvz6dTnY/fcm5miyz4LKECnRgQ+5C/c=; b=S8cODqMGEbqgq1X568ih6rZteV91/EIPlKaGnEnZ7UW/ULbtCnEDXwpmtj9AlArETc5x90 oqFOAvJijLyUaWeylRatdZ1mdYj/ukgLdB5PzF/ztJY4djTUM8Mnm60iV+8vioZNrVQnbb ZhCLmnDZV93ARH82+J+uaDetR/vW+6Jn2skTL7+2YF6GQxkMt9dVhkJNmERLrW31cXuWzo GESP9hj7Q5Y7wvIBJGxJLe35AjSDBMNhUusNk1VFeIYWiO5G3TxCtWzqvgIJctwXxEhTSl Jz5v/KecCdZDqQZ3w+UZ2TZY1EsaAgsSXHAs8MjNk9a6Dl3wLWMzP7GgDvU2lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721329145; a=rsa-sha256; cv=none; b=p5aajiBpmejkLAePuiX7PyCu4svUG5HZI7SSeA+F3c2BTWz4/jEpT9WPJN8UoN+mhurQ2W swlbYghD0w7WsW8xhZPFMXC9cntqySa9hXyKoVeTqXM5CGgsaEMANGwB9fICd3XXFUH4pk 70k4eN9m5yWFgp45Ujrd2GnEq1t/UMrfWRUbTZNY/JiIAIEQYKDdMsX6x4//jpLWV3Z0/X rbJcymVJpowjVJ7cL1uHeYmm9Ys9B+oQjIkliQZjfEBpq0YbbuebwwuZGtS+BUhC9Fwo3D mMJ2uMb+mRqnx81nfIy7VyVhdfhBLBsg3mSg4xB5JuUzYFkpTy6UATkqULJ4ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721329145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZHkhcry8T5Isvz6dTnY/fcm5miyz4LKECnRgQ+5C/c=; b=lyMHQF9DRDrXLpQ+L7no04h7s6rNXzTd+e2z9prDeBn7U2tGxlUSM1mn7InScVo1rCewHf 4NRPW8AESLubq8l+wBAAGgwCF3coGFCixKGOr26sWx4zyTTnPrrf2U9qRnRnkhMAmiwpeN wTZKP3EaLsVCZ29RSiKfAAMPbOQFws0IMYWBkgJHrHBCmBJV9iX8MbRyISRviZ5rWrSRt/ Z9z/k0UTZstEUIU8P5oqUOGr5/ikEj8ke+Rwq86zlvI0nwtvLqawQpjqjUdUARwAHreIej EwPWHjuKLFC39OLpkiY/R2Cr1/M7g9Q1NI7xvg4KkpbUUehSvhtZRB6f9FsVgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQ2CY2sZbz115s; Thu, 18 Jul 2024 18:59:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IIx56O034854; Thu, 18 Jul 2024 18:59:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IIx5jk034851; Thu, 18 Jul 2024 18:59:05 GMT (envelope-from git) Date: Thu, 18 Jul 2024 18:59:05 GMT Message-Id: <202407181859.46IIx5jk034851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: a527b9cb721a - main - axgbe: use standard rounddown_pow_of_two List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a527b9cb721a597a0bc5313ac55290cc6a91deac Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=a527b9cb721a597a0bc5313ac55290cc6a91deac commit a527b9cb721a597a0bc5313ac55290cc6a91deac Author: Doug Moore AuthorDate: 2024-07-18 18:56:31 +0000 Commit: Doug Moore CommitDate: 2024-07-18 18:56:31 +0000 axgbe: use standard rounddown_pow_of_two Drop an implementation of __rounddown_pow_of_two, which triggers Coverity warnings, and use the libkern implementation of rounddown_pow_of_two instead. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46022 --- sys/dev/axgbe/xgbe-sysctl.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/sys/dev/axgbe/xgbe-sysctl.c b/sys/dev/axgbe/xgbe-sysctl.c index 16523381e1a3..df81b1d7f0ae 100644 --- a/sys/dev/axgbe/xgbe-sysctl.c +++ b/sys/dev/axgbe/xgbe-sysctl.c @@ -244,22 +244,6 @@ exit_bad_op(void) return(-EINVAL); } -static inline unsigned -fls_long(unsigned long l) -{ - - if (sizeof(l) == 4) - return (fls(l)); - return (fls64(l)); -} - -static inline __attribute__((const)) -unsigned long __rounddown_pow_of_two(unsigned long n) -{ - - return (1UL << (fls_long(n) - 1)); -} - static inline int get_ubuf(struct sysctl_req *req, char *ubuf) { @@ -1049,12 +1033,12 @@ sysctl_ringparam_handler(SYSCTL_HANDLER_ARGS) return (-EINVAL); } - rx = __rounddown_pow_of_two(sys_op->rx_pending); + rx = rounddown_pow_of_two(sys_op->rx_pending); if (rx != sys_op->rx_pending) axgbe_printf(1, "rx ring param rounded to power of 2: %u\n", rx); - tx = __rounddown_pow_of_two(sys_op->tx_pending); + tx = rounddown_pow_of_two(sys_op->tx_pending); if (tx != sys_op->tx_pending) axgbe_printf(1, "tx ring param rounded to power of 2: %u\n", tx); From nobody Thu Jul 18 22:23:18 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQ6lB5mxpz5QW8j; Thu, 18 Jul 2024 22:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQ6lB5GPSz4GRf; Thu, 18 Jul 2024 22:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721341398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UrQtoMFUv00NUCX1K/pXsBmOpTKF0g4KLzJatEQYm6o=; b=IhlkjZHMPQvj//rZm9C/4WqtnXhrVXtc8EKpmGmTWsKl8eyVxbTbLgZNc9M79LebYBNDPP dCKCpl2l5bzVBO/rBxUcGMCN7fM9im0crqZnGYtPqwU++pK4xVVKFxAN1hxu7nUO6QpmAB 8Bv961KwMZJBVklQKlUpfXwsR2T/CZ3puIC5fyBuYdL5C9anH09pPrfw/oEgt0Su1xR9c3 jExXeEJIx0Zju2gjsaDib1PN3W8sYLoPI1Qx9kDTea3HGzOcoJX1xEWcEyEH6m9VS2r8yY 2qnC47glcqbyL3LDYSZ6S5bikmpndAe7qPAZbU64bvlCF9HkAqcSzSsIYyjHSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721341398; a=rsa-sha256; cv=none; b=xTrRmcODp3vta+pZwO+0kg7Es7A/smTDiAeTzHDjRvdfUyTltVo1CAPEyUbqLTxIKF45o1 9GxhLWXcwTAZcams8oFz70nc+jBh5LCmt1K+wigu6HRN9H3zEAH3YBxrEcrhR1AK2TlkM9 QSRJ2lGWsfPd+sxpBJReEK0k1AoSytkslQu8XESaqYv7ZjZrxJqFscGcr+fY0cud2YAIfr 3HzQNxJww2g+XAOZ7o5hAHt1YuAyKHq/oQkyibFfVeozp1C+Tr/fZOeh1289UTN2JYt7AL 8qiEcW5A8KURpEzYLZH4EO0ZHCSaemtExNCA6V5vA4sqXolxX/3mY/BqpcqUiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721341398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UrQtoMFUv00NUCX1K/pXsBmOpTKF0g4KLzJatEQYm6o=; b=pNHqZpeP+2KC7fJwRnv1BtD2owj/Z+FyeBRnncPAk1ki72pAwAxLjVpPL8TYBCuJ1fGdPI xGbTBNhAVmQi5ltQvKHnDaLFqOVKEFKwnC5XRFoX+oJ4yLojPdV64IuQP30IhR+4XhSt9X 8GfyUXpc4Y1U4kvpwMSEFMgLV0hEUM0lKLQVl2QWZ9gtpssEhC8Gv6ajOrU+flHsPRYPj9 5QSppmvx61BhZGu9DdKZWzNrJpVIIxTOudYFUAnXscVKdBX0fIVdSow3J2bEITiKbwfLv6 aevSju5eHdPMzYydLxDGr0CX0KeDGtCCr55QILNg8lK41xQ3fL39HFTPd/5a2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQ6lB4s5Yz15pn; Thu, 18 Jul 2024 22:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IMNIWc090803; Thu, 18 Jul 2024 22:23:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IMNI2j090800; Thu, 18 Jul 2024 22:23:18 GMT (envelope-from git) Date: Thu, 18 Jul 2024 22:23:18 GMT Message-Id: <202407182223.46IMNI2j090800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: e82cee21ba3b - main - axgbe: drop unused function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e82cee21ba3b4410771b7a9e94e9fac013f24ee4 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=e82cee21ba3b4410771b7a9e94e9fac013f24ee4 commit e82cee21ba3b4410771b7a9e94e9fac013f24ee4 Author: Doug Moore AuthorDate: 2024-07-18 22:21:45 +0000 Commit: Doug Moore CommitDate: 2024-07-18 22:21:45 +0000 axgbe: drop unused function A recent change dropped the only use of fls64() in axgbe, so drop its definition. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46030 --- sys/dev/axgbe/xgbe_osdep.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/dev/axgbe/xgbe_osdep.h b/sys/dev/axgbe/xgbe_osdep.h index cea8b4797bf9..1f0359657dcd 100644 --- a/sys/dev/axgbe/xgbe_osdep.h +++ b/sys/dev/axgbe/xgbe_osdep.h @@ -232,13 +232,6 @@ __ffsl(long mask) return (ffsl(mask) - 1); } -static inline int -fls64(uint64_t mask) -{ - - return (flsll(mask)); -} - static inline int get_bitmask_order(unsigned int count) { From nobody Fri Jul 19 05:23:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQJ3T67H4z5QwcC; Fri, 19 Jul 2024 05:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQJ3T5W22z4sLx; Fri, 19 Jul 2024 05:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721366581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tYxTlpx6z5doEraMSjS/v9xLV7WT8KVJPwXyLcdjdEA=; b=PU80iJqLTAeyplDlMVrU4F0UZ67gecwugVwfmcFWfACrD6ScTIZVM4kpZ4bpudiffXVihw T1rMOCrohnDVVll+PjdVSqmnE16zxl5dvBD8RleESpQvk0Gp0u1ovxFl+q3UYoDGXJmuYW l/SXL7JhesBCyHCShGniHhboKe+1c4v6sFAaZTr1QIZU0XbX4Tc5HZy53UCO1ShtlCTm1s OclhWSl9iuZJR1gjO7RpU7Ilya+U2l3eeJS5kPYVeD4zDfmMG+1gJ2w0p3qGx64q0lQYvN o9scgoVbOPzKLAJq/jn/13+bxbbCg1hzydJnEpsjUB07Ndc9loFSzvMQ8NQ4Qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721366581; a=rsa-sha256; cv=none; b=sL9zk11ZeUv4x5mAUxJMC8BhYTusuSd6+tyWL9roTV15WiqFcplUgni9cW1srLH6HbcWAL 4ol0N1XezCqEh1okvgOOu/6d9n8xsYZjphn2yxo4/urg50oww1wrmgBCVqa9P+dG8iRqwt 2v2NWbNU8L8UT21h6b61HxM3vrpkmR076UWtVIRrfQ1piB4J31O1XVe6v43cgEH5T4pja9 /m9EFJaniPfQo/dJZ8Cm8l1QJqniRRc1Xj4SgRP7vOom+K1vBDOCqh+gNc1ug71Roa5syC 25km7feQtlF7dofLpJmAK8ybH4gJ5nY/rKv0S1376vyV72Tz0If/YiOodDkDow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721366581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tYxTlpx6z5doEraMSjS/v9xLV7WT8KVJPwXyLcdjdEA=; b=x981odO4ouEDRgYrJI63L59vOCcILklkvkjzCSvVSuVEIueWxccUg4/Js5yRKUVqIqWh52 sSLpxS1sipMqqHD8stbb7FbrdSC8B5gvngcKjq/Ae8QNj6KpCdFp+AIXDQ0dLsdBchxL90 VocB2RDXsXsPOapqVNC/ZRoCEtmvG8QrMGlR2WQeWgWr8K4Da9PdA7McGxCMLUkIjWxI7q hlXBSkiwFs4+H4V4cjgl9/txIxPjFML2sbWNVC+yoi7rqRpprihH/KvWpfRx2/MZF1uOF2 6dzERqLE5RXRnNR0AtwqlOCeKclWBJeW8vEwMQkypWDiG1GQYsurja0OiGZObQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQJ3T56tQzKL2; Fri, 19 Jul 2024 05:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46J5N1Mb041215; Fri, 19 Jul 2024 05:23:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46J5N1Oo041212; Fri, 19 Jul 2024 05:23:01 GMT (envelope-from git) Date: Fri, 19 Jul 2024 05:23:01 GMT Message-Id: <202407190523.46J5N1Oo041212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f7331f4ec87e - main - cdefs.9: Fix clang version, and gcc version List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7331f4ec87eef7ff9e2aa0109fcee06d71edff2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f7331f4ec87eef7ff9e2aa0109fcee06d71edff2 commit f7331f4ec87eef7ff9e2aa0109fcee06d71edff2 Author: Warner Losh AuthorDate: 2024-07-19 05:21:15 +0000 Commit: Warner Losh CommitDate: 2024-07-19 05:22:51 +0000 cdefs.9: Fix clang version, and gcc version There's no clang 19 that we support, so remove that from the list. Also, jhb will soon commit gcc 14 support, so add it while I'm here so I don't forget later. Submited by: jhb Sponsored by: Netflix --- share/man/man9/cdefs.9 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index a065e0bd7d1d..71b3e7fd4f81 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd July 8, 2024 +.Dd July 18, 2024 .Dt CDEFS 9 .Os .Sh NAME @@ -40,10 +40,13 @@ They are not intended as a general portability layer. Due to testing constraints, tcc and pcc may not always work. .It Compilers supported for building Fx itself: .Bl -column -offset 0n indent-two -.It Sy Compiler Ta Sy Versions -.It gcc Ta 12, 13 -.It clang Ta 16, 17, 19 +.It Sy Compiler Ta Sy Major Versions Supported +.It gcc Ta 12, 13, 14 +.It clang Ta 16, 17, 18 .El +.Pp +Please note: Not every single minor versions of these compilers +will work or are supported. .Sh Macros and Magic for Programming Environment .Nm defines (or refrains from defining) a number of macros to increase portability From nobody Fri Jul 19 05:23:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQJ4K34QNz5QwhK for ; Fri, 19 Jul 2024 05:23:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQJ4J5ytzz4smw for ; Fri, 19 Jul 2024 05:23:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=Q5OwO42B; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::532) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-710437d0affso1065167a12.3 for ; Thu, 18 Jul 2024 22:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1721366623; x=1721971423; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NGlhsLo8j+mDtjqr1Z7mYTbb9doMKD6weV7z3GZMONE=; b=Q5OwO42BvUzx99mU0vALtOmSNfzzb7pApSg26ALDlITLrewutoTus2YdT8Rz1auvsL ug/M+kDv29lQuv3V4ETIULpegNKb1TNWv1+nVwMYF5FABGqjW1bD68GOD4Q6G4og51J+ LKZ86K2uuDgf6pI8CUKnU7oLCseOUbPfNaQFWykW04Xg0M2m+FkkvmAiTV1A3/k7jTQo Ke/I+mw3jUO3yRiSU3soE3t5tUCMGhvxaj/jI91iQPpnfeXPJPdLJgHxUdrZTYSbLWbW neCwJKqsOQPzyUDLwP9c//gqjpE/136GbraDj+bB4C1cmZhZYXhZLeEUKoNZBeYEUuRR nvNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721366623; x=1721971423; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NGlhsLo8j+mDtjqr1Z7mYTbb9doMKD6weV7z3GZMONE=; b=DErr/I4bd/lBGi39T+9qUcWnR8B5p7gTHuWzGNVw8VULNOKlcSP4RBGYKT0xwsGdFy f4nytIH8pTU6OfUrUZ67dMTokX4AcPmrqLM4pt64hNQ+8yKK34TnoK75IzkLljQ0sI2Y Poayf6JcBDWsv+nJdu/IGWKWM8SjTB/VtyVrpdsqkD8foedpBV/wZo9Tldw8rYtHb5IE wu0LP/uwf4+F8gVzv4N3tvoR/pqd4aDwjqo8QOtBRFBmpUqMFZAeAYL59ZFcshJI2y5r 9W+tquAPUzSBZ1I5Z1sJuyXob74S+GZWW4F3W1cPjiMhCw9UavfJ6YH9heV+7hEdPHEZ j/GQ== X-Forwarded-Encrypted: i=1; AJvYcCWTQcVnYLZIESLvQWkJmH5w7TQE1szvVLhLJF3rKxIbl/XTfZar44Qac5v1luwI7onbPo0syay5+rHHz5E/Nl7WkAlg+h0KlVMcglh8FES/Pw== X-Gm-Message-State: AOJu0Yz4wtby0/QxfAFJMRx25Yyyzc8wD0COlukNZI8G1HyWFRAxqgd+ 299GVI87C35AhWr9vc/FaTjYydqMxlNV95O0x2bt7wfAzkJTE9UNNtMUnKjFglwkFiRew/JLuG/ zkbfIQ4wo+9z+6EP267kH2SKrYAn1OJr2AYaWQg== X-Google-Smtp-Source: AGHT+IHKigYajdMELE7yy0Zcyl6B4MVmA4dlalPYl749zs777H25IDCfuAelnDl7y0ccnbSAXh4VR5iMErn62djAbEk= X-Received: by 2002:a05:6a20:d503:b0:1c2:922f:379c with SMTP id adf61e73a8af0-1c3fdcf522bmr7464020637.23.1721366623583; Thu, 18 Jul 2024 22:23:43 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407082254.468MsOMU064769@gitrepo.freebsd.org> <8b3bd285-ce3e-4958-9bd4-ac486eda5ebb@FreeBSD.org> In-Reply-To: <8b3bd285-ce3e-4958-9bd4-ac486eda5ebb@FreeBSD.org> From: Warner Losh Date: Thu, 18 Jul 2024 23:23:32 -0600 Message-ID: Subject: Re: git: 4122295afcbf - main - cdefs(9): Start to document what sys/cdefs.h does To: John Baldwin Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000209bbb061d92e6d8" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.993]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::532:from]; DMARC_NA(0.00)[bsdimp.com]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; R_SPF_NA(0.00)[no SPF record]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4WQJ4J5ytzz4smw --000000000000209bbb061d92e6d8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Fixed. Sorry it took so long. Warner On Tue, Jul 9, 2024 at 7:09=E2=80=AFAM John Baldwin wrote= : > On 7/8/24 18:54, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D4122295afcbf4b7ad0623bbf35f36dc= 3278ac028 > > > > commit 4122295afcbf4b7ad0623bbf35f36dc3278ac028 > > Author: Warner Losh > > AuthorDate: 2024-07-02 22:45:49 +0000 > > Commit: Warner Losh > > CommitDate: 2024-07-08 22:54:02 +0000 > > > > cdefs(9): Start to document what sys/cdefs.h does > > > > --- > > share/man/man9/Makefile | 1 + > > share/man/man9/cdefs.9 | 405 > ++++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 406 insertions(+) > > > > diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 > > new file mode 100644 > > index 000000000000..a065e0bd7d1d > > --- /dev/null > > +++ b/share/man/man9/cdefs.9 > > @@ -0,0 +1,405 @@ > > +.Sh Supported Compilers > > +.Bl -tag -offset 2n -width 0 > > +.It Compilers supported for building programs on Fx : > > +.Bl -column -offset 0n indent-two > > +.It Sy Compiler Ta Sy Versions > > +.It gcc Ta 9, 10, 11, 12, 13, 14 > > +.It clang Ta 10, 11, 12, 13, 14, 15, 16, 17, 18 > > +.It TinyC (tcc) Ta 0.9 > > +.It pcc Ta 1.1 > > +.El > > +.Pp > > +Due to testing constraints, tcc and pcc may not always work. > > +.It Compilers supported for building Fx itself: > > +.Bl -column -offset 0n indent-two > > +.It Sy Compiler Ta Sy Versions > > +.It gcc Ta 12, 13 > > +.It clang Ta 16, 17, 19 > > s/19/18/? > > -- > John Baldwin > > --000000000000209bbb061d92e6d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Fixed. Sorry it took so long.

Warner

On Tue, Jul 9, 2024 at 7:09=E2=80=AFAM John Baldwin <<= a href=3D"mailto:jhb@freebsd.org">jhb@freebsd.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">On 7/8/24 18:54, Warner Lo= sh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D4122295afcbf4b7ad0623bbf35f36dc3278ac028<= /a>
>
> commit 4122295afcbf4b7ad0623bbf35f36dc3278ac028
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-07-02 22:45:49 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-07-08 22:54:02 +0000
>
>=C2=A0 =C2=A0 =C2=A0 cdefs(9): Start to document what sys/cdefs.h does<= br> >=C2=A0 =C2=A0 =C2=A0
> ---
>=C2=A0 =C2=A0share/man/man9/Makefile |=C2=A0 =C2=A01 +
>=C2=A0 =C2=A0share/man/man9/cdefs.9=C2=A0 | 405 +++++++++++++++++++++++= +++++++++++++++++++++++++
>=C2=A0 =C2=A02 files changed, 406 insertions(+)
>
> diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9
> new file mode 100644
> index 000000000000..a065e0bd7d1d
> --- /dev/null
> +++ b/share/man/man9/cdefs.9
> @@ -0,0 +1,405 @@
> +.Sh Supported Compilers
> +.Bl -tag -offset 2n -width 0
> +.It Compilers supported for building programs on Fx :
> +.Bl -column -offset 0n indent-two
> +.It Sy Compiler Ta Sy Versions
> +.It gcc Ta 9, 10, 11, 12, 13, 14
> +.It clang Ta 10, 11, 12, 13, 14, 15, 16, 17, 18
> +.It TinyC (tcc) Ta 0.9
> +.It pcc Ta 1.1
> +.El
> +.Pp
> +Due to testing constraints, tcc and pcc may not always work.
> +.It Compilers supported for building Fx itself:
> +.Bl -column -offset 0n indent-two
> +.It Sy Compiler Ta Sy Versions
> +.It gcc Ta 12, 13
> +.It clang Ta 16, 17, 19

s/19/18/?

--
John Baldwin

--000000000000209bbb061d92e6d8-- From nobody Fri Jul 19 07:56:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQMSS27k5z5R9yn; Fri, 19 Jul 2024 07:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQMSS1Y5Nz46JS; Fri, 19 Jul 2024 07:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721375784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I4chyFmP1ajvjMQ8vK06USCSsXYfHgE8KptbXlcBHY4=; b=x7O16uPe6dy57JNZFIa+SiOaoN+FThumFunx0xy3M/L7JVuqQZNE977CU3U6eTQTmEKe3m F/7TOmuFaJxoOXEfTtafHVmPXUiL7JTq0xuE+mhkEWWcnxkSAs889EP6WDfYyYiVLm906H c6yG2Lm25f/MVo/TTnXHJRdgyQMORglvEhPgNEKmxWbMBpKDL/HEu4FHW4oAsH9fJ5WI2U ndoZH8FCJLKuUHGYw3QJSveByZQYwrDbyrwtGAvaZplemZsKJlERfn446CxCsPM/RLvlAG s/Rjr4bWCKly+pLBxlaL03AamMBzFfGcWaqH0XhiFXDWAFGYvEloHmxmhHexeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721375784; a=rsa-sha256; cv=none; b=EdoYm/Bw7n+U473NHZkorqyONOKA+b3X2GNzZyJIpGhAmWu7XxN8B5Qeo3zhtDD15Gsl35 DUaFWzt++5emcSieb/5vT2UkUTJsPM8PogieD2eRWHOHc5Wh5iWUg4Am8rNYb3TYeCX7zQ eYO5Sy9eHNkXP8B6y5ecpq1Y0XqbNoKpiu3WBJzX2htaVBgJsT3RvGxjoxAOj8KkG/R8n0 4JJR0feOIDgk7Hr65bOW6sI/pxpkQhqZKtFdyy/vzPF276uPyGUcy7KrhjN12Wyx/2/gut LcYl+bRyZI/C6mIZzPtJT+kcLBy/Fq8onpEMtidQbjF67yNmFLN1xaVourHhNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721375784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I4chyFmP1ajvjMQ8vK06USCSsXYfHgE8KptbXlcBHY4=; b=Z8zaxUc+9byYsXnJBS4lvHg5oS2NgqSe1nuv5UnhyxE++BqWCQ2RZAsRTeHXQ9fcFyVzoK TQoPAaN3mUnCWmhXPsApJA/D8uDLq22aRie8OR8yEgF1OazAli0J4yopQv8uI0h735x0YB Mq2Z16kieizFUHrau6V53GKAgA/zoIivN/cUomw7UkZUw7KJ82wMltCqgsRFFM0eJM5vs4 QigqutLfPY+qROU4jSpOvtZsu7+S2cRU7b6LHSmXn0Ug0dDZZXvMKpeG8tMrF4wAKLxyyO u7YNnKBeOSSg8/gVLsp+MmPtTiCYLtHiE4lDIRWTtXPpNsMPFW8oZFm7ohWzEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQMSS18YszPBk; Fri, 19 Jul 2024 07:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46J7uO3L093444; Fri, 19 Jul 2024 07:56:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46J7uO6T093441; Fri, 19 Jul 2024 07:56:24 GMT (envelope-from git) Date: Fri, 19 Jul 2024 07:56:24 GMT Message-Id: <202407190756.46J7uO6T093441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 94e62a5f91db - main - stress2: Exclude one more test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94e62a5f91dba60e42c701998a970b5cf7e9d036 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=94e62a5f91dba60e42c701998a970b5cf7e9d036 commit 94e62a5f91dba60e42c701998a970b5cf7e9d036 Author: Peter Holm AuthorDate: 2024-07-19 07:55:39 +0000 Commit: Peter Holm CommitDate: 2024-07-19 07:55:39 +0000 stress2: Exclude one more test --- tools/test/stress2/misc/all.exclude | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index f8936d9efee8..91fb68afabfc 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -57,6 +57,7 @@ suj12.sh Waiting for fix 20230319 suj19.sh https://people.freebsd.org/~pho/stress/log/log0378.txt 20221113 suj27.sh https://people.freebsd.org/~pho/stress/log/log0387.txt 20221113 suj36.sh https://people.freebsd.org/~pho/stress/log/log0392.txt 20221114 +swap3.sh https://people.freebsd.org/~pho/stress/log/log0543.txt 20240719 swapoff2.sh swap_pager_force_pagein: read from swap failed 20171223 swapoff3.sh Excessive OOM killing 20220403 swapoff5.sh log0005.txt, known issue 20210111 From nobody Fri Jul 19 08:10:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQMmt0KwMz5RCFb; Fri, 19 Jul 2024 08:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQMms5LZGz4Cd6; Fri, 19 Jul 2024 08:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721376637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tIGGFAQE+N/w1ZogRX0Q9aRIxvb7MUHUTgiyMGSPL4w=; b=mt1xrnRZAvKpGOq0kFNU7tRt8d3wFV0CDvG1yCKFfNLHjt2Hp3S1q8EIOBLyqoQOcYTRx+ XDKIpnc+GL4I9+v1FxiCepw9Z6GnI1LNXN7LIXCWAhEgYQY3QfOf7pMs/7M3VsURCkd9Vv 6XynUxPShFW9+FYOLu7gyXjoY6antIyNlnM8zDIuf+DbXmwKB3W2R5ITuePddr2DHllzU4 eV8PBMcKKjOFVVQOBG40gGRgbb6mt8l2VQompH5sIYE7eSm3xSO9aasKkOZJupmV+jDQxt Qkd59ALQQX9H/MdyViRsBJCotflWAG4kCD+R7ZfDqGOhFMtXwZkkKpIwnAzr+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721376637; a=rsa-sha256; cv=none; b=kuOCveEB4dAMmcADIeVWu6b6xeaExQ1SFyNd9XN00CGUynNgpRaVrhoimaMn2lRUti9m97 wf0eKW41yLlq7EPRI2kfYzPaILvpKkFIkwuVBzraY2V/I+sX4KNiVXAu1/yRPRHBW/2sMm wgRR4jByl7kG2Fs93feTmfXBP/DgUn3yBs6Drcju/Xms6CBeiHGMip/AXFH0vA3NAu+XcA d/eH6li6JTgXY59/l36mFp7lp0arxmhAfp2Q8fSDbEce2gTtBSghwf9ueM//hKxdxw6x0o jTkKI60naNQ7zKNnyVlXiQfHPVL/n1+8jFbik0Im66VcCZqCI+6vdNIrzCFdZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721376637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tIGGFAQE+N/w1ZogRX0Q9aRIxvb7MUHUTgiyMGSPL4w=; b=uabos6DtpuBYVo+AuMcCWD0P3q7/a3NhF4wBRFJ8wWSameDUO2U+q8VMmJHlXn/X+M/enF /nZGFujLezVAP1r95NIBf/WWWbSYA9iiGWV4SOvw2O2lkRUGw3M0kA0rtwjH7KOKCh3Lsh gYztzqM0CBmUXA038ijknnUEf0ODM62HztFNJmIi5Zw1vrGlBjh2Ke50Vv5e9RSpDcL6QT YC0f8fpjf6YLOVJuEQ3ePiqgLwoatlWw4Cv276IOEO76sbCMPzkVx0YNyvVu7MRcoufoV5 CibaGR1ip4IvNHv+6Ut9W1RRcM2+FlTKQWyEyYkSAlmED1f71cAnOGM+606TKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQMms4rsCzNhK; Fri, 19 Jul 2024 08:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46J8Ab3w022715; Fri, 19 Jul 2024 08:10:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46J8Abup022712; Fri, 19 Jul 2024 08:10:37 GMT (envelope-from git) Date: Fri, 19 Jul 2024 08:10:37 GMT Message-Id: <202407190810.46J8Abup022712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: fb05f761ac0b - main - siftr: remove the shutdown_pre_sync event handler on unload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb05f761ac0b28b03eb057e36fe118f007d43d73 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fb05f761ac0b28b03eb057e36fe118f007d43d73 commit fb05f761ac0b28b03eb057e36fe118f007d43d73 Author: Kristof Provost AuthorDate: 2024-07-19 06:08:14 +0000 Commit: Kristof Provost CommitDate: 2024-07-19 06:09:58 +0000 siftr: remove the shutdown_pre_sync event handler on unload PR: 280351 MFC after: 2 weeks --- sys/netinet/siftr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index bf0cdc2ac4cc..ea1fbc8ff394 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -273,6 +273,7 @@ static struct mtx siftr_pkt_queue_mtx; static struct mtx siftr_pkt_mgr_mtx; static struct thread *siftr_pkt_manager_thr = NULL; static char direction[2] = {'i','o'}; +static eventhandler_tag siftr_shutdown_tag; /* Required function prototypes. */ static int siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS); @@ -1310,6 +1311,7 @@ static int deinit_siftr(void) { /* Cleanup. */ + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, siftr_shutdown_tag); siftr_manage_ops(SIFTR_DISABLE); hashdestroy(counter_hash, M_SIFTR, siftr_hashmask); mtx_destroy(&siftr_pkt_queue_mtx); @@ -1324,8 +1326,8 @@ deinit_siftr(void) static int init_siftr(void) { - EVENTHANDLER_REGISTER(shutdown_pre_sync, siftr_shutdown_handler, NULL, - SHUTDOWN_PRI_FIRST); + siftr_shutdown_tag = EVENTHANDLER_REGISTER(shutdown_pre_sync, + siftr_shutdown_handler, NULL, SHUTDOWN_PRI_FIRST); /* Initialise our flow counter hash table. */ counter_hash = hashinit(SIFTR_EXPECTED_MAX_TCP_FLOWS, M_SIFTR, From nobody Fri Jul 19 14:26:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQX6t4gQ8z5RkXK; Fri, 19 Jul 2024 14:26:46 +0000 (UTC) (envelope-from kp@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQX6t45t7z4m6c; Fri, 19 Jul 2024 14:26:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721399206; 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=H34F2qk4nK8QSnhm6GjAldkPLoJTEpaJy/aCMyugH8M=; b=Gg8hAXMaKyZPraB2x8cF5hTPa5BRraWS8L6P+Bad7f0T8jERH219UoSPJ/Mr17iXA9H8cq 1mJp7B3S19Qq/SZaCvaxtAVoyCFfsA4d+CE0ViIdtdkOc02o8cd46U12x2b0n7pv+lO9n+ GYzYRnPr46O6FEg8iBKlzxip1rdGOBXJGELpkxhTJ2nc3tZB7MnSJL/369YgJHa8XEfiWK ohCrwZ2E6KUYFAE4rpUnpG5p8kkzCUH9Ihx8YSu+7XD1O8Abxfjf5Ztj/gK5v4EUZj2ihP tLu1wFv2H4+yrIrP7xf9h83KyNYnvJsPW27EJuSt+sAEtdqBBWGrrumus+u1YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721399206; a=rsa-sha256; cv=none; b=WwpYkmmA97lGG3qw+Ox77UbmucutmBVG0aIv4RWYON++i7PTREp12zs+RsmMhHegRmwXX3 /3mj6j0h+NQJTQVE+sjGyrdqZWlnBu0SkFWMvf1U/ppYdmviD3O9PvKaok/Wun7g9ahaRH L+Na/KM/nfIL3g8F+KOEvB10O2bVUIg3b9WU2/HY31yQm+JngY2tOgyQdhDhDv5Gl22594 NZu5VUOpqDWSK50k/IV1y+yFuAU4cgKjJS35XjvpNX+pFyNE0K4cFqJN+vFRClBx6r/2H4 6kvK0CaMwzGEkFFdahXes0igdyiuXmEx20aC3TTVF4WZ0/AkSz1mG0leNxM8CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721399206; 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=H34F2qk4nK8QSnhm6GjAldkPLoJTEpaJy/aCMyugH8M=; b=U/u6Owt9G1De+VAMWyv+2FcfsUDOel6icaKbdfbMgsRVIDmi/wVRA+gXoDSVud6Gwka1pG E/sQPeHD09fJPXGyp5AVWfB9CVwt6b/u+Pij5Q1NedAMQYVJOyqyOSlJxW6x/idd7o6vQk kWGJ/yWYbWYVMamOYqU/K6LYc5k5r2mr/3gNXXdjssTcWB8/YjPe7F3MCGlly0+bwz+Jfb O2HvFcOdRufDbTHZqPD4NVUZA/pRJ6WJSpnCH+tmArH9ciysJmsudv3rjSEl2F8csvFlza aqFgP2KKYRRdkpIN6SbRsZmchRg5IsJw7nmzhq1kSlDejfViiAmquTE0tUpFWQ== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher 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 "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WQX6t1ty4z1Lf5; Fri, 19 Jul 2024 14:26:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 24EB054BCD; Fri, 19 Jul 2024 16:26:44 +0200 (CEST) From: Kristof Provost To: Konstantin Belousov Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ef2a572bf6bd - main - ipsec_offload: kernel infrastructure Date: Fri, 19 Jul 2024 16:26:43 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <202407121125.46CBP8eo093121@gitrepo.freebsd.org> References: <202407121125.46CBP8eo093121@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_AF135622-7B0D-4427-95DE-D24615AC4C5A_=" --=_MailMate_AF135622-7B0D-4427-95DE-D24615AC4C5A_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 12 Jul 2024, at 13:25, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3Def2a572bf6bdcac97ef29ce631d2f= 50f938e1ec8 > > commit ef2a572bf6bdcac97ef29ce631d2f50f938e1ec8 > Author: Konstantin Belousov > AuthorDate: 2021-08-22 19:38:04 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-07-12 04:27:58 +0000 > > ipsec_offload: kernel infrastructure > > Inline IPSEC offload moves almost whole IPSEC processing from the > CPU/MCU and possibly crypto accelerator, to the network card. > > The transmitted packet content is not touched by CPU during TX > operations, kernel only does the required policy and security > association lookups to find out that given flow is offloaded, and = > then > packet is transmitted as plain text to the card. For driver = > convenience, > a metadata is attached to the packet identifying SA which must = > process > the packet. Card does encryption of the payload, padding, = > calculates > authentication, and does the reformat according to the policy. > > Similarly, on receive, card does the decapsulation, decryption, = > and > authentification. Kernel receives the identifier of SA that was > used to process the packet, together with the plain-text packet. > > Overall, payload octets are only read or written by card DMA = > engine, > removing a lot of memory subsystem overhead, and saving CPU time = > because > IPSEC algos calculations are avoided. > > If driver declares support for inline IPSEC offload (with the > IFCAP2_IPSEC_OFFLOAD capability set and registering method table = > struct > if_ipsec_accel_methods), kernel offers the SPD and SAD to driver. > Driver decides which policies and SAs can be offloaded based on > hardware capacity, and acks/nacks each SA for given interface to > kernel. Kernel needs to keep this information to make a decision = > to > skip software processing on TX, and to assume processing already = > done > on RX. This shadow SPD/SAD database of offloads is rooted from > policies (struct secpolicy accel_ifps, struct ifp_handle_sp) and = > SAs > (struct secasvar accel_ipfs, struct ifp_handle_sav). > > Some extensions to the PF_KEY socket allow to limit interfaces for > which given SP/SA could be offloaded (proposed for offload). = > Also, > additional statistics extensions allow to observe = > allocation/octet/use > counters for specific SA. > > Since SPs and SAs are typically instantiated in non-sleepable = > context, > while offloading them into card is expected to require costly = > async > manipulations of the card state, calls to the driver for offload = > and > termination are executed in the threaded taskqueue. It also = > solves > the issue of allocating resources needed for the offload database. > Neither ipf_handle_sp nor ipf_handle_sav do not add reference to = > the > owning SP/SA, the offload must be terminated before last reference = > is > dropped. ipsec_accel only adds transient references to ensure = > safe > pointer ownership by taskqueue. > > Maintaining the SA counters for hardware-accelerated packets is = > the > duty of the driver. The helper = > ipsec_accel_drv_sa_lifetime_update() > is provided to hide accel infrastructure from drivers which would = > use > expected callout to query hardware periodically for updates. > > Reviewed by: rscheff (transport, stack integration), np > Sponsored by: NVIDIA networking > Differential revision: https://reviews.freebsd.org/D44219 > --- > sys/conf/files | 2 + > sys/conf/options | 1 + > sys/modules/ipsec/Makefile | 5 +- > sys/netipsec/ipsec.c | 17 + > sys/netipsec/ipsec.h | 11 + > sys/netipsec/ipsec_input.c | 11 + > sys/netipsec/ipsec_offload.c | 1061 = > ++++++++++++++++++++++++++++++++++++++++++ > sys/netipsec/ipsec_offload.h | 191 ++++++++ > sys/netipsec/ipsec_output.c | 15 + > sys/netipsec/ipsec_pcb.c | 38 +- > sys/netipsec/key.c | 270 ++++++++++- > sys/netipsec/key.h | 6 + > sys/netipsec/key_debug.c | 5 + > sys/netipsec/keydb.h | 14 + > 14 files changed, 1628 insertions(+), 19 deletions(-) > I=E2=80=99m seeing messages like `ipsec_accel_sa_install_newkey: spi 0x10= 01 = flags 0x40 seq 0` running the test suite now. Are those stray debug printfs? Best regards, Kristof --=_MailMate_AF135622-7B0D-4427-95DE-D24615AC4C5A_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 12 Jul 2024, at 13:25, Konstantin Belousov wrote:

The branch main has been updated by= kib:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3Def2a572bf6bdcac97ef29ce631d2f50f938e1ec8

commit ef2a572bf6bdcac97ef29ce631d2f50f938e1ec8
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-08-22 19:38:04 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-07-12 04:27:58 +0000

ipsec_offload: kernel infrastructure

Inline IPSEC offload moves almost whole IPSEC process= ing from the
CPU/MCU and possibly crypto accelerator, to the network card.

The transmitted packet content is not touched by CPU = during TX
operations, kernel only does the required policy and security
association lookups to find out that given flow is offloaded, and the= n
packet is transmitted as plain text to the card. For driver convenien= ce,
a metadata is attached to the packet identifying SA which must proces= s
the packet. Card does encryption of the payload, padding, calculates
authentication, and does the reformat according to the policy.

Similarly, on receive, card does the decapsulation, d= ecryption, and
authentification. Kernel receives the identifier of SA that was
used to process the packet, together with the plain-text packet.

Overall, payload octets are only read or written by c= ard DMA engine,
removing a lot of memory subsystem overhead, and saving CPU time beca= use
IPSEC algos calculations are avoided.

If driver declares support for inline IPSEC offload (= with the
IFCAP2_IPSEC_OFFLOAD capability set and registering method table stru= ct
if_ipsec_accel_methods), kernel offers the SPD and SAD to driver.
Driver decides which policies and SAs can be offloaded based on
hardware capacity, and acks/nacks each SA for given interface to
kernel. Kernel needs to keep this information to make a decision to
skip software processing on TX, and to assume processing already done=
on RX. This shadow SPD/SAD database of offloads is rooted from
policies (struct secpolicy accel_ifps, struct ifp_handle_sp) and SAs
(struct secasvar accel_ipfs, struct ifp_handle_sav).

Some extensions to the PF_KEY socket allow to limit i= nterfaces for
which given SP/SA could be offloaded (proposed for offload). Also,
additional statistics extensions allow to observe allocation/octet/us= e
counters for specific SA.

Since SPs and SAs are typically instantiated in non-s= leepable context,
while offloading them into card is expected to require costly async
manipulations of the card state, calls to the driver for offload and
termination are executed in the threaded taskqueue. It also solves
the issue of allocating resources needed for the offload database.
Neither ipf_handle_sp nor ipf_handle_sav do not add reference to the
owning SP/SA, the offload must be terminated before last reference is=
dropped. ipsec_accel only adds transient references to ensure safe
pointer ownership by taskqueue.

Maintaining the SA counters for hardware-accelerated = packets is the
duty of the driver. The helper ipsec_accel_drv_sa_lifetime_update()
is provided to hide accel infrastructure from drivers which would use=
expected callout to query hardware periodically for updates.

Reviewed by: rscheff (transport, stack integration= ), np
Sponsored by: NVIDIA networking
Differential revision: https://reviews.freebsd.org/D44219
---
sys/conf/files | 2 +
sys/conf/options | 1 +
sys/modules/ipsec/Makefile | 5 +-
sys/netipsec/ipsec.c | 17 +
sys/netipsec/ipsec.h | 11 +
sys/netipsec/ipsec_input.c | 11 +
sys/netipsec/ipsec_offload.c | 1061 ++++++++++++++++++++++++++++++++++++= ++++++
sys/netipsec/ipsec_offload.h | 191 ++++++++
sys/netipsec/ipsec_output.c | 15 +
sys/netipsec/ipsec_pcb.c | 38 +-
sys/netipsec/key.c | 270 ++++++++++-
sys/netipsec/key.h | 6 +
sys/netipsec/key_debug.c | 5 +
sys/netipsec/keydb.h | 14 +
14 files changed, 1628 insertions(+), 19 deletions(-)


I=E2=80=99m seeing messages like ipsec_accel_sa_install_newkey: spi = 0x1001 flags 0x40 seq 0 running the test suite now.
Are those stray debug printfs?

Best regards,
Kristof

--=_MailMate_AF135622-7B0D-4427-95DE-D24615AC4C5A_=-- From nobody Fri Jul 19 16:18:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQZbc1LC8z5Rv2t; Fri, 19 Jul 2024 16:18:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQZbc0qsmz53yG; Fri, 19 Jul 2024 16:18:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721405900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lNUpqqv/gl+/IkwveGdnV+mH/dgNjdB+KgxPgO0RCtQ=; b=ZRdZ2oOChkDpLyNgWnYG4oY1uY9soMFUmdK6VB8mIyPQ33d66XeXIOD9cuOQXKlA5EoltH V6nYjasM1yTAeVx+V5bKmY5+z7bxdmbuSjDyh+LcgY9N14vvp6WcrkPbw+TLxqoPuGNik5 d4DASSHjZj9/kjPJK302qqvnyd17jB7i9udpinYYCrm50jfdHRKZ/Rr6R/gV2zOa+vA4Qj Y1pTv9snewKEXR01Sol3Iigmtm/g8z8v5gpu+iKbW7EOjtvw30fCA2jXCT224T98kEEvAw Xz/a/INXFWfNo0k2/AtTCkjlychATGM8/8hOptFxfvyI23EhxwnB3gXCihZ1RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721405900; a=rsa-sha256; cv=none; b=rUaGVVxIDiGLA2i04p4DYNZw8gGQfIfL0QrY8FVkXoXRTrUXSiN0pMr/TXyc8GoVrI9ggF C60eLoBFh26wsxsGHes7mA+SpGnTWHmlHvY3+2X6cbHdxMJIAEHNOqBwrqmCO3HnaFPXuU nj1x0BcVNak0yIDeThXaDzwNi2c6XytrXAm/nkPDRXtYCn3mFnIfzhykKxzTQEVAhB/PFs b+MNuclZDWOTS2bMosPpPSEKQg3NlvK3ftyovcMCmNqcexNVVdfAYralq1EvbZ6LqEcATk vmm6fsUm0qSRVPrqSLXwGM8Z4EG4DYlG/86Vogg145cnlqBPjWarlpYjFt73Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721405900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lNUpqqv/gl+/IkwveGdnV+mH/dgNjdB+KgxPgO0RCtQ=; b=TrWUqa9k2Y8LEPFC4u6Yf8uYcz7SC1YnPd8LXtEcTVKRVAJTAqsGC0L3/Ga4+g80FkQxZ3 0PoI4IweX3tCkH0GLdFKQVQuLcxC+E1w5Syz/2XEBDW2U/IqINhHChJqrwMjs8XXlrqWQx 8K8xsMbBNGzUWb29+8UoU4j2CwzHLw7fOPLV64d8xO6lH5QoTSXGdBL0A1SDCFs3tkXqPA Ihxs4MWICdJ6zBX4EWETkrFYgDXM6FvqW7Mch8+RcTiA6Xj1KlWLyQ1rLEGKIvvxm/m/i5 quS38UsUozL6ZbDc7LFnGZVKUrD3I1LEWQAR4QNB6ixzFRt4rokwsaKBs+bA2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQZbc0QxRzfw4; Fri, 19 Jul 2024 16:18:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JGIJp8043395; Fri, 19 Jul 2024 16:18:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JGIJFK043392; Fri, 19 Jul 2024 16:18:19 GMT (envelope-from git) Date: Fri, 19 Jul 2024 16:18:19 GMT Message-Id: <202407191618.46JGIJFK043392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: bbc326241d91 - main - cxgbe/t4_tom: Detach the toep from the tcpcb when entering TIME_WAIT. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbc326241d91ab2cee2ec2c5c0aa8a906480132f Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=bbc326241d91ab2cee2ec2c5c0aa8a906480132f commit bbc326241d91ab2cee2ec2c5c0aa8a906480132f Author: Navdeep Parhar AuthorDate: 2024-07-17 05:23:33 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-19 16:12:31 +0000 cxgbe/t4_tom: Detach the toep from the tcpcb when entering TIME_WAIT. The kernel used to call tod_pcb_detach when entering TIME_WAIT but that seems to have changed, likely with the TIME_WAIT overhaul in the kernel some time ago. Catch up by having the driver perform the detach. The hardware does not handle TIME_WAIT so it's important to detach and let the kernel arm the 2MSL timer to deal with it. Reported by: Sony Arpita Das @ Chelsio Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45990 --- sys/dev/cxgbe/tom/t4_cpl_io.c | 2 ++ sys/dev/cxgbe/tom/t4_tom.c | 2 +- sys/dev/cxgbe/tom/t4_tom.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 842e72bf8b2b..cb229d327386 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -1393,6 +1393,7 @@ do_peer_close(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) case TCPS_FIN_WAIT_2: restore_so_proto(so, inp->inp_vflag & INP_IPV6); + t4_pcb_detach(NULL, tp); tcp_twstart(tp); INP_UNLOCK_ASSERT(inp); /* safe, we have a ref on the inp */ NET_EPOCH_EXIT(et); @@ -1454,6 +1455,7 @@ do_close_con_rpl(struct sge_iq *iq, const struct rss_header *rss, switch (tp->t_state) { case TCPS_CLOSING: /* see TCPS_FIN_WAIT_2 in do_peer_close too */ restore_so_proto(so, inp->inp_vflag & INP_IPV6); + t4_pcb_detach(NULL, tp); tcp_twstart(tp); release: INP_UNLOCK_ASSERT(inp); /* safe, we have a ref on the inp */ diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 3fe34c7c01a3..10ee78681365 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -359,7 +359,7 @@ release_offload_resources(struct toepcb *toep) * Also gets called when an offloaded active open fails and the TOM wants the * kernel to take the TCP PCB back. */ -static void +void t4_pcb_detach(struct toedev *tod __unused, struct tcpcb *tp) { #if defined(KTR) || defined(INVARIANTS) diff --git a/sys/dev/cxgbe/tom/t4_tom.h b/sys/dev/cxgbe/tom/t4_tom.h index 805d8bc0d644..fb74642d61f7 100644 --- a/sys/dev/cxgbe/tom/t4_tom.h +++ b/sys/dev/cxgbe/tom/t4_tom.h @@ -468,6 +468,7 @@ __be32 calc_options2(struct vi_info *, struct conn_params *); uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); int negative_advice(int); int add_tid_to_history(struct adapter *, u_int); +void t4_pcb_detach(struct toedev *, struct tcpcb *); /* t4_connect.c */ void t4_init_connect_cpl_handlers(void); From nobody Fri Jul 19 16:18:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQZbd2l9zz5RvGB; Fri, 19 Jul 2024 16:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQZbd1mkKz543h; Fri, 19 Jul 2024 16:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721405901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dk8krFrepggL7ynLKEvNpR4vfu4ETt66pY1d7tSKppw=; b=ULvV0CP/W94+B/+92DjdBcyDzP0l1ZqiH31E83u07j20VG2HlMp9ltZ9BW2eY5HcWvDZLB /iZfsbGmmhwTCus9LLNqfytze1Jl/WeAiXFjbsQtraht5drrWUQ8zLOSN4+cUg96bssJNS ghCCYhihUHefVt0lCKoA8XBtZ3NIFZ2GU4+19gpFXTRdob0wvKT0Eg+XUfKU+1+r5HbUZL WYlfASHcy/fNA9jYs0n0k7VA+L/y4+KX68hgns/8BbhGwd6TVaso5hQHCgXrRX6dtIHVtc 6+9ce3vFPv2XQktegX4JeXnwOMXMLwrQZdaT/3I1zGxsiHYCxsfn4fBjnJ671g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721405901; a=rsa-sha256; cv=none; b=qQnFmN4kkPh2lPtCcfW2YucGc9WEjuQs7eSdMIcXnmpHwb9snj9fu5oDqHtFvNmfbB8+81 FVK/l07L84oTmWR5dCB7JeF7V92V6NR0L3Tpt6tsmYsMmDNZA7BdVutYvvq02PBfEzeM1s QBfRrUmJmp3Fe33FYEnWkQx9L+e2JuMhDjrxsPG4FELum9cg354yvuDz13d9eFuYr1G67T dwpahk1Gyv8suq0lv9Ww4GyDu8DddONBNod2+rR/1LxuH0D0YjgUcx1e8KZe43wYG7IETn /iK8syAwu5k4oIW674mmWjvZ2jmleQJV4l6TIB+T83vu9PJfL/457vvidixKAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721405901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dk8krFrepggL7ynLKEvNpR4vfu4ETt66pY1d7tSKppw=; b=a332s6gZZoAelpjazlnwrkjsDtXFhBUaYmrvwD/FPWYziD+g2Y2T4iWGWFWctJ1kR2GMdR rcd6buPGGxu+NCbIoFhXG3VCqKTRjnkJOkOo/U20VW7YLXPmVbnCLbBysjeiXEdhHz4pDt SwGWFPJ2MzG5vF7Y1UXraCsH4wi2r5KSzjcXP+1Vf/eULDUh1yxAN5EyFbKcRYuHx/H/Rd 6MpAsv4MvJRW9Y8kh6pYowK1SKFoVwDZyGy3+hbuHEGgT38cE5MShC0IXJ0NdpadA5bZvj W+KelJW6d688RKfetJ/Oe2qOt3t/lC4PDKPYBXijWGUl7+h0KYy6tkDt0jCUQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQZbd1P2xzfsx; Fri, 19 Jul 2024 16:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JGILwN043460; Fri, 19 Jul 2024 16:18:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JGILP3043457; Fri, 19 Jul 2024 16:18:21 GMT (envelope-from git) Date: Fri, 19 Jul 2024 16:18:21 GMT Message-Id: <202407191618.46JGILP3043457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 27479403a764 - main - cxgbe/t4_tom: Free up hardware resources when the final CPL is received. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27479403a764cf3b97194887a1f819c1e35357aa Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=27479403a764cf3b97194887a1f819c1e35357aa commit 27479403a764cf3b97194887a1f819c1e35357aa Author: Navdeep Parhar AuthorDate: 2024-07-16 00:39:40 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-19 16:12:36 +0000 cxgbe/t4_tom: Free up hardware resources when the final CPL is received. Final CPL means the tid is done in the hardware and other resources associated with it can be freed right away. There is no need to wait for the kernel to detach the toepcb. Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45991 --- sys/dev/cxgbe/tom/t4_tom.c | 58 +++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 10ee78681365..645822b6f781 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -97,6 +97,7 @@ static struct uld_info tom_uld_info = { }; static void release_offload_resources(struct toepcb *); +static void done_with_toepcb(struct toepcb *); static int alloc_tid_tabs(struct tid_info *); static void free_tid_tabs(struct tid_info *); static void free_tom_data(struct adapter *, struct tom_data *); @@ -311,12 +312,42 @@ release_offload_resources(struct toepcb *toep) KASSERT(!(toep->flags & TPF_CPL_PENDING), ("%s: %p has CPL pending.", __func__, toep)); - KASSERT(!(toep->flags & TPF_ATTACHED), - ("%s: %p is still attached.", __func__, toep)); CTR5(KTR_CXGBE, "%s: toep %p (tid %d, l2te %p, ce %p)", __func__, toep, tid, toep->l2te, toep->ce); + if (toep->l2te) { + t4_l2t_release(toep->l2te); + toep->l2te = NULL; + } + if (tid >= 0) { + remove_tid(sc, tid, toep->ce ? 2 : 1); + release_tid(sc, tid, toep->ctrlq); + toep->tid = -1; + } + if (toep->ce) { + t4_release_clip_entry(sc, toep->ce); + toep->ce = NULL; + } + if (toep->params.tc_idx != -1) + t4_release_cl_rl(sc, toep->vi->pi->port_id, toep->params.tc_idx); +} + +/* + * Both the driver and kernel are done with the toepcb. + */ +static void +done_with_toepcb(struct toepcb *toep) +{ + struct tom_data *td = toep->td; + + KASSERT(!(toep->flags & TPF_CPL_PENDING), + ("%s: %p has CPL pending.", __func__, toep)); + KASSERT(!(toep->flags & TPF_ATTACHED), + ("%s: %p is still attached.", __func__, toep)); + + CTR(KTR_CXGBE, "%s: toep %p (0x%x)", __func__, toep, toep->flags); + /* * These queues should have been emptied at approximately the same time * that a normal connection's socket's so_snd would have been purged or @@ -329,20 +360,9 @@ release_offload_resources(struct toepcb *toep) ddp_assert_empty(toep); #endif MPASS(TAILQ_EMPTY(&toep->aiotx_jobq)); - - if (toep->l2te) - t4_l2t_release(toep->l2te); - - if (tid >= 0) { - remove_tid(sc, tid, toep->ce ? 2 : 1); - release_tid(sc, tid, toep->ctrlq); - } - - if (toep->ce) - t4_release_clip_entry(sc, toep->ce); - - if (toep->params.tc_idx != -1) - t4_release_cl_rl(sc, toep->vi->pi->port_id, toep->params.tc_idx); + MPASS(toep->tid == -1); + MPASS(toep->l2te == NULL); + MPASS(toep->ce == NULL); mtx_lock(&td->toep_list_lock); TAILQ_REMOVE(&td->toep_list, toep, link); @@ -392,7 +412,7 @@ t4_pcb_detach(struct toedev *tod __unused, struct tcpcb *tp) toep->flags &= ~TPF_ATTACHED; if (!(toep->flags & TPF_CPL_PENDING)) - release_offload_resources(toep); + done_with_toepcb(toep); } /* @@ -988,9 +1008,9 @@ final_cpl_received(struct toepcb *toep) toep->flags &= ~(TPF_CPL_PENDING | TPF_WAITING_FOR_FINAL); mbufq_drain(&toep->ulp_pduq); mbufq_drain(&toep->ulp_pdu_reclaimq); - + release_offload_resources(toep); if (!(toep->flags & TPF_ATTACHED)) - release_offload_resources(toep); + done_with_toepcb(toep); if (!in_pcbrele_wlocked(inp)) INP_WUNLOCK(inp); From nobody Fri Jul 19 16:18:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQZbf5CWWz5RvGC; Fri, 19 Jul 2024 16:18:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQZbf2xz5z53wW; Fri, 19 Jul 2024 16:18:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721405902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wIJjVE7vhFn8ZddRWF9oqqtaIKqJ1b2Nb66xYd8HiF8=; b=wDu79q0s8iNgu3WqqYciULa7r2WTfCrmkuE2XBmvdfVTU6kqRVjTnqYBfgbxVpQsxxXDL5 QOuMk6MsmMeDHQABMfynCS9oWzMMsPDr1BFU1ofuB7okjm5hg9wQ+zchQcDMuQwuVBTRAF MeIgMXeD4nnTlGlscwn3j7dukg8AN7ifOP0yjAP+olHaMyKxGFQEiOSt1PO2RUgwvpDZTs wYxOHcECP3n+4016mmugB0/cOJxj8Uvw8sm+ygZfKnOX+ohzWhvrWw84lkvuSp7VCIFvFH xmeASiyxehr9dE3pWtu3KIlhL59X9uJniYKQCzRmr35EI7g0KL+M+Lel/DmUhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721405902; a=rsa-sha256; cv=none; b=VqndSYLccOFAYojDn35i/ssafb1Gk9j1WpPSLzVztZmqPR4ccZINMuBY81ohiH0rKrOQA0 YKh0q+3CJU24OOyaz1TkfPg4mOdNdmbyUQqG4u10TrRgOOsT3c04gDo4W5mmqOVyu0Kskp 8M1DwJYHW285UlWhtihkoQ3Y5FE4ucp8KO4xuhsKwgCCEJnF6zWCFsWsPpHFaeiJSAe4Rj YsIe9S7Sdpnd8cKjFuzMcETo5C5RimEY/zwEDRQNERUqbLdZj1N5fcoUQmQ5S8Iw4Ylf0U UTO9f59iBZQKqo4kQ3gO0i/93Rp/mrfyMtCXslaZ90EnDZHjF1RRE3enhe0jjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721405902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wIJjVE7vhFn8ZddRWF9oqqtaIKqJ1b2Nb66xYd8HiF8=; b=tnQvXQdGx7cnRTkQc42mDr2MEfCR1kZZY3Fo0utnfbLYBwIOgIy/cz5BIsRPhTqSPI3q8/ K9C/iDTfEHRBl9hUfCRwndit0eqOcEZ0/jgtTILMjvL6epOSFnMDxW1ypBbZk2GKaxExZA Opqv6c/oWVIRe+UogwlPM0JhIgf4sEQG0tAj8GLlhtnX+v5uz/shCPFUvqaFvO8oKpbaSf RvO999RK6q0bfIgEYhsRiJr3mZ9s11wiQcNex65w53Xlsi6SgtbJmKJBY5GMqPgd+fgRdd aMmxw0fZ23d73dltWbeDPvWkpshJjPCHFQwbNTbXckILfatNh/VBz4ylzaKC6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQZbf2Wwqzfw5; Fri, 19 Jul 2024 16:18:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JGIMnn043526; Fri, 19 Jul 2024 16:18:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JGIMP2043523; Fri, 19 Jul 2024 16:18:22 GMT (envelope-from git) Date: Fri, 19 Jul 2024 16:18:22 GMT Message-Id: <202407191618.46JGIMP2043523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: cfcfd3c7bf5b - main - cxgbe(4): Make no assumptions about the start and size of the L2T table. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cfcfd3c7bf5b60da42b13ac5d8085c762613c302 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=cfcfd3c7bf5b60da42b13ac5d8085c762613c302 commit cfcfd3c7bf5b60da42b13ac5d8085c762613c302 Author: Navdeep Parhar AuthorDate: 2024-07-18 20:16:30 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-19 16:12:46 +0000 cxgbe(4): Make no assumptions about the start and size of the L2T table. Do not assume that the table starts at index 0 and is typically 4K in size. The only thing the driver needs to verify is that its use of F_SYNC_WR doesn't collide with the L2T hwidx range. Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46028 --- sys/dev/cxgbe/t4_l2t.c | 17 +++++++++++------ sys/dev/cxgbe/t4_l2t.h | 2 -- sys/dev/cxgbe/t4_main.c | 6 +++--- sys/dev/cxgbe/tom/t4_tom_l2t.c | 21 +++++++++++++-------- 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/sys/dev/cxgbe/t4_l2t.c b/sys/dev/cxgbe/t4_l2t.c index 005dce826ccb..90f184f5e666 100644 --- a/sys/dev/cxgbe/t4_l2t.c +++ b/sys/dev/cxgbe/t4_l2t.c @@ -369,14 +369,19 @@ int do_l2t_write_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { + struct adapter *sc = iq->adapter; const struct cpl_l2t_write_rpl *rpl = (const void *)(rss + 1); - unsigned int tid = GET_TID(rpl); - unsigned int idx = tid % L2T_SIZE; + const u_int hwidx = GET_TID(rpl) & ~(F_SYNC_WR | V_TID_QID(M_TID_QID)); + const bool sync = GET_TID(rpl) & F_SYNC_WR; - if (__predict_false(rpl->status != CPL_ERR_NONE)) { - log(LOG_ERR, - "Unexpected L2T_WRITE_RPL (%u) for entry at hw_idx %u\n", - rpl->status, idx); + MPASS(iq->abs_id == G_TID_QID(GET_TID(rpl))); + + if (__predict_false(hwidx < sc->vres.l2t.start) || + __predict_false(hwidx >= sc->vres.l2t.start + sc->vres.l2t.size) || + __predict_false(rpl->status != CPL_ERR_NONE)) { + CH_ERR(sc, "%s: hwidx %u, rpl %u, sync %u; L2T st %u, sz %u\n", + __func__, hwidx, rpl->status, sync, sc->vres.l2t.start, + sc->vres.l2t.size); return (EINVAL); } diff --git a/sys/dev/cxgbe/t4_l2t.h b/sys/dev/cxgbe/t4_l2t.h index 36a41e459a5d..991b4476eb61 100644 --- a/sys/dev/cxgbe/t4_l2t.h +++ b/sys/dev/cxgbe/t4_l2t.h @@ -35,8 +35,6 @@ #define V_SYNC_WR(x) ((x) << S_SYNC_WR) #define F_SYNC_WR V_SYNC_WR(1) -enum { L2T_SIZE = 4096 }; /* # of L2T entries */ - enum { L2T_STATE_VALID, /* entry is up to date */ L2T_STATE_STALE, /* entry may be used but needs revalidation */ diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 99400dc9aadb..11dd9e1d24a3 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -5262,9 +5262,9 @@ get_params__post_init(struct adapter *sc) } sc->vres.l2t.start = val[4]; sc->vres.l2t.size = val[5] - val[4] + 1; - KASSERT(sc->vres.l2t.size <= L2T_SIZE, - ("%s: L2 table size (%u) larger than expected (%u)", - __func__, sc->vres.l2t.size, L2T_SIZE)); + /* val[5] is the last hwidx and it must not collide with F_SYNC_WR */ + if (sc->vres.l2t.size > 0) + MPASS(fls(val[5]) <= S_SYNC_WR); sc->params.core_vdd = val[6]; param[0] = FW_PARAM_PFVF(IQFLINT_END); diff --git a/sys/dev/cxgbe/tom/t4_tom_l2t.c b/sys/dev/cxgbe/tom/t4_tom_l2t.c index c397196d9cca..ee442f023970 100644 --- a/sys/dev/cxgbe/tom/t4_tom_l2t.c +++ b/sys/dev/cxgbe/tom/t4_tom_l2t.c @@ -318,18 +318,23 @@ do_l2t_write_rpl2(struct sge_iq *iq, const struct rss_header *rss, { struct adapter *sc = iq->adapter; const struct cpl_l2t_write_rpl *rpl = (const void *)(rss + 1); - unsigned int tid = GET_TID(rpl); - unsigned int idx = tid % L2T_SIZE; + const u_int hwidx = GET_TID(rpl) & ~(F_SYNC_WR | V_TID_QID(M_TID_QID)); + const bool sync = GET_TID(rpl) & F_SYNC_WR; - if (__predict_false(rpl->status != CPL_ERR_NONE)) { - log(LOG_ERR, - "Unexpected L2T_WRITE_RPL (%u) for entry at hw_idx %u\n", - rpl->status, idx); + MPASS(iq->abs_id == G_TID_QID(GET_TID(rpl))); + + if (__predict_false(hwidx < sc->vres.l2t.start) || + __predict_false(hwidx >= sc->vres.l2t.start + sc->vres.l2t.size) || + __predict_false(rpl->status != CPL_ERR_NONE)) { + CH_ERR(sc, "%s: hwidx %u, rpl %u, sync %u; L2T st %u, sz %u\n", + __func__, hwidx, rpl->status, sync, sc->vres.l2t.start, + sc->vres.l2t.size); return (EINVAL); } - if (tid & F_SYNC_WR) { - struct l2t_entry *e = &sc->l2t->l2tab[idx - sc->vres.l2t.start]; + if (sync) { + const u_int idx = hwidx - sc->vres.l2t.start; + struct l2t_entry *e = &sc->l2t->l2tab[idx]; mtx_lock(&e->lock); if (e->state != L2T_STATE_SWITCHING) { From nobody Fri Jul 19 16:18:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQZbg4yRgz5Rv5h; Fri, 19 Jul 2024 16:18:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQZbg3pl2z53yk; Fri, 19 Jul 2024 16:18:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721405903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5qyeVWPu7e3Xq1BXt73Z2kScpJ1eo/xLd5kxwSpFfw=; b=NnXSEo0jwSvCo4iDG7dZr81QOmKVIg5ctw9YIFU6yxnK1fulCoSQef6KFZ5FIRAScSzcal +wT8WAtwe21O+ymxVvM1lfIQ5f6ZouopomDxNSOt7zn2ZaSQ+cw0Ec6aXta9SdjcvJbQmz OHEj2tQwKQ3qQuQEKstcI+v0vZKpL8rtbqDw2S7HzqLJOC1U32AH8M9krg3Uj5vahS2NGN Vge+WkkCx9AZ8tQxYzmVTm75jqRI1AKwiOezMxn1xQGx2F0/tJbHai0FpvCP5PaY3hO/bj HYoHWHcCnNFAJo7hKy17wIx6Zxf26Whzaf+u78ahzOA7trJEDtUX/wckTbEDDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721405903; a=rsa-sha256; cv=none; b=p+jyGIq7zvUvJvdHj8Ze8gWoaW3ZtMNwv3Xmnp6/7wmlDtu7Fb3X67Fpi1vnAq+fNnoJu6 nz/+JOBDD6ZU5s6hQQlOk1f+OzzqutLHgvDdPXMmYzcaHkt9dlBE0LvLAHnpTjM8deRbA9 /upMtAjWMCr600NU2heS6PGQbC/EzQvtHfToxdE0p877HDQclMWyEWB77UkQjhLZK4AQoT VLRjQtGssYr1lisuPF+0R8Mxv7g5WWi3egewG+G9s4Xr0wjvh5r2W172lK7yZGNfofvaQK 8LxRM3e34NQrdRXJSbesjmefYVgujMJAuF8nZbachbsE/hAHklMN0GfdwCE1Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721405903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5qyeVWPu7e3Xq1BXt73Z2kScpJ1eo/xLd5kxwSpFfw=; b=mb46bSCuQOzoH9KuDY8x8Dm4QWO9wgAdi8+WYq09bujnzG5H0jlwkNt4HRb7qbiJDIvLqG YZrW6370GNzKn9P5D/JKWMFr4aa9ytFGJ1gypkvWAv0bHTWQRG1E9tm2lKxvQxO4mDzKa/ mF/WjADJIUYUsRy/69l05JIR2th29hzBaS3HxlQMq5eEJBTt8Z3elzESFc5pGYKlsSH/Pc 0MWzABHb/gAzVSszkguY5JLf31FDQr6fNDyc1pBtZyOjc3rXW9UvLSrx8k1jvuMXvpBmcd LbMhtsAgpX7YOFhRtVLCW0XKn6UcTr3F6AF4hzaF+CHmoZRc+F/ImZp6L+7QGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQZbg3PkNzfsy; Fri, 19 Jul 2024 16:18:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JGINwm043579; Fri, 19 Jul 2024 16:18:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JGINg7043575; Fri, 19 Jul 2024 16:18:23 GMT (envelope-from git) Date: Fri, 19 Jul 2024 16:18:23 GMT Message-Id: <202407191618.46JGINg7043575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: cf5e6370f15c - main - cxgbe(4): Changes to ULD list management. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf5e6370f15cffabbbf508083ba7d48ec8abfa79 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=cf5e6370f15cffabbbf508083ba7d48ec8abfa79 commit cf5e6370f15cffabbbf508083ba7d48ec8abfa79 Author: Navdeep Parhar AuthorDate: 2024-07-06 20:43:17 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-19 16:12:49 +0000 cxgbe(4): Changes to ULD list management. * Convert t4_uld_list to an array. There will be at most 3 items in the list and it's simpler to track them in an array with a fixed slot for each ULD. * There is no need to refcount ULDs so stop doing that. * Add uld_ prefix to all members of uld_info. * Rename async_event to uld_stop to match its actual purpose. Call it for all ULDs and not just ULD_IWARP. Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46029 --- sys/dev/cxgbe/cxgbei/cxgbei.c | 9 +- sys/dev/cxgbe/iw_cxgbe/device.c | 19 +++-- sys/dev/cxgbe/offload.h | 13 ++- sys/dev/cxgbe/t4_main.c | 177 +++++++++++++++++----------------------- sys/dev/cxgbe/tom/t4_tom.c | 9 +- 5 files changed, 97 insertions(+), 130 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 193d58f9eda4..04454a98e247 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -901,9 +901,8 @@ cxgbei_deactivate_all(struct adapter *sc, void *arg __unused) } static struct uld_info cxgbei_uld_info = { - .uld_id = ULD_ISCSI, - .activate = cxgbei_activate, - .deactivate = cxgbei_deactivate, + .uld_activate = cxgbei_activate, + .uld_deactivate = cxgbei_deactivate, }; static int @@ -916,7 +915,7 @@ cxgbei_mod_load(void) t4_register_cpl_handler(CPL_RX_ISCSI_DDP, do_rx_iscsi_ddp); t4_register_cpl_handler(CPL_RX_ISCSI_CMP, do_rx_iscsi_cmp); - rc = t4_register_uld(&cxgbei_uld_info); + rc = t4_register_uld(&cxgbei_uld_info, ULD_ISCSI); if (rc != 0) return (rc); @@ -931,7 +930,7 @@ cxgbei_mod_unload(void) t4_iterate(cxgbei_deactivate_all, NULL); - if (t4_unregister_uld(&cxgbei_uld_info) == EBUSY) + if (t4_unregister_uld(&cxgbei_uld_info, ULD_ISCSI) == EBUSY) return (EBUSY); t4_register_cpl_handler(CPL_ISCSI_HDR, NULL); diff --git a/sys/dev/cxgbe/iw_cxgbe/device.c b/sys/dev/cxgbe/iw_cxgbe/device.c index fa886766e383..28d6d0f2d00c 100644 --- a/sys/dev/cxgbe/iw_cxgbe/device.c +++ b/sys/dev/cxgbe/iw_cxgbe/device.c @@ -259,13 +259,12 @@ static int c4iw_mod_load(void); static int c4iw_mod_unload(void); static int c4iw_activate(struct adapter *); static int c4iw_deactivate(struct adapter *); -static void c4iw_async_event(struct adapter *); +static int c4iw_stop(struct adapter *); static struct uld_info c4iw_uld_info = { - .uld_id = ULD_IWARP, - .activate = c4iw_activate, - .deactivate = c4iw_deactivate, - .async_event = c4iw_async_event, + .uld_activate = c4iw_activate, + .uld_deactivate = c4iw_deactivate, + .uld_stop = c4iw_stop, }; static int @@ -326,8 +325,8 @@ c4iw_deactivate(struct adapter *sc) return (0); } -static void -c4iw_async_event(struct adapter *sc) +static int +c4iw_stop(struct adapter *sc) { struct c4iw_dev *iwsc = sc->iwarp_softc; @@ -341,6 +340,8 @@ c4iw_async_event(struct adapter *sc) event.device = &iwsc->ibdev; ib_dispatch_event(&event); } + + return (0); } static void @@ -379,7 +380,7 @@ c4iw_mod_load(void) if (rc != 0) return (rc); - rc = t4_register_uld(&c4iw_uld_info); + rc = t4_register_uld(&c4iw_uld_info, ULD_IWARP); if (rc != 0) { c4iw_cm_term(); return (rc); @@ -398,7 +399,7 @@ c4iw_mod_unload(void) c4iw_cm_term(); - if (t4_unregister_uld(&c4iw_uld_info) == EBUSY) + if (t4_unregister_uld(&c4iw_uld_info, ULD_IWARP) == EBUSY) return (EBUSY); return (0); diff --git a/sys/dev/cxgbe/offload.h b/sys/dev/cxgbe/offload.h index a8b243b764c8..a55d6f45cabf 100644 --- a/sys/dev/cxgbe/offload.h +++ b/sys/dev/cxgbe/offload.h @@ -209,12 +209,9 @@ enum { struct adapter; struct port_info; struct uld_info { - SLIST_ENTRY(uld_info) link; - int refcount; - int uld_id; - int (*activate)(struct adapter *); - int (*deactivate)(struct adapter *); - void (*async_event)(struct adapter *); + int (*uld_activate)(struct adapter *); + int (*uld_deactivate)(struct adapter *); + int (*uld_stop)(struct adapter *); }; struct tom_tunables { @@ -242,8 +239,8 @@ struct tls_tunables { }; #ifdef TCP_OFFLOAD -int t4_register_uld(struct uld_info *); -int t4_unregister_uld(struct uld_info *); +int t4_register_uld(struct uld_info *, int); +int t4_unregister_uld(struct uld_info *, int); int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); int uld_active(struct adapter *, int); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 11dd9e1d24a3..9ff56b93a0e6 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -263,7 +263,7 @@ static struct sx t4_list_lock; SLIST_HEAD(, adapter) t4_list; #ifdef TCP_OFFLOAD static struct sx t4_uld_list_lock; -SLIST_HEAD(, uld_info) t4_uld_list; +struct uld_info *t4_uld_list[ULD_MAX + 1]; #endif /* @@ -864,7 +864,7 @@ static int release_clip_addr(struct adapter *, struct t4_clip_addr *); #ifdef TCP_OFFLOAD static int toe_capability(struct vi_info *, bool); static int t4_deactivate_all_uld(struct adapter *); -static void t4_async_event(struct adapter *); +static void stop_all_uld(struct adapter *); #endif #ifdef KERN_TLS static int ktls_capability(struct adapter *, bool); @@ -3616,7 +3616,7 @@ fatal_error_task(void *arg, int pending) int rc; #ifdef TCP_OFFLOAD - t4_async_event(sc); + stop_all_uld(sc); #endif if (atomic_testandclear_int(&sc->error_flags, ilog2(ADAP_CIM_ERR))) { dump_cim_regs(sc); @@ -12400,82 +12400,61 @@ toe_capability(struct vi_info *vi, bool enable) * Add an upper layer driver to the global list. */ int -t4_register_uld(struct uld_info *ui) +t4_register_uld(struct uld_info *ui, int id) { - int rc = 0; - struct uld_info *u; + int rc; + if (id < 0 || id > ULD_MAX) + return (EINVAL); sx_xlock(&t4_uld_list_lock); - SLIST_FOREACH(u, &t4_uld_list, link) { - if (u->uld_id == ui->uld_id) { - rc = EEXIST; - goto done; - } + if (t4_uld_list[id] != NULL) + rc = EEXIST; + else { + t4_uld_list[id] = ui; + rc = 0; } - - SLIST_INSERT_HEAD(&t4_uld_list, ui, link); - ui->refcount = 0; -done: sx_xunlock(&t4_uld_list_lock); return (rc); } int -t4_unregister_uld(struct uld_info *ui) +t4_unregister_uld(struct uld_info *ui, int id) { - int rc = EINVAL; - struct uld_info *u; + if (id < 0 || id > ULD_MAX) + return (EINVAL); sx_xlock(&t4_uld_list_lock); - - SLIST_FOREACH(u, &t4_uld_list, link) { - if (u == ui) { - if (ui->refcount > 0) { - rc = EBUSY; - goto done; - } - - SLIST_REMOVE(&t4_uld_list, ui, uld_info, link); - rc = 0; - goto done; - } - } -done: + MPASS(t4_uld_list[id] == ui); + t4_uld_list[id] = NULL; sx_xunlock(&t4_uld_list_lock); - return (rc); + return (0); } int t4_activate_uld(struct adapter *sc, int id) { int rc; - struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); if (id < 0 || id > ULD_MAX) return (EINVAL); - rc = EAGAIN; /* kldoad the module with this ULD and try again. */ - - sx_slock(&t4_uld_list_lock); - SLIST_FOREACH(ui, &t4_uld_list, link) { - if (ui->uld_id == id) { - if (!(sc->flags & FULL_INIT_DONE)) { - rc = adapter_init(sc); - if (rc != 0) - break; - } - - rc = ui->activate(sc); - if (rc == 0) { - setbit(&sc->active_ulds, id); - ui->refcount++; - } - break; - } + /* Adapter needs to be initialized before any ULD can be activated. */ + if (!(sc->flags & FULL_INIT_DONE)) { + rc = adapter_init(sc); + if (rc != 0) + return (rc); } + sx_slock(&t4_uld_list_lock); + if (t4_uld_list[id] == NULL) + rc = EAGAIN; /* load the KLD with this ULD and try again. */ + else { + rc = t4_uld_list[id]->uld_activate(sc); + if (rc == 0) + setbit(&sc->active_ulds, id); + } sx_sunlock(&t4_uld_list_lock); return (rc); @@ -12485,27 +12464,20 @@ int t4_deactivate_uld(struct adapter *sc, int id) { int rc; - struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); if (id < 0 || id > ULD_MAX) return (EINVAL); - rc = ENXIO; sx_slock(&t4_uld_list_lock); - - SLIST_FOREACH(ui, &t4_uld_list, link) { - if (ui->uld_id == id) { - rc = ui->deactivate(sc); - if (rc == 0) { - clrbit(&sc->active_ulds, id); - ui->refcount--; - } - break; - } + if (t4_uld_list[id] == NULL) + rc = ENXIO; + else { + rc = t4_uld_list[id]->uld_deactivate(sc); + if (rc == 0) + clrbit(&sc->active_ulds, id); } - sx_sunlock(&t4_uld_list_lock); return (rc); @@ -12514,25 +12486,20 @@ t4_deactivate_uld(struct adapter *sc, int id) static int t4_deactivate_all_uld(struct adapter *sc) { - int rc; - struct uld_info *ui; + int i, rc; rc = begin_synchronized_op(sc, NULL, SLEEP_OK, "t4detuld"); if (rc != 0) return (ENXIO); - sx_slock(&t4_uld_list_lock); - - SLIST_FOREACH(ui, &t4_uld_list, link) { - if (isset(&sc->active_ulds, ui->uld_id)) { - rc = ui->deactivate(sc); - if (rc != 0) - break; - clrbit(&sc->active_ulds, ui->uld_id); - ui->refcount--; - } + for (i = 0; i <= ULD_MAX; i++) { + if (t4_uld_list[i] == NULL || !uld_active(sc, i)) + continue; + rc = t4_uld_list[i]->uld_deactivate(sc); + if (rc != 0) + break; + clrbit(&sc->active_ulds, i); } - sx_sunlock(&t4_uld_list_lock); end_synchronized_op(sc, 0); @@ -12540,30 +12507,30 @@ t4_deactivate_all_uld(struct adapter *sc) } static void -t4_async_event(struct adapter *sc) +stop_all_uld(struct adapter *sc) { - struct uld_info *ui; + int i; - if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4async") != 0) + if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4uldst") != 0) return; sx_slock(&t4_uld_list_lock); - SLIST_FOREACH(ui, &t4_uld_list, link) { - if (ui->uld_id == ULD_IWARP) { - ui->async_event(sc); - break; - } + for (i = 0; i <= ULD_MAX; i++) { + if (t4_uld_list[i] == NULL || !uld_active(sc, i) || + t4_uld_list[i]->uld_stop == NULL) + continue; + (void) t4_uld_list[i]->uld_stop(sc); } sx_sunlock(&t4_uld_list_lock); end_synchronized_op(sc, 0); } int -uld_active(struct adapter *sc, int uld_id) +uld_active(struct adapter *sc, int id) { - MPASS(uld_id >= 0 && uld_id <= ULD_MAX); + MPASS(id >= 0 && id <= ULD_MAX); - return (isset(&sc->active_ulds, uld_id)); + return (isset(&sc->active_ulds, id)); } #endif @@ -13111,7 +13078,6 @@ mod_event(module_t mod, int cmd, void *arg) callout_init(&fatal_callout, 1); #ifdef TCP_OFFLOAD sx_init(&t4_uld_list_lock, "T4/T5 ULDs"); - SLIST_INIT(&t4_uld_list); #endif #ifdef INET6 t4_clip_modload(); @@ -13140,9 +13106,20 @@ mod_event(module_t mod, int cmd, void *arg) case MOD_UNLOAD: sx_xlock(&mlu); if (--loaded == 0) { +#ifdef TCP_OFFLOAD + int i; +#endif int tries; taskqueue_free(reset_tq); + + tries = 0; + while (tries++ < 5 && t4_sge_extfree_refs() != 0) { + uprintf("%ju clusters with custom free routine " + "still is use.\n", t4_sge_extfree_refs()); + pause("t4unload", 2 * hz); + } + sx_slock(&t4_list_lock); if (!SLIST_EMPTY(&t4_list)) { rc = EBUSY; @@ -13151,20 +13128,14 @@ mod_event(module_t mod, int cmd, void *arg) } #ifdef TCP_OFFLOAD sx_slock(&t4_uld_list_lock); - if (!SLIST_EMPTY(&t4_uld_list)) { - rc = EBUSY; - sx_sunlock(&t4_uld_list_lock); - sx_sunlock(&t4_list_lock); - goto done_unload; - } -#endif - tries = 0; - while (tries++ < 5 && t4_sge_extfree_refs() != 0) { - uprintf("%ju clusters with custom free routine " - "still is use.\n", t4_sge_extfree_refs()); - pause("t4unload", 2 * hz); + for (i = 0; i <= ULD_MAX; i++) { + if (t4_uld_list[i] != NULL) { + rc = EBUSY; + sx_sunlock(&t4_uld_list_lock); + sx_sunlock(&t4_list_lock); + goto done_unload; + } } -#ifdef TCP_OFFLOAD sx_sunlock(&t4_uld_list_lock); #endif sx_sunlock(&t4_list_lock); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 645822b6f781..f9d8dcd706b7 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -91,9 +91,8 @@ static int t4_tom_activate(struct adapter *); static int t4_tom_deactivate(struct adapter *); static struct uld_info tom_uld_info = { - .uld_id = ULD_TOM, - .activate = t4_tom_activate, - .deactivate = t4_tom_deactivate, + .uld_activate = t4_tom_activate, + .uld_deactivate = t4_tom_deactivate, }; static void release_offload_resources(struct toepcb *); @@ -2013,7 +2012,7 @@ t4_tom_mod_load(void) toe6_protosw.pr_ctloutput = t4_ctloutput_tom; toe6_protosw.pr_aio_queue = t4_aio_queue_tom; - return (t4_register_uld(&tom_uld_info)); + return (t4_register_uld(&tom_uld_info, ULD_TOM)); } static void @@ -2034,7 +2033,7 @@ t4_tom_mod_unload(void) { t4_iterate(tom_uninit, NULL); - if (t4_unregister_uld(&tom_uld_info) == EBUSY) + if (t4_unregister_uld(&tom_uld_info, ULD_TOM) == EBUSY) return (EBUSY); t4_tls_mod_unload(); From nobody Fri Jul 19 17:07:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhY1mfqz5RyxD; Fri, 19 Jul 2024 17:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhX4tyHz596n; Fri, 19 Jul 2024 17:07:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLoOq2wL7OGLh3uJ2HpfmAR9WZqcAo0SjDCSbIiOPH4=; b=UC0broSu9PF+5zGIaZnQs68J/X7jYpyfKwqMwwiQHA2P6C3Q5mkIcgxShP2npyU5a9A0+p TuJ/JZUxOQq1HL1SYAyMTvP2k08dx0OBzgYhLQaWM5wp6TsAyVLlbIq4v2NdENOie5P5aM 018n6/6IIUMgS2DIIRwd5npGROVpVj9sYbF9Uxuwhjiy/Dk2wjYtwibm9yA6sRG34LYZb3 BkTd14Gvc0eAJsSmhnr6+UCVA19K1Eg0nEWPnf+y865gg6eEIa1jW8ROmrAgTtLDbG4jmq hoqokZ7HbEYs+CmKTxCGP9OORik5SojHlUEcx2N5Ksu9+gihLRZ8uWvilwMEVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408860; a=rsa-sha256; cv=none; b=LCi107DOzZQdgjy+XWdJBGDQRnmpRDHkh7becBrct5S8ceXc8uefrXK8lC9XdJElTz/GXD azsIPKJnvPQgTnWe54xXIKUeH9Dke/xjWaEXfFv52Z09uOPHa9u769H7JMgBXf25CuMBR1 TuSb0biCfHqIXLpQrZ3YXntzONUsTybXiX1G60PktB8mSTS+QOLIABcaFfXWctSkF6GDTw Chs3/S9ljc1csaOeIPD7sMTvPj7vwiiMSlrMVYa9qblZSqMQYvvIYxzPIoL2+uvJhwp1Jp VO/RiY29RPQAjrPn33Zpko8oBFtylR6jxCOhLpiTF+lwZKfygrJ6AWNnAHReUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLoOq2wL7OGLh3uJ2HpfmAR9WZqcAo0SjDCSbIiOPH4=; b=KmNXuqMun30NTFTpSYCPQFP5xSku3InSjtw5fBssSSWrp5Y2RGupJW3ebF2R7kwetBn98M 9tUr+Qw3UXXfNuIPRTpmmFajHYiwNEmyUCLTIxBv9PyhdrXj/zNEz12LzdPU3joB5/V2hv iN5gz+N7clgokRP5W1SUj/EnckyK0JGP0rzgoQrX2JypYfR86caxpv7jVW8Y7tRhIOkoBA KRoQ1mi7snL4VrYPrDjly2jpAqUL+F4GtFTUCUm9XEqN1ZrF4NO/vqJVhxgEmI8z4uVDCI YI2RgPxQ6BE12KmFKe/e01s2neI6UvANV3o5Mo1+iQJKJa56D7XWt49DV4OJlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhX4VNrzgbG; Fri, 19 Jul 2024 17:07:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7eO6027723; Fri, 19 Jul 2024 17:07:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7eLD027720; Fri, 19 Jul 2024 17:07:40 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:40 GMT Message-Id: <202407191707.46JH7eLD027720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 680f40f38343 - main - stdatomic: Only use clang atomics if __clang__ is defined List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 680f40f38343de118d5b973129683804e496faaf Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=680f40f38343de118d5b973129683804e496faaf commit 680f40f38343de118d5b973129683804e496faaf Author: John Baldwin AuthorDate: 2024-07-19 17:01:07 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:05:52 +0000 stdatomic: Only use clang atomics if __clang__ is defined GCC 14 defines __has_extension(c_atomic) but does not support __c11_atomic_*, so require __clang__ for the CLANG_ATOMICS case. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D46001 --- sys/sys/stdatomic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h index e05606b1ead8..099097ea84a4 100644 --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -33,7 +33,8 @@ #include #include -#if __has_extension(c_atomic) || __has_extension(cxx_atomic) +#if (__has_extension(c_atomic) || __has_extension(cxx_atomic)) && \ + defined(__clang__) #define __CLANG_ATOMICS #elif __GNUC_PREREQ__(4, 7) #define __GNUC_ATOMICS From nobody Fri Jul 19 17:07:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhY6r9Lz5Rygx; Fri, 19 Jul 2024 17:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhY5dlyz58yn; Fri, 19 Jul 2024 17:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7ZH/srApOwo4hSPiJ87MpKTbc/LH1orL4W7OoQZ1UI=; b=YPYSNOCLUQEoIWak+24xRmdazp82VlYYfmtZ5uGaSa9XKzXLAIsBgzLHUOnpwnF7fNRney H9wV877gl1nENCisLsDhSfbGNrSPcwp/6Nk7fljcdh35xTT7922dgLO9hBB7mYOEpKbcWa 01cRU2ybBGl/Yg6ZzDL2zL1kPk7dPgLbwi1Pz0tujx6uMVN7eop6tVxrb3tGnXaN8Lhqqe mUkuspColrKjMIczhZiD6XKhcY6lftW2JXbBL1xM+rVZO83JE7/vPRvO5dfZOUiDnH+KCP k+/L3zghIBXUJPijCqkGaSLrbiURIk1q96DeMcseVSueSO+5gbsbJUH7B+z3Mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408861; a=rsa-sha256; cv=none; b=pU/gu7mW12uQOzOTmhHLdnTdB1QnFpNDjX9lXhfOoCuDpWNHnlvTS+b5uiqMyX8fAjQcMd EmBA2AeA0LxKfro5V9EBUQ6W7QpDqrQzP5lNPrXXsiY0l4Tpi0ttuoTwKSGFEpOqcaeMZM aYOFKqegZAWlzCMJErZmpJ6HNvGD83j6i1QoayN+EML4h5a/5qi6Uy52GjUCGVJleS9a08 xkmifoWFzGEy1DF0EShy8nZ2yq8H40XDH7vV5lP1SeM23NQoUAEiTNFJqvTznFfhGRHKlz 0vwozwCj3IWDHidAttZBDKDCPl+Vduh9ipaBsSJvOTtMGAYslHOQz24Mdkkfnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7ZH/srApOwo4hSPiJ87MpKTbc/LH1orL4W7OoQZ1UI=; b=Jye0z3waQCun7zvknGFKizt2ZoBm4r575JnVrxEDMCfKRzcKWdWXofwpVxFuYwEGdPtC9h 7wwiLe0Lafe6lZqvxieXxIcn9mSjL5Q6H1Eq/S9OxfYQa7RTiIWeHfwZvRg/6n1g2BlAxf BGYMEJwBmdCTvJAk3zo2UUzpoOdAx2fwqIj9AWTjctuDjtezQb5ufUi07OWr2FS5Ej1lvS LXuiosCm9dMk2tmq9OZHneMuvJYnXkkzDMguPIktxcpINubwTQWlI7ALGDoJdpBEVS/TEz BpKrN432wX2f2wAs/rOzhQdDPoxSQB69JzLnkGrJpAO5HHOO5Dxqfkybzx0Vfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhY572zzgn4; Fri, 19 Jul 2024 17:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7fLs027783; Fri, 19 Jul 2024 17:07:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7f21027780; Fri, 19 Jul 2024 17:07:41 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:41 GMT Message-Id: <202407191707.46JH7f21027780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 5275d1ddb42d - main - libcasper: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5275d1ddb42dc70fb87925e59445059068c08271 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5275d1ddb42dc70fb87925e59445059068c08271 commit 5275d1ddb42dc70fb87925e59445059068c08271 Author: John Baldwin AuthorDate: 2024-07-19 17:01:40 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:05:58 +0000 libcasper: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46005 --- lib/libcasper/services/cap_dns/cap_dns.c | 4 ++-- lib/libcasper/services/cap_net/cap_net.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcasper/services/cap_dns/cap_dns.c b/lib/libcasper/services/cap_dns/cap_dns.c index 8548715a6978..32cbf973ad45 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.c +++ b/lib/libcasper/services/cap_dns/cap_dns.c @@ -85,7 +85,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_length = (int)nvlist_get_number(nvl, "length"); nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); - hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + hp->h_aliases = calloc(nitems + 1, sizeof(hp->h_aliases[0])); if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { @@ -99,7 +99,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_aliases[ii] = NULL; nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); - hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + hp->h_addr_list = calloc(nitems + 1, sizeof(hp->h_addr_list[0])); if (hp->h_addr_list == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { diff --git a/lib/libcasper/services/cap_net/cap_net.c b/lib/libcasper/services/cap_net/cap_net.c index a8f039f81843..40d18319ae28 100644 --- a/lib/libcasper/services/cap_net/cap_net.c +++ b/lib/libcasper/services/cap_net/cap_net.c @@ -105,7 +105,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_length = (int)nvlist_get_number(nvl, "length"); nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); - hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + hp->h_aliases = calloc(nitems + 1, sizeof(hp->h_aliases[0])); if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { @@ -119,7 +119,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_aliases[ii] = NULL; nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); - hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + hp->h_addr_list = calloc(nitems + 1, sizeof(hp->h_addr_list[0])); if (hp->h_addr_list == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { From nobody Fri Jul 19 17:07:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhb11Myz5RykV; Fri, 19 Jul 2024 17:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhZ6ZfDz58yq; Fri, 19 Jul 2024 17:07:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3QZqmAUg7NBxoSUxTzRpHe/06ig2uD6BYFbpw4SH3yk=; b=er0yOKchBIrJGixP1l6cH+8FNVqdFIglkyuopUrwkEzlSafkyVg0t77hamDk8umVRsj3qN gXN+jcV1ZFKT0/1K33NxQ2lL/fV2llSPw1mPucziihUggtsN5I1iD4dxn0FmaSca30dLJb nmjzKKKIXeTvk27ZzVTKVE7L0MGREJMp9ocQJ/KtdESZ3Zl6K3cz0+pxvep1z3NOx148KI wPrFpTldUnnzpNSkEe3T2QN0+VGj3t3s5+/DOf8/QN3dw67yi8kaP7jdjJ5yBVnQ/XTBi1 EElwgFbuNpW1C6SBauVebhwt4+rADXx+oZl98Swgc73+I0bTsoVAAbVdrfA8RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408862; a=rsa-sha256; cv=none; b=Wwhc49hD9M4zlTG7ywyQr5rfffRy0wG3Xv6WDe59SIhxc1zIBU/U0DLZDnc2YmL5bIZ4Hm uUe2z1va6+JhMzj/C76e3x9sCLFkGc9TCY1Brwiv2fAvLXdx89j+WdblPUrFYj4/qEEWD/ 6droCsoW+ac2gQIjLVpj3aebwVPPEoZY8n5VWQzFSPh3nATPBzC6Cy5OYzbUTAXAUsWUpH h00ASxQd+G+NT22XIk6uK3GKqYhdJW8mEqWbsxT8QeRfl9t3w294723p0SS0QNaLwZS8ur EZLwMI3f1Vllk6ZLDLkuujUTacwWIOVBXq+tBIDWBcJ/TEiSWs7OqJgjOTrIUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3QZqmAUg7NBxoSUxTzRpHe/06ig2uD6BYFbpw4SH3yk=; b=lwtaJytoLKO3CbuHRFuQmU6uMiAfHHmUo7AQ0WK6Zjuyq4JLhB5O9XN0L0JoDsZNlVmoHH N84qygsYtx2AOkfx88E5J83NfHgK1NNfey40rvz3DuKGR4Q2TMANSkA2+UR/BjFLv5naG9 rZQtNw0KzYf029RGi/LXmlRBZm2Gb875rgq+xtfyy5cEOuPkDRKXueu4DxpBzWbzUT49pu pfwiKkfwc4+QG6nBWfhAPIVFmHK498ab5Usa+aHoI/VuNNjJWPOkOYNGLzavVokP7WCIhE HdAHMe9pDq6qK2deH68hFZbCIPVX7PFn0Y3jD2AVnmcXTlusH8fAUEbybP9naw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhZ6BcTzgbH; Fri, 19 Jul 2024 17:07:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7gNO027844; Fri, 19 Jul 2024 17:07:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7gDF027841; Fri, 19 Jul 2024 17:07:42 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:42 GMT Message-Id: <202407191707.46JH7gDF027841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: bf3b889a5be1 - main - libgeom: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf3b889a5be141f3abadcfc5a1d1cbdc50273d72 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bf3b889a5be141f3abadcfc5a1d1cbdc50273d72 commit bf3b889a5be141f3abadcfc5a1d1cbdc50273d72 Author: John Baldwin AuthorDate: 2024-07-19 17:02:05 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:03 +0000 libgeom: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46006 --- lib/libgeom/geom_xml2tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c index 49cbb0385770..2d2c43e29e77 100644 --- a/lib/libgeom/geom_xml2tree.c +++ b/lib/libgeom/geom_xml2tree.c @@ -407,7 +407,7 @@ geom_xml2tree(struct gmesh *gmp, char *p) free(mt); return (error); } - gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1); + gmp->lg_ident = calloc(mt->nident + 1, sizeof(*gmp->lg_ident)); free(mt); if (gmp->lg_ident == NULL) return (ENOMEM); From nobody Fri Jul 19 17:07:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhc2Cnqz5Ryq9; Fri, 19 Jul 2024 17:07:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhc12dRz599d; Fri, 19 Jul 2024 17:07:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1iL4wUt93cP1xflFPpAo2QryrgRutkd728SKvKsdx+A=; b=UKhYpd05vkxSw/QzviAg8X74ntrO6kYLGFfQuDDxsMJbkUXOkipllpMgqgcStnjKyLpGaj vT2+UQI8CXGYd+pEXxdIWgmYw6vh01HMfRZVxsQxDpCzRUU3IjFERCafVDSG1bXx22mmYn 0k4RFdXF65pVPN1EDEgQSaHV4dP8Nrunii2LHYs6Ho7hNli7fj8pqOrIlmDpT9/gjKbxMR TjQA9o3UFciFZy4MK3Mst5rtOswlQQcNCNKnIeChsfqC9HuizNXTgNxbt7SdhIgjvgsesU u+ECkq9k1TMAVa6Rg3pjDtFwaQrUVh44VrdbJcH/P722r23LIb0RKYeML9et8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408864; a=rsa-sha256; cv=none; b=IfNmbDaIxd69Qh5y7774IPaXahzcwZ1wx0mc2mHVXzsiRcuk9wXoTraq+nyXqOuFjeRfjY YA6KL8jXiHtlQBFIfWwE8Dyt6NLbC8TeXimZJht1KUZgpK7hYtB592Mh58/+gLC94R+HHt OMlmDUAcJDJoxtVykiMAdVze3TfWfve7Fx/WIfoyRLUrge3PPiYbceI1PzRkrSXuGalS83 PNvcsGO0VlQgFgeNuqev/ZJHmbt/l34298yrdvDSdUD+bSj8fS73ckAam90ek13roWUL4H ekX30iaZRXFQJOieK51l+AdBGngup74xUzePGCAzpkaS/O2dXvxc9mF0Y6eONA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1iL4wUt93cP1xflFPpAo2QryrgRutkd728SKvKsdx+A=; b=mLPROCHueijk1Qecp3V9kSz8ob0gvRlWfr0vV3FwdTfHddZ/xMwL4zbBTvvyyAkjtUrM6L BpciK0XKVoE4krBYRRThmmjNzs+AgX3ilSD42RWTPUiOaYB+TpsQ5HrNi66HZTbsF2LWIe jrRxrIczZ3ZBARi1o0+O+3xrH7eLqu/lrv5agogxJjg1Q+w2HzMtvhgHxuzhTDjp6uPKMR GuUlGbTRBeMo8bWdYVK3wR50FbtkI4+dR1MiHmKFDm3Y1LDDt+5QTqadBuFIZtPr/Nj2Gl tY/BrUrTzeqMdObU1lJnABtpuwI+mMySItvxOSVGMA6abu4qv4uLN7tH+Tj5Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhc07v3zgPd; Fri, 19 Jul 2024 17:07:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7hhN027912; Fri, 19 Jul 2024 17:07:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7hY2027909; Fri, 19 Jul 2024 17:07:43 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:43 GMT Message-Id: <202407191707.46JH7hY2027909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b73445a32f8a - main - elftoolchain: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b73445a32f8a3648372c0042ef633fe61b38d135 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b73445a32f8a3648372c0042ef633fe61b38d135 commit b73445a32f8a3648372c0042ef633fe61b38d135 Author: John Baldwin AuthorDate: 2024-07-19 17:02:45 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:11 +0000 elftoolchain: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46007 --- contrib/elftoolchain/libdwarf/libdwarf_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elftoolchain/libdwarf/libdwarf_init.c b/contrib/elftoolchain/libdwarf/libdwarf_init.c index b85c87c59af0..95ed6147ba89 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_init.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_init.c @@ -302,7 +302,7 @@ _dwarf_alloc(Dwarf_Debug *ret_dbg, int mode, Dwarf_Error *error) { Dwarf_Debug dbg; - if ((dbg = calloc(sizeof(struct _Dwarf_Debug), 1)) == NULL) { + if ((dbg = calloc(1, sizeof(struct _Dwarf_Debug))) == NULL) { DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY); return (DW_DLE_MEMORY); } From nobody Fri Jul 19 17:07:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhd2R0rz5RyxJ; Fri, 19 Jul 2024 17:07:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhd1cFKz59JX; Fri, 19 Jul 2024 17:07:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VBwiIp8lA5woHwsh7XM1XMpjioIcbFZ9Jp8XJtFnm7w=; b=P3dktwt3FIQWMEvpq4YhbGo+YuB6G1JJ5XtGavO3R4N27FgsD5Nl7o1TCc+/PqXWdRH3wm /cUjjrc7/urZQI3PX1KxV1ody9VoDEereCtIejfKfXS+XRSGhz32Iy9sq6V31vltsiIN+/ 8Y183EXr2r5bvJKVG9W9gNDpB28iUtmQywn8EkkRqN3hO99NtNRpaGlQTCwzbpteawqViR sJ5W50KBIy9CwhpT/nGz9vfqkC7sOsEsUBJPCGQW+s91niwORe70wvkF9fVCBR46mvmZ3e PChjvDExLjAgUXt2M5lP/IQFfaIIov7pvsNM1NXm1+nQXdj7CHlsUlyY5qsaOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408865; a=rsa-sha256; cv=none; b=WBaOAod/E99ylzycz3zttPVFVF8u8cKC7LFAoE9qia9akEn4STnUEqPFV1h+L3TVjpBd44 sPnHLgtFebG2y3MqzHW7r/owLG9+s0ACn+I258yFcRBHogu0+TG80bZV6a/NS6liq9FCCa 6hq696w4SL9fMEdmCYNfP/xszUxE74VQjhG+WQy93LMnwaCpF7ZygoroK0UxpA14ypcRAZ pe9NtwfsWZdfZOLQO4xjEn/I1++Is3wUo3cWAbJo39enr/PxGkjf9IYVO52QIj6RLQtuvd TsZoNpIN4weZsIJEcTjtCTTMZG4kxH+iwbDb2/77yP3WlUjxjdOCPif9ssjfPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VBwiIp8lA5woHwsh7XM1XMpjioIcbFZ9Jp8XJtFnm7w=; b=RqccIh43dFqkGkn/pSlmMmsa7QEZySG7Vw0urRSDke80v3jYu6+wx1SYIRqJIhpjB2zpDN uEw4ilo3oq6ImufFtLcuQkuOMMrTjEH36S3CxN98eWnzS1bhMClMVBZvVpSWbpyUznGblr 8QDkWbf8tywzt9u0ODOj2zgGMNpQl7QVSKyi5Rci/16ZqpBUnc7SECPUQgZTlAY6QMCxvv EiuopLR/2Os2/a66WyNNiIjX3E8LjM7WpCCauUF/RUL+rMesYdYmDYYpJawGaf4M8jw8Ne hhhSnU3BmsNrmHMTNuV6RW3PVN8Ti9/TiyGyftyNwUAK5KkARdo8+D99L9mcvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhd1BZKzgn5; Fri, 19 Jul 2024 17:07:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7jKM027973; Fri, 19 Jul 2024 17:07:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7jMU027970; Fri, 19 Jul 2024 17:07:45 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:45 GMT Message-Id: <202407191707.46JH7jMU027970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8aadd10a65b1 - main - lib80211: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8aadd10a65b11f18950118a10569233e1420ab45 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8aadd10a65b11f18950118a10569233e1420ab45 commit 8aadd10a65b11f18950118a10569233e1420ab45 Author: John Baldwin AuthorDate: 2024-07-19 17:03:19 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:16 +0000 lib80211: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46008 --- lib/lib80211/lib80211_regdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index 189d4661c78b..db353a69f4d9 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -441,7 +441,7 @@ lib80211_regdomain_readconfig(struct regdata *rdp, const void *p, size_t len) XML_ParserFree(mt->parser); /* setup the identifer table */ - rdp->ident = calloc(sizeof(struct ident), mt->nident + 1); + rdp->ident = calloc(mt->nident + 1, sizeof(struct ident)); if (rdp->ident == NULL) return ENOMEM; free(mt); From nobody Fri Jul 19 17:07:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhf3llrz5Ryrh; Fri, 19 Jul 2024 17:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhf2Hcgz59D2; Fri, 19 Jul 2024 17:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ShRZt0ik8woeQlGTGpr8VFKgffgYK+hYm3Ir44/KjFQ=; b=UoY3l+X/LQoaK0u1LNmSMajixM5XmHjF/9MTX/vk8tpdD4Lft6BBic/cSrD6INbzeYCij3 6K59pCb3fGplh32ipy2pMHaGTIS/xIYXr/6a9Zaix3wqdawOFX1V4ddb7lyMYgC8nhb5M1 FN8Rv6KeV0AvsMFWKut/EX8mT6otSgWme0rHQggm2hFH8arkbWiA90RTltWV4qr1oG0ifT jdMn0v5ujd/H0zmMP1fhcjviy15RVFYnbaaUGGntYPMBoadmYtUW/GfkzF8gE0CklfC6N2 M/LSa9QSdY8rHagJzyynTL5jT9Ei6eCXJH+jrkL+l9QQrxbWQ503BhWi7g7Img== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408866; a=rsa-sha256; cv=none; b=vcLPycj+rTmBXKzKZTBGcaShTc7embdRw+nAmIO1p6G7wgKiZW3t2ufXQT4E1GOsS9ldsP Efav2oBLirVHO/qW/yvnzofZ8NcU4ZN5ljmQIPwXvatGnRXmfTnlsh39yhB4381+tqdQ6d HUwqjNf89Lcu61zmf9wqayUdIWMO2453fBOgWPODFmPV5PgfC0Pf+f5GbKCNRBM6uwSYEI DskScAqMZTD9CfvFfZM/0lSHzjzHGIWrv0tLsARqVdkM5d0UrMVSfyRwR1kG8KFtMiA8Fm Hsw6p+EN6odu78hDG0WQ2UKgYqqzk118Gw+MbNaxxKzubEt6EeaFnYddjbe5Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ShRZt0ik8woeQlGTGpr8VFKgffgYK+hYm3Ir44/KjFQ=; b=ZPase6OsFUQsR00+50ZvcWyKehXk1cq0L9fU92ggv388e66V9BA2fYV67oZAkQZRUGq61G TuJxsP1tzWrNHaIkEm75YoGMtr23aQgcTD4spY7SUM2eFfvU36z34UBNhSBBefJ9Ve7JeX b4S4z73XzwkPOkqqahjnz4aYybGg6S/t3b+/rf0ph1Ky/lYfQosSH87j5uzLBNRMaoD4oR 3+MI5iSE2s/MMLDf+qGX9l4mae527478VmZjMwZiQDhTU8GlGq+sCE3KRhBh7GmoggTQMB nn1Lcg0iYQbQNcrjzEjGQ4U6KDxQJrLx3UlRTSlPlKybqtrhvc86fonu4gOQHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhf1vZrzgvg; Fri, 19 Jul 2024 17:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7k58028033; Fri, 19 Jul 2024 17:07:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7k8x028030; Fri, 19 Jul 2024 17:07:46 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:46 GMT Message-Id: <202407191707.46JH7k8x028030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e8e2ab3c5522 - main - md5: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8e2ab3c55228d66388a0b33de8c5ac4b3d6dbe9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e8e2ab3c55228d66388a0b33de8c5ac4b3d6dbe9 commit e8e2ab3c55228d66388a0b33de8c5ac4b3d6dbe9 Author: John Baldwin AuthorDate: 2024-07-19 17:04:27 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:20 +0000 md5: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D46009 --- sbin/md5/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 70fc7cb7eef1..10ffae53c775 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -592,7 +592,7 @@ main(int argc, char *argv[]) while (argc--) gnu_check(*argv++); argc = 0; - argv = calloc(sizeof(char *), numrecs + 1); + argv = calloc(numrecs + 1, sizeof(char *)); for (rec = head; rec != NULL; rec = rec->next) { argv[argc] = rec->filename; argc++; From nobody Fri Jul 19 17:07:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhg5Tr9z5RykZ; Fri, 19 Jul 2024 17:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhg3kL4z59DL; Fri, 19 Jul 2024 17:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uJbYlUfxVE7+PnAWKe+or8XAJYwPzXQr3EkvQYNDcHw=; b=RHIeuWeW0bE7vReNgiNMum5xme0Xe0quwHbXnsvEwG2RmISg6MygZ3mi0dTBJz/BgdwgXM 5Zb3QKV8BiIGOKNxp7xaVqFxtMtH9fyR1wUBPyrQhfKf7bk4Ta8RP5Cgc7UQA9CTmZEVTM JxIeO4nybU4JaR7ghwIZzm1sTdSU4mxol9Gb2iqSuamJV5KoT3AnmG7pByOPDtNoFZTRcZ PbrQoLC/m1pv1xGxyG/+O73mo+ViFo+kPZjp2nK25sMLVwat5Iua1j/vN3Yp7Nks0jCR1B kZq8pDQYNVOaG8hNxpDsnLBRu80W//i2PVYHvvbTIaPg5G6DPIzE3nocFxa8aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408867; a=rsa-sha256; cv=none; b=FKH8Cfa0X9mkh4yYaok8kJ0/X7lgYTbwiTtihZgSafciV2wJxwSP1L4W7GsWdQA+TIx77T ykx+65JqMOenq3J0IAEI88ZJwv1iB9A2fAv/kRmx+xs1ec/IbieZO8GyKhlRXlHhAyzj2E 0AbZGRpiHYdvTHvDaUcjJB2Ut9XAEtudqKVQ62CmnFBaUJ1gw8SlHrA+t7sy10wK4a+w/7 eFkE6czhp3/fgxvFc/gPjkKrJyO3xUbhXCQGXHd+rQ6tGLtCajcWcOUSohMi/WETW6BFoY TI0LSAKAUekvtufxtonz7gZdJVMGl6LHKOIT5uFhmOGhuKGDndUsKBxcMCx0wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uJbYlUfxVE7+PnAWKe+or8XAJYwPzXQr3EkvQYNDcHw=; b=Kjw7oucI0LWoZC9nXDBsY8Aa/KYUGrOdeAscyLfa536M/o05Q+LPY1V9f5X1nqMjKiGbKW MQUj73KT7tUo0SBejRayjBbUokGPAv3suO/DRK5SGXZCYHg3mWkiKOJFE9pbaAlI8gDBhe FRtX0NIACeZO4fBqcQTPtCAVzP7Rt4wwFHvmgjg5fc2lrYGQOP6cVVUbP1Ns1usXZIBUF/ dBX83RmYQKP/6ROla64pi5QEQk8a3dS3o76mnHkqRaK8y4X7p+NV9ZKWmIhR8G541FNtls 4m+GNWj3fVeQclu8ki3+bcujO2y9oyDarjCToI7TnjW16053AXoEEp6nNA8JHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhg3KXJzgqX; Fri, 19 Jul 2024 17:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7lHt028093; Fri, 19 Jul 2024 17:07:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7lRr028090; Fri, 19 Jul 2024 17:07:47 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:47 GMT Message-Id: <202407191707.46JH7lRr028090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6991cb36f52a - main - recoverdisk: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6991cb36f52a35043132f349a60748eeb382ff32 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6991cb36f52a35043132f349a60748eeb382ff32 commit 6991cb36f52a35043132f349a60748eeb382ff32 Author: John Baldwin AuthorDate: 2024-07-19 17:04:50 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:25 +0000 recoverdisk: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46010 --- sbin/recoverdisk/recoverdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 43b62fc142f3..91f42c904c52 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -82,7 +82,7 @@ report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) pp = TAILQ_FIRST(ph); if (pp == NULL || pp->t1 < now) { - pp = calloc(sizeof *pp, 1L); + pp = calloc(1, sizeof(*pp)); assert(pp != NULL); pp->t0 = (now / dt) * dt; pp->t1 = (now / dt + 1) * dt; From nobody Fri Jul 19 17:07:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhj0QwHz5Ryn4; Fri, 19 Jul 2024 17:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhh4cQSz59MX; Fri, 19 Jul 2024 17:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v2UueTr1E0giCVeApgxMPYcRE3NYTuNu0Siv6Qq3SZU=; b=X6gpWjruNJ/1hlDcOA0eGvjZWhc7dGYHdDOm/0koIENEtfg2tkusrWGWOl3P6X/ctEKsSh 6To87oyH3jX/05rJsMFTta0P4DNrgtKQwFUu3rixyq/kHZmPV+S9YkE08m8v9VjLSfvriF Zr5IkxVTAwSv8SWQUOk6f4OWn09UMjCFjD8Qi7dbEkI4YObYHO3HZQSD4Hm8m/Oi5LDvSI gIWCJ7PUjyL1Z1PreT/LUxw7EICkLBbp86q9GBurJVpO7ajXqrQEhH5WWuorl7ablD8hU5 BbruLFU5EtnHUTr649IDnIDJnC9Y1lHm7Nl8VK5eQWJ1qQvIaXF5SZV2T2BnNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408868; a=rsa-sha256; cv=none; b=ghWis5nMK/kHvVYREv/GUbIZ9eK7Iwp7npStAOJ8hYELtuqGGUMR+udAo5L77Qol5t8iKC U5jCoXch1Ox0CR8axbP1up1iksuKQUyEqgQtBR+lb/W8qOXm+1q6jYtsLBErxEXFhlrE51 yfA8ZO4GFqSJ6n0j5E7lQIJoxmtpSZcdWyEFxa8aAhgoBkhqe7Zk6g5TZ/ojEvrlRrl0Wp 81X80RoAQQ384Z95DRDqbV3xinzYFgwHG0s4csARJNErQk4YnkDfWtas0yzC4mvuj0uOGH JS19UFXclwA1vQQ8kFXlPucxg2v9HSV3Jz6t1zWHOscGoioo1iaGjt1WZl1WNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v2UueTr1E0giCVeApgxMPYcRE3NYTuNu0Siv6Qq3SZU=; b=ufDXFjB5w0U9OXwlmTgE5K6kv535lD2ybrFbZzYzJr77zmPDhaVFJ1oizHQwEnYSAfJWT7 1+e1AR0bIY59a70VETVKdj8OTb5DsFrca28tF5n358tDkZAQwE1AChBN2WLU8AqAMEbYcI I2ZRnklBKhQzfFv2e8W1ljW7gcQ4th74JCDZLB0DkoC+4J0Gty6aNiJr/CVqWPXWR+XQmr hhm5UAKafP9Wdw4dCkqFoE8Q/BMpffAB+D5fg/d6jDWLAyRnYAV/OAaJiz/txncui3Phxe yfGyJbppFF19XycHTy60CWe+nmwvtVo5SsAu+SNRB5GIiCLYv6r2imMIEgGdAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhh4CY7zgn6; Fri, 19 Jul 2024 17:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7mgk028153; Fri, 19 Jul 2024 17:07:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7mVw028150; Fri, 19 Jul 2024 17:07:48 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:48 GMT Message-Id: <202407191707.46JH7mVw028150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a971c6045622 - main - ministat: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a971c60456223b22c0b3c557d712b36660dbcff9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a971c60456223b22c0b3c557d712b36660dbcff9 commit a971c60456223b22c0b3c557d712b36660dbcff9 Author: John Baldwin AuthorDate: 2024-07-19 17:05:12 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:38 +0000 ministat: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46011 --- usr.bin/ministat/ministat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c index 6508ce3f2533..6967841a339f 100644 --- a/usr.bin/ministat/ministat.c +++ b/usr.bin/ministat/ministat.c @@ -152,7 +152,7 @@ NewSet(void) ds = calloc(1, sizeof *ds); assert(ds != NULL); ds->lpoints = 100000; - ds->points = calloc(sizeof *ds->points, ds->lpoints); + ds->points = calloc(ds->lpoints, sizeof(*ds->points)); assert(ds->points != NULL); ds->syy = NAN; return(ds); @@ -166,7 +166,7 @@ AddPoint(struct dataset *ds, double a) if (ds->n >= ds->lpoints) { dp = ds->points; ds->lpoints *= 4; - ds->points = calloc(sizeof *ds->points, ds->lpoints); + ds->points = calloc(ds->lpoints, sizeof(*ds->points)); assert(ds->points != NULL); memcpy(ds->points, dp, sizeof *dp * ds->n); free(dp); @@ -355,7 +355,7 @@ PlotSet(struct dataset *ds, int val) bar = 0; if (pl->bar == NULL) { - pl->bar = calloc(sizeof(char *), pl->num_datasets); + pl->bar = calloc(pl->num_datasets, sizeof(char *)); assert(pl->bar != NULL); } From nobody Fri Jul 19 17:07:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhk1HHnz5RyqG; Fri, 19 Jul 2024 17:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhj5qNRz598G; Fri, 19 Jul 2024 17:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wsbnhbWpgCJHFovdhBaFDXV9O+C7tGu41biufNEaTus=; b=NL4TifQ+xWbfem6CKYS6sovZGSH8E3y8RkE65CtqGo+Fw9EIxJNzZkeKXraivasraic1LS mPpGaJj7riFq8Zr2ML0R3Z5GzQxNcSHTrq84wAyQmX9IfJvjjxyl6Jd2K0holNhwdY9UiF /kv/rm3DCYUHxc86RhC86voCQ+sI/+ivswRupboyvtCVwEBOdnMyzjYtXzmvuCxjnreW3O Loupe7NnxqWHPfwBrpPHGeYHU7ERiKRy1KdTrAyvdI/SAu2PtxHSNdqUfWipvJZ+PIunJW FIbhpsm1QdU/rI8dPtrinsartIhAR2S36sMJo/LP5nB75H4V6kQvrQWxXqlYsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408869; a=rsa-sha256; cv=none; b=lNBqLQqbpVjFJgvnU6dYhcFAbrQZ7mKb0qYkkwjtheUsal31t7fbVnOmlFRWROX9PYH+MZ z1ZAik/f5vxbUkx+BALhrC3lD91wuaeHQnmTLjygPI4crDw3hKMtfqGQYVhtRJa+ouxJje sf5CSW1rnylNf8TCHyGKXyONeysnIgW4SVncOHLfShIgJ302MWPARHhX+C12Bjfvi0+bHf hstAkj0/clVL/CSq5d861SGMzAw3eoaDYSw+ASiHFfHJr/LQ8QWlaFpxjXas5QkY1iem85 eZmdLWGCZid2gVaXrukZ3fh1Y1SIjIzKFvzJO9ix5ZLQL0DF12Z+KP87nnXG8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wsbnhbWpgCJHFovdhBaFDXV9O+C7tGu41biufNEaTus=; b=H9PkQxvXy4nxq0/2++qla68/kqWpj+FYQD6UCckGQuirJgdFXXCHh8YbZu8iM9Urx3grs/ dNi5jo7H8NXx+/Sea8z6oq3tVfFI8g59iWp8dMY/L1Ba+NavwseuEhxWnO9OZ/tNybvReZ JZpYjfatX6ioiTRyjC9lUck9RtVqu632wqNrFWLRJNVL58w5+HS4Uc7nUMaZmgqjv7Qtbj OmE9YETAnkH/CsaFD+c8mSzT677rhWplCdwGeWefUuwMp7NwXBmjRzULK2QIMUxHxmLDCY LG26xiEfqgXoqpxUMh88C4gQf1316SBAeWvHkZYT2AMVOYIX1yaAqCAnK5BN8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhj5Ql0zgvh; Fri, 19 Jul 2024 17:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7n0Z028213; Fri, 19 Jul 2024 17:07:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7nXJ028210; Fri, 19 Jul 2024 17:07:49 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:49 GMT Message-Id: <202407191707.46JH7nXJ028210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7cd0a4c85dbe - main - bsdinstall: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb commit 7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb Author: John Baldwin AuthorDate: 2024-07-19 17:07:00 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:07:00 +0000 bsdinstall: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46012 --- usr.sbin/bsdinstall/distfetch/distfetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index c431e187799d..ddb8a8361d6b 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -130,8 +130,8 @@ fetch_files(int nfiles, char **urls) struct bsddialog_conf mgconf; /* Make the transfer list for mixedgauge */ - minilabel = calloc(sizeof(char *), nfiles); - miniperc = calloc(sizeof(int), nfiles); + minilabel = calloc(nfiles, sizeof(char *)); + miniperc = calloc(nfiles, sizeof(int)); if (minilabel == NULL || miniperc == NULL) errx(EXIT_FAILURE, "Error: distfetch minibars out of memory!"); From nobody Fri Jul 19 17:07:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbhl2V3Pz5Ryrw; Fri, 19 Jul 2024 17:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhk75NZz59SX; Fri, 19 Jul 2024 17:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HwhiuRXn/p7D0jtXBMQPTWmwgpUdkLBWIZlINtIIcWs=; b=I1n01KZvulgHMFl939UyhloU9QTlb+cIPMZmZWJor5TT+bydKcvXysVpPDbEaJ3qvKO8mv VuvOApaD2/tGpGnSJtZ6JFzycCmWW85PEkx3kDZoZS12cN7oyfAO8FvqUWiM2waZVbh4Fl 3LBN70xJwrSWGNRHJLL7xBiyOFWvA0gSLEvJbvPIPUBELQKjZlEY8Q5zhTdkTwdlyONaX5 gRTsGRLRfovkHDQixb4pnCsLng7GNM1rWx3hE5nmhWl5xmT6FEvV9c39TJDQi7yS6uw6Xb 6pkbhIVu6b+X6FwsO4SOKqQoCAJTffuB9V9tntFYn/cX/6EefiY0SM8FUHPjfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408871; a=rsa-sha256; cv=none; b=jNqCdIVOU10H7ITnteeXz2BzW8Vh+1hhMlYRvmXe9zJCYErC4JVwo9jUTHCdrM07xYwMpB UtNVS4siPUkEbkIM4aZm842/eODmMVugSRd5GEsQ88cruZWjYWKsC3QzYWAQeRKxi8JHSp 1Iq48s85zxIAKGBP8A8+XpfvosY8CsL/o57Ikde9Tj7EISNvmESfVi7jHJqCG7yWKik6ra PBAnaT1LcHa7HnwDOHfx/lz77b8dAgZ2wsC5lAjrkFlLxopujVsCdpHW46TOcRuEQ8V/mT Sjh+H88mY3thkGQr9mOcsDagC8ceEk1yxToh55odQ0mlXaNwsPDJ/1TNCJxIig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HwhiuRXn/p7D0jtXBMQPTWmwgpUdkLBWIZlINtIIcWs=; b=RdAjzBJoFuoPYVputxXx4Y1OShXY6Z7io/lWHOYT7Xt9aIRHtOH9lrUeFCSmLgXDROpNu4 w8IgzToYWwBph3SUJOg5h1oSCDMNVEcgeUGah9SezSUVYAlXFjg6xXjjFqoiWnvktxqvB8 DwtwXIt1Xy5Z+xOy7v4perbY2zPT50Xl6LNuNLTaRQ4oupL2mkJVc4VrqnZZVPe/mXDbnc PvXorArUM7F7+JBNCFNxeR/CPCNiRdh/s2oSRnKTBEegm1phvBxxVmURBKTZuWYFftlbGV haBvm1QDR14I8ULaHEBGl0MyZ8NSNFAwJhCyFxiAFFVZXdU2KNRaP1y1zCW++A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbhk6gpgzgn7; Fri, 19 Jul 2024 17:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JH7o0N028282; Fri, 19 Jul 2024 17:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7o40028279; Fri, 19 Jul 2024 17:07:50 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:50 GMT Message-Id: <202407191707.46JH7o40028279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 2ba12978f674 - main - ctld: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ba12978f67432a3f88b17704391d28e1fc0e788 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2ba12978f67432a3f88b17704391d28e1fc0e788 commit 2ba12978f67432a3f88b17704391d28e1fc0e788 Author: John Baldwin AuthorDate: 2024-07-19 17:07:22 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:07:22 +0000 ctld: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46013 --- usr.sbin/ctld/isns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ctld/isns.c b/usr.sbin/ctld/isns.c index 71150a8ae06f..0b836324ff47 100644 --- a/usr.sbin/ctld/isns.c +++ b/usr.sbin/ctld/isns.c @@ -48,14 +48,14 @@ isns_req_alloc(void) { struct isns_req *req; - req = calloc(sizeof(struct isns_req), 1); + req = calloc(1, sizeof(struct isns_req)); if (req == NULL) { log_err(1, "calloc"); return (NULL); } req->ir_buflen = sizeof(struct isns_hdr); req->ir_usedlen = 0; - req->ir_buf = calloc(req->ir_buflen, 1); + req->ir_buf = calloc(1, req->ir_buflen); if (req->ir_buf == NULL) { free(req); log_err(1, "calloc"); From nobody Fri Jul 19 17:11:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQbmz5hNhz5S0FK; Fri, 19 Jul 2024 17:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbmz2g8hz41DT; Fri, 19 Jul 2024 17:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721409091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wrtskWlyJqKDND24k80gcLmRnKNAcjDVbtU3J6y86B4=; b=UAEKoFjfZtAUrQCLfESMIxY014tbKZD+DDjuepCTR1exAsf46AwdldF8eCTamgCIWOmQ0o h8e2qSn3fTKbYnCY7fycnMjS754Phah+G8oMrA5av97UpfMzBKjdBTi3rm2qjfBjkaWU1W yAkBVEUObjTCT2lTsqnewxn7gM7hKt0b/BCNkLUA8ifqujxbXd8epHWMweSVmsAnYQ9fJf TH9Av1eKGJDYS0B8ELiRKY6pQLEkYwlsZ6RrDuuoeEBj84+qR1ibMQVL0cjbh0hrUV/hba sa+3HiLkKXPKDaf+dQkhxwiWk77xJB5ySNoUQcC85RVKDByPM41hl8JhZqABSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721409091; a=rsa-sha256; cv=none; b=bxvYDUbPC/DDf8zi3T76c/oj3vaoNE1MgnWo9THJy39daw5PW/3ChAjQS8zpQIljtBjBV0 ah3rG/KsBml2DGHnyWxIckUDyYyWiF2BEabTLbzzynHnAXp1MBSatbYrsgJhVtmWpd5J7O yAsDVX0Jq1OWqvuSeiDZpmPLCM0tAFUWN98DRx50G9Y/j18dJ4W4qjX8G+BD4qgiW/dUCR SPgNWeW8FCWbCSkIt6GbyZJfPAKgVrnFWkUZw1f2oeQcl/7NlJHcldUIuhU6aAzFSZUiS1 +AW2dkz0d7fIDU22x226yr/eE7y1AXOoPOPkEJEDWwelpkOCJAuqDNaLqFSMAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721409091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wrtskWlyJqKDND24k80gcLmRnKNAcjDVbtU3J6y86B4=; b=CD6ei0eABGJgcQnP1Lei4uaJWRZlFZVSeMAKdfw6sM6OwNlWnMuqb7kJbRO4YZnbAFaNT2 ocxIa/qRngwKTmF3XBKLO874dsxjH+9+mJbuoralSn4xdAp3fw6OnVCynrbAYbSnNaYbO2 ws656FhoxbkNEpjhEaXot6oDWL8TNBmTPSwXfr280ke9Ww2PZPw9aXUXNiRLso4/p3a/jn IU7OTN8pWPKfiNz97L1b3uVP1qAe/pjDapiD6COssmPoB9LubCEmfcRVIaBBc1bH/VZGoZ B1bXaXmzONwbqchMWQA7aD4QvRM+ah55zf+zOnLGnbfXFyEVs+KzJzBdJeSpyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQbmz1yZ8zgqt; Fri, 19 Jul 2024 17:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JHBVTe044159; Fri, 19 Jul 2024 17:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JHBVdq044156; Fri, 19 Jul 2024 17:11:31 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:11:31 GMT Message-Id: <202407191711.46JHBVdq044156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9494dfe1b3fa - main - fwcontrol: Allocate full fw_asyreq structures passed to the kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9494dfe1b3faf5c48abaa9be4ec87e4669963942 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9494dfe1b3faf5c48abaa9be4ec87e4669963942 commit 9494dfe1b3faf5c48abaa9be4ec87e4669963942 Author: John Baldwin AuthorDate: 2024-07-19 17:08:14 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:09:32 +0000 fwcontrol: Allocate full fw_asyreq structures passed to the kernel The FW_ASYREQ ioctl accepts a struct fw_asyreq object as its argument, meaning that the kernel always copies in the full structure in sys_ioctl before passing the request down to the driver. However, fwcontrol was allocating smaller objects that contained only the request header and a variable-sized payload. This means that the kernel copy in sys_ioctl was reading off the end of this buffer. On current architectures this happened to be ok, but it is UB. Instead, allocate a full structure. Reported by: GCC 14 -Walloc-size Reviewed by: rlibby, brooks Differential Revision: https://reviews.freebsd.org/D46014 --- usr.sbin/fwcontrol/fwcontrol.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c index 94478259606d..ce908341a42a 100644 --- a/usr.sbin/fwcontrol/fwcontrol.c +++ b/usr.sbin/fwcontrol/fwcontrol.c @@ -207,7 +207,7 @@ read_write_quad(int fd, struct fw_eui64 eui, u_int32_t addr_lo, int readmode, u_ struct fw_asyreq *asyreq; u_int32_t *qld, res; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 16; @@ -262,7 +262,7 @@ send_phy_config(int fd, int root_node, int gap_count) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 12; @@ -289,7 +289,7 @@ link_on(int fd, int node) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 12; @@ -308,7 +308,7 @@ reset_start(int fd, int node) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 16; From nobody Fri Jul 19 18:25:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQdQJ6lcqz5S4xb; Fri, 19 Jul 2024 18:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQdQJ6DtPz46XB; Fri, 19 Jul 2024 18:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721413528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R8bAgGEwTZdNAcsh6CPjQKkbL+kIF35+mmbOm9Nu2VI=; b=lwzyW5hOSdJ10zUL+r6d3MVTkYcIdooRObKJug93J/0jPbvhxxmmf0/7MRRrkvllcE6kn6 bVzrQTzjAGFB5t1+EYoJ7zXL12Adq3wjntQ8TuQX+/RoEFXoHclPoxh6CJBaDi2yJZH+rc TLqYTxks/bdRRInLCiLenbpeQDZYzc3Lp0jbwtfKUMMULrZqm9C4AWVk/AXTaVCGodJAIt /hQ6+jRv9j5+0l5UB7H1b1n0KkkapZ1OHwRZ6CpR1O8AK1DLRkTT52XLLBNN/RaLZstHn0 xXPKySvAt1x3DI9w6pwru/RHnWhlWV14qWWVTYpiWrwp80y0Ii2ai7lODvT/Lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721413528; a=rsa-sha256; cv=none; b=PXejRf3FUqRaT4OTqnan056jwRjd+ajr1L4zy2fMgL7hNBIG3FuxxblbdaA0fgJrpTd8rn 47TScT7iIe3DePF4YodD9kBXzEhfogCD8+LnoSkWue6TJpaUMqCRFEpsJyP7/CrE1gKVRD eV8trHA+VKjr5v4Q/bstcJkCHe74TC35TjgA8Q7swyEo4+aAIGB27yvhW0aXLfDBWmFxz6 60374v9ZB/4K633ool7j1BP2sKvY9awtP2ijPka/Ksf7fWNTzdOSxrvIArDWisb/cPUbVf ET3rUrB50b6fOAcGYu+lEQQQL6seff+aKR52pZD6iwNnDRmcPLjGGnvvENBpoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721413528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R8bAgGEwTZdNAcsh6CPjQKkbL+kIF35+mmbOm9Nu2VI=; b=aeHvVcVgDFbA2G8/riOcnK8ujbH+6IK4jpcODUArea2JYhUXnCAbNF4BGomiNmqRhXmFQe xgKLfqIqPqOaYc7txVBvSufFoKXHtaXPlpsB7NiErJYQemO5j/tJEuQBal4he5PxqOY9uv cAGQVwryTY1xToSjqSmHUSwakfeOW0rpnUG+G22s/Dv+MNeKmTadE20eOEjpP/GgzaYkFd 9IkbRHY/f3mDGaf7pzPoM8iNvEXTO7psoh+gbdEX1pmwgmm92T4pZf3IMX5ekCWHY4gdT0 stAXSvh+i5hGMSKJVP7sHws/kDfu82H0BHStye7o8WoSksrMgat2gYU/5jiF6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQdQJ5jn6zk2j; Fri, 19 Jul 2024 18:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JIPSUV063154; Fri, 19 Jul 2024 18:25:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JIPS14063151; Fri, 19 Jul 2024 18:25:28 GMT (envelope-from git) Date: Fri, 19 Jul 2024 18:25:28 GMT Message-Id: <202407191825.46JIPS14063151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 66f360515d28 - main - rc.conf: Leap-seconds sources: Add IANA back List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66f360515d2829d261c0ad7bd516e9dd18c2dd83 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=66f360515d2829d261c0ad7bd516e9dd18c2dd83 commit 66f360515d2829d261c0ad7bd516e9dd18c2dd83 Author: Cy Schubert AuthorDate: 2024-07-19 18:04:43 +0000 Commit: Cy Schubert CommitDate: 2024-07-19 18:24:31 +0000 rc.conf: Leap-seconds sources: Add IANA back 11da791920ba switched Leap-seconds source from IANA to IERS, as IERS is the canonoical source. The problem ist that IERS is not accessible from IPv6 only networks. To work around this we must add IANA back in order to provide IPv6-only users a source for leap-seconds fetch. PR: 279413 Fixes: 11da791920ba MFC after: 3 days --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 1ee1573bbdba..583d4fd2970e 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -420,7 +420,7 @@ ntp_src_leapfile="/etc/ntp/leap-seconds" # Initial source for ntpd leapfile ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" # Canonical place to get the leap seconds from -ntp_leapfile_sources="https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list" +ntp_leapfile_sources="https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list https://data.iana.org/time-zones/tzdb/leap-seconds.list" # Source from which to fetch leapfile ntp_leapfile_fetch_opts="-mq" # Options to use for ntp leapfile fetch, # e.g. --no-verify-peer From nobody Fri Jul 19 19:23:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQfj06CS6z5QCCy; Fri, 19 Jul 2024 19:23:16 +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 4WQfj00dhcz4GM3; Fri, 19 Jul 2024 19:23:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 46JJN3Ow016473; Fri, 19 Jul 2024 22:23:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 46JJN3Ow016473 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 46JJN2R2016472; Fri, 19 Jul 2024 22:23:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Jul 2024 22:23:02 +0300 From: Konstantin Belousov To: Kristof Provost Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ef2a572bf6bd - main - ipsec_offload: kernel infrastructure Message-ID: References: <202407121125.46CBP8eo093121@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4WQfj00dhcz4GM3 On Fri, Jul 19, 2024 at 04:26:43PM +0200, Kristof Provost wrote: > On 12 Jul 2024, at 13:25, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=ef2a572bf6bdcac97ef29ce631d2f50f938e1ec8 > > > > commit ef2a572bf6bdcac97ef29ce631d2f50f938e1ec8 > > Author: Konstantin Belousov > > AuthorDate: 2021-08-22 19:38:04 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2024-07-12 04:27:58 +0000 > > > > ipsec_offload: kernel infrastructure > > > > Inline IPSEC offload moves almost whole IPSEC processing from the > > CPU/MCU and possibly crypto accelerator, to the network card. > > > > The transmitted packet content is not touched by CPU during TX > > operations, kernel only does the required policy and security > > association lookups to find out that given flow is offloaded, and > > then > > packet is transmitted as plain text to the card. For driver > > convenience, > > a metadata is attached to the packet identifying SA which must > > process > > the packet. Card does encryption of the payload, padding, calculates > > authentication, and does the reformat according to the policy. > > > > Similarly, on receive, card does the decapsulation, decryption, and > > authentification. Kernel receives the identifier of SA that was > > used to process the packet, together with the plain-text packet. > > > > Overall, payload octets are only read or written by card DMA engine, > > removing a lot of memory subsystem overhead, and saving CPU time > > because > > IPSEC algos calculations are avoided. > > > > If driver declares support for inline IPSEC offload (with the > > IFCAP2_IPSEC_OFFLOAD capability set and registering method table > > struct > > if_ipsec_accel_methods), kernel offers the SPD and SAD to driver. > > Driver decides which policies and SAs can be offloaded based on > > hardware capacity, and acks/nacks each SA for given interface to > > kernel. Kernel needs to keep this information to make a decision to > > skip software processing on TX, and to assume processing already > > done > > on RX. This shadow SPD/SAD database of offloads is rooted from > > policies (struct secpolicy accel_ifps, struct ifp_handle_sp) and SAs > > (struct secasvar accel_ipfs, struct ifp_handle_sav). > > > > Some extensions to the PF_KEY socket allow to limit interfaces for > > which given SP/SA could be offloaded (proposed for offload). Also, > > additional statistics extensions allow to observe > > allocation/octet/use > > counters for specific SA. > > > > Since SPs and SAs are typically instantiated in non-sleepable > > context, > > while offloading them into card is expected to require costly async > > manipulations of the card state, calls to the driver for offload and > > termination are executed in the threaded taskqueue. It also solves > > the issue of allocating resources needed for the offload database. > > Neither ipf_handle_sp nor ipf_handle_sav do not add reference to the > > owning SP/SA, the offload must be terminated before last reference > > is > > dropped. ipsec_accel only adds transient references to ensure safe > > pointer ownership by taskqueue. > > > > Maintaining the SA counters for hardware-accelerated packets is the > > duty of the driver. The helper ipsec_accel_drv_sa_lifetime_update() > > is provided to hide accel infrastructure from drivers which would > > use > > expected callout to query hardware periodically for updates. > > > > Reviewed by: rscheff (transport, stack integration), np > > Sponsored by: NVIDIA networking > > Differential revision: https://reviews.freebsd.org/D44219 > > --- > > sys/conf/files | 2 + > > sys/conf/options | 1 + > > sys/modules/ipsec/Makefile | 5 +- > > sys/netipsec/ipsec.c | 17 + > > sys/netipsec/ipsec.h | 11 + > > sys/netipsec/ipsec_input.c | 11 + > > sys/netipsec/ipsec_offload.c | 1061 > > ++++++++++++++++++++++++++++++++++++++++++ > > sys/netipsec/ipsec_offload.h | 191 ++++++++ > > sys/netipsec/ipsec_output.c | 15 + > > sys/netipsec/ipsec_pcb.c | 38 +- > > sys/netipsec/key.c | 270 ++++++++++- > > sys/netipsec/key.h | 6 + > > sys/netipsec/key_debug.c | 5 + > > sys/netipsec/keydb.h | 14 + > > 14 files changed, 1628 insertions(+), 19 deletions(-) > > > I’m seeing messages like `ipsec_accel_sa_install_newkey: spi 0x1001 flags > 0x40 seq 0` running the test suite now. > Are those stray debug printfs? Not stray, but also they should not be there by default indeed. https://reviews.freebsd.org/D46045 From nobody Fri Jul 19 19:31:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQfv92ljGz5QClp for ; Fri, 19 Jul 2024 19:32:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQfv90rYCz4HBH for ; Fri, 19 Jul 2024 19:32:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2c7fa0c9a8cso1223126a91.1 for ; Fri, 19 Jul 2024 12:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1721417524; x=1722022324; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Mxf0zR/wNtg0SCPP5PJMEvxqy/dFOVQdJqMvlWz34is=; b=cFJGDFa3g29nWFmvNb8aIqsrlE4fqG8b7URTgdIxHoRO6JzHwbYkxWORuajb2SrNvf l5Vqf0OBzeyW8aeMk26FBxnYnQNaK876J+tWEB1dvjSoRpUwZQlUS8MGDF6l/pmqv/t0 vbduQPawJTflvAqRkXoEQAbY2dPbqZ125pjQ2Au8MgcElpx/V1RFUyIKG1Pa+teVW2N+ r/u2z0veUaDIvJSWUiGeVneJqxzJvwtWWV6Q/FzYxheTvWGIJQDpwJDQaXEoDpUy6Zt2 XZqnLmhF1CkZiWRaPJIONYEh8XroV+W4Vl3ZibuuHpDBxGVfw620hUaY6t1mK7CiuagC K2hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721417524; x=1722022324; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Mxf0zR/wNtg0SCPP5PJMEvxqy/dFOVQdJqMvlWz34is=; b=mvSnS+STnywrrQtcJx0zHgQHDTk2Uuu+xzKpb72tnNBFmFLxcy+FShwzWkXRbceCsH hu3X/68ZfTo0b6ZzE8dG3ZxriRfOM1HYSXyXPk86Qs2SaNWyLq1EQAlOIIsyq5KjTiZq JmlleFYg4GFcjKuH6EELKQRyH/FyK9VJl0TPbFZC7B9dn70g1OgYBEpjt00Ldrw525iO zRt53W3uqsaXjTcTRr6fSI3Kyj9rCV4WqY5OIoYWfcaw2pTfBv3mQnNENCN5Wy4oOndr wKWCyjDM2aS4WyLHW0Qe3ON5/D1KnN02vnbrcgoyvVCwBfyGJ9x83reLn0NaTBjIhmbH kHUA== X-Forwarded-Encrypted: i=1; AJvYcCXaI2Q6M4sgTRiJqHhd0aE6Uyg27q30AsnhfrcutCjYqHTK3DatNnrOqh46fuNQPxTnAykgpSpBQY9oJRJpvxf9ZEjuWfOSbrG8P+b850sF/Q== X-Gm-Message-State: AOJu0Yx9b8hEB3rxNT9dzf7DValc+k4S0WgzdBfTyucafHI8PwMkk0ND cRG8f4JkIvb7wZWAQKjYlO/ubzjtBn4sjx7CqHK1krilpj3lUjEU0hh7s34NddSneuDPZCODV2c ZOSN44+M+p/t+JtLUbcSmgDRqWptwxl+lebic/vzKojMXKLQVufU= X-Google-Smtp-Source: AGHT+IE6+3ZI3kzbqoYtlVbFpPzPCR481KhqAOJQChLyWZ+sJplqWVT7jH86tyCGCiPZ4SAgoasC84KxiL/5elYwaXI= X-Received: by 2002:a17:90b:23d2:b0:2c9:7cc8:8e33 with SMTP id 98e67ed59e1d1-2cb52691feamr7610299a91.13.1721417523621; Fri, 19 Jul 2024 12:32:03 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407191825.46JIPS14063151@gitrepo.freebsd.org> In-Reply-To: <202407191825.46JIPS14063151@gitrepo.freebsd.org> From: Warner Losh Date: Fri, 19 Jul 2024 13:31:52 -0600 Message-ID: Subject: Re: git: 66f360515d28 - main - rc.conf: Leap-seconds sources: Add IANA back To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000018cd9061d9ec017" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WQfv90rYCz4HBH --000000000000018cd9061d9ec017 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable There's risk to our IPv6 folks if we MFC this. This file is the old one still (and it took them 6 weeks to get the last one updated past its expiration date). The IERS one is up to date, expires Jun 2025. The IANA has a december expiration date finally, though we leared 3 weeks ago there's no leap in December, so that's why the IERS one was updated. So this is better than nothing, but we're setting ourselves up for a problem this December / January.... The last time this issue came up, I was kinda opposed to FreeBSD running this since IERS did. However, I either didn't know at the time, or didn't appreciate at the time the lack of IPv6 for this data source would be a problem. Since we have no other reliable source, maybe we need to stand up a FreeBSD mirror after all. So this is better than nothing, but we may need to do more. Warner On Fri, Jul 19, 2024 at 12:25=E2=80=AFPM Cy Schubert wrote= : > The branch main has been updated by cy: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D66f360515d2829d261c0ad7bd516e9d= d18c2dd83 > > commit 66f360515d2829d261c0ad7bd516e9dd18c2dd83 > Author: Cy Schubert > AuthorDate: 2024-07-19 18:04:43 +0000 > Commit: Cy Schubert > CommitDate: 2024-07-19 18:24:31 +0000 > > rc.conf: Leap-seconds sources: Add IANA back > > 11da791920ba switched Leap-seconds source from IANA to IERS, as IERS > is the canonoical source. The problem ist that IERS is not accessible > from IPv6 only networks. To work around this we must add IANA back in > order to provide IPv6-only users a source for leap-seconds fetch. > > PR: 279413 > Fixes: 11da791920ba > MFC after: 3 days > --- > libexec/rc/rc.conf | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf > index 1ee1573bbdba..583d4fd2970e 100644 > --- a/libexec/rc/rc.conf > +++ b/libexec/rc/rc.conf > @@ -420,7 +420,7 @@ ntp_src_leapfile=3D"/etc/ntp/leap-seconds" > # Initial source for ntpd leapfile > ntp_db_leapfile=3D"/var/db/ntpd.leap-seconds.list" > # Canonical place to get the leap seconds > from > -ntp_leapfile_sources=3D" > https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list" > +ntp_leapfile_sources=3D" > https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list > https://data.iana.org/time-zones/tzdb/leap-seconds.list" > # Source from which to fetch leapfile > ntp_leapfile_fetch_opts=3D"-mq" # Options to use for ntp leapfile fetch= , > # e.g. --no-verify-peer > --000000000000018cd9061d9ec017 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There's risk to our IPv6 folks=C2=A0if we MFC thi= s. This file is the old one still (and it took them 6 weeks to get the last= one updated past its expiration date).

The IERS o= ne is up to date, expires Jun 2025. The IANA has a december expiration date= finally, though we leared 3 weeks ago there's no leap in December, so = that's why the IERS one was updated.

So this i= s better than nothing, but we're setting ourselves up for a problem thi= s December / January....

The last time this issue = came up, I was kinda opposed to FreeBSD running this since IERS did. Howeve= r, I either didn't know at the time, or didn't appreciate at the ti= me the lack of IPv6 for this data source would be a problem. Since we have = no other reliable source, maybe we need to stand up a FreeBSD mirror after = all.

So this is better than nothing, but we may ne= ed to do more.

Warner

On Fri, Jul 19, 2024 at= 12:25=E2=80=AFPM Cy Schubert <cy@free= bsd.org> wrote:
The branch main has been updated by cy:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D66f360515d2829d261c0ad7bd516e9dd18c2dd83
commit 66f360515d2829d261c0ad7bd516e9dd18c2dd83
Author:=C2=A0 =C2=A0 =C2=A0Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-07-19 18:04:43 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-07-19 18:24:31 +0000

=C2=A0 =C2=A0 rc.conf: Leap-seconds sources: Add IANA back

=C2=A0 =C2=A0 11da791920ba switched Leap-seconds source from IANA to IERS, = as IERS
=C2=A0 =C2=A0 is the canonoical source. The problem ist that IERS is not ac= cessible
=C2=A0 =C2=A0 from IPv6 only networks. To work around this we must add IANA= back in
=C2=A0 =C2=A0 order to provide IPv6-only users a source for leap-seconds fe= tch.

=C2=A0 =C2=A0 PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0279413
=C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 11da791920ba
=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 3 days
---
=C2=A0libexec/rc/rc.conf | 2 +-
=C2=A01 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 1ee1573bbdba..583d4fd2970e 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -420,7 +420,7 @@ ntp_src_leapfile=3D"/etc/ntp/leap-seconds" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Initial source for ntpd leapfile =C2=A0ntp_db_leapfile=3D"/var/db/ntpd.leap-seconds.list"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Canonical place to get the leap se= conds from
-ntp_leapfile_sources=3D"https://hpi= ers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list"
+ntp_leapfile_sources=3D"https://hpi= ers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list https://data.iana.org/time-zones/tzdb/leap-seconds.list" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Source from which to fetch leapfil= e
=C2=A0ntp_leapfile_fetch_opts=3D"-mq"=C2=A0 # Options to use for = ntp leapfile fetch,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # e.g. --no-verify-peer
--000000000000018cd9061d9ec017-- From nobody Fri Jul 19 21:06:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQj0b4vPzz5QMPs; Fri, 19 Jul 2024 21:06:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQj0b441Fz4Py8; Fri, 19 Jul 2024 21:06:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721423215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VXyaHPO8PsFntp1aL3CNP/yfMyZjpo+qBSd+KcSiIO4=; b=nJNjtibvu0o/Q0eSQfOTRP5r3zaMzPvW51m41A0knr/rPSutx2Ps1nFcTHXV4UbIKF8mPq J4x0vqvfst84voimzYZGfJW+Yqklqqme/I+C6YGjMdlZtPpD8ChWzktTs1nMq4JsiUs4dX KXjlpQ7Ebfv0UDyIlxlWSj2pisbGJZKCSsXJOagcmuAbP0RRDUAn/z8yrXh68QSA2cokT0 Vw3m7LVbR1cNkZuouEY3oK2dXOkywgES0LgYRarj8OzsiBfma/QIR5oHpyp6ol4Uh4QxD2 eVf1R88Ck0aLC9wcvmPcgK90QoBUf3v2t8+UwfMRO5CJ2znznQnNPoGYTC9HaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721423215; a=rsa-sha256; cv=none; b=CqDwTnyR/RRpusXMsOzSmcE7EkSuGRLbj/6yUxUIrBkoxkIx/9g0x/iUd4Jzwku0ephIn8 uo7+B4VcpAtrYpB1dj+Il/EqwP0T82jXaXE4ia545fNWOxPnHDc6wfZVZBNIA7c+2CK9j/ 9Dz0Undszqtn+sgyp4/rvJm+iXPAp+5d59/2a07gCXqHOcKMTIj1CjFjwxmuEITBNdisLk lOmnIEgqxv9r2sv1aD3Xo1OzC3gW2/dFCVxbbTuCUVQFL7rkbNOoTSFP6D9CR6QdGrmmoC iQR1h+pT8XAt4c6MUDtxapzgJm2WUh0UkB7AlOOwrfTJpXHVi7wRcRQ6IJeleg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721423215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VXyaHPO8PsFntp1aL3CNP/yfMyZjpo+qBSd+KcSiIO4=; b=XcuTAei3mktXaGQFCEFfS3IA1UsuIzKKLJsK716h1oiq+/BnwX3GIbqaeBq0OuLONLKmC0 4Yj4o1NubCHeXWu6hN0zKOZLEZJjogbX4LTGT0yEmZ/5Bfovw2a3YMlgZEGtJkP0uOpXwQ t79cdi56QeHv9RFI0N2wSpMvMa5DYNXS+zvJ1ENcpKpBJhR/EV184L7aK2VN1eEjY39VGA 07f82oXP2a8UckSm32u4VDoapPVMzb0dY6BHK2+12I2fNton8vbHhlTjjFP7QYXDY1F1Sv EAccoJmTJXGHc6SgEyFynwDhdQKaZ0UfqPEp1qMttQXG6kYzL6WaF3/QAX1IqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQj0b3gPVzp1l; Fri, 19 Jul 2024 21:06:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JL6tqd034330; Fri, 19 Jul 2024 21:06:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JL6tOD034327; Fri, 19 Jul 2024 21:06:55 GMT (envelope-from git) Date: Fri, 19 Jul 2024 21:06:55 GMT Message-Id: <202407192106.46JL6tOD034327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e0649a35a670 - main - libnvmf: Zero controller data template for I/O controllers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0649a35a670c4b625d1de289b3886d9b3c9654f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e0649a35a670c4b625d1de289b3886d9b3c9654f commit e0649a35a670c4b625d1de289b3886d9b3c9654f Author: John Baldwin AuthorDate: 2024-07-19 21:06:47 +0000 Commit: John Baldwin CommitDate: 2024-07-19 21:06:47 +0000 libnvmf: Zero controller data template for I/O controllers This prevents stack garbage from leaking into the cdata used for the userspace I/O controller in nvmfd(8). Sponsored by: Chelsio Communications --- lib/libnvmf/nvmf_controller.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libnvmf/nvmf_controller.c b/lib/libnvmf/nvmf_controller.c index 554e5e769ded..0e0126040ee4 100644 --- a/lib/libnvmf/nvmf_controller.c +++ b/lib/libnvmf/nvmf_controller.c @@ -425,6 +425,7 @@ nvmf_init_io_controller_data(struct nvmf_qpair *qp, const char *serial, uname(&utsname); + memset(cdata, 0, sizeof(*cdata)); _nvmf_init_io_controller_data(qp->nq_cntlid, na->na_params.max_io_qsize, serial, utsname.sysname, utsname.release, subnqn, nn, ioccsz, sizeof(struct nvme_completion), cdata); From nobody Fri Jul 19 21:20:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQjHy3c2Rz5QNrC for ; Fri, 19 Jul 2024 21:20:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQjHx4JRqz4Qgb for ; Fri, 19 Jul 2024 21:20:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b="rFzSwP+/"; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::1031) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2cb674b48ccso1232947a91.2 for ; Fri, 19 Jul 2024 14:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1721424012; x=1722028812; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Z/VeZp87PqUAzCEtlovEoaD9mT3GdD5oZbMO3uWSSZ8=; b=rFzSwP+/Trqz1UCgKW4FRa+e7LdJwGD1J4Yqf1N9EOqPFP9RXJ0aVM5l69vNsDL9GX CMOpUfXgLG5eepknx6GLEVRkZaHx2btI6hKiPPs5Mmt04GLF0DWndjNYirayF8Bictdg FH9Tq1igOETw55ZM16ySXDwi8z/xCcP4903SaFe65Jv9OSU1LxcrQk8OAxPhOakj2FUp FetMYvaoX5+DtPVQk9+aqJwMLDhdHpn+qzH/jBZc8kBGy3WxXWQwVlcJV5kAdp4XP0qm n+bfSqzIVjcSVyK0RG3pnBevwWA0NmgDv/k8r/PnFSQkZZJ5VzTqPBfQVFYtmxBltFFa APcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721424012; x=1722028812; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z/VeZp87PqUAzCEtlovEoaD9mT3GdD5oZbMO3uWSSZ8=; b=DaK6MiJ7EOVR3Gv/kXhe7wt74xSbnqS/EsOearYZgfdoBDo74PQ0DbondFxmJij5iy 2NHmZ+F/0l7MoJVjLi2vktO6E/EiWEojLRYKfDtBVm6mHApk2uSQ52CgWYkhFkuw6QJ2 ezGrrFZyl29PhQ0VU6MwPo11Ghp0i+hv8RhX9ZBh/9E5LF1B+2kFT/0nONnIZGzZYOE8 gmfykxGgUzNDf4mij4AG5ZxusWYO5iawVfsbHpQbBHf4RJSEVw92xzQCD/fkJWFUt9VJ obxHn5WDJ2WLBP7upJjbirxjibFWh4EYTCTARoCH0nYzjGLkpe0fAgXyx2EV+AzQ/rFl mYcQ== X-Forwarded-Encrypted: i=1; AJvYcCUCwC2hVXuXXkYE1p5KTZT0pTv2WmNr7RdinBBKoDivibgN5rgwC6rYk2BgukQr2geUae4Tl+m/7DYQHlPyrYK7Bv3sCoElKMZLbtzBIzxi4Q== X-Gm-Message-State: AOJu0YyRaHASV0r5U+ryscQiqV5WQmVLNJQ99+s4YGGJDv0aPmgZ0/4R 0DfV2Hg3uUSIp1RzM9dD229KMKCMvFd8Np5ckawhO9cQNipX3CK8W9xYPJDGBfEVBteVgoyjOiQ mPW4/S4HM6FyqiBbezonwGvWsuTOrVEzxQrYG+g== X-Google-Smtp-Source: AGHT+IGWnFDTbGMp7AXJPEXdiXdi33FdkhRO0Uv+v48rnKVrb8HrwoH1lOHxI0qgJWJLUsHUvxcN654HTs6j7cMlP0w= X-Received: by 2002:a17:90a:fa84:b0:2c2:d813:bffa with SMTP id 98e67ed59e1d1-2cd15feb69bmr927623a91.43.1721424011554; Fri, 19 Jul 2024 14:20:11 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407061944.466JiiQ3026410@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 19 Jul 2024 15:20:00 -0600 Message-ID: Subject: Re: git: 6677621bad00 - main - cdefs.h: Fallback to printf0 for __printf0like To: John Baldwin Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b78c8a061da0426b" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.61 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.61)[-0.605]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1031:from]; DMARC_NA(0.00)[bsdimp.com]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; R_SPF_NA(0.00)[no SPF record]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4WQjHx4JRqz4Qgb --000000000000b78c8a061da0426b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 10, 2024 at 12:19=E2=80=AFPM John Baldwin wro= te: > On 7/6/24 17:56, John Baldwin wrote: > > On 7/6/24 15:44, Warner Losh wrote: > >> The branch main has been updated by imp: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3D6677621bad00191dfec1b0a20ae1618= b92745d9b > >> > >> commit 6677621bad00191dfec1b0a20ae1618b92745d9b > >> Author: Warner Losh > >> AuthorDate: 2024-07-06 19:42:37 +0000 > >> Commit: Warner Losh > >> CommitDate: 2024-07-06 19:45:03 +0000 > >> > >> cdefs.h: Fallback to printf0 for __printf0like > >> > >> For some reason, my tests were fine with this like it was, but C= I > for > >> gcc12 and gcc13 is complaining. Revert to the old form until tha= t > can be > >> worked out why the mismatch. > >> > >> Fixes: 0b82dac337e7 > >> Sponsored by: Netflix > >> --- > >> sys/sys/cdefs.h | 7 +++++-- > >> 1 file changed, 5 insertions(+), 2 deletions(-) > >> > >> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > >> index 6b861b1903f6..a56839d57c7a 100644 > >> --- a/sys/sys/cdefs.h > >> +++ b/sys/sys/cdefs.h > >> @@ -356,9 +356,12 @@ > >> * Clang has always had printf and printf0 as aliases. gcc 11.0 now > follows > >> * clang. So now this is an alias for __printflike, or nothing. In > the future > >> * _Nullable or _Nonnull will replace this. > >> + * XXX Except that doesn't work, so for now revert to printf0 for > clang and > >> + * the FreeBSD gcc until I can work this out. > >> */ > >> -#if defined(__clang__) || __GNUC_PREREQ__(11, 0) > >> -#define __printf0like(fmtarg, firstvararg) __printflike(fmtarg, > firstvararg) > >> +#if defined(__clang__) || (defined(__GNUC__) && defined > (__FreeBSD_cc_version)) > >> +#define __printf0like(fmtarg, firstvararg) \ > >> + __attribute__((__format__ (__printf0__, fmtarg, firstvararg))= ) > >> #else > >> #define __printf0like(fmtarg, firstvararg) > >> #endif > > > > It's because my patch for devel/freebsd-gcc{12,13} is kind of wrong. I > had a mismerge > > when updating the printf0 patch from gcc9 to gcc12 that ended up > re-adding the > > warn on NULL. I need to update the ports to remove that part of the > patch. I will > > probably leave printf0 working for now in the ports just as an alias fo= r > regular > > printf to give us some transition time. > > FYI, I have merged this fix to the ports, but not sure how we want to > manage doing > the patch to cdefs.h. I kind of think we should apply the change to > cdefs.h in > main in another week or so. I'm less certain of what to do for stable > branches. > I hadn't planned on merging this to stable branches. Is that your concern? Or something else? For building on the stable branch, we should be fine since we support a wider range of compilers anyway with the older cdefs.h file, and the new file will work with all supported stable branch compilers (though maybe not some of the gcc ones, I've not tested that at all). Also it's been just over a week, can I recommit this, or is more time needed? Warner --000000000000b78c8a061da0426b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jul 10, 2024 at 12:19=E2=80= =AFPM John Baldwin <jhb@freebsd.org> wrote:
On= 7/6/24 17:56, John Baldwin wrote:
> On 7/6/24 15:44, Warner Losh wrote:
>> The branch main has been updated by imp:
>>
>> URL:
http= s://cgit.FreeBSD.org/src/commit/?id=3D6677621bad00191dfec1b0a20ae1618b92745= d9b
>>
>> commit 6677621bad00191dfec1b0a20ae1618b92745d9b
>> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> AuthorDate: 2024-07-06 19:42:37 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> CommitDate: 2024-07-06 19:45:03 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0cdefs.h: Fallback to printf0 for __print= f0like
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0For some reason, my tests were fine with= this like it was, but CI for
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0gcc12 and gcc13 is complaining. Revert t= o the old form until that can be
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0worked out why the mismatch.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Fixes: 0b82dac337e7
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0Netflix
>> ---
>>=C2=A0 =C2=A0 sys/sys/cdefs.h | 7 +++++--
>>=C2=A0 =C2=A0 1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
>> index 6b861b1903f6..a56839d57c7a 100644
>> --- a/sys/sys/cdefs.h
>> +++ b/sys/sys/cdefs.h
>> @@ -356,9 +356,12 @@
>>=C2=A0 =C2=A0 =C2=A0* Clang has always had printf and printf0 as al= iases. gcc 11.0 now follows
>>=C2=A0 =C2=A0 =C2=A0* clang. So now this is an alias for __printfli= ke, or nothing. In the future
>>=C2=A0 =C2=A0 =C2=A0* _Nullable or _Nonnull will replace this.
>> + * XXX Except that doesn't work, so for now revert to printf0= for clang and
>> + * the FreeBSD gcc until I can work this out.
>>=C2=A0 =C2=A0 =C2=A0*/
>> -#if defined(__clang__) || __GNUC_PREREQ__(11, 0)
>> -#define=C2=A0 =C2=A0 =C2=A0__printf0like(fmtarg, firstvararg) __p= rintflike(fmtarg, firstvararg)
>> +#if defined(__clang__) || (defined(__GNUC__) && defined (= __FreeBSD_cc_version))
>> +#define=C2=A0 =C2=A0 =C2=A0__printf0like(fmtarg, firstvararg) \ >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 __attribute__((__format__ (__printf0_= _, fmtarg, firstvararg)))
>>=C2=A0 =C2=A0 #else
>>=C2=A0 =C2=A0 #define=C2=A0 =C2=A0__printf0like(fmtarg, firstvararg= )
>>=C2=A0 =C2=A0 #endif
>
> It's because my patch for devel/freebsd-gcc{12,13} is kind of wron= g.=C2=A0 I had a mismerge
> when updating the printf0 patch from gcc9 to gcc12 that ended up re-ad= ding the
> warn on NULL.=C2=A0 I need to update the ports to remove that part of = the patch.=C2=A0 I will
> probably leave printf0 working for now in the ports just as an alias f= or regular
> printf to give us some transition time.

FYI, I have merged this fix to the ports, but not sure how we want to manag= e doing
the patch to cdefs.h.=C2=A0 I kind of think we should apply the change to c= defs.h in
main in another week or so.=C2=A0 I'm less certain of what to do for st= able branches.

I hadn't planned on = merging this to stable branches. Is that your concern? Or something else?
For building on the stable branch, we should be fine since we supp= ort a wider range of
compilers anyway with the older cdefs.h file= , and the new file will work with all supported
stable branch com= pilers (though maybe not some of the gcc ones, I've not tested
that at all).

Also it's been just over a wee= k, can I recommit this, or is more time needed?

Wa= rner
--000000000000b78c8a061da0426b-- From nobody Fri Jul 19 21:50:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQjyj1yF7z5QRgd; Fri, 19 Jul 2024 21:50:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQjyh3zzLz4TsL; Fri, 19 Jul 2024 21:50:20 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=rlibby@gmail.com Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-52e97e5a84bso3016238e87.2; Fri, 19 Jul 2024 14:50:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721425818; x=1722030618; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jYH+OX0pk68BkCJWcbW2AMuQzc0ej9L/3ejjo6jLtS0=; b=Wxvis4Oj8vKtKS/zDZQxazH7oEaJN+X9ulANuN4IUt/1w10sBM8r9Ycjz/mKUYalLY SVYxz70kPuMZLTElr/Je/7Ld4C/9AhzJEMoN9BGsw0VohyvvApZJgIWZaYVwolDxF37+ ZL6m3m/HvBQM0K5bd3BZtJV4tB9mIK1s0bqYp3KUSO2KQQneAZvSeBVuhNjlTxra8Jnh vwr91Xtrt3HQIk4uiGYzq9h3s/6AWlEoynfPH3zn3mbJrsXh3S5XTou5ZzZiOkWU4+KW SPvOmpO/2X/nF1yxqeRwnqp4jZjp/feFSLlw+MgjX/Bg50toC47n/kmrVJTgGJPzxml0 Yb5A== X-Forwarded-Encrypted: i=1; AJvYcCVRcxVcgiACIOm5tXlcIAbNVnKp3AIdF/+lVOyR8somX7tEOUvRD9pSiRB/OeEBZRPGXrewxmeDyP+9H/rKu7fDZ71a6LrwjSDfHv4dqJe9Ilr2dNjKr+HqZlqHKRU4jDAHsPFFN/V96bnM2pdst0oTDQ== X-Gm-Message-State: AOJu0YwOyacrcBvcBM3OgpzYgSqyvlqlWD1040J0tra61GSItd2/L+Yl C4vtpN3gfmg4Jtm/AN8Kk8bFZ+82i/Omy5SrvH7j2AEj5Le57hQEBaQ3i4Ju X-Google-Smtp-Source: AGHT+IELMbcICJ+zZqzoOznvCuT1xuDeoMFvrJ5rbNO0IG1PaENv6e6NLLYjiLfPswtvtIVZzSrXvg== X-Received: by 2002:a05:6512:1597:b0:52e:9921:6dff with SMTP id 2adb3069b0e04-52ee53b7b7dmr7313664e87.26.1721425817435; Fri, 19 Jul 2024 14:50:17 -0700 (PDT) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ef5571ba1sm304554e87.199.2024.07.19.14.50.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jul 2024 14:50:16 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2eea8ea8bb0so45316451fa.1; Fri, 19 Jul 2024 14:50:16 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCX4YiYMdzApC3x8QaRd3EaAoGL/2UskpHMOSU/NyI5QBpjqcKPBcX63d3XU1FXFNc/eX30jrp3PMwo2uFN0xo+JggCq3bfEFRvDr5C2jnfiJjmXH/sCAv/XEm0vojel6PuQOuGYxpkwjSos+x5niOvx1w== X-Received: by 2002:a2e:84ca:0:b0:2ee:8f3d:e68d with SMTP id 38308e7fff4ca-2ef1685d099mr7546321fa.44.1721425816630; Fri, 19 Jul 2024 14:50:16 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202407181319.46IDJdBj055008@gitrepo.freebsd.org> In-Reply-To: <202407181319.46IDJdBj055008@gitrepo.freebsd.org> From: Ryan Libby Date: Fri, 19 Jul 2024 14:50:04 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 257e70f1d5ee - main - kyua: Add FreeBSD Jail execution environment support To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: - X-Spamd-Result: default: False [-1.17 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.92)[-0.924]; NEURAL_SPAM_SHORT(0.65)[0.654]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.54:from,209.85.208.169:received]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[rlibby]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.54:from]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[rlibby@freebsd.org,rlibby@gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4WQjyh3zzLz4TsL On Thu, Jul 18, 2024 at 6:19=E2=80=AFAM Mark Johnston w= rote: > > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D257e70f1d5ee61037c8c59b116= 538d3b6b1427a2 > > commit 257e70f1d5ee61037c8c59b116538d3b6b1427a2 > Author: Igor Ostapenko > AuthorDate: 2024-07-16 18:41:12 +0000 > Commit: Mark Johnston > CommitDate: 2024-07-18 13:18:28 +0000 > > kyua: Add FreeBSD Jail execution environment support > > A new Kyua concept is added -- "execution environment". A test can be > configured to be run within a specific environment. The test case > lifecycle is extended respectively: > - execenv init (creates a jail or does nothing for default > execenv=3D"host") > - test exec > - cleanup exec (optional) > - execenv cleanup (removes a jail or does nothing for default > execenv=3D"host") > > The following new functionality is provided, from bottom to top: > > 1 ATF based tests > > - The new "execenv" metadata property can be set to explicitly ask fo= r > an execution environment: "host" or "jail". If it's not defined, as > all existing tests do, then it implicitly means "host". > > - The new "execenv.jail.params" metadata property can be optionally > defined to ask Kyua to use specific jail(8) parameters during creat= ion > of a temporary jail. An example is "vnet allow.raw_sockets". > > Kyua implicitly adds "children.max" to "execenv_jail_params" > parameters with the maximum possible value. A test case can overrid= e > it. > > 2 Kyuafile > > - The same new metadata properties can be defined on Kyuafile level: > "execenv" and "execenv_jail_params". > > - Note that historically ATF uses dotted style of metadata naming, wh= ile > Kyua uses underscore style. Hence "execenv.jail.params" vs. > "execenv_jail_params". > > 3 kyua.conf, kyua CLI > > - The new "execenvs" engine configuration variable can be set to a li= st > of execution environments to run only tests designed for. Tests of = not > listed environments are skipped. > > - By default, this variable lists all execution environments supporte= d > by a Kyua binary, e.g. execenvs=3D"host jail". > > - This variable can be changed via "kyua.conf" or via kyua CLI's "-v" > parameter. For example, "kyua -v execenvs=3Dhost test" will run onl= y > host-based tests and skip jail-based ones. > > - Current value of this variable can be examined with "kyua config". > > [markj] This feature has not landed upstream yet. > See the discussion in https://github.com/freebsd/kyua/pull/224 . > Having the ability to automatically jail tests allows many network te= sts > to run in parallel, giving a drastic speedup. So, let's import the > feature and start using it in main. > > Signed-off-by: Igor Ostapenko > Reviewed by: markj, kp > Tested by: markj, kp > MFC after: 3 months > Differential Revision: https://reviews.freebsd.org/D45865 > --- > contrib/kyua/AUTHORS | 1 + > contrib/kyua/cli/cmd_config_test.cpp | 12 +- > contrib/kyua/doc/kyua.conf.5.in | 13 +- > contrib/kyua/doc/kyuafile.5.in | 103 +++++++- > contrib/kyua/drivers/report_junit_test.cpp | 8 + > contrib/kyua/engine/atf.cpp | 11 +- > contrib/kyua/engine/atf_list.cpp | 4 + > contrib/kyua/engine/config.cpp | 18 ++ > contrib/kyua/engine/execenv/execenv.cpp | 74 ++++++ > contrib/kyua/engine/execenv/execenv.hpp | 149 +++++++++++ > contrib/kyua/engine/execenv/execenv_host.cpp | 52 ++++ > contrib/kyua/engine/execenv/execenv_host.hpp | 63 +++++ > contrib/kyua/engine/plain.cpp | 7 +- > contrib/kyua/engine/requirements.cpp | 33 +++ > contrib/kyua/engine/scheduler.cpp | 274 ++++++++++++++++= ++- > contrib/kyua/engine/scheduler.hpp | 1 + > contrib/kyua/engine/tap.cpp | 7 +- > contrib/kyua/examples/kyua.conf | 3 + > contrib/kyua/integration/cmd_config_test.sh | 2 + > contrib/kyua/integration/cmd_report_junit_test.sh | 8 + > contrib/kyua/integration/cmd_report_test.sh | 2 + > contrib/kyua/main.cpp | 3 + > contrib/kyua/model/metadata.cpp | 76 ++++++ > contrib/kyua/model/metadata.hpp | 5 + > contrib/kyua/model/metadata_test.cpp | 8 +- > contrib/kyua/model/test_case_test.cpp | 3 +- > contrib/kyua/model/test_program_test.cpp | 13 +- > contrib/kyua/os/freebsd/execenv_jail.cpp | 78 ++++++ > contrib/kyua/os/freebsd/execenv_jail.hpp | 65 +++++ > contrib/kyua/os/freebsd/execenv_jail_manager.cpp | 63 +++++ > contrib/kyua/os/freebsd/execenv_jail_manager.hpp | 54 ++++ > contrib/kyua/os/freebsd/execenv_jail_stub.cpp | 75 ++++++ > contrib/kyua/os/freebsd/main.cpp | 54 ++++ > contrib/kyua/os/freebsd/main.hpp | 41 +++ > contrib/kyua/os/freebsd/utils/jail.cpp | 306 ++++++++++++++++= ++++++ > contrib/kyua/os/freebsd/utils/jail.hpp | 64 +++++ > contrib/kyua/utils/config/nodes.ipp | 9 +- > contrib/kyua/utils/process/executor.cpp | 42 +++ > contrib/kyua/utils/process/executor.hpp | 1 + > usr.bin/kyua/Makefile | 15 +- > 40 files changed, 1792 insertions(+), 28 deletions(-) > This broke the gcc build: https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc13_build/1307/ With several instances of error: 'noreturn' function does return [-Werror] >From my meta files: gcc13/usr/src/freebsd/amd64.amd64/usr.bin/kyua/engine_atf.o.meta:/usr/src/f= reebsd/contrib/kyua/engine/atf.cpp:199:1: error: 'noreturn' function does return [-Werror] gcc13/usr/src/freebsd/amd64.amd64/usr.bin/kyua/engine_atf.o.meta:/usr/src/f= reebsd/contrib/kyua/engine/atf.cpp:230:1: error: 'noreturn' function does return [-Werror] gcc13/usr/src/freebsd/amd64.amd64/usr.bin/kyua/engine_plain.o.meta:/usr/src= /freebsd/contrib/kyua/engine/plain.cpp:113:1: error: 'noreturn' function does return [-Werror] gcc13/usr/src/freebsd/amd64.amd64/usr.bin/kyua/engine_tap.o.meta:/usr/src/f= reebsd/contrib/kyua/engine/tap.cpp:160:1: error: 'noreturn' function does return [-Werror] I'm unsure if [[noreturn]] on a virtual method is defined in the way that this code apparently expects. Ryan From nobody Fri Jul 19 21:53:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQk286wLlz5QRvN; Fri, 19 Jul 2024 21:53:20 +0000 (UTC) (envelope-from brooks@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQk285xxVz4VFH; Fri, 19 Jul 2024 21:53:20 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721426000; 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=dKc4IE25oGlL74JXvXt2vNJUHlE199Sg0Ir0/nx0oNI=; b=SRMuXimj3HaEhS5Clcs9UBZa86JMMlmU1tC3cHEGmC1Jup9innCAfZPjCXWHm/fkQniuRC MmrL08r6uMn2fAQhRoSyadvhXhroC3JvQre/0lkRSaaNka2DfZbYr1UTpUDXts/62TxLaT oiTMeeZyXTzXKjUok/jq54J76Qba6N1ps3xFA+w6o4ZkXwBDfruqCaJD7m0xEvjmE1DgCC Tze0EGa83cpLUy25qfjLEfd4wQxAfhHlD9sRskIDMnbFIRAbSsjbQh2LoVSPHmJpqybOGc 6smTsnWVBDVcf9pWU4eR2UB2Gb9ug/zJpwrYAmoNdGmNgcXUyV3xjeXk/VlTSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721426000; a=rsa-sha256; cv=none; b=nNRO4a5OsNbR6nxnY7JCckTani1EmiHbDxiTF6vp7mvavRH7yXIq9RF9ilhXNgeV3cgAvH wAnz2dHa+Hq26M78ZXq1MOJUNhihkc2Sb2msEhfYm9T2u0HMZmLRiJw2HO8aBeDO6TkHMq 9+z97HlvFctSsH/4HhG0yIittu+TlGmc9ZMmrmqKQGoW0CYkYHpPXMsFFrnicGu50DQaNe 7v85OpXgPrUph+VY4D/aIkm4vYq3UVbOjcitmQP+JcFzFHk6ohZaCq255r7udu9tjGllSl F6rTr5J5NLisg7Ioa4XFzP8APOiUgomzlixMnu9CCE9ERsLWXsVk86MVpwDfnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721426000; 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=dKc4IE25oGlL74JXvXt2vNJUHlE199Sg0Ir0/nx0oNI=; b=tTctNCW93NiSRQcR+gyyooL1viGPWZp0tnbmwEMrfRwaDam3pXuT5et8S34G6klXNKjYZ3 /LV0xu4KLd76MW4K2E+n3hgJp2T9sIrsgs66SdzIk8V2eaPewzG1LqARYYYXmiIbbWtawr Ck9yUrdGOkR1EryXQk7Ebhc1Wlv05lVAs8B9EcqXBLNIdf0j1OUozNbKmbEItZNrTlHxZa Y2tslC8oIG3xJM47Udxqw+pbEvmhTKtthuRBrm6aVUO6qDLZHjLZMZXESUOXmSPE9l+8/A 16AUOprIAy15gfs6ullXFfFrPM6LKtOqViL0EHUm7jjixTzH5E5c42eqzVwblw== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.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) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WQk284zcTzGV4; Fri, 19 Jul 2024 21:53:20 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id C45763C019B; Fri, 19 Jul 2024 21:53:19 +0000 (UTC) Date: Fri, 19 Jul 2024 21:53:19 +0000 From: Brooks Davis To: Ryan Libby Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 257e70f1d5ee - main - kyua: Add FreeBSD Jail execution environment support Message-ID: References: <202407181319.46IDJdBj055008@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jul 19, 2024 at 02:50:04PM -0700, Ryan Libby wrote: > On Thu, Jul 18, 2024 at 6:19???AM Mark Johnston wrote: > > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=257e70f1d5ee61037c8c59b116538d3b6b1427a2 > > > > commit 257e70f1d5ee61037c8c59b116538d3b6b1427a2 > > Author: Igor Ostapenko > > AuthorDate: 2024-07-16 18:41:12 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-07-18 13:18:28 +0000 > > > > kyua: Add FreeBSD Jail execution environment support > > > > A new Kyua concept is added -- "execution environment". A test can be > > configured to be run within a specific environment. The test case > > lifecycle is extended respectively: > > - execenv init (creates a jail or does nothing for default > > execenv="host") > > - test exec > > - cleanup exec (optional) > > - execenv cleanup (removes a jail or does nothing for default > > execenv="host") > > > > The following new functionality is provided, from bottom to top: > > > > 1 ATF based tests > > > > - The new "execenv" metadata property can be set to explicitly ask for > > an execution environment: "host" or "jail". If it's not defined, as > > all existing tests do, then it implicitly means "host". > > > > - The new "execenv.jail.params" metadata property can be optionally > > defined to ask Kyua to use specific jail(8) parameters during creation > > of a temporary jail. An example is "vnet allow.raw_sockets". > > > > Kyua implicitly adds "children.max" to "execenv_jail_params" > > parameters with the maximum possible value. A test case can override > > it. > > > > 2 Kyuafile > > > > - The same new metadata properties can be defined on Kyuafile level: > > "execenv" and "execenv_jail_params". > > > > - Note that historically ATF uses dotted style of metadata naming, while > > Kyua uses underscore style. Hence "execenv.jail.params" vs. > > "execenv_jail_params". > > > > 3 kyua.conf, kyua CLI > > > > - The new "execenvs" engine configuration variable can be set to a list > > of execution environments to run only tests designed for. Tests of not > > listed environments are skipped. > > > > - By default, this variable lists all execution environments supported > > by a Kyua binary, e.g. execenvs="host jail". > > > > - This variable can be changed via "kyua.conf" or via kyua CLI's "-v" > > parameter. For example, "kyua -v execenvs=host test" will run only > > host-based tests and skip jail-based ones. > > > > - Current value of this variable can be examined with "kyua config". > > > > [markj] This feature has not landed upstream yet. > > See the discussion in https://github.com/freebsd/kyua/pull/224 . > > Having the ability to automatically jail tests allows many network tests > > to run in parallel, giving a drastic speedup. So, let's import the > > feature and start using it in main. > > > > Signed-off-by: Igor Ostapenko > > Reviewed by: markj, kp > > Tested by: markj, kp > > MFC after: 3 months > > Differential Revision: https://reviews.freebsd.org/D45865 > > --- > > contrib/kyua/AUTHORS | 1 + > > contrib/kyua/cli/cmd_config_test.cpp | 12 +- > > contrib/kyua/doc/kyua.conf.5.in | 13 +- > > contrib/kyua/doc/kyuafile.5.in | 103 +++++++- > > contrib/kyua/drivers/report_junit_test.cpp | 8 + > > contrib/kyua/engine/atf.cpp | 11 +- > > contrib/kyua/engine/atf_list.cpp | 4 + > > contrib/kyua/engine/config.cpp | 18 ++ > > contrib/kyua/engine/execenv/execenv.cpp | 74 ++++++ > > contrib/kyua/engine/execenv/execenv.hpp | 149 +++++++++++ > > contrib/kyua/engine/execenv/execenv_host.cpp | 52 ++++ > > contrib/kyua/engine/execenv/execenv_host.hpp | 63 +++++ > > contrib/kyua/engine/plain.cpp | 7 +- > > contrib/kyua/engine/requirements.cpp | 33 +++ > > contrib/kyua/engine/scheduler.cpp | 274 ++++++++++++++++++- > > contrib/kyua/engine/scheduler.hpp | 1 + > > contrib/kyua/engine/tap.cpp | 7 +- > > contrib/kyua/examples/kyua.conf | 3 + > > contrib/kyua/integration/cmd_config_test.sh | 2 + > > contrib/kyua/integration/cmd_report_junit_test.sh | 8 + > > contrib/kyua/integration/cmd_report_test.sh | 2 + > > contrib/kyua/main.cpp | 3 + > > contrib/kyua/model/metadata.cpp | 76 ++++++ > > contrib/kyua/model/metadata.hpp | 5 + > > contrib/kyua/model/metadata_test.cpp | 8 +- > > contrib/kyua/model/test_case_test.cpp | 3 +- > > contrib/kyua/model/test_program_test.cpp | 13 +- > > contrib/kyua/os/freebsd/execenv_jail.cpp | 78 ++++++ > > contrib/kyua/os/freebsd/execenv_jail.hpp | 65 +++++ > > contrib/kyua/os/freebsd/execenv_jail_manager.cpp | 63 +++++ > > contrib/kyua/os/freebsd/execenv_jail_manager.hpp | 54 ++++ > > contrib/kyua/os/freebsd/execenv_jail_stub.cpp | 75 ++++++ > > contrib/kyua/os/freebsd/main.cpp | 54 ++++ > > contrib/kyua/os/freebsd/main.hpp | 41 +++ > > contrib/kyua/os/freebsd/utils/jail.cpp | 306 ++++++++++++++++++++++ > > contrib/kyua/os/freebsd/utils/jail.hpp | 64 +++++ > > contrib/kyua/utils/config/nodes.ipp | 9 +- > > contrib/kyua/utils/process/executor.cpp | 42 +++ > > contrib/kyua/utils/process/executor.hpp | 1 + > > usr.bin/kyua/Makefile | 15 +- > > 40 files changed, 1792 insertions(+), 28 deletions(-) > > > > This broke the gcc build: > https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc13_build/1307/ See https://reviews.freebsd.org/D46041 for a workaround. -- Brooks From nobody Fri Jul 19 23:28:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQm7f43yfz5Qb1L; Fri, 19 Jul 2024 23:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQm7f3XKsz4chr; Fri, 19 Jul 2024 23:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721431694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4pORcXUtcUOcwhI+tuL++ff4DWB5kXOs77Y4pVdS4PQ=; b=EWE0LYUrnXN369GSMCr5kD9s5MMctJiXqwxlwo2zIms882jgkWkptAwxNCewdfPsqQi0vV uV/djRCJAli1ceMN9JMKlDiJfuaOpZEDjmWQEc7XfCaCfl8I33UfLvcWahxtpig+Vsjm0R VJmD3l30W/QCT4tZeMvU5771AuvXZZi6uqjUcRw/376+4tl7vPGXbRWik6N53Gyoq6XIfa 2QH2wQnMenHY5BwkYs1cyPV++z3HiMQ7mNJMifnA/hDiLGzF4nWfdTGJrJNCzewEj/Dt8u ipITbtpl/SAEec2u3oDS05i8GZIkgn7st4id+3Viu+428qKlKN5VYxPQLF1Eqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721431694; a=rsa-sha256; cv=none; b=bhMGydi7BzgKvaKOvaEJBoakPRR6mDa1N/1HAINH57t98nEhXprV4qiJZrcHd3wy+M3GJ0 l6YDK4syVvH3XABuG8K2IcR9kCvStnuIQfrk8Xa7NNfzMDq0cgBhmKPssyCHIftC8bceTz H7LyltrvDxeZkQBHppTZlM0uXRk1wWmd7HZcg2igJ4rRrvDDECkxeGusvLMkVNODxPpg8U z5VHHCzSJ34GR9cUe8nFhrkAKi1Z+cFlidn9KtmJAXj4vdSc+pYBEGFCB0HsLkoM6x7bRY m14Px1WuP9i5nKR+9fpWioCavWayTnV6pxY2QuP1JNL5vwdlMWmVjggSG34JdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721431694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4pORcXUtcUOcwhI+tuL++ff4DWB5kXOs77Y4pVdS4PQ=; b=p2FhYQHkf0auhxeg2THz3kSzW8GYEyBG/EqMg7oQUvroEnsV4HmRRtjAzDHxp239/LBkfn zBhwlOEQYyZWTMUr4RUDHPj9HSh9IFhhv0ovjJqvyk7kKQ48AzdO7Qe7qC63WCLck61C6d PDqNbrKlErYt7czDeVDhh/O2+7+vHxJdhvrQ9jHHC+0bjGRF7TG10VF2W3IbI1jpw9XjmM A18cYN9v+mrOQa/5DMFQ2WBqtubivyzwWmoP9pa/Ydeg4chdCRRSHF2GEP+HR0RLJvi4dc SVjJtPiyrL4ZxQZj3lNpf7Q6UuczUULJxBkbhknvM64S/ihEpVBl8grtvZ/jDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQm7f37fCzsSP; Fri, 19 Jul 2024 23:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JNSEW4070915; Fri, 19 Jul 2024 23:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JNSExY070912; Fri, 19 Jul 2024 23:28:14 GMT (envelope-from git) Date: Fri, 19 Jul 2024 23:28:14 GMT Message-Id: <202407192328.46JNSExY070912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 47fb5d2b13c5 - main - kyua: fix gcc builds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47fb5d2b13c5ca8e1a3b05ed223d62ea4b43b3e8 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=47fb5d2b13c5ca8e1a3b05ed223d62ea4b43b3e8 commit 47fb5d2b13c5ca8e1a3b05ed223d62ea4b43b3e8 Author: Brooks Davis AuthorDate: 2024-07-19 23:24:35 +0000 Commit: Brooks Davis CommitDate: 2024-07-19 23:28:06 +0000 kyua: fix gcc builds For some reason execenv::exec() isn't successfully marked noreturn (rlibby reports that virtual functions can't be noreturn), but calling methods are so gcc rightly complains. Work around this by adding explicit __builtin_unreachable() calls. Reviewed by: imp, markj Fixes: 257e70f1d5ee kyua: Add FreeBSD Jail execution environment support Differential Revision: https://reviews.freebsd.org/D46041 --- contrib/kyua/engine/atf.cpp | 2 ++ contrib/kyua/engine/plain.cpp | 1 + contrib/kyua/engine/tap.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/contrib/kyua/engine/atf.cpp b/contrib/kyua/engine/atf.cpp index f6746dd2f29f..47f3bd2a1903 100644 --- a/contrib/kyua/engine/atf.cpp +++ b/contrib/kyua/engine/atf.cpp @@ -196,6 +196,7 @@ engine::atf_interface::exec_test(const model::test_program& test_program, auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } @@ -227,6 +228,7 @@ engine::atf_interface::exec_cleanup( auto e = execenv::get(test_program, test_case_name); e->exec(args); + __builtin_unreachable(); } diff --git a/contrib/kyua/engine/plain.cpp b/contrib/kyua/engine/plain.cpp index 9a2c63f8b663..0aba9b3fb6fa 100644 --- a/contrib/kyua/engine/plain.cpp +++ b/contrib/kyua/engine/plain.cpp @@ -110,6 +110,7 @@ engine::plain_interface::exec_test( auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } diff --git a/contrib/kyua/engine/tap.cpp b/contrib/kyua/engine/tap.cpp index ed35ba40433f..716212d18d02 100644 --- a/contrib/kyua/engine/tap.cpp +++ b/contrib/kyua/engine/tap.cpp @@ -157,6 +157,7 @@ engine::tap_interface::exec_test( auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } From nobody Sat Jul 20 02:59:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQrpy5gVDz5Qxtt; Sat, 20 Jul 2024 02:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQrpy3Zhbz43BH; Sat, 20 Jul 2024 02:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YssqplutNgRt72tXtet9QfYu7Ko0FRSgOIXV9HoYa9M=; b=sbtRN/QigeqTnmJuX6YulRpsVA37EG5tjka2pk/WinkPui0Z1orIfXH0QH5Oj+mF0iIb72 eqymNl31mamt13gKWbFxMkjT5RhMvoOr06OkF0/8fP6YOxc8b2mr9VidAcaZLgrn8lbVVU yyD/CT8NuCsJ8Bg79hZAumbYbgjjvoLqlAX0gzT8689ve6AW/rfhCtpOLL6OBqlOpLpNtd nsa2BFzeseZrx7dgAXgjvIPlcKbKoAhBcfh4/mCnde2Zt2TprFsRJlV8ToCbpuPlmIoqOR CaY+s0eJIU+eXfJyj3gnkpV3m7O/N92YvUzjhE0knHUXYEJYBk7F1EkOPnGWZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721444346; a=rsa-sha256; cv=none; b=sHvdtCNo9WsCs5nPpNeTkOxFXMna5cCmzKMzh+7HrKuEKMiQXM8p53ryYctzdfqNC5bYpX kmA1zrJpF83c1vLG+xufz0jQkCGvElDSK5Rbdd6DiqUiXI6+IY5qJ7B9idE8//4J6pjs6m csUZID1nDM+iLKoufOw26hFmoLjf/s3aHNbtfs+WYby9f266CAm7leftoQXLQyaUI3r43i 2IuJczXqscT0IHDo7wjf3l5KfeoiaDcxWXxbZxMy8ktIRuKumSJXZz9nK3RQnNbS01Ij2X tN124CZFr+VtiDugS0z0aEAng6qpAI/Bbt5Vf9Qbyad49RNjR6IwdUnZAK29Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YssqplutNgRt72tXtet9QfYu7Ko0FRSgOIXV9HoYa9M=; b=J1KPEpduiRkP4oex4xFcgcYBDTKzpAEbCQiBnqiotKJvvIOQlbg2FIEPnww85uIyvrlq4C vv0u3dBx7Xskv8sbrLM+pQiP6O1S0T6aBBl/rZHmF9MnLkLRgt0IMGOE9fb7F2qZgAMcrP LZAcI3gOhHq648c5Wu8LTPl/pGWr1K+M04H9NWzBXmQFKL5GAUDrXs0SCfEwhfklDyRP5H ab9QohegGC/7JJ2CzTpklnyE6JQOxEXjL/prcQFYM3RCaEpjs7FaiC0Dhgb209JTlAX8+Y 6G1QVbj8UQ82bB1SpSkJllNAkmyB9b7c1JvB6aqk1TeDQ9FkC3WcAheK/Ai+2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQrpy33z8zyVQ; Sat, 20 Jul 2024 02:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K2x6g9024398; Sat, 20 Jul 2024 02:59:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K2x6Vt024395; Sat, 20 Jul 2024 02:59:06 GMT (envelope-from git) Date: Sat, 20 Jul 2024 02:59:06 GMT Message-Id: <202407200259.46K2x6Vt024395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e82644e59ece - main - cam/iosched: Add a counter of I/Os that take too long List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e82644e59ece5cdc67250262508e81fa22deea90 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e82644e59ece5cdc67250262508e81fa22deea90 commit e82644e59ece5cdc67250262508e81fa22deea90 Author: Warner Losh AuthorDate: 2024-07-20 02:52:40 +0000 Commit: Warner Losh CommitDate: 2024-07-20 02:53:37 +0000 cam/iosched: Add a counter of I/Os that take too long Add kern.cam.DEV.UNIT.iosched.too_long (to count I/Os taking too long) and kern.cam.DEV.UNIT.bad_latency (to set this threshold, defaults to 500ms). Each class of I/O (read, write, trim) has its own counters and thresholds. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46033 --- sys/cam/cam_iosched.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 471e6c355d69..022eb23cb621 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -271,6 +271,9 @@ struct iop_stats { sbintime_t emvar; sbintime_t sd; /* Last computed sd */ + uint64_t too_long; /* Number of I/Os greater than bad lat threshold */ + sbintime_t bad_latency; /* Latency threshold */ + uint32_t state_flags; #define IOP_RATE_LIMITED 1u @@ -856,6 +859,7 @@ cam_iosched_iop_stats_init(struct cam_iosched_softc *isc, struct iop_stats *ios) ios->total = 0; ios->ema = 0; ios->emvar = 0; + ios->bad_latency = SBT_1S / 2; /* Default to 500ms */ ios->softc = isc; cam_iosched_limiter_init(ios); } @@ -1046,6 +1050,15 @@ cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stat OID_AUTO, "errs", CTLFLAG_RD, &ios->errs, 0, "# of transactions completed with an error"); + SYSCTL_ADD_U64(ctx, n, + OID_AUTO, "too_long", CTLFLAG_RD, + &ios->too_long, 0, + "# of transactions completed took too long"); + SYSCTL_ADD_PROC(ctx, n, + OID_AUTO, "bad_latency", + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + &ios->bad_latency, 0, cam_iosched_sbintime_sysctl, "A", + "Threshold for counting transactions that took too long (in us)"); SYSCTL_ADD_PROC(ctx, n, OID_AUTO, "limiter", @@ -1916,6 +1929,14 @@ cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) sbintime_t y, deltasq, delta; int i; + /* + * Simple threshold: count the number of events that excede the + * configured threshold. + */ + if (sim_latency > iop->bad_latency) { + iop->too_long++; + } + /* * Keep counts for latency. We do it by power of two buckets. * This helps us spot outlier behavior obscured by averages. From nobody Sat Jul 20 02:59:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQrpz4k7gz5Qxjk; Sat, 20 Jul 2024 02:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQrpz3q0yz43BJ; Sat, 20 Jul 2024 02:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykcTW4rh9pXGay7pkBKzoNpyqIsfRYl99WN2Q9Xn7+w=; b=TOsgpxSJMr4BnRrGJyBnXazSrgvxd0+GPhj9i0lLRsSykPUg8Awf6OmhVd5a8BdM78n/Ch upRSMU/3NxSnwXJjt13cDNppI//1sC4IQx9qOpXoTHS28sRwR1vf+DrPwB2FzkNwzoDHP4 uVUDMbbeHUvR0vAnxj3qcfHVbf1lt4Jr8EJ75us7RiRaMStKHngjIaOmYjfimag2DCTCv2 zX7f8+ycT3Wy2Bzp8ps7bIsGHOOhX2qLfqfgf++98t/4QzoTcMcv76DS8+iOlN05Fw2z8n FNq9szSBP8LMRfj2iIx3w4EQafC16SXL/ko0I36K8Mi6sd08FYhhNoOPU6BrRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721444347; a=rsa-sha256; cv=none; b=idS+LrvocIZX0SJVuD5VWAoPNa8ipuctZDNjZaPNvLN3r+cEFwACKhcgoNTb4RXvv05yZT beuy3kC1H62/ULj/3gdz8B1s2Sbcy6MbWHp8oR2OF+p6gO7oNJGLTbRUo+FqItNfpTdTj4 J28WsHn6HmQlP7qPeVVeLpZFLVa6b4flI8bxzDri+mW7h9acj3QJE5ywjM+eTGADR6oqA5 Qsy5mbwK4goPcXhaBCt7id4nksWNp9EQiCI4svN2M9Qy90HaCnGrRmRMQTVU2bFi/jeYUx tFWeGfTTGy42FoQL3UNteSSyWqYwNWJbI4uEwen79GOWGAclFh9jp+oRUgXj0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykcTW4rh9pXGay7pkBKzoNpyqIsfRYl99WN2Q9Xn7+w=; b=dWnDJFOq+mO3hnGntvF4kgwCod3so662jhnHDyCRh3scv8T/lZIA2MIiu7s703eIE6Wrcw xI1Wr6/4q9/akuUmVDSLgyAUw3hOABxI+3NMkKL27oaeuE7b027grAkwQyhYcJoKBBoIjL wWrgtvM6Vs1Uj2sMtqHOzHBpAZJqU6z16rk1lfOCSd2wZIS4jHqogX75HFvFOHlU2PQA7b jr529pm8ttKqI9jlV5rukG15JehvMpN+JhChsHVXm597RwVaZni1c9nSk0oThRxuPYF8+n nKyL0zVgA0vNlEyzPKG8U9fVsdrBsEb3KnCm5hoOOvWxOYpxWa0oXhzovn2duQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQrpz3Qj8zyw6; Sat, 20 Jul 2024 02:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K2x7Cd024459; Sat, 20 Jul 2024 02:59:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K2x7sA024456; Sat, 20 Jul 2024 02:59:07 GMT (envelope-from git) Date: Sat, 20 Jul 2024 02:59:07 GMT Message-Id: <202407200259.46K2x7sA024456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 148c173485ee - main - cam/iosched: Pass the transaction down we're collecting stats for List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 148c173485eea8309e3c95db741686b3c71e83de Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=148c173485eea8309e3c95db741686b3c71e83de commit 148c173485eea8309e3c95db741686b3c71e83de Author: Warner Losh AuthorDate: 2024-07-20 02:52:50 +0000 Commit: Warner Losh CommitDate: 2024-07-20 02:53:37 +0000 cam/iosched: Pass the transaction down we're collecting stats for Pass the struct bio * down to the stats collection routines. This allows us to collect better stats and report more details. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46034 --- sys/cam/cam_iosched.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 022eb23cb621..330d5ea22b61 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -758,7 +758,7 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp) #ifdef CAM_IOSCHED_DYNAMIC static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, - sbintime_t sim_latency, int cmd, size_t size); + sbintime_t sim_latency, const struct bio *bp); #endif static inline bool @@ -1801,8 +1801,8 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp, sim_latency = cam_iosched_sbintime_t(done_ccb->ccb_h.qos.periph_data); - cam_iosched_io_metric_update(isc, sim_latency, - bp->bio_cmd, bp->bio_bcount); + cam_iosched_io_metric_update(isc, sim_latency, bp); + /* * Debugging code: allow callbacks to the periph driver when latency max * is exceeded. This can be useful for triggering external debugging actions. @@ -1924,7 +1924,8 @@ static sbintime_t latencies[LAT_BUCKETS - 1] = { }; static void -cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) +cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency, + const struct bio *bp __unused) { sbintime_t y, deltasq, delta; int i; @@ -2014,18 +2015,17 @@ cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, - sbintime_t sim_latency, int cmd, size_t size) + sbintime_t sim_latency, const struct bio *bp) { - /* xxx Do we need to scale based on the size of the I/O ? */ - switch (cmd) { + switch (bp->bio_cmd) { case BIO_READ: - cam_iosched_update(&isc->read_stats, sim_latency); + cam_iosched_update(&isc->read_stats, sim_latency, bp); break; case BIO_WRITE: - cam_iosched_update(&isc->write_stats, sim_latency); + cam_iosched_update(&isc->write_stats, sim_latency, bp); break; case BIO_DELETE: - cam_iosched_update(&isc->trim_stats, sim_latency); + cam_iosched_update(&isc->trim_stats, sim_latency, bp); break; default: break; From nobody Sat Jul 20 02:59:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQrq06ms3z5QxxB; Sat, 20 Jul 2024 02:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQrq04tM4z433R; Sat, 20 Jul 2024 02:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dAOj9u/em+KgLrWBYgADkmtxXnNti42poIBJVy0qwNw=; b=Okt8SzR/o4LcDLBAyvBWugYTYbBN+yDBmFWDKCxD3/tvZhk7CmICjYRMLBImgc44XxYDs0 e9ddsahCBUOt5x03NZ50tS5+tdO9oxL/iyMzR1v5uaADw8/gBxicsFylaPd56WkCEStRXT lUfDC/kUwW8RMv7htqarXjmIagdL1lDrySvkULYqSHbScdd2GC8gY1Q+/JAgmOZcHt2DcF YG/dES/d2RuCvnmxMm6GLnu8WohPZUy+OI/VhkL9B/KZPkqzUJAQjaASrOQfe5jFOlQu63 fQFu29R/2AMD5von+L8uLRkrCSl9LAWxGKhUsQOLKznyvK9IQv+d2c6rbYI57Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721444348; a=rsa-sha256; cv=none; b=GQ6OlT6dHcxQG7eYOOfNWxnGkOEs6tkx2o6D+Jayd9I3fyIzuh/LEFdHT4pw39LKD833OX Uc1zqnvU3y7xzFKVFHtAX/cj31O5kG6Q7smEUlrAMJ1Lgj2/denk9YxFZ/aRQRflUpCO7O gqJt6w3NPGhCbjtB5ybRL/xSYGzTJEBBXIwCnSHlj4BVurnZBwsqMhueAFK0gklUubZ5Bt u5hTl4uPyFFdc5mCuyLaoflETy66b/FEJlDXqHTO2po6csanAaorUTthctDBZn9w0+tg7m wQso4YjH5Um8dy2rbIbupBANsfeyVZKjWVu1mEv8Y5PFgHVmEOC9PuIzHeO9Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dAOj9u/em+KgLrWBYgADkmtxXnNti42poIBJVy0qwNw=; b=cnJJ4MIoiZnPKHpuJFJPkNQi14h5yaqwQDAgiRBN4irZIrdzEzr3pcGId9SOGv7wdWjmyI DY8EBtjqH+enDS/TH3IEz+j8yKk6ueDAYhaj16gI4DKmRqUmc2O3um2UbJ6kJve+tI4P4v Xj7sesRj5CBnde/h9OMKgOAxZ+Azq+6guoTaynXsp2tEMzhMoxyBRiQa9dJAYZV/hPHhHL +qwBHB05AnKCo8iqNd704J6/V1fDn/6Tf6qabN5MSapUy4Wjdc/QlBstztvTfnGXFXmaZt suSIrDiuW1G8XdZL9jE/qbD/+HUClJVuXzqBoUtrE/6Gs10dLxfocRdlSOQRMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQrq04VDlzySD; Sat, 20 Jul 2024 02:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K2x8Xk024507; Sat, 20 Jul 2024 02:59:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K2x8sA024504; Sat, 20 Jul 2024 02:59:08 GMT (envelope-from git) Date: Sat, 20 Jul 2024 02:59:08 GMT Message-Id: <202407200259.46K2x8sA024504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6f1dd6071a91 - main - cam/iosched: Pass in the disk when initializing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f1dd6071a9171b8d1472ba36f6045a7a10b622a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6f1dd6071a9171b8d1472ba36f6045a7a10b622a commit 6f1dd6071a9171b8d1472ba36f6045a7a10b622a Author: Warner Losh AuthorDate: 2024-07-20 02:53:01 +0000 Commit: Warner Losh CommitDate: 2024-07-20 02:53:37 +0000 cam/iosched: Pass in the disk when initializing The disk is nice to have at times, especially when you need the sector size. At present, the only plans for this are related to logging. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46035 --- sys/cam/ata/ata_da.c | 19 ++++++++++--------- sys/cam/cam_iosched.c | 5 ++++- sys/cam/cam_iosched.h | 3 ++- sys/cam/nvme/nvme_da.c | 17 +++++++++-------- sys/cam/scsi/scsi_da.c | 16 ++++++++-------- 5 files changed, 33 insertions(+), 27 deletions(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 6e008cfc8d22..2c1183b74c1d 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -1834,13 +1834,6 @@ adaregister(struct cam_periph *periph, void *arg) announce_buf = softc->announce_temp; bzero(announce_buf, ADA_ANNOUNCETMP_SZ); - if (cam_iosched_init(&softc->cam_iosched, periph) != 0) { - printf("adaregister: Unable to probe new device. " - "Unable to allocate iosched memory\n"); - free(softc, M_DEVBUF); - return(CAM_REQ_CMP_ERR); - } - periph->softc = softc; xpt_path_inq(&softc->cpi, periph->path); @@ -1901,8 +1894,6 @@ adaregister(struct cam_periph *periph, void *arg) } else { softc->flags |= ADA_FLAG_ROTATING; } - cam_iosched_set_sort_queue(softc->cam_iosched, - (softc->flags & ADA_FLAG_ROTATING) ? -1 : 0); softc->disk = disk_alloc(); adasetgeom(softc, cgd); softc->disk->d_devstat = devstat_new_entry(periph->periph_name, @@ -1921,6 +1912,16 @@ adaregister(struct cam_periph *periph, void *arg) softc->disk->d_name = "ada"; softc->disk->d_drv1 = periph; softc->disk->d_unit = periph->unit_number; + + if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk) != 0) { + printf("adaregister: Unable to probe new device. " + "Unable to allocate iosched memory\n"); + free(softc, M_DEVBUF); + return(CAM_REQ_CMP_ERR); + } + cam_iosched_set_sort_queue(softc->cam_iosched, + (softc->flags & ADA_FLAG_ROTATING) ? -1 : 0); + cam_periph_lock(periph); dp = &softc->params; diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 330d5ea22b61..cfefc8098d18 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -314,6 +314,7 @@ struct control_loop { struct cam_iosched_softc { struct bio_queue_head bio_queue; struct bio_queue_head trim_queue; + const struct disk *disk; /* scheduler flags < 16, user flags >= 16 */ uint32_t flags; int sort_io_queue; @@ -1153,12 +1154,14 @@ cam_iosched_cl_sysctl_fini(struct control_loop *clp) * sizeof struct cam_iosched_softc. */ int -cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph) +cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph, + const struct disk *dp) { *iscp = malloc(sizeof(**iscp), M_CAMSCHED, M_NOWAIT | M_ZERO); if (*iscp == NULL) return ENOMEM; + (*iscp)->disk = dp; #ifdef CAM_IOSCHED_DYNAMIC if (iosched_debug) printf("CAM IOSCHEDULER Allocating entry at %p\n", *iscp); diff --git a/sys/cam/cam_iosched.h b/sys/cam/cam_iosched.h index c8e4341f5095..e1019c531579 100644 --- a/sys/cam/cam_iosched.h +++ b/sys/cam/cam_iosched.h @@ -80,7 +80,8 @@ cam_iosched_sbintime_t(uintptr_t delta) typedef void (*cam_iosched_latfcn_t)(void *, sbintime_t, struct bio *); -int cam_iosched_init(struct cam_iosched_softc **, struct cam_periph *periph); +int cam_iosched_init(struct cam_iosched_softc **, struct cam_periph *periph, + const struct disk *dp); void cam_iosched_fini(struct cam_iosched_softc *); void cam_iosched_sysctl_init(struct cam_iosched_softc *, struct sysctl_ctx_list *, struct sysctl_oid *); struct bio *cam_iosched_next_trim(struct cam_iosched_softc *isc); diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 41c552e2780a..1a93ea71ba77 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -862,13 +862,6 @@ ndaregister(struct cam_periph *periph, void *arg) return(CAM_REQ_CMP_ERR); } - if (cam_iosched_init(&softc->cam_iosched, periph) != 0) { - printf("ndaregister: Unable to probe new device. " - "Unable to allocate iosched memory\n"); - free(softc, M_DEVBUF); - return(CAM_REQ_CMP_ERR); - } - /* ident_data parsing */ periph->softc = softc; @@ -891,7 +884,6 @@ ndaregister(struct cam_periph *periph, void *arg) quirks = softc->quirks; TUNABLE_INT_FETCH(announce_buf, &quirks); softc->quirks = quirks; - cam_iosched_set_sort_queue(softc->cam_iosched, 0); softc->disk = disk = disk_alloc(); disk->d_rotation_rate = DISK_RR_NON_ROTATING; disk->d_open = ndaopen; @@ -953,6 +945,15 @@ ndaregister(struct cam_periph *periph, void *arg) DEVSTAT_ALL_SUPPORTED, DEVSTAT_TYPE_DIRECT | XPORT_DEVSTAT_TYPE(cpi.transport), DEVSTAT_PRIORITY_DISK); + + if (cam_iosched_init(&softc->cam_iosched, periph, disk) != 0) { + printf("ndaregister: Unable to probe new device. " + "Unable to allocate iosched memory\n"); + free(softc, M_DEVBUF); + return(CAM_REQ_CMP_ERR); + } + cam_iosched_set_sort_queue(softc->cam_iosched, 0); + /* * Add alias for older nvd drives to ease transition. */ diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 59745231bca5..4ecf8c35aca2 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -2804,13 +2804,6 @@ daregister(struct cam_periph *periph, void *arg) return(CAM_REQ_CMP_ERR); } - if (cam_iosched_init(&softc->cam_iosched, periph) != 0) { - printf("daregister: Unable to probe new device. " - "Unable to allocate iosched memory\n"); - free(softc, M_DEVBUF); - return(CAM_REQ_CMP_ERR); - } - LIST_INIT(&softc->pending_ccbs); softc->state = DA_STATE_PROBE_WP; bioq_init(&softc->delete_run_queue); @@ -2979,7 +2972,13 @@ daregister(struct cam_periph *periph, void *arg) softc->disk->d_hba_subdevice = cpi.hba_subdevice; snprintf(softc->disk->d_attachment, sizeof(softc->disk->d_attachment), "%s%d", cpi.dev_name, cpi.unit_number); - cam_periph_lock(periph); + + if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk) != 0) { + printf("daregister: Unable to probe new device. " + "Unable to allocate iosched memory\n"); + free(softc, M_DEVBUF); + return(CAM_REQ_CMP_ERR); + } /* * Add async callbacks for events of interest. @@ -2988,6 +2987,7 @@ daregister(struct cam_periph *periph, void *arg) * fine without them and the only alternative * would be to not attach the device on failure. */ + cam_periph_lock(periph); xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | AC_ADVINFO_CHANGED | AC_SCSI_AEN | AC_UNIT_ATTENTION | AC_INQ_CHANGED, daasync, periph, periph->path); From nobody Sat Jul 20 02:59:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQrq33fBCz5QxxJ; Sat, 20 Jul 2024 02:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQrq16N41z438T; Sat, 20 Jul 2024 02:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FuoJEx59qZqxdCCHexYQhMDYWsY+BuIZj3lGFGIClq4=; b=nOB9ZUWGDqn/JYNWpM5vdE09z2HEgNVYzBzv5c4qVTwHkGg7sRkSb0qwX3LCFWe62g6e8p xXlUwAk0X8f3JG/jLNaWmvnuQnasRKM3qrHXGKMXxXN844BuDwJQiOoYqDEliwtM6qETz+ B+PnDlNah/AFJxJonyoHSsfRoQ2Ukx5H8T3gmsUitL+fTh5rr2lCr+YfWPAYxwk/p7KwxY PGRRbQjh1vus1LIrIQCVYy9qNLmUVugPJFr/fyiB6SmnXlnIElnFa+aDG5OknCC3OBIiDr Na348PO9X4tgVJDbHVIFq7dNjzRhkO0w8ORAS91+8VPQPu9K3UB33bD7i6k8Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721444349; a=rsa-sha256; cv=none; b=QkuXJEv7vEBE2v+B7/djyMuo8Le4QbkQepwO1A8nlYqCzW/yoHUAnFKOrFw66L+VWj+cDH i13cKzvEBA9ijjBId9ya/d37zcthxHIbGytuxgh1sF2Nxm3/aO5N5XMlt6IGKRjTvzZNby V32+6ob9EgXb1U41svZdkS/8ur0xzmgRccdJml+xfQoahCTpdla+4jW44i/Pjg45kyAyhk wIvu/gFVVGFHDtSs7fKG8SpH6e40zzMEKFEf+IffRJPQbUuu7cm/xVFgjU3skPMt8DDdue HwqhXMbVgjyN5kzewgvaUwaNJ+yIhcKhgDgymF0/k/gAEZ7VuJz7Xc/H/BxcIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FuoJEx59qZqxdCCHexYQhMDYWsY+BuIZj3lGFGIClq4=; b=VX451jb2m+6oZz2MGsG22vKQVKtkLCJuvIU3fsJYaQTlnZoYPxrnts1lqn70RXasFkNea5 q81PN3kfCB6JZiTppJDsp/06hVCuFCAIZ+olPuLcBdY+99D6Sc3srheIfoO2sRNkZneKGb mf+B1Pjmq/GKKjWby1jCNi9WgqzBS1Xp4xl0z40dpKBvVsKt/e5i3Q/ly0Ifdpeq0OVkWS 3BOXPbOhwD0rRHkhUGfPinyW5TCcVBsmeWMmvk35YGxjGRcqVgzuIEzJHYtkMwYhLOs1Da twGFcTsT8rdcRlirIlDdqA0e/cbTh2aXTdY6SEf2xvyWffUxST/HGFs3ki/aTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQrq15mtvzykQ; Sat, 20 Jul 2024 02:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K2x9At024549; Sat, 20 Jul 2024 02:59:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K2x9Uv024546; Sat, 20 Jul 2024 02:59:09 GMT (envelope-from git) Date: Sat, 20 Jul 2024 02:59:09 GMT Message-Id: <202407200259.46K2x9Uv024546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dd6123ebf02b - main - cam/iosched: Log outlier latency events List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd6123ebf02b86cee90b75e54fc755f6c20caebf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dd6123ebf02b86cee90b75e54fc755f6c20caebf commit dd6123ebf02b86cee90b75e54fc755f6c20caebf Author: Warner Losh AuthorDate: 2024-07-20 02:53:08 +0000 Commit: Warner Losh CommitDate: 2024-07-20 02:53:37 +0000 cam/iosched: Log outlier latency events Log outlier latency events to devd. In addition to counting, this will allow analysis of whether the problem is confined to a specific block range, or if it's a more general problem. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46036 --- sys/cam/cam_iosched.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index cfefc8098d18..28b5375ae246 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -1813,7 +1813,6 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp, if (isc->latfcn && isc->max_lat != 0 && sim_latency > isc->max_lat) isc->latfcn(isc->latarg, sim_latency, bp); } - #endif return retval; } @@ -1926,9 +1925,35 @@ static sbintime_t latencies[LAT_BUCKETS - 1] = { BUCKET_BASE << 18 /* 5,242,880us */ }; +#define CAM_IOSCHED_DEVD_MSG_SIZE 256 + +static void +cam_iosched_devctl_outlier(struct iop_stats *iop, sbintime_t sim_latency, + const struct bio *bp) +{ + daddr_t lba = bp->bio_pblkno; + daddr_t cnt = bp->bio_bcount / iop->softc->disk->d_sectorsize; + char *sbmsg; + struct sbuf sb; + + sbmsg = malloc(CAM_IOSCHED_DEVD_MSG_SIZE, M_CAMSCHED, M_NOWAIT); + if (sbmsg == NULL) + return; + sbuf_new(&sb, sbmsg, CAM_IOSCHED_DEVD_MSG_SIZE, SBUF_FIXEDLEN); + + sbuf_printf(&sb, "device=%s%d lba=%jd blocks=%jd latency=%jd", + iop->softc->periph->periph_name, + iop->softc->periph->unit_number, + lba, cnt, sbttons(sim_latency)); + if (sbuf_finish(&sb) == 0) + devctl_notify("CAM", "iosched", "latency", sbuf_data(&sb)); + sbuf_delete(&sb); + free(sbmsg, M_CAMSCHED); +} + static void cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency, - const struct bio *bp __unused) + const struct bio *bp) { sbintime_t y, deltasq, delta; int i; @@ -1938,6 +1963,7 @@ cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency, * configured threshold. */ if (sim_latency > iop->bad_latency) { + cam_iosched_devctl_outlier(iop, sim_latency, bp); iop->too_long++; } From nobody Sat Jul 20 02:59:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQrq55T6rz5QxxL; Sat, 20 Jul 2024 02:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQrq527CPz43Bt; Sat, 20 Jul 2024 02:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKOA/s6wibUUdwbmzaiepVSlmbCPQ0Q2RHHWUTVveuA=; b=sCjdU9nKJV6rj3CpXh18CX44DOnvqQWTSB6kyADMbt2bxY8vBjCU3mWjALbw4Q99J6gTxg OyB3+0tnaQlRjL0y0kR3BGZlv1HTJ8bT6xCnMq9vXzQX7E6LpM+QIV9y6m9Qe4UIjF3u7B jcEW7mFR3y1XfctkoetbqPdJToocjyujt4koTrwCslwTktYpHpxxzIV5v8+s6BDc3Y2ctt 365GHETeK+uX3JWfDuNcxIBscatdKchjOqBhgxxSgDhBlM6Z2apMRnbrKCEFlKSr3FcgMJ teasXaG1l8r5iXYN7s2QPbC4vS9TaXIw1KSgSgR9Pmr2ZNosF0/injabHs2EYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721444353; a=rsa-sha256; cv=none; b=vO3xojcbXSStXdtYn2VszP5awGOAH4K0XnwFjcQRtN7FwY07is9BdkcedeDATJGANomZsa D0xvt69C1X+P2VMNGPteRbCwjCN/D11sVZZqZyD+mcQjepA4IIqA+9S73aDBQVMtuA2Pk3 u8J7Lr9Fzz/35+hNZxEdZAdZD4BXlrZDcHJjwhZM8w7fgVfWnR2g/tVRa5GYoOL6aDJvi5 6AGENgx6JdGHSL0Az7PWHSD1fBYvUJ+kVuxtyIpDXDBo0EPL5At/wHQpdCH08NA3bxtbfV J2PRAWXQ4ed8XIIrNVMFbGFRKHiIdhcPRSIBaqpxNGZAtNROLBQgXmHsZeG/JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKOA/s6wibUUdwbmzaiepVSlmbCPQ0Q2RHHWUTVveuA=; b=iHBvFGkTTxI8SCQZbtsclfPwevKK+X3P4JEzqcMmitGReyPwI4ymu+0g1Pp7YNf3ec9OWp KWvRdjQDZeVWJumRQdj94pDeGScZzkqXBiLbrHMAWlj1AslP60NtiAB8vGWMqPu2IKIfeS z+0MGlj2FdNX2h1YB/v8gmVA8VMJplLAQZ5geDlt3xmqz8BZPhvblrAB8e7Igk0YuCll3J iZJ1QW2HovyrEPZUsZBqvgypWrcVjHn4pmzeLQpoY0jGNhO5bZ26OoEn8O9AnQ1S8RYReI Dy3TGju8CZDs6KCnLhOEGegW8fliLPWHnaGL1DDRBqdai/sTIbbnjBYS4WTnKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQrq513GgzykR; Sat, 20 Jul 2024 02:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K2xD7s024705; Sat, 20 Jul 2024 02:59:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K2xDPs024702; Sat, 20 Jul 2024 02:59:13 GMT (envelope-from git) Date: Sat, 20 Jul 2024 02:59:13 GMT Message-Id: <202407200259.46K2xDPs024702@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 123e29068ecf - main - nvme: widen nvme_qpair_manual_complete_request for better errors List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 123e29068ecf6d7c235061480967aadc153f68d4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=123e29068ecf6d7c235061480967aadc153f68d4 commit 123e29068ecf6d7c235061480967aadc153f68d4 Author: Warner Losh AuthorDate: 2024-07-20 02:56:04 +0000 Commit: Warner Losh CommitDate: 2024-07-20 02:56:04 +0000 nvme: widen nvme_qpair_manual_complete_request for better errors Make nvme_qpair_manual_complete_request take dnr as well as a print_on_error action. Make the status word computation common between it and nvme_qpair_manual_complete_tracker. And print the error when we are cancelling the I/O on failure, but not when we're filtering the I/O after we've failed. Make it private again to nvme_qpair.c. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46049 --- sys/dev/nvme/nvme_private.h | 3 --- sys/dev/nvme/nvme_qpair.c | 37 +++++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 8415819ca20b..ff08f6581db5 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -417,9 +417,6 @@ void nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req); void nvme_qpair_reset(struct nvme_qpair *qpair); void nvme_qpair_fail(struct nvme_qpair *qpair); -void nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, - struct nvme_request *req, - uint32_t sct, uint32_t sc); void nvme_admin_qpair_enable(struct nvme_qpair *qpair); void nvme_admin_qpair_disable(struct nvme_qpair *qpair); diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 9b3fe58c312c..755be993cee0 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -482,6 +482,20 @@ nvme_qpair_complete_tracker(struct nvme_tracker *tr, mtx_unlock(&qpair->lock); } +static uint32_t +nvme_qpair_make_status(uint32_t sct, uint32_t sc, uint32_t dnr) +{ + uint32_t status = 0; + + status |= NVMEF(NVME_STATUS_SCT, sct); + status |= NVMEF(NVME_STATUS_SC, sc); + status |= NVMEF(NVME_STATUS_DNR, dnr); + /* M=0 : this is artificial so no data in error log page */ + /* CRD=0 : this is artificial and no delayed retry support anyway */ + /* P=0 : phase not checked */ + return (status); +} + static void nvme_qpair_manual_complete_tracker( struct nvme_tracker *tr, uint32_t sct, uint32_t sc, uint32_t dnr, @@ -496,30 +510,24 @@ nvme_qpair_manual_complete_tracker( cpl.sqid = qpair->id; cpl.cid = tr->cid; - cpl.status |= NVMEF(NVME_STATUS_SCT, sct); - cpl.status |= NVMEF(NVME_STATUS_SC, sc); - cpl.status |= NVMEF(NVME_STATUS_DNR, dnr); - /* M=0 : this is artificial so no data in error log page */ - /* CRD=0 : this is artificial and no delayed retry support anyway */ - /* P=0 : phase not checked */ + cpl.status = nvme_qpair_make_status(sct, sc, dnr); nvme_qpair_complete_tracker(tr, &cpl, print_on_error); } -void +static void nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, - struct nvme_request *req, uint32_t sct, uint32_t sc) + struct nvme_request *req, uint32_t sct, uint32_t sc, uint32_t dnr, + error_print_t print_on_error) { struct nvme_completion cpl; bool error; memset(&cpl, 0, sizeof(cpl)); cpl.sqid = qpair->id; - cpl.status |= NVMEF(NVME_STATUS_SCT, sct); - cpl.status |= NVMEF(NVME_STATUS_SC, sc); - + cpl.status = nvme_qpair_make_status(sct, sc, dnr); error = nvme_completion_is_error(&cpl); - if (error) { + if (error && print_on_error == ERROR_PRINT_ALL) { nvme_qpair_print_command(qpair, &req->cmd); nvme_qpair_print_completion(qpair, &cpl); } @@ -1277,7 +1285,8 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) */ if (qpair->ctrlr->is_failed) { nvme_qpair_manual_complete_request(qpair, req, - NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, 1, + ERROR_PRINT_NONE); return; } @@ -1512,7 +1521,7 @@ nvme_qpair_fail(struct nvme_qpair *qpair) STAILQ_REMOVE_HEAD(&qpair->queued_req, stailq); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_request(qpair, req, NVME_SCT_GENERIC, - NVME_SC_ABORTED_BY_REQUEST); + NVME_SC_ABORTED_BY_REQUEST, 1, ERROR_PRINT_ALL); mtx_lock(&qpair->lock); } From nobody Sat Jul 20 02:59:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQrq45ZnXz5QxZ3; Sat, 20 Jul 2024 02:59:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQrq30BFdz4362; Sat, 20 Jul 2024 02:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bHA81zFaHwihW/riNVa8v1JJS1NwN/4BOgZTAq6Vsm4=; b=kqra7vrkEcZOsl87SeFgxY4X4CWscpzTMF23KsJ6a6EpSxk7gj2f34VSpO6Hj0SYsVoKNN 1jc34QcGBkt72K7XCTs4hH2tLaL1bc9+/XElxQgEorbxnz84Pc74aCvDXI6d7RfYr8pjWw MkRG1VVzUA88ci1+Tr9f3Ap2kQLyIt5YOZycBIcpva9IwOHjJMTZinC3LesQWMmJuBQ+iy QkCjWIdEpL9mgtFCiYuOWSqwQk/Se5sRddC02NmIe7KT8VmzclLogjIsVuB+7/Peg1eUE+ UnJ1P22nJi0yN24b1j0kxG4RR37n9zJ37ilQIV5U2LeKZcbUSSpWR1s9Ya4GFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721444351; a=rsa-sha256; cv=none; b=flEJhVuXS/h7hTLR/HXofL7+tmTgrcv79yhQxwYB5guOx8Q9JfPb2fvcTd0oq744hua47B G7YaKuCGDjzGstSVOMs6QTHzwTMMjGv+vTIg7s/C4smIJT8vGltpnr/1UsUB6Bc14msMjF k3ch7yX85kQh3uU9goPrMyvGQwILcNOM++m+IGE4MKdWtidLnXf0xs58sxLw2jEBWX6TsC PxoV81VOO8Ag02zAYKFpHraeK/PrgRVbSNzrGFT+TaxJix50GeVMXptpGygCNqij9vZh45 aAucDDOH4xO1P/5QtRIe5uC/X6TuGQrlJvbpdYK65nnr8Dn0L6LojAi2e2BliA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bHA81zFaHwihW/riNVa8v1JJS1NwN/4BOgZTAq6Vsm4=; b=xHnCub5jWnTFX3hAFt5tiugQ/m5a/7vs3i6IESjAw6IQKRHAcSpcf/jf/B30L80bQnjSH/ llicnyZ0Ky8s+Kocf0or8UcDXxf7u1RIlt5m664x07N3eMLo8SEqrqgtsD8bEkTfVjn2He qhF9jzLZeCzN9Kb29VN8NBX3taZwOUemilp64BW3jJZjB92ycLncmHjQU5lWxY/cp4Io8X HyUXNqd1oXkVID96IZSXH0tvqtcaslw7EALuKAaIQ46i2118OGJdDhoVgCz/9mwpv5eeaS 2q4PRAuWm9aHoV7ijQCMJbG06fbE9OD4XHlhzVPEUYNlEA+Fr3Geg3TkP1Sepg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQrq26sw9zytQ; Sat, 20 Jul 2024 02:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K2xAej024600; Sat, 20 Jul 2024 02:59:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K2xAUc024597; Sat, 20 Jul 2024 02:59:10 GMT (envelope-from git) Date: Sat, 20 Jul 2024 02:59:10 GMT Message-Id: <202407200259.46K2xAUc024597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9cbf3d618273 - main - cam/iosched: Make each periph driver provide schedule fnp List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cbf3d618273e09cdc7e18e878b33b9305836ad8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9cbf3d618273e09cdc7e18e878b33b9305836ad8 commit 9cbf3d618273e09cdc7e18e878b33b9305836ad8 Author: Warner Losh AuthorDate: 2024-07-20 02:53:17 +0000 Commit: Warner Losh CommitDate: 2024-07-20 02:53:37 +0000 cam/iosched: Make each periph driver provide schedule fnp When we init the iosched instance, require clients to provide a schedule function. We have almost, but not quite everything to know when it is safe to schedule new I/O. The periph drivers, however, have all the information, so make them do it when the I/O Scheduler needs to maybe schedule I/O for rate limiting, etc. and use it to do that. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46038 --- sys/cam/ata/ata_da.c | 3 ++- sys/cam/cam_iosched.c | 6 ++++-- sys/cam/cam_iosched.h | 3 ++- sys/cam/nvme/nvme_da.c | 3 ++- sys/cam/scsi/scsi_da.c | 3 ++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 2c1183b74c1d..ae7cf14c8f8e 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -1913,7 +1913,8 @@ adaregister(struct cam_periph *periph, void *arg) softc->disk->d_drv1 = periph; softc->disk->d_unit = periph->unit_number; - if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk) != 0) { + if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk, + adaschedule) != 0) { printf("adaregister: Unable to probe new device. " "Unable to allocate iosched memory\n"); free(softc, M_DEVBUF); diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 28b5375ae246..5f171e402ed2 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -315,6 +315,7 @@ struct cam_iosched_softc { struct bio_queue_head bio_queue; struct bio_queue_head trim_queue; const struct disk *disk; + cam_iosched_schedule_t schedfnc; /* scheduler flags < 16, user flags >= 16 */ uint32_t flags; int sort_io_queue; @@ -619,7 +620,7 @@ cam_iosched_ticker(void *arg) cam_iosched_limiter_tick(&isc->write_stats); cam_iosched_limiter_tick(&isc->trim_stats); - cam_iosched_schedule(isc, isc->periph); + isc->schedfnc(isc->periph); /* * isc->load is an EMA of the pending I/Os at each tick. The number of @@ -1155,13 +1156,14 @@ cam_iosched_cl_sysctl_fini(struct control_loop *clp) */ int cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph, - const struct disk *dp) + const struct disk *dp, cam_iosched_schedule_t schedfnc) { *iscp = malloc(sizeof(**iscp), M_CAMSCHED, M_NOWAIT | M_ZERO); if (*iscp == NULL) return ENOMEM; (*iscp)->disk = dp; + (*iscp)->schedfnc = schedfnc; #ifdef CAM_IOSCHED_DYNAMIC if (iosched_debug) printf("CAM IOSCHEDULER Allocating entry at %p\n", *iscp); diff --git a/sys/cam/cam_iosched.h b/sys/cam/cam_iosched.h index e1019c531579..54f9a7c02a25 100644 --- a/sys/cam/cam_iosched.h +++ b/sys/cam/cam_iosched.h @@ -79,9 +79,10 @@ cam_iosched_sbintime_t(uintptr_t delta) } typedef void (*cam_iosched_latfcn_t)(void *, sbintime_t, struct bio *); +typedef void (*cam_iosched_schedule_t)(struct cam_periph *periph); int cam_iosched_init(struct cam_iosched_softc **, struct cam_periph *periph, - const struct disk *dp); + const struct disk *dp, cam_iosched_schedule_t schedfnp); void cam_iosched_fini(struct cam_iosched_softc *); void cam_iosched_sysctl_init(struct cam_iosched_softc *, struct sysctl_ctx_list *, struct sysctl_oid *); struct bio *cam_iosched_next_trim(struct cam_iosched_softc *isc); diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 1a93ea71ba77..1c0d5e8381d8 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -946,7 +946,8 @@ ndaregister(struct cam_periph *periph, void *arg) DEVSTAT_TYPE_DIRECT | XPORT_DEVSTAT_TYPE(cpi.transport), DEVSTAT_PRIORITY_DISK); - if (cam_iosched_init(&softc->cam_iosched, periph, disk) != 0) { + if (cam_iosched_init(&softc->cam_iosched, periph, disk, + ndaschedule) != 0) { printf("ndaregister: Unable to probe new device. " "Unable to allocate iosched memory\n"); free(softc, M_DEVBUF); diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 4ecf8c35aca2..1a6df6171b66 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -2973,7 +2973,8 @@ daregister(struct cam_periph *periph, void *arg) snprintf(softc->disk->d_attachment, sizeof(softc->disk->d_attachment), "%s%d", cpi.dev_name, cpi.unit_number); - if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk) != 0) { + if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk, + daschedule) != 0) { printf("daregister: Unable to probe new device. " "Unable to allocate iosched memory\n"); free(softc, M_DEVBUF); From nobody Sat Jul 20 02:59:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQrq55S5Pz5QxxK; Sat, 20 Jul 2024 02:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQrq442V1z438m; Sat, 20 Jul 2024 02:59:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prHUlp6TLCbIick2noDkmoC5LdAv4w8/9m1ENF+ZdkM=; b=bOjSw1v8IzfaroDNHRlA/sEGk7x++5OoAsjeUs26GZ+xxoDln7iLlQ5aLGlk8GEQAYzFLL ddJz3unyxsk1Y7atLhVIWNXsQgdH5atsu/ZjbUXjdFrr8cEQapqjam7fij7FZNsTt+PZOF 5hTW1u+v00CSxbQqWcp+d6rOEmGiZwXCAKAIf3QbBlTVYz+UxR5OqhlbLr/Eed+P4xGpP3 01U2dh+sW6Ya57Bu1Qv4tgRJ2ywjr4gp2hClV4Gj+ItIGqpur0dhyxCiFRR5RcBAysKSko kLG4bzHfVkhrANmwUvN3tEd8gFdXWmNyK89+pj10/Pi9KDAgwD1h/rv2WjzM4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721444352; a=rsa-sha256; cv=none; b=P//zVt8AZu8XFAuwOPDbt3qeZfOCC67gBU7lEGyfbA3Vsn1cYrZa3AW9Z/nd67kb60fNQA Fa9oaFLBz4doaPJxLaOlhnBBAJMAumaTuQ7J85nYB5oQKnjWfFaHHNkDIBZd2P4edQqi8t /zdZE69YEEQkaW5Oy5GgeEsO27rat1K0+xZeomnXp64bGWzb4bqwXPkX/99symIOYKqBA5 L6Y0G+g7ADcrEjcarlPG85WUpAzB/8WQddNwi9VAMRr3EWAyB0DkgPeC+WmtUrtNsQVdak 7SNCfACbI+kdcbT/a/UvMJhdmkG+4CWjoioMxnzhSj8Rth8av+vkg5zqM1N/LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prHUlp6TLCbIick2noDkmoC5LdAv4w8/9m1ENF+ZdkM=; b=glqPw559ItTsLqniQjUL90PXeITuM+ABygR971xrZkpCsD3cAfJi2SyG62UTSg5jvkj3oI uA8HXK8FvTlfCPm3R723MnhLcHb72VslnyuKodJ1fNKSdu4+A2vanKZLSdX/ctFHiilLYV xz/ehAo3gE0NZgZ8z+S0JK/Sw6oi/UQ8SvYhR8CldYIQdfYNA/0JZuBnaFGUqunjUcClb5 R1WDmi3LXOWcBAUhseI5mdrFVTk4SF/i2wzyxcWKh1MVbUrvJiJzMQnTsjudTOLHo9w2ut SbPgqNSJLc4zn9vQ73czyj1O3ut/A6Q1shBZX1xVrGSYm6MhjUBNqOJxNwNpwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQrq40JM2zyDN; Sat, 20 Jul 2024 02:59:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K2xB8D024654; Sat, 20 Jul 2024 02:59:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K2xBR4024651; Sat, 20 Jul 2024 02:59:11 GMT (envelope-from git) Date: Sat, 20 Jul 2024 02:59:11 GMT Message-Id: <202407200259.46K2xBR4024651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9229b3105d88 - main - nvme: Fail passthrough commands right away in failed state. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9229b3105d88d44012f2c7f85344da42e857ba91 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9229b3105d88d44012f2c7f85344da42e857ba91 commit 9229b3105d88d44012f2c7f85344da42e857ba91 Author: Warner Losh AuthorDate: 2024-07-20 02:55:52 +0000 Commit: Warner Losh CommitDate: 2024-07-20 02:55:52 +0000 nvme: Fail passthrough commands right away in failed state. When the drive is failed, we can't send passthrough commands to the card, so fail them right away. Rearrange the comments to reflect the current failure paths in the driver. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46048 --- sys/dev/nvme/nvme_qpair.c | 58 ++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 5be6c151bbea..9b3fe58c312c 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1267,41 +1267,31 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) tr = TAILQ_FIRST(&qpair->free_tr); req->qpair = qpair; - if (tr == NULL || qpair->recovery_state != RECOVERY_NONE) { - /* - * No tracker is available, or the qpair is disabled due to an - * in-progress controller-level reset. If we lose the race with - * recovery_state, then we may add an extra request to the queue - * which will be resubmitted later. We only set recovery_state - * to NONE with qpair->lock also held, so if we observe that the - * state is not NONE, we know it can't transition to NONE below - * when we've submitted the request to hardware. - * - * Also, as part of the failure process, we set recovery_state - * to RECOVERY_WAITING, so we check here to see if we've failed - * the controller. We set it before we call the qpair_fail - * functions, which take out the lock lock before messing with - * queued_req. Since we hold that lock, we know it's safe to - * either fail directly, or queue the failure should is_failed - * be stale. If we lose the race reading is_failed, then - * nvme_qpair_fail will fail the queued request. - */ + /* + * The controller has failed, so fail the request. Note, that this races + * the recovery / timeout code. Since we hold the qpair lock, we know + * it's safe to fail directly. is_failed is set when we fail the controller. + * It is only ever reset in the ioctl reset controller path, which is safe + * to race (for failed controllers, we make no guarantees about bringing + * it out of failed state relative to other commands). + */ + if (qpair->ctrlr->is_failed) { + nvme_qpair_manual_complete_request(qpair, req, + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); + return; + } - if (qpair->ctrlr->is_failed) { - /* - * The controller has failed, so fail the request. - */ - nvme_qpair_manual_complete_request(qpair, req, - NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); - } else { - /* - * Put the request on the qpair's request queue to be - * processed when a tracker frees up via a command - * completion or when the controller reset is - * completed. - */ - STAILQ_INSERT_TAIL(&qpair->queued_req, req, stailq); - } + /* + * No tracker is available, or the qpair is disabled due to an + * in-progress controller-level reset. If we lose the race with + * recovery_state, then we may add an extra request to the queue which + * will be resubmitted later. We only set recovery_state to NONE with + * qpair->lock also held, so if we observe that the state is not NONE, + * we know it won't transition back to NONE without retrying queued + * request. + */ + if (tr == NULL || qpair->recovery_state != RECOVERY_NONE) { + STAILQ_INSERT_TAIL(&qpair->queued_req, req, stailq); return; } From nobody Sat Jul 20 04:22:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQtgX1CtTz5R5wW; Sat, 20 Jul 2024 04:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQtgX0c2yz4Fx9; Sat, 20 Jul 2024 04:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721449368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VOvyiFQB0ucSwmJNf3H6/KFep0EaXXvXZhpTVrUby/E=; b=NEvwJTsdiysS19wnpFl3R091NoWvOg7tvhJSuhVZjmTv/C9lXqZqvk0BOWhVMcpDegr9on HFqmblHsNBMd3URg/mYKx+zbqVOr0Acuri7qu5yXvTHBr1yZ8ClgM1m9YhcwNQqOYIs0iv Ri493zStnH1uI/yqUZoTSBZqTFzwikCqtqWM9z8roTHfabvRL3IB6vU/TlLOlMnu9EXF5c 8CgJbR6lJk83e8oADEwPJCVNufwWKfkwtt7vVKzBBqDGmNckLZjHDh0KBZ/vZchDAmV+mb L80uuKJdQubXqqRz1JzlzQO/xtfWmoOxZtByHuoVlfP+pHcdP2SmYn53omM8oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721449368; a=rsa-sha256; cv=none; b=YKmNioeyjA0spELtwQOaP3EYgC5df9nZqmRTpxRXqAd5L8VQxrZDNpXcyzP9AdHxmYrTv3 8erL8yDlZOB96aMPF2V7Ojgs5y/ekDwdbHOJKHux0dM8KfLjmqelGmCLOlBa8NWdYZpnK5 W+6PH8KIyrPN0i1K9teisemFDbryfK9TTqmxcXo0Wt4udKieG3KxPiXqWfRM2XYZrCCm0a I0CGeO9fLxr2iW69OLkc2Wa43safJoAHcZCQDDyk6+/4WPhVHXx/wMH6Zyl6Gd6uj1qupJ dohGFsmMDkNBTorX+4XRf4Qo9Rs9HsD95aSiAU8CWYaUQ1FNgy/GcZxDinqgcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721449368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VOvyiFQB0ucSwmJNf3H6/KFep0EaXXvXZhpTVrUby/E=; b=X2qDawHnoxja9haJOtRAkthLfe38NH4bF1SUx1YcREdEiQTuJdQDgLPqvN48+Eg8atVU6s +dPh0bFFLi0miVS6Suxp17Ef7Ul+cZbKfm48YdyXjXCSh/Zj/Fh/v1TQs40t8rRFU5OLXD Mh1u5OzYqKkG470HOawfYCoxba3Ur3VLNdaQ++gg06SZrQ297h+ZnC606EWLG+R48kj5Nc 4XWQKfwQ2X687ei+VHtWKWxx8sQQJ3/1k9ouVW7hdj62uDHRCTILu+qW9ZjV+H09elg3o5 92Z0HJl4oiByXvCufI3mzmqB/iiyKu4ORlKiw/JKua51F8l4jmsDFXSUCAiZjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WQtgX0CfJz11q8; Sat, 20 Jul 2024 04:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K4MlAq079424; Sat, 20 Jul 2024 04:22:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K4Ml5C079421; Sat, 20 Jul 2024 04:22:47 GMT (envelope-from git) Date: Sat, 20 Jul 2024 04:22:47 GMT Message-Id: <202407200422.46K4Ml5C079421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 403cc016c07a - main - cam/iosched: Fix build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 403cc016c07aada3ee0a578e484297df452b8bb3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=403cc016c07aada3ee0a578e484297df452b8bb3 commit 403cc016c07aada3ee0a578e484297df452b8bb3 Author: Warner Losh AuthorDate: 2024-07-20 04:16:59 +0000 Commit: Warner Losh CommitDate: 2024-07-20 04:16:59 +0000 cam/iosched: Fix build I was testing this in several trees, and this chunk was in the tree I tested. I didn't detect the mismerge before the commit... Fixes: 6f1dd6071a91 Sponsored by: Netflix --- sys/cam/cam_iosched.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 5f171e402ed2..4f4a2b2cde55 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -48,6 +48,8 @@ #include +#include + static MALLOC_DEFINE(M_CAMSCHED, "CAM I/O Scheduler", "CAM I/O Scheduler buffers"); From nobody Sat Jul 20 08:53:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WR0hM6PJSz5RHKt; Sat, 20 Jul 2024 08:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WR0hM5n5jz4fsk; Sat, 20 Jul 2024 08:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721465635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IiIvc0o++3Y7NJ5AA6OgDeB0PN0q7AtgJSwrf+qRZIk=; b=dWYl4X635nvcqeJ0DdpizxE1F81p1mMjnCkwDSVOEZKSjmWwM6qBFz21WIFZdy+ltoVHiF KXHRo60nqQAi3VY2ve7mu76xUG43wp1A0WGl4d4+46a4z03nWyBaD5aiQ7zqHFv5xk7le7 eu+G0kJnZm7IoGrQXDDkMlO8o5LcsSXDM68x7+e00u7MouUjPHTl0w47ZKWYeGp4HhAdph DhiQ5kUEsfbspDWbwuJ0s0acq+1JG7edrHa0u+Xrm82hUN43cphASURw1GjCK2T2lQ/fib hIYt8wn772iymHtp0CjX2oiI+3BaN3uZU+GRNrU26c4EFRJE/yRUiNpc7zh9bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721465635; a=rsa-sha256; cv=none; b=Xs1ToS5I8whTvIfAUNT/ZMXXOg89le1lg8do3VrQVIhgjWR+TWQLAsllwXeG/f/L5qWk7O Nr4lzRv+obPvzZe/+dnxdBGKGVm8BmlXh8fRJc4aC7J1i1MQEHpiRfUqJPxDQPZrI3P4bR 9X4cA7l1tQl7VNC0iTAqDhXlw8aEVXyq6EhzY4oGsYf5AO33cfSH9G3cNFvr6LRjXcr1+7 SMtasgdaWrXMt+64V9gxjq86seXI+crT0D7BBzhYqO1Nt1VP+6wXzkSTGcUFHhKK6z+TAs UJbRWVsf/nIpZHaRqnLi/l3k9Mt61ZFy1XfxAKcef8OshoW5UPCxJMjgsy3d8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721465635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IiIvc0o++3Y7NJ5AA6OgDeB0PN0q7AtgJSwrf+qRZIk=; b=A1qS4kibfL/kWq/B2Tri4lfnRSV3kDrx0X7SLfwmMFzW7n4Vp/TcYI1h10grx2++1I7G38 pYcTQFKGeSIMOlxW8bLxQK5VvCGrZMizMdPp+T+Vvw++LpIJ7KLBQOtX1k+VKcqQUITxs3 IdqlMRi1mKjgmPSYj1nYMYf2reYAXsRigNicjikSwBriS3poJX47PC97ZRLIRAT39aew88 7okCaR34f69zzZkJ0z89OPpqwgeh37lAMiHabdaRxbS7Ljzfut0HRsJhNllkjj/DxyinYF Ls3zSxSZUTRIoW0oPjVEZPJ31qQvWgYaYmN+h+A6NRjfHFgMM/eCKZlcNCml9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WR0hM5L8Cz19D6; Sat, 20 Jul 2024 08:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K8rtbm034954; Sat, 20 Jul 2024 08:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K8rtPY034951; Sat, 20 Jul 2024 08:53:55 GMT (envelope-from git) Date: Sat, 20 Jul 2024 08:53:55 GMT Message-Id: <202407200853.46K8rtPY034951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 00266393cc4b - main - stress2: Fix tests after the new default for newfs(8) is "SU" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00266393cc4b15e064617e334b1697d98dd6a827 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=00266393cc4b15e064617e334b1697d98dd6a827 commit 00266393cc4b15e064617e334b1697d98dd6a827 Author: Peter Holm AuthorDate: 2024-07-20 08:52:29 +0000 Commit: Peter Holm CommitDate: 2024-07-20 08:52:29 +0000 stress2: Fix tests after the new default for newfs(8) is "SU" --- tools/test/stress2/misc/creat.sh | 1 + tools/test/stress2/misc/fsck10.sh | 1 + tools/test/stress2/misc/fsck11.sh | 1 + tools/test/stress2/misc/fsck13.sh | 1 + tools/test/stress2/misc/mkdir.sh | 1 + tools/test/stress2/misc/nullfs18.sh | 1 + tools/test/stress2/misc/perf.sh | 1 + tools/test/stress2/misc/softupdate.sh | 1 + tools/test/stress2/misc/symlink.sh | 1 + tools/test/stress2/misc/symlink2.sh | 1 + tools/test/stress2/misc/symlink5.sh | 1 + 11 files changed, 11 insertions(+) diff --git a/tools/test/stress2/misc/creat.sh b/tools/test/stress2/misc/creat.sh index 45f6b0f87301..1abab774ed7f 100755 --- a/tools/test/stress2/misc/creat.sh +++ b/tools/test/stress2/misc/creat.sh @@ -44,6 +44,7 @@ mdconfig -a -t swap -s 100m -u $mdstart [ $# -eq 1 ] && flags="$@" || flags="-Un" echo "newfs $flags /dev/md$mdstart" newfs $flags /dev/md$mdstart > /dev/null +[ "$flags" = "" ] && tunefs -n disable md$mdstart mount /dev/md$mdstart $mntpoint set +e diff --git a/tools/test/stress2/misc/fsck10.sh b/tools/test/stress2/misc/fsck10.sh index 30479e0dfebb..33ad35f65f11 100755 --- a/tools/test/stress2/misc/fsck10.sh +++ b/tools/test/stress2/misc/fsck10.sh @@ -67,6 +67,7 @@ backups=`newfs -N $newfs_flags md$u2 | grep -A1 "super-block backups" | \ tail -1 | sed 's/,//g'` echo "newfs $newfs_flags -n md$u2" newfs $newfs_flags -n md$u2 > /dev/null +[ "$newfs_flags" = "" ] && tunefs -n disable md$u2 set +e chk() { diff --git a/tools/test/stress2/misc/fsck11.sh b/tools/test/stress2/misc/fsck11.sh index 8019cc1f2656..de4cf2536dad 100755 --- a/tools/test/stress2/misc/fsck11.sh +++ b/tools/test/stress2/misc/fsck11.sh @@ -71,6 +71,7 @@ backups=`newfs -N $newfs_flags md$u2 | grep -A1 "super-block backups" | \ tail -1 | sed 's/,//g'` echo "newfs $newfs_flags -n md$u2" newfs $newfs_flags -n md$u2 > /dev/null +[ "$newfs_flags" = "" ] && tunefs -n disable md$u2 set +e chk() { diff --git a/tools/test/stress2/misc/fsck13.sh b/tools/test/stress2/misc/fsck13.sh index f279e0bae066..3b8dc64d12b9 100755 --- a/tools/test/stress2/misc/fsck13.sh +++ b/tools/test/stress2/misc/fsck13.sh @@ -78,6 +78,7 @@ backups=`newfs -N $flags md$u2 | grep -A1 "super-block backups" | \ tail -1 | sed 's/,//g'` echo "newfs $flags /dev/md$u2" newfs $flags md$u2 > /dev/null +[ "$newfs_flags" = "" ] && tunefs -n disable md$u2 mdconfig -d -u $u2 chk() { diff --git a/tools/test/stress2/misc/mkdir.sh b/tools/test/stress2/misc/mkdir.sh index 39cc828f0303..734b8994ad4e 100755 --- a/tools/test/stress2/misc/mkdir.sh +++ b/tools/test/stress2/misc/mkdir.sh @@ -44,6 +44,7 @@ mdconfig -a -t swap -s 100m -u $mdstart [ $# -eq 1 ] && flags="$@" || flags="-Un" echo "newfs $flags /dev/md$mdstart" newfs $flags /dev/md$mdstart > /dev/null +[ "$flags" = "" ] && tunefs -n disable md$mdstart mount /dev/md$mdstart $mntpoint set +e diff --git a/tools/test/stress2/misc/nullfs18.sh b/tools/test/stress2/misc/nullfs18.sh index b4414cbc3e3e..3936ea64c6a3 100755 --- a/tools/test/stress2/misc/nullfs18.sh +++ b/tools/test/stress2/misc/nullfs18.sh @@ -41,6 +41,7 @@ mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart mdconfig -a -t swap -s 2g -u $mdstart || exit 1 newfs -n md$mdstart > /dev/null +tunefs -n disable md$mdstart 2>/dev/null mount /dev/md$mdstart $mntpoint chmod 777 $mntpoint diff --git a/tools/test/stress2/misc/perf.sh b/tools/test/stress2/misc/perf.sh index 58f5bd67b756..de6c20028c59 100755 --- a/tools/test/stress2/misc/perf.sh +++ b/tools/test/stress2/misc/perf.sh @@ -84,6 +84,7 @@ tst() { s=0 for i in "" "-U" "-j"; do newfs $i /dev/md$mdstart > /dev/null 2>&1 + [ "$i" = "" ] && tunefs -n disable md$mdstart mount /dev/md$mdstart $mntpoint t1=`date +%s` diff --git a/tools/test/stress2/misc/softupdate.sh b/tools/test/stress2/misc/softupdate.sh index ecf7c5d04e9c..37f819579f83 100755 --- a/tools/test/stress2/misc/softupdate.sh +++ b/tools/test/stress2/misc/softupdate.sh @@ -47,6 +47,7 @@ mdconfig -a -t vnode -f $D -u $mdstart for mode in "" "-U"; do printf "newfs -O2 $mode /dev/md${mdstart}\n\n" newfs -O2 $mode /dev/md$mdstart > /dev/null 2>&1 + [ "$mode" = "" ] && tunefs -n disable md$mdstart mount /dev/md$mdstart $mntpoint for i in `jot 5`; do diff --git a/tools/test/stress2/misc/symlink.sh b/tools/test/stress2/misc/symlink.sh index 47257aa92a24..1d30636d6b25 100755 --- a/tools/test/stress2/misc/symlink.sh +++ b/tools/test/stress2/misc/symlink.sh @@ -71,6 +71,7 @@ tst() { s=0 for i in "" "-U" "-j"; do newfs $i /dev/md$mdstart > /dev/null 2>&1 + [ "$i" = "" ] && tunefs -n disable md$mdstart mount /dev/md$mdstart $mntpoint t1=`date +%s` diff --git a/tools/test/stress2/misc/symlink2.sh b/tools/test/stress2/misc/symlink2.sh index f13065badb4a..210702defe4a 100755 --- a/tools/test/stress2/misc/symlink2.sh +++ b/tools/test/stress2/misc/symlink2.sh @@ -53,6 +53,7 @@ for i in "" "-U"; do [ "$i" = "-U" -a "$newfs_flags" != "-U" ] && continue echo "newfs $i /dev/md$mdstart" newfs $i /dev/md$mdstart > /dev/null 2>&1 + [ "$i" = "" ] && tunefs -n disable md$mdstart mount /dev/md$mdstart $mntpoint mkdir $mntpoint/dir diff --git a/tools/test/stress2/misc/symlink5.sh b/tools/test/stress2/misc/symlink5.sh index 55f71e209791..9332f906a3e0 100755 --- a/tools/test/stress2/misc/symlink5.sh +++ b/tools/test/stress2/misc/symlink5.sh @@ -79,6 +79,7 @@ for i in "" "-U"; do t1=`date +%s` echo "newfs $i /dev/md$mdstart" newfs $i /dev/md$mdstart > /dev/null 2>&1 + [ "$i" = "" ] && tunefs -n disable md$mdstart mount /dev/md$mdstart $mntpoint tst; s=$? From nobody Sat Jul 20 15:50:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WR9xb0ZbHz5RtCQ; Sat, 20 Jul 2024 15:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WR9xZ2Scbz4RgC; Sat, 20 Jul 2024 15:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721490658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=evO/UV4DttvPzxEmUyRQVLmdbPUZLVuzhnUL6BXS6RY=; b=ZiilPv2m93enp0dxa+4Sm7I1sztNUlIKM7lovirrT1W/AktsDLi2Ad9YHfu6au/w0HLBaF WBd7pYtpx7/ox3DO0HrQiB3k6F/x5XePPegGmzKZaxhm2hW9kt4LAEy6fejUWBPzco+Kpq DtDwhRQ02lMm42rxS7lf7Rdpzx3qfaAFyrK7Cr5FbU5hwG326a+9ImbJWTHJiGlJl+Q+8E s4rx5OrRQc/x4sERF6LVIKJPvDq20si58PM+iWWqxoY3J4hrBPvnRVOogc0wq9c20QYsUT id2NtM/6Crimik5RceO4+uSHcjBBjsW38dg3jBrHyZ83fenm/Z23fdnyANxevg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721490658; a=rsa-sha256; cv=none; b=CiTyRWLxVD2i/L6FnhaULTUALPb2tJjfY4vUd21aiJ2IrPvnJ/0J03ziDLFr6Jo28T+N1A WchB++HQW6pKVi7duNKhcHPzKUXIW3URv5yTrPvPgm/Y6MS5bEvsItgBEcISYJsOif/e19 4J8lAEJSkjir1dAMr6U6+1M+paX2QaIrFXS+xT/8UpXT+HZkuuS9h1+2esPNEfDbZcSs3Q 4bJsEVnGE5orY5jvnOu3czj2SlVFOrqoBdjp+Bsa58hC0E/2GZPpSx3ljIaeejVC1DqJRs l9xbGfh5QfwPQglnxBMPWbqWK3cxT0SrCPLSCHrf6OElwFHNoIdle75h1RbbqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721490658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=evO/UV4DttvPzxEmUyRQVLmdbPUZLVuzhnUL6BXS6RY=; b=silG5LsLDTMxe+k720WYrtnWkG1bxUGBAbT3/sJHvDMXHHWzzP0mxoQdD8Tj+nFeBAc3J4 0DtFdai3nMKZwbR00yZv5w9IaVHeL+cJF7HbbbwF5DJOPnT800vcQNDND3/WxyRb5ItmlC XArKYJ7i+yJwjEyjyV3JyffaHm1QLguTlFBqNpfauho+e3XZy11KPuzKtQbjUuOplw63so PSvgPLv1EOm8e9lu+F70nRWNbqH6vIR5ADjOXjfgfhh5rFQVDKGyeEQt2Ho0ha/TcHLIIc 5i9mUWcRNDfn/L7d1WTK8MyH15Vw5PHHXHseYTsid6yrb0P7USo/CC++oGaStA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WR9xZ24B5zN04; Sat, 20 Jul 2024 15:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46KFowPE038624; Sat, 20 Jul 2024 15:50:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46KFows8038621; Sat, 20 Jul 2024 15:50:58 GMT (envelope-from git) Date: Sat, 20 Jul 2024 15:50:58 GMT Message-Id: <202407201550.46KFows8038621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: eaa3d34b6220 - main - cdefs.9: Update for C++ environments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eaa3d34b6220d8858eabc622165ec4db2cc75e96 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=eaa3d34b6220d8858eabc622165ec4db2cc75e96 commit eaa3d34b6220d8858eabc622165ec4db2cc75e96 Author: Warner Losh AuthorDate: 2024-07-20 14:38:52 +0000 Commit: Warner Losh CommitDate: 2024-07-20 15:50:38 +0000 cdefs.9: Update for C++ environments We support all the C++ standards to some degree. However, pre C++11 standard support has been disappearing upstream, so also add a note about -pedantic-errors might not work for earlier standards. Add note about __cplusplus values. Sponsored by: Netflix --- share/man/man9/cdefs.9 | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 71b3e7fd4f81..dd45e3f61a9f 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd July 18, 2024 +.Dd July 20, 2024 .Dt CDEFS 9 .Os .Sh NAME @@ -281,7 +281,7 @@ still uses these. supports a number C standard environments. Selection of the language dialect is a compiler-dependent command line option, though it is usually -.Fl cstd=XX +.Fl std=XX where XX is the standard to set for compiling, such as c89 or c23. .Fx provides a number of selection macros to control visibility of symbols. @@ -402,6 +402,45 @@ extensions are visible, 0 otherwise. .St -isoC-2011 Appendix K 3.7.4.1 extensions are visible, 0 otherwise. +.Sh Supported C++ Environments +.Fx +supports C++11 and newer standards fully. +.Bl -tag +.It ISO/IEC 14882:1998 ("C++98") +.Dv __cplusplus = 199711 +.Pp +The first standardized version of C++. +Unlike K \*(Am R support in C, compilers dropped support for versions of +the language prior to C++98. +.It ISO/IEC 14882:2003 ("C++03") +.Dv __cplusplus = 199711 +.Pp +Note, this is the same value as C++98. +C++03 did not define a new value for +.Dv __cplusplus . +There is no way, at compile time, to detect the difference. +The standard resolved a number of defect reports and slightly +expanded value initialization. +Most compilers support it the same as C++98. +.It ISO/IEC 14882:2011 ("C++11") +.Dv __cplusplus = 201103 +.It ISO/IEC 14882:2014 ("C++14") +.Dv __cplusplus = 201402 +.It ISO/IEC 14882:2017 ("C++17") +.Dv __cplusplus = 201703 +.It ISO/IEC 14882:2020 ("C++20") +.Dv __cplusplus = 202002 +.It ISO/IEC 14882:2023 ("C++23") +.Dv __cplusplus = 202302 +.El +.Pp +.Fx +uses llvm project's libc++. +However, they are removing support for C++ prior to C++11. +While programs can still build with earlier environments for now, these changes +mean that +.Fl pedantic-errors +cannot be reliably enabled for standards older than C++11. .Sh HISTORY .In sys/cdefs.h first appeared in From nobody Sat Jul 20 16:15:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRBTW62g0z5Rw4T; Sat, 20 Jul 2024 16:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRBTW5Dx2z4V9n; Sat, 20 Jul 2024 16:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721492111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o0qfXZjP3ZdaBNWWeYJLfMA67EVKVT/fxOjpl2UspFY=; b=ZYPAaSqhbuKOryDl4cBTFUDjdbVFyQS4Maj9spAYU8uiCDtR+MIFMge99rxTvKqgCMLcRv 0n4xE3BRCI+k3jokX96Ab5u49LR8pFM2xulUYgzjSYbcM+q3qEJ7RuhlY254HoetuqRkwH 3FG2LOqBYP7BQlyoq0gqRdgXAS4TOf6ilCaCPYAC2Xc1IyWdfOdVtRhLC4sB2Vd4eZK2Ao dpnXMSfZPn3NnS2TXtkkDzBPMSZOrHNCZZNTVEC0DHudCBtuB8qWbIHa/mQDEqBS1Fc3+T 1F7TPKhKqgrpC0msOWOW+kzm/Mf4IpBph6B1J0oPeuv9ARSbmohWBoxIl/jSNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721492111; a=rsa-sha256; cv=none; b=x8bZMkiK9hga5rX4kejuBUo5mShT2RmDBRVh7PwCWYoufG2VOdpuOQqac0EO674LermcwR Ogf4HUWLOAIHXFWzfDW1CR9BGIWJCCnYnguZ0Lu7ru0ICNK2HKH4jfj8bJEXUlg0IoxK/0 KskVVrhnt/wWxBUPxj6cqyPP6H5PgKFp5zOeUnEa3Nb39jB6YTpc5cYQQOokZuvCF9HaLL XfBOZBsXV4icj93e2vWnDq99xTsdNXoFcHzvxbSbbP+iJDYpp9RsHPlbH+EuJr5ezp70wA XOErQwbmpwJU35BcjEeTbrtnR0DydiQGHOMmpfwip+kbzKRKzJnxYT/ROFdJMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721492111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o0qfXZjP3ZdaBNWWeYJLfMA67EVKVT/fxOjpl2UspFY=; b=j3UzTIdXGI82nAT6kXaX1H8ga86GIZIEkr1hU561T84Yj4Ddb8RmZhrgw1UCsX1zOSbTN1 HQcqgcMgNO+CFi7PyVLR9UIJePWLOpHnSKdgYLZHNwwKiDnLpzCaaBfqWK+Y8DFKcB7wH5 4AnAiJizPweTf2pb/yeaDYLVW9xJT+fhcmrqRioup+QSnbxNGQb0qgOBM7Y33nsiolz2iL iAblKRfNpl45AGFC0+DiXM3/W+m7dqKejGqDPHhuqqSUY9fyAHRB8kJGyxbrnzUU6NzTch /HMEkgzh37z7FRb3i20wIcFWI2K1ukl1iaHPuJunJ/Rq9BJLgwrA+gLDZP4V4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRBTW4qMmzNZY; Sat, 20 Jul 2024 16:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46KGFB2n080647; Sat, 20 Jul 2024 16:15:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46KGFBtJ080644; Sat, 20 Jul 2024 16:15:11 GMT (envelope-from git) Date: Sat, 20 Jul 2024 16:15:11 GMT Message-Id: <202407201615.46KGFBtJ080644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 90818083d795 - main - ipf: correct size limit in snprintf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90818083d795a9c06feca54f32fa6d35c200e1a2 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=90818083d795a9c06feca54f32fa6d35c200e1a2 commit 90818083d795a9c06feca54f32fa6d35c200e1a2 Author: Ryan Libby AuthorDate: 2024-07-20 16:14:57 +0000 Commit: Ryan Libby CommitDate: 2024-07-20 16:14:57 +0000 ipf: correct size limit in snprintf Reported by: GCC -Wsizeof-pointer-memaccess Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D45899 --- sbin/ipf/common/lexer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/common/lexer.c b/sbin/ipf/common/lexer.c index d1980765ef93..56ac3586af6e 100644 --- a/sbin/ipf/common/lexer.c +++ b/sbin/ipf/common/lexer.c @@ -449,7 +449,7 @@ buildipv6: oc = c; if (prior == YY_NUMBER && c == ':') { - snprintf(s, sizeof(s), "%d", priornum); + snprintf(s, sizeof(ipv6buf), "%d", priornum); s += strlen(s); } From nobody Sat Jul 20 19:46:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRH9x2mnCz5N32j; Sat, 20 Jul 2024 19:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRH9w6vfNz4tbt; Sat, 20 Jul 2024 19:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721504820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GiIKlBXLSjBYjbMgCqUj0p6nRgLHY4NcrivGUw1DFoI=; b=ctyFTmQfR7qSKCDp/54i2wfvAjRy0zbH7igkl8YkbaJdP9+x/P9MKDwr47PkvsfeR2Ji0v i0K+d3gtQxZpUlI2jKrASf5GfcSk+C6H5mCO7UYcKnJ0maoOfTDlQNkRM+mhgmNsKL16bT RlVIANzxLFG0sgZolF2WcAqng9tvxTisZFNYx4kRPKvcBQCG3jMo3dWZGOIoezStisHLy2 2DCtSQNLGUYM5xSgDGAfSZT1Ia7of8VEhkQ92cw2Jd0nPdP4FlyIVvqg3+zlD4tmov98SE JwBrLzeeBtbOXWl4yvmGYv/JtCjheUMKaUjOxdwH3Ci/RhVzWHeiK+mnga06pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721504820; a=rsa-sha256; cv=none; b=WCbLExc53+diSmcLkMrMOUahUBpYTKnIpfyXUgJwpzU2p9eOBokICkj/aR9ES7pVEpSnKm vcq4nwE6QAKsuWbQSd3R9FMYAujrU2nscaTxZuo6dswnd5wHrBGCVdgTWy9iusvop2F4Rf ZRuCGI3A/WUwSBklh6pBvArhNZC083km0CEDifPrbMg+CUfMRFynEjuN6ydUEEbsSEvYeh 6syzDpsYWtXg6DdweeEUOdzUNYfn4rgy5FAMgUA9xEkxxxgopoYopsaap/l4pfzOYtjwxX j+MPTeaOkEznAtQv7Ca/qTWofaBa8PkLARXFL3ByDnB9mL9QYByfkIeMDcdo7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721504820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GiIKlBXLSjBYjbMgCqUj0p6nRgLHY4NcrivGUw1DFoI=; b=kbIZghc2rLJjesONGsevF98waYgSvRjXnf4Oph3xlXQ0CHlZ2rZW99BklH3KidbhgRtKTn wG1jNtYHlK33BehOXPPs/Ex31ugopyCBdzHyjrmmnbsrDv7zRH05WQiBlV16aetduSJtmC YVS+c0olFSU3xuY8zqmkTMYhidJcXU9mFxvVxyGrMrCch6z/JhR4P0RfXc9Xn9fz+DWKlX bg6GYyZQteaXzZD2cONvpWXeLr1NjuPAxlBJsJ/Ls+YqRsEacCP68zOnEqsMvpdHbir6be E3Kj50TI2d3UAYctt0Ifgy0fCSMdGC/jVi5pwL089aVU/HzALLDeHMq/BhfUgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRH9w6Nw7zT6y; Sat, 20 Jul 2024 19:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46KJl0xx035190; Sat, 20 Jul 2024 19:47:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46KJksmC035161; Sat, 20 Jul 2024 19:46:54 GMT (envelope-from git) Date: Sat, 20 Jul 2024 19:46:54 GMT Message-Id: <202407201946.46KJksmC035161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 226192822cdd - main - Merge bmake-20240711 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 226192822cddc30cacecd55bccb48f39c653058c Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=226192822cddc30cacecd55bccb48f39c653058c commit 226192822cddc30cacecd55bccb48f39c653058c Merge: 90818083d795 84691af93185 Author: Simon J. Gerraty AuthorDate: 2024-07-20 19:43:11 +0000 Commit: Simon J. Gerraty CommitDate: 2024-07-20 19:45:48 +0000 Merge bmake-20240711 Merge commit '84691af93185c692058ba55fa81a04103f5bf71b' contrib/bmake/ChangeLog | 83 ++ contrib/bmake/FILES | 2 + contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 10 +- contrib/bmake/bmake.1 | 7 +- contrib/bmake/bmake.cat1 | 73 +- contrib/bmake/compat.c | 28 +- contrib/bmake/cond.c | 8 +- contrib/bmake/config.h.in | 137 +- contrib/bmake/configure | 1338 +++++++++++--------- contrib/bmake/configure.in | 13 +- contrib/bmake/dir.c | 8 +- contrib/bmake/dir.h | 4 +- contrib/bmake/hash.c | 33 +- contrib/bmake/hash.h | 5 +- contrib/bmake/job.c | 18 +- contrib/bmake/job.h | 6 +- contrib/bmake/main.c | 127 +- contrib/bmake/make.1 | 7 +- contrib/bmake/make.h | 20 +- contrib/bmake/meta.c | 3 + contrib/bmake/mk/install-mk | 0 contrib/bmake/parse.c | 31 +- contrib/bmake/str.c | 12 +- contrib/bmake/str.h | 4 +- contrib/bmake/suff.c | 9 +- contrib/bmake/targ.c | 15 +- contrib/bmake/unit-tests/Makefile | 32 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 6 +- contrib/bmake/unit-tests/cmd-errors-jobs.mk | 17 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 4 +- contrib/bmake/unit-tests/cmd-errors-lint.mk | 23 +- contrib/bmake/unit-tests/cmd-errors.exp | 6 +- contrib/bmake/unit-tests/cmd-errors.mk | 21 +- contrib/bmake/unit-tests/compat-error.exp | 2 +- contrib/bmake/unit-tests/cond-cmp-numeric.exp | 2 +- contrib/bmake/unit-tests/cond-func-defined.exp | 2 +- contrib/bmake/unit-tests/cond-func.exp | 12 +- contrib/bmake/unit-tests/cond-func.mk | 13 +- contrib/bmake/unit-tests/cond-late.exp | 5 +- contrib/bmake/unit-tests/cond-late.mk | 14 +- contrib/bmake/unit-tests/cond-op-and.exp | 12 +- contrib/bmake/unit-tests/cond-op-and.mk | 27 +- contrib/bmake/unit-tests/cond-op-not.exp | 2 +- contrib/bmake/unit-tests/cond-op-or.exp | 12 +- contrib/bmake/unit-tests/cond-op-or.mk | 53 +- contrib/bmake/unit-tests/cond-op-parentheses.exp | 2 +- contrib/bmake/unit-tests/cond-op.exp | 2 +- contrib/bmake/unit-tests/cond-short.exp | 2 +- contrib/bmake/unit-tests/cond-token-number.exp | 2 +- contrib/bmake/unit-tests/cond-token-string.exp | 4 +- contrib/bmake/unit-tests/cond-token-string.mk | 4 +- contrib/bmake/unit-tests/dep-op-missing.exp | 1 + contrib/bmake/unit-tests/dep-percent.exp | 2 +- contrib/bmake/unit-tests/dep-var.exp | 2 +- contrib/bmake/unit-tests/dep.exp | 2 +- contrib/bmake/unit-tests/depsrc-ignore.exp | 2 +- .../unit-tests/deptgt-begin-fail-indirect.exp | 2 +- contrib/bmake/unit-tests/deptgt-begin-fail.exp | 2 +- .../bmake/unit-tests/deptgt-delete_on_error.exp | 14 +- contrib/bmake/unit-tests/deptgt-end-fail-all.exp | 2 +- .../bmake/unit-tests/deptgt-end-fail-indirect.exp | 2 +- contrib/bmake/unit-tests/deptgt-end-fail.exp | 30 +- contrib/bmake/unit-tests/deptgt-error.exp | 2 +- contrib/bmake/unit-tests/deptgt-ignore.exp | 2 +- contrib/bmake/unit-tests/deptgt-path-suffix.exp | 2 +- contrib/bmake/unit-tests/deptgt.exp | 5 +- contrib/bmake/unit-tests/deptgt.mk | 21 +- contrib/bmake/unit-tests/directive-dinclude.exp | 3 +- contrib/bmake/unit-tests/directive-elif.exp | 2 +- contrib/bmake/unit-tests/directive-else.exp | 2 +- .../bmake/unit-tests/directive-export-gmake.exp | 1 + contrib/bmake/unit-tests/directive-for-break.exp | 1 + contrib/bmake/unit-tests/directive-for-errors.exp | 16 +- contrib/bmake/unit-tests/directive-for-errors.mk | 18 +- contrib/bmake/unit-tests/directive-for-escape.exp | 114 +- contrib/bmake/unit-tests/directive-for-escape.mk | 96 +- .../unit-tests/directive-for-generating-endif.exp | 5 +- contrib/bmake/unit-tests/directive-for-if.exp | 5 +- contrib/bmake/unit-tests/directive-for-null.exp | 3 +- contrib/bmake/unit-tests/directive-for.exp | 42 +- contrib/bmake/unit-tests/directive-for.mk | 42 +- .../bmake/unit-tests/directive-hyphen-include.exp | 3 +- contrib/bmake/unit-tests/directive-ifmake.exp | 2 +- .../bmake/unit-tests/directive-include-fatal.exp | 2 +- contrib/bmake/unit-tests/directive-include.exp | 4 +- contrib/bmake/unit-tests/directive-include.mk | 4 +- contrib/bmake/unit-tests/directive-info.exp | 2 +- contrib/bmake/unit-tests/directive-sinclude.exp | 3 +- contrib/bmake/unit-tests/directive-undef.exp | 4 +- contrib/bmake/unit-tests/directive-undef.mk | 4 +- .../bmake/unit-tests/directive-unexport-env.exp | 2 +- contrib/bmake/unit-tests/directive-warning.exp | 2 +- contrib/bmake/unit-tests/directive.exp | 2 +- contrib/bmake/unit-tests/doterror.exp | 2 +- .../bmake/unit-tests/jobs-empty-commands-error.exp | 2 +- contrib/bmake/unit-tests/jobs-error-indirect.exp | 4 +- .../bmake/unit-tests/jobs-error-nested-make.exp | 6 +- contrib/bmake/unit-tests/jobs-error-nested.exp | 8 +- contrib/bmake/unit-tests/lint.exp | 2 +- contrib/bmake/unit-tests/moderrs.exp | 110 +- contrib/bmake/unit-tests/moderrs.mk | 78 +- contrib/bmake/unit-tests/opt-debug-errors-jobs.exp | 12 +- contrib/bmake/unit-tests/opt-debug-errors.exp | 2 +- contrib/bmake/unit-tests/opt-debug-file.exp | 8 +- contrib/bmake/unit-tests/opt-debug-file.mk | 15 +- contrib/bmake/unit-tests/opt-debug-graph2.exp | 2 +- contrib/bmake/unit-tests/opt-debug-graph3.exp | 2 +- contrib/bmake/unit-tests/opt-debug-hash.exp | 4 +- contrib/bmake/unit-tests/opt-debug-lint.exp | 6 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 8 +- contrib/bmake/unit-tests/opt-file.exp | 3 +- .../bmake/unit-tests/opt-keep-going-indirect.exp | 8 +- .../bmake/unit-tests/opt-keep-going-multiple.exp | 2 +- contrib/bmake/unit-tests/opt-keep-going.exp | 2 +- .../bmake/unit-tests/opt-warnings-as-errors.exp | 2 +- contrib/bmake/unit-tests/opt.exp | 2 +- contrib/bmake/unit-tests/parse.exp | 2 +- contrib/bmake/unit-tests/posix.exp | 2 +- contrib/bmake/unit-tests/sh-jobs.exp | 2 +- contrib/bmake/unit-tests/suff-add-later.exp | 2 +- contrib/bmake/unit-tests/suff-clear-regular.exp | 2 +- contrib/bmake/unit-tests/suff-clear-single.exp | 2 +- contrib/bmake/unit-tests/suff-main-several.exp | 2 +- contrib/bmake/unit-tests/suff-self.exp | 2 +- .../bmake/unit-tests/suff-transform-endless.exp | 2 +- contrib/bmake/unit-tests/suff-transform-expand.exp | 2 +- contrib/bmake/unit-tests/suff-transform-select.exp | 2 +- contrib/bmake/unit-tests/suff-use.exp | 2 +- contrib/bmake/unit-tests/use-inference.exp | 2 +- contrib/bmake/unit-tests/var-eval-short.exp | 4 +- contrib/bmake/unit-tests/var-eval-short.mk | 4 +- contrib/bmake/unit-tests/var-op-assign.exp | 2 +- contrib/bmake/unit-tests/var-op-expand.exp | 6 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/var-op-shell.exp | 6 +- contrib/bmake/unit-tests/var-op-shell.mk | 16 +- contrib/bmake/unit-tests/var-recursive.exp | 5 +- contrib/bmake/unit-tests/vardebug.exp | 2 +- contrib/bmake/unit-tests/vardebug.mk | 4 +- contrib/bmake/unit-tests/varmisc.exp | 8 +- contrib/bmake/unit-tests/varmisc.mk | 13 +- contrib/bmake/unit-tests/varmod-assign-shell.exp | 12 +- contrib/bmake/unit-tests/varmod-assign-shell.mk | 18 +- contrib/bmake/unit-tests/varmod-assign.exp | 12 +- contrib/bmake/unit-tests/varmod-assign.mk | 7 +- contrib/bmake/unit-tests/varmod-edge.exp | 33 +- contrib/bmake/unit-tests/varmod-edge.mk | 231 ++-- contrib/bmake/unit-tests/varmod-gmtime.exp | 12 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 12 +- contrib/bmake/unit-tests/varmod-hash.exp | 8 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 52 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 22 +- contrib/bmake/unit-tests/varmod-indirect.exp | 8 +- contrib/bmake/unit-tests/varmod-indirect.mk | 10 +- contrib/bmake/unit-tests/varmod-localtime.exp | 12 +- contrib/bmake/unit-tests/varmod-localtime.mk | 12 +- contrib/bmake/unit-tests/varmod-loop-delete.exp | 4 +- contrib/bmake/unit-tests/varmod-loop-delete.mk | 4 +- contrib/bmake/unit-tests/varmod-loop-varname.exp | 10 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 10 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 10 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 8 +- contrib/bmake/unit-tests/varmod-match.exp | 20 +- contrib/bmake/unit-tests/varmod-match.mk | 22 +- contrib/bmake/unit-tests/varmod-mtime.exp | 12 +- contrib/bmake/unit-tests/varmod-mtime.mk | 14 +- contrib/bmake/unit-tests/varmod-order.exp | 48 +- contrib/bmake/unit-tests/varmod-order.mk | 32 +- contrib/bmake/unit-tests/varmod-range.exp | 12 +- contrib/bmake/unit-tests/varmod-range.mk | 12 +- contrib/bmake/unit-tests/varmod-select-words.exp | 26 +- contrib/bmake/unit-tests/varmod-shell.exp | 14 +- contrib/bmake/unit-tests/varmod-shell.mk | 14 +- contrib/bmake/unit-tests/varmod-subst-regex.exp | 30 +- contrib/bmake/unit-tests/varmod-subst.exp | 4 +- contrib/bmake/unit-tests/varmod-sun-shell.exp | 16 +- contrib/bmake/unit-tests/varmod-sun-shell.mk | 14 +- contrib/bmake/unit-tests/varmod-sysv.exp | 10 +- contrib/bmake/unit-tests/varmod-sysv.mk | 10 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 44 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 23 +- contrib/bmake/unit-tests/varmod-to-title.exp | 1 + contrib/bmake/unit-tests/varmod-to-title.mk | 31 + contrib/bmake/unit-tests/varmod.exp | 54 +- contrib/bmake/unit-tests/varmod.mk | 38 +- contrib/bmake/unit-tests/varname-dot-newline.exp | 5 +- .../varname-make_print_var_on_error-jobs.exp | 2 +- .../unit-tests/varname-make_print_var_on_error.exp | 2 +- contrib/bmake/unit-tests/varname.exp | 2 +- contrib/bmake/unit-tests/varparse-errors.exp | 44 +- contrib/bmake/unit-tests/varparse-errors.mk | 26 +- contrib/bmake/util.c | 6 +- contrib/bmake/var.c | 165 +-- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 141 ++- usr.bin/bmake/unit-tests/Makefile | 32 +- 197 files changed, 2564 insertions(+), 2024 deletions(-) diff --cc contrib/bmake/mk/install-mk index bb150e3041a3,bb150e3041a3..bb150e3041a3 mode 100644,100755..100755 --- a/contrib/bmake/mk/install-mk +++ b/contrib/bmake/mk/install-mk diff --cc contrib/bmake/unit-tests/varmod-to-title.exp index 000000000000,39a9383953dd..39a9383953dd mode 000000,100644..100644 --- a/contrib/bmake/unit-tests/varmod-to-title.exp +++ b/contrib/bmake/unit-tests/varmod-to-title.exp diff --cc contrib/bmake/unit-tests/varmod-to-title.mk index 000000000000,f99e5441a8fb..f99e5441a8fb mode 000000,100644..100644 --- a/contrib/bmake/unit-tests/varmod-to-title.mk +++ b/contrib/bmake/unit-tests/varmod-to-title.mk diff --cc usr.bin/bmake/Makefile.config index 1d9a6a2880ea,000000000000..75ceb4a50e15 mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@@ -1,28 -1,0 +1,28 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# + +SRCTOP?= ${.CURDIR:H:H} + +# things set by configure + - _MAKE_VERSION?=20240625 ++_MAKE_VERSION?=20240711 + +prefix?= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= cc +MAKE_OS?= +DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk + +EGREP = egrep +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H +LDFLAGS+= +LIBOBJS+= ${LIBOBJDIR}stresep$U.o +LDADD+= +USE_META?= yes +USE_FILEMON?= dev +FILEMON_H?= /usr/include/dev/filemon/filemon.h +BMAKE_PATH_MAX?= 1024 +# used if MAXPATHLEN not defined +CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} diff --cc usr.bin/bmake/config.h index 3ca313216962,000000000000..33aed8f160c8 mode 100644,000000..100644 --- a/usr.bin/bmake/config.h +++ b/usr.bin/bmake/config.h @@@ -1,448 -1,0 +1,449 @@@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Path of default shell */ +/* #undef DEFSHELL_CUSTOM */ + +/* Shell spec to use by default */ +/* #undef DEFSHELL_INDEX */ + +/* Path of default shell */ +/* #undef DEFSHELL_PATH */ + +/* Define to 1 if you have the header file. */ +#define HAVE_AR_H 1 + - /* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you ++/* Define to 1 if you have the declaration of 'sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_SIGLIST 1 + - /* Define to 1 if you have the header file, and it defines `DIR'. ++/* Define to 1 if you have the header file, and it defines 'DIR'. + */ +#define HAVE_DIRENT_H 1 + - /* Define to 1 if you have the `dirname' function. */ ++/* Define to 1 if you have the 'dirname' function. */ +#define HAVE_DIRNAME 1 + - /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ ++/* Define to 1 if you don't have 'vprintf' but do have '_doprnt.' */ +/* #undef HAVE_DOPRNT */ + - /* Define to 1 if you have the `err' function. */ ++/* Define to 1 if you have the 'err' function. */ +#define HAVE_ERR 1 + - /* Define to 1 if you have the `errx' function. */ ++/* Define to 1 if you have the 'errx' function. */ +#define HAVE_ERRX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + - /* Define to 1 if you have the `fork' function. */ ++/* Define to 1 if you have the 'fork' function. */ +#define HAVE_FORK 1 + - /* Define to 1 if you have the `getcwd' function. */ ++/* Define to 1 if you have the 'getcwd' function. */ +#define HAVE_GETCWD 1 + - /* Define to 1 if you have the `getenv' function. */ ++/* Define to 1 if you have the 'getenv' function. */ +#define HAVE_GETENV 1 + - /* Define to 1 if you have the `getopt' function. */ ++/* Define to 1 if you have the 'getopt' function. */ +#define HAVE_GETOPT 1 + - /* Define to 1 if you have the `getwd' function. */ ++/* Define to 1 if you have the 'getwd' function. */ +#define HAVE_GETWD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + - /* Define to 1 if you have the `killpg' function. */ ++/* Define to 1 if you have the 'killpg' function. */ +#define HAVE_KILLPG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + - /* Define to 1 if the system has the type `long long int'. */ ++/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + - /* Define to 1 if you have the `mmap' function. */ - #define HAVE_MMAP 1 - - /* Define to 1 if you have the header file, and it defines `DIR'. */ ++/* Define to 1 if you have the header file, and it defines 'DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + - /* Define to 1 if you have the `putenv' function. */ ++/* Define to 1 if you have the 'putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RANLIB_H 1 + - /* Define to 1 if you have the `realpath' function. */ ++/* Define to 1 if you have the 'realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_REGEX_H 1 + - /* Define to 1 if you have the `select' function. */ ++/* Define to 1 if you have the 'select' function. */ +#define HAVE_SELECT 1 + - /* Define to 1 if you have the `setenv' function. */ ++/* Define to 1 if you have the 'setenv' function. */ +#define HAVE_SETENV 1 + - /* Define to 1 if you have the `setpgid' function. */ ++/* Define to 1 if you have the 'setpgid' function. */ +#define HAVE_SETPGID 1 + - /* Define to 1 if you have the `setrlimit' function. */ ++/* Define to 1 if you have the 'setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + - /* Define to 1 if you have the `setsid' function. */ ++/* Define to 1 if you have the 'setsid' function. */ +#define HAVE_SETSID 1 + - /* Define to 1 if you have the `sigaction' function. */ ++/* Define to 1 if you have the 'sigaction' function. */ +#define HAVE_SIGACTION 1 + - /* Define to 1 if you have the `sigaddset' function. */ ++/* Define to 1 if you have the 'sigaddset' function. */ +#define HAVE_SIGADDSET 1 + - /* Define to 1 if you have the `sigpending' function. */ ++/* Define to 1 if you have the 'sigpending' function. */ +#define HAVE_SIGPENDING 1 + - /* Define to 1 if you have the `sigprocmask' function. */ ++/* Define to 1 if you have the 'sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 + - /* Define to 1 if you have the `sigsetmask' function. */ ++/* Define to 1 if you have the 'sigsetmask' function. */ +#define HAVE_SIGSETMASK 1 + - /* Define to 1 if you have the `sigsuspend' function. */ ++/* Define to 1 if you have the 'sigsuspend' function. */ +#define HAVE_SIGSUSPEND 1 + - /* Define to 1 if you have the `sigvec' function. */ ++/* Define to 1 if you have the 'sigvec' function. */ +#define HAVE_SIGVEC 1 + - /* Define to 1 if the system has the type `sig_atomic_t'. */ ++/* Define to 1 if the system has the type 'sig_atomic_t'. */ +#define HAVE_SIG_ATOMIC_T 1 + - /* Define to 1 if you have the `snprintf' function. */ ++/* Define to 1 if you have the 'snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + - /* Define to 1 if you have the `strerror' function. */ ++/* Define to 1 if you have the 'strerror' function. */ +#define HAVE_STRERROR 1 + - /* Define to 1 if you have the `stresep' function. */ ++/* Define to 1 if you have the 'stresep' function. */ +/* #undef HAVE_STRESEP */ + - /* Define to 1 if you have the `strftime' function. */ ++/* Define to 1 if you have the 'strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + - /* Define to 1 if you have the `strlcpy' function. */ ++/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + - /* Define to 1 if you have the `strsep' function. */ ++/* Define to 1 if you have the 'strsep' function. */ +#define HAVE_STRSEP 1 + - /* Define to 1 if you have the `strtod' function. */ ++/* Define to 1 if you have the 'strtod' function. */ +#define HAVE_STRTOD 1 + - /* Define to 1 if you have the `strtol' function. */ ++/* Define to 1 if you have the 'strtol' function. */ +#define HAVE_STRTOL 1 + - /* Define to 1 if you have the `strtoll' function. */ ++/* Define to 1 if you have the 'strtoll' function. */ +#define HAVE_STRTOLL 1 + - /* Define to 1 if you have the `strtoul' function. */ ++/* Define to 1 if you have the 'strtoul' function. */ +#define HAVE_STRTOUL 1 + - /* Define to 1 if you have the `sysctl' function. */ ++/* Define to 1 if you have the 'sysctl' function. */ +#define HAVE_SYSCTL 1 + - /* Define to 1 if you have the header file, and it defines `DIR'. ++/* Define to 1 if you have the header file, and it defines 'DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + - /* Define to 1 if you have the header file, and it defines `DIR'. ++/* Define to 1 if you have the header file, and it defines 'DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + - /* Define to 1 if you have the `unsetenv' function. */ ++/* Define to 1 if you have the 'unsetenv' function. */ +#define HAVE_UNSETENV 1 + - /* Define to 1 if the system has the type `unsigned long long int'. */ ++/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIME_H 1 + - /* Define to 1 if you have the `vfork' function. */ ++/* Define to 1 if you have the 'vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + - /* Define to 1 if you have the `vprintf' function. */ ++/* Define to 1 if you have the 'vprintf' function. */ +#define HAVE_VPRINTF 1 + - /* Define to 1 if you have the `vsnprintf' function. */ ++/* Define to 1 if you have the 'vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + - /* Define to 1 if you have the `wait3' function. */ ++/* Define to 1 if you have the 'wait3' function. */ +#define HAVE_WAIT3 1 + - /* Define to 1 if you have the `wait4' function. */ ++/* Define to 1 if you have the 'wait4' function. */ +#define HAVE_WAIT4 1 + - /* Define to 1 if you have the `waitpid' function. */ ++/* Define to 1 if you have the 'waitpid' function. */ +#define HAVE_WAITPID 1 + - /* Define to 1 if you have the `warn' function. */ ++/* Define to 1 if you have the 'warn' function. */ +#define HAVE_WARN 1 + - /* Define to 1 if you have the `warnx' function. */ ++/* Define to 1 if you have the 'warnx' function. */ +#define HAVE_WARNX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + - /* Define to 1 if `fork' works. */ ++/* Define to 1 if 'fork' works. */ +#define HAVE_WORKING_FORK 1 + - /* Define to 1 if `vfork' works. */ ++/* Define to 1 if 'vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* define if your compiler has __attribute__ */ +#define HAVE___ATTRIBUTE__ 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "sjg@NetBSD.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bmake" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "bmake 20240314" ++#define PACKAGE_STRING "bmake 20240711" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bmake" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "20240314" ++#define PACKAGE_VERSION "20240711" + - /* Define to 1 if the `S_IS*' macros in do not work properly. */ ++/* Define to 1 if the 'S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + - /* Define to 1 if all of the C90 standard headers exist (not just the ones ++/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + - /* Define to 1 if your declares `struct tm'. */ ++/* Define to 1 if your declares 'struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + - /* Enable extensions on AIX 3, Interix. */ ++/* Enable extensions on AIX, Interix, z/OS. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif ++/* Enable extensions specified by C23 Annex F. */ ++#ifndef __STDC_WANT_IEC_60559_EXT__ ++# define __STDC_WANT_IEC_60559_EXT__ 1 ++#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif - /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ ++/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + +/* C99 function name */ +/* #undef __func__ */ + - /* Define to empty if `const' does not conform to ANSI C. */ ++/* Define to empty if 'const' does not conform to ANSI C. */ +/* #undef const */ + - /* Define to `__inline__' or `__inline' if that's what the C compiler ++/* Define to '__inline__' or '__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int64_t */ + - /* Define to `int' if does not define. */ ++/* Define to 'int' if does not define. */ +/* #undef mode_t */ + - /* Define to `long int' if does not define. */ ++/* Define to 'long int' if does not define. */ +/* #undef off_t */ + +/* Define as a signed integer type capable of holding a process identifier. */ +/* #undef pid_t */ + +/* type that signal handlers can safely frob */ +/* #undef sig_atomic_t */ + - /* Define to `unsigned int' if does not define. */ ++/* Define as 'unsigned int' if doesn't define. */ +/* #undef size_t */ + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + - /* Define as `fork' if `vfork' does not work. */ ++/* Define as 'fork' if 'vfork' does not work. */ +/* #undef vfork */ diff --cc usr.bin/bmake/unit-tests/Makefile index 20e1b1cf94ee,000000000000..d70c0f87e459 mode 100644,000000..100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@@ -1,893 -1,0 +1,911 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# - # $Id: Makefile,v 1.219 2024/06/01 16:14:47 sjg Exp $ ++# $Id: Makefile,v 1.224 2024/07/13 05:27:35 sjg Exp $ +# - # $NetBSD: Makefile,v 1.347 2024/06/01 15:54:40 sjg Exp $ ++# $NetBSD: Makefile,v 1.350 2024/07/07 09:37:00 rillig Exp $ +# +# Unit tests for make(1) +# +# The main targets are: +# +# all: +# run all the tests +# test: +# run 'all', and compare to expected results +# accept: +# move generated output to expected results +# +# Settable variables +# +# TEST_MAKE +# The make program to be tested. +# +# +# Adding a test case +# +# Each feature should get its own set of tests in its own suitably +# named makefile (*.mk), with its own set of expected results (*.exp), +# and it should be added to the TESTS list. +# + +.MAIN: all + +# we use these below but we might be an older make +.MAKE.OS?= ${uname -s:L:sh} +.MAKE.UID?= ${id -u:L:sh} + +# for many tests we need a TMPDIR that will not collide +# with other users. +.if ${.OBJDIR} != ${.CURDIR} +# easy +TMPDIR:= ${.OBJDIR}/tmp +.elif defined(TMPDIR) +TMPDIR:= ${TMPDIR}/uid${.MAKE.UID} +.else +TMPDIR:= /tmp/uid${.MAKE.UID} +.endif +# make sure it exists +.if !exist(${TMPDIR}) +_!= mkdir -p ${TMPDIR} +.endif + +# Each test is in a sub-makefile. +# Keep the list sorted. +# Any test that is commented out must be ignored in +# src/tests/usr.bin/make/t_make.sh as well. +#TESTS+= archive +#TESTS+= archive-suffix +TESTS+= cmd-errors +TESTS+= cmd-errors-jobs +TESTS+= cmd-errors-lint +TESTS+= cmd-interrupt +TESTS+= cmdline +TESTS+= cmdline-redirect-stdin +TESTS+= cmdline-undefined +TESTS+= comment +TESTS+= compat-error +TESTS+= cond-cmp-numeric +TESTS+= cond-cmp-numeric-eq +TESTS+= cond-cmp-numeric-ge +TESTS+= cond-cmp-numeric-gt +TESTS+= cond-cmp-numeric-le +TESTS+= cond-cmp-numeric-lt +TESTS+= cond-cmp-numeric-ne +TESTS+= cond-cmp-string +TESTS+= cond-cmp-unary +TESTS+= cond-eof +TESTS+= cond-func +TESTS+= cond-func-commands +TESTS+= cond-func-defined +TESTS+= cond-func-empty +TESTS+= cond-func-exists +TESTS+= cond-func-make +TESTS+= cond-func-make-main +TESTS+= cond-func-target +TESTS+= cond-late +TESTS+= cond-op +TESTS+= cond-op-and +TESTS+= cond-op-and-lint +TESTS+= cond-op-not +TESTS+= cond-op-or +TESTS+= cond-op-or-lint +TESTS+= cond-op-parentheses +TESTS+= cond-short +TESTS+= cond-token-number +TESTS+= cond-token-plain +TESTS+= cond-token-string +TESTS+= cond-token-var +TESTS+= cond-undef-lint +TESTS+= counter +TESTS+= counter-append +TESTS+= dep +TESTS+= dep-colon +TESTS+= dep-colon-bug-cross-file +TESTS+= dep-double-colon +TESTS+= dep-double-colon-indep +TESTS+= dep-duplicate +TESTS+= dep-exclam +TESTS+= dep-none +TESTS+= dep-op-missing +TESTS+= dep-percent +TESTS+= dep-var +TESTS+= dep-wildcards +TESTS+= depsrc +TESTS+= depsrc-end +TESTS+= depsrc-exec +TESTS+= depsrc-ignore +TESTS+= depsrc-made +TESTS+= depsrc-make +TESTS+= depsrc-meta +TESTS+= depsrc-nometa +TESTS+= depsrc-nometa_cmp +TESTS+= depsrc-nopath +TESTS+= depsrc-notmain +TESTS+= depsrc-optional +TESTS+= depsrc-phony +TESTS+= depsrc-precious +TESTS+= depsrc-recursive +TESTS+= depsrc-silent +TESTS+= depsrc-use +TESTS+= depsrc-usebefore +TESTS+= depsrc-usebefore-double-colon +TESTS+= depsrc-wait +TESTS+= deptgt +TESTS+= deptgt-begin +TESTS+= deptgt-begin-fail +TESTS+= deptgt-begin-fail-indirect +TESTS+= deptgt-default +TESTS+= deptgt-delete_on_error +TESTS+= deptgt-end +TESTS+= deptgt-end-fail +TESTS+= deptgt-end-fail-all +TESTS+= deptgt-end-fail-indirect +TESTS+= deptgt-end-jobs +TESTS+= deptgt-error +TESTS+= deptgt-ignore +TESTS+= deptgt-interrupt +TESTS+= deptgt-main +TESTS+= deptgt-makeflags +TESTS+= deptgt-no_parallel +TESTS+= deptgt-nopath +TESTS+= deptgt-notparallel +TESTS+= deptgt-objdir +TESTS+= deptgt-order +TESTS+= deptgt-path +TESTS+= deptgt-path-suffix +TESTS+= deptgt-phony +TESTS+= deptgt-posix +TESTS+= deptgt-precious +TESTS+= deptgt-shell +TESTS+= deptgt-silent +TESTS+= deptgt-silent-jobs +TESTS+= deptgt-stale +TESTS+= deptgt-suffixes +TESTS+= dir +TESTS+= dir-expand-path +TESTS+= directive +TESTS+= directive-dinclude +TESTS+= directive-elif +TESTS+= directive-elifdef +TESTS+= directive-elifmake +TESTS+= directive-elifndef +TESTS+= directive-elifnmake +TESTS+= directive-else +TESTS+= directive-endfor +TESTS+= directive-endif +TESTS+= directive-error +TESTS+= directive-export +TESTS+= directive-export-env +TESTS+= directive-export-impl +TESTS+= directive-export-gmake +TESTS+= directive-export-literal +TESTS+= directive-for +TESTS+= directive-for-break +TESTS+= directive-for-empty +TESTS+= directive-for-errors +TESTS+= directive-for-escape +TESTS+= directive-for-generating-endif +TESTS+= directive-for-if +TESTS+= directive-for-lines *** 726 LINES SKIPPED *** From nobody Sat Jul 20 19:59:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRHSH5p1zz5N3w6; Sat, 20 Jul 2024 19:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRHSH46M1z4vTW; Sat, 20 Jul 2024 19:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721505567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h48uvjk67IQKYFTfsM2Rz4rH2rxxQNYbLdCIVe5E674=; b=Y6hVHEN7LYquJP5k6VLSHCm7og/t/wMg3M6RgXWQJn3UxjKZlhl9uzr9Zhw6Do19i9yOGN sC7NuznyWMjH5yzmQvuCGfTiklpQmtknsjmFU2Qqa9cSwoPwh2RLzYI63LVkFMhBUUc+ly NVTMiaSNi6QSNfga8v6F2LTzf8wr6hkcuzk0jvF9kLbfnlhOIn3U1IQGnoOvu7i0tzlExz 1lTLAGa4YkkZTd/N6QdxVCnz5/ZNEjkAj4Fo/seI1W1tubcNcOjMPTlLw5wFvJCBYpra3v iqcHTSZpBhvzlss+DxBX2jkIEzH2spp/I/jQp0vTCG96ivVErW6Pxo09s873kQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721505567; a=rsa-sha256; cv=none; b=xNrtLVNrxvj1zDTs7S2n4HRPHCF46qGbQRc+HZLrAdxQd0GjDSk8NvjbrUYR2AOPTR+jkt ssA4mDS+aoyZLGhel3ZmISLCKXX212KvpVZcDUoaQCnbzdqZmasNvbV6QYDJMosk6BZjeQ eFF/kX3tyRwfdzBLydAeEt3atJuPmavWafqSBGdbbf2ceEBGholEjrSLc+Sz7KchO/hFxY Hf9MM8Pj9QJchzZq1rUNpj3h8VORObqoikh9jM40Qkfd3DA8KPidZAFOc3NuLe4/JM2sTc sdKQlFNzmmVGkC+llWGiiL5+X7aXbnb8tZq5Nuc9MajaoJVZnGnGZy+crFNEhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721505567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h48uvjk67IQKYFTfsM2Rz4rH2rxxQNYbLdCIVe5E674=; b=vRul/h+yb2W9kOzyX8jeHkD6XmKcQxc8PwKbpX+EoXUZ33FodEfxlYQhLaCZKTdLcjU1lz CwlGD5l1rgFj8eE8KEwxCsV55Ua+4+gD33H/8GZNUYsrdbbs/x1nixeU8OlpagLD1TJBJM RR7ItOwWGxGxzqzSZHy/tUM/ee2RtCAAHycgoJCVepvi3wJj9R3+nCgfcRO1VK7N6TRF7H nCAWr8dji51SeyuT/tNl++SPFEm3r+IFMxfNlGZ8Sbf29IWLYde84bfDjy2bLV/EPiQY2A fQd94yUs3nf8pFAyim4dj4Ykhzj0CeHhLmu/P1pbuR8QvSN1ctFSDjHA7h7wvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRHSH3FXDzVkZ; Sat, 20 Jul 2024 19:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46KJxRJK052608; Sat, 20 Jul 2024 19:59:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46KJxRlN052605; Sat, 20 Jul 2024 19:59:27 GMT (envelope-from git) Date: Sat, 20 Jul 2024 19:59:27 GMT Message-Id: <202407201959.46KJxRlN052605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d3795c1d72f0 - main - cam/iosched: Use better malloc idiom List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d3795c1d72f042c86efebdaa9ae790f64ef79f47 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d3795c1d72f042c86efebdaa9ae790f64ef79f47 commit d3795c1d72f042c86efebdaa9ae790f64ef79f47 Author: Warner Losh AuthorDate: 2024-07-20 19:58:04 +0000 Commit: Warner Losh CommitDate: 2024-07-20 19:59:18 +0000 cam/iosched: Use better malloc idiom Allocate to a simple poiter, use that everywhere, then return it at the end. The code looks cleaner. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46043 --- sys/cam/cam_iosched.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 4f4a2b2cde55..15e98b7cb39d 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -1160,37 +1160,39 @@ int cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph, const struct disk *dp, cam_iosched_schedule_t schedfnc) { + struct cam_iosched_softc *isc; - *iscp = malloc(sizeof(**iscp), M_CAMSCHED, M_NOWAIT | M_ZERO); - if (*iscp == NULL) + isc = malloc(sizeof(*isc), M_CAMSCHED, M_NOWAIT | M_ZERO); + if (isc == NULL) return ENOMEM; - (*iscp)->disk = dp; - (*iscp)->schedfnc = schedfnc; + isc->disk = dp; + isc->schedfnc = schedfnc; #ifdef CAM_IOSCHED_DYNAMIC if (iosched_debug) - printf("CAM IOSCHEDULER Allocating entry at %p\n", *iscp); + printf("CAM IOSCHEDULER Allocating entry at %p\n", isc); #endif - (*iscp)->sort_io_queue = -1; - bioq_init(&(*iscp)->bio_queue); - bioq_init(&(*iscp)->trim_queue); + isc->sort_io_queue = -1; + bioq_init(&isc->bio_queue); + bioq_init(&isc->trim_queue); #ifdef CAM_IOSCHED_DYNAMIC if (do_dynamic_iosched) { - bioq_init(&(*iscp)->write_queue); - (*iscp)->read_bias = default_read_bias; - (*iscp)->current_read_bias = 0; - (*iscp)->quanta = min(hz, 200); - cam_iosched_iop_stats_init(*iscp, &(*iscp)->read_stats); - cam_iosched_iop_stats_init(*iscp, &(*iscp)->write_stats); - cam_iosched_iop_stats_init(*iscp, &(*iscp)->trim_stats); - (*iscp)->trim_stats.max = 1; /* Trims are special: one at a time for now */ - (*iscp)->last_time = sbinuptime(); - callout_init_mtx(&(*iscp)->ticker, cam_periph_mtx(periph), 0); - (*iscp)->periph = periph; - cam_iosched_cl_init(&(*iscp)->cl, *iscp); - callout_reset(&(*iscp)->ticker, hz / (*iscp)->quanta, cam_iosched_ticker, *iscp); - (*iscp)->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; + bioq_init(&isc->write_queue); + isc->read_bias = default_read_bias; + isc->current_read_bias = 0; + isc->quanta = min(hz, 200); + cam_iosched_iop_stats_init(isc, &isc->read_stats); + cam_iosched_iop_stats_init(isc, &isc->write_stats); + cam_iosched_iop_stats_init(isc, &isc->trim_stats); + isc->trim_stats.max = 1; /* Trims are special: one at a time for now */ + isc->last_time = sbinuptime(); + callout_init_mtx(&isc->ticker, cam_periph_mtx(periph), 0); + isc->periph = periph; + cam_iosched_cl_init(&isc->cl, isc); + callout_reset(&isc->ticker, hz / isc->quanta, cam_iosched_ticker, isc); + isc->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; } #endif + *iscp = isc; return 0; } From nobody Sun Jul 21 01:56:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRRNf3QM8z5QdP9; Sun, 21 Jul 2024 01:56:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRRNf30cqz4CYJ; Sun, 21 Jul 2024 01:56:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721527010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UCVWzjw1jZufK4xcdb67zeq85vE/X8jVPJuBjRdGuDc=; b=O6t/2t+Aoeq3EB2k+9ryFji3qoZX8isAQi984uBxbZK5RlvJWRaLHn5GOdZ9Q5+1Goat+l pBl+l+Y6lgcYh0Ayr2DqnYsrzfZ9Kwd8DPXBQQpif01CkSKfi2NcRaFyOCmGZ78uLYyyGu BncRserkI0vL6dMaoJAe2yUtMoAMz3P3MrGk9sydKUl0mO62VqevydxoLiJ2jGV+S5FMFF MfT9Dol8K3zd39DUwne418lnn94IIHEi9Yk/VxB2BGGKOgraEHIXCwlojbC/Y2OZzrLZDN bv9BKTePyvXjJKQ2glJ1ftrH3ckJECGRiU4tGvmxfuNs5r1/6O/kR+yo9S9ngw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721527010; a=rsa-sha256; cv=none; b=pXQfQIxTlpD+rHoN9hUJEPkdWu3I6Am4K1FR0+kCxM1Pxf8IzF3zXwvNFwxtJmS3V1vvXS ytVCO7UAvqnLstUMQjYdPIgE8uYRTdE2eOb1a3PMVQfiqU5HV/STJ+e6s2LDRUgJLms34T 7Ehcsd/OkST9ryplAEBHXM12aAmt4EOT7Zy7ri1Ze6l41xybX3Q52qLcnUzOLv7lpIRV/q DukbJHLFIfQs8wYHml2Jml2aaUC3j18hBdW7fgpg8sgvrqVn17783SUnFJLoFOLP2rrxcb a1uYKTqzepWUrkqnAD2hwBH2RpKEg/nAw+B5jGvLAXQajh5ycNeLP8YWQCsnOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721527010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UCVWzjw1jZufK4xcdb67zeq85vE/X8jVPJuBjRdGuDc=; b=r8Y71TGLtNxJaElIh/G0ISapDm7NiP+2ev65brtk07O9c/wlVcNJL9SmyMFFRNj3wlwAN+ 4dULdo0vuLyRSrF6sg/LhEm9/bEUvUCcXTGovOy6fEa+bwTGTHiJCt912ljVZu7FIYiYTb 7zeH8dYiz/Jv7MShKuw0VnsTQ48bwuEu0NeiIS9obxlzC0Fryz+qnxyQLvZLDk2aDJqZO3 l+P9geQ05ZHTEn8yAlvxL48BUny1c8PojlRdYjMLz8wH93nRptci5GDWBuIVWC0dbrDF8J qzhWsLK83vpIKb08pyNf975cmPPBhAIjPqhjcJyqyN4aFCAHBVpqZ73C4V8Dtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRRNf2bb9zgrN; Sun, 21 Jul 2024 01:56:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L1uoNb059823; Sun, 21 Jul 2024 01:56:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L1uos7059820; Sun, 21 Jul 2024 01:56:50 GMT (envelope-from git) Date: Sun, 21 Jul 2024 01:56:50 GMT Message-Id: <202407210156.46L1uos7059820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 04b4dcf04fc3 - main - leap-seconds: Update to leap-seconds 3960057600 obtained from IERS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04b4dcf04fc345b29b78e5061768091648b8ee2a Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=04b4dcf04fc345b29b78e5061768091648b8ee2a commit 04b4dcf04fc345b29b78e5061768091648b8ee2a Author: Cy Schubert AuthorDate: 2024-07-21 01:41:09 +0000 Commit: Cy Schubert CommitDate: 2024-07-21 01:55:41 +0000 leap-seconds: Update to leap-seconds 3960057600 obtained from IERS IERS is the canonical source of leap-seconds. IANA, NIST and USNO obtain their leap-second updates from IERS. This resolves an issue for IPv6-only hosts as IERS is not accessible via IPv6, requiring IPv6-only host to rely on some other source, above. From this point forward we should fetch the file from IERS, the organization responsible for deciding when to insert leap-seconds. PR: 279413 Obtained from: https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list Discussed with: imp MFC after: 1 day --- usr.sbin/ntp/ntpd/leap-seconds | 373 +++++++++++++---------------------------- 1 file changed, 119 insertions(+), 254 deletions(-) diff --git a/usr.sbin/ntp/ntpd/leap-seconds b/usr.sbin/ntp/ntpd/leap-seconds index c5a95aa51799..da0efc8c8566 100644 --- a/usr.sbin/ntp/ntpd/leap-seconds +++ b/usr.sbin/ntp/ntpd/leap-seconds @@ -1,255 +1,120 @@ +# ATOMIC TIME +# Coordinated Universal Time (UTC) is the reference time scale derived +# from The "Temps Atomique International" (TAI) calculated by the Bureau +# International des Poids et Mesures (BIPM) using a worldwide network of atomic +# clocks. UTC differs from TAI by an integer number of seconds; it is the basis +# of all activities in the world. # -# In the following text, the symbol '#' introduces -# a comment, which continues from that symbol until -# the end of the line. A plain comment line has a -# whitespace character following the comment indicator. -# There are also special comment lines defined below. -# A special comment will always have a non-whitespace -# character in column 2. -# -# A blank line should be ignored. -# -# The following table shows the corrections that must -# be applied to compute International Atomic Time (TAI) -# from the Coordinated Universal Time (UTC) values that -# are transmitted by almost all time services. -# -# The first column shows an epoch as a number of seconds -# since 1 January 1900, 00:00:00 (1900.0 is also used to -# indicate the same epoch.) Both of these time stamp formats -# ignore the complexities of the time scales that were -# used before the current definition of UTC at the start -# of 1972. (See note 3 below.) -# The second column shows the number of seconds that -# must be added to UTC to compute TAI for any timestamp -# at or after that epoch. The value on each line is -# valid from the indicated initial instant until the -# epoch given on the next one or indefinitely into the -# future if there is no next line. -# (The comment on each line shows the representation of -# the corresponding initial epoch in the usual -# day-month-year format. The epoch always begins at -# 00:00:00 UTC on the indicated day. See Note 5 below.) -# -# Important notes: -# -# 1. Coordinated Universal Time (UTC) is often referred to -# as Greenwich Mean Time (GMT). The GMT time scale is no -# longer used, and the use of GMT to designate UTC is -# discouraged. -# -# 2. The UTC time scale is realized by many national -# laboratories and timing centers. Each laboratory -# identifies its realization with its name: Thus -# UTC(NIST), UTC(USNO), etc. The differences among -# these different realizations are typically on the -# order of a few nanoseconds (i.e., 0.000 000 00x s) -# and can be ignored for many purposes. These differences -# are tabulated in Circular T, which is published monthly -# by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.org for more information. -# -# 3. The current definition of the relationship between UTC -# and TAI dates from 1 January 1972. A number of different -# time scales were in use before that epoch, and it can be -# quite difficult to compute precise timestamps and time -# intervals in those "prehistoric" days. For more information, -# consult: -# -# The Explanatory Supplement to the Astronomical -# Ephemeris. -# or -# Terry Quinn, "The BIPM and the Accurate Measurement -# of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, -# July, 1991. -# reprinted in: -# Christine Hackman and Donald B Sullivan (eds.) -# Time and Frequency Measurement -# American Association of Physics Teachers (1996) -# , pp. 75-86 -# -# 4. The decision to insert a leap second into UTC is currently -# the responsibility of the International Earth Rotation and -# Reference Systems Service. (The name was changed from the -# International Earth Rotation Service, but the acronym IERS -# is still used.) -# -# Leap seconds are announced by the IERS in its Bulletin C. -# -# See www.iers.org for more details. -# -# Every national laboratory and timing center uses the -# data from the BIPM and the IERS to construct UTC(lab), -# their local realization of UTC. -# -# Although the definition also includes the possibility -# of dropping seconds ("negative" leap seconds), this has -# never been done and is unlikely to be necessary in the -# foreseeable future. -# -# 5. If your system keeps time as the number of seconds since -# some epoch (e.g., NTP timestamps), then the algorithm for -# assigning a UTC time stamp to an event that happens during a positive -# leap second is not well defined. The official name of that leap -# second is 23:59:60, but there is no way of representing that time -# in these systems. -# Many systems of this type effectively stop the system clock for -# one second during the leap second and use a time that is equivalent -# to 23:59:59 UTC twice. For these systems, the corresponding TAI -# timestamp would be obtained by advancing to the next entry in the -# following table when the time equivalent to 23:59:59 UTC -# is used for the second time. Thus the leap second which -# occurred on 30 June 1972 at 23:59:59 UTC would have TAI -# timestamps computed as follows: -# -# ... -# 30 June 1972 23:59:59 (2287785599, first time): TAI= UTC + 10 seconds -# 30 June 1972 23:59:60 (2287785599,second time): TAI= UTC + 11 seconds -# 1 July 1972 00:00:00 (2287785600) TAI= UTC + 11 seconds -# ... -# -# If your system realizes the leap second by repeating 00:00:00 UTC twice -# (this is possible but not usual), then the advance to the next entry -# in the table must occur the second time that a time equivalent to -# 00:00:00 UTC is used. Thus, using the same example as above: -# -# ... -# 30 June 1972 23:59:59 (2287785599): TAI= UTC + 10 seconds -# 30 June 1972 23:59:60 (2287785600, first time): TAI= UTC + 10 seconds -# 1 July 1972 00:00:00 (2287785600,second time): TAI= UTC + 11 seconds -# ... -# -# in both cases the use of timestamps based on TAI produces a smooth -# time scale with no discontinuity in the time interval. However, -# although the long-term behavior of the time scale is correct in both -# methods, the second method is technically not correct because it adds -# the extra second to the wrong day. -# -# This complexity would not be needed for negative leap seconds (if they -# are ever used). The UTC time would skip 23:59:59 and advance from -# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by -# 1 second at the same instant. This is a much easier situation to deal -# with, since the difficulty of unambiguously representing the epoch -# during the leap second does not arise. -# -# Some systems implement leap seconds by amortizing the leap second -# over the last few minutes of the day. The frequency of the local -# clock is decreased (or increased) to realize the positive (or -# negative) leap second. This method removes the time step described -# above. Although the long-term behavior of the time scale is correct -# in this case, this method introduces an error during the adjustment -# period both in time and in frequency with respect to the official -# definition of UTC. -# -# Questions or comments to: -# Judah Levine -# Time and Frequency Division -# NIST -# Boulder, Colorado -# Judah.Levine@nist.gov -# -# Last Update of leap second values: 8 July 2016 -# -# The following line shows this last update date in NTP timestamp -# format. This is the date on which the most recent change to -# the leap second data was added to the file. This line can -# be identified by the unique pair of characters in the first two -# columns as shown below. -# -#$ 3676924800 -# -# The NTP timestamps are in units of seconds since the NTP epoch, -# which is 1 January 1900, 00:00:00. The Modified Julian Day number -# corresponding to the NTP time stamp, X, can be computed as -# -# X/86400 + 15020 -# -# where the first term converts seconds to days and the second -# term adds the MJD corresponding to the time origin defined above. -# The integer portion of the result is the integer MJD for that -# day, and any remainder is the time of day, expressed as the -# fraction of the day since 0 hours UTC. The conversion from day -# fraction to seconds or to hours, minutes, and seconds may involve -# rounding or truncation, depending on the method used in the -# computation. -# -# The data in this file will be updated periodically as new leap -# seconds are announced. In addition to being entered on the line -# above, the update time (in NTP format) will be added to the basic -# file name leap-seconds to form the name leap-seconds.. -# In addition, the generic name leap-seconds.list will always point to -# the most recent version of the file. -# -# This update procedure will be performed only when a new leap second -# is announced. -# -# The following entry specifies the expiration date of the data -# in this file in units of seconds since the origin at the instant -# 1 January 1900, 00:00:00. This expiration date will be changed -# at least twice per year whether or not a new leap second is -# announced. These semi-annual changes will be made no later -# than 1 June and 1 December of each year to indicate what -# action (if any) is to be taken on 30 June and 31 December, -# respectively. (These are the customary effective dates for new -# leap seconds.) This expiration date will be identified by a -# unique pair of characters in columns 1 and 2 as shown below. -# In the unlikely event that a leap second is announced with an -# effective date other than 30 June or 31 December, then this -# file will be edited to include that leap second as soon as it is -# announced or at least one month before the effective date -# (whichever is later). -# If an announcement by the IERS specifies that no leap second is -# scheduled, then only the expiration date of the file will -# be advanced to show that the information in the file is still -# current -- the update time stamp, the data and the name of the file -# will not change. -# -# Updated through IERS Bulletin C67 -# File expires on: 28 December 2024 -# -#@ 3944332800 -# -2272060800 10 # 1 Jan 1972 -2287785600 11 # 1 Jul 1972 -2303683200 12 # 1 Jan 1973 -2335219200 13 # 1 Jan 1974 -2366755200 14 # 1 Jan 1975 -2398291200 15 # 1 Jan 1976 -2429913600 16 # 1 Jan 1977 -2461449600 17 # 1 Jan 1978 -2492985600 18 # 1 Jan 1979 -2524521600 19 # 1 Jan 1980 -2571782400 20 # 1 Jul 1981 -2603318400 21 # 1 Jul 1982 -2634854400 22 # 1 Jul 1983 -2698012800 23 # 1 Jul 1985 -2776982400 24 # 1 Jan 1988 -2840140800 25 # 1 Jan 1990 -2871676800 26 # 1 Jan 1991 -2918937600 27 # 1 Jul 1992 -2950473600 28 # 1 Jul 1993 -2982009600 29 # 1 Jul 1994 -3029443200 30 # 1 Jan 1996 -3076704000 31 # 1 Jul 1997 -3124137600 32 # 1 Jan 1999 -3345062400 33 # 1 Jan 2006 -3439756800 34 # 1 Jan 2009 -3550089600 35 # 1 Jul 2012 -3644697600 36 # 1 Jul 2015 -3692217600 37 # 1 Jan 2017 -# -# the following special comment contains the -# hash value of the data in this file computed -# use the secure hash algorithm as specified -# by FIPS 180-1. See the files in ~/pub/sha for -# the details of how this hash value is -# computed. Note that the hash computation -# ignores comments and whitespace characters -# in data lines. It includes the NTP values -# of both the last modification time and the -# expiration time of the file, but not the -# white space on those lines. -# the hash line is also ignored in the -# computation. -# -#h 199a9d45 3f630d2f e47cb9cc c2f0fa47 96932227 +# +# ASTRONOMICAL TIME (UT1) is the time scale based on the rate of rotation of the earth. +# It is now mainly derived from Very Long Baseline Interferometry (VLBI). The various +# irregular fluctuations progressively detected in the rotation rate of the Earth led +# in 1972 to the replacement of UT1 by UTC as the reference time scale. +# +# +# LEAP SECOND +# Atomic clocks are more stable than the rate of the earth's rotation since the latter +# undergoes a full range of geophysical perturbations at various time scales: lunisolar +# and core-mantle torques, atmospheric and oceanic effects, etc. +# Leap seconds are needed to keep the two time scales in agreement, i.e. UT1-UTC smaller +# than 0.9 seconds. Therefore, when necessary a "leap second" is applied to UTC. +# Since the adoption of this system in 1972 it has been necessary to add a number of seconds to UTC, +# firstly due to the initial choice of the value of the second (1/86400 mean solar day of +# the year 1820) and secondly to the general slowing down of the Earth's rotation. It is +# theoretically possible to have a negative leap second (a second removed from UTC), but so far, +# all leap seconds have been positive (a second has been added to UTC). Based on what we know about +# the earth's rotation, it is unlikely that we will ever have a negative leap second. +# +# +# HISTORY +# The first leap second was added on June 30, 1972. Until the year 2000, it was necessary in average to add a +# leap second at a rate of 1 to 2 years. Since the year 2000 leap seconds are introduced with an +# average interval of 3 to 4 years due to the acceleration of the Earth's rotation speed. +# +# +# RESPONSIBILITY OF THE DECISION TO INTRODUCE A LEAP SECOND IN UTC +# The decision to introduce a leap second in UTC is the responsibility of the Earth Orientation Center of +# the International Earth Rotation and reference System Service (IERS). This center is located at Paris +# Observatory. According to international agreements, leap seconds should be scheduled only for certain dates: +# first preference is given to the end of December and June, and second preference at the end of March +# and September. Since the introduction of leap seconds in 1972, only dates in June and December were used. +# +# Questions or comments to: +# Christian Bizouard: christian.bizouard@obspm.fr +# Earth orientation Center of the IERS +# Paris Observatory, France +# +# +# +# COPYRIGHT STATUS OF THIS FILE +# This file is in the public domain. +# +# +# VALIDITY OF THE FILE +# It is important to express the validity of the file. These next two dates are +# given in units of seconds since 1900.0. +# +# 1) Last update of the file. +# +# Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) +# +# The following line shows the last update of this file in NTP timestamp: +# +#$ 3929093563 +# +# 2) Expiration date of the file given on a semi-annual basis: last June or last December +# +# File expires on 28 June 2025 +# +# Expire date in NTP timestamp: +# +#@ 3960057600 +# +# +# LIST OF LEAP SECONDS +# NTP timestamp (X parameter) is the number of seconds since 1900.0 +# +# MJD: The Modified Julian Day number. MJD = X/86400 + 15020 +# +# DTAI: The difference DTAI= TAI-UTC in units of seconds +# It is the quantity to add to UTC to get the time in TAI +# +# Day Month Year : epoch in clear +# +#NTP Time DTAI Day Month Year +# +2272060800 10 # 1 Jan 1972 +2287785600 11 # 1 Jul 1972 +2303683200 12 # 1 Jan 1973 +2335219200 13 # 1 Jan 1974 +2366755200 14 # 1 Jan 1975 +2398291200 15 # 1 Jan 1976 +2429913600 16 # 1 Jan 1977 +2461449600 17 # 1 Jan 1978 +2492985600 18 # 1 Jan 1979 +2524521600 19 # 1 Jan 1980 +2571782400 20 # 1 Jul 1981 +2603318400 21 # 1 Jul 1982 +2634854400 22 # 1 Jul 1983 +2698012800 23 # 1 Jul 1985 +2776982400 24 # 1 Jan 1988 +2840140800 25 # 1 Jan 1990 +2871676800 26 # 1 Jan 1991 +2918937600 27 # 1 Jul 1992 +2950473600 28 # 1 Jul 1993 +2982009600 29 # 1 Jul 1994 +3029443200 30 # 1 Jan 1996 +3076704000 31 # 1 Jul 1997 +3124137600 32 # 1 Jan 1999 +3345062400 33 # 1 Jan 2006 +3439756800 34 # 1 Jan 2009 +3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 +3692217600 37 # 1 Jan 2017 +# +# A hash code has been generated to be able to verify the integrity +# of this file. For more information about using this hash code, +# please see the readme file in the 'source' directory : +# https://hpiers.obspm.fr/iers/bul/bulc/ntp/sources/README +# +#h be738595 57b0cf1b b0218343 fb77062f 5a775e7 From nobody Sun Jul 21 04:18:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRVWh3ms7z5QtLL; Sun, 21 Jul 2024 04:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRVWh3Fcvz4NgL; Sun, 21 Jul 2024 04:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721535488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3VH6cNrx1+vnmuBK62LPPK5+hZFJ4ubkKhNv4nonoo8=; b=NHwmEtTK4iJXY9Iiow46zs08sHYy/eSb5xBUZ43kv67izp1EAmbiKP9ISIaF6wv4RDaJiy 9kGA1cfepOrRUa1DDgP3sQSbe1tj/reWoXkvl2PEl9mR6GVEcASTlU8Yci0J6Me0lE1E8s WWtyVj1qaGaIofBp5FlJyfza6MKJL1bAeJXderF4SHyVsoXKHbbeUTrIrzfgP6rmfBj1Ar 0By6O/nnAC6YnukaoYcbD5fiWpwFiy+WATwfrEMr/EuBZrXq6LS11Doaybj4Gyg7NMeJWS WlSQyO3Fff3KxuVPDlycTxL4jJLd8es4h0mBa5dB99FOjrTWuaJAefZU9yyCOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721535488; a=rsa-sha256; cv=none; b=x4R3U6jFAj5KBr8kxea/ySb6LEln+5AZ5YhT+aCMgSE+xgpXZQxGnkG+i3nDe0qOvA3iir 5e3dpQJImPgjBJleK2na2/KvQAZoBcO0bMnHkwl0EHh9WdbAZBmlauIiLhGArK6I57+eHb en76oE5CAf+/hMZE4S4pEZhGy5KD0qKC1hZmd3xm6f6djJd+jesCB58LGPKaFHha6KiuHB 2gvK1aIXoLTcDa2rJhmZJkOvQUI+1pc+Kr7ucvijh0usM2FqmKbztJgd8WZ8d6Xw2FdBWw LSioHBbxAepxCkSHxFqf+Kl8xT8ForyPC56qUsKGlDnHs0n/OiiS0BDpJHOqOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721535488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3VH6cNrx1+vnmuBK62LPPK5+hZFJ4ubkKhNv4nonoo8=; b=fje0bGz+ZJQoJdygaqadWhdhgipF0p/h/GntiuqwgKbJX0CQkn69taxBtGUEWJOoVGII67 us0YfvFjtBEdHcTCdOb1xkYp8EmQ4btDuA+YPYBjSUxUYrAMmvwxBDQj59PE6jqwe0Nfmv PtZLulqmjQ88HxiKKSledcmyFRx95ptID/9o9ZTbiwVKwicUV6pkoNUNpeu8kFSo8jWgYN S3kB5wOcfUxUy7WLd9ViNqpAdthsvYuuV4xeJUetTiBMAbGXLYAEbWc6bpdNtdm5EFrlV/ SCXPF+pc1bkFIds7pNjVKEL/paXwuICUYDrfiMlyQvd9oR1esluxe/5H2/n1fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRVWh2rnYzlcT; Sun, 21 Jul 2024 04:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L4I8gj099700; Sun, 21 Jul 2024 04:18:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L4I891099697; Sun, 21 Jul 2024 04:18:08 GMT (envelope-from git) Date: Sun, 21 Jul 2024 04:18:08 GMT Message-Id: <202407210418.46L4I891099697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 9a3f7fb46c93 - main - include: ssp: fix last bare `inline` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a3f7fb46c93eb0142a7c32bff3dbda2cd29196e Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9a3f7fb46c93eb0142a7c32bff3dbda2cd29196e commit 9a3f7fb46c93eb0142a7c32bff3dbda2cd29196e Author: Kyle Evans AuthorDate: 2024-07-21 04:16:24 +0000 Commit: Kyle Evans CommitDate: 2024-07-21 04:17:55 +0000 include: ssp: fix last bare `inline` This was missed in b8730c11a39 ("include: ssp: fix the build [...]"), but also had a bare `inline` in use. Swap it over to __ssp_inline as well. Reported by: netchild Sponsored by: Klara, Inc. Sponsored by: Stormshield --- include/ssp/wchar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ssp/wchar.h b/include/ssp/wchar.h index 48fc56f9d243..bbc84d379e56 100644 --- a/include/ssp/wchar.h +++ b/include/ssp/wchar.h @@ -31,7 +31,7 @@ #if __SSP_FORTIFY_LEVEL > 0 -static inline int +__ssp_inline int __ssp_wchar_overlap(const void *leftp, const void *rightp, size_t len) { From nobody Sun Jul 21 08:51:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRcbd0mbcz5R4mc; Sun, 21 Jul 2024 08:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRcbd0Gb9z4mmw; Sun, 21 Jul 2024 08:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721551917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZoH3NCgFSpli4tGNZuy+rGtt02Po9cavXhtVeWSHpbo=; b=J2ps21Hzq+DjmrLnXeSVICPVAyen11GmtQAhJQRkAhQ4F5/A7oIhoqVierUOZCCOMacHEM EBzaLNvr4MNwnlnjpbQzdnciI7I+5INHfLzOZ5YPqlMJ13uIfe1Z1F93F2bgS4RU973wTM cII7gaQLMb2MK7h8YOi5/gPjrhs5Shg3awuZ5BebeEbxGvisCleUBSYq+c8Rw3igXyjwIq rp2V+apYt5PBZoOGxurBwctDTVyj2tydQoLPclcpR4yREFJcj1UmEGAFaZjcOCWPqVKw4+ CnQjwFlsggxF6cG+Kum4GanMMYVgiNQND3P2MzqxHaSPY/JSePKcRgzNHps3pQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721551917; a=rsa-sha256; cv=none; b=FSj3A9mjEf3UCYsGXi7EXs3VUtDlqWPFu88E7OHyIGdIaEWQQo/mNyRNRInx1wZkSNRgNG 4EBF0N3um3ni8yZ8TegHwQ68Su/AqwjyUX1O0PxNQ/npLcg3aT7+lo/63maglOhriJjah1 kl2qA6klJkerp/GOlHxXOIW9pEZeNIIikRvbaI61yKevZPtOwgU3AL3chy2wY0tr4kzmmd dO20DxHjKmVSAcSwjcPWXwcgvSV6Ooc2/bs5phzd834lAzk+6Qzvl9rzsbdjPa3h7GAWaP MeI2Vzd2kY/iGeW+DY837NQpCsxe9RxUtKNH9VML1RvfMRXw9uB8p8mqZNiHqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721551917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZoH3NCgFSpli4tGNZuy+rGtt02Po9cavXhtVeWSHpbo=; b=Ny67kOEcQiCZo9/5Ff0CHn3ljeJv1Bk4Vi5k3fbeFhDUFFKVY9UxXvxLAEVQfuPvieoEND oT7IZ4fvFIsn39n6OpmezCVmuUin4PtYUeaWrwMXwj/ItM2t/49wKM38zRMWgSmRrIxut8 /iJmjUH1ZCWl3QPII8hrTW+OZvJHwPRl+jaooJL/4vW5ZxvJsJEo1WQJWEfQxNdlHGtK2l XYGPjiWQ/8lHpRyiR9qP1auC6si2gViIytF6kbsjKwpuMMijc/nzfsk0RST23pFCC8vFX3 ptat3hPFOKDBFKmLl/qmDhwwJk7arqHDfJ5lPavNVY1zm3vNmCannFx1kTMdfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRcbc6srNztGs; Sun, 21 Jul 2024 08:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L8pu9T072662; Sun, 21 Jul 2024 08:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L8pu8L072659; Sun, 21 Jul 2024 08:51:56 GMT (envelope-from git) Date: Sun, 21 Jul 2024 08:51:56 GMT Message-Id: <202407210851.46L8pu8L072659@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 35f498434322 - main - sockstat(1): tolerate situation where file info cannot be fetched List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35f4984343229545881a324a00cdbb3980d675ce Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=35f4984343229545881a324a00cdbb3980d675ce commit 35f4984343229545881a324a00cdbb3980d675ce Author: Konstantin Belousov AuthorDate: 2024-07-20 00:30:55 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-21 08:51:42 +0000 sockstat(1): tolerate situation where file info cannot be fetched Either due to a race, or to the privilege restrictions, it is not guaranteed that kern.files returned file information for all pcbs read from net.inet..pcblist. In this case the file rbtree does not return the matching file by data address, and code must avoid dereferencing NULL. PR: 279875 Reviewed by: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46050 --- usr.bin/sockstat/sockstat.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 73b1f00a4481..5eac327ca184 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -1164,8 +1164,11 @@ displaysock(struct sock *s, int pos) f = RB_FIND(files_t, &ftree, &(struct file){ .xf_data = p->socket }); - pos += xprintf("[%lu %d]", - (u_long)f->xf_pid, f->xf_fd); + if (f != NULL) { + pos += xprintf("[%lu %d]", + (u_long)f->xf_pid, + f->xf_fd); + } } else pos += printaddr(&p->laddr->address); } @@ -1183,9 +1186,12 @@ displaysock(struct sock *s, int pos) f = RB_FIND(files_t, &ftree, &(struct file){ .xf_data = p->socket }); - pos += xprintf("%s[%lu %d]", - fref ? "" : ",", - (u_long)f->xf_pid, f->xf_fd); + if (f != NULL) { + pos += xprintf("%s[%lu %d]", + fref ? "" : ",", + (u_long)f->xf_pid, + f->xf_fd); + } ref = p->faddr->nextref; fref = false; } From nobody Sun Jul 21 08:53:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRcdh3tXxz5R52Y; Sun, 21 Jul 2024 08:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRcdh3MHzz4npD; Sun, 21 Jul 2024 08:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AQCm/v38yurgfa0i2lPNvv1X4sDE0rs7jyi1ZwEAYus=; b=tRFK6/Gx94gn6Bj/y/otoiJj11mHN8tfaLo9r5ZtIziXAdtP6jzv66dIUPzqcV5r/FmteO 1qkSpUyK1KEPtXN9ebsJ+y+8uI2hXA9nPzAn5v2st4QGp2Y8iEXWUDns6MRnxGI04y7/aj elTBH0o4kuoAMTn48vFSJqG4xGBFkj2ZZuqxhitDJfAYeJO0k8QEGyd60ox30uXhUr/Qmu Vo4qkeXipLI0SPVp6H8gn90aC9C7RcLxEDz9Wa8ZugpNBpeLsDDi+bmOrZ456/AgZLBAXI k4B3LLt98NmIkkhBl6+ceZWV8g0nSmxqUmEdl9E/H9Tztlsj6xaladMk2Qy3cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721552024; a=rsa-sha256; cv=none; b=Iyxtbq37/FTx5q5agYIEe+DL2muGHhp9ghUl6Jd3Jp9l6X5NYX/enTa8WKg1qe1XXIFPzV fZV/9EWRA3W95bdFcw9YFl8O8aZQGbLwizYwxVjLMbUE0U4ssDbExKHJ3UMy9coEa8BtiV E4dhcaaFxoPb5lYZmE6GEl35i/q5tIoB6eekY84LUbefAEiEOi3EzSDLzbbQZxuBdtyD+t f61C7ORtsJQNTZeg4w7huZ5yL6QcpOPfVztUTMFIPuPf3iU2hd7Q9oxrKKGzIHW0jZcnFB dfAyOiYpfwTjV0gPjW2nz0wFs46HiXr+YWrqTG9GSiLmW9G1arS5JuXWORXbrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AQCm/v38yurgfa0i2lPNvv1X4sDE0rs7jyi1ZwEAYus=; b=reU1q53yVNCshCPgWdKBsDBMaeL+BERJ5y8mnOqo2oms/e6cs2YgiAOBm6aA7GrfZxVxRW Z8bj5LtAdtsi6iU6Hx7GfyuxqIXA5o9ubNmW/kURmxdC6qEwJlENRbnSBjbjzJ2wPDFJzT 30LJZi49cZ8nnYlvRcKWADm/nFRL1AQUWfUrwCzpq0JvMEG9YNSHj/jztjgwH+isn77Ovv IdwaasPqIQTXKmlNezsacljoEI+nMoeiPcbe5icil1eEp1Bb+org3zDhzq0wqXQV3/rijb GdqgpQ61hCm8RdrPfjQ9ZBlZJoXEIgeZHnTJ9ucZA6dXemzStvoS+s4QUNLKLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRcdh2xN5ztkM; Sun, 21 Jul 2024 08:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L8rio8074989; Sun, 21 Jul 2024 08:53:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L8riTg074986; Sun, 21 Jul 2024 08:53:44 GMT (envelope-from git) Date: Sun, 21 Jul 2024 08:53:44 GMT Message-Id: <202407210853.46L8riTg074986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: eb0fdc77533d - main - netinet/ipsec.h: remove unneeded "extern"s List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb0fdc77533db88d309a73f67f19222843597267 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=eb0fdc77533db88d309a73f67f19222843597267 commit eb0fdc77533db88d309a73f67f19222843597267 Author: Konstantin Belousov AuthorDate: 2024-07-19 19:11:42 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-21 08:53:19 +0000 netinet/ipsec.h: remove unneeded "extern"s Reviewed by: kp Sponsored by: NVIDIA networking Differential revision: https://reviews.freebsd.org/D46045 --- sys/netipsec/ipsec.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h index 55cc0839eab9..dfb334601331 100644 --- a/sys/netipsec/ipsec.h +++ b/sys/netipsec/ipsec.h @@ -353,19 +353,19 @@ int ipsec4_process_packet(struct ifnet *, struct mbuf *, struct secpolicy *, int ipsec_process_done(struct mbuf *, struct secpolicy *, struct secasvar *, u_int); -extern void m_checkalignment(const char* where, struct mbuf *m0, - int off, int len); -extern struct mbuf *m_makespace(struct mbuf *m0, int skip, int hlen, int *off); -extern caddr_t m_pad(struct mbuf *m, int n); -extern int m_striphdr(struct mbuf *m, int skip, int hlen); +void m_checkalignment(const char* where, struct mbuf *m0, + int off, int len); +struct mbuf *m_makespace(struct mbuf *m0, int skip, int hlen, int *off); +caddr_t m_pad(struct mbuf *m, int n); +int m_striphdr(struct mbuf *m, int skip, int hlen); #endif /* _KERNEL */ #ifndef _KERNEL -extern caddr_t ipsec_set_policy(const char *, int); -extern int ipsec_get_policylen(c_caddr_t); -extern char *ipsec_dump_policy(c_caddr_t, const char *); -extern const char *ipsec_strerror(void); +caddr_t ipsec_set_policy(const char *, int); +int ipsec_get_policylen(c_caddr_t); +char *ipsec_dump_policy(c_caddr_t, const char *); +const char *ipsec_strerror(void); #endif /* ! KERNEL */ From nobody Sun Jul 21 08:53:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRcdj4pPXz5R4xm; Sun, 21 Jul 2024 08:53:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRcdj3y1Qz4njP; Sun, 21 Jul 2024 08:53:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gxSM0JndpPI4w03fnpPIxfugHlTmATNm//royrZeIQ4=; b=PWJeHNPNbgOkduW6insubUjAJZpxM+fCl7aQiwKqFmS/dFulVaiZ8vCoFt59NdiQyl9yqa D4rLN8YU6OxZ0GH9unGdXQEzkYxbJZPjRVZFvZ+NYOKef+QAlRWB4YXLFYnIKyheWTqF1W UIzMvQc61aglLOM5pS97SIXGioG/DzOtEhzd64WxrdJexQnAjKHGYw/Yuzkq2g5ogh0un8 XRhfMFyp4YcE4TRz7fo4CZovs2B7lwkfMOPEeBvOebmytntUlcvyYG6OWM08PX20nAKLIu GKEMf++N4lRyh8ZIm+Bk995fq2+WrlpY69GExiWh/taVnf7wBD4m/oZvX8ZgRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721552025; a=rsa-sha256; cv=none; b=fG6BStdtEK6YczdVYNwN3hTJEjviv/R+B+IpyVHlEqfulTsMa7KvBNEU1Qm6k++8hWEPHL T30cqdNKlPI3WaW76ra1JmQ5zPvQfW9VAVJspI4unK5lrVtdJO9sX1H8lSQ+SGgWNe0ZPW 3P/+Tr0yOawQYp6722KAkWTDzDyi+NtK+8hHLHt4WT844Lp/x0/8hf6HMYFAkavcH1aoqg uymPgqQxGrGz2cH5huFpG2XtGVDWoRg874z3+GsidNaMJ1XMJyC3QnmSCHDAzOBGrEmFZn AnvXJ1km5VtzuIozIT+bZAOh0QpN1aNdQUoThYST5EmgMzRVOMPj/XT9RHpNTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gxSM0JndpPI4w03fnpPIxfugHlTmATNm//royrZeIQ4=; b=pMB0srnOnSPAmlUPG3dkvfkRAtjrlnensVO972WGslRy5dDrUgq5GfTQCnowz6Jbh2B8HH 4cFVOMd4p/pOMkjntH05mnWwz0ZdMsf2ZoFHkrm+7KEhbbaMdzJXOWetrjWsuuhuJgo7qO 3R0mO2wXQcjHQJtWZhxzi+NdNIJthAvZ2nkYAQmfI3+YWl0x5tdW4eNMGCYfD5JQ3VVbdk 2957u5ChKU23+1vOHajiXvGaRVsGyeuS/Z6jNxNUoO/nqwo3wWa5Q9ppM+Z/6YOnXEHhem 1kUPxETFQt9J1a3zQj0Fn6k92Fv5HbfFnPbC5mMQ71McInZkeuzvUyHNtBLXFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRcdj3YRrztdg; Sun, 21 Jul 2024 08:53:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L8rjg1075047; Sun, 21 Jul 2024 08:53:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L8rjvE075044; Sun, 21 Jul 2024 08:53:45 GMT (envelope-from git) Date: Sun, 21 Jul 2024 08:53:45 GMT Message-Id: <202407210853.46L8rjvE075044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6023bd1d52b6 - main - netipsec: move declaration of the sysctl net.inet{,6}.ipsec nodes to header List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6023bd1d52b6b928927f9d2c0e3017687b29a731 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6023bd1d52b6b928927f9d2c0e3017687b29a731 commit 6023bd1d52b6b928927f9d2c0e3017687b29a731 Author: Konstantin Belousov AuthorDate: 2024-07-19 19:14:41 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-21 08:53:19 +0000 netipsec: move declaration of the sysctl net.inet{,6}.ipsec nodes to header Reviewed by: kp Sponsored by: NVIDIA networking Differential revision: https://reviews.freebsd.org/D46045 --- sys/netipsec/ipsec.c | 4 ---- sys/netipsec/ipsec.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c index e22a3872d48d..9b18cedc7a80 100644 --- a/sys/netipsec/ipsec.c +++ b/sys/netipsec/ipsec.c @@ -172,8 +172,6 @@ VNET_DEFINE(int, natt_cksum_policy) = 0; FEATURE(ipsec, "Internet Protocol Security (IPsec)"); FEATURE(ipsec_natt, "UDP Encapsulation of IPsec ESP Packets ('NAT-T')"); -SYSCTL_DECL(_net_inet_ipsec); - /* net.inet.ipsec */ SYSCTL_PROC(_net_inet_ipsec, IPSECCTL_DEF_POLICY, def_policy, CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_RW | CTLFLAG_NEEDGIANT, @@ -257,8 +255,6 @@ VNET_DEFINE(int, ip6_ipsec_ecn) = 0; /* ECN ignore(-1)/forbidden(0)/allowed(1) * VNET_DEFINE_STATIC(int, ip6_filtertunnel) = 0; #define V_ip6_filtertunnel VNET(ip6_filtertunnel) -SYSCTL_DECL(_net_inet6_ipsec6); - /* net.inet6.ipsec6 */ SYSCTL_PROC(_net_inet6_ipsec6, IPSECCTL_DEF_POLICY, def_policy, CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_RW | CTLFLAG_NEEDGIANT, diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h index dfb334601331..749813518092 100644 --- a/sys/netipsec/ipsec.h +++ b/sys/netipsec/ipsec.h @@ -46,6 +46,7 @@ #include #include #include +#include #define IPSEC_ASSERT(_c,_m) KASSERT(_c, _m) @@ -359,6 +360,9 @@ struct mbuf *m_makespace(struct mbuf *m0, int skip, int hlen, int *off); caddr_t m_pad(struct mbuf *m, int n); int m_striphdr(struct mbuf *m, int skip, int hlen); +SYSCTL_DECL(_net_inet_ipsec); +SYSCTL_DECL(_net_inet6_ipsec6); + #endif /* _KERNEL */ #ifndef _KERNEL From nobody Sun Jul 21 08:53:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRcdk5SQwz5R50N; Sun, 21 Jul 2024 08:53:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRcdk4gF8z4nXp; Sun, 21 Jul 2024 08:53:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wTMc5kByKm8nz6JeVjYpKcbK1dtjFAteOFWRTOH/g4c=; b=NroHZ1bC9wcHkk2LnIQ0olYgG12cUmTZ14o/O4pUT10GAwwZ7+sBjYw9ytBB7qcCF3ptK2 bPFYYkTkM4N5nNHbWbUb1YxCHRLuhQ/cHYtrSoDpYaTMpgaXnkcLfYSrBOOU5Q7cEQTFS3 qxPEjBJYNKQc1Z+/u3hH5MzgTFezsHfavQvCDRBrqaBXoOD+7FDkT+oUUAKgm6sqOvTYFU NTgq0+8pqO5vhCcXJSLjDKWCfYoBpbBEft91bQKyXBkM53zN36ur/PkxG+Po9vCduVzcGn OJJFdX28Cy6y+zGRJUhPObH2G70NcFoZoZyeoXt96/dEM6LOAOlFPgcpgCjuXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721552026; a=rsa-sha256; cv=none; b=OSj0twtVjCQCvZglzAyjPRuN72eKz4+Av/0V4dNVVLU7kMGfuKGKIXboof2O/lzcMLVcIG YU9k1nBI6Lt7Enf3ESr4Xnj+NYS4jorTB+I/Hr03Ogwjt46uXmdFNmbWIndNC9ikMeE90Z 719g8ECrtJY8PSFAI5LA0rzX6aaEc6FXM+hnsmeDDDsFYk9NT4ANWyxvc00kkVJIXzI49a ommdQCbfMfsxvTk+/ne+XZtCdCQfWx43QVRsXIOWhESWSmXfn5xmtB2LLrAOLlFhCKQia+ VRoJLxtsqpniHlsmRWYYJKfdRhTJDwOIBgK3xoFsb4RZxQPAAL90WID1fAp0jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wTMc5kByKm8nz6JeVjYpKcbK1dtjFAteOFWRTOH/g4c=; b=Tx/aLXxa9X3//B/ZixP6wYl+E7W9Y95B8nGvWlE4bnChqO4PTTE4a6+JwkOyIabHfXM0lB cbj0Id8SoCJIAkeHIvAvXMXhmtbzEJOhS5u4geMHsbkUwIAe7l3qeJ1ryaxAMRaCSv/ZTF JVXsIgWNckHcAUgFdShPXnW+VX8giT7w886fvl2CzNgzytAo8HA7EHDZ6FFECJjiNSDIU5 30u7tGzDgEEa6j6qF0VQs6C7Et626cYPl2wri9rg5prigeZU/GCyrQ0LBTgVNgwHragmVL F4CW77LQ6rUbo6gGIQGCrE2Zz3sjEllq/EGTfra5TcBXUYB0fKJBh9//qkGWpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRcdk4FT7zswT; Sun, 21 Jul 2024 08:53:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L8rkRd075105; Sun, 21 Jul 2024 08:53:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L8rkoh075102; Sun, 21 Jul 2024 08:53:46 GMT (envelope-from git) Date: Sun, 21 Jul 2024 08:53:46 GMT Message-Id: <202407210853.46L8rkoh075102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9a7096ff547d - main - ipsec_offload: hide SA/SP offload lifecycle prints under verbose sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a7096ff547de2b5a09c5a4683853568e08c2f8a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9a7096ff547de2b5a09c5a4683853568e08c2f8a commit 9a7096ff547de2b5a09c5a4683853568e08c2f8a Author: Konstantin Belousov AuthorDate: 2024-07-19 19:15:35 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-21 08:53:19 +0000 ipsec_offload: hide SA/SP offload lifecycle prints under verbose sysctl Reported and reviewed by: kp Discussed with: np Sponsored by: NVIDIA networking Differential revision: https://reviews.freebsd.org/D46045 --- sys/netipsec/ipsec_offload.c | 58 +++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c index 48082830b88b..8ccae7a94f2a 100644 --- a/sys/netipsec/ipsec_offload.c +++ b/sys/netipsec/ipsec_offload.c @@ -35,9 +35,12 @@ #include #include #include +#include #include #include +#include + #include #include #include @@ -190,6 +193,27 @@ ipsec_accel_fini(void *arg) SYSUNINIT(ipsec_accel_fini, SI_SUB_VNET_DONE, SI_ORDER_ANY, ipsec_accel_fini, NULL); +SYSCTL_NODE(_net_inet_ipsec, OID_AUTO, offload, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + ""); + +static bool ipsec_offload_verbose = false; +SYSCTL_BOOL(_net_inet_ipsec_offload, OID_AUTO, verbose, CTLFLAG_RW, + &ipsec_offload_verbose, 0, + "Verbose SA/SP offload install and deinstall"); + +static void +dprintf(const char *fmt, ...) +{ + va_list ap; + + if (!ipsec_offload_verbose) + return; + + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); +} + static void ipsec_accel_alloc_forget_tq(struct secasvar *sav) { @@ -209,7 +233,7 @@ ipsec_accel_sa_install_match(if_t ifp, void *arg) if ((ifp->if_capenable2 & IFCAP2_BIT(IFCAP2_IPSEC_OFFLOAD)) == 0) return (false); if (ifp->if_ipsec_accel_m->if_sa_newkey == NULL) { - printf("driver bug ifp %s if_sa_newkey NULL\n", + dprintf("driver bug ifp %s if_sa_newkey NULL\n", if_name(ifp)); return (false); } @@ -226,7 +250,7 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) tq = arg; - printf("ipsec_accel_sa_newkey_act: ifp %s h %p spi %#x " + dprintf("ipsec_accel_sa_newkey_act: ifp %s h %p spi %#x " "flags %#x seq %d\n", if_name(ifp), ifp->if_ipsec_accel_m->if_sa_newkey, be32toh(tq->sav->spi), tq->sav->flags, tq->sav->seq); @@ -240,7 +264,7 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) } if (drv_spi == -1) { /* XXXKIB */ - printf("ipsec_accel_sa_install_newkey: cannot alloc " + dprintf("ipsec_accel_sa_install_newkey: cannot alloc " "drv_spi if %s spi %#x\n", if_name(ifp), be32toh(tq->sav->spi)); return (ENOMEM); @@ -249,14 +273,14 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) drv_spi, &priv); if (error != 0) { if (error == EOPNOTSUPP) { - printf("ipsec_accel_sa_newkey: driver " + dprintf("ipsec_accel_sa_newkey: driver " "refused sa if %s spi %#x\n", if_name(ifp), be32toh(tq->sav->spi)); error = ipsec_accel_handle_sav(tq->sav, ifp, drv_spi, priv, IFP_HS_REJECTED, NULL); /* XXXKIB */ } else { - printf("ipsec_accel_sa_newkey: driver " + dprintf("ipsec_accel_sa_newkey: driver " "error %d if %s spi %#x\n", error, if_name(ifp), be32toh(tq->sav->spi)); /* XXXKIB */ @@ -266,7 +290,7 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) drv_spi, priv, IFP_HS_HANDLED, NULL); if (error != 0) { /* XXXKIB */ - printf("ipsec_accel_sa_newkey: handle_sav " + dprintf("ipsec_accel_sa_newkey: handle_sav " "err %d if %s spi %#x\n", error, if_name(ifp), be32toh(tq->sav->spi)); } @@ -324,13 +348,13 @@ ipsec_accel_sa_newkey_impl(struct secasvar *sav) SADB_KEY_ACCEL_DEINST)) != 0) return; - printf( + dprintf( "ipsec_accel_sa_install_newkey: spi %#x flags %#x seq %d\n", be32toh(sav->spi), sav->flags, sav->seq); tq = malloc(sizeof(*tq), M_TEMP, M_NOWAIT); if (tq == NULL) { - printf("ipsec_accel_sa_install_newkey: no memory for tq, " + dprintf("ipsec_accel_sa_install_newkey: no memory for tq, " "spi %#x\n", be32toh(sav->spi)); /* XXXKIB */ return; @@ -403,7 +427,7 @@ ipsec_accel_forget_handle_sav(struct ifp_handle_sav *i, bool freesav) sav = i->sav; if ((i->flags & (IFP_HS_HANDLED | IFP_HS_REJECTED)) == IFP_HS_HANDLED) { - printf("sa deinstall %s %p spi %#x ifl %#x\n", + dprintf("sa deinstall %s %p spi %#x ifl %#x\n", if_name(ifp), sav, be32toh(sav->spi), i->flags); ifp->if_ipsec_accel_m->if_sa_deinstall(ifp, i->drv_spi, i->ifdata); @@ -597,18 +621,18 @@ ipsec_accel_spdadd_cb(if_t ifp, void *arg) sp = arg; inp = sp->ipsec_accel_add_sp_inp; - printf("ipsec_accel_spdadd_cb: ifp %s m %p sp %p inp %p\n", + dprintf("ipsec_accel_spdadd_cb: ifp %s m %p sp %p inp %p\n", if_name(ifp), ifp->if_ipsec_accel_m->if_spdadd, sp, inp); error = ipsec_accel_remember_sp(sp, ifp, &i); if (error != 0) { - printf("ipsec_accel_spdadd: %s if_spdadd %p remember res %d\n", + dprintf("ipsec_accel_spdadd: %s if_spdadd %p remember res %d\n", if_name(ifp), sp, error); return (error); } error = ifp->if_ipsec_accel_m->if_spdadd(ifp, sp, inp, &i->ifdata); if (error != 0) { i->flags |= IFP_HP_REJECTED; - printf("ipsec_accel_spdadd: %s if_spdadd %p res %d\n", + dprintf("ipsec_accel_spdadd: %s if_spdadd %p res %d\n", if_name(ifp), sp, error); } return (error); @@ -676,11 +700,11 @@ ipsec_accel_spddel_act(void *arg, int pending) NET_EPOCH_WAIT(); if ((i->flags & (IFP_HP_HANDLED | IFP_HP_REJECTED)) == IFP_HP_HANDLED) { - printf("spd deinstall %s %p\n", if_name(i->ifp), sp); + dprintf("spd deinstall %s %p\n", if_name(i->ifp), sp); error = i->ifp->if_ipsec_accel_m->if_spddel(i->ifp, sp, i->ifdata); if (error != 0) { - printf( + dprintf( "ipsec_accel_spddel: %s if_spddel %p res %d\n", if_name(i->ifp), sp, error); } @@ -741,12 +765,12 @@ ipsec_accel_on_ifdown_sp(struct ifnet *ifp) NET_EPOCH_WAIT(); if ((i->flags & (IFP_HP_HANDLED | IFP_HP_REJECTED)) == IFP_HP_HANDLED) { - printf("spd deinstall %s %p\n", if_name(ifp), sp); + dprintf("spd deinstall %s %p\n", if_name(ifp), sp); error = ifp->if_ipsec_accel_m->if_spddel(ifp, sp, i->ifdata); } if (error != 0) { - printf( + dprintf( "ipsec_accel_on_ifdown_sp: %s if_spddel %p res %d\n", if_name(ifp), sp, error); } @@ -894,7 +918,7 @@ ipsec_accel_input(struct mbuf *m, int offset, int proto) if (tag->drv_spi < IPSEC_ACCEL_DRV_SPI_MIN || tag->drv_spi > IPSEC_ACCEL_DRV_SPI_MAX) { - printf("if %s mbuf %p drv_spi %d invalid, packet dropped\n", + dprintf("if %s mbuf %p drv_spi %d invalid, packet dropped\n", (m->m_flags & M_PKTHDR) != 0 ? if_name(m->m_pkthdr.rcvif) : "", m, tag->drv_spi); m_freem(m); From nobody Sun Jul 21 08:58:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRckj3QZWz5R5Cy; Sun, 21 Jul 2024 08:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRckj2fvbz4pnH; Sun, 21 Jul 2024 08:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ty9VDF6jO4m27rcGwVYkXJjd4tjFRiGGpah9AN4k+2k=; b=UxsTn0CNTn0qUPz6XOd34rRdsLi0kD63uSciWT4Y8FgnuyjAQZji3B8x8Wt3YLMqQ7rtOJ 5s7uguGxgBOIXI9zLqbb8JbpDj5NHVaBiVIkLPQce2ihtX3sOL5fFXo3vJvafZEjJswgPL 8Q+e+aHUSuLJVU50HPd8UqgTeI6nl5rgmTDX8ZDVg77DtrSY4ihLNqxLJva8l3Qw714hIn yQD8f6cD1H7OribtB7QmTgR0EPrfKdaL2rH1udd9eaiiJvQ6xNU7NQkpwD033vKfeJCbF5 XIbC9My+9Tsx8DQ/DmK9jWzuxz7WiJcqlB2gys8mG4/YopFgXdZB1CQ7JbSogw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721552285; a=rsa-sha256; cv=none; b=bocDM3bbwwtrBIjcSGzApdITN3++zJPwFE8KUA5ZFtK3scnLtut5ygZ1caXBAQlwvpVy9q jaIOLrbBKunInDrTJXT4cAhGwHjN6TdqTVRXw7naoNIR1vJBCE6VzcMuh/R6hQbiSToF3I TonbOlIIITTIdzzQUH+xa3+fauvxtwkG2SxCWxl3SA3vrw8uH7mbC7mpVjoPfJ+OVgzDqy RZqruMETgo8G25e1mvdnwaI7IixM3O2GCLmkZYtRqYcP8jXYWt2n3ji/TOVu1aJ39BuiqO xRGESZMFzNnZMEVualrtDqD/hpbFNrkl69RtgbkyIz9L2O6u2Z2ieraV1rKwOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ty9VDF6jO4m27rcGwVYkXJjd4tjFRiGGpah9AN4k+2k=; b=ZZFlXKUA0KZ24mgPNzTUNAObY/z+z7QcZYY00FBT/B16z/vS3861E0k2e5+R+xWHnE6O0j j8gSmUS6AVzy/WouAfx1p09sxgRKjXWUKXk5MMIWn2FpZQ9CxZtwi7r0+5kp2geeaLqnzY iEXvSeDHoogvLKdO8esi1bkc6dxyXCoDoWLXzkHAnrechcb6vz4jM/id5ttTel5VEGbsZB +4kla9id6LH+PdonKjVhiHd8/V19GKpqxiL2mAYNzq/hFN2wj01ZYTMvd2PSNtAUhMhSpE hvVyG7xVUtBPhOhx7Feppaju22PMgxMbUMVRGL68xLuq/WgVqQEGoAuuSYEZCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRckj1w0Xzt5W; Sun, 21 Jul 2024 08:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L8w5QN075855; Sun, 21 Jul 2024 08:58:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L8w59I075852; Sun, 21 Jul 2024 08:58:05 GMT (envelope-from git) Date: Sun, 21 Jul 2024 08:58:05 GMT Message-Id: <202407210858.46L8w59I075852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 58c99e07506e - main - sctp(4): Fix typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58c99e07506e67c06d703b080c2fc22cc39237f2 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=58c99e07506e67c06d703b080c2fc22cc39237f2 commit 58c99e07506e67c06d703b080c2fc22cc39237f2 Author: Gordon Bergling AuthorDate: 2024-07-21 08:57:22 +0000 Commit: Gordon Bergling CommitDate: 2024-07-21 08:57:22 +0000 sctp(4): Fix typos in source code comments - s/collasped/collapsed/ - s/defininitions/definitions/ - s/optionaly/optionally/ Obtained from: NetBSD MFC after: 3 days --- sys/netinet6/sctp6_usrreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index e3ed37b53425..0f194821ea94 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -359,7 +359,7 @@ sctp6_ctlinput(struct ip6ctlparam *ip6cp) } /* - * this routine can probably be collasped into the one in sctp_userreq.c + * this routine can probably be collapsed into the one in sctp_userreq.c * since they do the same thing and now we lookup with a sockaddr */ static int @@ -721,8 +721,8 @@ connected_type: * note with the current version this code will only be used * by OpenBSD, NetBSD and FreeBSD have methods for * re-defining sosend() to use sctp_sosend(). One can - * optionaly switch back to this code (by changing back the - * defininitions but this is not advisable. + * optionally switch back to this code (by changing back the + * definitions but this is not advisable. */ struct epoch_tracker et; int ret; From nobody Sun Jul 21 09:01:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRcpn0bYxz5R5Vs; Sun, 21 Jul 2024 09:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRcpm6Ndmz4q1w; Sun, 21 Jul 2024 09:01:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ut+eQSiiIrr9D4nj7Cixc2iF14KiFHKvRwspvkQnRK4=; b=cvgytKTnlczh9tGJ2AGykLfNY0sy+aEXoWtnoj3zyjXloRH4I7shATcwIkh4nY/1c+Wfnw tNW1tByBlMNe0nQv2BhyoppO+IF5bwZ6HoDALWMT/7/6O5tAszJDq8MmvZd4KS+I2s/PKx QbQMYiSOinCPusI1SL7fzom+/RI3D3d+2GMKc08l9t1I/i6IRmioWxVcOWNfzFrQeuku/x 1GIiA56m9pZ6yTrj0H82bJisPAlk5VYjm7Gm70Qz9QD5jmxzSkHDUwpUz+Da6Yq71KpmGK MBa98RYzdq4cQ8BbR4C8pRpEc4405qJT2gLBFcXZbrpO4HSNrxp9UF08coBTuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721552496; a=rsa-sha256; cv=none; b=ECu6TDU7fq1HfWQXJPnjRSKzOO2G7KSHBk/natqf1s1sKQHSABdNlUf2z79wyg7greXYXp /woiraoxlpQaqx0WQqiRwO6AZJR6L9O4vrUJTOZFzqL1O/amPtr5sz40BGpfpdAi3A0dbK 6TcIe/pqoH5DmWNnCFYJ3M3TN42gI0H6yzjGGfW6x83+YSNmGiDLp8AuB0U5m5iIJbN+6z +KewX7WPZgr5KzrBqsmoFejIBH/5qvVGUwU48LgCqsC4Fz34ICBicYctmlrmOlpa7ZPamv X4AOTZ++sj1G/r+gwP65nL5wEJCr7kwvPY8axcuynnjbqtwP+CGdin5Tpkew6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ut+eQSiiIrr9D4nj7Cixc2iF14KiFHKvRwspvkQnRK4=; b=opn8YEUnji55BZDxnLirD8lTrYV5wJ+A0oW5oDpvOcSllSSY90PNP/2wAxBesVaOpZvPee DBy+JwoN/G9YS9/4lY3vjkz+dPcJFIDb8NlnkvD12ekWGvPloEFUT+E9AewFeSiQOx3P4D ZFbkN76avYUtdLxYOLfkEg3UusQd5HAC4RuOxiQsG777DC43x5wZq7UTEEm/6ORuodRd0V DND8iAsoBXEyq+w9Kr1m+EvcgcUoo5GR+Dw6NTiGZFiaQPtVMM6UpRHJupMQhBN9FqBsBz DZdfMvkHVwJuIaZqtDgIxO6AiLnQH8pDhjjSrmMr97VO1Cr8xTo7TK8UkeX5cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRcpm5GY5ztbG; Sun, 21 Jul 2024 09:01:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L91aYF088958; Sun, 21 Jul 2024 09:01:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L91a8Y088955; Sun, 21 Jul 2024 09:01:36 GMT (envelope-from git) Date: Sun, 21 Jul 2024 09:01:36 GMT Message-Id: <202407210901.46L91a8Y088955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 32a9b95a8751 - main - stress2: Fix a typo in namecache2.sh List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32a9b95a8751f916deef5970476f010995244bfe Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=32a9b95a8751f916deef5970476f010995244bfe commit 32a9b95a8751f916deef5970476f010995244bfe Author: Gordon Bergling AuthorDate: 2024-07-21 09:00:58 +0000 Commit: Gordon Bergling CommitDate: 2024-07-21 09:00:58 +0000 stress2: Fix a typo in namecache2.sh - s/inconsistancy/inconsistency/ MFC after: 3 days --- tools/test/stress2/misc/namecache2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/namecache2.sh b/tools/test/stress2/misc/namecache2.sh index 9fcfe5e0226c..b32d41974468 100755 --- a/tools/test/stress2/misc/namecache2.sh +++ b/tools/test/stress2/misc/namecache2.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# UFS cache inconsistancy for rename(2) demonstrated +# UFS cache inconsistency for rename(2) demonstrated # Fails with: # ls -ali /mnt # ls: tfa1022: No such file or directory From nobody Sun Jul 21 09:02:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRcr939ftz5R69K; Sun, 21 Jul 2024 09:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRcr92ckVz4qfC; Sun, 21 Jul 2024 09:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fEJVnjm25i86Ud2sJvTckTL3cQekNAv9oYeN9jGXCqw=; b=n/jnM45/JhJ7KTpjb2y7YFNNjGWSwWfbfB0w1TbXT3nX5uhrSzdQ6/3h0IxxL2qS80Smd4 o4jo9E0QaarnAIp7KmkCOXbviXRYP1d+tXA2LlzhHoptWP89KJejlHjUVEAL4df6LeXi3A yceJAEzM+qKRl1xneWMx+DFzKw20HiPl7L0qMyF4mN4viQX7zsZumJHNXzR6FqGjQRSqhf m6bNjOKgKGa4QExSDPKzZ2SOqNxueka62JkYs+BIqq4Z6LDdXlh1cGCoHLLJ+qtrmbB+HG 3Qb1azeqTbaiPsptwZfv+oknFnDxxatCeciaiF+OBUAvLkzLhWtmvhVEKmAUnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721552569; a=rsa-sha256; cv=none; b=EiknmY9iiMjeLuTAHY2WTi+i0rB2g7RKRlDDpR3WMSHgYNpw1XWhQS/BP5F3tVOdmZ7AIb xchZy/e55ypEdF64gZAxrhR1l1n0WE024r+Y0Sj74jl7HyggBcVoFSXRfdEk4PpSWDxHXE H4t82FBT57Idu6LkTLzLWT1cZ5r/6LzpU+Dv+yH9YJ6bAUOizE+7kVI7+zCxUsr+iIr/cK za6azRoGfniEVH5ZKfUJuPph686rup6cnqKyOEOhjhQJFByF6CbD/hIlVkZTiTqb3ybI5T INAfT5b9BibdhWb+CYfEJy9Qxyew9dY87f5y5j+OmAMUtOls5lPdNm4cPfYx+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fEJVnjm25i86Ud2sJvTckTL3cQekNAv9oYeN9jGXCqw=; b=uvpzpD3lfqS2U3YM1VCuSs7Fc4VQz2SuIGfoM/VzT3LqJAlxAs0OpLxQujWuIzL6+m8uMZ L8j2p5A3mfyHHVN/u+dBwOBffFCsiqCTzG1F18Bn7FmuMe/a1z3sz5iHqOcjF9LbCNhROq 4RhgTRBSwnsRm1XJSfYNvIYMPJk9+sw4NHw0CD12LB/Zg6fgmHirgm/G+Pk7StHtKh3B8/ JDWyr8x2v+jJtTV9UAZ3oArnvNNVlE78tA3pM8dwoIGhRv9er7+HSjdnIjdf4Lfdl09Gm4 n525TpH9B2I8Ial++ucr2W0dvnw6qmLzlyIZEy9AZRGrerqzYtNH8sW4Zc37hA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRcr927b2ztqq; Sun, 21 Jul 2024 09:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L92n2W092664; Sun, 21 Jul 2024 09:02:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L92nJ5092661; Sun, 21 Jul 2024 09:02:49 GMT (envelope-from git) Date: Sun, 21 Jul 2024 09:02:49 GMT Message-Id: <202407210902.46L92nJ5092661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: c90a206496fc - main - ipfilter(4): Fix typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c90a206496fc431854e0c2989c2214b048e960d5 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=c90a206496fc431854e0c2989c2214b048e960d5 commit c90a206496fc431854e0c2989c2214b048e960d5 Author: Gordon Bergling AuthorDate: 2024-07-21 09:02:31 +0000 Commit: Gordon Bergling CommitDate: 2024-07-21 09:02:31 +0000 ipfilter(4): Fix typos in source code comments - s/inconsistancy/inconsistency/ MFC after: 3 days --- sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 69be4abb2485..1c3051fb6615 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -536,7 +536,7 @@ ipfclose(dev_t dev, int flags) /* * ipfread/ipflog * both of these must operate with at least splnet() lest they be - * called during packet processing and cause an inconsistancy to appear in + * called during packet processing and cause an inconsistency to appear in * the filter lists. */ #ifdef __FreeBSD__ @@ -579,7 +579,7 @@ static int ipfread(dev, uio, ioflag) /* * ipfwrite * both of these must operate with at least splnet() lest they be - * called during packet processing and cause an inconsistancy to appear in + * called during packet processing and cause an inconsistency to appear in * the filter lists. */ #ifdef __FreeBSD__ From nobody Sun Jul 21 09:06:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRcwP2rpVz5R6Pv; Sun, 21 Jul 2024 09:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRcwP2MzVz4r5Y; Sun, 21 Jul 2024 09:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PKyoPQy4YUcYETNMx6qbpur+avt5GgAXKCZAqV3IjeY=; b=Tempj1P7NS2b2t3VCcqOr7dHb/PRu5voMgIoROqzsOKTJqYp+qYhmy0r/QhVPPT+CHm1sc aCPZkyc6v1kvzbRctVfH89dpTwOx+IQ+4q9WNznyYF4nSL5TRYDq+pXjYgw6H/IjOhgSfs ejT1vuWkPqlQ0QTt671Z7lMDAAfxEkC3xod1po6iiUHvzOJ7NIPuEDQRKKr5bNVE4GR54+ dw+o7Fgo/DdmV0OT/y3lQ1btSddfmgu1sTIBNxtNTOARoNrqk4GHxUhZ/l4/6d1WXbZtLa M4e1ugs/vpLjIZUh/T23IXfidFKM9al88ElJS+LRjcFOl6mx5WVftOsYr1TXdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721552789; a=rsa-sha256; cv=none; b=YMsgIP/Qp7tLEHcpQ8sTDCvGJSGLQPM6m71xCIAoBt4+1hmjrGKpPEn2nYN5Jw4YK0JQcw JStp6tBzuen3Tbe2cPgSx5jtIl9GU+JdSqhYCPFu4WIjrmEC1fOhPrdlLrCQT+ayAepltM OK+HuYXqBAUdNS4KEoP/0nz+kWF96Z7PBezdS5RX4XbOtBzDtU0c0m5gbHYIuK6lz78ykf kr8N8AXoSni6mjpgWEFhwKoyroCU3hU8D1AgJUCnEtFhcef9gocUfdEv44tEJrdkukgeh0 a60y9mwAO3ibGYni/LxpttV1A9DdVjJugi1QpQTCtZfxZfdCrKCN1Qv0Fh3yIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721552789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PKyoPQy4YUcYETNMx6qbpur+avt5GgAXKCZAqV3IjeY=; b=eGTeemN1ghLIBXJ8pfjCoIwd1qAWsP9lixMRUMKYEigxtkWwo4w51DIXJYSliVygPXghAz GiK3j+7R3SltlpA0PIHs2LBmFEBOz1amEOElVt6qGgk8klT7zLui7VYmgEFqNeufpn9CAC tXS9T82e7BQ3rcbQtZ+TNfPq8XT3Fv7N84ZghNLleJojHbWTRW62bzoAZbAT6B0fKeszVw 3676kDaHkU2P5VGi2+gwv2tz0tDAOlAG+hlTBk1BKl8HA75WrDQz5HhpTTSqjrqxX0/HUe CfOEoXcZAj/k+5qmYZrpUcbh0Jo0LNGQdbPO85oZihRZtabKyBz7AQi3S8njyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRcwP1sDvzv0k; Sun, 21 Jul 2024 09:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46L96Toq093299; Sun, 21 Jul 2024 09:06:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L96Tbv093296; Sun, 21 Jul 2024 09:06:29 GMT (envelope-from git) Date: Sun, 21 Jul 2024 09:06:29 GMT Message-Id: <202407210906.46L96Tbv093296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 619c9488a31c - main - axgbe: Fix two typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 619c9488a31ce14c6570d2e31f70d416382ed7a6 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=619c9488a31ce14c6570d2e31f70d416382ed7a6 commit 619c9488a31ce14c6570d2e31f70d416382ed7a6 Author: Gordon Bergling AuthorDate: 2024-07-21 09:06:07 +0000 Commit: Gordon Bergling CommitDate: 2024-07-21 09:06:07 +0000 axgbe: Fix two typos in source code comments - s/specfied/specified/ MFC after: 3 days --- sys/dev/axgbe/xgbe-phy-v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/axgbe/xgbe-phy-v2.c b/sys/dev/axgbe/xgbe-phy-v2.c index d08ed118a8a8..5b39d61694e6 100644 --- a/sys/dev/axgbe/xgbe-phy-v2.c +++ b/sys/dev/axgbe/xgbe-phy-v2.c @@ -500,7 +500,7 @@ xgbe_phy_i2c_write(struct xgbe_prv_data *pdata, unsigned int target, void *val, retry = 1; again: - /* Write the specfied register */ + /* Write the specified register */ i2c_op.cmd = XGBE_I2C_CMD_WRITE; i2c_op.target = target; i2c_op.len = val_len; @@ -539,7 +539,7 @@ again1: retry = 1; again2: - /* Read the specfied register */ + /* Read the specified register */ i2c_op.cmd = XGBE_I2C_CMD_READ; i2c_op.target = target; i2c_op.len = val_len; From nobody Sun Jul 21 09:46:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRdpj6DThz5R9j8; Sun, 21 Jul 2024 09:46:37 +0000 (UTC) (envelope-from kp@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRdpj5KHrz4tyG; Sun, 21 Jul 2024 09:46:37 +0000 (UTC) (envelope-from kp@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721555197; 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=4lCbD59s7sGlwRUQjAmaWwjdD6T85E0gyWGYRewuRxM=; b=MlF65gS6tYD/mRw6Uwu07I/ubH8nFrZFVnM0JG7AFJ6XbSQs4xplS15AEWLDjXM8VhUrNk DKhForp1dL9DtLNKqyqaj2G3G9sfzopURE7ymqF6IUrN0bSjEa8Ki7dWcrakTPX6yjC5sq vtUVs0E2EiUfRvxtnfc52H/yfSqX++6VwdBlEjOnvvaaof7+a1JwdxZ3KQ5VNh4EZshdws /VsSr+xrAaY+CiRk6xuDfOF/S4mFvD+NXdwwmsu/W9U96qp2WsxYc3mMOOyuzWUWdvZ5lv Xqa5S2O21jm4J3e5I12rXhLvt05DO0RFDRdToQ+vTozXi8FKHb5bjM0de0o6TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721555197; a=rsa-sha256; cv=none; b=GW718S0/iFlG2VDrIOCYOTLwSIYw8O7mvHUGuJ8ERLZaa4ZMHlQeYoHWXA7OnQpMxRjxGq pqSEkTd0t6wWDtrVHMS2SZYWkboHc4RoWWYS4LEaBApYF7jxltAlzRajs6JLZShUZOms3T AKsypMRWUUR/YpVNNpBPnWfhbh0W8hkNbHSlRWs8GH9gKnnnYCV5deKSZpyHo0T9VZ2prH XcDSqZh7AaXSGFWYkV+LMt8I8ju5upZdS81pvOF1fY2K8orNRGYhYFuBzzONlb8fEgjEP/ ZEJyViNUbsUne6YWnRpnXWlZdgFTO1djJhz6hoFWbvMZEpRX1vT8MxVOi7GeDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721555197; 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=4lCbD59s7sGlwRUQjAmaWwjdD6T85E0gyWGYRewuRxM=; b=XKOXxUdV8zbCK2fTMU6jqNi1iez2suxZBLNS3yTwlESK0D6xcRPQxqOjsXw9YYlhIrXBs9 m1lwG4ddZnfGz01Rfh/MLJ1dUHyZU1w3iijXwV+RLlOyph5Tz3Tp4WnAdZTOutvz4BkZxG lqN1+wsvVw3H4vdNTyMAHo7EvwZ4/nulw+/pvKLkI5aPZ4WILRN2cg7bCPBArYIU/YLefJ PekN0sV0YBdPPuKW20MKKE8uacDUCYupovcPzwukmaNnzC1T/lhA1a6oogjUQgDAulJHbm Oesx3Xr1R6wS/VT+MyrZxZfHApNks8J6tWtmjsEq5iuzZW7p+RV+PljmnX3OQw== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher 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 "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WRdpj3bC0z1Gnw; Sun, 21 Jul 2024 09:46:37 +0000 (UTC) (envelope-from kp@freebsd.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 0CF098FCB; Sun, 21 Jul 2024 11:46:35 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Kristof Provost List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (1.0) Subject: Re: git: 9a7096ff547d - main - ipsec_offload: hide SA/SP offload lifecycle prints under verbose sysctl Date: Sun, 21 Jul 2024 11:46:24 +0200 Message-Id: <99B7FE52-7920-4806-95AD-36F8C85DA9EF@freebsd.org> References: <202407210853.46L8rkoh075102@gitrepo.freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: <202407210853.46L8rkoh075102@gitrepo.freebsd.org> To: Konstantin Belousov X-Mailer: iPhone Mail (21F90) Thanks! > On 21 Jul 2024, at 10:53, Konstantin Belousov wrote: >=20 > =EF=BB=BFThe branch main has been updated by kib: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D9a7096ff547de2b5a09c5a46838= 53568e08c2f8a >=20 > commit 9a7096ff547de2b5a09c5a4683853568e08c2f8a > Author: Konstantin Belousov > AuthorDate: 2024-07-19 19:15:35 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-07-21 08:53:19 +0000 >=20 > ipsec_offload: hide SA/SP offload lifecycle prints under verbose sysctl= >=20 > Reported and reviewed by: kp > Discussed with: np > Sponsored by: NVIDIA networking > Differential revision: https://reviews.freebsd.org/D46045 > --- > sys/netipsec/ipsec_offload.c | 58 +++++++++++++++++++++++++++++++---------= ---- > 1 file changed, 41 insertions(+), 17 deletions(-) >=20 > diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c > index 48082830b88b..8ccae7a94f2a 100644 > --- a/sys/netipsec/ipsec_offload.c > +++ b/sys/netipsec/ipsec_offload.c > @@ -35,9 +35,12 @@ > #include > #include > #include > +#include > #include > #include >=20 > +#include > + > #include > #include > #include > @@ -190,6 +193,27 @@ ipsec_accel_fini(void *arg) > SYSUNINIT(ipsec_accel_fini, SI_SUB_VNET_DONE, SI_ORDER_ANY, > ipsec_accel_fini, NULL); >=20 > +SYSCTL_NODE(_net_inet_ipsec, OID_AUTO, offload, CTLFLAG_RW | CTLFLAG_MPSA= FE, 0, > + ""); > + > +static bool ipsec_offload_verbose =3D false; > +SYSCTL_BOOL(_net_inet_ipsec_offload, OID_AUTO, verbose, CTLFLAG_RW, > + &ipsec_offload_verbose, 0, > + "Verbose SA/SP offload install and deinstall"); > + > +static void > +dprintf(const char *fmt, ...) > +{ > + va_list ap; > + > + if (!ipsec_offload_verbose) > + return; > + > + va_start(ap, fmt); > + vprintf(fmt, ap); > + va_end(ap); > +} > + > static void > ipsec_accel_alloc_forget_tq(struct secasvar *sav) > { > @@ -209,7 +233,7 @@ ipsec_accel_sa_install_match(if_t ifp, void *arg) > if ((ifp->if_capenable2 & IFCAP2_BIT(IFCAP2_IPSEC_OFFLOAD)) =3D=3D 0) > return (false); > if (ifp->if_ipsec_accel_m->if_sa_newkey =3D=3D NULL) { > - printf("driver bug ifp %s if_sa_newkey NULL\n", > + dprintf("driver bug ifp %s if_sa_newkey NULL\n", > if_name(ifp)); > return (false); > } > @@ -226,7 +250,7 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) >=20 > tq =3D arg; >=20 > - printf("ipsec_accel_sa_newkey_act: ifp %s h %p spi %#x " > + dprintf("ipsec_accel_sa_newkey_act: ifp %s h %p spi %#x " > "flags %#x seq %d\n", > if_name(ifp), ifp->if_ipsec_accel_m->if_sa_newkey, > be32toh(tq->sav->spi), tq->sav->flags, tq->sav->seq); > @@ -240,7 +264,7 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) > } > if (drv_spi =3D=3D -1) { > /* XXXKIB */ > - printf("ipsec_accel_sa_install_newkey: cannot alloc " > + dprintf("ipsec_accel_sa_install_newkey: cannot alloc " > "drv_spi if %s spi %#x\n", if_name(ifp), > be32toh(tq->sav->spi)); > return (ENOMEM); > @@ -249,14 +273,14 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) > drv_spi, &priv); > if (error !=3D 0) { > if (error =3D=3D EOPNOTSUPP) { > - printf("ipsec_accel_sa_newkey: driver " > + dprintf("ipsec_accel_sa_newkey: driver " > "refused sa if %s spi %#x\n", > if_name(ifp), be32toh(tq->sav->spi)); > error =3D ipsec_accel_handle_sav(tq->sav, > ifp, drv_spi, priv, IFP_HS_REJECTED, NULL); > /* XXXKIB */ > } else { > - printf("ipsec_accel_sa_newkey: driver " > + dprintf("ipsec_accel_sa_newkey: driver " > "error %d if %s spi %#x\n", > error, if_name(ifp), be32toh(tq->sav->spi)); > /* XXXKIB */ > @@ -266,7 +290,7 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) > drv_spi, priv, IFP_HS_HANDLED, NULL); > if (error !=3D 0) { > /* XXXKIB */ > - printf("ipsec_accel_sa_newkey: handle_sav " > + dprintf("ipsec_accel_sa_newkey: handle_sav " > "err %d if %s spi %#x\n", error, > if_name(ifp), be32toh(tq->sav->spi)); > } > @@ -324,13 +348,13 @@ ipsec_accel_sa_newkey_impl(struct secasvar *sav) > SADB_KEY_ACCEL_DEINST)) !=3D 0) > return; >=20 > - printf( > + dprintf( > "ipsec_accel_sa_install_newkey: spi %#x flags %#x seq %d\n", > be32toh(sav->spi), sav->flags, sav->seq); >=20 > tq =3D malloc(sizeof(*tq), M_TEMP, M_NOWAIT); > if (tq =3D=3D NULL) { > - printf("ipsec_accel_sa_install_newkey: no memory for tq, " > + dprintf("ipsec_accel_sa_install_newkey: no memory for tq, " > "spi %#x\n", be32toh(sav->spi)); > /* XXXKIB */ > return; > @@ -403,7 +427,7 @@ ipsec_accel_forget_handle_sav(struct ifp_handle_sav *i= , bool freesav) > sav =3D i->sav; > if ((i->flags & (IFP_HS_HANDLED | IFP_HS_REJECTED)) =3D=3D > IFP_HS_HANDLED) { > - printf("sa deinstall %s %p spi %#x ifl %#x\n", > + dprintf("sa deinstall %s %p spi %#x ifl %#x\n", > if_name(ifp), sav, be32toh(sav->spi), i->flags); > ifp->if_ipsec_accel_m->if_sa_deinstall(ifp, > i->drv_spi, i->ifdata); > @@ -597,18 +621,18 @@ ipsec_accel_spdadd_cb(if_t ifp, void *arg) >=20 > sp =3D arg; > inp =3D sp->ipsec_accel_add_sp_inp; > - printf("ipsec_accel_spdadd_cb: ifp %s m %p sp %p inp %p\n", > + dprintf("ipsec_accel_spdadd_cb: ifp %s m %p sp %p inp %p\n", > if_name(ifp), ifp->if_ipsec_accel_m->if_spdadd, sp, inp); > error =3D ipsec_accel_remember_sp(sp, ifp, &i); > if (error !=3D 0) { > - printf("ipsec_accel_spdadd: %s if_spdadd %p remember res %d\n", > + dprintf("ipsec_accel_spdadd: %s if_spdadd %p remember res %d\n", > if_name(ifp), sp, error); > return (error); > } > error =3D ifp->if_ipsec_accel_m->if_spdadd(ifp, sp, inp, &i->ifdata); > if (error !=3D 0) { > i->flags |=3D IFP_HP_REJECTED; > - printf("ipsec_accel_spdadd: %s if_spdadd %p res %d\n", > + dprintf("ipsec_accel_spdadd: %s if_spdadd %p res %d\n", > if_name(ifp), sp, error); > } > return (error); > @@ -676,11 +700,11 @@ ipsec_accel_spddel_act(void *arg, int pending) > NET_EPOCH_WAIT(); > if ((i->flags & (IFP_HP_HANDLED | IFP_HP_REJECTED)) =3D=3D > IFP_HP_HANDLED) { > - printf("spd deinstall %s %p\n", if_name(i->ifp), sp); > + dprintf("spd deinstall %s %p\n", if_name(i->ifp), sp); > error =3D i->ifp->if_ipsec_accel_m->if_spddel(i->ifp, > sp, i->ifdata); > if (error !=3D 0) { > - printf( > + dprintf( > "ipsec_accel_spddel: %s if_spddel %p res %d\n", > if_name(i->ifp), sp, error); > } > @@ -741,12 +765,12 @@ ipsec_accel_on_ifdown_sp(struct ifnet *ifp) > NET_EPOCH_WAIT(); > if ((i->flags & (IFP_HP_HANDLED | IFP_HP_REJECTED)) =3D=3D > IFP_HP_HANDLED) { > - printf("spd deinstall %s %p\n", if_name(ifp), sp); > + dprintf("spd deinstall %s %p\n", if_name(ifp), sp); > error =3D ifp->if_ipsec_accel_m->if_spddel(ifp, > sp, i->ifdata); > } > if (error !=3D 0) { > - printf( > + dprintf( > "ipsec_accel_on_ifdown_sp: %s if_spddel %p res %d\n", > if_name(ifp), sp, error); > } > @@ -894,7 +918,7 @@ ipsec_accel_input(struct mbuf *m, int offset, int prot= o) >=20 > if (tag->drv_spi < IPSEC_ACCEL_DRV_SPI_MIN || > tag->drv_spi > IPSEC_ACCEL_DRV_SPI_MAX) { > - printf("if %s mbuf %p drv_spi %d invalid, packet dropped\n", > + dprintf("if %s mbuf %p drv_spi %d invalid, packet dropped\n", > (m->m_flags & M_PKTHDR) !=3D 0 ? if_name(m->m_pkthdr.rcvif) : > "", m, tag->drv_spi); > m_freem(m); >=20 From nobody Sun Jul 21 13:14:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkQs1Gxvz5RV5L; Sun, 21 Jul 2024 13:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkQs0hcDz4RrX; Sun, 21 Jul 2024 13:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UINWRsbhsF3ZWYl6sWNgXHA2u/OEZIIOHp0h9EL1XfA=; b=fc0YTkJIvI0FRg9XtOYhC9UEaLOnarmnGBkwFR2WBEPb5yMdTbBRyzPbrhOBy3NbDo4IpF p7dm2aWdhVOHSrfifg/89pGNwlo5tH4KLWjErzJs4B5yDIv2d5PMmC6nVdZlmYeRhsy4FT TiK5JYo2m31zmNrKfQJ0gKBlUWTjsBH29Uy6+cNvcmJPQjcdS2ROObzQh0V1oXT7sX1QsD UZnfPaynyF8LkhfsDpFAh9+Fnl/RLZkuXjOZiBivZCx76x2JT9JLJNyFxkra8WvP4TQ7B6 bObvjqiUHLlSoehdHuwEvZF8pJekpdxiH59UcgRgQ1GIcLC6rrSGVGTqSpuIeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567685; a=rsa-sha256; cv=none; b=cDboZ2yvg/ZQnFFB09BsBu2liZN5N/lY5ZxnXaN5j7VnkpANJiBSvunSnS4UQtMoG778zZ cqpG+dkRhyzVF7rsXDBvX7Z+hijOH/S/Onj0dDcFv5qFrVj9w7Me9ORauWa5f8Za/ZzCyI qqQZRJMNx9jxTG8o5ubtWC8E63mWpsyZfSYLht+bGjh8zjCq+VPZTk/LXZSESgAq983bzU fXnk/EnmGAiGZMD9Ll+RQq6qTaov2LbmsLurq164WujfCkOabG8b4/SLuDIBqgl00zOnmt LkxJ1H4FrUbPMWugVhjPS43jfJ/SkNPaBU7STOwXZS3XvFFN3p640FFGadycmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UINWRsbhsF3ZWYl6sWNgXHA2u/OEZIIOHp0h9EL1XfA=; b=UBqRPbJcHirZsifSztgHcW/ozsEaqiW1cnaYloGVsWGc9kUnMFcRwLl6EQnndBadYj1JMA GVYYEjwAS/ivaKfhYsyHs67oZOxXWd3NN07kct5Sx7zpZ+L9nIbXQEX+R1kTuuGHSMXvMi GL3w0uN/31Zs/o18txKTo9HfLP/xRcaj4/L/hNaKh91NrDE72LPaB17Ygb+p2ZAe70YAer vF+7wpQT9QHM47nKrj/xmo7Z4I0KFHLnuHLBdjgbQp9E40s421U2k/wHqqlqBrMmkZZLxG dNb9KYhOwLyggzxKZKXUcn68MDJrMLAF1JTyVIojgtMCKFN5N4JZN5h+HSuUPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkQs0BC1z12Bf; Sun, 21 Jul 2024 13:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEihg022901; Sun, 21 Jul 2024 13:14:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEiqb022898; Sun, 21 Jul 2024 13:14:44 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:44 GMT Message-Id: <202407211314.46LDEiqb022898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5d20075f8b9f - main - LinuxKPI: Automatically enable drm support for devices named "drmn" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d20075f8b9f7107aa0a246e5165d9816e816a44 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5d20075f8b9f7107aa0a246e5165d9816e816a44 commit 5d20075f8b9f7107aa0a246e5165d9816e816a44 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:02:08 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:02:08 +0000 LinuxKPI: Automatically enable drm support for devices named "drmn" This allows replace linux_pci_(un)register_drm_driver calls with driver renaming to FreeBSD name. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45906 --- sys/compat/linuxkpi/common/src/linux_pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 825ebe319b1a..51a3b0b2ebe1 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -976,10 +976,10 @@ linux_pci_register_driver(struct pci_driver *pdrv) { devclass_t dc; - dc = devclass_find("pci"); + pdrv->isdrm = strcmp(pdrv->name, "drmn") == 0; + dc = pdrv->isdrm ? devclass_create("vgapci") : devclass_find("pci"); if (dc == NULL) return (-ENXIO); - pdrv->isdrm = false; return (_linux_pci_register_driver(pdrv, dc)); } @@ -1166,7 +1166,7 @@ linux_pci_unregister_driver(struct pci_driver *pdrv) { devclass_t bus; - bus = devclass_find("pci"); + bus = devclass_find(pdrv->isdrm ? "vgapci" : "pci"); spin_lock(&pci_lock); list_del(&pdrv->node); From nobody Sun Jul 21 13:14:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkQt3R3Nz5RV2V; Sun, 21 Jul 2024 13:14:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkQt1PhQz4Rp5; Sun, 21 Jul 2024 13:14:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NPid9u7HXeKI1tTP8D/wCqLoRwgSSvV4Q26f6jWpb4o=; b=jBdxBDsaaS7Jy+M0T4mz+ep7r3qJUOfWZVvCl/W60Inw0vxo+PCIVp5e+gV9YbFzFk4Tcx lWr8njU1Wl0wLuAyjG3bZwvdWK+A6bqeAxQVTYOti4p+N8RKD7Fd0q8bOZquERvFRSAsHw QkQovAAB2oryEgaHEmhzuyTo+RRfqGYH8nRwLNLTiSEpRDxmZu0umReTiC6u4lk63CHZDx lAbe7Z/Yuy5UkHsfX4FojfKVTiIX+Xa2TQzpnbO4NMXQW90U7T6TybSp4wuXSicuftY8JA GkC/35/IsL2uDgJ1Eln7zfsMljGjz4SEgXFnM/UEHZdFAj56/f3gANHpBs9rLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567686; a=rsa-sha256; cv=none; b=jYAzzFbTLngbEwbiHuwxD+vzOEXx08hmzN476ZXkMFYJ1Tu40XTnH9nc3eSHWPF1vzHvhN COjdq0GFCMgKV8mFt6h+rX/4tKkwvCtsrsZi+nDdtsFZD1gvuIOdZ/6A1oo7jYVGj+Sz8R 9AX4JTtlPk6/L6CW4CFLOoeG/4/PRwjFS5weMbDAZs2QdRrbakRnz/1NanX7TUNk4Y4G8H KptEsbuMpGNxhgAqJVbYsh6CEAl6ts6B+0dmFmnnGGvqRQY5gNoKqSoRVBLp2B4VfE/qBz NoOstyCqrgiqh2E1kTz6+nLTfQGLIFKFTxANicBa8pLn762f+ec4JqK7sZOxyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NPid9u7HXeKI1tTP8D/wCqLoRwgSSvV4Q26f6jWpb4o=; b=KeoDRYkwbrtXlPJHBi+wcaSzPhMWPbZbgoUeVLlIu14yIVX3+0gfn/zSrtwSgyRhtZ9puc ROHbVgeDk9o+aH7XxP3hRBQ51SPn0SXfaCyIb/RcAjzBR0u9aI4Lt7Wsm0aWfJi9y5YLOe uVQCk6TByyDP1dapUu5ddpLjTP1qaxiXcqNTVELFFqLxnZ4IAWpSEzTOefYUK6xBNxU1wh oy/y+ydrFtFXOC+JlXk1kX3ZIp1CgIM5iNhmQCX7MxVEloazJDh/Hmpt0XqvB3U9LKowxk volU5RkdOe4bOb5pQiOF0z+4rZDxD6H8EsX+1vsfGaFBc5wg17eTccT/f4i2Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkQt0wPJz12Bg; Sun, 21 Jul 2024 13:14:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEk0P022946; Sun, 21 Jul 2024 13:14:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEk5T022943; Sun, 21 Jul 2024 13:14:46 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:46 GMT Message-Id: <202407211314.46LDEk5T022943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: ab6e1167909b - main - LinuxKPI: Add kvrealloc to linux/slab.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab6e1167909bf1e2792a2ba33000e13d33aaf551 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=ab6e1167909bf1e2792a2ba33000e13d33aaf551 commit ab6e1167909bf1e2792a2ba33000e13d33aaf551 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:08:28 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:08:28 +0000 LinuxKPI: Add kvrealloc to linux/slab.h Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45616 --- sys/compat/linuxkpi/common/include/linux/slab.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index 298306b6ea05..e2d17e0558c2 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -91,6 +91,8 @@ struct linux_kmem_cache; #define ZERO_SIZE_PTR ((void *)16) #define ZERO_OR_NULL_PTR(x) ((x) == NULL || (x) == ZERO_SIZE_PTR) +extern void *lkpi_kmalloc(size_t size, gfp_t flags); + static inline gfp_t linux_check_m_flags(gfp_t flags) { @@ -212,13 +214,29 @@ kfree_sensitive(const void *ptr) zfree(__DECONST(void *, ptr), M_KMALLOC); } +static inline void * +kvrealloc(const void *ptr, size_t oldsize, size_t newsize, gfp_t flags) +{ + void *newptr; + + if (newsize <= oldsize) + return (__DECONST(void *, ptr)); + + newptr = kvmalloc(newsize, flags); + if (newptr != NULL) { + memcpy(newptr, ptr, oldsize); + kvfree(ptr); + } + + return (newptr); +} + static inline size_t ksize(const void *ptr) { return (malloc_usable_size(ptr)); } -extern void *lkpi_kmalloc(size_t size, gfp_t flags); 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); extern void *lkpi_kmem_cache_alloc(struct linux_kmem_cache *, gfp_t); From nobody Sun Jul 21 13:14:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkQw060jz5RVP0; Sun, 21 Jul 2024 13:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkQv3Y5Jz4Rlw; Sun, 21 Jul 2024 13:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IW7VPWtTdGhfR/YoZsHqJkIDA2MVAaFK5ZtoYBm2k0E=; b=DhGx/yznFu+5dbpGaQ3lWkCksmOc20iVsUe8pSWBHH2xyqC4kGlgtZAHFuWlulW2KEErWc NcQ+G+II4kIz4hs6aod85He1DyCzeIb0i5EPzRRh5umn/wClIFOgmlSe/B43oDEIeCtoYh 9fWyyvXmsvX/B7hgQSi7MQxliUGjUR1FhmdNPkQsPatG9DaK5Eafj79jkjXp2UukGSS9LR 9P3MfeHOwP79QpsLp89wnJawj7AbNHK9gu4O1jKFOBcA5/hlYg9otc8QWhdDqvRBdeKzYU FEefeEvaMj50nFi25MRagy9l+6Vz14VX6BB+vmlUWqt+M0XC8hoNiMfnkjeepQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567687; a=rsa-sha256; cv=none; b=U4dJ45itl43k3wIouF+yE3kzOmv0eGuLEhj7dpNL3LHodhh65iQfTom3H4U/2jTywbUxax Ma+0XBB9jcDiJ42/y88mUiJHsZiBs0Bq8ozElYUhqNe5bHLWQrzBooYEh44YxVb2R2mKBj FfJ4PpWA/sihu6B21nNWWaFjCaQdcodHApGFX/NmoIKW9PTxKP2H/nOPOp/kH4niTPhimJ PvjDOOGQf0qxUWB0osLNYInJHMjGtGlStf79HSDO1LMJZyRV2C8mB/Q5WJA3bt8LvJPdIz N9mNO4P7VqL3kjVWtD6GLtcImYpwKVzcla+ikNOMPEKNz65GAzSNXhtPFIXXTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IW7VPWtTdGhfR/YoZsHqJkIDA2MVAaFK5ZtoYBm2k0E=; b=nn7Gf9soGBUDe6WeTNAT1mRecMZLvUs+U9gJJULyQdPI0wHTW5dvtzRSkIjVhmKfFWtYTQ IFoszfy2y3zJSGDvZcQlHOw04erSqj4l3it09g5gexVeYaltRRdUGdC36tnaRMdOnaIHcA rAVlILut6OSJBB/Za/mBqASt6sMJLp1H/tmofbGZdtJTQqHS+/XuE/lKbZIQFwiwIiuZVu ufgfbzVoBUg7vOnUaWMpxyfSSTAtIym+K1EFRKqISjKtmadRnyqiNB9kQB5cts6d1HQzko LehRSO9iWAGlcjXjy2EtQ7BP2dsnIrmqOie6nBksqpiauL+FUZ//uudNmV1Kcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkQv1vCBz11Zf; Sun, 21 Jul 2024 13:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDElma022990; Sun, 21 Jul 2024 13:14:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDElb2022987; Sun, 21 Jul 2024 13:14:47 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:47 GMT Message-Id: <202407211314.46LDElb2022987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: ab1a5d8e2ade - main - LinuxKPI: Add kmalloc_size_roundup function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab1a5d8e2ade8c706ff8cd7aa3d5c88a95633228 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=ab1a5d8e2ade8c706ff8cd7aa3d5c88a95633228 commit ab1a5d8e2ade8c706ff8cd7aa3d5c88a95633228 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:08:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:08:37 +0000 LinuxKPI: Add kmalloc_size_roundup function kmalloc_size_roundup reports allocation bucket size for the given size. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45841 --- sys/compat/linuxkpi/common/include/linux/slab.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index e2d17e0558c2..3f2d1621e148 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -237,6 +237,14 @@ ksize(const void *ptr) return (malloc_usable_size(ptr)); } +static inline size_t +kmalloc_size_roundup(size_t size) +{ + if (unlikely(size == 0 || size == SIZE_MAX)) + return (size); + return (malloc_size(size)); +} + 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); extern void *lkpi_kmem_cache_alloc(struct linux_kmem_cache *, gfp_t); From nobody Sun Jul 21 13:14:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkQw73l0z5RV5Q; Sun, 21 Jul 2024 13:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkQw4pdfz4S0B; Sun, 21 Jul 2024 13:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d36x+e9ORjUDuZ3v4VoYEh7FCqvaa09F5UvuGwsg+LU=; b=Q/2XXVSqxoV6KZ95cmvQb/L08wkt2wDlb/djn3lCjFW1+Om+RaMOFQDujlyT4DITmZ1yxm kb7eej8ThPtzeGUX3uO8iAhtQ0XQiA3lkmOJL4WckPVdBVubTw5fy3KV8FuPx7FvDHcSqz fGgAICDN0Et05C/IlSinlru9aJUCQhN7VTecO5TTMZfrU0S9UFx0LvHLpT6ItG6FZgagB0 E7HUCszp8MUKQl1uo4gFp8Q1vgw1OKT9a56fW69pXYpstlwgY0ZA4MG+Kt2daysbNU/R29 LBG/XbjUBXb35TZesXuAcxg2rc8IU4FSZvI7brMmB5KAbwaq1Sfm1l9tmFQuDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567688; a=rsa-sha256; cv=none; b=sL/xHfHm+FPo80YI011UQFoiss/UO37AKy352xUM9U4WQsK0cXn1RpAyCOi01MtkSNb2a9 gFWq7gzNoXJUOOgCQbvmiPk6qnHEfbgp0tn49gNPH+E7jZ2SzTbCVcait4B4LPyYAaXZjH Avr58LTDR1Tapz05UKK1f9PiJuT5uamV9TvvftPU68cNlhKyVkTFhIz+Ry42KFWOAcJQ4S rNVgmSaStrr9fq5LVvp6ZYsXgwXRJ+XuifVXqtz1KrzSLK8/V1PiGA1fTmHXKxwDgJqc9M 3QCWDRfb3gWEV5OKMhelWK/laMxFMY/yIOnyEVF6pDOLSLq6/tF+PPTfX9xRqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d36x+e9ORjUDuZ3v4VoYEh7FCqvaa09F5UvuGwsg+LU=; b=suvACY32oiILQcvRZbVP0wJkcKY8u8kLEP/vEK8KCu/+6+1IIORBVlv40bfyfPcCfjKJ52 oOgc6VSzMM4mThWLPDBJFj5tVN11h9sf2xrumF7oJmnddh9ESyriCEeAWZCdLwpu6G1IUs ZmdI3g8A7sl1z9TT6AHtZAqj679bRQ2zH5R2NtkGrpqxqm0dpZChobfnQjYue4J9mWYkYx 8zIgjM6wZ64SfQkR4fNMSaGRbnkoQE1fOJSzehH9fCesWjGccerbWXuDYCzuozcUCm0XPt QSemR313KNPr/Q4aA1XNnc6uTIcwbjXXtHCYaFwEzB/sIwg3m9sWSXpUF5KUiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkQw4FcBz11m9; Sun, 21 Jul 2024 13:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEmoO023029; Sun, 21 Jul 2024 13:14:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEmJ5023026; Sun, 21 Jul 2024 13:14:48 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:48 GMT Message-Id: <202407211314.46LDEmJ5023026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 742088d9fb54 - main - LinuxKPI: Add __diag macros List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 742088d9fb545296c8677119757a967141ba7d4a Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=742088d9fb545296c8677119757a967141ba7d4a commit 742088d9fb545296c8677119757a967141ba7d4a Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:08:48 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:08:48 +0000 LinuxKPI: Add __diag macros __diag macros turn individual warnings and errors on and off locally, depending on version of compiler. Add dummy implementation as drm-kmod set warnings separately for each file. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45842 --- sys/compat/linuxkpi/common/include/linux/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index d59e6faed12d..c82b9acd53fb 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -89,6 +89,10 @@ #define __printf(a,b) __printflike(a,b) +#define __diag_push() +#define __diag_pop() +#define __diag_ignore_all(...) + #define barrier() __asm__ __volatile__("": : :"memory") #define lower_32_bits(n) ((u32)(n)) From nobody Sun Jul 21 13:14:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkQy2QZZz5RVHL; Sun, 21 Jul 2024 13:14:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkQx5gPVz4S0Q; Sun, 21 Jul 2024 13:14:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X9ANBcYx3k+zWYbaRaUrQ/N72vBLMZf5++oeOuFOmlg=; b=bHOIktj9JuPKKiiZhn/RvHmfWj3dGhpy/iABNZmLhJ/BRIyiEmtFWOtgL+w0XMDx9mvpin HKRcRedZWHCzOWVQoey2ykCvjqFoNvuuAbxt9qRazLgfDRgDDJ2U5DP4xV10Xjy4h13YED 3VuwGFWAmTZot6DXCL7YBDjNA6K8etrCBZzf7BWl/nJZ18x0xfYzQ6FL2v9jdwJE51Ot76 v/D8uwEtoqZqhPL86lKSXjP/oM0tkpYugEy5OeN9Cw3VYrFwxqpUfHeHlA1qjT/S4IV2I1 3s290KvzvJaVzoX4KtF/CdGQscFOZv1sGFeFqDtHIHu3cSantuCdRhpNwrWQFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567689; a=rsa-sha256; cv=none; b=SNI1/+9+BD5sC1rIRERlXz95dJRnyL3Fv/6UYNWKUGzS21qFMCFWtIIcp8D70oNTogXiiV C45EkUPYPZFqPfawLoRa7s6/s9/fTKLiPT0/dT49gh1Tt0++tOmurS8sYiR5eFGf3+6pbY mHfKMU57EYAClTzABtwgG6lE/mIdWj6Ks4dpwB53SeljT65mrIoT5nbb5gj8KHFXpv65wx YCBjs5fxIW1NXTw1mwbibEpiSwCWarNAGwxDJJXqW9/r5Kap6XYPbB+4d7qERgil/YSsMv LUv7G2gadV75pF1xXhVWLyIR3L0AaoTdQHGQoEWjgHNd1o0+nNTt3fCkfR+5RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X9ANBcYx3k+zWYbaRaUrQ/N72vBLMZf5++oeOuFOmlg=; b=W2kcEUB5eTtZoKXhAMvL/fGO+8LLbX5BSiwDp1bslhEg8eSXZgZ1pxtifwWwO3r/Syatmi XuUTxj68WioIlfvwYhWZNsb+WgAG/s0PGq4Rqvo+iDTERQ2v4Dk8BPXx91vKoWS4AJ9Uih H9pdznLnpKiAUOJPdM2OHfnqIJK3uLRrldX4cL0Jpgk6jC70jjkGp81lGOTvHRkLNs1/1z CGDImwMvUofc/wMVIN+a+jyEGa/14+rDAhZ7viZ/kRiVmBQqD9Twibm6M0rl6rm1IePUY5 fzmeuGORKSvAkV5k6YMjDxxo7J1ooEYUsbKPTTAtsNhFpFMcQ4AEAR3a1qcatA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkQx3wbMz12Bh; Sun, 21 Jul 2024 13:14:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEnDL023068; Sun, 21 Jul 2024 13:14:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEn51023065; Sun, 21 Jul 2024 13:14:49 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:49 GMT Message-Id: <202407211314.46LDEn51023065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 80aa295a5272 - main - LinuxKPI: Add page_to_virt function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80aa295a5272d01b7f21eff6719dcd45e14e8e09 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=80aa295a5272d01b7f21eff6719dcd45e14e8e09 commit 80aa295a5272d01b7f21eff6719dcd45e14e8e09 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:01 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:09:01 +0000 LinuxKPI: Add page_to_virt function Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45843 --- sys/compat/linuxkpi/common/include/linux/page.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/page.h b/sys/compat/linuxkpi/common/include/linux/page.h index aa5acac4f5fe..37ab593a64e9 100644 --- a/sys/compat/linuxkpi/common/include/linux/page.h +++ b/sys/compat/linuxkpi/common/include/linux/page.h @@ -72,6 +72,7 @@ pgprot2cachemode(pgprot_t prot) return (VM_MEMATTR_DEFAULT); } +#define page_to_virt(page) linux_page_address(page) #define virt_to_page(x) PHYS_TO_VM_PAGE(vtophys(x)) #define page_to_pfn(pp) (VM_PAGE_TO_PHYS(pp) >> PAGE_SHIFT) #define pfn_to_page(pfn) (PHYS_TO_VM_PAGE((pfn) << PAGE_SHIFT)) From nobody Sun Jul 21 13:14:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkQz2H6hz5RVP5; Sun, 21 Jul 2024 13:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkQy6s1lz4Rs9; Sun, 21 Jul 2024 13:14:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yx468r2pKqsIZ9Q4FwNqV5n0xKbjsIGUczgFUbzZelA=; b=UY0QsUD257FEs8qyjpR5gMg+ptPm5KRibA9vHfXmfrW1T29MAuGlbx+nCZqdcHkMKvbgpv jQn8FKo5dY5MSpvbKJvscKwakuk+MbPiFGXWdhyQHboEtquJP7b+djCHsXM9xDEZMQrB4j qEsNFgVVV08dTkfKIYb3JMtyP9FuYvlPXQLUNkP5dh8C1OKsHRoWHeuCvmNWdy22Lc6w44 0jnGjvaFOiot4qgzaAo/ATo/rlOTsGzKTI8mQsNwe1uvEQToMtvsONmw+Y7UcQ0OKsuBRS 2UpKlk0/RNX9l0byt3Wj/ZUZdFbMBypgKyNbEutEGuq+tVthJdPFrbkvbjwH1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567691; a=rsa-sha256; cv=none; b=qlULSTs6OliQdOGY1CHIkKAKJ1wq9+UDJpyUI+KpbNvG/TylXcklXbaZYLorIEsmLA8tLg VVbzjU5BS/n7rvMtU7iVsjBem1POATjchpDM9jFgRIx0CXQ5AJy3WgEVYZEIrJ5FPfwkG8 v4KhCjJUnKW/a24AKDJu/t9H+p8JoMSdkOJqZkg3GSPjfa4FdldCa5hwJmZ1TejR2sp0+I T+auXvdt5+0eKWHD4gvVBU7l8+EP/VBe5T0dONXIBBE0VlUhetuJKhpurcyZEryoHBwbws xRiAFaqvdRq8hhPM254ke+lHgBsUln/B9ndKJkeubHMVnpum9RaPtXjINEb0Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yx468r2pKqsIZ9Q4FwNqV5n0xKbjsIGUczgFUbzZelA=; b=wHXrgCYivRfc4qulF86RZCBBfpm/blogRprQbZnws8YyVEuI5NrHn1ueCBhl5vwKTYuPOQ Jlu1+5vaBW8oAPRCbYaF8JGO30oLwrkv88gks1Z+ntfhGhKNKCnm2BH/aId3FSCBDjbIoA id4FU+kaH2gqvxl+8WVKClgAERnQRyqg2IBKbF4xaTKT47cz6TupUg1N9EUCVqMDkDilU/ UbcmZc8MLLG/sx+Uq3by8bfWHbrB5dzERzgGDA8D/yWr5AQLXaWRfeGkck6YZTiaF6IlGE rPw6l3tAz4rWJf8nhPAq6XoTq82kLrnFlSWRzz6dbx3VOYAj9mYeFu63D2154A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkQy4tvsz12Bj; Sun, 21 Jul 2024 13:14:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEoDo023110; Sun, 21 Jul 2024 13:14:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEoW4023107; Sun, 21 Jul 2024 13:14:50 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:50 GMT Message-Id: <202407211314.46LDEoW4023107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: a1181662d370 - main - LinuxKPI: Add devm_device_add_group to linux/device.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1181662d3707d8165d7153a0aa5d76ea1ddc11a Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a1181662d3707d8165d7153a0aa5d76ea1ddc11a commit a1181662d3707d8165d7153a0aa5d76ea1ddc11a Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:12 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:09:12 +0000 LinuxKPI: Add devm_device_add_group to linux/device.h devm_device_add_group creates a managed attribute group for a device. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45845 --- sys/compat/linuxkpi/common/include/linux/device.h | 4 +++ sys/compat/linuxkpi/common/src/linux_compat.c | 30 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 00c55b31b248..912be8fbae8b 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -701,4 +701,8 @@ int lkpi_devm_add_action_or_reset(struct device *dev, void (*action)(void *), vo #define devm_add_action_or_reset(dev, action, data) \ lkpi_devm_add_action_or_reset(dev, action, data) +int lkpi_devm_device_add_group(struct device *dev, const struct attribute_group *group); +#define devm_device_add_group(dev, group) \ + lkpi_devm_device_add_group(dev, group) + #endif /* _LINUXKPI_LINUX_DEVICE_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 90d03d480089..ec4e59f66e7f 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2615,6 +2615,36 @@ device_can_wakeup(struct device *dev) return (false); } +static void +devm_device_group_remove(struct device *dev, void *p) +{ + const struct attribute_group **dr = p; + const struct attribute_group *group = *dr; + + sysfs_remove_group(&dev->kobj, group); +} + +int +lkpi_devm_device_add_group(struct device *dev, + const struct attribute_group *group) +{ + const struct attribute_group **dr; + int ret; + + dr = devres_alloc(devm_device_group_remove, sizeof(*dr), GFP_KERNEL); + if (dr == NULL) + return (-ENOMEM); + + ret = sysfs_create_group(&dev->kobj, group); + if (ret == 0) { + *dr = group; + devres_add(dev, dr); + } else + devres_free(dr); + + return (ret); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; From nobody Sun Jul 21 13:14:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkR00CSfz5RVJX; Sun, 21 Jul 2024 13:14:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkQz6KBbz4S3f; Sun, 21 Jul 2024 13:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBER54CX6z63kKat5UoLRX4PP42FbKvVMGB6vGUZSiM=; b=ok0/py24V4pQkJreW2CVGjYqihRcQqR8VvcOByUBFIBaovY9KtqM0QEDTRFN0xbj+FXQiw 3oFr+Tjfq9++zjgrdphL1PzML/ZmLDBhuCneAm3RHok1wmwU6jrjaved/0Z0b/XKzv3dk7 4/3NvRyNZVANca2Y4G2i/lcvn0jVxHs/s30/m3MhbLmjUZNrSfU0UDL4Z5H3vUIOZO9edU tOiNaBEioQ0S0gbGjN2JtngCCCn76cI5lz4uQq8V66ChgVY4Fr559eUv03EKVCF8bueZzF 9ylkwpyoL3scvkMx172bQaHEAbvDDiHVl5eNCkH+58aseTAndE1eRkNJ8en+GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567691; a=rsa-sha256; cv=none; b=I+1JSQuoMUcW5GKLLJ4iv/1aocuAvcA6gMlxrEb9oL0zK0uOrUdtST8OdSjUp0YgIRaIdI Nq0D3CuztUnj+d7TZfcBnErrPGNA/vpMpNCUXhQDzMd7rjbwM6as3mwabWUdfc8vS6Gl40 GKOTKvQKowj/149T2YTtq0d1zeFIiolxUd4fuCCOXe2CR4pvx8lkSVBpBs9O+5m5rUYmOG FtD1NRczm2k8xDSe0HAwUEGlzScRtjOGrSBD/EATUnxtpOKrDMebGtHP4Ut4QFXO6i+E/p HtzolhYy+AIS7DQHmDL7vbQBj0ltZHWoOZC9U2aw7vzdJDCBJoo3te6YY1A+/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBER54CX6z63kKat5UoLRX4PP42FbKvVMGB6vGUZSiM=; b=j/KKfqu80HE50Dhs+F54L4QWfWhjdhDVNyQR2kV6wosWWT3AlFQNayTtvwoPDtts87OT1M YDu1NeFOrE4xXbeGgHluFv1UUblL9SU1tA78thniViL0zarzptKqdWLgb97an7edAQev/Q M+59qI9iHYFM1dFP9LS/rOTlbBSnQNKPqZFI8UMi3GVpKm7/uHeNWo3J4MZ7nGR0EsxUv5 jBZIDi6c7qgbyv/l7jMlOZ232XwaGfvPcKLKjkl1ya4rYnykfZYl8uIIUfcXrmxx08tyVv UzFsF119TIBKm8jNbx5RB7pL+p4R1Ubwjw3I0us6lzzwgXyL83ERUZHFVqT5vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkQz5sPmz11Zg; Sun, 21 Jul 2024 13:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEp23023156; Sun, 21 Jul 2024 13:14:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEpmo023153; Sun, 21 Jul 2024 13:14:51 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:51 GMT Message-Id: <202407211314.46LDEpmo023153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5b1171a0b75f - main - LinuxKPI: Add pci_match_id to linux/pci.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b1171a0b75fc88bffb5a67b0b02d8d59eb8d5c4 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5b1171a0b75fc88bffb5a67b0b02d8d59eb8d5c4 commit 5b1171a0b75fc88bffb5a67b0b02d8d59eb8d5c4 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:27 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:09:27 +0000 LinuxKPI: Add pci_match_id to linux/pci.h It finds out if a given PCI device matches a given pci_id table. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45846 --- sys/compat/linuxkpi/common/include/linux/pci.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index be3b13f07e53..9c6a52aab83f 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1268,6 +1268,29 @@ pci_dev_present(const struct pci_device_id *cur) return (0); } +static inline const struct pci_device_id * +pci_match_id(const struct pci_device_id *ids, struct pci_dev *pdev) +{ + if (ids == NULL) + return (NULL); + + for (; + ids->vendor != 0 || ids->subvendor != 0 || ids->class_mask != 0; + ids++) + if ((ids->vendor == PCI_ANY_ID || + ids->vendor == pdev->vendor) && + (ids->device == PCI_ANY_ID || + ids->device == pdev->device) && + (ids->subvendor == PCI_ANY_ID || + ids->subvendor == pdev->subsystem_vendor) && + (ids->subdevice == PCI_ANY_ID || + ids->subdevice == pdev->subsystem_device) && + ((ids->class ^ pdev->class) & ids->class_mask) == 0) + return (ids); + + return (NULL); +} + struct pci_dev *lkpi_pci_get_domain_bus_and_slot(int domain, unsigned int bus, unsigned int devfn); #define pci_get_domain_bus_and_slot(domain, bus, devfn) \ From nobody Sun Jul 21 13:14:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkR11qclz5RVJd; Sun, 21 Jul 2024 13:14:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkR10MKsz4S3w; Sun, 21 Jul 2024 13:14:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CrQ8u5CvrOVmQ05DrLyJLlp2QWSPnFvZTe4hPOj+KJ8=; b=paXEWMNwyYlqjDLVPVTzyrM54IzITXavo1NJmZLRTkaYlbq2SoZxiCJPGpipCyaUvasKHw 4Wr20I+f3rIMS3cx/AXVc3W2a2OnzMuUiksrGxjxKP5sI8wT0nL8pQNWwghknMZ6c2+ohN 2379ZYU5hvJTCsxISpu0KaZ3BPMQLsrpsxLmDDaK86x2LHL5dBJkOxBLlukJBzzIAVi7Cu jWo9IgV6pAO5rM3z9iK5MtbRXgKhw1rZ6DScXwVtlNFaXyLmLcSuGgJu7/xy0zKDf6+CK1 /nItZn3qGhHfLhdqadB/uPnAoe0xQ8fAzlcWO3ldtf0O9XF92+UQMgrjK4H2zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567693; a=rsa-sha256; cv=none; b=smAl4ssFMpXEnLvEHJTItcUVyJ1fmzmm7GGMLyMA3zX2fAT5njNfyBLFRQQ+6GaFWvDNJb xprM7+1dxR0BSLom1QVR3pWYslUUG9f9YQchvkG38RlQFbBIqlKSop3CTvww3vZJZxTkPB 7Jq4QM1KeCaSDCGDXvld/PerUQ9ij9q4TeE5FIkh9B6PfWjddhf8SSnYvDwii2HS8t9AIM iUNP21GDdXXFCFGHHORKE/SlH0F+d9re1BJS3so/pzjFHGaZx467xxPz5sphGIke9Puw4K /Y1ynYUDFcK6WvzgwLuHUKEm45OgOpQHsIDzbPkJMyGJw2JWKb+qr98zZi4ZQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CrQ8u5CvrOVmQ05DrLyJLlp2QWSPnFvZTe4hPOj+KJ8=; b=dAlye5Ql+O4c8ClyoBJ7DJcbPayak0oGi/AcFQIN4Iz1RYSRMJVuNfNHGGY3VWswWUAm0F T9bY+6A2Mty6rMyykoKyJmiOucD23Km7To7UlZiZHFPPRnAXfwq/tEfkeMP3ObWuXpsiEa GVykoeeN8N3tkUO512qYq+oSKxs6ZCEmEoPnD04oDVv7poZ30Q3fMT7i+z609xvI3D+H0i gOX08zApAWAok1YbNJFVjZUU3LJ5xuDJiP50AdXP04Bzv3AY89oRVY3qZ2elUhWnUAQ6wi EEDfPG5yEUJbsOccrg0Ot/F/ZX63us2L2GIMYNC08v9NN0UlNrJ9ZCIr21HEYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkR06lpxz11Zh; Sun, 21 Jul 2024 13:14:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEqQe023204; Sun, 21 Jul 2024 13:14:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEqmx023201; Sun, 21 Jul 2024 13:14:52 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:52 GMT Message-Id: <202407211314.46LDEqmx023201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 3e90716331cd - main - LinuxKPI: Add acpi_dev_get_first_match_dev and acpi_device_handle List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e90716331cdbdee7465213d389a33f90dad11cf Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=3e90716331cdbdee7465213d389a33f90dad11cf commit 3e90716331cdbdee7465213d389a33f90dad11cf Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:09:37 +0000 LinuxKPI: Add acpi_dev_get_first_match_dev and acpi_device_handle acpi_dev_get_first_match_dev returns the first match of ACPI device and acpi_device_handle returns its ACPI handle. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45847 --- sys/compat/linuxkpi/common/include/acpi/acpi_bus.h | 7 +++++ sys/compat/linuxkpi/common/include/linux/acpi.h | 4 +++ sys/compat/linuxkpi/common/src/linux_acpi.c | 32 ++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h index f107902a26ad..65bcbe7f1bdd 100644 --- a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h +++ b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h @@ -29,6 +29,9 @@ #ifndef _LINUXKPI_ACPI_ACPI_BUS_H_ #define _LINUXKPI_ACPI_ACPI_BUS_H_ +/* Aliase struct acpi_device to device_t */ +#define acpi_device _device + typedef char acpi_device_class[20]; struct acpi_bus_event { @@ -38,6 +41,8 @@ struct acpi_bus_event { }; #define acpi_dev_present(...) lkpi_acpi_dev_present(__VA_ARGS__) +#define acpi_dev_get_first_match_dev(...) \ + lkpi_acpi_dev_get_first_match_dev(__VA_ARGS__) ACPI_HANDLE bsd_acpi_get_handle(device_t bsddev); bool acpi_check_dsm(ACPI_HANDLE handle, const char *uuid, int rev, @@ -50,5 +55,7 @@ int unregister_acpi_notifier(struct notifier_block *nb); uint32_t acpi_target_system_state(void); bool lkpi_acpi_dev_present(const char *hid, const char *uid, int64_t hrv); +struct acpi_device *lkpi_acpi_dev_get_first_match_dev(const char *hid, + const char *uid, int64_t hrv); #endif /* _LINUXKPI_ACPI_ACPI_BUS_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/acpi.h b/sys/compat/linuxkpi/common/include/linux/acpi.h index 610aa0784cb9..3e1ec1b20626 100644 --- a/sys/compat/linuxkpi/common/include/linux/acpi.h +++ b/sys/compat/linuxkpi/common/include/linux/acpi.h @@ -39,6 +39,10 @@ #define ACPI_HANDLE(dev) \ ((dev)->bsddev != NULL ? bsd_acpi_get_handle((dev)->bsddev) : NULL) +#define acpi_device_handle(dev) \ + ((dev) != NULL ? bsd_acpi_get_handle(dev) : NULL) +static inline void acpi_dev_put(struct acpi_device *adev) {} +#define acpi_handle_debug(handle, fmt, ...) #endif diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c b/sys/compat/linuxkpi/common/src/linux_acpi.c index 60ec838e9da7..6a9afb3ddff0 100644 --- a/sys/compat/linuxkpi/common/src/linux_acpi.c +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c @@ -180,6 +180,7 @@ struct acpi_dev_present_ctx { const char *hid; const char *uid; int64_t hrv; + struct acpi_device *dev; }; static ACPI_STATUS @@ -187,6 +188,7 @@ acpi_dev_present_cb(ACPI_HANDLE handle, UINT32 level, void *context, void **result) { ACPI_DEVICE_INFO *devinfo; + struct acpi_device *dev; struct acpi_dev_present_ctx *match = context; bool present = false; UINT32 sta, hrv; @@ -230,6 +232,11 @@ acpi_dev_present_cb(ACPI_HANDLE handle, UINT32 level, void *context, return (AE_OK); } + dev = acpi_get_device(handle); + if (dev == NULL) + return (AE_OK); + match->dev = dev; + return (AE_ERROR); } @@ -249,6 +256,24 @@ lkpi_acpi_dev_present(const char *hid, const char *uid, int64_t hrv) return (rv == AE_ERROR); } +struct acpi_device * +lkpi_acpi_dev_get_first_match_dev(const char *hid, const char *uid, + int64_t hrv) +{ + struct acpi_dev_present_ctx match; + int rv; + + match.hid = hid; + match.uid = uid; + match.hrv = hrv; + match.dev = NULL; + + rv = AcpiWalkNamespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, acpi_dev_present_cb, NULL, &match, NULL); + + return (rv == AE_ERROR ? match.dev : NULL); +} + static void linux_register_acpi_event_handlers(void *arg __unused) { @@ -322,4 +347,11 @@ lkpi_acpi_dev_present(const char *hid, const char *uid, int64_t hrv) return (false); } +struct acpi_device * +lkpi_acpi_dev_get_first_match_dev(const char *hid, const char *uid, + int64_t hrv) +{ + return (NULL); +} + #endif /* !DEV_ACPI */ From nobody Sun Jul 21 13:14:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkR24ldsz5RVJm; Sun, 21 Jul 2024 13:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkR21TF5z4S4D; Sun, 21 Jul 2024 13:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hCzORKFKq8/Ij3ROu57PSfsi9cNO3SSIbEPIjKZVP78=; b=GqQo16D0GjKP3j0rUZ9WrX4Q5JyysBMctgSvKLX3DlZ6MyVwbTIXvjcEWMtT1KflimeFU5 fbDTN/U3yL/ayg920qwTRLDKXAVE4IJIaA0hn+9MIDsfd/X6Js2OM2+f84JRhTlCzFa0Nb 0erZ8JdKfVZvXFkfQp0OOmqjb4jAXH0cpiq0Dzn6rG3dvFJDnIKjnyJiaeUfxMEvs7Svyd TcKmcoce6DHkfrCGYoIc1JB06q/nA0DK3MBvx+OMQZDwE1dpMJpUTVbkjNCv3hJqGp9Z9z Ycv4Ct9H1JbH2iope8D2cHfu3pz1/NjGMxtUMRpTLE0RufQEW3vjWHuRI43fFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567694; a=rsa-sha256; cv=none; b=GmVieaJxBR5Xo63sD/z7otqH2DFTlT1euHVm6sg7p32+N0Egkk/GTGpBz3wekeB65gPELi 8IDPkuvz3E9/coNThBljijXc5Fkc5MomP3qu9D3jkiQTD1/4+mNdZtXdPt9cSPYPfZbJEK Hs1Qyqvg2Lgn1wUZWV1FOOEWKnptrw64BlHhU6qTMZXHOzc5Qai1htuaVomYpSSUSqxAD8 JiEnpM5NjT5Z+e0ttRKZfX9OEjK/9T4NG0qi4wcYuGmtwiE85E3dYCDzDwvuhQ8AYHAiHl MHii1W+jnCf9x5vRWCxdQG9Pu7LQCR0J5dge319S3nGPOHba+1VFCz+Val+xtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hCzORKFKq8/Ij3ROu57PSfsi9cNO3SSIbEPIjKZVP78=; b=LVxvj3bUuqZxhxdLpke3xnqXqr/6jrSkq4Ivw4tIU8M2nWvBcdiQbx0MnMofKg4HBGtwQp wVF/Z9vJuorzWqgbLrerQFDrR7UoSP1t8C9OJdvMTKu9GKMFaWCvqMddbRSDjEe1bCib+/ 0Czff8f5NeNaG8ELEJw6Ok2v1MqK0h+02cLxkiv7EFCuq+ldtIZn4CZALoSKGycjMmHT45 m2ipwu8+xBT8MaRJ0dZx8WDTZg80d8ve/CQmSfwUD8SY0yQ2JGbVquNbTIP0p6LqldecVM K0Zk6vlsm8vgAkIPY6L3+U0C5Xy+a3v+gLMeCdfJkT6aHC1Bz+9iGyoDwnMXpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkR20Q1hz11xQ; Sun, 21 Jul 2024 13:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEsts023252; Sun, 21 Jul 2024 13:14:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDErRH023249; Sun, 21 Jul 2024 13:14:53 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:53 GMT Message-Id: <202407211314.46LDErRH023249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 7774e08adf6c - main - LinuxKPI: Add linux/eventfd.h and linux/memremap.h dummy headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7774e08adf6c6364a0c7f07e8c40fb1ea7cc78e5 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7774e08adf6c6364a0c7f07e8c40fb1ea7cc78e5 commit 7774e08adf6c6364a0c7f07e8c40fb1ea7cc78e5 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:48 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:09:48 +0000 LinuxKPI: Add linux/eventfd.h and linux/memremap.h dummy headers Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45848 --- sys/compat/linuxkpi/dummy/include/linux/eventfd.h | 0 sys/compat/linuxkpi/dummy/include/linux/memremap.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/eventfd.h b/sys/compat/linuxkpi/dummy/include/linux/eventfd.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/memremap.h b/sys/compat/linuxkpi/dummy/include/linux/memremap.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Sun Jul 21 13:14:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkR35MtPz5RV2f; Sun, 21 Jul 2024 13:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkR32Xynz4S7v; Sun, 21 Jul 2024 13:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=41ueWV+nd+58uDex5iY4JxpsqFjer/zkI492fQkxBZc=; b=Z/zxPPlF6E4xM60CzPWtS+7uMuJ2vGjDqy+Fw8ZM5NxWEUn11qzbkAA+DeM22SFIO9qJ01 aej4OusV7byx0a7pbeiFweLDeIajXXPp+4xDCSZuJAcac5gFMplgr2V3i7ZrYljk33/mTx 4IZymFyoetSKhjXQy0uEK2i41FUF2FSKV8D43N/8YuZ+7g8Q++lNGEZCLvh9gevUxX1c57 nwil31WsdQH/zFaBZlEXo8yqv+AaoYji/+mQUEcGsc1gR8lPgZAonVghjOQZAtbYM0QtN1 ptg665i53s6VgPsT4tF3xsLm8+VqOUWMHM7Pnkr7rMikwhq+FYpni9O8qBHNfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567695; a=rsa-sha256; cv=none; b=OjKbYq3p8xns7OomCXPJ8zuRgNTI7wbTtmSC2ZY2/gdnf6mpaSDZM3VZ+82giulv3ImLwk XSHslk38RYticUP+P18Wf48lfjUmUUX03QUWMs3dobuvJuSZkqj+WOinA5dq55r6k5ho7Z 4l9a6h6L6TGO7N3R5ebLT/1hUmFMndjslKsgG3K8zJ71ONaYt+GKdg0oJ/z90yPNuPVBhz nzD11tmzU47U7zZ2+zhFW+sQWhLr01Nnh5lwhaoEhrS4ibMJUU90S6g0A/BapdOMP+3aur fH3cKkP5yi1XmcyU2JC9RUFfuIVCQKtxohiSX5r6kdup7MucFagfHvTyKMZ/Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=41ueWV+nd+58uDex5iY4JxpsqFjer/zkI492fQkxBZc=; b=BOCG+B0s8ODCgafGD07c7I/RPqFXMgGH35Z9Cv0risNzrKheykgesAJO1zd0ElrR93RbE8 0A8YHQQxKK3IsNj6dxjdp7kO+R8AcDq7+FW0qtCrdPk+33IckuT403kvecNOth9eYOq7ZS aPIJ8geGtvWDBHJoTfhrgv+HvSkCz+3ktuZKDcoUqI4BGsEXq4x9WNqFFHP/s/RWYhKRjM CUCa9wHYjQyDfk7eqH92Zwq/ZY1/npAKZIGy6XzjQVQgeuYlQCIe5uBuxVbbT9dL9NsXQB 3RacVfib1KrfImSQeKtJTm5ZBisiH7dPJAQwz4i8hxOMaOJ5rDSxl45X/7LGlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkR31tC2z12Bk; Sun, 21 Jul 2024 13:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEtN7023309; Sun, 21 Jul 2024 13:14:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEtsT023306; Sun, 21 Jul 2024 13:14:55 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:55 GMT Message-Id: <202407211314.46LDEtsT023306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 1fe7cd024342 - main - LinuxKPI: Remove owner argument from class_create function on KBI layer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fe7cd02434257692100c484cd345566c9dba528 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1fe7cd02434257692100c484cd345566c9dba528 commit 1fe7cd02434257692100c484cd345566c9dba528 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:58 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:09:58 +0000 LinuxKPI: Remove owner argument from class_create function on KBI layer To chase Linux 6.4 Sponsored by: Serenity Cyber Security, LLC Differential Revision: https://reviews.freebsd.org/D45849 --- sys/compat/linuxkpi/common/include/linux/device.h | 7 ++++--- sys/compat/linuxkpi/common/src/linux_compat.c | 3 +-- sys/ofed/drivers/infiniband/core/ib_cm.c | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 912be8fbae8b..f56a39e904c8 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -57,7 +57,6 @@ struct device; struct class { const char *name; - struct module *owner; struct kobject kobj; devclass_t bsdclass; const struct dev_pm_ops *pm; @@ -342,9 +341,11 @@ put_device(struct device *dev) kobject_put(&dev->kobj); } -struct class *class_create(struct module *owner, const char *name); +struct class *lkpi_class_create(const char *name); #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60400 -#define class_create(name) class_create(NULL, name) +#define class_create(name) lkpi_class_create(name) +#else +#define class_create(owner, name) lkpi_class_create(name) #endif static inline int diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index ec4e59f66e7f..9962154cffd9 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -342,13 +342,12 @@ error: } struct class * -class_create(struct module *owner, const char *name) +lkpi_class_create(const char *name) { struct class *class; int error; class = kzalloc(sizeof(*class), M_WAITOK); - class->owner = owner; class->name = name; class->class_release = linux_class_kfree; error = class_register(class); diff --git a/sys/ofed/drivers/infiniband/core/ib_cm.c b/sys/ofed/drivers/infiniband/core/ib_cm.c index 7ace287b1c88..046f10e085c7 100644 --- a/sys/ofed/drivers/infiniband/core/ib_cm.c +++ b/sys/ofed/drivers/infiniband/core/ib_cm.c @@ -4008,7 +4008,6 @@ static char *cm_devnode(struct device *dev, umode_t *mode) } struct class cm_class = { - .owner = THIS_MODULE, .name = "infiniband_cm", .devnode = cm_devnode, }; From nobody Sun Jul 21 13:14:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkR60qy3z5RVSP; Sun, 21 Jul 2024 13:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkR5495Lz4S1x; Sun, 21 Jul 2024 13:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HwcVFe2j9os/JX6RlnSKEFxXk903YYF4VAlhyQTXAEc=; b=jBpHwCYbRY8QmImSM/3M/xE3GsEeQtQcXyYWH4ATwK+oE6vS/SAvXLaXwPYyG/vzLEonlL 5VSlR7j2rmDQ+Edza75bS8p7VbDqQd0cnZUXgkgpifeEH0iOBklyrDWqQBG+6VgpL3a7kV DyQHsFewn8PJ/Gc8Uc4U1K1aUy1DFUJap980A0q1Bn9ddru8F2nEkhta2A2Zq+UDa63hKM 7dKQFQGiit4WENHIoQbDZbTcu8OOp2dmYIaMIxIOdf21O3IPRAf+U37Z5i86T9wRnjBfxc ccsyd7lRj04CG1eDoHUJIlAGrqVAUhMJXof+Gw+H0KQ26T0V0MmTarHdyrpDFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567697; a=rsa-sha256; cv=none; b=uOOGhGoR7yN4GOdRtquX1kOzgMWPuingptCD7GGAxjS7RXnmtzZJp8Ghavl++x9FJ/9pB6 Z4mpXI02IP5z6i+AIimX8dzf23oYqEYmaOD92m/WiWC99kR4mHIIRMY52AD2YUMS5qnetv lPQrdhNyFCUm9TSsrSK1YsdhoVhT1wY0/vz8C3LoRbRBgtdHQotS/LRnb88pbm2B6LHppj Q5gejMojU83NqB6StU6QtydjcsDQzzTG89J0GP1LsNIHKYc55qdgdY/9KY/UUBK4QE0uZK FgXhqjm1D6zZDLVrRbjN4fVS+JlgF2j9a9+Ok6oyFGi/9tWaGnoxBGQRD15f7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HwcVFe2j9os/JX6RlnSKEFxXk903YYF4VAlhyQTXAEc=; b=MCcsaDcBrL0uOKXun6p+tmyu7WGDNyAEWx5kNq4oxJIVzpvyb9i23vRxh9Pqh0rZsA5eJt fxlrIkeeaurDw5pShjjSfCfiRGQc4y78nQ0WRF9HyaldQ8DFfKHOOfZXqvsFqMFoHkxoGG 3t3p5Ouih8c4beZZLuaPzrWVQRuP6UWYDopzkL9xFN16STCB4bwa5g+vRlQcfHMi4MkG9b qQvCmeuXXIU43emA3hDL1199OL574wKNSucDsTfof0taYdpgbxPv3SDIaz9kZ6ZCSr6EcU l/Fidj3+m2fzRbqT2WVaPwRc7TvVyrTj4Zm5oIhlxvhNRZaGELOn0pX25Yo16g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkR53Qmnz12Bm; Sun, 21 Jul 2024 13:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEvNf023402; Sun, 21 Jul 2024 13:14:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEv9l023399; Sun, 21 Jul 2024 13:14:57 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:57 GMT Message-Id: <202407211314.46LDEv9l023399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: fcc350c375f7 - main - LinuxKPI: Add pci_iomap_range function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcc350c375f776318d0da8021109631492ab9261 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=fcc350c375f776318d0da8021109631492ab9261 commit fcc350c375f776318d0da8021109631492ab9261 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:10:25 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:10:25 +0000 LinuxKPI: Add pci_iomap_range function pci_iomap_range creates a virtual mapping cookie for a PCI BAR. As compared with pci_iomap it got extra offset parameter. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45904 --- sys/compat/linuxkpi/common/include/linux/pci.h | 4 ++++ sys/compat/linuxkpi/common/src/linux_pci.c | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 9c6a52aab83f..9457599d31d3 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -362,6 +362,8 @@ bool pci_device_is_present(struct pci_dev *pdev); int linuxkpi_pcim_enable_device(struct pci_dev *pdev); void __iomem **linuxkpi_pcim_iomap_table(struct pci_dev *pdev); +void *linuxkpi_pci_iomap_range(struct pci_dev *pdev, int mmio_bar, + unsigned long mmio_off, unsigned long mmio_size); void *linuxkpi_pci_iomap(struct pci_dev *pdev, int mmio_bar, int mmio_size); void linuxkpi_pci_iounmap(struct pci_dev *pdev, void *res); int linuxkpi_pcim_iomap_regions(struct pci_dev *pdev, uint32_t mask, @@ -774,6 +776,8 @@ static inline void pci_disable_sriov(struct pci_dev *dev) { } +#define pci_iomap_range(pdev, mmio_bar, mmio_off, mmio_size) \ + linuxkpi_pci_iomap_range(pdev, mmio_bar, mmio_off, mmio_size) #define pci_iomap(pdev, mmio_bar, mmio_size) \ linuxkpi_pci_iomap(pdev, mmio_bar, mmio_size) #define pci_iounmap(pdev, res) linuxkpi_pci_iounmap(pdev, res) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 51a3b0b2ebe1..3287a8a15ff5 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -755,7 +755,8 @@ _lkpi_pci_iomap(struct pci_dev *pdev, int bar, int mmio_size __unused) } void * -linuxkpi_pci_iomap(struct pci_dev *pdev, int mmio_bar, int mmio_size) +linuxkpi_pci_iomap_range(struct pci_dev *pdev, int mmio_bar, + unsigned long mmio_off, unsigned long mmio_size) { struct resource *res; @@ -765,7 +766,14 @@ linuxkpi_pci_iomap(struct pci_dev *pdev, int mmio_bar, int mmio_size) /* This is a FreeBSD extension so we can use bus_*(). */ if (pdev->want_iomap_res) return (res); - return ((void *)rman_get_bushandle(res)); + MPASS(mmio_off < rman_get_size(res)); + return ((void *)(rman_get_bushandle(res) + mmio_off)); +} + +void * +linuxkpi_pci_iomap(struct pci_dev *pdev, int mmio_bar, int mmio_size) +{ + return (linuxkpi_pci_iomap_range(pdev, mmio_bar, 0, mmio_size)); } void @@ -774,7 +782,9 @@ linuxkpi_pci_iounmap(struct pci_dev *pdev, void *res) struct pci_mmio_region *mmio, *p; TAILQ_FOREACH_SAFE(mmio, &pdev->mmio, next, p) { - if (res != (void *)rman_get_bushandle(mmio->res)) + if ((bus_space_handle_t)res < rman_get_bushandle(mmio->res) || + (bus_space_handle_t)res >= rman_get_bushandle(mmio->res) + + rman_get_size(mmio->res)) continue; bus_release_resource(pdev->dev.bsddev, mmio->type, mmio->rid, mmio->res); From nobody Sun Jul 21 13:14:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkR50L8Lz5RV2j; Sun, 21 Jul 2024 13:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkR44pttz4Rvl; Sun, 21 Jul 2024 13:14:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mr8v2GIQ4GMcxneFKXQCQLGG5p92Vtb3flo8z2b3x6M=; b=f19UemRLdJ1z+OxaAjmA1JmX4EW5dRuuuTbEzecnuJrf8jc4hu/C5d3w9qMGsXtG0XW28T rzT02tcmcXCVHRxEcRHIy1R1qc3/L8+p/U7MZkaq/4eph3XomzWMyNdixvkmQkAiJPdBrO kDwiCZvuypsRWr68MPTr+3/PCSUnkoJKbO6ppNbQWb9YoTt79iHVlm4y9I+zBl6TtrCqS4 H1ml0OUUslXArvVeO1jF8kCwHVlKWmIy+l7KFXYJ6fe6VciXDg5SXbVSdYDXSxR+kIrmvN piyqAQY4IVpwLkfhck6GkRcTgLCVsF1m39LYF/rbrPxOVob3nl0Cews6JTqIPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567696; a=rsa-sha256; cv=none; b=gZEAsf1NKVdfuO3RG1Jj9gaBz1XwJCcermwrZ1vdJCy+qRP328gjeaXBwR/ajrqVSpfybZ i5QYdeRZ2VQIiqayfb+ge4JWsNmiN1R0OtMlHYFykHOPmS99HznsfOBwuJOKv7CwQlExxJ k045IEco3stoI1q6V9YrwXGV87fbt9CtKqEYCCtvKboIwH/sR+E+SPA7YQW0V+9laJmLY8 Y1dBSTsZhxlvhVdZgOcqcZJQK1FWbfKI2gjMdzfnVdXuKw+pgXjTgSZ9GhGT0iY5GU6ADr 85LnlrB6HHce/hvpZ/CRxYfF0gXacGfSZP+53VWQO0k2pie0Gqo/nMl8Hk0Ocg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mr8v2GIQ4GMcxneFKXQCQLGG5p92Vtb3flo8z2b3x6M=; b=EnrP0gZO8M+Cx6N7JC3dNUPIqdX/FNsbch1KedDuBJI3nPk6d4Ve0VN7+I+Nybb0GFIo7Q YUfBB1uieZ+qHN4GICiH/n/fHxQx7R0datUydD2/mm27P/A1+UIy5Mo5jYGhjAohrE7Pcg 5dUq1Nf2+HkwNrL3Ryez1oe5uRnZx/karnWD383yevqhNq1KzES0hgdWMDvviIGA+lrNnP NpNl/HbPdW6avWmF7+dGunkhuyqxdcy7E5hVNb2cvo6z61kuJ5MLmdMP4JqgXdSGC42k+v Q+R/oHPc6f76oQNMS6MLpOgCadhJQNNtfBrEIsvKOun7pmzadtTL3Y9cjSyedg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkR432gHz12Bl; Sun, 21 Jul 2024 13:14:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEuqB023363; Sun, 21 Jul 2024 13:14:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEuvo023360; Sun, 21 Jul 2024 13:14:56 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:56 GMT Message-Id: <202407211314.46LDEuvo023360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: d42136e36162 - main - LinuxKPI: Remove vmas argument from get_user_pages on KBI layer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d42136e36162d60ea543ae346f32edd321de3f6e Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d42136e36162d60ea543ae346f32edd321de3f6e commit d42136e36162d60ea543ae346f32edd321de3f6e Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:10:14 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:10:14 +0000 LinuxKPI: Remove vmas argument from get_user_pages on KBI layer To chase Linux kernel 6.5 Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45850 --- sys/compat/linuxkpi/common/include/linux/mm.h | 10 ++++++---- sys/compat/linuxkpi/common/src/linux_page.c | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 56c849b02c32..b4c8bf3c1c30 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -276,12 +276,14 @@ get_page(struct page *page) } extern long -get_user_pages(unsigned long start, unsigned long nr_pages, - unsigned int gup_flags, struct page **, - struct vm_area_struct **); +lkpi_get_user_pages(unsigned long start, unsigned long nr_pages, + unsigned int gup_flags, struct page **); #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500 #define get_user_pages(start, nr_pages, gup_flags, pages) \ - get_user_pages(start, nr_pages, gup_flags, pages, NULL) + lkpi_get_user_pages(start, nr_pages, gup_flags, pages) +#else +#define get_user_pages(start, nr_pages, gup_flags, pages, vmas) \ + lkpi_get_user_pages(start, nr_pages, gup_flags, pages) #endif #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500 diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 8b78a3739f25..d4f8e75a3251 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -277,8 +277,8 @@ get_user_pages_remote(struct task_struct *task, struct mm_struct *mm, } long -get_user_pages(unsigned long start, unsigned long nr_pages, - unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas) +lkpi_get_user_pages(unsigned long start, unsigned long nr_pages, + unsigned int gup_flags, struct page **pages) { vm_map_t map; From nobody Sun Jul 21 13:14:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkR70QNNz5RVVX; Sun, 21 Jul 2024 13:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkR65QmYz4S8f; Sun, 21 Jul 2024 13:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4B45ruZkTaJ2wsc0x/dflLGkpqXFElg5y9ZlbTE7IGE=; b=Ay2L40nFOA0MBeR2Dd+YGt8mM3vs5zu6LkEYOhVJgCdBDSep6awlTKRN58/m6R7mSp3iai 3gzAxmWBFd1G9CQxRVtp5KcnfSqetbsDv0Nqz9fnvqRYjbfv+iXnjQNiJGzdEEZq53D3ul vObk6uuE8fc64QSEvWztUJMfrpqYzlNotaQc8mUuUaosUEm1LJ5adMmnRXowVeJnUE3yAv UQ75r9LdZQ4roworV72Z3bKJ9gVNK/CCPkeH+3HNHVvFKWTsvrfgIIrNqFNVcs5064P0LR 10xrDIDOeJVvdve6ak/HBhMOuT5qc9lYdpl9JG/Y9X1cO6SaqkgI5FYViOlEkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567698; a=rsa-sha256; cv=none; b=xaNRBNImZgKcalsBO4xcl8ptyx1zAqNXycMzHAA73tUQzmNIeGbPznJyssRqN9855sFyrB E+4puo+jz3yOdLFEPF75iiG6c4CPMWF123obrFWa0eWRDd9DgEoVDlfmGNtYZLEJaISpxB Rg+VA/wIpdgfpNJ8T2qVeV4rwO34lfVzfxjT/fKWEf89CWxW5Sb52OFYpNsQrMB4FzQiiC An32C7NMb8DABR9gK6ke++ZJ79RLjlfUC3PCDttk1hwOScX1NnjXCx/+bLrEB8cWSVGhZD ChtsfheBdfY6sAtZBeyQqiNqo9SOuCqA3ZpnSoWZclvN7fW5wy+04gO+xuFSwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4B45ruZkTaJ2wsc0x/dflLGkpqXFElg5y9ZlbTE7IGE=; b=tZs/aXVHCIPMF6+cFyOVLrTUV6Yd+YXGGk2KprjICTs656vckO8mO/Em8Lau1ognXKEPzt qZBRx5D9DCU7p5L/xt51hsdVYZWnTEX9jm+O898M3iBOgCi/KKk5iTaeTL2JiOzKea4FpD REuwoxTw4q0cSLLM6vBKps+0HyhBeInckuDZBpZQ9KIT9ESnnFMPiZgFUZyPrNvAk5FNoc tXMmWahGpIwzH5Tw+6x9qt5Bp6zbnlwEwzcFBDboJ9JlFoCgjnx7RjsppAIvEluxuE4KkF sPQ7kWHWLxNQzNdQWSI7uNN/3PgMidMgbvUZiFynMQN7yW+6b+5Mbf0o05isIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkR64fx4z11mB; Sun, 21 Jul 2024 13:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDEwKA023462; Sun, 21 Jul 2024 13:14:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDEwoM023459; Sun, 21 Jul 2024 13:14:58 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:14:58 GMT Message-Id: <202407211314.46LDEwoM023459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 14fc33ea3a05 - main - LinuxKPI: Fix resource leak on pci_iounmap-ing of PCI BAR List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14fc33ea3a0571ca70e609b6f9e67db39f7c6140 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=14fc33ea3a0571ca70e609b6f9e67db39f7c6140 commit 14fc33ea3a0571ca70e609b6f9e67db39f7c6140 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:10:44 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:10:44 +0000 LinuxKPI: Fix resource leak on pci_iounmap-ing of PCI BAR If the resource was allocated with want_iomap_res flag set. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45905 --- sys/compat/linuxkpi/common/src/linux_pci.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 3287a8a15ff5..3376d93053dc 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -780,12 +780,18 @@ void linuxkpi_pci_iounmap(struct pci_dev *pdev, void *res) { struct pci_mmio_region *mmio, *p; + bus_space_handle_t bh = (bus_space_handle_t)res; TAILQ_FOREACH_SAFE(mmio, &pdev->mmio, next, p) { - if ((bus_space_handle_t)res < rman_get_bushandle(mmio->res) || - (bus_space_handle_t)res >= rman_get_bushandle(mmio->res) + - rman_get_size(mmio->res)) - continue; + if (pdev->want_iomap_res) { + if (res != mmio->res) + continue; + } else { + if (bh < rman_get_bushandle(mmio->res) || + bh >= rman_get_bushandle(mmio->res) + + rman_get_size(mmio->res)) + continue; + } bus_release_resource(pdev->dev.bsddev, mmio->type, mmio->rid, mmio->res); TAILQ_REMOVE(&pdev->mmio, mmio, next); From nobody Sun Jul 21 13:19:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRkWs1b8Jz5RVwV; Sun, 21 Jul 2024 13:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRkWs14Hzz4XYq; Sun, 21 Jul 2024 13:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtfvL5EHVJpND4alMEeV51VijuTm4gL4xriUnFN9U7U=; b=VoK7xslmuBCT9DdZF2KhXeqnarpUYPFM7Ym8C6G/ImwTGEH0rKJVfPYolkVqaILozKz4It ACKI3b1UYk9beQOJxArm8S2PIqEPfmlIy4EaxJuF0XiHVFn5kDSUmcCF0eO1CjeF0Gcubo PrnlMUbmfrjFSIZNDpkoz+x44RfSBRB3jP1uL+356ocGREYihad1SGZnbwGT5hoHkqVSwN XZ1pZ+3irrkTs5vNrp5Nutn92PyfXgPokHcyz3MpyBhCNnxplwVqN6Ok0ziXvLw2NOOGGi 3Yjd676sA5VDyR1JZizzKS3J64GdghumvDuz93APH0xpJZgTtXc9G3AvoI2VKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721567945; a=rsa-sha256; cv=none; b=Ank5m7l+/FIL8wg7wfShY/1T4iSxJ4irUYpyn6Rn+avvAzvjIUItFUfQS3m8cdDt/dv70c qjB22bVW+fO1tg66Huie7NSeFIYlUOiDcravqS/r5qlHcVoNknpyAByOIvrG6Lj9X3XQUU q3R47eQCBJLVdEy24wDrH6NTMpkDZ5BLyIrAVHaKInXEakdbwbqRH7z5TvehT6/hxjdX7F +eUz0ED5tV2m+z+7WjsJ7b+W1dXTFuLJQ7BLS2bGNSeUvlcRURW0D+G7GlI6Kjx41SR+Aj slrba9d2UHTAllbNhWCto1ZHBMB+8DbocevF7Z2EImreuLyvvYVRMl45o672tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721567945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtfvL5EHVJpND4alMEeV51VijuTm4gL4xriUnFN9U7U=; b=jflJ0JoTj4ITARgHQXT4/T4HJYyIZo8Zxw9peaY/M/H2MCVy9djIPUf8vLjjx5/3ezGueD noHK+KNG+0ShcQdnVsa48iL9VixlmY+o3Ic/RyaapyUYcQRI+Xo3nPxFKnh9yeXVo04GQH 1QJGmmk5V/LAH4H2jze7QSEHhtSJzvTuqsy7xwHIJbO8eSYP5KLs2R/hkQMy5K4z41LjEm wsxwa3kqWdAFVfNWWnTcZqytxYJm5MBbDmxoI86uTWegdt8w4DuyegwzAhm3SUPq8r4orW PYVisKXTwjvMGCFeEwfN3wb5coWeJSHijTVq2mnNTbGe5BSN/bPXBaEzda3QAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRkWs0PVBz11mC; Sun, 21 Jul 2024 13:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LDJ47h024377; Sun, 21 Jul 2024 13:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LDJ4TO024374; Sun, 21 Jul 2024 13:19:04 GMT (envelope-from git) Date: Sun, 21 Jul 2024 13:19:04 GMT Message-Id: <202407211319.46LDJ4TO024374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 24388fccd551 - main - Bump __FreeBSD_version after LinuxKPI changes. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24388fccd551f79f64e54099a7d78196535c0a29 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=24388fccd551f79f64e54099a7d78196535c0a29 commit 24388fccd551f79f64e54099a7d78196535c0a29 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:17:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-07-21 13:17:37 +0000 Bump __FreeBSD_version after LinuxKPI changes. Sponsored by: Serenity Cyber Security, LLC --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 887c595a1de5..1ec875a0046e 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500020 +#define __FreeBSD_version 1500021 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Sun Jul 21 17:32:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRr8D1MHJz5Rs5F; Sun, 21 Jul 2024 17:32:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRr8D0dZWz4v7B; Sun, 21 Jul 2024 17:32:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721583148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0fgGLVAlDXxTQZ2sj7Nz4C4gtn8VQ5i0zz8QWuMPWxc=; b=YeeItrUIqflYEy6ZcxDxx5tPmasLu0SG+FzALvz/py/xBY5e+140mUk5tmPxFXOL6gN2pD dadHH/F2CovvAN3ZyZIklD+WzemdoskBSxD3vtp1CDx9F9DCHgOnuXz6iEfxlyURnxYgAx VnNCLsPfsnbAyhvvRAcDD5/TbG8nTAmX9/grev8KRCuUcBTqeV0EBBsfizTT6JxwHg1KGq G7iT4NDZ0GxvYK7DBJncFbpQWlAm6WQAEAjQ5QXZ3XLQub2HXOirNhEEaDJ0SY+RJhnzOZ /YduXdg23resg9OCqzQSD1uhPu5WIsTEk9meNpBOQrF0rdEOGTFt1YVfFrdx6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721583148; a=rsa-sha256; cv=none; b=Gt7hTTSPTDTSwT88JmVr2r4C0a2DPSX26JIgsDpHJEIA3CVHagz00E4ksm73DpjU0KzGVh 88Y3gQB4KoKfzVW4V5wWzelmFDsF6EYqi7FmAtcILgPfPNiT89QXzJ3dcPAc5cxtOKIb0W P9sPDiDwFksHHkUAaQWmYaTZa3ied/mRt/rX0c/kqXq4hgh+TDf9jgwMnp/PRCzGtR/ucn YL6HuvM0GHd5RoVtgyZGZ7uUoBO/WmoI4VjqAa/zDPzfzPq6YMI9W0de/VAm1CnH4fMmBt j/A9uWEQ0rkiMPWrF1zvDySiKRQ4fasE1AgHkPhlGIqERqHe//O4qpr7Nw3GXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721583148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0fgGLVAlDXxTQZ2sj7Nz4C4gtn8VQ5i0zz8QWuMPWxc=; b=sUl6Hu84xyaG7hRGEyBRWnbKqajo5B5WxK+Ts0vAkDZD+S5l+Lp5BkOgWPhMR1j9bfylhV qQhArZDqlK3KZXxSkiaN4Eo6jjkpEscLfepRWLMnnkX0fE9I2WQ8/Ecm87btBVNgBhEBXp vwKlRjWgZt0Jj3jcq7exfctaD1tc+QKIvit+OYosedZtUrHsRkXtWbUyLcctzslUJX0/po AzeQg9aFClsU4N5fpqXf9yo2nPkwVO8r5DyGciHeIOxMDaIY+BHdJUGQO3PINYnq1IB9c3 VRw52xz3G/jh2T/14435ah72BEAXZ/TPdVAgOIdAjebi5Bt1oEaMKYH1EWf49w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRr8D0FWSz194V; Sun, 21 Jul 2024 17:32:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LHWROT062764; Sun, 21 Jul 2024 17:32:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LHWRo0062761; Sun, 21 Jul 2024 17:32:27 GMT (envelope-from git) Date: Sun, 21 Jul 2024 17:32:27 GMT Message-Id: <202407211732.46LHWRo0062761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 82f5dfc12139 - main - db_pprint: Fix offset calculation for struct members List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82f5dfc121391604b079ea96aa14ea71e6b618c9 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=82f5dfc121391604b079ea96aa14ea71e6b618c9 commit 82f5dfc121391604b079ea96aa14ea71e6b618c9 Author: Bojan Novković AuthorDate: 2024-07-21 16:45:33 +0000 Commit: Bojan Novković CommitDate: 2024-07-21 17:31:48 +0000 db_pprint: Fix offset calculation for struct members The struct pretty-printing code uses the ctm_offset field in struct ctf_member_v3 to calculate the address of a struct member. However, the code treats this as a byte offset rather than the offset in bits, leading to wrong values being printed. Fix this by diving with ctm_offset by NBBY. Approved by: markj (mentor) Fixes: c21bc6f3c242 --- sys/ddb/db_pprint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/ddb/db_pprint.c b/sys/ddb/db_pprint.c index 10334ce650c8..2925caedd49d 100644 --- a/sys/ddb/db_pprint.c +++ b/sys/ddb/db_pprint.c @@ -117,7 +117,7 @@ db_pprint_struct(db_addr_t addr, struct ctf_type_v3 *type, u_int depth) return; } mtype = db_ctf_typeid_to_type(&sym_data, mp->ctm_type); - maddr = addr + mp->ctm_offset; + maddr = addr + (mp->ctm_offset / NBBY); mname = db_ctf_stroff_to_str(&sym_data, mp->ctm_name); db_indent = depth; if (mname != NULL) { @@ -140,7 +140,7 @@ db_pprint_struct(db_addr_t addr, struct ctf_type_v3 *type, u_int depth) return; } mtype = db_ctf_typeid_to_type(&sym_data, mp->ctlm_type); - maddr = addr + CTF_LMEM_OFFSET(mp); + maddr = addr + (CTF_LMEM_OFFSET(mp) / NBBY); mname = db_ctf_stroff_to_str(&sym_data, mp->ctlm_name); db_indent = depth; if (mname != NULL) { From nobody Sun Jul 21 17:32:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRr8F2YBzz5Rs5G; Sun, 21 Jul 2024 17:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRr8F1wJbz4tkt; Sun, 21 Jul 2024 17:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721583149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AESWM4xSG3NcxHtikS9ua/bI/RXffsN+Zj6pvHLTibM=; b=SKxGU4DsdHONL9FS0UsIUDiNWvqp8MdzSTRmq0zTrsDcGL6mJCJUkQ9aUEgMjDIbk5WVjc TZrNd64Fq5M8xq9fGNtE8HyjbyoGJERUol8KAxA4XTiJLlLfq0Bs39ONcPVkrP+7vQZAXo dJ90tKKrmgTue2VIYVPmj8nSFdN1zuUCPw3lPh5w/dIh5eN/Nkd8gsRx08kOaiIT4KXA/r sl3qWU6PKXCuPZQIJYaQke055wTcivL5/fWvRKxDLO7vr9CO/YzXj0bYHIIVpftCBQJ1rl A95O8NV2Nl1C9107nQdWlQbeT5XdYiROeSAqxWoXkO8FZ8M58zQegYbZvD9CDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721583149; a=rsa-sha256; cv=none; b=qd/cdxL5z+lsTJdRw+Hba0RuAwITCeIjPXSv60a70AygcWUaF7wparDTahPx5Bfiy5Oo2M xGJxGMJLFynDfv+y5xScBoVG7dgR5VnMc2lnKldQlwmx6AaQDy+3vofO6OVpEYiH7vo5nR dlHGI4rf7LVsqBvO7+7V0cKO9ldLLuER899XSZVYhagiBoT45qGyGObm/52vmfA6EVu+Sk IkyJzGoYaC5wa69zMDOLwVQ0X9130oYhmhBc93kf+GlGZJlNynua5c0BvNSAg6X1hYcydd vzPtXxJNxCO+eblxE09dU3lolirOsbes4MboEjk5csBljsdx1faGBBNhyB8eMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721583149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AESWM4xSG3NcxHtikS9ua/bI/RXffsN+Zj6pvHLTibM=; b=nnC3cq5dW5Hesjawbhk/qGLhk+XigEd26QVde1s64Da9nqacCbBZSnm69aLejNppw9Mt9o ouFcEDaSSvHJuB7NyqcZ3mC5unyZYYIZcdQ+DpdrTagNERldGMllStxo7XwbUyFTtuLAPs 4ecgQvkxCX0AZ8uTTK4TxKcA3UCU9RMQ6rteU7Ho7k3tD5J5gjB2LEtVRpAZMFNVaeWxx7 v4swTd5Y2OpLojEWZ872jMne/HCq4NyogHM5sUT7OZpNNfIBOmLwLivkurO7qpbuRgsTwa ZqjuWFZXXui0F3cIywhQUT2pP2R9SV9UzeHkWkSn2hS7Z9Q6QCT8L0q9I/NI+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRr8F1Fvrz184Z; Sun, 21 Jul 2024 17:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LHWTI8062813; Sun, 21 Jul 2024 17:32:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LHWTZ0062810; Sun, 21 Jul 2024 17:32:29 GMT (envelope-from git) Date: Sun, 21 Jul 2024 17:32:29 GMT Message-Id: <202407211732.46LHWTZ0062810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 1cbd613f3343 - main - db_pprint: Properly handle complex pointer types List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1cbd613f3343c873ace8a56df2e515626a18ef22 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=1cbd613f3343c873ace8a56df2e515626a18ef22 commit 1cbd613f3343c873ace8a56df2e515626a18ef22 Author: Bojan Novković AuthorDate: 2024-07-21 16:51:22 +0000 Commit: Bojan Novković CommitDate: 2024-07-21 17:31:59 +0000 db_pprint: Properly handle complex pointer types The existing pretty-printing code fails to properly print complex pointer types. This commit fixes this behaviour by traversing the chain of CTF types until a base type is encountered. Approved by: markj (mentor) Fixes: c21bc6f3c242 --- sys/ddb/db_pprint.c | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/sys/ddb/db_pprint.c b/sys/ddb/db_pprint.c index 2925caedd49d..0ca2b0bb952c 100644 --- a/sys/ddb/db_pprint.c +++ b/sys/ddb/db_pprint.c @@ -45,6 +45,7 @@ static void db_pprint_type(db_addr_t addr, struct ctf_type_v3 *type, static u_int max_depth = DB_PPRINT_DEFAULT_DEPTH; static struct db_ctf_sym_data sym_data; +static const char *asteriskstr = "*****"; /* * Pretty-prints a CTF_INT type. @@ -248,9 +249,14 @@ db_pprint_ptr(db_addr_t addr, struct ctf_type_v3 *type, u_int depth) const char *qual = ""; const char *name; db_addr_t val; + uint32_t tid; u_int kind; + int ptrcnt; - ref_type = db_ctf_typeid_to_type(&sym_data, type->ctt_type); + ptrcnt = 1; + tid = type->ctt_type; +again: + ref_type = db_ctf_typeid_to_type(&sym_data, tid); kind = CTF_V3_INFO_KIND(ref_type->ctt_info); switch (kind) { case CTF_K_STRUCT: @@ -258,25 +264,41 @@ db_pprint_ptr(db_addr_t addr, struct ctf_type_v3 *type, u_int depth) break; case CTF_K_VOLATILE: qual = "volatile "; - break; + tid = ref_type->ctt_type; + goto again; case CTF_K_CONST: qual = "const "; - break; + tid = ref_type->ctt_type; + goto again; + case CTF_K_RESTRICT: + qual = "restrict "; + tid = ref_type->ctt_type; + goto again; + case CTF_K_POINTER: + ptrcnt++; + tid = ref_type->ctt_type; + goto again; + case CTF_K_TYPEDEF: + tid = ref_type->ctt_type; + goto again; default: break; } - val = db_get_value(addr, sizeof(db_addr_t), false); - if (depth < max_depth) { + ptrcnt = min(ptrcnt, strlen(asteriskstr)); + val = (addr != 0) ? db_get_value(addr, sizeof(db_addr_t), false) : 0; + if (depth < max_depth && (val != 0)) { /* Print contents of memory pointed to by this pointer. */ - db_pprint_type(addr, ref_type, depth + 1); + db_pprint_type(val, ref_type, depth + 1); } else { name = db_ctf_stroff_to_str(&sym_data, ref_type->ctt_name); db_indent = depth; if (name != NULL) - db_printf("(%s%s *) 0x%lx", qual, name, (long)val); + db_printf("(%s%s %.*s) 0x%lx", qual, name, ptrcnt, + asteriskstr, (long)val); else - db_printf("(%s *) 0x%lx", qual, (long)val); + db_printf("(%s %.*s) 0x%lx", qual, ptrcnt, asteriskstr, + (long)val); } } From nobody Sun Jul 21 18:43:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRskc28QPz5QGGW; Sun, 21 Jul 2024 18:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRskc1b5Rz42qb; Sun, 21 Jul 2024 18:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721587432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cdsJ0HLJWdjWrqxJAzxqBnVBRKXxihQGjoiu6mnPdSM=; b=RoLMq7wcl75n5ZnYnC4gLMIJfs9EePLrtp52YjLDK75m1Ze7k3UTl8tO513IgEIjkZFfn9 hIcoTBmuRsttdgWcOzy4g7O1mClbrDoWEriyJfULcCtFRIId42xwfy7+x2yawKOUsfPwCw UKnLony8WBBpPXRhvWcrlqxqw4+N3xVlMMbkgaBKdS382QIecnUIwmrfPOxWchuJYyaoK/ SlAoKDRZ3SVZZmsvlczz1/01iZW8Y0dCRGwspK40emGThlePsicQlSwka1BP37fRDzVtsK N8f9P+g91xvU1J6h8IdQhTGSW1BwjYQKkFKcNOgw0tqnDQ86AnuoNfJsYaspSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721587432; a=rsa-sha256; cv=none; b=QJhPBFGeHYucr6sbYi1ANaSwnX+nf+AjIYp9lZrl6Smco5PA43HcqdMjpWliWIeley1YU3 oD7UsW/4Rl2MTOfX5ytGh+Z3k2GastKXpFjBxsHPYbNygHbFo6qJEC0jB3Ux8dEQh2G1tw Ovm4UPyzejJSY/BlvJKKpcPtL3Gqf6D4ryZ+rVwquOavyje6aRn7yagiWLVUzWoKLRpujF LvjHzmaxwRoei08VWiSmRHLEtOe81hotVgXmuLExsIBr1XcayurvBCY3Y68Ufw6nQYbWii SwNaukKka4Gi2+9UG15byh8tEwf8vhv4nDpKpB0ldcYwAccDin0jbeZAvI90ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721587432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cdsJ0HLJWdjWrqxJAzxqBnVBRKXxihQGjoiu6mnPdSM=; b=PCIc1IqdANUjQXyralrK/KvVFT31M6Se5JYKqzwQpX4Vohg4CVwSFMuKKQY17zK9zCxljY 4MW/m9fkNlunr8u/SXXaPoTl83CBf4LSmMyTamxM0w7mQziNJNzOlE/3zm7g9pjgJgjGup WgVefiFgRnXiDjpJ9RI8cm+8dSqkBBhZuzEzr39NXmnSvG30Vthhw8CqXORf+FzBL/pqzn USbGV2h8tZc5VSWRucAvq8SyE9hoLce0wkLEnT/3MA68gLJNmKUEa5RG+8rgizqwkry82u Ej6Qn0OM5SA4qStCjdBonmLhUqJEJMZnwtNwtkXC8yHlMy1VkEv5cQaHvL4f6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRskc19gqz1BST; Sun, 21 Jul 2024 18:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LIhqxp082742; Sun, 21 Jul 2024 18:43:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LIhqVN082739; Sun, 21 Jul 2024 18:43:52 GMT (envelope-from git) Date: Sun, 21 Jul 2024 18:43:52 GMT Message-Id: <202407211843.46LIhqVN082739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 646c28ea80cb - main - tcp: improve SEG.ACK validation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 646c28ea80cb0f9258386626297495b5a0e56db5 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=646c28ea80cb0f9258386626297495b5a0e56db5 commit 646c28ea80cb0f9258386626297495b5a0e56db5 Author: Michael Tuexen AuthorDate: 2024-07-21 09:37:35 +0000 Commit: Michael Tuexen CommitDate: 2024-07-21 09:37:35 +0000 tcp: improve SEG.ACK validation Implement the improved SEG.ACK validation described in RFC 5961. In addition to that, also detect ghost ACKs, which are ACKs for data that has never been sent. The additional checks are enabled by default, but can be disabled by setting the sysctl-variable net.inet.tcp.insecure_ack to a non-zero value. PR: 250357 Reviewed by: Peter Lei, rscheff (older version) MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45894 --- share/man/man4/tcp.4 | 5 ++++- sys/netinet/in_kdtrace.c | 2 ++ sys/netinet/in_kdtrace.h | 3 +++ sys/netinet/tcp_input.c | 44 +++++++++++++++++++++++++++++++++++++++++++ sys/netinet/tcp_stacks/bbr.c | 37 ++++++++++++++++++++++++++++++++++++ sys/netinet/tcp_stacks/rack.c | 39 ++++++++++++++++++++++++++++++++++++++ sys/netinet/tcp_var.h | 9 ++++++++- usr.bin/netstat/inet.c | 8 ++++++-- 8 files changed, 143 insertions(+), 4 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 39db12752937..3f5d87da0ffb 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 30, 2023 +.Dd July 21, 2024 .Dt TCP 4 .Os .Sh NAME @@ -699,6 +699,9 @@ Default is false. .It Va insecure_syn Use criteria defined in RFC793 instead of RFC5961 for accepting SYN segments. Default is false. +.It Va insecure_ack +Use criteria defined in RFC793 for validating SEG.ACK. +Default is false. .It Va isn_reseed_interval The interval (in seconds) specifying how often the secret data used in RFC 1948 initial sequence number calculations should be reseeded. diff --git a/sys/netinet/in_kdtrace.c b/sys/netinet/in_kdtrace.c index 8491a4d49d91..219bc6482910 100644 --- a/sys/netinet/in_kdtrace.c +++ b/sys/netinet/in_kdtrace.c @@ -339,6 +339,8 @@ MIB_PROBE_TCP(tcps_ecn_sndect1); MIB_PROBE_TCP(tcps_tlpresends); MIB_PROBE_TCP(tcps_tlpresend_bytes); +MIB_PROBE_TCP(tcps_rcvghostack); +MIB_PROBE_TCP(tcps_rcvacktooold); #endif SDT_PROBE_DEFINE6_XLATE(ip, , , receive, diff --git a/sys/netinet/in_kdtrace.h b/sys/netinet/in_kdtrace.h index 9896af96eb84..22f181974f93 100644 --- a/sys/netinet/in_kdtrace.h +++ b/sys/netinet/in_kdtrace.h @@ -330,6 +330,9 @@ SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_sndect1); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tlpresends); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tlpresend_bytes); + +SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvghostack); +SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvacktooold); #endif SDT_PROBE_DECLARE(ip, , , receive); diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 833a1e501780..ef24f20f784a 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -202,6 +202,11 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_insecure_rst), 0, "Follow RFC793 instead of RFC5961 criteria for accepting RST packets"); +VNET_DEFINE(int, tcp_insecure_ack) = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_ack, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_insecure_ack), 0, + "Follow RFC793 criteria for validating SEG.ACK"); + VNET_DEFINE(int, tcp_recvspace) = 1024*64; #define V_tcp_recvspace VNET(tcp_recvspace) SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_VNET | CTLFLAG_RW, @@ -2438,6 +2443,45 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, /* * Ack processing. */ + if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { + /* Checking SEG.ACK against ISS is definitely redundant. */ + tp->t_flags2 |= TF2_NO_ISS_CHECK; + } + if (!V_tcp_insecure_ack) { + tcp_seq seq_min; + bool ghost_ack_check; + + if (tp->t_flags2 & TF2_NO_ISS_CHECK) { + /* Check for too old ACKs (RFC 5961, Section 5.2). */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } else { + if (SEQ_GT(tp->iss + 1, tp->snd_una - tp->max_sndwnd)) { + /* Checking for ghost ACKs is stricter. */ + seq_min = tp->iss + 1; + ghost_ack_check = true; + } else { + /* + * Checking for too old ACKs (RFC 5961, + * Section 5.2) is stricter. + */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } + } + if (SEQ_LT(th->th_ack, seq_min)) { + if (ghost_ack_check) + TCPSTAT_INC(tcps_rcvghostack); + else + TCPSTAT_INC(tcps_rcvacktooold); + /* Send a challenge ACK. */ + tcp_respond(tp, mtod(m, void *), th, m, + tp->rcv_nxt, tp->snd_nxt, TH_ACK); + tp->last_ack_sent = tp->rcv_nxt; + m = NULL; + goto drop; + } + } switch (tp->t_state) { /* * In SYN_RECEIVED state, the ack ACKs our SYN, so enter diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index cb87932fa8db..445ba064b316 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -7711,6 +7711,43 @@ bbr_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, bbr = (struct tcp_bbr *)tp->t_fb_ptr; lost = bbr->r_ctl.rc_lost; nsegs = max(1, m->m_pkthdr.lro_nsegs); + if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { + /* Checking SEG.ACK against ISS is definitely redundant. */ + tp->t_flags2 |= TF2_NO_ISS_CHECK; + } + if (!V_tcp_insecure_ack) { + tcp_seq seq_min; + bool ghost_ack_check; + + if (tp->t_flags2 & TF2_NO_ISS_CHECK) { + /* Check for too old ACKs (RFC 5961, Section 5.2). */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } else { + if (SEQ_GT(tp->iss + 1, tp->snd_una - tp->max_sndwnd)) { + /* Checking for ghost ACKs is stricter. */ + seq_min = tp->iss + 1; + ghost_ack_check = true; + } else { + /* + * Checking for too old ACKs (RFC 5961, + * Section 5.2) is stricter. + */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } + } + if (SEQ_LT(th->th_ack, seq_min)) { + if (ghost_ack_check) + TCPSTAT_INC(tcps_rcvghostack); + else + TCPSTAT_INC(tcps_rcvacktooold); + /* Send challenge ACK. */ + ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val); + bbr->r_wanted_output = 1; + return (1); + } + } if (SEQ_GT(th->th_ack, tp->snd_max)) { ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val); bbr->r_wanted_output = 1; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index b7d9d383fc61..bd7583d3843a 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12472,6 +12472,45 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, INP_WLOCK_ASSERT(tptoinpcb(tp)); rack = (struct tcp_rack *)tp->t_fb_ptr; + if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { + /* Checking SEG.ACK against ISS is definitely redundant. */ + tp->t_flags2 |= TF2_NO_ISS_CHECK; + } + if (!V_tcp_insecure_ack) { + tcp_seq seq_min; + bool ghost_ack_check; + + if (tp->t_flags2 & TF2_NO_ISS_CHECK) { + /* Check for too old ACKs (RFC 5961, Section 5.2). */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } else { + if (SEQ_GT(tp->iss + 1, tp->snd_una - tp->max_sndwnd)) { + /* Checking for ghost ACKs is stricter. */ + seq_min = tp->iss + 1; + ghost_ack_check = true; + } else { + /* + * Checking for too old ACKs (RFC 5961, + * Section 5.2) is stricter. + */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } + } + if (SEQ_LT(th->th_ack, seq_min)) { + if (ghost_ack_check) + TCPSTAT_INC(tcps_rcvghostack); + else + TCPSTAT_INC(tcps_rcvacktooold); + /* Send challenge ACK. */ + __ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt); + rack->r_wanted_output = 1; + return (1); + } + } if (SEQ_GT(th->th_ack, tp->snd_max)) { __ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val, &rack->r_ctl.challenge_ack_ts, diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 1f48297c2b0a..f691579acf09 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -848,6 +848,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) #define TF2_CANNOT_DO_ECN 0x00080000 /* The stack does not do ECN */ #define TF2_PROC_SACK_PROHIBIT 0x00100000 /* Due to small MSS size do not process sack's */ #define TF2_IPSEC_TSO 0x00200000 /* IPSEC + TSO supported */ +#define TF2_NO_ISS_CHECK 0x00200000 /* Don't check SEG.ACK against ISS */ /* * Structure to hold TCP options that are only used during segment @@ -1089,8 +1090,12 @@ struct tcpstat { uint64_t tcps_tlpresends; /* number of tlp resends */ uint64_t tcps_tlpresend_bytes; /* number of bytes resent by tlp */ + /* SEG.ACK validation failures */ + uint64_t tcps_rcvghostack; /* received ACK for data never sent */ + uint64_t tcps_rcvacktooold; /* received ACK for data too long ago */ - uint64_t _pad[3]; /* 3 TBD placeholder for STABLE */ + + uint64_t _pad[1]; /* 1 TBD placeholder for STABLE */ }; #define tcps_rcvmemdrop tcps_rcvreassfull /* compat */ @@ -1280,6 +1285,7 @@ VNET_DECLARE(int, tcp_ecn_maxretries); VNET_DECLARE(int, tcp_initcwnd_segments); VNET_DECLARE(int, tcp_insecure_rst); VNET_DECLARE(int, tcp_insecure_syn); +VNET_DECLARE(int, tcp_insecure_ack); VNET_DECLARE(uint32_t, tcp_map_entries_limit); VNET_DECLARE(uint32_t, tcp_map_split_limit); VNET_DECLARE(int, tcp_minmss); @@ -1327,6 +1333,7 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_tcp_initcwnd_segments VNET(tcp_initcwnd_segments) #define V_tcp_insecure_rst VNET(tcp_insecure_rst) #define V_tcp_insecure_syn VNET(tcp_insecure_syn) +#define V_tcp_insecure_ack VNET(tcp_insecure_ack) #define V_tcp_map_entries_limit VNET(tcp_map_entries_limit) #define V_tcp_map_split_limit VNET(tcp_map_split_limit) #define V_tcp_minmss VNET(tcp_minmss) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 5d7fd0e46cf1..9ff7c687353f 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -642,8 +642,12 @@ tcp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/UDP tunneled pkt%s}\n"); p(tcps_tunneled_errs, "\t\t{:received-bad-udp-tunneled-pkts/%ju} " "{N:/UDP tunneled pkt cnt with error%s}\n"); - p(tcps_rcvacktoomuch, "\t\t{:received-acks-for-unsent-data/%ju} " - "{N:/ack%s for unsent data}\n"); + p(tcps_rcvacktoomuch, "\t\t{:received-acks-for-data-not-yet-sent/%ju} " + "{N:/ack%s for data not yet sent}\n"); + p(tcps_rcvghostack, "\t\t{:received-acks-for-data-never-been-sent/%ju} " + "{N:/ack%s for data never been sent (ghost acks)}\n"); + p(tcps_rcvacktooold, "\t\t{:received-acks-for-data-being-too-old/%ju} " + "{N:/ack%s for data being too old}\n"); p2(tcps_rcvpack, tcps_rcvbyte, "\t\t" "{:received-in-sequence-packets/%ju} {N:/packet%s} " "({:received-in-sequence-bytes/%ju} {N:/byte%s}) " From nobody Sun Jul 21 18:52:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRsx50tj8z5QGwn; Sun, 21 Jul 2024 18:52:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRsx50Qgkz444j; Sun, 21 Jul 2024 18:52:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721587977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QHStPBn/VjKzAp6bYKDrfeDX1P44/Ks+Kq5qqbHBFCg=; b=g9vvUGJQIY1u0XK06qGiP0gTCZcBBqjGcyFD5u4YZ0/TNx5lJUxNkJxHAt9WxSNsPs6/0a 5W+qwJ6UD26VfwqMsVOyTu3VgOOtk9og0D0rMZfeb5OvbjKllHXQqPn0DXZfhsNeX5NJRk XRi0WFRjm9nVHe8wHsw2UaZ2VRxpMqFgvaVAMskrcs5fNBfe3vQwliX3aUsA7y3RC+lYiH eHKzx7QlqdbQhin00Zt3eVhyhRhWN+4APyEMc1L1dVPi6Y09QMJ8VHO+B3UjkvjFrMpBjN sHDkBE7A77N7fJY0KU5ps8J462SWYoQBhJihSB5O33znK8KDAk1mlgmrPgTNlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721587977; a=rsa-sha256; cv=none; b=fl+slnWRNzyKNIA4SssqPxfgb+gpMR/vAkjPvvhfKHbfJQZtCc3mDHBRDt1SlPctZvaTLh 6vyXa7IfNvwOy4BQs+S0bpqemyH66u2R7MfTyFeZn2UBya6H6h3Pvgzw1pne4Bc23qPnwa 8JGDqjbjD7HT+n5OL9sx18nxJlW00nGoOunw+2qpbqz+f66/gdYq8S8px7uy3AqpGTUaui aTuVNm2MBbiGD8JiLWKCrE7NJMIX3c84P5yaJUI1J8WKz5mvINomxF2yqfmTDenEBNcaS+ 6sMiaG3abGs0KaQgtLvh/4Tq0z8vLMwuHj05QMr6E7k6UXeZnsotsOSrdydTNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721587977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QHStPBn/VjKzAp6bYKDrfeDX1P44/Ks+Kq5qqbHBFCg=; b=rRyA01D/2avz0Al/XFPhQRHtvGx7iJfUitdYrbV0W6dZu1c8mBDaGEpCgHlfV4aBfMDt07 NOZ3B+V7D+4CWhHLqkfYP8MoDne0Cpmkeagip3HX34/2+VALlOzvZElcWHBhZMFYSHUh4F JXCvsXaMjB2t23wUSenyqdUMXx3/B7/Fin1ceDfkmyJym3nct8kGsvIhUqyOB+27VMnDXa g86JukuBW73D0s6eP+EnLvU39/IAxSUIo3y8h/djxWdBaQWSanKJqjmZcG2JS+zD6bLBJg wtV9J4kaRWkzHrBSZG+QwWBpHdrTZXCwJKrvyVRjrJ6ddAR8oN2lXpIdCSS0Sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRsx46jrpz1BvM; Sun, 21 Jul 2024 18:52:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LIquf6099382; Sun, 21 Jul 2024 18:52:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LIqu5V099379; Sun, 21 Jul 2024 18:52:56 GMT (envelope-from git) Date: Sun, 21 Jul 2024 18:52:56 GMT Message-Id: <202407211852.46LIqu5V099379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: baee801c92d2 - main - tcp: simplify endpoint creation at the passive side List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: baee801c92d26f4b7d1b2a9edd755c1b07b84167 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=baee801c92d26f4b7d1b2a9edd755c1b07b84167 commit baee801c92d26f4b7d1b2a9edd755c1b07b84167 Author: Michael Tuexen AuthorDate: 2024-07-21 09:49:37 +0000 Commit: Michael Tuexen CommitDate: 2024-07-21 09:49:37 +0000 tcp: simplify endpoint creation at the passive side Use the intended TCP stack when creating a TCP endpoint instead of creating it the endpoint the default stack first and after that switching it to use the intended TCP stack. Reviewed by: Peter Lei, rrs and jtl (older version) Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45411 --- sys/netinet/tcp_subr.c | 19 +++++++++++++++++-- sys/netinet/tcp_syncache.c | 39 ++++++--------------------------------- sys/netinet/tcp_usrreq.c | 2 +- sys/netinet/tcp_var.h | 2 +- 4 files changed, 25 insertions(+), 37 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 5743d1bbd100..6dc8e0c1c46e 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2180,9 +2180,11 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, * Create a new TCP control block, making an empty reassembly queue and hooking * it to the argument protocol control block. The `inp' parameter must have * come from the zone allocator set up by tcpcbstor declaration. + * The caller can provide a pointer to a tcpcb of the listener to inherit the + * TCP function block from the listener. */ struct tcpcb * -tcp_newtcpcb(struct inpcb *inp) +tcp_newtcpcb(struct inpcb *inp, struct tcpcb *listening_tcb) { struct tcpcb *tp = intotcpcb(inp); #ifdef INET6 @@ -2200,8 +2202,21 @@ tcp_newtcpcb(struct inpcb *inp) tp->t_ccv.type = IPPROTO_TCP; tp->t_ccv.ccvc.tcp = tp; rw_rlock(&tcp_function_lock); - tp->t_fb = V_tcp_func_set_ptr; + if (listening_tcb != NULL) { + INP_LOCK_ASSERT(tptoinpcb(listening_tcb)); + KASSERT(listening_tcb->t_fb != NULL, + ("tcp_newtcpcb: listening_tcb->t_fb is NULL")); + if (listening_tcb->t_fb->tfb_flags & TCP_FUNC_BEING_REMOVED) { + rw_runlock(&tcp_function_lock); + return (NULL); + } + tp->t_fb = listening_tcb->t_fb; + } else { + tp->t_fb = V_tcp_func_set_ptr; + } refcount_acquire(&tp->t_fb->tfb_refcnt); + KASSERT((tp->t_fb->tfb_flags & TCP_FUNC_BEING_REMOVED) == 0, + ("tcp_newtcpcb: using TFB being removed")); rw_runlock(&tcp_function_lock); /* * Use the current system default CC algorithm. diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 1a3b6ebf6788..c797c6a99f4f 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -777,7 +777,7 @@ done: static struct socket * syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) { - struct tcp_function_block *blk; + struct tcpcb *listening_tcb; struct inpcb *inp = NULL; struct socket *so; struct tcpcb *tp; @@ -802,7 +802,11 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) goto allocfail; } inp = sotoinpcb(so); - if ((tp = tcp_newtcpcb(inp)) == NULL) { + if (V_functions_inherit_listen_socket_stack) + listening_tcb = sototcpcb(lso); + else + listening_tcb = NULL; + if ((tp = tcp_newtcpcb(inp, listening_tcb)) == NULL) { in_pcbfree(inp); sodealloc(so); goto allocfail; @@ -912,37 +916,6 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) tp->t_port = sc->sc_port; tcp_rcvseqinit(tp); tcp_sendseqinit(tp); - blk = sototcpcb(lso)->t_fb; - if (V_functions_inherit_listen_socket_stack && blk != tp->t_fb) { - /* - * Our parents t_fb was not the default, - * we need to release our ref on tp->t_fb and - * pickup one on the new entry. - */ - struct tcp_function_block *rblk; - void *ptr = NULL; - - rblk = find_and_ref_tcp_fb(blk); - KASSERT(rblk != NULL, - ("cannot find blk %p out of syncache?", blk)); - - if (rblk->tfb_tcp_fb_init == NULL || - (*rblk->tfb_tcp_fb_init)(tp, &ptr) == 0) { - /* Release the old stack */ - if (tp->t_fb->tfb_tcp_fb_fini != NULL) - (*tp->t_fb->tfb_tcp_fb_fini)(tp, 0); - refcount_release(&tp->t_fb->tfb_refcnt); - /* Now set in all the pointers */ - tp->t_fb = rblk; - tp->t_fb_ptr = ptr; - } else { - /* - * Initialization failed. Release the reference count on - * the looked up default stack. - */ - refcount_release(&rblk->tfb_refcnt); - } - } tp->snd_wl1 = sc->sc_irs; tp->snd_max = tp->iss + 1; tp->snd_nxt = tp->iss + 1; diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 3bc283c5a9db..c43e4523f358 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -172,7 +172,7 @@ tcp_usr_attach(struct socket *so, int proto, struct thread *td) if (error) goto out; inp = sotoinpcb(so); - tp = tcp_newtcpcb(inp); + tp = tcp_newtcpcb(inp, NULL); if (tp == NULL) { error = ENOBUFS; in_pcbfree(inp); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index f691579acf09..099fb32ee613 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1454,7 +1454,7 @@ void tcp_mss_update(struct tcpcb *, int, int, struct hc_metrics_lite *, void tcp_mss(struct tcpcb *, int); int tcp_mssopt(struct in_conninfo *); struct tcpcb * - tcp_newtcpcb(struct inpcb *); + tcp_newtcpcb(struct inpcb *, struct tcpcb *); int tcp_default_output(struct tcpcb *); void tcp_state_change(struct tcpcb *, int); void tcp_respond(struct tcpcb *, void *, From nobody Sun Jul 21 20:41:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRwLJ6WSdz5QSBc; Sun, 21 Jul 2024 20:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRwLJ5qS2z4FnK; Sun, 21 Jul 2024 20:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721594488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LOShq+gt3M+3OeV+hpirKTQbIDymYv1uuozlQts6pjg=; b=geYqZcunMSeptlf81/98YzyoFTVPyvLmoFZbyY/F9k5k2fidlUMIizL9D+6bGvu07xJf/a coAVqG3zxEDlNJQAXukMe0XHSJprS83jqwrKn01oKz3a7sREnX5GfKjVDcG+03x8JlQ/be IBaXb6OuGJFR/6ib/hwvkKiJ9hleAMCMRQSB72zz7uLOpINBIogummI2zN8WiZnay0UDAR zoZ99zKHhXTcOPq0q7V152Oe4oKH1TIgh33GP316i6MClYOb9mJbHsh6d57rsfGXRFrS0P +Cs8301jX+hPtTFvcitKgPMeq7LJ4zCowncwhrh54KfIiTPceQvrgAqkJCXJ5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721594488; a=rsa-sha256; cv=none; b=cjzG4DU9FXDNUJZhFC6hHiX/uhenGhuFW/aRJHuzWPRGa0ACPRhm8bvSRPEfvcQ1RwXVbS 32Ud5Nu1if8XESuIzO6fWDW6B8Vx+YEWAHSKLumCeWhg+s5g+RnpC8BMJoibW3y1Qx4gkF 9gyEhqHVBVvXGamx47FcGBd8wM3j8/ne69WeWV7AInM5xpUQbVs2QFb/CV2HdmMUeWN8Pl hCMQaI4C7Jei/6xIDeZRWqe5tnA9NQJBaN9BIqf6+9FrxfHX+fgXEuSwjU+9lthko2v+Il LzKV4BB+HduvEu9qvcvVlfS8rzFCy3b+fgKiG5jtVwxiQ6aNmsFeI75aLOyznQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721594488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LOShq+gt3M+3OeV+hpirKTQbIDymYv1uuozlQts6pjg=; b=REPbh8R79u6HBSm9Q5tTFnbqihc6uRvjKQktocVYU3fJ/Ds5HFAu6G+grhACA5AhO3dAfJ OAMHMyL0iCEIB1Hnm4pDNzNy7dRQ1uMzKzJ2werYNL44NqoitbehcqCnr+zIM2iw8yNZBi nQIEaBAXKPghpetQKmFMIx1MNdolauXJeHPvNcVwDf/bRiHZfeShpZoi6QWhVmdNKzYdbl MjSBokmdByzZj3gYsu202g3cTdrinDnuuB1QaHDDr5Y06z2caJwvEO08CrwIJxfRf1mtmC pI5R0TdDKqpwRvtRZABHB/lnpF+JfxgIpP1KqCcMRD7Y7l0FBNE3Id1OAOeewg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRwLJ5QghzFqL; Sun, 21 Jul 2024 20:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LKfSMN082000; Sun, 21 Jul 2024 20:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LKfSfZ081997; Sun, 21 Jul 2024 20:41:28 GMT (envelope-from git) Date: Sun, 21 Jul 2024 20:41:28 GMT Message-Id: <202407212041.46LKfSfZ081997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 397c2693fa66 - main - Fix llvm register allocator for native/cross build differences List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 397c2693fa66508cb5e6b173650a1f3bc6c4dd4f Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=397c2693fa66508cb5e6b173650a1f3bc6c4dd4f commit 397c2693fa66508cb5e6b173650a1f3bc6c4dd4f Author: Dimitry Andric AuthorDate: 2024-07-21 20:37:27 +0000 Commit: Dimitry Andric CommitDate: 2024-07-21 20:37:27 +0000 Fix llvm register allocator for native/cross build differences Work around an issue in LLVM's register allocator, which can cause slightly different i386 object files, when produced by a native or cross build of clang. This adds another volatile qualifier to a float variable declaration in the weightCalcHelper() function, which otherwise produces slightly different float results on amd64 and i386 hosts. In turn, this can lead to different (but equivalent) register choices, and thus non-identical assembly code. See https://github.com/llvm/llvm-project/issues/99396 for more details. Note this is a temporary fix, meant to merge in time for 13.4. As soon as upstream has a permanent solution we will import that. PR: 276961 Reported by: cperciva MFC after: 3 days --- contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp index f3cb7fa5af61..afde8d001f88 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp @@ -256,7 +256,12 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start, return -1.0f; } - float Weight = 1.0f; + // FreeBSD customization: similar to the HWeight declaration below, add a + // volatile qualifier to avoid slightly different weight results on amd64 + // and i386 hosts, and possibly choosing different registers in the register + // allocator. See for + // more details. + volatile float Weight = 1.0f; if (IsSpillable) { // Get loop info for mi. if (MI->getParent() != MBB) { From nobody Sun Jul 21 22:57:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRzMl4W8Vz5Qjb4; Sun, 21 Jul 2024 22:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRzMl2mwBz4VpV; Sun, 21 Jul 2024 22:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721602675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBRLuOve5wBgQ6nc8aUoxmrOKNb9YL2Dlg43BTFvPc4=; b=gQiZGEPutjQmMvbzQxmKqe+PUxUk+xRRC2Dxeg3l/8JbqXsqY6E1ScuiAMWYxRg1531pq2 8AoCU0mWg8BRkRwXbZAMHfOJfXVDg4nHN3kFRE821lUbQ+dxETKLV5WqAl099GzxJD6JUj AC4QUqyJO13MrkbulXi8MVS93biDeiUiC+DoIa2U/OUm0Bz3doaq68q4MhahaZqfNTtNeO lA2f4AMklIHd3YDco4VhbahnWPpNJr4bwDKU85cow3+gEY0SAkTvU2bNQJs0jaAxzFB0Rh RO2N23AMdUUbsr3UsqyaFaaRldMg61S0pJKouKXjZtop1Cv/CNHhziSxg9nVKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721602675; a=rsa-sha256; cv=none; b=m5GlvYKcxGjlDdzVbDtX/vuiMhayjQKOMkZUeKG6vjt5MK3NZ2ANiVaEgIgP54BJIoHAd/ ftdG+p9HVsdBKfv/VNdL84sXws0sCIm5+WdDT2AFbbxjv1ud7qfxRpKlBIjTBPZU/q3ZbB eCoAxtiT4fIB+cjy8osNoDkfWivYr9CHPUES66o2TpEBLBmyuDtW0CJgZ+Gn2B5iovcG/8 zpdjnb42tUGdI7XXdd0G5dkEwVDcaNGirEkRWBZqJo/H4vaYSy3A7zoBL3AXqRtWZOQDlO tnavAm5k13k4E36iyA/maM8K+uxvP9X9yPoex4gdJsxi4dqkgBamLYifYVHP4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721602675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBRLuOve5wBgQ6nc8aUoxmrOKNb9YL2Dlg43BTFvPc4=; b=cdvVHQ+27YrNMEPF8Egrm4CDClUdqMBsZCENjJE6bnPjK9bm1Qrg2/GqCLxMqCO/voioZC TdNY0nggPKb1CZV75ma9FLgc1fazQoUIJDvRKuo+LwpzYM4xtKK3ooMx6HadIA3p8rFG9l V6kbRe6O4j/APjikxo/qxE+CnQAJmumN6EwhqTRK+6u7ZXk5cPaDekMfAA7yTwiYePFxfY lpi5gMnZjCFyPjRZGxc4u+xQb7c0Gn2fnHa6Yg/Orq/6qp3YseY6FF15L4qFNxVNhu65Uf BYy5weVQA/BFRVP1Wf1bnCc9WnIN2/6lzOZbOqJpqM8AAAlN7K9LfeLIiQ2sSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRzMl2FnNzKfB; Sun, 21 Jul 2024 22:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LMvtLR004416; Sun, 21 Jul 2024 22:57:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LMvtLg004413; Sun, 21 Jul 2024 22:57:55 GMT (envelope-from git) Date: Sun, 21 Jul 2024 22:57:55 GMT Message-Id: <202407212257.46LMvtLg004413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 026cdaa3b3a9 - main - nfscl: Scan readdir reply filenames for invalid characters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 026cdaa3b3a92574d9ac3155216e5cc0b0bd4c51 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=026cdaa3b3a92574d9ac3155216e5cc0b0bd4c51 commit 026cdaa3b3a92574d9ac3155216e5cc0b0bd4c51 Author: Rick Macklem AuthorDate: 2024-07-21 22:56:16 +0000 Commit: Rick Macklem CommitDate: 2024-07-21 22:56:16 +0000 nfscl: Scan readdir reply filenames for invalid characters The NFS RFCs are pretty loose with respect to what characters can be in a filename returned by a Readdir. However, FreeBSD, as a POSIX system will not handle imbedded '/' or nul characters in file names. Also, for NFSv4, the file names "." and ".." are handcrafted on the client and should not be returned by a NFSv4 server. This patch scans for the above in filenames returned by Readdir and ignores any entry returned by Readdir which has them in it. Because an imbedded nul would be a string terminator, it was not possible to code this check efficiently using string(3) functions. Reported by: Apple Security Engineering and Architecture (SEAR) MFC after: 1 week --- sys/fs/nfsclient/nfs_clrpcops.c | 137 ++++++++++++++++++++++++++++++++-------- 1 file changed, 110 insertions(+), 27 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 13bdc74655dd..8947b608b743 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -142,6 +142,7 @@ static int nfsrpc_createv4(vnode_t , char *, int, struct vattr *, nfsquad_t, int, struct nfsclowner *, struct nfscldeleg **, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *, int *); +static bool nfscl_invalidfname(bool, char *, int); static int nfsrpc_locku(struct nfsrv_descript *, struct nfsmount *, struct nfscllockowner *, u_int64_t, u_int64_t, u_int32_t, struct ucred *, NFSPROC_T *, int); @@ -3321,6 +3322,31 @@ nfsrpc_rmdir(vnode_t dvp, char *name, int namelen, struct ucred *cred, return (error); } +/* + * Check to make sure the file name in a Readdir reply is valid. + */ +static bool +nfscl_invalidfname(bool is_v4, char *name, int len) +{ + int i; + char *cp; + + if (is_v4 && ((len == 1 && name[0] == '.') || + (len == 2 && name[0] == '.' && name[1] == '.'))) { + printf("Readdir NFSv4 reply has dot or dotdot in it\n"); + return (true); + } + cp = name; + for (i = 0; i < len; i++, cp++) { + if (*cp == '/' || *cp == '\0') { + printf("Readdir reply file name had imbedded / or nul" + " byte\n"); + return (true); + } + } + return (false); +} + /* * Readdir rpc. * Always returns with either uio_resid unchanged, if you are at the @@ -3373,6 +3399,8 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirrpc bad uio")); + KASSERT(uiop->uio_segflg == UIO_SYSSPACE, + ("nfsrpc_readdir: uio userspace")); ncookie.lval[0] = ncookie.lval[1] = 0; /* * There is no point in reading a lot more than uio_resid, however @@ -3630,6 +3658,17 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_resid) bigenough = 0; if (bigenough) { + struct iovec saviov; + off_t savoff; + ssize_t savresid; + int savblksiz; + + saviov.iov_base = uiop->uio_iov->iov_base; + saviov.iov_len = uiop->uio_iov->iov_len; + savoff = uiop->uio_offset; + savresid = uiop->uio_resid; + savblksiz = blksiz; + dp = (struct dirent *)uiop->uio_iov->iov_base; dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; @@ -3645,20 +3684,35 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base + DIRHDSIZ; uiop->uio_iov->iov_len -= DIRHDSIZ; + cp = uiop->uio_iov->iov_base; error = nfsm_mbufuio(nd, uiop, len); if (error) goto nfsmout; - cp = uiop->uio_iov->iov_base; - tlen -= len; - NFSBZERO(cp, tlen); - cp += tlen; /* points to cookie storage */ - tl2 = (u_int32_t *)cp; - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + tlen + - NFSX_HYPER; - uiop->uio_iov->iov_len -= tlen + NFSX_HYPER; - uiop->uio_resid -= tlen + NFSX_HYPER; - uiop->uio_offset += (tlen + NFSX_HYPER); + /* Check for an invalid file name. */ + if (nfscl_invalidfname( + (nd->nd_flag & ND_NFSV4) != 0, cp, len)) { + /* Skip over this entry. */ + uiop->uio_iov->iov_base = + saviov.iov_base; + uiop->uio_iov->iov_len = + saviov.iov_len; + uiop->uio_offset = savoff; + uiop->uio_resid = savresid; + blksiz = savblksiz; + } else { + cp = uiop->uio_iov->iov_base; + tlen -= len; + NFSBZERO(cp, tlen); + cp += tlen; /* points to cookie store */ + tl2 = (u_int32_t *)cp; + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + + tlen + NFSX_HYPER; + uiop->uio_iov->iov_len -= tlen + + NFSX_HYPER; + uiop->uio_resid -= tlen + NFSX_HYPER; + uiop->uio_offset += (tlen + NFSX_HYPER); + } } else { error = nfsm_advance(nd, NFSM_RNDUP(len), -1); if (error) @@ -3824,6 +3878,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirplusrpc bad uio")); + KASSERT(uiop->uio_segflg == UIO_SYSSPACE, + ("nfsrpc_readdirplus: uio userspace")); ncookie.lval[0] = ncookie.lval[1] = 0; timespecclear(&dctime); *attrflagp = 0; @@ -4059,6 +4115,17 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_resid) bigenough = 0; if (bigenough) { + struct iovec saviov; + off_t savoff; + ssize_t savresid; + int savblksiz; + + saviov.iov_base = uiop->uio_iov->iov_base; + saviov.iov_len = uiop->uio_iov->iov_len; + savoff = uiop->uio_offset; + savresid = uiop->uio_resid; + savblksiz = blksiz; + dp = (struct dirent *)uiop->uio_iov->iov_base; dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; @@ -4077,25 +4144,41 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, cnp->cn_nameptr = uiop->uio_iov->iov_base; cnp->cn_namelen = len; NFSCNHASHZERO(cnp); + cp = uiop->uio_iov->iov_base; error = nfsm_mbufuio(nd, uiop, len); if (error) goto nfsmout; - cp = uiop->uio_iov->iov_base; - tlen -= len; - NFSBZERO(cp, tlen); - cp += tlen; /* points to cookie storage */ - tl2 = (u_int32_t *)cp; - if (len == 2 && cnp->cn_nameptr[0] == '.' && - cnp->cn_nameptr[1] == '.') - isdotdot = 1; - else - isdotdot = 0; - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + tlen + - NFSX_HYPER; - uiop->uio_iov->iov_len -= tlen + NFSX_HYPER; - uiop->uio_resid -= tlen + NFSX_HYPER; - uiop->uio_offset += (tlen + NFSX_HYPER); + /* Check for an invalid file name. */ + if (nfscl_invalidfname( + (nd->nd_flag & ND_NFSV4) != 0, cp, len)) { + /* Skip over this entry. */ + uiop->uio_iov->iov_base = + saviov.iov_base; + uiop->uio_iov->iov_len = + saviov.iov_len; + uiop->uio_offset = savoff; + uiop->uio_resid = savresid; + blksiz = savblksiz; + } else { + cp = uiop->uio_iov->iov_base; + tlen -= len; + NFSBZERO(cp, tlen); + cp += tlen; /* points to cookie store */ + tl2 = (u_int32_t *)cp; + if (len == 2 && + cnp->cn_nameptr[0] == '.' && + cnp->cn_nameptr[1] == '.') + isdotdot = 1; + else + isdotdot = 0; + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + + tlen + NFSX_HYPER; + uiop->uio_iov->iov_len -= tlen + + NFSX_HYPER; + uiop->uio_resid -= tlen + NFSX_HYPER; + uiop->uio_offset += (tlen + NFSX_HYPER); + } } else { error = nfsm_advance(nd, NFSM_RNDUP(len), -1); if (error) From nobody Sun Jul 21 23:57:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WS0hY1kB3z5QqF1; Sun, 21 Jul 2024 23:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WS0hY173tz4bjT; Sun, 21 Jul 2024 23:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721606253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nv0nqlTcdQSlQAhp/yrcpVZgK6DLawzGCx4wSciAI9U=; b=S5oC9n1Rr2NlFmhpnvPa2qPRGUsIUNP1yunWq+oJtpUNAhY8iiPdp/+2LQOHGoN6Rb0i0o x2zg3gaLQhkcBWNzx7cpek0leRC0/x3asKJxgV+UsRxztOYuvvUmPfGfDNsFuBlfV3KXMc X8FeDIhezkk7CkYu1esDAlS2kR+otspiP1hFdwRGyW1bl0jWv0Oq4e8iMkClhJzUnQkUu8 b/9AfFOpNHKssdi6b/S3P1R4nVfDJpDjQ6SqVaFf5yKE+v40J/J251P2/nO5eQdJf0beUd shXJXpDiJSyTVC6U3gKj2qNPLWVENf6gMZ0mDtl3+cYDQB5Ni7htDuAcxr24lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721606253; a=rsa-sha256; cv=none; b=YCSpQuCsVT+Na+jmV+C0Hhyi2RH3KyH+rJJ307fRJwI4yJF+ybPKSqPXB5sI9lT52dMeMD 7UR35PTl6CfDNoGrOdJjXtHSWBuJRehZrPl+ENg5NzI3wazXaMPogvQaMWy5HASaxAzKHV 4dRL4rg2cTi/QT/W6raig+5RM0UPQQx5IxfBTRdSWQR+q8NwwQyTyaGdRaQA4wxAqCqqKK eoQDNa6y2NlPXcg6VsOuKa62yYiC7/Usj3gj5G2UJde2lNfAN0pgtoSKfyQQFivjxCpbkg 4U9cKAZayKx8q5rQxU3kcC+ntkgwdu99aIOIl9hopzp/TswzsKhPr59M/hROow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721606253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nv0nqlTcdQSlQAhp/yrcpVZgK6DLawzGCx4wSciAI9U=; b=M72cwtHUIc1CVfOYrootKlgRDCHFMf855xUR+3vVdgMizj2A6CKgFX8KXqprXFFbuudh8e xaakXNcTi+NTjkUoyWFYPXzjujCbu5FVXYuoN909IBQ61Fkmv/YYk/8Jm64gD573Luwb+0 ciayCWsY4kySdIIHW7HazMaZTZjqrcQ7403GGu3/vTe3s/Iahna0ISqdOeizMBUmxxe1Cn brvaqbMxt7gIJ7ZuSYcv9Gz9wILrY/HbOsImliMWoBzqwl2xdWnbQMh6ROMjIYafi3ipzx GfkTIctdhqofr+HHAk/gFTIHv9gUB+aFV7zYq4UclY/CogLN73BZogVdRmVEcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WS0hY0dNTzLvm; Sun, 21 Jul 2024 23:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46LNvWql006299; Sun, 21 Jul 2024 23:57:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46LNvWw4006296; Sun, 21 Jul 2024 23:57:32 GMT (envelope-from git) Date: Sun, 21 Jul 2024 23:57:32 GMT Message-Id: <202407212357.46LNvWw4006296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e0b080f850cc - main - tcp: mark TCP stacks which can serve as a default stack List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0b080f850cc0418353cc196cbfe81075cf76661 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e0b080f850cc0418353cc196cbfe81075cf76661 commit e0b080f850cc0418353cc196cbfe81075cf76661 Author: Michael Tuexen AuthorDate: 2024-07-21 13:06:10 +0000 Commit: Michael Tuexen CommitDate: 2024-07-21 13:06:10 +0000 tcp: mark TCP stacks which can serve as a default stack Allow a TCP function block (tfb) to become the default stack only if tfb->tfb_flags has the TCP_FUNC_DEFAULT_OK flags set. This allows a TCP function block, that is not suitable as a default function block to ensure that it is not set as the default via sysctl. In this case sysctl would return EINVAL. Reviewed by: gallatin, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45419 --- sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 2 +- sys/netinet/tcp_subr.c | 5 +++++ sys/netinet/tcp_var.h | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 445ba064b316..cf64451f0c87 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -14181,7 +14181,7 @@ struct tcp_function_block __tcp_bbr = { .tfb_tcp_mtu_chg = bbr_mtu_chg, .tfb_pru_options = bbr_pru_options, .tfb_switch_failed = bbr_switch_failed, - .tfb_flags = TCP_FUNC_OUTPUT_CANDROP, + .tfb_flags = TCP_FUNC_OUTPUT_CANDROP | TCP_FUNC_DEFAULT_OK, }; /* diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index bd7583d3843a..44ddfac2a6ca 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -25289,7 +25289,7 @@ static struct tcp_function_block __tcp_rack = { .tfb_compute_pipe = rack_compute_pipe, .tfb_stack_info = rack_stack_information, .tfb_inherit = rack_inherit, - .tfb_flags = TCP_FUNC_OUTPUT_CANDROP, + .tfb_flags = TCP_FUNC_OUTPUT_CANDROP | TCP_FUNC_DEFAULT_OK, }; diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 6dc8e0c1c46e..42d29d64e09f 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -359,6 +359,7 @@ static struct tcp_function_block tcp_def_funcblk = { .tfb_tcp_fb_init = tcp_default_fb_init, .tfb_tcp_fb_fini = tcp_default_fb_fini, .tfb_switch_failed = tcp_default_switch_failed, + .tfb_flags = TCP_FUNC_DEFAULT_OK, }; static int tcp_fb_cnt = 0; @@ -676,6 +677,10 @@ sysctl_net_inet_default_tcp_functions(SYSCTL_HANDLER_ARGS) error = ENOENT; goto done; } + if ((blk->tfb_flags & TCP_FUNC_DEFAULT_OK) == 0) { + error = EINVAL; + goto done; + } V_tcp_func_set_ptr = blk; done: rw_wunlock(&tcp_function_lock); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 099fb32ee613..52fd0f181e01 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -540,6 +540,7 @@ typedef enum { /* Flags for tcp functions */ #define TCP_FUNC_BEING_REMOVED 0x01 /* Can no longer be referenced */ #define TCP_FUNC_OUTPUT_CANDROP 0x02 /* tfb_tcp_output may ask tcp_drop */ +#define TCP_FUNC_DEFAULT_OK 0x04 /* Can be used as default */ /** * tfb_tcp_handoff_ok is a mandatory function allowing