From nobody Mon Apr 22 00:59: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 4VN6Mq3Vw3z5HxK0; Mon, 22 Apr 2024 00:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VN6Mq2zRwz4SyQ; Mon, 22 Apr 2024 00:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713747559; 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=/p6JTinFCKpnBTw0vm0KThzeOj9uzxeuQoCpspyInAQ=; b=dQMJxp3U5I0VYteOagfBVEL7CFcfJ3VBLcNAB2OP1a2TSbrwrMp+S19rhdoI6dZAbx9orA iodc5L3hOpZ/Z0wZkOoYyRWVHaT1m1GLJax9cF6/gP7mcJ/2plYP3QU71F1T+h6ls9Hpqt 6nIGGq6BGFCdQMvesdX3P10x7y275MEqkTtro7tJALKXZr9qdL3n7MTmtrabIy6BMYmE1L IsdSeW2e7G2FSa4ruuhy/KqjPdZRkUAZfXa7pRqdYHiKEBN9ks8smUCMTkCnajOlImfSW4 pni4LKYkE6Ua5OFwCi8adptUKTXMZ/4SZFtISEIJIzWKqDc8sx+hlzZKNEpWVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713747559; a=rsa-sha256; cv=none; b=CL+bLGKE9aNzp9bao38SHCjkPvW51Xwv0kp0T0TZWDe04DoHhYHZWNj9iflFHiudMY7zKd Zf6oGDyUYqtWWqJWDRrztTVX7gzxBs/kYUP7lUysI6XtSQXWHB5uYJOeRytsAN0xknrWGy VT1hxvMFkXyaPgQ2NnlBgVYCvbDrEwnJ+kUa0OZJt/5/fJ2Tdp3OT74px0u1+T6jyB2761 pBinMVEClVnnSwQe6gXxehVwDKJ4zQ8P+ZvrGYSRYsuUQBGZP4x4PlmtBf7fdLDkZQMwbx Y2FPNklCHfedf1VJFn1L4xEyMmMjF1DZIIPBGPikCH/xIgBGLqdFicT3cY6/gw== 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=1713747559; 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=/p6JTinFCKpnBTw0vm0KThzeOj9uzxeuQoCpspyInAQ=; b=PXIzVJHSwhy4G9mk92zu/SlGh0PRydzkYxF6XIXXcCEDhxECyE0dYDe6chRyXslA0MjOLY nCkMscFs9/6lOfypO+ke3DZ452d3rNqHJLh375jMckNX5aot8BYwM0Ba3loT+aXga01zPs 2rO8UMl8JM/hvTZ8GHM07FXwWHxyU+6HjXNGePK5i7P86yn46h9svnog4cdijHfNRor2uK dIL1pHqJi+4uOSH6/ka228lmDWykcf0inphcTYpr743AfTJNnRPA0gY5QCiBr5RBQBIqK9 cb/V/PEjPF/MNwHI8quM0Pxs/0HgjZtrNwktiG3mDmcGwfLGlqlHCtKlYtnoPg== 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 4VN6Mq2GwczRvp; Mon, 22 Apr 2024 00:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43M0xJux020334; Mon, 22 Apr 2024 00:59:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43M0xJeI020330; Mon, 22 Apr 2024 00:59:19 GMT (envelope-from git) Date: Mon, 22 Apr 2024 00:59:19 GMT Message-Id: <202404220059.43M0xJeI020330@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: dd03eafacba9 - main - riscv: create a convenience composite macro 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: dd03eafacba962c9dcec929c3ed9d63e7c43da3a Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=dd03eafacba962c9dcec929c3ed9d63e7c43da3a commit dd03eafacba962c9dcec929c3ed9d63e7c43da3a Author: Doug Moore AuthorDate: 2024-04-21 22:24:29 +0000 Commit: Doug Moore CommitDate: 2024-04-21 23:36:00 +0000 riscv: create a convenience composite macro Define PTE_TO_VM_PAGE to compose the PHYS_TO_VM_PAGE and PTE_TO_PHYS macros. Use it where appropriate, and drop some variables that it makes unnecessary. Reviewed by: jhb (previous version) Differential Revision: https://reviews.freebsd.org/D44700 --- sys/riscv/riscv/pmap.c | 50 ++++++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 118efa3a4f55..b92cb816f44a 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -362,6 +362,7 @@ pagezero(void *p) ((((pte) & ~PTE_HI_MASK) >> PTE_PPN0_S) * PAGE_SIZE) #define L2PTE_TO_PHYS(l2) \ ((((l2) & ~PTE_HI_MASK) >> PTE_PPN1_S) << L2_SHIFT) +#define PTE_TO_VM_PAGE(pte) PHYS_TO_VM_PAGE(PTE_TO_PHYS(pte)) static __inline pd_entry_t * pmap_l0(pmap_t pmap, vm_offset_t va) @@ -940,7 +941,6 @@ vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { pt_entry_t *l3p, l3; - vm_paddr_t phys; vm_page_t m; m = NULL; @@ -948,8 +948,7 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) l3p = pmap_l3(pmap, va); if (l3p != NULL && (l3 = pmap_load(l3p)) != 0) { if ((l3 & PTE_W) != 0 || (prot & VM_PROT_WRITE) == 0) { - phys = PTE_TO_PHYS(l3); - m = PHYS_TO_VM_PAGE(phys); + m = PTE_TO_VM_PAGE(l3); if (!vm_page_wire_mapped(m)) m = NULL; } @@ -1252,7 +1251,6 @@ pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) { - vm_paddr_t phys; PMAP_LOCK_ASSERT(pmap, MA_OWNED); if (m->pindex >= NUL2E + NUL1E) { @@ -1275,8 +1273,7 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) vm_page_t pdpg; l1 = pmap_l1(pmap, va); - phys = PTE_TO_PHYS(pmap_load(l1)); - pdpg = PHYS_TO_VM_PAGE(phys); + pdpg = PTE_TO_VM_PAGE(pmap_load(l1)); pmap_unwire_ptp(pmap, va, pdpg, free); } else if (m->pindex < NUL2E + NUL1E && pmap_mode != PMAP_MODE_SV39) { pd_entry_t *l0; @@ -1284,8 +1281,7 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) MPASS(pmap_mode != PMAP_MODE_SV39); l0 = pmap_l0(pmap, va); - phys = PTE_TO_PHYS(pmap_load(l0)); - pdpg = PHYS_TO_VM_PAGE(phys); + pdpg = PTE_TO_VM_PAGE(pmap_load(l0)); pmap_unwire_ptp(pmap, va, pdpg, free); } pmap_invalidate_page(pmap, va); @@ -1312,7 +1308,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t va, pd_entry_t ptepde, if (va >= VM_MAXUSER_ADDRESS) return (0); KASSERT(ptepde != 0, ("pmap_unuse_pt: ptepde != 0")); - mpte = PHYS_TO_VM_PAGE(PTE_TO_PHYS(ptepde)); + mpte = PTE_TO_VM_PAGE(ptepde); return (pmap_unwire_ptp(pmap, va, mpte, free)); } @@ -1487,8 +1483,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) lockp) == NULL) goto fail; } else { - phys = PTE_TO_PHYS(pmap_load(l1)); - pdpg = PHYS_TO_VM_PAGE(phys); + pdpg = PTE_TO_VM_PAGE(pmap_load(l1)); pdpg->ref_count++; } } else { @@ -1512,8 +1507,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) NUL2E + l1index, lockp) == NULL) goto fail; } else { - phys = PTE_TO_PHYS(pmap_load(l1)); - pdpg = PHYS_TO_VM_PAGE(phys); + pdpg = PTE_TO_VM_PAGE(pmap_load(l1)); pdpg->ref_count++; } } @@ -1553,7 +1547,7 @@ retry: ("%s: L1 entry %#lx for VA %#lx is a leaf", __func__, pmap_load(l1), va)); /* Add a reference to the L2 page. */ - l2pg = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l1))); + l2pg = PTE_TO_VM_PAGE(pmap_load(l1)); l2pg->ref_count++; } else { /* Allocate a L2 page. */ @@ -1570,7 +1564,6 @@ pmap_alloc_l3(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) { vm_pindex_t ptepindex; pd_entry_t *l2; - vm_paddr_t phys; vm_page_t m; /* @@ -1588,8 +1581,7 @@ retry: * hold count, and activate it. */ if (l2 != NULL && pmap_load(l2) != 0) { - phys = PTE_TO_PHYS(pmap_load(l2)); - m = PHYS_TO_VM_PAGE(phys); + m = PTE_TO_VM_PAGE(pmap_load(l2)); m->ref_count++; } else { /* @@ -2223,7 +2215,7 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, pvh = pa_to_pvh(PTE_TO_PHYS(oldl2)); pmap_pvh_free(pvh, pmap, sva); eva = sva + L2_SIZE; - for (va = sva, m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(oldl2)); + for (va = sva, m = PTE_TO_VM_PAGE(oldl2); va < eva; va += PAGE_SIZE, m++) { if ((oldl2 & PTE_D) != 0) vm_page_dirty(m); @@ -2261,7 +2253,6 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_t va, { struct md_page *pvh; pt_entry_t old_l3; - vm_paddr_t phys; vm_page_t m; PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -2271,8 +2262,7 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_t va, pmap->pm_stats.wired_count -= 1; pmap_resident_count_dec(pmap, 1); if (old_l3 & PTE_SW_MANAGED) { - phys = PTE_TO_PHYS(old_l3); - m = PHYS_TO_VM_PAGE(phys); + m = PTE_TO_VM_PAGE(old_l3); if ((old_l3 & PTE_D) != 0) vm_page_dirty(m); if (old_l3 & PTE_A) @@ -2487,7 +2477,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) pd_entry_t *l0, *l1, *l2, l2e; pt_entry_t *l3, l3e, mask; vm_page_t m, mt; - vm_paddr_t pa; vm_offset_t va_next; bool anychanged, pv_lists_locked; @@ -2543,8 +2532,7 @@ retryl2: if ((prot & VM_PROT_WRITE) == 0 && (l2e & (PTE_SW_MANAGED | PTE_D)) == (PTE_SW_MANAGED | PTE_D)) { - pa = PTE_TO_PHYS(l2e); - m = PHYS_TO_VM_PAGE(pa); + m = PTE_TO_VM_PAGE(l2e); for (mt = m; mt < &m[Ln_ENTRIES]; mt++) vm_page_dirty(mt); } @@ -2585,7 +2573,7 @@ retryl3: if ((prot & VM_PROT_WRITE) == 0 && (l3e & (PTE_SW_MANAGED | PTE_D)) == (PTE_SW_MANAGED | PTE_D)) { - m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(l3e)); + m = PTE_TO_VM_PAGE(l3e); vm_page_dirty(m); } if (!atomic_fcmpset_long(l3, &l3e, l3e & ~mask)) @@ -2851,7 +2839,7 @@ pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset_t va, vm_page_t ml3, * destroyed by pmap_remove_l3(). */ if (ml3 == NULL) - ml3 = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l2))); + ml3 = PTE_TO_VM_PAGE(pmap_load(l2)); KASSERT(ml3->pindex == pmap_l2_pindex(va), ("pmap_promote_l2: page table page's pindex is wrong")); if (pmap_insert_pt_page(pmap, ml3, true, all_l3e_PTE_A != 0)) { @@ -2953,7 +2941,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, va, &lock))) { l3 = pmap_l2_to_l3(l2, va); if (va < VM_MAXUSER_ADDRESS) { - mpte = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l2))); + mpte = PTE_TO_VM_PAGE(pmap_load(l2)); mpte->ref_count++; } } else if (va < VM_MAXUSER_ADDRESS) { @@ -3266,7 +3254,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, * Both pmap_remove_l2() and pmap_remove_l3() will * leave the kernel page table page zero filled. */ - mt = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l2))); + mt = PTE_TO_VM_PAGE(pmap_load(l2)); if (pmap_insert_pt_page(pmap, mt, false, false)) panic("pmap_enter_l2: trie insert failed"); } else @@ -3424,7 +3412,6 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp) { struct spglist free; - vm_paddr_t phys; pd_entry_t *l2; pt_entry_t *l3, newl3; @@ -3464,8 +3451,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, if (l2 != NULL && pmap_load(l2) != 0) { if ((pmap_load(l2) & PTE_RWX) != 0) return (NULL); - phys = PTE_TO_PHYS(pmap_load(l2)); - mpte = PHYS_TO_VM_PAGE(phys); + mpte = PTE_TO_VM_PAGE(pmap_load(l2)); mpte->ref_count++; } else { /* @@ -4023,7 +4009,7 @@ pmap_remove_pages(pmap_t pmap) continue; } - m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(tpte)); + m = PTE_TO_VM_PAGE(tpte); KASSERT((m->flags & PG_FICTITIOUS) != 0 || m < &vm_page_array[vm_page_array_size], ("pmap_remove_pages: bad pte %#jx", From nobody Mon Apr 22 09:16: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 4VNKPS6CQXz5JhTT; Mon, 22 Apr 2024 09:16:28 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1.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 4VNKPR5M1Mz4GFp; Mon, 22 Apr 2024 09:16:27 +0000 (UTC) (envelope-from freebsd@omnilan.de) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@omnilan.de designates 2a00:e10:2800::a130 as permitted sender) smtp.mailfrom=freebsd@omnilan.de Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [IPv6:2a00:e10:2800:0:0:0:0:a135]) by mx0.gentlemail.de (8.15.2/8.15.2) with ESMTP id 43M9GIaJ011306; Mon, 22 Apr 2024 11:16:18 +0200 (CEST) (envelope-from freebsd@omnilan.de) X-Authentication-Warning: mx0.gentlemail.de: Host ezra.dcm1.omnilan.net [IPv6:2a00:e10:2800:0:0:0:0:a135] claimed to be mh0.gentlemail.de Received: from [172.21.3.1] (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 097F6E68; Mon, 22 Apr 2024 11:16:18 +0200 (CEST) Content-Type: multipart/alternative; boundary="------------Djtb7k34W0VVt4JFbvQmeUvu" Message-ID: <04ea81b1-c6a2-4dcd-921c-729fb5f5f944@omnilan.de> Date: Mon, 22 Apr 2024 11:16:17 +0200 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: 9c59988175ff - main - bsdinstall: prefer HTTP To: Shawn Webb , Philip Paeps Cc: Ronald Klop , dev-commits-src-main@freebsd.org, dev-commits-src-all@freebsd.org References: <901819076.6938.1708005969197@localhost> <7B54789B-90DD-4A85-8E2B-84E13DAE54B5@freebsd.org> <4A6EC239-4B9B-442C-ACFB-8F99A951630A@freebsd.org> Content-Language: en-US From: Harry Schmalzbauer Organization: OmniLAN In-Reply-To: X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.27 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.979]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; HAS_ORG_HEADER(0.00)[]; ASN(0.00)[asn:61157, ipnet:2a00:e10:2800::/38, country:DE]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; HAS_XAW(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[omnilan.de]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4VNKPR5M1Mz4GFp This is a multi-part message in MIME format. --------------Djtb7k34W0VVt4JFbvQmeUvu Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-02-15 15:55, Shawn Webb wrote: ... >>> I'm curious to learn why you chose http:// rather than https://. >> Because https:// only adds work. And work is heat. >> >> bsdinstall uses the MANIFEST to confirm integrity. >> >> If your bsdinstall and MANIFEST are from a trustworthy source, anything >> downloaded over http:// will be trustworthy. Just as trustworthy, in fact, >> as anything downloaded over ftp://. > There is the problem of metadata leakage, which HTTPS helps to address > (though not completely.) The connection itself leaks the significant part, no matter if it's HTTP or HTTPS. Anything else from the header, which is plain on HTTP vs. HTTPS, doesn't tell much more: A 500MB stream from ftp.freebsd.org let's anyone guess you're downloading a setup image.  Which one exactly isn't hurting privacy imho, nor which agent is in use etc... I totally agree that general TLSing is a bad idea. Another advantage of HTTP (plain) vs. HTTPS is that proxies can easily cache, saving load from the net and the servers alike. (if intercepting beforehand anyways - which is 'standard' wherever I access the internet @work! - caching would work too of course, but in real world, the mitm-boxes rarely are proxies. Even small sized companies utilize F.ate/P.lto SSL-inspection feature - cheap and easy to turn on.  If TLSing madness wouldn't have caused encypted weather/newspaper/ads, maybe we wouldn't have precautionary man-in-the-middle boxes all over the places - which do inspect banking and everything else if not carefully extra ruled out) Just my 2 ¢ --------------Djtb7k34W0VVt4JFbvQmeUvu Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 2024-02-15 15:55, Shawn Webb wrote:
...
I'm curious to learn why you chose http:// rather than https://.
Because https:// only adds work.  And work is heat.

bsdinstall uses the MANIFEST to confirm integrity.

If your bsdinstall and MANIFEST are from a trustworthy source, anything
downloaded over http:// will be trustworthy.  Just as trustworthy, in fact,
as anything downloaded over ftp://.
There is the problem of metadata leakage, which HTTPS helps to address
(though not completely.)


The connection itself leaks the significant part, no matter if it's HTTP or HTTPS.
Anything else from the header, which is plain on HTTP vs. HTTPS, doesn't tell much more: A 500MB stream from ftp.freebsd.org let's anyone guess you're downloading a setup image.  Which one exactly isn't hurting privacy imho, nor which agent is in use etc...

I totally agree that general TLSing is a bad idea.
Another advantage of HTTP (plain) vs. HTTPS is that proxies can easily cache, saving load from the net and the servers alike.

(if intercepting beforehand anyways - which is 'standard' wherever I access the internet @work! - caching would work too of course, but in real world, the mitm-boxes rarely are proxies. Even small sized companies utilize F.ate/P.lto SSL-inspection feature - cheap and easy to turn on.  If TLSing madness wouldn't have caused encypted weather/newspaper/ads, maybe we wouldn't have precautionary man-in-the-middle boxes all over the places - which do inspect banking and everything else if not carefully extra ruled out)

Just my 2 ¢

--------------Djtb7k34W0VVt4JFbvQmeUvu-- From nobody Mon Apr 22 15:54: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 4VNVDh261wz5HMqD; Mon, 22 Apr 2024 15:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNVDh1bW2z440n; Mon, 22 Apr 2024 15:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713801268; 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=mrmXBrAJuGkNE0fpjzjWA9eQZ9MktbCNgIOT1rXdIXU=; b=tI7ukZUW1Ge1hawqxzsMR5hsdDQILR+nxHXK8YmBvHixPbYEYG2wYdjq95AkaQ4p4CEDEc aqdV/sCFuQatxTvqVxS1h7N02aqYarcGiRzof5H35KQHDEi2yzsLKtsSCj8nMIZ05JBwjD k6XofN2Qqloo/z4VYk+hUJVaWw+/9U77qrqgTuExpuBZUYwrEKV07enathCLukynJr3Zg+ cwF5iX8Vr9U/VRfBAdlIv0CpCj80OWnj1+ySDUPwvyEUPDg0wB7XIDnZBFryWi2xCbvTb/ QFgCXfruYatsijfSTaSGMgQlLyBwlV9h6tyZd4zxANnwJssN/t8UITYdkpVCzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713801268; a=rsa-sha256; cv=none; b=NJERIPc9D/dgNp4M0ERv4bgi3QgbjP9ud4nMRj22wQb1erQVu6Y2nepR0Jq8yyYYEbrUCH P5nnxkKdFEEKkAGdde3mwVxZvYLxDg46Mt9RluZUO2zx7W+zNJzfVhFUwPG9UZb+zsvlMt 9Xjxa3uajUCBGbmhZ7JW9PjxGaqbRkQSG9ezLNiHxXAYVd+KcEaUugzJa2ClDAs+dqfiBQ Ow0QyysZn1/RCKVb2VkUdpkeMruomkODoS6QH9QrMeT9POiNIkSwv6BFbshItpxXMN84ld ripaKihnsBMWMLTbf8IWVb/XzJuPZ5G0EgR+MwvhewQumrV9l0pI4+QxQvQX9g== 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=1713801268; 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=mrmXBrAJuGkNE0fpjzjWA9eQZ9MktbCNgIOT1rXdIXU=; b=yvIfb+tkLP6QTjDmQvORRmOtkVNFfK2d3vXa2u289AZwtA6OHulU0H0eT2j82gNGhNxdJn 0as0HVrr1HYBu4ce0CbbLARcpl/v4TibusgjfUg5Sxeh4ZODIBYpMZfY70LFptyPOu54ba WkXfMHaZBFpedwhMJ/LwmEaf0Oc5dqc4drTHChdAkdTJ5dCfHNLMM+uJeCO3cTO0BRkb4M ISyCn7xr4KTvmEsLYPc9c5lW+v5O2I6H4kv0N2iMqkl1fOQwy95++jNGViLJCz+h04pwpB VsFwu8J6JaQpc2gPheUQzYZHqx48b/CxkbEIv4Df6g4DC5zrLv/6Cpjop5G9WA== 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 4VNVDh0wDZztNh; Mon, 22 Apr 2024 15:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MFsRPC041221; Mon, 22 Apr 2024 15:54:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MFsR3n041218; Mon, 22 Apr 2024 15:54:27 GMT (envelope-from git) Date: Mon, 22 Apr 2024 15:54:27 GMT Message-Id: <202404221554.43MFsR3n041218@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: 800da341bc4a - main - thread: Simplify sanitizer integration with thread creation 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: 800da341bc4a35f4b4d82d104b130825d9a42ffa Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=800da341bc4a35f4b4d82d104b130825d9a42ffa commit 800da341bc4a35f4b4d82d104b130825d9a42ffa Author: Mark Johnston AuthorDate: 2024-04-22 15:43:17 +0000 Commit: Mark Johnston CommitDate: 2024-04-22 15:46:59 +0000 thread: Simplify sanitizer integration with thread creation fork() may allocate a new thread in one of two ways: from UMA, or cached in a freed proc that was just allocated from UMA. In either case, KASAN and KMSAN need to initialize some state; in particular they need to initialize the shadow mapping of the new thread's stack. This is done differently between KASAN and KMSAN, which is confusing. This patch improves things a bit: - Add a new thread_recycle() function, which moves all kernel stack handling out of kern_fork.c, since it doesn't really belong there. - Then, thread_alloc_stack() has only one local caller, so just inline it. - Avoid redundant shadow stack initialization: thread_alloc() initializes the KMSAN shadow stack (via kmsan_thread_alloc()) even through vm_thread_new() already did that. - Add kasan_thread_alloc(), for consistency with kmsan_thread_alloc(). No functional change intended. Reviewed by: khng MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44891 --- sys/kern/kern_fork.c | 17 +++-------------- sys/kern/kern_thread.c | 20 ++++++++++++-------- sys/kern/subr_asan.c | 10 ++++++++++ sys/sys/asan.h | 4 ++++ sys/sys/proc.h | 2 +- sys/vm/vm_glue.c | 9 ++++----- 6 files changed, 34 insertions(+), 28 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index d0044dfc19a0..41f6a76c4fa1 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -40,7 +40,6 @@ #include #include -#include #include #include #include @@ -1019,19 +1018,9 @@ fork1(struct thread *td, struct fork_req *fr) } proc_linkup(newproc, td2); } else { - kmsan_thread_alloc(td2); - if (td2->td_kstack == 0 || td2->td_kstack_pages != pages) { - if (td2->td_kstack != 0) - vm_thread_dispose(td2); - if (!thread_alloc_stack(td2, pages)) { - error = ENOMEM; - goto fail2; - } - } else { - kasan_mark((void *)td2->td_kstack, - ptoa(td2->td_kstack_pages), - ptoa(td2->td_kstack_pages), 0); - } + error = thread_recycle(td2, pages); + if (error != 0) + goto fail2; } if ((flags & RFMEM) == 0) { diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 0bcd5c2f2add..725791769ac3 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -798,6 +798,7 @@ thread_alloc(int pages) } td->td_tid = tid; bzero(&td->td_sa.args, sizeof(td->td_sa.args)); + kasan_thread_alloc(td); kmsan_thread_alloc(td); cpu_thread_alloc(td); EVENTHANDLER_DIRECT_INVOKE(thread_ctor, td); @@ -805,15 +806,18 @@ thread_alloc(int pages) } int -thread_alloc_stack(struct thread *td, int pages) +thread_recycle(struct thread *td, int pages) { - - KASSERT(td->td_kstack == 0, - ("thread_alloc_stack called on a thread with kstack")); - if (!vm_thread_new(td, pages)) - return (0); - cpu_thread_alloc(td); - return (1); + if (td->td_kstack == 0 || td->td_kstack_pages != pages) { + if (td->td_kstack != 0) + vm_thread_dispose(td); + if (!vm_thread_new(td, pages)) + return (ENOMEM); + cpu_thread_alloc(td); + } + kasan_thread_alloc(td); + kmsan_thread_alloc(td); + return (0); } /* diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index c3664d9cf6c2..75d9e75c531a 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -39,6 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.26 2020/09/10 14:10:46 maxv Exp $"); #include #include #include +#include #include #include @@ -294,6 +295,15 @@ kasan_mark(const void *addr, size_t size, size_t redzsize, uint8_t code) } } +void +kasan_thread_alloc(struct thread *td) +{ + if (td->td_kstack != 0) { + kasan_mark((void *)td->td_kstack, ptoa(td->td_kstack_pages), + ptoa(td->td_kstack_pages), 0); + } +} + /* -------------------------------------------------------------------------- */ #define ADDR_CROSSES_SCALE_BOUNDARY(addr, size) \ diff --git a/sys/sys/asan.h b/sys/sys/asan.h index a3becdef5f57..6a01d0531725 100644 --- a/sys/sys/asan.h +++ b/sys/sys/asan.h @@ -53,14 +53,18 @@ #define KASAN_KSTACK_FREED 0xFE #define KASAN_EXEC_ARGS_FREED 0xFF +struct thread; + void kasan_init(void); void kasan_init_early(vm_offset_t, size_t); void kasan_shadow_map(vm_offset_t, size_t); void kasan_mark(const void *, size_t, size_t, uint8_t); +void kasan_thread_alloc(struct thread *); #else /* KASAN */ #define kasan_init() #define kasan_shadow_map(a, s) #define kasan_mark(p, s, l, c) +#define kasan_thread_alloc(t) #endif /* !KASAN */ #endif /* !_SYS_ASAN_H_ */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 33b836f4150e..1b542d1374b4 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1262,7 +1262,6 @@ void cpu_thread_free(struct thread *); void cpu_thread_swapin(struct thread *); void cpu_thread_swapout(struct thread *); struct thread *thread_alloc(int pages); -int thread_alloc_stack(struct thread *, int pages); int thread_check_susp(struct thread *td, bool sleep); void thread_cow_get_proc(struct thread *newtd, struct proc *p); void thread_cow_get(struct thread *newtd, struct thread *td); @@ -1275,6 +1274,7 @@ void thread_exit(void) __dead2; void thread_free(struct thread *td); void thread_link(struct thread *td, struct proc *p); void thread_reap_barrier(void); +int thread_recycle(struct thread *, int pages); int thread_single(struct proc *p, int how); void thread_single_end(struct proc *p, int how); void thread_stash(struct thread *td); diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 4292a7533503..f9235fe03fab 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -543,8 +543,6 @@ vm_thread_new(struct thread *td, int pages) td->td_kstack = ks; td->td_kstack_pages = pages; td->td_kstack_domain = ks_domain; - kasan_mark((void *)ks, ptoa(pages), ptoa(pages), 0); - kmsan_mark((void *)ks, ptoa(pages), KMSAN_STATE_UNINIT); return (1); } @@ -562,11 +560,12 @@ vm_thread_dispose(struct thread *td) td->td_kstack = 0; td->td_kstack_pages = 0; td->td_kstack_domain = MAXMEMDOM; - kasan_mark((void *)ks, 0, ptoa(pages), KASAN_KSTACK_FREED); - if (pages == kstack_pages) + if (pages == kstack_pages) { + kasan_mark((void *)ks, 0, ptoa(pages), KASAN_KSTACK_FREED); uma_zfree(kstack_cache, (void *)ks); - else + } else { vm_thread_stack_dispose(ks, pages); + } } /* From nobody Mon Apr 22 15:54: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 4VNVDj2WQBz5HMqH; Mon, 22 Apr 2024 15:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNVDj1h5qz44Rt; Mon, 22 Apr 2024 15:54:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713801269; 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=qYGTPfmQsaWjJyTs8K5+LL7vDHK1vlOmJD3FHhZYv5M=; b=Uj2woHJARZlB9YEcSnBL/zk+c/eN3uxJXjRZL1lMG/qtTcZVLKyN8Yz6UJnZlZOuesHzam sCj2G2Fh728f8ZW1Ddbzsj4pUwB1iV2FZQvvZOt+wxW3oIjg4y3xV8+PGEqdbgnx/OTwUZ dr1W/xSpnr1u3Zbf/9dcg1tG4vOJe9Xkl7kt5+zTI3jHqqdpm1FFJjsRr/YjXhICLGJW5C iD19ym9LNjoCr3YFdLmCaCBHGl8uwK2ycMNRsReNMR30Z8MpI/f1NhWyxRD+YDZl2iOiPV F9WzMdDpGk+W4y1cJsKNS8Q34VSLPOGHQVFOfgXWfmJ4UiBZN5w6EwdoJlAnsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713801269; a=rsa-sha256; cv=none; b=EweF7OGJZAsO/Mtz7XU5j86ZN40QDbVHvoLukChxXgwJyTd79dL2NNlFhCoup494hIe6HU 7zkfJfLl+sTHNUExrSk6HK+u1lZxv0adCpkS4LThgp98lPvgtWlqpVOzK9zA8qYNoxMRZz V4WtViHzxGQHzwYG1VoMtXDj5YbxKz+XhvI9RH2D2BO0hzQbHR7P0nyxHoXx18cWFKOvCQ lgsp8XOo+q3+bUZM/R4/8Kct3UqIAuN2YFtd+qdTh/dcyaJCZZS3nEQ5XnaZK0W6HCvo2l X0IeY/hwGP9iPNElKRSwvR+2qTCpLEVlQvtW6Ke7KiHWbp5/pPnY/lIuIP2GIg== 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=1713801269; 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=qYGTPfmQsaWjJyTs8K5+LL7vDHK1vlOmJD3FHhZYv5M=; b=kokvj55cTDeQvgnzjkeb/hIWxEGwl2QtiWfUlGWPNJaSHRJl03RkqplXXZ10uTvVvgApCY JPoYVqCF1kfbOij2Ds+y+SKBKCRt139TDIAJuBTnhUl80HdtJ5XHA0Q8g/I/KFFoAY9Vp6 XPlbNgMZ0FB/6cMsD8y1HVf0BsY+HQLESjRyXir5f3yoKMds11i7jFvbLro70wzXzd5rHA IjkPvE8MdyeJECSDuKao3WukW3CkE5MTO5XuK69vZmmScz3NBIIZWz6CucV/jvcgsT0KYM KeSeHGND6DZT4qHsXXl5F/Iy75J6koHIKDyxnNx0dYFZvW2oRed6kdrncrieyw== 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 4VNVDj1JVzztNj; Mon, 22 Apr 2024 15:54:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MFsT2T041273; Mon, 22 Apr 2024 15:54:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MFsTsg041270; Mon, 22 Apr 2024 15:54:29 GMT (envelope-from git) Date: Mon, 22 Apr 2024 15:54:29 GMT Message-Id: <202404221554.43MFsTsg041270@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: 7f7b4926a779 - main - ng_hci: Add sockaddr validation to sendto() 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: 7f7b4926a779845116913c85ecbb10527daeab02 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7f7b4926a779845116913c85ecbb10527daeab02 commit 7f7b4926a779845116913c85ecbb10527daeab02 Author: Mark Johnston AuthorDate: 2024-04-22 15:48:00 +0000 Commit: Mark Johnston CommitDate: 2024-04-22 15:48:00 +0000 ng_hci: Add sockaddr validation to sendto() ng_btsocket_hci_raw_send() wasn't verifying that the destination address specified by sendto() is large enough to fill a struct sockaddr_hci. Thus, when copying the socket address into an mbuf, ng_btsocket_hci_raw_send() may read past the end of the input sockaddr while copying. In practice this is effectively harmless since ng_btsocket_hci_raw_output() only uses the address to identify a netgraph node. Reported by: Oliver Sieber MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c index 5d015b2eac6e..b8caf0c515fd 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c @@ -1598,6 +1598,17 @@ ng_btsocket_hci_raw_send(struct socket *so, int flags, struct mbuf *m, goto drop; } + if (sa != NULL) { + if (sa->sa_family != AF_BLUETOOTH) { + error = EAFNOSUPPORT; + goto drop; + } + if (sa->sa_len != sizeof(struct sockaddr_hci)) { + error = EINVAL; + goto drop; + } + } + mtx_lock(&pcb->pcb_mtx); error = ng_btsocket_hci_raw_filter(pcb, m, 0); From nobody Mon Apr 22 16:04: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 4VNVS71yBPz5HN9M; Mon, 22 Apr 2024 16:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNVS71VKsz456x; Mon, 22 Apr 2024 16:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713801863; 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=2vJtOyBGtu0rmVJd+Wc7SXUSsgFvIlhdnGGkN1kaB8E=; b=S5DLW24o+tCgN5o2k1lHT2BZ0NKxFM9hqIF7uB0bwCvJY44aovU8DbGYnK2X5uCp9aqyHg Jfjdp0+BHvws822WgAQKToiF3VU9s9xuMqj0k3xKiyBdC0F4KKIVbyvqNy2oe8KycSdSxW 59bs09KLFdRTWDN5IOInlRspYCcQayb2WWbIcNy0oriYLhJqItKJZukGfkLpR8kbR13Yhg HdLmI1/SjrBqk7fg9xpflYIIr2pt1cVSwKeTUC1YyWZj8Hk7XSNKdEyqHeUxxta/iR22Gl lfl/WnYh0ehKixVNA8IXMOHqXrfhBvpqaN+Sqp0fGgzMlG2whNBmVsdSVwMSrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713801863; a=rsa-sha256; cv=none; b=tfKEn1lW03RKyVTzKkFQ1QRRxM9IxrIz8247OMC+IzYmmq8mAxIDFuC8YompHK/0JYPy+V I7l/dopfavBFrQqj3vdwzshYEo1bzQYL4RJv4mcjQmfIBdm9zafh7b5JxYIvJiiSsyEf+E GwHNc5EVpDujCD8xQk+wn2wnJqnZFB+oouK4uIWSeI0gy6WdfOpQ/Y58+M4CRqISRE/VFB m6HhTaq89Lhu8GGYNbgcEfRKFE2XNHMwM3VWAh7dBtzL8sBcD76F7iK1HVpczJHOVoczyA PguUb66S3r3p4noGhVe9X12Buih/LefD+TGsNl7CwGSwnjdT4cq3e2oVBdAynQ== 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=1713801863; 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=2vJtOyBGtu0rmVJd+Wc7SXUSsgFvIlhdnGGkN1kaB8E=; b=wvWHeTNsyWhMTDZRXI4sIWvaRm4CTKDUyprG7bmxTowSdADJEJgRYDljEAZydcRL4uvxmo 6ngmzR2/5dGPeD7LX2fZd+CjPKpURkBu6Di+qzh8WIKg52zGFGArX3FxPM9eZJE1kFlTMY eFb9vXSCB/Fv/MdXC5fJqf9v0jEe5Ob81DdmmHKXELVWx/x3nrGicTuA80o6H94THFibm4 bbrjaaoHb5S7MAgSKEwF94CawMgoQsa9uE0XhPvrkkgAQXDO2CdPA5kmBqChYDyOtcQ2M2 ol4DnBDpgALZD7si5Evgz4LVWkmRh7eGjza/J/Jk3w1M0glsyPTFUY0IgzatJA== 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 4VNVS715p2zvTZ; Mon, 22 Apr 2024 16:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MG4NI2058935; Mon, 22 Apr 2024 16:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MG4NIT058932; Mon, 22 Apr 2024 16:04:23 GMT (envelope-from git) Date: Mon, 22 Apr 2024 16:04:23 GMT Message-Id: <202404221604.43MG4NIT058932@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: ef84dd8f4926 - main - if_bridge: clean up INET/INET6 handling 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: ef84dd8f4926304306d5989ca9afdbf760c6d813 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ef84dd8f4926304306d5989ca9afdbf760c6d813 commit ef84dd8f4926304306d5989ca9afdbf760c6d813 Author: Lexi Winter AuthorDate: 2024-04-21 18:56:23 +0000 Commit: Mark Johnston CommitDate: 2024-04-22 16:01:27 +0000 if_bridge: clean up INET/INET6 handling The if_bridge contains several instances of: if (AF_INET code ... #ifdef INET6 AF_INET6 code ... #endif ) { ... Clean this up by adding a couple of macros at the top of the file that are conditionally defined based on whether INET and/or INET6 are enabled, which makes the code more readable and easier to maintain. No functional change intended. Reviewed by: zlei, markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1191 --- sys/net/if_bridge.c | 65 +++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 31758733adb1..1b4ac92b62a3 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -134,6 +134,31 @@ #include +/* + * At various points in the code we need to know if we're hooked into the INET + * and/or INET6 pfil. Define some macros to do that based on which IP versions + * are enabled in the kernel. This avoids littering the rest of the code with + * #ifnet INET6 to avoid referencing V_inet6_pfil_head. + */ +#ifdef INET6 +#define PFIL_HOOKED_IN_INET6 PFIL_HOOKED_IN(V_inet6_pfil_head) +#define PFIL_HOOKED_OUT_INET6 PFIL_HOOKED_OUT(V_inet6_pfil_head) +#else +#define PFIL_HOOKED_IN_INET6 false +#define PFIL_HOOKED_OUT_INET6 false +#endif + +#ifdef INET +#define PFIL_HOOKED_IN_INET PFIL_HOOKED_IN(V_inet_pfil_head) +#define PFIL_HOOKED_OUT_INET PFIL_HOOKED_OUT(V_inet_pfil_head) +#else +#define PFIL_HOOKED_IN_INET false +#define PFIL_HOOKED_OUT_INET false +#endif + +#define PFIL_HOOKED_IN_46 (PFIL_HOOKED_IN_INET6 || PFIL_HOOKED_IN_INET) +#define PFIL_HOOKED_OUT_46 (PFIL_HOOKED_OUT_INET6 || PFIL_HOOKED_OUT_INET) + /* * Size of the route hash table. Must be a power of two. */ @@ -2127,11 +2152,7 @@ bridge_dummynet(struct mbuf *m, struct ifnet *ifp) return; } - if (PFIL_HOOKED_OUT(V_inet_pfil_head) -#ifdef INET6 - || PFIL_HOOKED_OUT(V_inet6_pfil_head) -#endif - ) { + if (PFIL_HOOKED_OUT_46) { if (bridge_pfil(&m, sc->sc_ifp, ifp, PFIL_OUT) != 0) return; if (m == NULL) @@ -2429,11 +2450,7 @@ bridge_forward(struct bridge_softc *sc, struct bridge_iflist *sbif, ETHER_BPF_MTAP(ifp, m); /* run the packet filter */ - if (PFIL_HOOKED_IN(V_inet_pfil_head) -#ifdef INET6 - || PFIL_HOOKED_IN(V_inet6_pfil_head) -#endif - ) { + if (PFIL_HOOKED_IN_46) { if (bridge_pfil(&m, ifp, src_if, PFIL_IN) != 0) return; if (m == NULL) @@ -2465,11 +2482,7 @@ bridge_forward(struct bridge_softc *sc, struct bridge_iflist *sbif, dbif->bif_stp.bp_state == BSTP_IFSTATE_DISCARDING) goto drop; - if (PFIL_HOOKED_OUT(V_inet_pfil_head) -#ifdef INET6 - || PFIL_HOOKED_OUT(V_inet6_pfil_head) -#endif - ) { + if (PFIL_HOOKED_OUT_46) { if (bridge_pfil(&m, ifp, dst_if, PFIL_OUT) != 0) return; if (m == NULL) @@ -2626,12 +2639,6 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) #define CARP_CHECK_WE_ARE_SRC(iface) false #endif -#ifdef INET6 -#define PFIL_HOOKED_INET6 PFIL_HOOKED_IN(V_inet6_pfil_head) -#else -#define PFIL_HOOKED_INET6 false -#endif - #ifdef DEV_NETMAP #define GRAB_FOR_NETMAP(ifp, m) do { \ if ((if_getcapenable(ifp) & IFCAP_NETMAP) != 0 && \ @@ -2670,8 +2677,7 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) /* Hand the packet over to netmap if necessary. */ \ GRAB_FOR_NETMAP(bifp, m); \ /* Filter on the physical interface. */ \ - if (V_pfil_local_phys && (PFIL_HOOKED_IN(V_inet_pfil_head) || \ - PFIL_HOOKED_INET6)) { \ + if (V_pfil_local_phys && PFIL_HOOKED_IN_46) { \ if (bridge_pfil(&m, NULL, ifp, \ PFIL_IN) != 0 || m == NULL) { \ return (NULL); \ @@ -2710,7 +2716,6 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) #undef CARP_CHECK_WE_ARE_DST #undef CARP_CHECK_WE_ARE_SRC -#undef PFIL_HOOKED_INET6 #undef GRAB_FOR_NETMAP #undef GRAB_OUR_PACKETS @@ -2765,11 +2770,7 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet *src_if, sbif = bridge_lookup_member_if(sc, src_if); /* Filter on the bridge interface before broadcasting */ - if (runfilt && (PFIL_HOOKED_OUT(V_inet_pfil_head) -#ifdef INET6 - || PFIL_HOOKED_OUT(V_inet6_pfil_head) -#endif - )) { + if (runfilt && PFIL_HOOKED_OUT_46) { if (bridge_pfil(&m, sc->sc_ifp, NULL, PFIL_OUT) != 0) return; if (m == NULL) @@ -2812,11 +2813,7 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet *src_if, * pointer so we do not redundantly filter on the bridge for * each interface we broadcast on. */ - if (runfilt && (PFIL_HOOKED_OUT(V_inet_pfil_head) -#ifdef INET6 - || PFIL_HOOKED_OUT(V_inet6_pfil_head) -#endif - )) { + if (runfilt && PFIL_HOOKED_OUT_46) { if (used == 0) { /* Keep the layer3 header aligned */ i = min(mc->m_pkthdr.len, max_protohdr); From nobody Mon Apr 22 17:06: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 4VNWrY3wT3z5HTgR; Mon, 22 Apr 2024 17:07:09 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp052.goneo.de (smtp052.goneo.de [85.220.129.60]) (using TLSv1.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 4VNWrY1PSxz4J0w; Mon, 22 Apr 2024 17:07:09 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub1.goneo.de (hub1.goneo.de [IPv6:2001:1640:5::8:52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp5.goneo.de (Postfix) with ESMTPS id 4256D240AC2; Mon, 22 Apr 2024 19:07:01 +0200 (CEST) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id 5DFEE24012F; Mon, 22 Apr 2024 19:06:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1713805619; 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=FWrduIrs1CPu8b4lAIC8C+UCgqeuHO3z1TteGaNY8Qk=; b=WAvH2haBMvFER81vDjHIBN5MkbjpEsrZ83ReNRFWml0ZKM9uDUhhVUb0goP+JUaMkOQ7Iy N8zkDEQAqMPTuFAId8iUGe5RLIVjs5A7CVE3EFNSU7VIlW/xCtaL7r4u8bmEcEtP/CwCLW 76+VYFT1u9qElk1/PklvZejXOjeswVbCv5cl3VF60GVmk4a9D/+EolzDQQ7z0XOMjdYlvB ux4BISm1xP2cL9m2YdignH+wmfiYmF/xNzgJKKn3Lh9OYOSV3IfkJSN0dvJk4eMk/xvN26 rKgx+NzfShDra99uOKfqUZdnZR2lVeQI8XmXAQ3ULpjN+p/92OaGgSFFvBoq4g== Received: from thor.intern.walstatt.dynvpn.de (dynamic-089-014-212-179.89.14.pool.telefonica.de [89.14.212.179]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id 160922400D5; Mon, 22 Apr 2024 19:06:59 +0200 (CEST) Date: Mon, 22 Apr 2024 19:06:31 +0200 From: FreeBSD User To: Mark Johnston Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 800da341bc4a - main - thread: Simplify sanitizer integration with thread creation Message-ID: <20240422190658.51b1484e@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202404221554.43MFsR3n041218@gitrepo.freebsd.org> References: <202404221554.43MFsR3n041218@gitrepo.freebsd.org> Organization: walstatt-de.de 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-Transfer-Encoding: 7bit X-Rspamd-UID: c4e74d X-Rspamd-UID: f6e8cb 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:25394, ipnet:85.220.128.0/17, country:DE] X-Rspamd-Queue-Id: 4VNWrY1PSxz4J0w Am Mon, 22 Apr 2024 15:54:27 GMT Mark Johnston schrieb: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=800da341bc4a35f4b4d82d104b130825d9a42ffa > > commit 800da341bc4a35f4b4d82d104b130825d9a42ffa > Author: Mark Johnston > AuthorDate: 2024-04-22 15:43:17 +0000 > Commit: Mark Johnston > CommitDate: 2024-04-22 15:46:59 +0000 > > thread: Simplify sanitizer integration with thread creation > > fork() may allocate a new thread in one of two ways: from UMA, or cached > in a freed proc that was just allocated from UMA. In either case, KASAN > and KMSAN need to initialize some state; in particular they need to > initialize the shadow mapping of the new thread's stack. > > This is done differently between KASAN and KMSAN, which is confusing. > This patch improves things a bit: > - Add a new thread_recycle() function, which moves all kernel stack > handling out of kern_fork.c, since it doesn't really belong there. > - Then, thread_alloc_stack() has only one local caller, so just inline > it. > - Avoid redundant shadow stack initialization: thread_alloc() > initializes the KMSAN shadow stack (via kmsan_thread_alloc()) even > through vm_thread_new() already did that. > - Add kasan_thread_alloc(), for consistency with kmsan_thread_alloc(). > > No functional change intended. > > Reviewed by: khng > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D44891 > --- > sys/kern/kern_fork.c | 17 +++-------------- > sys/kern/kern_thread.c | 20 ++++++++++++-------- > sys/kern/subr_asan.c | 10 ++++++++++ > sys/sys/asan.h | 4 ++++ > sys/sys/proc.h | 2 +- > sys/vm/vm_glue.c | 9 ++++----- > 6 files changed, 34 insertions(+), 28 deletions(-) > > diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c > index d0044dfc19a0..41f6a76c4fa1 100644 > --- a/sys/kern/kern_fork.c > +++ b/sys/kern/kern_fork.c > @@ -40,7 +40,6 @@ > > #include > #include > -#include > #include > #include > #include > @@ -1019,19 +1018,9 @@ fork1(struct thread *td, struct fork_req *fr) > } > proc_linkup(newproc, td2); > } else { > - kmsan_thread_alloc(td2); > - if (td2->td_kstack == 0 || td2->td_kstack_pages != pages) { > - if (td2->td_kstack != 0) > - vm_thread_dispose(td2); > - if (!thread_alloc_stack(td2, pages)) { > - error = ENOMEM; > - goto fail2; > - } > - } else { > - kasan_mark((void *)td2->td_kstack, > - ptoa(td2->td_kstack_pages), > - ptoa(td2->td_kstack_pages), 0); > - } > + error = thread_recycle(td2, pages); > + if (error != 0) > + goto fail2; > } > > if ((flags & RFMEM) == 0) { > diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c > index 0bcd5c2f2add..725791769ac3 100644 > --- a/sys/kern/kern_thread.c > +++ b/sys/kern/kern_thread.c > @@ -798,6 +798,7 @@ thread_alloc(int pages) > } > td->td_tid = tid; > bzero(&td->td_sa.args, sizeof(td->td_sa.args)); > + kasan_thread_alloc(td); > kmsan_thread_alloc(td); > cpu_thread_alloc(td); > EVENTHANDLER_DIRECT_INVOKE(thread_ctor, td); > @@ -805,15 +806,18 @@ thread_alloc(int pages) > } > > int > -thread_alloc_stack(struct thread *td, int pages) > +thread_recycle(struct thread *td, int pages) > { > - > - KASSERT(td->td_kstack == 0, > - ("thread_alloc_stack called on a thread with kstack")); > - if (!vm_thread_new(td, pages)) > - return (0); > - cpu_thread_alloc(td); > - return (1); > + if (td->td_kstack == 0 || td->td_kstack_pages != pages) { > + if (td->td_kstack != 0) > + vm_thread_dispose(td); > + if (!vm_thread_new(td, pages)) > + return (ENOMEM); > + cpu_thread_alloc(td); > + } > + kasan_thread_alloc(td); > + kmsan_thread_alloc(td); > + return (0); > } > > /* > diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c > index c3664d9cf6c2..75d9e75c531a 100644 > --- a/sys/kern/subr_asan.c > +++ b/sys/kern/subr_asan.c > @@ -39,6 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.26 2020/09/10 14:10:46 maxv > Exp $"); #include > #include > #include > +#include > #include > #include > > @@ -294,6 +295,15 @@ kasan_mark(const void *addr, size_t size, size_t redzsize, uint8_t code) > } > } > > +void > +kasan_thread_alloc(struct thread *td) > +{ > + if (td->td_kstack != 0) { > + kasan_mark((void *)td->td_kstack, ptoa(td->td_kstack_pages), > + ptoa(td->td_kstack_pages), 0); > + } > +} > + > /* -------------------------------------------------------------------------- */ > > #define ADDR_CROSSES_SCALE_BOUNDARY(addr, size) \ > diff --git a/sys/sys/asan.h b/sys/sys/asan.h > index a3becdef5f57..6a01d0531725 100644 > --- a/sys/sys/asan.h > +++ b/sys/sys/asan.h > @@ -53,14 +53,18 @@ > #define KASAN_KSTACK_FREED 0xFE > #define KASAN_EXEC_ARGS_FREED 0xFF > > +struct thread; > + > void kasan_init(void); > void kasan_init_early(vm_offset_t, size_t); > void kasan_shadow_map(vm_offset_t, size_t); > void kasan_mark(const void *, size_t, size_t, uint8_t); > +void kasan_thread_alloc(struct thread *); > #else /* KASAN */ > #define kasan_init() > #define kasan_shadow_map(a, s) > #define kasan_mark(p, s, l, c) > +#define kasan_thread_alloc(t) > #endif /* !KASAN */ > > #endif /* !_SYS_ASAN_H_ */ > diff --git a/sys/sys/proc.h b/sys/sys/proc.h > index 33b836f4150e..1b542d1374b4 100644 > --- a/sys/sys/proc.h > +++ b/sys/sys/proc.h > @@ -1262,7 +1262,6 @@ void cpu_thread_free(struct thread *); > void cpu_thread_swapin(struct thread *); > void cpu_thread_swapout(struct thread *); > struct thread *thread_alloc(int pages); > -int thread_alloc_stack(struct thread *, int pages); > int thread_check_susp(struct thread *td, bool sleep); > void thread_cow_get_proc(struct thread *newtd, struct proc *p); > void thread_cow_get(struct thread *newtd, struct thread *td); > @@ -1275,6 +1274,7 @@ void thread_exit(void) __dead2; > void thread_free(struct thread *td); > void thread_link(struct thread *td, struct proc *p); > void thread_reap_barrier(void); > +int thread_recycle(struct thread *, int pages); > int thread_single(struct proc *p, int how); > void thread_single_end(struct proc *p, int how); > void thread_stash(struct thread *td); > diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c > index 4292a7533503..f9235fe03fab 100644 > --- a/sys/vm/vm_glue.c > +++ b/sys/vm/vm_glue.c > @@ -543,8 +543,6 @@ vm_thread_new(struct thread *td, int pages) > td->td_kstack = ks; > td->td_kstack_pages = pages; > td->td_kstack_domain = ks_domain; > - kasan_mark((void *)ks, ptoa(pages), ptoa(pages), 0); > - kmsan_mark((void *)ks, ptoa(pages), KMSAN_STATE_UNINIT); > return (1); > } > > @@ -562,11 +560,12 @@ vm_thread_dispose(struct thread *td) > td->td_kstack = 0; > td->td_kstack_pages = 0; > td->td_kstack_domain = MAXMEMDOM; > - kasan_mark((void *)ks, 0, ptoa(pages), KASAN_KSTACK_FREED); > - if (pages == kstack_pages) > + if (pages == kstack_pages) { > + kasan_mark((void *)ks, 0, ptoa(pages), KASAN_KSTACK_FREED); > uma_zfree(kstack_cache, (void *)ks); > - else > + } else { > vm_thread_stack_dispose(ks, pages); > + } > } > > /* > It seems to me that this commit breaks make buildkernel: [...] ===> accf_dns (all) --- kern_thread.o --- /usr/src/sys/kern/kern_thread.c:801:2: error: call to undeclared function 'kasan_thread_alloc'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 801 | kasan_thread_alloc(td); | ^ /usr/src/sys/kern/kern_thread.c:818:2: error: call to undeclared function 'kasan_thread_alloc'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] --- modules-all --- --- all_subdir_accf_http --- ===> accf_http (all) --- kern_thread.o --- 818 | kasan_thread_alloc(td); | ^ 2 errors generated. Kind regards, oh -- O. Hartmann From nobody Mon Apr 22 17:11: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 4VNWxP3Xk3z5HV4N; Mon, 22 Apr 2024 17:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNWxP2Y9Nz4Kmg; Mon, 22 Apr 2024 17:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713805881; 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=B5xKECDSIat5hjxQwvDbhzyl5OIhtjEzMfRRMEila/w=; b=BOEJD6Ocrs0iTQc/qS+udXv8rqW1P4gGitZ6Ors+lXxeiaIXzfCmtQjvaKpNJ3NYESUa8t v4uHL34aM0HPEAr2ZqZIglbvwrmlI6Uh9lmOaT1OdjNwr8JTHCg0UK8oiBg/IIGKwEGq6m +IRRqhFYSliqxqqIpdx2fCy0uXZrpUZpXeYkqx2o1JBKV0Q2pa837VBjwvAfPAwnF167XX on2TJ91hBubTNCeQMtQe43K3Aowfznz5211c3EOv7207OFCrZKla/QDRrOyJ5C65OC+Yt/ YegKd6n+9tDtPk8LKmeZEzW4TCpg6avFs6mN8lXgFuye2noOBJWeJ3vn9YDHpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713805881; a=rsa-sha256; cv=none; b=CPOkjLYoVTx6cTkUP635xSI3Jf3R73VL+bVgJFqik0OMROovmjlj2e4bB9i9rHdv5WrOdO OjL/SHeMC1EbVs3x8uDipf9Br1m1mf6zEJBy4hnBTqIcXNp/QPJjMvRJ1g4aL4uSWXrsDO OiVWxKo81NcZpXp+WW9mbQiyRviYFl9rb1yxJs/97d69yqxnlkzLIndt8DP1+VI5IEktv5 VFtpNm3CzQDaEnId86Jw8FwS2YRi0HisGFsiDqCBaqyFQUjruGNFn1g8DtY67JghgVZbz2 wyzs5ut5wiLZ6Be/PhmeuEVyLZvJPWodjnKfLBTJQG8+lpZ4sTa96xhwf9P24w== 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=1713805881; 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=B5xKECDSIat5hjxQwvDbhzyl5OIhtjEzMfRRMEila/w=; b=q1TkP0IQacJWnq1df0eSxxyM1GHR0UySWvEbc3T7z+TwCnnPWKNambgHNkK6OwQg1YUOF5 gChgXSFZShcsAEzdDQ6wmJSjiMqQ+UJX7dVYOX4Zkuus9GDVrqfiCyMixcW/UpAF0XWVlo dQOvuGP/f8QrzHhZJ4zVoyqAZqrOPPeFEoQfVdM0j2A6AGTWBiaMbcECcyyrtICcfW4VFC fYVi/RfBgxl8h2gsBNH92kCnQBadnlYQFee06nSGHZRh6i8PfwUdY/q2QnEA/B25FrfKkx 3o2/pSf31XSOZWow7hBsC3fynxTBdk320qo+4A1FwyT08/bmGJOBC+4MsnBSsA== 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 4VNWxP1sCzzwV3; Mon, 22 Apr 2024 17:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MHBLxL071590; Mon, 22 Apr 2024 17:11:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MHBLiM071587; Mon, 22 Apr 2024 17:11:21 GMT (envelope-from git) Date: Mon, 22 Apr 2024 17:11:21 GMT Message-Id: <202404221711.43MHBLiM071587@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: 7a7063cc5427 - main - thread: Add a missing include of asan.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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a7063cc54274a44192fb65c71360a5e72c171b9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7a7063cc54274a44192fb65c71360a5e72c171b9 commit 7a7063cc54274a44192fb65c71360a5e72c171b9 Author: Mark Johnston AuthorDate: 2024-04-22 17:07:53 +0000 Commit: Mark Johnston CommitDate: 2024-04-22 17:07:53 +0000 thread: Add a missing include of asan.h I didn't notice this during testing because invariants-enabled kernels implicitly include asan.h via kassert.h. Reported by: Lexi Winter Fixes: 800da341bc4a ("thread: Simplify sanitizer integration with thread creation") --- sys/kern/kern_thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 725791769ac3..4a9d1bc8a042 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include From nobody Mon Apr 22 17:12: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 4VNWyW2wGyz5HV21; Mon, 22 Apr 2024 17:12:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNWyW1F2qz4MBK; Mon, 22 Apr 2024 17:12:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-69b6d36b71cso21970396d6.3; Mon, 22 Apr 2024 10:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713805938; x=1714410738; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=uaRFLJeJ/Z765Kr+dCoO7X7cQZB9Y2UKiDtFJJSfPKM=; b=k8/ExoeniU2AD/kmQ8nidqWnfhpCbMGM2iU9rmSbu0JgFtd73f8s36CSILqPznHjBy yKwGxu9dxba4EyFYpq0PPKcFygPw7+ch09YIkXBCd8cWEao159FO/NBR4K/5BH3l45md axGSepB1el/cWWP8LryyJpoYGLx8UywNnfcVqRPwjjx67OVKl0QV2sC0g3BUyscbvnQ9 f4PJFJfBvhR3IRff344zcqSR5qn4/onx3QCzkfHlt3r+w6OkIfupLCQu94vow0gxIjhQ sQsIyY1o/vRshAIXtvqfOyk903aUJ/NjnsLQyTDUyETrH126rFGQZyvb5Hq2aKvdm55t XHkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713805938; x=1714410738; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uaRFLJeJ/Z765Kr+dCoO7X7cQZB9Y2UKiDtFJJSfPKM=; b=maZ/Q8cdUrx1R6HScoiot0JJpCnJnV46Rt7xHtXc5QU9OAkRZSku6NG9jaU6J5SYfX dFGxJ0Y+jIWWi087YidUqnd+LJC+aaa/+83aG4Jhv6mqylMZMHBIBv8nE0ICCqypvl5X oRMkQ7u47yaS4FXXLJW3DUw1iaN8UA2eupDKG8Siw4vXcj/9JxfHzKxOcrPNrDzUAR83 fvuPlHBcpzlcCEVVDGhJYzgHYlYbvzUTiCfnhNQTCfZ5sOO+BakTpmsvhoFt7pCbG5UK mxiIhDXTWubpRxXE/tXaX5U4onYvtgQtkND6P7FVSAl2issFo3CCz2XVClsUC6VV3p9b 0kHw== X-Forwarded-Encrypted: i=1; AJvYcCW9tXzRd5NFYoVuxa8Zwq6Pn07SftsB6eD4KycaxoTYmeqdn7liSJ7k3R3rChzs4z7LIPouzCgNJy+aOakI5+y64ap23XDJM8fVOpJlZS28qpQogF/N2O2kO18dTP3nZhfuMuvWzFaTjo1T4gVIGFJ8Xg== X-Gm-Message-State: AOJu0Yxo4lKpL+vYUFcrqIESslzp2nuFyHYZScP9G9+fvGVgoCRhWYNn r6YS/5C4dxv8qIe/1XBNTb7fIHmglM9JiTT/8ly2B/NevihiuZxjIa13KQ== X-Google-Smtp-Source: AGHT+IGSfs/Ou2KoVbyYH/eWdWpLfRHt1OIXNrp/g1K1uXRGipsIU/0vBeGfWoQvzXGRE2JoYepVZg== X-Received: by 2002:a05:6214:424b:b0:6a0:6bf1:446f with SMTP id ne11-20020a056214424b00b006a06bf1446fmr7072033qvb.48.1713805937992; Mon, 22 Apr 2024 10:12:17 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id u5-20020a0c8dc5000000b0069b412e3716sm3357586qvb.80.2024.04.22.10.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 10:12:17 -0700 (PDT) Date: Mon, 22 Apr 2024 13:12:14 -0400 From: Mark Johnston To: FreeBSD User Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 800da341bc4a - main - thread: Simplify sanitizer integration with thread creation Message-ID: References: <202404221554.43MFsR3n041218@gitrepo.freebsd.org> <20240422190658.51b1484e@thor.intern.walstatt.dynvpn.de> 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: <20240422190658.51b1484e@thor.intern.walstatt.dynvpn.de> 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: 4VNWyW1F2qz4MBK On Mon, Apr 22, 2024 at 07:06:31PM +0200, FreeBSD User wrote: > Am Mon, 22 Apr 2024 15:54:27 GMT > Mark Johnston schrieb: > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=800da341bc4a35f4b4d82d104b130825d9a42ffa > > > > commit 800da341bc4a35f4b4d82d104b130825d9a42ffa > > Author: Mark Johnston > > AuthorDate: 2024-04-22 15:43:17 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-04-22 15:46:59 +0000 > > > > thread: Simplify sanitizer integration with thread creation > > > > fork() may allocate a new thread in one of two ways: from UMA, or cached > > in a freed proc that was just allocated from UMA. In either case, KASAN > > and KMSAN need to initialize some state; in particular they need to > > initialize the shadow mapping of the new thread's stack. > > > > This is done differently between KASAN and KMSAN, which is confusing. > > This patch improves things a bit: > > - Add a new thread_recycle() function, which moves all kernel stack > > handling out of kern_fork.c, since it doesn't really belong there. > > - Then, thread_alloc_stack() has only one local caller, so just inline > > it. > > - Avoid redundant shadow stack initialization: thread_alloc() > > initializes the KMSAN shadow stack (via kmsan_thread_alloc()) even > > through vm_thread_new() already did that. > > - Add kasan_thread_alloc(), for consistency with kmsan_thread_alloc(). > > > > No functional change intended. > > > > Reviewed by: khng > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D44891 > > [...] > It seems to me that this commit breaks make buildkernel: > > [...] > ===> accf_dns (all) > --- kern_thread.o --- > /usr/src/sys/kern/kern_thread.c:801:2: error: call to undeclared function > 'kasan_thread_alloc'; ISO C99 and later do not support implicit function declarations > [-Werror,-Wimplicit-function-declaration] 801 | kasan_thread_alloc(td); | ^ > /usr/src/sys/kern/kern_thread.c:818:2: error: call to undeclared function > 'kasan_thread_alloc'; ISO C99 and later do not support implicit function declarations > [-Werror,-Wimplicit-function-declaration] --- modules-all --- --- all_subdir_accf_http --- > ===> accf_http (all) > --- kern_thread.o --- > 818 | kasan_thread_alloc(td); > | ^ > 2 errors generated. I've just pushed a commit to fix this. From nobody Mon Apr 22 17:58: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 4VNXzf5dxHz5HZ5s; Mon, 22 Apr 2024 17:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNXzf55T9z4Tj6; Mon, 22 Apr 2024 17:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713808702; 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=3ZWNIGotzh1j7kCtLLXQ9TBSJdsS/Fxa8OVQVkHRM4o=; b=eHhRvRovtdUVdLFKAhSkb+v0pxbKk32756IzhVpZoifmptI5sEPezjNGmuEd8dvoFL7zEO DIZvdOAH9+LygdvUQ2EdGmrg3Co78Dh2q2kiKaGOYVHUqHVCF4UyKV2kJ79TkIVjSOprWN cvXqWs/eCjoprWh+8GaEh5Datp4UbFVtrwdY1a14+cwiL+FmzNEWn5AVMZ16kwzprsRFIa HSucYgoTK7UPZ/CRSfw5pWjzjbShgio2TYQHudsVeYvGt0WmW6Z+bgsqdkZPffBBI53M9b oEx0gkkyzTWXv9ItFTd2xQPsV8WRGDHG7STEy00Bzbik2FMjATGndkFydBC3mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713808702; a=rsa-sha256; cv=none; b=MhHCxt6ALearcBzkoidkSFxRNXsUO/g1dMO+yJf8cZqFAjylZ4WaCOyGZqXIbI1mNsnPRW ITTE6oraiUjdjgoxEtwQrShfg4KSMtqQOKu0UKf+ZOJUoJDidzvmSP+U2Qk3hfdIg5o3pF 6kxMjqrAn1X3lBypFPNJ41agBGZcq2BIpiZ00ZIYjTNTC/fupphPUee/XCvT/+LSYURJA+ +Kj1mffZ/QaMFNO9KmjtPgj5J5tIJrbS9vQcy/rd8zI2RG+oOvEh0zmo/8+zPpexs8a53R P8OQYMmQT9w03E52g0Z7hmbd5d533w6KBKSHM4pox4L0kATM1XoBnZV/q4OLhg== 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=1713808702; 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=3ZWNIGotzh1j7kCtLLXQ9TBSJdsS/Fxa8OVQVkHRM4o=; b=hmnxxr7MvynKaP+DSA/v8P/ot5Q2C7DfPpKBbikv9mdy03r6cpWMDXdjTqKGuglZzKWcT3 K+DBKPiGWM0aT0dtJ0AaIy1coUjsyoUAW9ziy0Bs5vPy8gZFjTQAKWpNixpnDxlrXNQ9+Y TOy+pgaec6u1mkUnIb5E6NOuce4QnZVD5nzswGorr/hUxPRsKZ4yFSmoHnPpIL0iZ5PWxS owF0Qj9NFZBZtzL+K2vG4uqkfjHJBKGagX7gtiZ/8tFeDkzgDz0rnMcpOTJ2u1CjNb/CGB RJiHd/bti6Gv6IkgorOq3YAicVjTqxJexLhIKl/frWTZTKVtaRYwsJmIFg133w== 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 4VNXzf4ZrXzxxg; Mon, 22 Apr 2024 17:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MHwMa6045290; Mon, 22 Apr 2024 17:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MHwM0T045287; Mon, 22 Apr 2024 17:58:22 GMT (envelope-from git) Date: Mon, 22 Apr 2024 17:58:22 GMT Message-Id: <202404221758.43MHwM0T045287@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: 76a8625bc71d - main - mfc-candidates: use stable/14 as default MFC-to branch 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: 76a8625bc71da3fa63eef5abb4782553d2588f5c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=76a8625bc71da3fa63eef5abb4782553d2588f5c commit 76a8625bc71da3fa63eef5abb4782553d2588f5c Author: Ed Maste AuthorDate: 2024-04-22 17:54:52 +0000 Commit: Ed Maste CommitDate: 2024-04-22 17:57:17 +0000 mfc-candidates: use stable/14 as default MFC-to branch This tool is typically invoked from within a working tree containing the desired MFC target branch, which is detected automatically. It also has a default for when it is invoked from elsewhere. Switch the default to the most recent branch, stable/14. Sponsored by: The FreeBSD Foundation --- tools/tools/git/mfc-candidates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/mfc-candidates.sh b/tools/tools/git/mfc-candidates.sh index cf71c314cb95..c232a1ad3345 100644 --- a/tools/tools/git/mfc-candidates.sh +++ b/tools/tools/git/mfc-candidates.sh @@ -41,7 +41,7 @@ if [ "${repo}" = "ports.git" ]; then qtr=$(((month-1) / 3 + 1)) to_branch="freebsd/${year}Q${qtr}" elif [ "${repo}" = "src.git" ]; then - to_branch=freebsd/stable/13 + to_branch=freebsd/stable/14 # If pwd is a stable or release branch tree, default to it. cur_branch=$(git symbolic-ref --short HEAD 2>/dev/null) case $cur_branch in From nobody Mon Apr 22 18:49: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 4VNZ745MhLz5Hfl5; Mon, 22 Apr 2024 18:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNZ744r7vz4bNB; Mon, 22 Apr 2024 18:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713811792; 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=jgw49yU5twjNCKG8ZDFa0eRw+r7baVOfm3SPt67TiQU=; b=wZi8j8mUv5pjdCWOJSCsqV0n1KsovlG4iVl+oljmjQ5Kd6Hm7i7irOi2GEKSPhc/WSdk3l /QTyHRXdw++PXQXNhycOyupLvVYak+v2bhtRiZ5le+Zveuor9cQOJ2MXJtK/v3NY2jP0vD v8cNf7e2zHmHKCKbgyiddI/BUdOZJJ9KFqQHS5ctg2CMmqZC8iLjOd4N+Th78nYbu8u+wN luE2ZqsDgAm8/b7pJX6A6htY8jgsw76JfQ10Fltq9r7OC+UTHY7N1Oqlemkowsdqq3lFSe 0pPXUdVIj/O77PXGjXYEaEG/17wHpIElz0G+HY4CM1uG9PYWbiFGThJYAEvW6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713811792; a=rsa-sha256; cv=none; b=y0WjczjAZflA+stGayjTcFMiHlA8kNbSs3xdZTSHKBbR/1FQa9YAWJVRg3dlz25ahYTyWc 7aX69xM4uDLCfDdgOO1UcSjpFtibBZWZcd+FLuUGEuFCP2JEQf0hjgn2ydb0ZWRy1yC3SS /3yoT3+WHx2TH+tF8Z6OIupNf0mOHB+4e+Mm0HN1CPLbf/gvYzu3gXNajGZMyydoIwjBvt s47H1Gsnj0wOiD4sxhB2frFkHk7R3/mivtMzCXlxLz7JGXWa1j8nxtlwdBOHOxmovbkUC1 00YJFt2atRLTwpUDKkZWt9k6pm8Uhe9Y8VyrvuoY/2EjcnM76u9s0xw+pcW6bg== 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=1713811792; 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=jgw49yU5twjNCKG8ZDFa0eRw+r7baVOfm3SPt67TiQU=; b=K6QKGUDGgPCztcpdLPAexcmAOyyUmpO70iGRkn40rWJOUO3PL8L/32aPwqdRyawFkc+Sng basN3TRoFa3GJznaoBSvf1ynT6URLYMl4LqzhKIrdyLsHOIdU6sqmZlDqSO6Kp88NAmRUB Im298Gh1vele/tcFq9MlW8iFAlgaWHEiaQZOofeUQA6qWWnw3V4tzqHOSb/h6ZYuPiQ/xr thZaSAEL0Iz2Xu5UoBAIb8S/6jZfRx/AzW8EjnBwtnnygo9+m6kFr9r19gDU0iXveEW4dd CTDRkGeHDT327rByReOK0c+G+ibcK98AYCvbXdVmUYvMr06RGFumk1I2Y7JNpA== 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 4VNZ744RWYz10Zl; Mon, 22 Apr 2024 18:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MInq76030940; Mon, 22 Apr 2024 18:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MInqCP030937; Mon, 22 Apr 2024 18:49:52 GMT (envelope-from git) Date: Mon, 22 Apr 2024 18:49:52 GMT Message-Id: <202404221849.43MInqCP030937@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: 911a6479e18b - main - libcxxrt: define SHLIBDIR before including bsd.own.mk 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: 911a6479e18bcaa7010c7328f491ea338c5f381c Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=911a6479e18bcaa7010c7328f491ea338c5f381c commit 911a6479e18bcaa7010c7328f491ea338c5f381c Author: Dimitry Andric AuthorDate: 2024-04-22 18:43:27 +0000 Commit: Dimitry Andric CommitDate: 2024-04-22 18:46:45 +0000 libcxxrt: define SHLIBDIR before including bsd.own.mk Otherwise bsd.own.mk overrides it, causing libcxxrt.so.1 to be erroneously installed into /usr/lib. Also add an ObsoleteFiles.inc entry, for removing the bad copy. Reported by: Josef 'Jeff' Sipek Fixes: da77a1b4f0df --- ObsoleteFiles.inc | 3 +++ lib/libcxxrt/Makefile | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 8a9cf20beef5..a4301ebdab41 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240422: remove improperly installed libcxxrt.so.1 +OLD_LIBS+=usr/lib/libcxxrt.so.1 + # 20240414: unix_socketpair_test renamed OLD_FILES+=usr/tests/sys/kern/unix_socketpair_test diff --git a/lib/libcxxrt/Makefile b/lib/libcxxrt/Makefile index 57f41e9bf59b..afae306e7bbe 100644 --- a/lib/libcxxrt/Makefile +++ b/lib/libcxxrt/Makefile @@ -1,10 +1,11 @@ +SHLIBDIR?= /lib + .include PACKAGE= clibs SRCDIR= ${SRCTOP}/contrib/libcxxrt SHLIB_MAJOR= 1 -SHLIBDIR?= /lib .PATH: ${SRCDIR} From nobody Mon Apr 22 19:09: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 4VNZYg3Yr5z5HhgB; Mon, 22 Apr 2024 19:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNZYg1cTVz4dv4; Mon, 22 Apr 2024 19:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713812967; 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=+z5i5vXHKltlbnxyiFNktYbpVJIIHLgLCEtoaOQTGbc=; b=tsV8ddW2s3YMutMhWhVsr9d6P+ng6J13Xv03urB9mD8IOII/1D8olme5n6pxKu/bKuX96h N6VQl8TmHskQ3hy7nHUTBK0Imy7pFdFvvdmtqprjNc8hs8xSHA39w/CFjM8Px0vwChT8g9 Wy7gE9N8glKSS1YdMMucpu64uWPN4jxP+kXZm9Rf8nYr0JpwKmpDffqz6t3Yp69uwMAm0x CLQCtAGcB12r+ftIVjVG+2ohNWt+pj/nXxv8ZGeMtWsI14yWIEIdQ6yg3X4yLxZ7vrRdDO ZF6G1KwEne3NMz3PBgilJO8gqcmUQ16YSSswRjphkQyGAUYMyaZAT1vQNaXgcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713812967; a=rsa-sha256; cv=none; b=LJUlONZqclm738RyRPkL/21+kuhyFLpcyV2XUWk41jCA14oQkHWWQSpr8NoC06OrbsHaUc uGWxDUShQHE3S960ET3KB1FmVhdpgkJ9S9WctBXUcqYxS4Gg0p2Dvu/cNbsNmayduaDZ9z wY1u5HRDg9PB36g5pb8ZwQP8Fk9jHB8bVLKMLeFdWygj6gGnSBWUWV91QBnZNHuPUA2pFX +wti5JSv3nQZ1iJ3PW6DZHfy9mXI91h7AzF9jLPyUSoEC9n8oBzm8+rfQsfWICQDWx5tdk kdZz04WXpNm3PUFRAEJjyfHpXXsOyz/yXXM+Mx18ph2PXsVdBY5u7lP/3H2MXA== 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=1713812967; 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=+z5i5vXHKltlbnxyiFNktYbpVJIIHLgLCEtoaOQTGbc=; b=XAEMFtvnhq8fnFOs9dCZ274N7gOVv/sNaKX2SC4B5DJl9rNjarI5lTzbFH9vhdqrf3b8k3 iMsAG2nCF58zBy+HoEWU4LNNLIN11tUoQ92QuzEFm39AjkMAxQpu/JHSSU54BqImKOuXKG Sc0Rs9MRsV58bOl6rZeukYRZO5AiVhW7wODob/9cRkja0U5ixmXB2cgBqVuvmwluxjrBSh FI7l60JHWqG2gNmC6KQXptiaXuZOKHlip/sSVYAfy0jog7/Vsc0hCycvFpsaM70ZjLqiEV dvs3ss7BYRWIhzlEp0cHDaxmXosJlR/hAbpRl3ooUkFk15QEO9/s7ztAji97Sg== 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 4VNZYg1DXgz10nQ; Mon, 22 Apr 2024 19:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MJ9ROQ065849; Mon, 22 Apr 2024 19:09:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MJ9RY4065846; Mon, 22 Apr 2024 19:09:27 GMT (envelope-from git) Date: Mon, 22 Apr 2024 19:09:27 GMT Message-Id: <202404221909.43MJ9RY4065846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: 5cafc38f1129 - main - adduser: Fix a syntax error 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5cafc38f11297cb302514f3cedb703a3ed199a22 Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=5cafc38f11297cb302514f3cedb703a3ed199a22 commit 5cafc38f11297cb302514f3cedb703a3ed199a22 Author: Joseph Mingrone AuthorDate: 2024-04-22 19:04:13 +0000 Commit: Joseph Mingrone CommitDate: 2024-04-22 19:06:38 +0000 adduser: Fix a syntax error Reported by: Jose Luis Duran Fixes: b37333899bd2 MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44871 --- usr.sbin/adduser/adduser.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh index d1c9e12098f7..9739b2e589fa 100644 --- a/usr.sbin/adduser/adduser.sh +++ b/usr.sbin/adduser/adduser.sh @@ -477,8 +477,7 @@ get_zfs_home() { # check if zfs kernel module is loaded before attempting to run zfs to # prevent loading the kernel module on systems that don't use ZFS - if ! "$KLDSTATCMD" -q -m zfs || - Zcreate="no" + if ! "$KLDSTATCMD" -q -m zfs || Zcreate="no"; then return fi if ! _prefix=$(${ZFSCMD} list -Ho name "${homeprefix}" 2>/dev/null) || From nobody Mon Apr 22 19:20: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 4VNZpq66Yhz5HjlN; Mon, 22 Apr 2024 19:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNZpq5B8Gz4hTr; Mon, 22 Apr 2024 19:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713813651; 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=Oy7GmpKHVv/WZjtrAs9yKa91Noka2RbEsEee6T6o7kc=; b=QNisBhG8aIT511sUcu7C8GVeNTg79YgTQCG+SNs00auKluJm1H0/TJtILtsisdLwvhKv2n JyTD6wejqYEvpzZk+eeYQzlH3Ws5Bf4WlTk0S2FBq1EAmHJpBaH7IIk3rt5+LXcolO72qL LALGvgRs0kU1JE0Qav94dAXBJ7wyzr/yvaNp+qG+yzUbu6Ivh81Dq3HD17y0I0ThRTPtaS BQA8iO65V9kUZM1MLEMukNGO+x7P/hzZ6/vEg/qN11oExwdEkdIinejrlEyDuN0NsvBJDs lhGxIga1A9VvWlS+XYToFw6WHeOyNwU4ppSF0+/+3tfG5lvY1QGkkZB/y0UmuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713813651; a=rsa-sha256; cv=none; b=Z7MFgtjZmf+oYhA9gcTPioPSrmJZPkLCKM9IECq8ym5YHRJdUry8Cp2sXdHu7UXRFxThWU szgwcqKTczh7WRptpiqy0RA7cn6CUhDVsXQmcE6oHGw6peJ8etL8urRiLR9CZTO4TVMhDn Q6P9YQNyXi9/88sdptVjf00Wc8xRH1UmEWcjR5ArYOPNXx51NgshmxCUA31Ltx89E77NEf bILKBPZWBzLXdrZc8bvoed0GeiHTbJTjGIrr5EiYgKrGgfe6vZjpqD90luqPzIfsI1caZZ hS9DM2A6VkhXXi9nGBu9ulFU95VEhvYaO9BwjPuKUhgOKfl/8g7tVSqewiZhlA== 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=1713813651; 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=Oy7GmpKHVv/WZjtrAs9yKa91Noka2RbEsEee6T6o7kc=; b=rmHANTy3KcutYI7VmosR18A/37dpUebnCZ5ys88PwSKqvYIuHkjOoaxRY779WloBxYt6YN +8ij7UahTaxAv1K4XU6oWp0SQ6q4s4gLUx2ujfHzxdicfPU+skOzXfvHZvRkRTN3Mt4MBL Df25BU5X+DO97DP5MueEy6UdrVaOEJ/FbNfpX5ULjIZ/gIJNAC15/3OBbDKd+OWYhR/p23 fk4wiFs/QN52F5caSGQ11An/UCUwFbRNQWpqODi5ErFiUDdXzjTl6IjLZ54kx3A5PYzvkO RGtTNyj4F5oOfW4Z4SsqJ1IxurVDDtUkmpfD0ZBko5V4OhJR1B4OsEIWgHpFrQ== 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 4VNZpq4nlmz11P6; Mon, 22 Apr 2024 19:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MJKp9e091165; Mon, 22 Apr 2024 19:20:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MJKpTZ091162; Mon, 22 Apr 2024 19:20:51 GMT (envelope-from git) Date: Mon, 22 Apr 2024 19:20:51 GMT Message-Id: <202404221920.43MJKpTZ091162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 3acf3feaa8c5 - main - geli: add a read-only kern.geom.eli.use_uma_bytes 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3acf3feaa8c5b15e820e86c1526c9a97fc5ad247 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=3acf3feaa8c5b15e820e86c1526c9a97fc5ad247 commit 3acf3feaa8c5b15e820e86c1526c9a97fc5ad247 Author: Alan Somers AuthorDate: 2024-04-22 18:03:40 +0000 Commit: Alan Somers CommitDate: 2024-04-22 19:20:03 +0000 geli: add a read-only kern.geom.eli.use_uma_bytes sysctl It reports the value of the g_eli_alloc_sz variable. Allocations of this size or less will use UMA. Larger allocations will use malloc. Since malloc is slower, it is useful for users to know this variable so they can avoid such allocations. For example, ZFS users can set vfs.zfs.vdev.aggregation_limit to this value. MFC after: 1 week Sponsored by: Axcient Reviewed by: markj, imp Differential Revision: https://reviews.freebsd.org/D44904 --- sys/geom/eli/g_eli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index 2bcd61f45640..5d769d606d20 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -100,11 +100,13 @@ SYSCTL_BOOL(_kern_geom_eli, OID_AUTO, blocking_malloc, CTLFLAG_RWTUN, static bool g_eli_unmapped_io = true; SYSCTL_BOOL(_kern_geom_eli, OID_AUTO, unmapped_io, CTLFLAG_RDTUN, &g_eli_unmapped_io, 0, "Enable support for unmapped I/O"); +static int g_eli_alloc_sz; +SYSCTL_UINT(_kern_geom_eli, OID_AUTO, use_uma_bytes, CTLFLAG_RD, + &g_eli_alloc_sz, 0, "Use uma(9) for allocations of this size or smaller."); static struct sx g_eli_umalock; /* Controls changes to UMA zone. */ SX_SYSINIT(g_eli_umalock, &g_eli_umalock, "GELI UMA"); static uma_zone_t g_eli_uma = NULL; -static int g_eli_alloc_sz; static volatile int g_eli_umaoutstanding; static volatile int g_eli_devs; From nobody Mon Apr 22 20:29: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 4VNcKh1JrLz5Hqhv; Mon, 22 Apr 2024 20:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNcKh0lkRz4wmL; Mon, 22 Apr 2024 20:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713817752; 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=sypu2JfLx+ZIpFOqUgGWuKeS5gUgKpbGeo/O0+Mp7as=; b=Vviv0fltW7NYNPnMj3yKPywqzxkZ0tq/6Xez8Z2sUlKKewU37Q7IE5RaaoZhfByNTW1/SN jlboZ2LVWOpxW1hP1DiuPC7N+i961DuTHg6ih/GjQHxHdprGXnX8kDGbq5Mx2V5kNwW5NS hKT73ztZZCdSvTR4HCbFHO4etsZ0t3kvmNq861wICW97cEaMlsjax2jN5uqzyKrJDkSDsS N/OEHhCeVI3aHRDszu/LV6FOacZia5VgizJogcUmvwuSYfbe3xB9KJIMgoyNY9E4ImPIRU x7FDR85k0ahhu/appUakg87xtzilffytVkQ9VYv3TgVwInEyR0KsIykZZgongA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713817752; a=rsa-sha256; cv=none; b=gGTADiNfzF3wjw8gp6uPBv4ObluObF1+HNqmFCwsLLuO29tE3EPLyqIVEGn7/Pbax+RXeI hFsShiJ6bHNRPB5myTdyP2CMb614LZLB568fbqfSmtXF+jrVuR2xp5tp8lUhvK6Kaq5a+U K9Y0t0YWAgvqgJmoq39+s8FgqB19ksTEhVFP3MqP7ycR9AzRUUSHSRPoJ9UE83rvPd2PhP NYpBgXwwWHf2I00gWSoel+HqTes5Dzuzy47A4Q9jevJ5Z52UVgaZsxR+ngWVED3hAMOnWD RmfP+PxhGe49KAHERVaVa09RkqqlzTjJtPIp68f0k0HlEc31zNXjpt7mwoYktQ== 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=1713817752; 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=sypu2JfLx+ZIpFOqUgGWuKeS5gUgKpbGeo/O0+Mp7as=; b=ZAIwi4LEqKGWA0qmSk26ksIgI0DZIbUU48KqlRX8B3OT5386SIi8MXKIL85Q8XQ83OwCmg 3IR5I1CZQ0CpzCZDP+SQ2WxF/GTZHUGweQJxmhBT5eZIW/gGIKmim/bbVlRL7bzugH24Nb fl0UYI6xBzq/Sar2tKIRI+1Z2aLRVJc6F8G4oaIuBYZvUUqOybiUkgaO939/V0VPIGvjud 8ZUda8MsAs08Ft+5DC9ab+Df684MtUTFxA2eC0jLYjBym0wwi53uKuZjDazbJZbGEq7P8v 5bdRkfi2J/avcFTsxqpuDYgTQ1fWJPMsF2ki795M0AtZRS2Bmd9Cs9OS99ZAwA== 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 4VNcKh0MKVz12tK; Mon, 22 Apr 2024 20:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MKTBI8000930; Mon, 22 Apr 2024 20:29:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MKTBTV000927; Mon, 22 Apr 2024 20:29:11 GMT (envelope-from git) Date: Mon, 22 Apr 2024 20:29:11 GMT Message-Id: <202404222029.43MKTBTV000927@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: 672464f756e8 - main - libthr: always use __libc_interposing_slot() 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: 672464f756e8e2f723789f27df62704725e9fb82 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=672464f756e8e2f723789f27df62704725e9fb82 commit 672464f756e8e2f723789f27df62704725e9fb82 Author: Brooks Davis AuthorDate: 2024-04-22 18:24:26 +0000 Commit: Brooks Davis CommitDate: 2024-04-22 20:28:26 +0000 libthr: always use __libc_interposing_slot() Use __libc_interposing_slot() in favor of __libsys_interposing_slot() so that the interposing interface is entierly between libc and libthr with libsys only involved as an implementation detail. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44880 --- lib/libthr/thread/thr_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c index 348825cd6198..ba07c92576c2 100644 --- a/lib/libthr/thread/thr_syscalls.c +++ b/lib/libthr/thread/thr_syscalls.c @@ -651,7 +651,7 @@ __thr_interpose_libc(void) #undef SLOT #define SLOT(name) \ - *(__libsys_interposing_slot(INTERPOS_##name)) = \ + *(__libc_interposing_slot(INTERPOS_##name)) = \ (interpos_func_t)__thr_##name; SLOT(accept); SLOT(accept4); From nobody Mon Apr 22 20:29: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 4VNcKj2cFBz5HqbC; Mon, 22 Apr 2024 20:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNcKj20r9z4wk5; Mon, 22 Apr 2024 20:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713817753; 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=vJCedCW2lUbj4kjaDaNivZjwa83uxnKIQwsq4eT/5kA=; b=C37aNi4Vv+gyrqkZ0zaRrZFayTWaxMRuEzkIm3KIMRNtBMlK/WN8KAo+X6vJns3D2fhVGh 9osKdo4JFytN7cXdlOeqofJq5gBsQ4a+91OQjWZitQsLaVyOob++d6QA40CGSyuOBlSVMO FfBVKwkXK7Iq0gd1FVEmKmqttrUiznJLd+ZCQrAxo+K5emJlP7lx+sNAsSh9HyXx4M8HeO mZZavAgWMzvkEczHr6oB0FlD/E8RUP0w7CzsNxLKbUeaOst6geWjf7WnE87IpFctTbgbeV uApnv6mFzO/VFiho8O6NWbZRAWQgzXyopUUW9smTHl4HaaSY/ezrV7NTr8zL4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713817753; a=rsa-sha256; cv=none; b=UHko3T+pC9vEpwtWHcclEHD92dH8UVCy1EXX/XYfQfM5g/djEFvYNiwKIlhQJutvXvalUb vD8bmzio5n8Im8fsjBEcR9kqsJ+oydPF37ox7j68UviAOkLn7JAKQpEx9PHgXDumDe+a24 LkPGrwquk9Kjr0iPRnXT3XnyeqOllQwR01P2H8TavNrqvHyikM/Ah+SCIGV1w9F8Cf2t4v 7LVKiI/P8fT+XdVYNbuICjQPLn0NeX/3cUcEbQBl7ltsjXPpdqdkPdlfkVMRJx0IxQF0mh iRt9IX+BW4AtSV0QI8Jxd76qaZCyNPthbQ2egZxZb5hxvLKegWQe1fgGobK4MA== 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=1713817753; 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=vJCedCW2lUbj4kjaDaNivZjwa83uxnKIQwsq4eT/5kA=; b=gKL3N5uKoayVEcCtMDA3d+m9/XEnGzxbm+aGj5dpLlqBGksyBJwSgvVr390os6kV3OH7SK kdgPYq/YYZLMWILb/UsFXeyyLvZxSvHmXazw0Kx8qHypBzYoNqF7DLonSuKdGP6WH2NDvx MLbXlmZsE7M4t6BYbcqNKBkpWVo23HLQ7+ZSDEwHN+BXnW3Ztqudt32qxXvjn8Lpy13sqq 7aHXp3G+HAPegvjGd3IyHzP40oI3gFvvQ6sX/doPD4G6FLyF/eNScFw7DLO7kccPF0y38I mQasepbG0eYJDWfRPODUUyDwxfB/ZmKAIsj9d8f/pBkgrmQMF8DQJ13NpT3NOA== 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 4VNcKj1b9Vz12qR; Mon, 22 Apr 2024 20:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MKTDNS000974; Mon, 22 Apr 2024 20:29:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MKTDtA000971; Mon, 22 Apr 2024 20:29:13 GMT (envelope-from git) Date: Mon, 22 Apr 2024 20:29:13 GMT Message-Id: <202404222029.43MKTDtA000971@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: 7448408656b0 - main - Make __libsys_interposing_slot libsys only 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: 7448408656b05b7aa6f81c72366296c567591df9 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=7448408656b05b7aa6f81c72366296c567591df9 commit 7448408656b05b7aa6f81c72366296c567591df9 Author: Brooks Davis AuthorDate: 2024-04-22 18:24:36 +0000 Commit: Brooks Davis CommitDate: 2024-04-22 20:28:26 +0000 Make __libsys_interposing_slot libsys only Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44881 --- lib/libsys/Makefile | 3 ++- lib/libsys/Makefile.sys | 3 ++- lib/libsys/Symbol.map | 1 + lib/libsys/Symbol.sys.map | 1 - 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile index 93b880cd67fe..b4c0e91e860c 100644 --- a/lib/libsys/Makefile +++ b/lib/libsys/Makefile @@ -60,7 +60,8 @@ MIASM= NOASM= SYM_MAPS+= ${LIBSYS_SRCTOP}/Symbol.map -SRCS+= auxv.c +SRCS+= auxv.c \ + interposing_table.c .include "${LIBSYS_SRCTOP}/Makefile.sys" diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 98a9688e58a1..205f6bc1a5eb 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -37,7 +37,6 @@ SRCS+= \ __getosreldate.c \ getpagesize.c \ getpagesizes.c \ - interposing_table.c \ libsys_sigwait.c .if ${LIB} == "c" @@ -46,6 +45,8 @@ SOBJS+= libc_stubs.pico # Link the full implementation of ELF auxargs for static libc. STATICOBJS+= auxv.o + +STATICOBJS+= interposing_table.o .endif NOASM= yield.o diff --git a/lib/libsys/Symbol.map b/lib/libsys/Symbol.map index 99cc171dd405..2cd524c19a3f 100644 --- a/lib/libsys/Symbol.map +++ b/lib/libsys/Symbol.map @@ -2,6 +2,7 @@ FBSDprivate_1.0 { __elf_aux_vector; __getosreldate; __realpathat; + __libsys_interposing_slot; _elf_aux_info; freebsd11_fstat; freebsd11_fstatat; diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index 822c007d32f1..464086985cfc 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -384,7 +384,6 @@ FBSD_1.8 { FBSDprivate_1.0 { /* Add entries in sort(1) order */ - __libsys_interposing_slot; __set_error_selector; __sigwait; gssd_syscall; From nobody Mon Apr 22 20:29: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 4VNcKk4ggvz5HqRq; Mon, 22 Apr 2024 20:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNcKk2lZhz4wnp; Mon, 22 Apr 2024 20:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713817754; 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=ocngdcdOkFOzWJuyguJWOIn1iSzLe8tHSaeKp81ipVQ=; b=wKf/gqcdzotHh7Sfy6gUw0wOsZ/FBKbbUh472ZrYLdzGdG0j83+zXtoaT39LFnthb75WzU v9RVGIdg4gWCO6dYQrJ7LqCSmcAflVWlxbqaGckXqAbFzRM3UfeGKupIr3aUxorj4Yrwt7 6J6yfZP78G83znbnLhsOoKIKGMwuPe2rJITH1J7ybkCbCf+8j27NUvCLOCyn5+KkuwzdMd TdjbL+qFia10gzVqEqz+uVzCKSQ1CBFSZ57/WqRE2nXSjQbqfRqCvAy5N7Jc+Rl9dkpGMs iobuzAYbdf8JNxFG8TRXuYl3Ub49tklYoVPyhv8zUIbjLjlfrnoRFj54TwuCOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713817754; a=rsa-sha256; cv=none; b=w6dWP6TT9LnUS3sawIKJ4514s/0les6aa1yD8vofUn2A3x3OCy5+WekoxQCv+54E13ubt7 f/adq4cPLSW051Wd1zhXtH16uwvqb9hfIE1t5nVDt2ClmLowH6u5/X5TURTdklNoVPWIfK 5I+tmaeTbBMyolIAd1YOifiMoK30sTzO+3F0EGS2iHajEYaFXMAdAHjAJ+D5ZSo/AX6cRG tWnxZrpu24b0rBzQJdUK7yeMha/UVPx1XS5CpgOZlRt1fOAYk6mWM7HHYubLK7TSWvC2G/ DQRLgPwbn7uRbdpF9o3T7CRuUbE0hWGNLR5iCyZDnKqoz8GynuYJrnxAwJWbfg== 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=1713817754; 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=ocngdcdOkFOzWJuyguJWOIn1iSzLe8tHSaeKp81ipVQ=; b=YvVM3BsnAP6EDZC4A6bdK7SxRW/TWpJYvUYjtijyNtyoxBmN0uuSd8tyi5eN0J5Zmg2Sm0 g/gFTCh7pzf5LzRW+ERP3a76EfLkL5dA+cXXxcUanZmsyrGF6y5fIoFPTxdB3B+B35GGTK lJtnFa3LglJzoBXcQXNAErXrNQw3rZTncHi8NR+MZjhR5ZGw1fywiHlM2/gJKF+Vi4lntP dTEnS4spaAGQqnNlbV4hLUtuJsLQfydUi5McuIqh4E0TKSNB5eks6BE2pGx8b3LAndOOmt ZdJovYplM36GtuCn4OdUlbyaaWTJsWnvXDoYrdHaHMlhQRHK9emqLELbOvKuaw== 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 4VNcKk2KPxz12nj; Mon, 22 Apr 2024 20:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MKTEru001020; Mon, 22 Apr 2024 20:29:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MKTEre001017; Mon, 22 Apr 2024 20:29:14 GMT (envelope-from git) Date: Mon, 22 Apr 2024 20:29:14 GMT Message-Id: <202404222029.43MKTEre001017@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: e5700dab1e7a - main - src.conf.5: rebuild after WITH_NVME 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5700dab1e7ad84b9a97025d263f0acd3599a1c2 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e5700dab1e7ad84b9a97025d263f0acd3599a1c2 commit e5700dab1e7ad84b9a97025d263f0acd3599a1c2 Author: Brooks Davis AuthorDate: 2024-04-22 18:41:44 +0000 Commit: Brooks Davis CommitDate: 2024-04-22 20:28:27 +0000 src.conf.5: rebuild after WITH_NVME changes WITH_NVME is no longer marked broken on armv7, riscv64, or powerpc. Fixes: 2fda3ab0ac19 WITH_NVME: Remove from broken. Differential Revision: https://reviews.freebsd.org/D44850 --- share/man/man5/src.conf.5 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index c6546e951e13..3f35e4146b52 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd March 15, 2024 +.Dd April 18, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1318,14 +1318,6 @@ and related programs. Do not install the limited cloud init support scripts. .It Va WITHOUT_NVME Do not build nvme related tools and kernel modules. -.Pp -This is a default setting on -arm/armv7, powerpc/powerpc and riscv/riscv64. -.It Va WITH_NVME -Build nvme related tools and kernel modules. -.Pp -This is a default setting on -amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and powerpc/powerpc64le. .It Va WITHOUT_OFED Do not build the .Dq "OpenFabrics Enterprise Distribution" From nobody Mon Apr 22 20:29: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 4VNcKl5BRTz5HqKc; Mon, 22 Apr 2024 20:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNcKl40TVz4wv7; Mon, 22 Apr 2024 20:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713817755; 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=2Lz8bY29qW4d45nenJ5WLzm2tnF77C4NHviD2BVucPo=; b=ljoH0MNNC4SKeuEgBMvKwSzKUb3QX7g+Plf3J+o/RTrIAEJ8wfJ9NGv3YcmuFG8TPrSkXX GsdL34CFQtcUCpVkn1+RwrV6hjBOKD8nVzqzfHYQHPmylamJLCe7KlTjDMuGCU4qQtm64S QnR/NUn4EeHN8vyhBlpLkE24EcXc/nuDZBrwIksg6oQ1qCFJq8oUHGyM/qZtG5itB5JuIx EBlU5tMVIWMRTlOyWpV8tvsrgnadf1vTzPp0jPha2BrV8DXbmL+1K9O7isJM6pM9exr2Wl TUQeQ7WT0hAPTrxAlZQBxOsW/O4IdsR7YtDgtUW5hGVam3PKA3iM4UZMkgqc1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713817755; a=rsa-sha256; cv=none; b=KbcgtXIeUGCMTPsBsieV3qxIN35koODE5HWDLmvjuj2BubVvKm/zwue193TEjX0eGiLo7b q3FEpdaExBPXpxDtzHzekDqvJBQRBnH129Jaxir6CCi4NCom+dr7H7Z2bJKC+nFpoY07cO znQ1iNA/fWGxk3zeGHSJxD3aLEX3/dAVw8BBE+T2cNadBypRFSSaZNO2wmO73/Ze5eVbO/ h6NtHDSBlXQKUd7SzDB7VE4KgoE1U57b1Jk9jTx/vzYq/aS0MCnu2oc0Mrwh4KqQI3ZTW1 KQvhuR1zoA1lAyZ66vpqNq4cxRG4O0uREfofRz1mY8daFvwUr1oFe3bGYKaeIQ== 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=1713817755; 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=2Lz8bY29qW4d45nenJ5WLzm2tnF77C4NHviD2BVucPo=; b=Tc6V6C+8IZzsKQMDD2qkUeWoYzmFTsyfU2ZtYMtDxRvfpIudUdmglQ68aIbcAn3ReW3Pgh t68/saOcG+vprQ/VjJNT8FkkjbFklTd3U+xsSqtjtJwMn8g2liLcQHTzBiLPf7FZ5mpra0 VUAOAb45rmVKmxqmUzGYizWDdGNCaTs6ntTgXhP6vM611hVx44CN0SWwI0SzVDorEgLrO8 hmaEpi1brTEYFex5SBvgPsJwoDQRNZTvsNbhaaNt9jnVax5DoygknP4xQk2sxl/YDY6gya sahhc7s3sxO4Kc73FL2vvSWoIw/uryy+sz9zp3Y6Jvvsupk1DMu57oCDor9QCQ== 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 4VNcKl3Lwzz12nk; Mon, 22 Apr 2024 20:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MKTFpG001064; Mon, 22 Apr 2024 20:29:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MKTF4a001061; Mon, 22 Apr 2024 20:29:15 GMT (envelope-from git) Date: Mon, 22 Apr 2024 20:29:15 GMT Message-Id: <202404222029.43MKTF4a001061@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: 5ffb5c849c86 - main - openssl: don't export nonexistant symbols 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: 5ffb5c849c86fbc300e2b35bb9ee42997c3535e7 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5ffb5c849c86fbc300e2b35bb9ee42997c3535e7 commit 5ffb5c849c86fbc300e2b35bb9ee42997c3535e7 Author: Brooks Davis AuthorDate: 2024-04-22 19:13:28 +0000 Commit: Brooks Davis CommitDate: 2024-04-22 20:28:51 +0000 openssl: don't export nonexistant symbols These are all OpenSSL 1.1.0 and 1.1.1 symbols that aren't present in our OpenSSL 3.0 builds. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44249 --- secure/lib/libcrypto/Version.map | 133 --------------------------------------- secure/lib/libssl/Version.map | 4 -- 2 files changed, 137 deletions(-) diff --git a/secure/lib/libcrypto/Version.map b/secure/lib/libcrypto/Version.map index 557b4a4b7b84..86575078bf6c 100644 --- a/secure/lib/libcrypto/Version.map +++ b/secure/lib/libcrypto/Version.map @@ -813,7 +813,6 @@ OPENSSL_1_1_0 { CRYPTO_get_ex_new_index; CRYPTO_get_mem_functions; CRYPTO_malloc; - CRYPTO_mem_ctrl; CRYPTO_memcmp; CRYPTO_memdup; CRYPTO_new_ex_data; @@ -843,7 +842,6 @@ OPENSSL_1_1_0 { CRYPTO_secure_used; CRYPTO_secure_zalloc; CRYPTO_set_ex_data; - CRYPTO_set_mem_debug; CRYPTO_set_mem_functions; CRYPTO_strdup; CRYPTO_strndup; @@ -1362,7 +1360,6 @@ OPENSSL_1_1_0 { ERR_load_CT_strings; ERR_load_DH_strings; ERR_load_DSA_strings; - ERR_load_DSO_strings; ERR_load_EC_strings; ERR_load_ENGINE_strings; ERR_load_ERR_strings; @@ -1390,7 +1387,6 @@ OPENSSL_1_1_0 { ERR_print_errors; ERR_print_errors_cb; ERR_print_errors_fp; - ERR_put_error; ERR_reason_error_string; ERR_remove_state; ERR_remove_thread_state; @@ -1407,23 +1403,17 @@ OPENSSL_1_1_0 { ESS_SIGNING_CERT_free; ESS_SIGNING_CERT_new; EVP_BytesToKey; - EVP_CIPHER_CTX_block_size; EVP_CIPHER_CTX_buf_noconst; EVP_CIPHER_CTX_cipher; EVP_CIPHER_CTX_clear_flags; EVP_CIPHER_CTX_copy; EVP_CIPHER_CTX_ctrl; - EVP_CIPHER_CTX_encrypting; EVP_CIPHER_CTX_free; EVP_CIPHER_CTX_get_app_data; EVP_CIPHER_CTX_get_cipher_data; EVP_CIPHER_CTX_iv; - EVP_CIPHER_CTX_iv_length; EVP_CIPHER_CTX_iv_noconst; - EVP_CIPHER_CTX_key_length; EVP_CIPHER_CTX_new; - EVP_CIPHER_CTX_nid; - EVP_CIPHER_CTX_num; EVP_CIPHER_CTX_original_iv; EVP_CIPHER_CTX_rand_key; EVP_CIPHER_CTX_reset; @@ -1435,14 +1425,10 @@ OPENSSL_1_1_0 { EVP_CIPHER_CTX_set_padding; EVP_CIPHER_CTX_test_flags; EVP_CIPHER_asn1_to_param; - EVP_CIPHER_block_size; EVP_CIPHER_do_all; EVP_CIPHER_do_all_sorted; - EVP_CIPHER_flags; EVP_CIPHER_get_asn1_iv; EVP_CIPHER_impl_ctx_size; - EVP_CIPHER_iv_length; - EVP_CIPHER_key_length; EVP_CIPHER_meth_dup; EVP_CIPHER_meth_free; EVP_CIPHER_meth_get_cleanup; @@ -1461,10 +1447,8 @@ OPENSSL_1_1_0 { EVP_CIPHER_meth_set_init; EVP_CIPHER_meth_set_iv_length; EVP_CIPHER_meth_set_set_asn1_params; - EVP_CIPHER_nid; EVP_CIPHER_param_to_asn1; EVP_CIPHER_set_asn1_iv; - EVP_CIPHER_type; EVP_CipherFinal; EVP_CipherFinal_ex; EVP_CipherInit; @@ -1509,18 +1493,14 @@ OPENSSL_1_1_0 { EVP_MD_CTX_ctrl; EVP_MD_CTX_free; EVP_MD_CTX_md; - EVP_MD_CTX_md_data; EVP_MD_CTX_new; - EVP_MD_CTX_pkey_ctx; EVP_MD_CTX_reset; EVP_MD_CTX_set_flags; EVP_MD_CTX_set_update_fn; EVP_MD_CTX_test_flags; EVP_MD_CTX_update_fn; - EVP_MD_block_size; EVP_MD_do_all; EVP_MD_do_all_sorted; - EVP_MD_flags; EVP_MD_meth_dup; EVP_MD_meth_free; EVP_MD_meth_get_app_datasize; @@ -1544,9 +1524,6 @@ OPENSSL_1_1_0 { EVP_MD_meth_set_input_blocksize; EVP_MD_meth_set_result_size; EVP_MD_meth_set_update; - EVP_MD_pkey_type; - EVP_MD_size; - EVP_MD_type; EVP_OpenFinal; EVP_OpenInit; EVP_PBE_CipherInit; @@ -1599,8 +1576,6 @@ OPENSSL_1_1_0 { EVP_PKEY_asn1_set_public; EVP_PKEY_asn1_set_security_bits; EVP_PKEY_assign; - EVP_PKEY_base_id; - EVP_PKEY_bits; EVP_PKEY_cmp; EVP_PKEY_cmp_parameters; EVP_PKEY_copy_parameters; @@ -1626,13 +1601,11 @@ OPENSSL_1_1_0 { EVP_PKEY_get1_DSA; EVP_PKEY_get1_EC_KEY; EVP_PKEY_get1_RSA; - EVP_PKEY_get1_tls_encodedpoint; EVP_PKEY_get_attr; EVP_PKEY_get_attr_by_NID; EVP_PKEY_get_attr_by_OBJ; EVP_PKEY_get_attr_count; EVP_PKEY_get_default_digest_nid; - EVP_PKEY_id; EVP_PKEY_keygen; EVP_PKEY_keygen_init; EVP_PKEY_meth_add0; @@ -1678,17 +1651,14 @@ OPENSSL_1_1_0 { EVP_PKEY_print_private; EVP_PKEY_print_public; EVP_PKEY_save_parameters; - EVP_PKEY_security_bits; EVP_PKEY_set1_DH; EVP_PKEY_set1_DSA; EVP_PKEY_set1_EC_KEY; EVP_PKEY_set1_RSA; - EVP_PKEY_set1_tls_encodedpoint; EVP_PKEY_set_type; EVP_PKEY_set_type_str; EVP_PKEY_sign; EVP_PKEY_sign_init; - EVP_PKEY_size; EVP_PKEY_type; EVP_PKEY_up_ref; EVP_PKEY_verify; @@ -1801,15 +1771,10 @@ OPENSSL_1_1_0 { EVP_get_cipherbyname; EVP_get_digestbyname; EVP_get_pw_prompt; - EVP_idea_cbc; - EVP_idea_cfb64; - EVP_idea_ecb; - EVP_idea_ofb; EVP_md4; EVP_md5; EVP_md5_sha1; EVP_md_null; - EVP_mdc2; EVP_rc2_40_cbc; EVP_rc2_64_cbc; EVP_rc2_cbc; @@ -1819,10 +1784,6 @@ OPENSSL_1_1_0 { EVP_rc4; EVP_rc4_40; EVP_rc4_hmac_md5; - EVP_rc5_32_12_16_cbc; - EVP_rc5_32_12_16_cfb64; - EVP_rc5_32_12_16_ecb; - EVP_rc5_32_12_16_ofb; EVP_read_pw_string; EVP_read_pw_string_min; EVP_ripemd160; @@ -1839,8 +1800,6 @@ OPENSSL_1_1_0 { EVP_whirlpool; EXTENDED_KEY_USAGE_free; EXTENDED_KEY_USAGE_new; - FIPS_mode; - FIPS_mode_set; GENERAL_NAMES_free; GENERAL_NAMES_new; GENERAL_NAME_cmp; @@ -1866,14 +1825,6 @@ OPENSSL_1_1_0 { HMAC_Init_ex; HMAC_Update; HMAC_size; - IDEA_cbc_encrypt; - IDEA_cfb64_encrypt; - IDEA_ecb_encrypt; - IDEA_encrypt; - IDEA_ofb64_encrypt; - IDEA_options; - IDEA_set_decrypt_key; - IDEA_set_encrypt_key; IPAddressChoice_free; IPAddressChoice_new; IPAddressFamily_free; @@ -1894,10 +1845,6 @@ OPENSSL_1_1_0 { MD5_Init; MD5_Transform; MD5_Update; - MDC2; - MDC2_Final; - MDC2_Init; - MDC2_Update; NAME_CONSTRAINTS_check; NAME_CONSTRAINTS_check_CN; NAME_CONSTRAINTS_free; @@ -2004,15 +1951,6 @@ OPENSSL_1_1_0 { OCSP_REQUEST_get_ext_count; OCSP_REQUEST_new; OCSP_REQUEST_print; - OCSP_REQ_CTX_add1_header; - OCSP_REQ_CTX_free; - OCSP_REQ_CTX_get0_mem_bio; - OCSP_REQ_CTX_http; - OCSP_REQ_CTX_i2d; - OCSP_REQ_CTX_nbio; - OCSP_REQ_CTX_nbio_d2i; - OCSP_REQ_CTX_new; - OCSP_REQ_CTX_set1_req; OCSP_RESPBYTES_free; OCSP_RESPBYTES_new; OCSP_RESPDATA_free; @@ -2059,7 +1997,6 @@ OPENSSL_1_1_0 { OCSP_id_get0_info; OCSP_id_issuer_cmp; OCSP_onereq_get0_id; - OCSP_parse_url; OCSP_request_add0_id; OCSP_request_add1_cert; OCSP_request_add1_nonce; @@ -2082,9 +2019,7 @@ OPENSSL_1_1_0 { OCSP_response_status; OCSP_response_status_str; OCSP_sendreq_bio; - OCSP_sendreq_nbio; OCSP_sendreq_new; - OCSP_set_max_response_length; OCSP_single_get0_status; OCSP_url_svcloc_new; OPENSSL_DIR_end; @@ -2127,7 +2062,6 @@ OPENSSL_1_1_0 { OPENSSL_isservice; OPENSSL_issetugid; OPENSSL_load_builtin_modules; - OPENSSL_memcmp; OPENSSL_sk_deep_copy; OPENSSL_sk_delete; OPENSSL_sk_delete_ptr; @@ -2479,13 +2413,6 @@ OPENSSL_1_1_0 { RC4; RC4_options; RC4_set_key; - RC5_32_cbc_encrypt; - RC5_32_cfb64_encrypt; - RC5_32_decrypt; - RC5_32_ecb_encrypt; - RC5_32_encrypt; - RC5_32_ofb64_encrypt; - RC5_32_set_key; RIPEMD160; RIPEMD160_Final; RIPEMD160_Init; @@ -2558,14 +2485,12 @@ OPENSSL_1_1_0 { RSA_padding_add_PKCS1_PSS_mgf1; RSA_padding_add_PKCS1_type_1; RSA_padding_add_PKCS1_type_2; - RSA_padding_add_SSLv23; RSA_padding_add_X931; RSA_padding_add_none; RSA_padding_check_PKCS1_OAEP; RSA_padding_check_PKCS1_OAEP_mgf1; RSA_padding_check_PKCS1_type_1; RSA_padding_check_PKCS1_type_2; - RSA_padding_check_SSLv23; RSA_padding_check_X931; RSA_padding_check_none; RSA_print; @@ -2825,7 +2750,6 @@ OPENSSL_1_1_0 { TS_TST_INFO_set_time; TS_TST_INFO_set_tsa; TS_TST_INFO_set_version; - TS_VERIFY_CTS_set_certs; TS_VERIFY_CTX_add_flags; TS_VERIFY_CTX_cleanup; TS_VERIFY_CTX_free; @@ -3003,7 +2927,6 @@ OPENSSL_1_1_0 { X509_CRL_get_nextUpdate; X509_CRL_get_signature_nid; X509_CRL_get_version; - X509_CRL_http_nbio; X509_CRL_match; X509_CRL_new; X509_CRL_print; @@ -3070,7 +2993,6 @@ OPENSSL_1_1_0 { X509_NAME_get_index_by_OBJ; X509_NAME_get_text_by_NID; X509_NAME_get_text_by_OBJ; - X509_NAME_hash; X509_NAME_hash_old; X509_NAME_new; X509_NAME_oneline; @@ -3386,7 +3308,6 @@ OPENSSL_1_1_0 { X509_getm_notAfter; X509_getm_notBefore; X509_gmtime_adj; - X509_http_nbio; X509_issuer_and_serial_cmp; X509_issuer_and_serial_hash; X509_issuer_name_cmp; @@ -4038,7 +3959,6 @@ OPENSSL_1_1_0 { X509_VAL_it; X509_it; ZLONG_it; - _shadow_DES_check_key; }; OPENSSL_1_1_0a { @@ -4229,34 +4149,6 @@ OPENSSL_1_1_1 { EVP_PKEY_new_raw_public_key; EVP_PKEY_param_check; EVP_PKEY_public_check; - EVP_PKEY_set_alias_type; - EVP_aria_128_cbc; - EVP_aria_128_ccm; - EVP_aria_128_cfb128; - EVP_aria_128_cfb1; - EVP_aria_128_cfb8; - EVP_aria_128_ctr; - EVP_aria_128_ecb; - EVP_aria_128_gcm; - EVP_aria_128_ofb; - EVP_aria_192_cbc; - EVP_aria_192_ccm; - EVP_aria_192_cfb128; - EVP_aria_192_cfb1; - EVP_aria_192_cfb8; - EVP_aria_192_ctr; - EVP_aria_192_ecb; - EVP_aria_192_gcm; - EVP_aria_192_ofb; - EVP_aria_256_cbc; - EVP_aria_256_ccm; - EVP_aria_256_cfb128; - EVP_aria_256_cfb1; - EVP_aria_256_cfb8; - EVP_aria_256_ctr; - EVP_aria_256_ecb; - EVP_aria_256_gcm; - EVP_aria_256_ofb; EVP_sha3_224; EVP_sha3_256; EVP_sha3_384; @@ -4265,12 +4157,6 @@ OPENSSL_1_1_1 { EVP_sha512_256; EVP_shake128; EVP_shake256; - EVP_sm3; - EVP_sm4_cbc; - EVP_sm4_cfb128; - EVP_sm4_ctr; - EVP_sm4_ecb; - EVP_sm4_ofb; NAMING_AUTHORITY_free; NAMING_AUTHORITY_get0_authorityId; NAMING_AUTHORITY_get0_authorityText; @@ -4357,25 +4243,6 @@ OPENSSL_1_1_1 { PROFESSION_INFO_set0_professionItems; PROFESSION_INFO_set0_professionOIDs; PROFESSION_INFO_set0_registrationNumber; - RAND_DRBG_bytes; - RAND_DRBG_free; - RAND_DRBG_generate; - RAND_DRBG_get0_master; - RAND_DRBG_get0_private; - RAND_DRBG_get0_public; - RAND_DRBG_get_ex_data; - RAND_DRBG_instantiate; - RAND_DRBG_new; - RAND_DRBG_reseed; - RAND_DRBG_secure_new; - RAND_DRBG_set; - RAND_DRBG_set_callbacks; - RAND_DRBG_set_defaults; - RAND_DRBG_set_ex_data; - RAND_DRBG_set_reseed_defaults; - RAND_DRBG_set_reseed_interval; - RAND_DRBG_set_reseed_time_interval; - RAND_DRBG_uninstantiate; RAND_keep_random_devices_open; RAND_priv_bytes; RSA_generate_multi_prime_key; diff --git a/secure/lib/libssl/Version.map b/secure/lib/libssl/Version.map index 457493beafb5..0c02b50d793b 100644 --- a/secure/lib/libssl/Version.map +++ b/secure/lib/libssl/Version.map @@ -264,7 +264,6 @@ OPENSSL_1_1_0 { SSL_get_info_callback; SSL_get_options; SSL_get_peer_cert_chain; - SSL_get_peer_certificate; SSL_get_peer_finished; SSL_get_privatekey; SSL_get_psk_identity; @@ -387,9 +386,6 @@ OPENSSL_1_1_0 { SSL_waiting_for_async; SSL_want; SSL_write; - SSLv3_client_method; - SSLv3_method; - SSLv3_server_method; TLS_client_method; TLS_method; TLS_server_method; From nobody Mon Apr 22 20:29: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 4VNcKm5jSJz5HqgY; Mon, 22 Apr 2024 20:29:16 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNcKm4ShWz4x3G; Mon, 22 Apr 2024 20:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713817756; 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=yLX9P5YtJhWF2AalOPavJgoBXwSQLRxDUER21IquNuI=; b=u7t1UeYv3Tej6rcLSeteQfZqM82HECXYuYDNJnEB5+6rLwIWJrFmRZmIhc9i6BqeDOa+SL DKs9+0VjI4/m0ykFIA4Hk1uW0zhHdkw5B0bS41f+Ijdah/0sKV7Dw2p+z7lYruRYpBa/Gk bgUP9L7nkRYH5HHOcCJa2vGFzC0tSiMFy8SZ1POzV+ce5U7FqH9krOaUZtubp+39GEl5CO aCmcikJhuqy/pRB+oKiX9v7O0x80qGMOnPoQw2n2AfMndRxr2w/Zq9O4WPPX3JT4lA/6Bp 410eHqKIk5lbNdY26aP9nlzqXj8ev3Z+rWPaBR4gVRX9CMS4luf2HCgfbkCRmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713817756; a=rsa-sha256; cv=none; b=hDJUAKFFcQQoRqQbKtMQWppzBAB8IjzklM8p79HSuUU+0yZ+VOo4RyyZ+YSIEUcRG4lsrl bLTePd4wvUM3EzzIrhq9VrrwFlyJoj+Qt6RrRpF8BNUvkrXhMKQev0WXIjlwhskytr6iDT pz37BsSQ7cvUemLVDBehAuV1m13pUvvj08z6MfAhQHg19pwx2sLza94APsinOdhG1LybhV zMrXhSsnNbPvWzRDW7PFJ3KjfAVvk9dbYtbdmhgS0tAhZYEI0Q6H4RFx/42Dda2Iua8PJo 6roxYHxEs/W0oOdXKMtUYKTaP6Jf/AMOaRfpUT3C/50Bff9vdcjcVmsO76lHWQ== 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=1713817756; 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=yLX9P5YtJhWF2AalOPavJgoBXwSQLRxDUER21IquNuI=; b=imMLyg/zaXRNubAx0HJOHHRO76DR3INcwZPoHgX0wFXZSSshUnPRZdCYYedj2u5Dqfd/75 KdYOsz9/HH4um13KFLtDCuULrqO9joq1Cx7ibyssclkMVR+yUw1I40zJ0py2ZoqA/u+ai/ Vb4D0IiXZBlxq9i8jsyQzbSCVKT1rpMH/F3Q8Rk2apO8BF/C6Qw5dPNGuD0SR2PDOikWIh b/n0oJbCwkuiYrs9OXsyYhVL6NMo6otD2axzBIkpyGPKOlFLEgJ5lqNRtAzSFohy1qjYoV VJjU05Jkle0pJJUi4FhE2my5d+Lh0Hb2wl5gq3t1NyJnYAwqPfijEoOiau5YWA== 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 4VNcKm44gwz12nl; Mon, 22 Apr 2024 20:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MKTGXk001112; Mon, 22 Apr 2024 20:29:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MKTG6T001109; Mon, 22 Apr 2024 20:29:16 GMT (envelope-from git) Date: Mon, 22 Apr 2024 20:29:16 GMT Message-Id: <202404222029.43MKTG6T001109@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: 80ffc7398b83 - main - libsys/arm: make vfork less of an outlier 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: 80ffc7398b8302b2d54d783d8349e54d877a4250 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=80ffc7398b8302b2d54d783d8349e54d877a4250 commit 80ffc7398b8302b2d54d783d8349e54d877a4250 Author: Brooks Davis AuthorDate: 2024-04-22 19:13:35 +0000 Commit: Brooks Davis CommitDate: 2024-04-22 20:28:51 +0000 libsys/arm: make vfork less of an outlier Following the pattern of other architectures, make __sys_vfork the main symbol and _vfork and vfork weak aliases. This avoids the need to special case vfork in the generated list of symbols. Differential Revision: https://reviews.freebsd.org/D44330 --- lib/libsys/arm/vfork.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libsys/arm/vfork.S b/lib/libsys/arm/vfork.S index 2b92f56ad4e4..ef9a426c6de5 100644 --- a/lib/libsys/arm/vfork.S +++ b/lib/libsys/arm/vfork.S @@ -42,13 +42,17 @@ .text .align 0 -ENTRY(vfork) +ENTRY(__sys_vfork) + .weak _C_LABEL(vfork); + .set _C_LABEL(vfork), _C_LABEL(__sys_vfork); + .weak _C_LABEL(_vfork); + .set _C_LABEL(_vfork), _C_LABEL(__sys_vfork); mov r2, r14 _SYSCALL(vfork) bcs PIC_SYM(CERROR, PLT) sub r1, r1, #1 /* r1 == 0xffffffff if parent, 0 if child */ and r0, r0, r1 /* r0 == 0 if child, else unchanged */ mov r15, r2 -END(vfork) +END(__sys_vfork) .section .note.GNU-stack,"",%progbits From nobody Mon Apr 22 20:29: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 4VNcKn73YFz5HqlH; Mon, 22 Apr 2024 20:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNcKn5mVVz4wrn; Mon, 22 Apr 2024 20:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713817757; 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=+ccGzjJnSq0iua1tA8Z55qLfoQFGRDO1B/OCGx4kRdc=; b=URL/FzhIIQBGTfw4ISj2FqqGuvk3PCgYjukEDi+aC6+VwxJjtoNbGaVd2Rp2aPXFzJo1Cx mPTCzFdB1NPFcQXIHFoQTQB8Hsj/bJdhAli62QwnHMdUaKw/OtjP9dEDZ3laQJuLEoiCN6 /z34jv/pyVa1ia6SVFsWvRICY+GX4FPWjeSAsIRPoRK+0oNXYwEiWZf1+Xz29n/MX+3R50 xT7sX9rQLad+9w+x7AeyPkdy5irqDQl3/p6uuOJkZ62vRaiZonIvwPAqKbWGV5xWRrbxbZ Kp9oXIfieEN7ShxMzGX+GxuP5lIvJleZUNb8pcLZKdExSF2kxKt0HTRZJ0heBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713817757; a=rsa-sha256; cv=none; b=ixQ3UeNl/AaXOuMUG3lqzKokec7bpJsPL5BqYXk4fwT2EuadaQlLLiyBcBfu27QYuwmImY SZxqgzWeBujpcQziDX7zTc2fL+m6mVXw8mUHwyLEYRTYFcD0txOlkmOOV34c/VfcCgkQzn VxrQ9Kb0P0F0oP01MECNu0k0liZEwtGIAotMk52hwN4VMUzQ7YIWjeOi2T9YFaEFIqO/9H U9AbN3XNFFczA4UHPfDgSMl0IAHSdD9C/RaWstzv0LvLgySNQCMEr4eQPxKQtulp/Y8PLL 0qAznQBzQEdhIbv6ibXJqRCL3ACPNdOicht6bX8ic3VKaQof7ab323a++Sf5OQ== 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=1713817757; 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=+ccGzjJnSq0iua1tA8Z55qLfoQFGRDO1B/OCGx4kRdc=; b=HVJ5uoR6Bnkzv/6SNKg/JrvixQYWjoz6txXUxfLZ9kBoB2kk6YyR+Mbjd2hXf8iNDyxCs1 UCsOwRQ4X1c6yoklr6piO7zS9nIj3CrFPkMC43js+uzhLIVJPfikaliTP/mF9kKUyGsCnd Rdi+edrHS37hkd+t8wCJwQKu1VwB17sK/kh5FOVStuPQ2u0iervsMNy42bEyUGigAN68FP xKK51kFdwKE8zGCmHwIdUTPUGOZhbzA1Os8lY+NbhiNd6Z9PDpVqdXdEupLc+GDOK7T/pL SFBLDqP7jUgP2tq2cRs/Hj6QhgyZfBc+Ybz6VsrZLS8DWcNTAD7JXys7n2DE8w== 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 4VNcKn5P0Zz12wF; Mon, 22 Apr 2024 20:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MKTHZm001154; Mon, 22 Apr 2024 20:29:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MKTH6e001151; Mon, 22 Apr 2024 20:29:17 GMT (envelope-from git) Date: Mon, 22 Apr 2024 20:29:17 GMT Message-Id: <202404222029.43MKTH6e001151@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: 6077246e88b0 - main - libcxxrt: align more with libc/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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6077246e88b0ef6f90cbee0e580b42730a641f0f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6077246e88b0ef6f90cbee0e580b42730a641f0f commit 6077246e88b0ef6f90cbee0e580b42730a641f0f Author: Brooks Davis AuthorDate: 2024-04-22 18:37:17 +0000 Commit: Brooks Davis CommitDate: 2024-04-22 20:28:51 +0000 libcxxrt: align more with libc/Makefile Use src.opts.mk instead of bsd.own.mk and define PACKAGE first. Fixes: da77a1b4f0dff libcxxrt: don't export nonexistant symbols --- lib/libcxxrt/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcxxrt/Makefile b/lib/libcxxrt/Makefile index afae306e7bbe..6ad89e9da107 100644 --- a/lib/libcxxrt/Makefile +++ b/lib/libcxxrt/Makefile @@ -1,8 +1,8 @@ +PACKAGE= clibs SHLIBDIR?= /lib -.include +.include -PACKAGE= clibs SRCDIR= ${SRCTOP}/contrib/libcxxrt SHLIB_MAJOR= 1 From nobody Mon Apr 22 21:55: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 4VNfF61fLPz5HlD3; Mon, 22 Apr 2024 21:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNfF614Clz57xq; Mon, 22 Apr 2024 21:55:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713822922; 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=5YKey9yQT1qP79rCEJrpR7QzKFIMa2XYVSZkC5VvGjY=; b=A0fZKoAJBxt5A4g4qYxpdyx9QYbUH/qo0UhlaEry7XizclyV1b2JqCCrdSaDelj1vvGEHL 60oil7a+6tPdhnKTXwehUvO4jjRiavr7SkNehUwaqbJFspJEkwZeanOFefkSP4Yy8wsjkO uYb6q25KMBP0Q5d8jX9KTjT+f7oQ6mFgdSBnKE9Hoc9kO8+cOGDSPxkOrAt4O3871Vo6lU i2Z4pShLdkGCPrPiua9Gm/cSXNgme+GLeJs9eYxW4n2Uo5l5IeEkDMDG3IqGx6qmXHLDj9 kq7MM7xJA22RCE1Sz7S5lilx/Dv9xjly9gM+beFIQzYVwlfeMemaWjjURdtFfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713822922; a=rsa-sha256; cv=none; b=yKWiaZlU344PcXSMoqJUGyMB+3mG+eqw19z4BmJDa9qEV2uSvwrE8khOl5nlGaaaV4fvgh Ne8D9eC/1N28DNy2i2GuwguY+ugvmMRjLFX5eZDkCJv/tXVPuOc/ik61tjrvTxrn2j5pBi uWilRWmTPpxA9gQgxbQPxRQke9SrRCt0UOUFEKE7j9L2W36dbUUjpLHSOUrUGFzTL2bPAa G5Qvw5maf5Ak4vbgEqhfsJUU8CWKmcvarNjTlaZzSyxCCsTfleNg827SPWabWvIoYZ0AVY q5nq00R2BSVtBBZUsSZIEv59Kgxt6K1jgQU6+J/XWYm0VdF41BZHXJs+4ne1aA== 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=1713822922; 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=5YKey9yQT1qP79rCEJrpR7QzKFIMa2XYVSZkC5VvGjY=; b=QkE1GMK0QLT8+N1Z0J/KNMmYpnn5OAwRJsA5YHtsozV90AEFh4u5z2a6E6W7AleJZORumf HAmKGWaheQMe1qzRRwW9An2xHNaGFX/ok2E1AAHdg9ls2Dus/b/tiCwfUt9V2ANmNaK39p DqTmtk2Z8FQ7fJ7SmyMC9qT4Py0D8URi3EdeedH9oqtDZRKLvryy0ghij1N2lRM5IVtUX9 y9AAR/qKWFja196Gw6CfrKBJKJ/8QXIizO/impVawowFbJFCqEqafSmrHZFhAWzuuiv+H+ XMQcklyOPZAmCe1u84Kdc/Il2qS9e+ZawUAMrX1yP7oo00iBuvvM3jbE2ikgMA== 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 4VNfF60Rbjz14Z2; Mon, 22 Apr 2024 21:55:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43MLtLen052477; Mon, 22 Apr 2024 21:55:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MLtLwm052474; Mon, 22 Apr 2024 21:55:21 GMT (envelope-from git) Date: Mon, 22 Apr 2024 21:55:21 GMT Message-Id: <202404222155.43MLtLwm052474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: c0f02dcd4c9c - main - geli.8: minor proofreading 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0f02dcd4c9c17181c59fa3c43259cce793a0b21 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c0f02dcd4c9c17181c59fa3c43259cce793a0b21 commit c0f02dcd4c9c17181c59fa3c43259cce793a0b21 Author: Alan Somers AuthorDate: 2024-04-22 21:11:09 +0000 Commit: Alan Somers CommitDate: 2024-04-22 21:54:56 +0000 geli.8: minor proofreading MFC after: 3 days Sponsored by: Axcient Reviewed by: imp, pauamma (manpages) Differential Revision: https://reviews.freebsd.org/D44907 --- lib/geom/eli/geli.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/geom/eli/geli.8 b/lib/geom/eli/geli.8 index c378c591290c..501b948fde49 100644 --- a/lib/geom/eli/geli.8 +++ b/lib/geom/eli/geli.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2022 +.Dd April 20, 2024 .Dt GELI 8 .Os .Sh NAME @@ -867,7 +867,7 @@ If set to 0, a CPU-pinned thread will be started for every active CPU. When set to 1, can speed-up crypto operations by using batching. Batching reduces the number of interrupts by responding to a group of crypto requests with one interrupt. -The crypto card and the driver has to support this feature. +The crypto card and the driver have to support this feature. .It Va kern.geom.eli.key_cache_limit : No 8192 Specifies how many Data Keys to cache. The default limit @@ -884,7 +884,7 @@ Reports how many times we were looking up a Data Key and it was not in cache. This sysctl is not updated for providers that need fewer Data Keys than the limit specified in .Va kern.geom.eli.key_cache_limit . -.Va kern.geom.eli.unmapped_io +.It Va kern.geom.eli.unmapped_io Enable support for unmapped I/O buffers, currently implemented only on 64-bit platforms. This is an optimization which reduces the overhead of I/O processing. From nobody Tue Apr 23 04:52: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 4VNqVg3QFVz5JQML; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVg2Zjpz4YSB; Tue, 23 Apr 2024 04:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847963; 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=TRFF0fks9dOC3eyHfASATQTxgmWqAhnQVBE5yp5prr4=; b=txSsS88Tg/GYmsb3mHVa0WprwREg2zC7WbztEha7+tg95kkg0BNnFwxSU2lXTFtNiCKQix MBJFFs6GXKEb/0Esw0NIMTGevwBfcsywutaVXFA5SojUbOpGZoaUEw2ibWSFNr6yrOA0zI 7u+sYOVM8W/7Ir+R6rdFHVCvnDVVyG8ClcE84fCIlSlHIZoeo/q0C3tVAJMRpZCyuBjB1R JKnyJQLskSSjCGWmPsmskXhFQUGdM9aU3g3UbYMUKtEwR7BelRXdKW2eUmJ9uxLWQmDYCe UnJJ/3IzX3HON31/ls7tQXTV3otChZdAIbiJK4gS6ON69NyjLpvsceySZUEKJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847963; a=rsa-sha256; cv=none; b=dmQOI7tJjqQYrpN23/EmD6OQCXTGYWrFVTLX2cjD8KfZPhY52a+PUATOnraOW6aMxuZnRf DKzrPTQb+KX9NWv4XJ4RO8wnEEMmLiGdlVrkJAwKcssSXcaUlEexXI7yfuUu3/5C4JE553 OTBBscGgkBkxvH5N+MryP3W2krD6yDYM/AAWi4zT3i/eGNKaT96g8rdIT/1hKQAjX4oCGe pufs5hMDF31Cr8hmNRZb6IGKH1dN9Zuj4s19AVBelSSJnHp9dx+D3Eot2dg8kTLeEyoCE+ Es1y4/fMTwrQKnoDWoxOaXESN8YNPuoM5ierviVfS7VbLiVD6VV/V60Ubpv+fQ== 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=1713847963; 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=TRFF0fks9dOC3eyHfASATQTxgmWqAhnQVBE5yp5prr4=; b=Tfr6uE93K/xLbogQcIlSHbZGiX85RnbCATZKGugIV1knBpStLjWA44J3pnUjnvgsfSB+IB Zy45qAXxItW6bRVKufUC8ehZCjCINq+ayNroc+hgTyE+28lUCOs3Tht8afBdnVkrVtSGlr rus4OSjwWwjlXgbB6zpEm61UpLvr5A2gWXOimKS+KQCZgxnVnyz/jbqFBGhXhQm8h1OSWt j1/JVf/ovQ6EgJdqlVNAoaHCeFzDcII7qGhsZ7J87m8dztmVVE2SdYuG7wNlbrXvr7LeYz Jy0SoTvjJB0f3canTzrgE7m7EyElnqRDKxZ1qt1xV3x3zHHRpxuSrGRCupeVbQ== 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 4VNqVg293hzHmT; Tue, 23 Apr 2024 04:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qh1T063684; Tue, 23 Apr 2024 04:52:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qhYd063681; Tue, 23 Apr 2024 04:52:43 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:43 GMT Message-Id: <202404230452.43N4qhYd063681@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: 50ecbc5142e1 - main - libipsec: make const-correct 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: 50ecbc5142e1c58f2132b351da19c5e4aa5f4e6a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=50ecbc5142e1c58f2132b351da19c5e4aa5f4e6a commit 50ecbc5142e1c58f2132b351da19c5e4aa5f4e6a Author: Lexi Winter AuthorDate: 2024-04-22 21:56:24 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:36:34 +0000 libipsec: make const-correct - add const to the appropriate places in the libipsec public API and the relevant internal functions needed to support that. - replace caddr_t with c_caddr_t in ipsec_dump_policy() - update the ipsec_dump_policy manpage to use c_caddr_t (this manpage was already wrong as it had "char *" instead of caddr_t previously). While here, update pfkeyv2.h to not cast away const in the PFKEY_*() macros. This should not cause any ABI changes as the actual types have not changed. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1099 --- lib/libipsec/ipsec_dump_policy.c | 4 ++-- lib/libipsec/ipsec_get_policylen.c | 2 +- lib/libipsec/ipsec_set_policy.3 | 6 +++--- lib/libipsec/policy_parse.y | 20 ++++++++++---------- sys/net/pfkeyv2.h | 8 ++++---- sys/netipsec/ipsec.h | 6 +++--- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/libipsec/ipsec_dump_policy.c b/lib/libipsec/ipsec_dump_policy.c index 49b643d80115..5ad8a84b2052 100644 --- a/lib/libipsec/ipsec_dump_policy.c +++ b/lib/libipsec/ipsec_dump_policy.c @@ -67,9 +67,9 @@ static char *set_address(char *, size_t, struct sockaddr *); * When delimiter == NULL, alternatively ' '(space) is applied. */ char * -ipsec_dump_policy(caddr_t policy, char *delimiter) +ipsec_dump_policy(c_caddr_t policy, const char *delimiter) { - struct sadb_x_policy *xpl = (struct sadb_x_policy *)policy; + const struct sadb_x_policy *xpl = (const struct sadb_x_policy *)policy; struct sadb_x_ipsecrequest *xisr; size_t off, buflen; char *buf; diff --git a/lib/libipsec/ipsec_get_policylen.c b/lib/libipsec/ipsec_get_policylen.c index 8080bec0f48e..2454d875e1fa 100644 --- a/lib/libipsec/ipsec_get_policylen.c +++ b/lib/libipsec/ipsec_get_policylen.c @@ -41,7 +41,7 @@ #include "ipsec_strerror.h" int -ipsec_get_policylen(caddr_t policy) +ipsec_get_policylen(c_caddr_t policy) { return policy ? PFKEY_EXTLEN(policy) : -1; } diff --git a/lib/libipsec/ipsec_set_policy.3 b/lib/libipsec/ipsec_set_policy.3 index 6a40e03af45f..ce4d8d244292 100644 --- a/lib/libipsec/ipsec_set_policy.3 +++ b/lib/libipsec/ipsec_set_policy.3 @@ -41,11 +41,11 @@ .Sh SYNOPSIS .In netipsec/ipsec.h .Ft "char *" -.Fn ipsec_set_policy "char *policy" "int len" +.Fn ipsec_set_policy "const char *policy" "int len" .Ft int -.Fn ipsec_get_policylen "char *buf" +.Fn ipsec_get_policylen "const char *buf" .Ft "char *" -.Fn ipsec_dump_policy "char *buf" "char *delim" +.Fn ipsec_dump_policy "c_caddr_t *buf" "const char *delim" .Sh DESCRIPTION The .Fn ipsec_set_policy diff --git a/lib/libipsec/policy_parse.y b/lib/libipsec/policy_parse.y index 65894e37965a..35512dcc1f58 100644 --- a/lib/libipsec/policy_parse.y +++ b/lib/libipsec/policy_parse.y @@ -77,16 +77,16 @@ static struct sockaddr *p_src = NULL; static struct sockaddr *p_dst = NULL; struct _val; -extern void yyerror(char *msg); -static struct sockaddr *parse_sockaddr(struct _val *buf); +extern void yyerror(const char *msg); +static struct sockaddr *parse_sockaddr(const struct _val *buf); static int rule_check(void); static int init_x_policy(void); static int set_x_request(struct sockaddr *src, struct sockaddr *dst); -static int set_sockaddr(struct sockaddr *addr); +static int set_sockaddr(const struct sockaddr *addr); static void policy_parse_request_init(void); -static caddr_t policy_parse(char *msg, int msglen); +static caddr_t policy_parse(const char *msg, int msglen); -extern void __policy__strbuffer__init__(char *msg); +extern void __policy__strbuffer__init__(const char *msg); extern void __policy__strbuffer__free__(void); extern int yylex(void); @@ -211,7 +211,7 @@ addresses %% void -yyerror(char *msg) +yyerror(const char *msg) { fprintf(stderr, "libipsec: %s while parsing \"%s\"\n", msg, __libipsecyytext); @@ -220,7 +220,7 @@ yyerror(char *msg) } static struct sockaddr * -parse_sockaddr(struct _val *buf) +parse_sockaddr(const struct _val *buf) { struct addrinfo hints, *res; char *serv = NULL; @@ -346,7 +346,7 @@ set_x_request(struct sockaddr *src, struct sockaddr *dst) } static int -set_sockaddr(struct sockaddr *addr) +set_sockaddr(const struct sockaddr *addr) { if (addr == NULL) { __ipsec_errcode = EIPSEC_NO_ERROR; @@ -383,7 +383,7 @@ policy_parse_request_init(void) } static caddr_t -policy_parse(char *msg, int msglen) +policy_parse(const char *msg, int msglen) { int error; pbuf = NULL; @@ -413,7 +413,7 @@ policy_parse(char *msg, int msglen) } caddr_t -ipsec_set_policy(char *msg, int msglen) +ipsec_set_policy(const char *msg, int msglen) { caddr_t policy; diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h index 912607a11582..a0246c9223ba 100644 --- a/sys/net/pfkeyv2.h +++ b/sys/net/pfkeyv2.h @@ -444,13 +444,13 @@ _Static_assert(sizeof(struct sadb_x_sa_replay) == 8, "struct size mismatch"); /* Utilities */ #define PFKEY_ALIGN8(a) (1 + (((a) - 1) | (8 - 1))) #define PFKEY_EXTLEN(msg) \ - PFKEY_UNUNIT64(((struct sadb_ext *)(msg))->sadb_ext_len) + PFKEY_UNUNIT64(((const struct sadb_ext *)(msg))->sadb_ext_len) #define PFKEY_ADDR_PREFIX(ext) \ - (((struct sadb_address *)(ext))->sadb_address_prefixlen) + (((const struct sadb_address *)(ext))->sadb_address_prefixlen) #define PFKEY_ADDR_PROTO(ext) \ - (((struct sadb_address *)(ext))->sadb_address_proto) + (((const struct sadb_address *)(ext))->sadb_address_proto) #define PFKEY_ADDR_SADDR(ext) \ - ((struct sockaddr *)((caddr_t)(ext) + sizeof(struct sadb_address))) + ((const struct sockaddr *)((c_caddr_t)(ext) + sizeof(struct sadb_address))) /* in 64bits */ #define PFKEY_UNUNIT64(a) ((a) << 3) diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h index eea0a39af5ea..88594d250fdb 100644 --- a/sys/netipsec/ipsec.h +++ b/sys/netipsec/ipsec.h @@ -350,9 +350,9 @@ extern int m_striphdr(struct mbuf *m, int skip, int hlen); #endif /* _KERNEL */ #ifndef _KERNEL -extern caddr_t ipsec_set_policy(char *, int); -extern int ipsec_get_policylen(caddr_t); -extern char *ipsec_dump_policy(caddr_t, char *); +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); #endif /* ! KERNEL */ From nobody Tue Apr 23 04:52: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 4VNqVh4MqCz5JQm5; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVh3Lf6z4YXc; Tue, 23 Apr 2024 04:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847964; 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=pxeeLsoe2xrDhbzWH4b2AmReqOmx74ZXu2sf5m7vRjc=; b=U3YqDxuM5sD3Cf86Re2RoiIyMEXlNim/G/0eh/UKcYUtAd81qMTj2cScjTsVQM9v4gLrOi 4KQ6p8tvbYjIgS09T10wscPY/CyzdsTNygnWnsU1rKnSgVkINsgNjeWqGlOJoM6nrFxhRb /wLkANkPohVQygJEnzmqGmYSgpXQOFblqcfARvOkUOsz/yUOjE4DCJOXk5eu5gksm6K3W/ b5dqN7T+e7FGa+FXZAmYoqx6E0ViYkv5LsThvMQgCRhh/JgvCx6OhekTRPNDo4DNngKOWB 9AooQGXVTvGEsu2u14rzaytIapqQ40Rce3YgjmWomdi58CCfvJta96h71Ir4AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847964; a=rsa-sha256; cv=none; b=nAZ5ApN696etgKBH/kOykNRWRZptSYIoYpqkiSzkuYjQOalu0kln/WcrAUndNSZJqaTtRs Qd7yD53OEg6XNkr7mEUut5Lgxek434s+9XfrsGZV2fZUOOl+WIQacstpEqZv/0lkNCVgOf sCdfOGaoRS/l9K6m0WBX2Usby6gsVs96LASu/S74QFOpbI3BDTZEc0ZNMc+wPFrljdODxI 3045OVXutNgSlXXcRYHfnHQaN3no5wKFRFT1V/8Sq1Z781HEtYwO1ro5VEavkpTes+BQy+ 1e3RkdQvliJsfHd/rwrhFfSfkHYCjYaToahx4bm0/CnwGXMudFk8sS1YjKEkXw== 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=1713847964; 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=pxeeLsoe2xrDhbzWH4b2AmReqOmx74ZXu2sf5m7vRjc=; b=wsqSwIpI4dSnGSw96YlLs3qTIK1YUGHXav0ri+7pmQ7JnfqwvA9uV+cTISXxvgZniZrQfb a2+nuEMEfYmf/tnCkaXqlgCk2NefQ6hGnqDXKWteSHya3EObC+iGy61Vxbbjz9RuXZ9Hvr y1d/5T6cnmKTJmz5MY4MrDEGZrYOIafdvUVJe6oP07NHCK+cJvWtaMP9S4NcHBjc03axtv zpLc7tHr+G21PzW8uuq4dyIQvd3CPJkBURAd06zel7C6oXSp+Ic+FA3h0N1GgX7FN0iat/ qMNBah/lgBlaI7R1PshmpvXrgYrwxDwukcAtrJj4M64telb2n8WVraA4ZYodcg== 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 4VNqVh2x0czJBZ; Tue, 23 Apr 2024 04:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qit5063720; Tue, 23 Apr 2024 04:52:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qiLN063717; Tue, 23 Apr 2024 04:52:44 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:44 GMT Message-Id: <202404230452.43N4qiLN063717@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: ca63710d3668 - main - linux: ignore setsockopt(IPV6_RECVERR) 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: ca63710d3668cf6f3cb4faf065d8b4eeffa028ad Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ca63710d3668cf6f3cb4faf065d8b4eeffa028ad commit ca63710d3668cf6f3cb4faf065d8b4eeffa028ad Author: Lexi Winter AuthorDate: 2024-04-22 21:58:11 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:36:34 +0000 linux: ignore setsockopt(IPV6_RECVERR) Under Linux, the socket options IP_RECVERR and IPV6_RECVERR are used to receive socket errors via a dedicated 'error queue' which can be retrieved via recvmsg(). FreeBSD does not support this functionality. For IPv4, the sysctl compat.linux.ignore_ip_recverr can be set to 1 to silently ignore attempts to set IP_RECVERR and return success to the application, which is wrong, but is required for (among other things) a functional DNS client in recent versions of glibc. Add support for ignoring IPV6_RECVERR, controlled by the same sysctl. This fixes DNS in Linux when using IPv6 resolvers. Reviewed by: imp, Jose Luis Duran Pull Request: https://github.com/freebsd/freebsd-src/pull/1118 --- sys/compat/linux/linux_socket.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 1e578982fced..36cffc979802 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -501,6 +501,11 @@ linux_to_bsd_ip6_sockopt(int opt) "unsupported IPv6 socket option IPV6_RECVFRAGSIZE (%d)", opt); return (-2); + case LINUX_IPV6_RECVERR: + LINUX_RATELIMIT_MSG_OPT1( + "unsupported IPv6 socket option IPV6_RECVERR (%d), you can not get extended reliability info in linux programs", + opt); + return (-2); /* unknown sockopts */ default: @@ -2112,6 +2117,14 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) name = linux_to_bsd_ip_sockopt(args->optname); break; case IPPROTO_IPV6: + if (args->optname == LINUX_IPV6_RECVERR && + linux_ignore_ip_recverr) { + /* + * XXX: This is a hack to unbreak DNS resolution + * with glibc 2.30 and above. + */ + return (0); + } name = linux_to_bsd_ip6_sockopt(args->optname); break; case IPPROTO_TCP: From nobody Tue Apr 23 04:52: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 4VNqVj5JbXz5JQpR; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVj43j1z4Y9v; Tue, 23 Apr 2024 04:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847965; 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=tB3Ep2ARDPq/u+hp+iF3x/c5k8ec0xW1eZ5J9Sxl6gg=; b=H1ClEB3nIAmpekHkx/XjOWaSvtd7++5jjXmPpbv8ItQVeg5+Cabj9MlTO0u8g/6Ca4/2XB sNadPqlaPupTdSsSDUQTmY6KVE0A3IZNiXnK3uk17r1EgDZhqD1h86szk1V6zX64pClGhf tqeR4adt4F9OKq+ZhDzxGIjfoL6oCIFXK4+1XbwmHeXHoQRpaLU1MeDtR1ckKqN4DQSVIz vD+6qj++BzSg1Qj5NlfyMDHqHUmudmq2qaTFgzAreuLpVZh2F72f2ucumpr1g/s/kO8OKc c+hiZMeEsIest4FxUILb2+luEQnN707mw3GGKIhq5eQfA5/TTIq/c/PLL4oa2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847965; a=rsa-sha256; cv=none; b=yIbAfpfmdQtS3oFlhUFjaj0PnHWG0l3SJ8sw21GqhUZhBg6qJxh1KkvJcqS+SJh0dkjhKh GuOhlRtkScUHdWArWekDYCFCz1DIOf8eykFEJ3vbaj3EzfX7Hwt2ZHRX+xa6Y66Ap5Ad/H xnwj91Ej1kPFgnG/ggqB/cmvdwff76X5zWUCcYbhkZUOrNkPkyl2h07oaUdP18QXgVSK1b rW4bxozZe9RCtQ7Od1YDg2GrmJ9d/H+uehJuwxNXCJ7Z1l8MSdmoeY5eskfKDGREZ9al/D a346zg9OCcB7p/FqmkrfSeuuk3FYWyQ4oypm66AdSaetOI/3r6PxX9uzNy7p0w== 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=1713847965; 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=tB3Ep2ARDPq/u+hp+iF3x/c5k8ec0xW1eZ5J9Sxl6gg=; b=kIXUnTxJqQLtGUrzgZNfDV9/leVmG3K9bPZ8J9xo6aqnVeojFf883Ql0hK8ThG2cfdCxLJ Sk5j5WnGljgAJD6/ciTNtMKMMXWTRb3NRxr3ZGbjEA9hrxp0Gfg4EzH1rVTaz3kq87cojt 6ts5/ynUuNPDArE5iZ7lKxLOnbCxbYSQfJaaHk/XQbSFzoM/OtH/PcrrXLOLX8aGGDj3pl 7yOL74BS62ytb9C86R3ZN3eoeY86rVWoXrTzZWNWnii18EARK/xljdNMkPqIRfTzcX01hV kVpRvtxv4PiTGKgePFKv2yXvEvDS+OFCFekx/N4fft9DgVopsSg/7GzM0l6RCw== 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 4VNqVj3dfdzJPg; Tue, 23 Apr 2024 04:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qjlj063764; Tue, 23 Apr 2024 04:52:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qj6g063761; Tue, 23 Apr 2024 04:52:45 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:45 GMT Message-Id: <202404230452.43N4qj6g063761@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: 6ca1f3de5769 - main - package: move hv_{vss,kvp}_daemon into hyperv-tools 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: 6ca1f3de57692994a57acb7632cc4cbfdcac6241 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6ca1f3de57692994a57acb7632cc4cbfdcac6241 commit 6ca1f3de57692994a57acb7632cc4cbfdcac6241 Author: Lexi Winter AuthorDate: 2024-04-22 22:00:55 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:36:35 +0000 package: move hv_{vss,kvp}_daemon into hyperv-tools Reviewed by: imp, manu Pull Request: https://github.com/freebsd/freebsd-src/pull/1170 --- usr.sbin/hyperv/tools/kvp/Makefile | 1 + usr.sbin/hyperv/tools/vss/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/usr.sbin/hyperv/tools/kvp/Makefile b/usr.sbin/hyperv/tools/kvp/Makefile index 4fb5f68ce2b1..a74af47c3f48 100644 --- a/usr.sbin/hyperv/tools/kvp/Makefile +++ b/usr.sbin/hyperv/tools/kvp/Makefile @@ -4,6 +4,7 @@ HV_KVP_DAEMON_DISTDIR?= ${SRCTOP}/contrib/hyperv/tools .PATH: ${HV_KVP_DAEMON_DISTDIR} +PACKAGE=hyperv-tools PROG= hv_kvp_daemon MAN= hv_kvp_daemon.8 diff --git a/usr.sbin/hyperv/tools/vss/Makefile b/usr.sbin/hyperv/tools/vss/Makefile index 03bd6eccd54f..70314f04a30b 100644 --- a/usr.sbin/hyperv/tools/vss/Makefile +++ b/usr.sbin/hyperv/tools/vss/Makefile @@ -5,6 +5,7 @@ DIRDEPS = lib/libc HV_VSS_DAEMON_DISTDIR?= ${SRCTOP}/contrib/hyperv/tools .PATH: ${HV_VSS_DAEMON_DISTDIR} +PACKAGE=hyperv-tools PROG= hv_vss_daemon MAN= hv_vss_daemon.8 From nobody Tue Apr 23 04:52: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 4VNqVl0bd9z5JQpY; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVk5d5fz4YQD; Tue, 23 Apr 2024 04:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847966; 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=4tirkCrWFvahilwahR6x0ooRIQJ/B+Wx5kk9fETeU80=; b=BvliL316T9aPVufnTLhy31udqSvwz9IDmqWhMYjnvJZeH/ciG7U2/imLAj1PK04tle/r5i n+yXZwHzLwJ1iqL6bx8yJULheKxO/aZ9iG9zEDMcJjvGNuAl9gtKYu/XUpbbFlDa9e43tj /bj+wnTnSaIEvQZIfJ2TTQ7Np9YeCGAtgszYGr8P7+fQzP/8eNL6Iu7g0+MSOeDaf+/NR5 IQvk/r3v2AnlHAM5rHbcbdkGaM2AajYn/Ia6O6jMPYJugTYs6ope2gcJTajyaVvQJtWWfK rJq4+HB7h9j3BhDkzVSU7T05p5CPS+3biMOiQI6JS/PFtPy6MKhFj0Lmc86HpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847966; a=rsa-sha256; cv=none; b=bZ4Boabs+ZNG+r8gatI6t3bhAlgwPtomqsLr+V/2Gkxb3kfTAL9899op1b9Rf0p6HmcktL 9SrxvAuYD04bcjP6fIU3r+IsjMAa27simRK3x1NuaiwYcWbx1NmmA6k53zNtfcP8XqdhUY uLHSwqdlZFNfkc025damiLBGpcBS6ERiFWgx7rovbL5YLpyLiZIcSNwFn+5qdVmKjYu1J5 Upkd10yYwqO/xvkjMahPIUxCre1bELBa1RTtCH3AVauiI16TdaFBWrtlXq8wtriIatGtwo NwZmyd+na10oTkbmwc1sdYTYPpB1KfvYqqBNqniMdmPmF14rHBQdNmtD9nrFKA== 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=1713847966; 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=4tirkCrWFvahilwahR6x0ooRIQJ/B+Wx5kk9fETeU80=; b=mlCXPBlquU6nIAuwKvakp0jdoXv4ToqYNL9NiZwoAest3Wyz77TG4zUU56gu50+3go2jl8 5z92yUuY71W0ljlILMvB8Dtz8yn++iNRIBRoOsC7aeBKVbvj12kPvoiOvGW19tuLNJ5LPE M0S+e3M5CZRR1Z+euRxvzoY8c9JDT8ZVVGagKdJiQp3Dk86ol/hubxcFfPr1WqriKEwfbV koi3zepWTnmz5m7N2ZskxzFdfoodB2vFCBuNUkvRphbSG5J8twtmzSPuXUpz+t7puwBwbJ 0YoV3aKH2J4FdKz9+X5VSJ+QyYV3QV855MZ4Rj6/YnpGTbh5s9FM92CUt7NNzg== 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 4VNqVk507lzJBb; Tue, 23 Apr 2024 04:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qk7D063817; Tue, 23 Apr 2024 04:52:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qksG063814; Tue, 23 Apr 2024 04:52:46 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:46 GMT Message-Id: <202404230452.43N4qksG063814@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: 7209444a80fd - main - package: move cron into its own package 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: 7209444a80fd37de0e19c7cf93623f84709827e3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7209444a80fd37de0e19c7cf93623f84709827e3 commit 7209444a80fd37de0e19c7cf93623f84709827e3 Author: Lexi Winter AuthorDate: 2024-04-22 22:05:53 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:36:35 +0000 package: move cron into its own package Reviewed by: imp, manu, Mina Galic Pull Request: https://github.com/freebsd/freebsd-src/pull/1172 --- lib/libpam/pam.d/Makefile | 5 ++++- libexec/rc/rc.d/Makefile | 5 ++++- usr.sbin/cron/cron/Makefile | 1 + usr.sbin/cron/crontab/Makefile | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/libpam/pam.d/Makefile b/lib/libpam/pam.d/Makefile index 218d79e12ab4..d2cc192f3599 100644 --- a/lib/libpam/pam.d/Makefile +++ b/lib/libpam/pam.d/Makefile @@ -7,7 +7,6 @@ NO_OBJ= CONFGROUPS= CONFS CONFS= README \ - cron \ imap \ login \ other \ @@ -18,6 +17,10 @@ CONFS= README \ CONFDIR= /etc/pam.d CONFSMODE_README= 444 +CONFGROUPS+= CRON +CRON+= cron +CRONPACKAGE= cron + .if ${MK_AT} != "no" CONFGROUPS+= AT AT+= atrun diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 15dcc811d9b4..6e9cb7fc50ae 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -17,7 +17,6 @@ CONFS= DAEMON \ cfumass \ cleanvar \ cleartmp \ - cron \ ctld \ ddb \ defaultroute \ @@ -129,6 +128,10 @@ CONFGROUPS+= RESOLVCONF RESOLVCONF= resolv RESOLVCONFPACKAGE= resolvconf +CONFGROUPS+= CRON +CRON+= cron +CRONPACKAGE= cron + .if ${MK_NIS} != "no" CONFS+= ypbind \ ypldap \ diff --git a/usr.sbin/cron/cron/Makefile b/usr.sbin/cron/cron/Makefile index 673ae49e01a1..206f001b8387 100644 --- a/usr.sbin/cron/cron/Makefile +++ b/usr.sbin/cron/cron/Makefile @@ -1,4 +1,5 @@ +PACKAGE=cron CONFS= crontab PROG= cron MAN= cron.8 diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile index 7b4901b7a281..5fbd2b44b2fa 100644 --- a/usr.sbin/cron/crontab/Makefile +++ b/usr.sbin/cron/crontab/Makefile @@ -1,6 +1,7 @@ BINDIR= /usr/bin +PACKAGE=cron PROG= crontab MAN= crontab.1 crontab.5 BINOWN= root From nobody Tue Apr 23 04:52: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 4VNqVm21t0z5JQgN; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVl6NC0z4YQQ; Tue, 23 Apr 2024 04:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847967; 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=Ss38+5bueEbCtzRPpdK75NW1qfESbjQFjFJawXfKmqo=; b=nq8xfmixU6Mj764aMQOxRk5VIs0+WNLAbYD6y0metgFn0/AzfCJDPTWx9NvDfkrIzOh/Xg MdZsPocA8ciOujRFk9jtKu4GsHXh604GGpGBvxaw3RO+lD7b1JvA4kzJGpVxWUqWT78ELo /IabAE0tWs3MMr3trnJxLwwx/6fS94FCrqB6Tq8C8iCjjqPPvRKgUpfytzT8/ChuwaDtqn KUndi1wp0IG7bttuxPSpjiqQrA1krhtZwedJa+bySiXYpXRJoOtIH84L84fwejv7Qn6u9x 86Z3VM/JJt6yXO+DZAvyitN+QLVMSw5y5Xq3Z1HfNYsPDc6CCjlO6Mp9x/u5/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847967; a=rsa-sha256; cv=none; b=HaplO7ZREsqA8guSjtRLRPpsrUtnHeAXbyYVc9PVMcoI51/YGoLC66QAgFyl8FfUk9FkgU Gr5ewLVwVJUPbBgWYZK1/ekWQR4JgoiiHcvNvbEiaSfFj0k24X8lvm2PDPDnry4UrBOvFF mf7nooR+db9teYpN7PxRHm3QyO8zjItF3JvbygkDSAuL5UK3dLOQt+cp1WiFqfeb7zd1Un uK9rJXDN8FS02eqHZ7lHSfPvNH8M3kUboJnRmmLUpZnXR0Pb3qIZcS1Y6XoZj8ocztSAUF voPq90AEBaOVFthkiUIf/1Djb46A93Mgg2VBdWyi38GOxfXnwYZsNY2p6P3jGA== 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=1713847967; 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=Ss38+5bueEbCtzRPpdK75NW1qfESbjQFjFJawXfKmqo=; b=Xeq2CpCueCFWbRWQL9KnQgsEIGOMnWClxH8PpqkdydfMW/x21PwBQZGaCbsvarVW2+y3qd DFuM7EMTyGktfaiZfcoYQKF5y2Y+bpn9PyE2xzrvJx9NuO+M2fs5rbfUxxFjbPaaC0YArt Hxaads0M/Aj5QOGKkPQ1CtNy0SjNaQmSG4M+p1U7S8EayaivChNZslcEV3ABgS3tfzAGaT rFsFdQYZRmXgZmOHaQ7XM6hCmNOOnbxu7wx2ohEec+TZIHMV3G1KxLMsb32dX3glXNpEBX 4oKct7ZTR7gZYZuOo76gtwSJy55JyaPOXGTASdZiRp/8L6+OgFqb4ASk1Bq/xQ== 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 4VNqVl5zVczHjn; Tue, 23 Apr 2024 04:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qlC6063868; Tue, 23 Apr 2024 04:52:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qleK063865; Tue, 23 Apr 2024 04:52:47 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:47 GMT Message-Id: <202404230452.43N4qleK063865@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: 8aaa58ada45e - main - package: add DESC and COMMENT for cron package 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: 8aaa58ada45e830fc4ca12418e5262e84b87b648 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8aaa58ada45e830fc4ca12418e5262e84b87b648 commit 8aaa58ada45e830fc4ca12418e5262e84b87b648 Author: Lexi Winter AuthorDate: 2024-04-22 22:05:54 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:36:35 +0000 package: add DESC and COMMENT for cron package Reviewed by: imp, manu, Mina Galic Pull Request: https://github.com/freebsd/freebsd-src/pull/1172 --- release/packages/Makefile.package | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index 72a521eebe8b..c7d906b387fd 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -37,6 +37,8 @@ certctl_COMMENT= SSL Certificate Utility certctl_DESC= SSL Certificate Utility console-tools_COMMENT= Console Utilities console-tools_DESC= Console Utilities +cron_COMMENT= cron(8) and crontab(1) +cron_DESC= cron(8) and crontab(1) csh_COMMENT= C Shell csh_DESC= C Shell ctf-tools_COMMENT= CTF Utilities From nobody Tue Apr 23 04:52: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 4VNqVn3Zljz5JQmG; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVn0GMPz4YTL; Tue, 23 Apr 2024 04:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847969; 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=yjq0Krc5xEW+9FE9/ms6jA5mHEw6BVzgmlUHHP0b6k8=; b=FumT0BQQftmqwVPGqx4172GYVlVkPpiYPf43XJ0ymsp7Y2QBV3haN49RF3cRab1mTpHE+e ey0JnRiJ5pcDdO8fCxh9FTkIX0IegbaMehvqLetMnRfCwRLJaMDOWdJfi9F6MTzhmHaWDk R9NNu4SMyoCJHfIi3WRF5jhe+4vNG5M7SNkRsp0FJ/5K2dlbxxQwxz+pbN9zE9udRjSlx5 +AEsry+uVPBZLR2hb99hkhsdRQgx1N3IJpJKYyb6wjwGUJuJH+alxQfd6RRGUNd+cIGBn6 eL+3tUwlm29Jj4rULwo0GsgJg/8wsn6Lwee/s+BoZbvvsvgbEavkMUNLdbliWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847969; a=rsa-sha256; cv=none; b=nvrB3CYJJG87KD6nghBTyWid+qmYQ14jpRdFASZEeIIwVPgDXW3/3ED4dCm6daDdlSY8Pe wB1R2PYLGyAR/C/LoAUErPCybwqD0EdYva4XZOo5z7o//1AI7K0vr+4/fpIXJQubE5z4cQ CBkM8SpDCEFD59ItGF2r0QHvW/cGybiQTFi2u6bXgYGduHmrQAZ1QaJAW5SSF3ZlR8vBIA KOkokZsbaVSxEudbfVcf+IY4jdRkzG+cel7NgkgZFXsWwv/q8KEthpKvIkBwJ2uLJ2s2up XmFZO6mDcfJyWYSZP/Zh1MCW8Z4mJo+ri/ce8d4TBQBQk9N3RbldJuVavqNdcw== 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=1713847969; 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=yjq0Krc5xEW+9FE9/ms6jA5mHEw6BVzgmlUHHP0b6k8=; b=XGx/rTRxCnND5z/frSlO0eV8lEVIBbn4DuhF2bIGuONSZJHx3BmiIsitMrNAEXdOHXhWw5 Fkhy6BTaXq1yGPlED4F5nwU697SfpTORuh4FcsrBN7ZnUn7A1E78hw//rZ9YT/SX4gtYot PVJwhUae5NqXFxYizKUzeHYPDk18eytHIvzOeKD0A/kN75xlKPzdfQ1Gd7L4XTeD7xxKHr KxU+pkXJfg2iYVpjDH2wKJrgwhrqsv8Dkvrv+5dce61MBaVfYsRI2pKdaFBKqHDY6odqdU 8uA6eGHPKyqlhmwGlKBClmOtSz8BCmdLkn1jP3v20CFhWFB/6YN33lrcsA73gw== 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 4VNqVm6z5FzJBc; Tue, 23 Apr 2024 04:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qmGW063913; Tue, 23 Apr 2024 04:52:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qmLl063910; Tue, 23 Apr 2024 04:52:48 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:48 GMT Message-Id: <202404230452.43N4qmLl063910@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: c3dd71ab4c1c - main - share/examples: move examples into appropriate packages 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: c3dd71ab4c1c1edac99eae505dae1d5628a03ab8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c3dd71ab4c1c1edac99eae505dae1d5628a03ab8 commit c3dd71ab4c1c1edac99eae505dae1d5628a03ab8 Author: Lexi Winter AuthorDate: 2024-04-22 22:08:22 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:36:35 +0000 share/examples: move examples into appropriate packages Allow a new variable SE_xxxPACKAGE to be used to place an example group into a package. Move the following examples into existing appropriate packages: - bhyve examples into FreeBSD-bhyve - bootforth examples into FreeBSD-bootloader - csh examples into FreeBSD-csh - ipfw examples into FreeBSD-ipfw - jail examples into FreeBSD-jail - pf examples into FreeBSD-pf - ppp examples into FreeBSD-ppp - printing examples into FreeBSD-lp - uefisign examples into FreeBSD-efi-tools - ypldap examples into FreeBSD-yp - hast examples into FreeBSD-hast Move all other examples into the new 'FreeBSD-examples' package. This removes a significant number of files from the FreeBSD-utilities package. Reviewed by: imp, manu Pull Request: https://github.com/freebsd/freebsd-src/pull/1176 --- release/packages/Makefile.package | 2 ++ share/examples/Makefile | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index c7d906b387fd..2c0aa259737d 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -65,6 +65,8 @@ efi-tools_COMMENT= UEFI Utilities efi-tools_DESC= UEFI Utilities elftoolchain_COMMENT= ElfToolchain programs and libraries elftoolchain_DESC= ElfToolchain programs and libraries +examples_COMMENT= Examples in /usr/share/examples +examples_DESC= Examples in /usr/share/examples fetch_COMMENT= Fetch Utility fetch_DESC= Fetch Utility ftp_COMMENT= FTP Utilities diff --git a/share/examples/Makefile b/share/examples/Makefile index 504f3d7807dc..0425e36c1cf5 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -45,6 +45,7 @@ SE_BSD_DAEMON= \ .if ${MK_BHYVE} != "no" LDIRS+= bhyve SE_DIRS+= bhyve +SE_BHYVEPACKAGE=bhyve SE_BHYVE= vmrun.sh PACKAGE_bhyve/vmrun.sh= bhyve .endif @@ -57,6 +58,7 @@ SE_FREEBSD_VERSION= \ README SE_DIRS+= bootforth +SE_BOOTFORTH_PACKAGE=bootloader SE_BOOTFORTH= \ README \ boot.4th \ @@ -67,7 +69,8 @@ SE_BOOTFORTH= \ screen.4th SE_DIRS+= csh -SE_CSH= dot.cshrc +SE_CSHPACKAGE= csh +SE_CSH= dot.cshrc SE_DIRS+= drivers SE_DRIVERS= \ @@ -98,9 +101,11 @@ SUBDIR+= ipfilter .endif SE_DIRS+= ipfw +SE_IPFWPACKAGE= ipfw SE_IPFW= change_rules.sh SE_DIRS+= jails +SE_JAILPACKAGE= jail SE_JAILS= \ README \ VIMAGE \ @@ -203,6 +208,7 @@ SE_PERFMON= \ .if ${MK_PF} != "no" SE_DIRS+= pf .if ${MK_STAGING} == "no" +SE_PFPACKAGE= pf SE_PF= \ ackpri \ faq-example1 \ @@ -223,6 +229,7 @@ SE_PPI= \ ppilcd.c SE_DIRS+= ppp +SE_PPPPACKAGE= ppp SE_PPP= \ chap-auth \ login-auth \ @@ -240,6 +247,7 @@ SE_PPP= \ ppp.secret.span-isp.working SE_DIRS+= printing +SE_PRINTINGPACKAGE=lp SE_PRINTING= \ diablo-if-net \ hpdf \ @@ -342,13 +350,16 @@ SE_SUNRPC_SORT= \ LDIRS+= uefisign SE_DIRS+= uefisign SE_UEFISIGN= uefikeys +SE_UEFISIGNPACKAGE=efi-tools .endif SE_DIRS+= ypldap SE_YPLDAP= ypldap.conf +SE_YPLDAPPACKAGE=yp .if ${MK_HAST} != "no" LDIRS+= hast +SE_HASTPACKAGE= hast SE_DIRS+= hast SE_HAST= ucarp.sh \ ucarp_down.sh \ @@ -379,6 +390,11 @@ SER_${d:tu:C/\//_/g}+= ${d}/${f} .endfor FILESGROUPS+= SER_${d:tu:C/\//_/g} SER_${d:tu:C/\//_/g}DIR+= ${SHAREDIR}/examples/${d} +.if ${SE_${d:tu:C/\//_/g}PACKAGE:U} != "" +SER_${d:tu:C/\//_/g}PACKAGE= ${SE_${d:tu:C/\//_/g}PACKAGE} +.else +SER_${d:tu:C/\//_/g}PACKAGE= examples +.endif .endfor BINDIR= ${SHAREDIR}/examples From nobody Tue Apr 23 04:52: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 4VNqVp3tTCz5JQRc; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVp0yMlz4Yf6; Tue, 23 Apr 2024 04:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847970; 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=G9U2Lh40M+gicnhonok4u/4v52XIzBfsfp7P0916JOk=; b=HUd0Zgvybbc2ai92xLk7JLNsngoMM7SjdmOluiksJ5kNCFuLsN7/riOr4fNZr7Xl7E5hxX pNKKYzlslu8YJlt7RQa4N+O/wq4M0I7wNz2C1au+3jqMCB5ONrIZY/sYep7788BEz4Au4l +38tojGHaieyuQ1cxuQ1QMy5uEhgNxTAC5ONre+lRmRrE+Ss2mrL5eBnizQUTHMyahsHBm jRZ+sDJT0Qo6/WCeYFKA8fIFO2U25+UCNUr0huUohxXrMy9pBRjZ70PUy7tJLhv/owQ1Jw 5fgVNdN+tAwbHsMzBxRXO83DoJgLuXjqVwOoikSKbFhKtyqYiS2z41ran1wagg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847970; a=rsa-sha256; cv=none; b=QCWun6BIxYrSyrWjwREi4cTTgNFmgmIIYkWs54xf/RJZKNg5bwcgAs4JL6aqdIRBQPi64H jWMo5pYzb5Exdqitpbpy6OYzp1nCrIbffDKOCI7rnDVUw014Vq4O1Qx6fBL3y9WOf4JWdV dELnubiqpx6IphkRvvoS0NhMlWRItZ3CyrFWELpEtXvzUknMqcW2jnk1GqELn4sIrhRtvZ q0uRxT5NFZ6O+Wr0LmEX0sD3cfbXyMZ7fHMDl1R+ThbWRUOquNjHpUgGb0jFTWgXLmYsM/ uMjrM6yV4iG3QfIqv6oUWy2EYENuh1xGFG1Jo+F5YcPfeHtxpN5hMJa+6ZmSdA== 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=1713847970; 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=G9U2Lh40M+gicnhonok4u/4v52XIzBfsfp7P0916JOk=; b=SFNEEfALFfLBQAd+k3mCUF6s0wKfS1xUcrAfvYzZ8c7WH6LbDy5snZjHFQJBl3tbdp4BSO jWp02o6CTRGMoVjyeo/bFb/sMcOP0FkffMNpyRlhnyniKGXvLQzmO8Ui+DzzDcTz1NadWy 0JZO9aCh6Rcq7bBQHORbonB/Mszo4YaD5F6mQu8/ie//SDUvpFh02+c8K9CqKUfGY97l0i wvSuGqjUZ3BMkiOZUgqJrokr98ONH53itG+a54+WQlNLC3lxd47eokd61fd/opRzsaUF6n hB6hbsXfpGTTIkbz5bKDobjKB6pe+1oFep8y6u1dyC9qgY6sLnTuis2zCFRUPA== 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 4VNqVp0VlrzHjp; Tue, 23 Apr 2024 04:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qnwr063967; Tue, 23 Apr 2024 04:52:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qnCC063964; Tue, 23 Apr 2024 04:52:49 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:49 GMT Message-Id: <202404230452.43N4qnCC063964@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: e96d0d746844 - main - umount: Support partitions & slices with -d 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e96d0d7468446d7cabd76ae213889297711bb144 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e96d0d7468446d7cabd76ae213889297711bb144 commit e96d0d7468446d7cabd76ae213889297711bb144 Author: Ricardo Branco AuthorDate: 2024-04-22 22:08:58 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:36:35 +0000 umount: Support partitions & slices with -d option Signed-off-by: Ricardo Branco Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1183 --- sbin/umount/umount.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 5314f8e0c56f..c15fd13d065a 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -673,19 +673,17 @@ md_detach(const char *device) char *eptr; int fd; - memset(&mdio, 0, sizeof(mdio)); - - mdio.md_version = MDIOVERSION; - mdio.md_options = fflag ? MD_FORCE : 0; - if (strncmp(device, DEV_MD, sizeof(DEV_MD) - 1)) { if (!all) warnx("invalid md device: %s", device); return (-1); } + memset(&mdio, 0, sizeof(mdio)); + mdio.md_version = MDIOVERSION; + mdio.md_options = fflag ? MD_FORCE : 0; mdio.md_unit = strtoul(device + sizeof(DEV_MD) - 1, &eptr, 0); - if (mdio.md_unit == (unsigned)ULONG_MAX || *eptr != '\0') { + if (mdio.md_unit == (unsigned)ULONG_MAX || eptr - device == sizeof(DEV_MD) - 1) { warnx("invalid md device: %s", device); return (-1); } From nobody Tue Apr 23 04:52: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 4VNqVq4ZPxz5JQmK; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVq2d9gz4YYm; Tue, 23 Apr 2024 04:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847971; 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=BDp06HwhGMXN8zHT8yHG/pwclzY980h+zySq8nsOE9s=; b=Z+kBjUDHCg/+gmZNhQVQg5weYfQ82FzEDcWtS12O+hBOXe8mL06EqkQC9wNJizM08FnDCm qAJvrqU2oucQ87QuLf8uuJzVtrF9HpmaGeBD6bIfjX096WoAC8118Q395cSwL2j9KSWY60 r2QXzS6ZHf9+QIgIYRL06Av4lj902kG2icHNB/JmGUq9B48mZOs5usaqVMn9cQwLhOUp4X LODkVaM6RxjPDEHX2lLyf+8u7ARz50oFMpogBMKxuV7Xc3m+G0G4PA/ZkjonNjwLsNwHaD Nb9eplioQ0nxP3AJJg6TTihpR4k9vY1mlHZoyV9uQztW7bWIqzLJVmdSulRrAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847971; a=rsa-sha256; cv=none; b=U2USyPK1UhumJTd7wkBgHiCOnot/pcHCN+bpijWyS+aRdm/+yqoKte6BytXDOpm1qEh4k2 G+/+K0WC8GaOxuvbnqZcbhz51o56nbrFpWhG+m0yhuPI/6bAepz6N4dWKCrX640bC8Al1w fqfZegjmpcwckKOFnIFMeyh7xiNGZ1hlHIAspbTG7C5C+bFdS3Wwt94Na1RAN/XwRjzUWi l2pCXt2QX798JTcggkY+1s70LNOn6Sft7JksbtH0msKdBl18YgQcqJZwygzdXvAP9WB9u0 fNRTRhRg4P4kKL/F6cFeY/dICIRoRvDHmr//c2QbFG7ly8JDFf3kWKRYHPdXDA== 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=1713847971; 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=BDp06HwhGMXN8zHT8yHG/pwclzY980h+zySq8nsOE9s=; b=azTUHP5Pg5xryY82wD2/GGvjGf3MkzwVFdz4KnaMGml2e0dZt8Azgll3mYGb7koQG1DC7p Vgyo6F0D9UsZ3TJ+yYu9yPzueXAjvjY0pvBDxWLC4up0tBvZ4BIjBWjB7XFNRNoDeTxRU3 gvsBbu8iEuKgDKxdLM9d0qxQp34QXmQPV/ufGVZDXwoNTWw6Oes4UIIp9U8X/wWDGBuQmU EBuf4vNVH72fTkjaNomGn3xn23ceOD1KPEsacK7yrJfJfwA4XBOZdQjucdjZS/8u0ltaRx fSXOWVGtowvq8sZDHxpgpPgI4Q6bcRCw2vlyei9ynNUDbkL+WJFpb/BspHu5gA== 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 4VNqVq1hrjzHp0; Tue, 23 Apr 2024 04:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qphA064018; Tue, 23 Apr 2024 04:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qp34064015; Tue, 23 Apr 2024 04:52:51 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:51 GMT Message-Id: <202404230452.43N4qp34064015@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: 05a95d19cb24 - main - alc(4): disable MSI-X by default on Killer cards 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: 05a95d19cb248203acdd4e069d3eedfe597c3b49 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=05a95d19cb248203acdd4e069d3eedfe597c3b49 commit 05a95d19cb248203acdd4e069d3eedfe597c3b49 Author: Lexi Winter AuthorDate: 2024-04-22 22:09:26 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:36:35 +0000 alc(4): disable MSI-X by default on Killer cards Several users with alc(4)-based "Killer" Ethernet cards have reported issues with this driver not passing traffic, which are solved by disabling MSI-X using the provided tunable. To work around this issue, disable MSI-X by default on this card. This is done by having msix_disable default to 2, which means "auto-detect". The user can still override this to either 0 or 1 as desired. Since these are slow (1Gbps) Ethernet ICs used in low-end systems, it's unlikely this will cause any practical performance issues; on the other hand, the card not working by default likely causes issues for many new FreeBSD users who find their network port doesn't work and have no idea why. PR: 230807 MFC after: 1 week Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1185 --- share/man/man4/alc.4 | 6 +++++- sys/dev/alc/if_alc.c | 24 +++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/share/man/man4/alc.4 b/share/man/man4/alc.4 index 478558657799..5ce5ce97d68a 100644 --- a/share/man/man4/alc.4 +++ b/share/man/man4/alc.4 @@ -136,7 +136,11 @@ This tunable disables MSI support on the Ethernet hardware. The default value is 0. .It Va hw.alc.msix_disable This tunable disables MSI-X support on the Ethernet hardware. -The default value is 0. +The default value is 2, which means to enable or disable MSI-X based on the +card type; for "Killer" cards (E2x00) MSI-X will be disabled, while on other +cards it will be enabled. +Set this to 0 to force MSI-X to be enabled, or 1 to force it to be disabled +regardless of card type. .El .Sh SYSCTL VARIABLES The following variables are available as both diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index 86e120a8b3f6..86ae705667de 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -91,8 +91,14 @@ MODULE_DEPEND(alc, miibus, 1, 1, 1); /* Tunables. */ static int msi_disable = 0; -static int msix_disable = 0; TUNABLE_INT("hw.alc.msi_disable", &msi_disable); + +/* + * The default value of msix_disable is 2, which means to decide whether to + * enable MSI-X in alc_attach() depending on the card type. The operator can + * set this to 0 or 1 to override the default. + */ +static int msix_disable = 2; TUNABLE_INT("hw.alc.msix_disable", &msix_disable); /* @@ -1410,6 +1416,14 @@ alc_attach(device_t dev) case DEVICEID_ATHEROS_E2400: case DEVICEID_ATHEROS_E2500: sc->alc_flags |= ALC_FLAG_E2X00; + + /* + * Disable MSI-X by default on Killer devices, since this is + * reported by several users to not work well. + */ + if (msix_disable == 2) + msix_disable = 1; + /* FALLTHROUGH */ case DEVICEID_ATHEROS_AR8161: if (pci_get_subvendor(dev) == VENDORID_ATHEROS && @@ -1439,6 +1453,14 @@ alc_attach(device_t dev) default: break; } + + /* + * The default value of msix_disable is 2, which means auto-detect. If + * we didn't auto-detect it, default to enabling it. + */ + if (msix_disable == 2) + msix_disable = 0; + sc->alc_flags |= ALC_FLAG_JUMBO; /* From nobody Tue Apr 23 04:52: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 4VNqVr4p4Pz5JQlP; Tue, 23 Apr 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqVr373Gz4Yn9; Tue, 23 Apr 2024 04:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713847972; 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=0Ajfk6IUMnYRkWegI07ejOam99eJrTvIjd7BvKedRNo=; b=tvv57GVh28NPBG/MFPHCL5bVetgbx2DHFrqyeKSCjLJx9pB7Gibepz5n/uqLawVK5Wfti4 pPGMRE/bY/unk5s3BoKeMSZ9QxfuM8ybuCJgAT2zO4ZLDVGEqxRyfTHgxFtWkAVr6bJuAf GOU60EM6lDo66kAClYOClFTkCcfkzI6qD26ZoniGmnajERorF6m4lUG8jRmu8y65eoUthL iUwDcPyD/dPVqYC3vHe3hmZC5SwAJuzTWjwbpUGXlHwKzvVA8m6bnumSeBT4BXEkGqH6pB ZFeHsYIk8n6PH+2v6rltr4HT14XolodnkvbtBqHLvt9XGgzhl7nA5b6XFQEocg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713847972; a=rsa-sha256; cv=none; b=XU9gj12gDQv8t4UQbQHp/82lchPpYZY2gdBqatl4E/rMuqSnZqwkh3HM20r36JFCwDr/y/ VlWi4F9MeX0BKQAvZxOrcX/f/0a2cykqWAaLbG3L03tRCtLne4F5+XO/FdJXR+XZ4Sa+AQ pV/73c6pMYm6B2Heb/uHZjdVxc0HxHrdBK1KVzk9nYjBEXoRC1C7ih7EYcwX8DMlAtzj6j Qw3RQOJdqduesWRaAYM5jZSvL2OOcHqEgBmYtM4+W35NuulZMlxrqaBh24p6vMZ4QPWl1U TK1VEw2TtZ4P0hj0VtaYhp/zrM5fTXmgcaGE4Kll6oFsC7Socd/jBrNNmOJiTg== 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=1713847972; 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=0Ajfk6IUMnYRkWegI07ejOam99eJrTvIjd7BvKedRNo=; b=Dk7UGjpNsX/g6s4IOPOs2EJpsSg2dEOSa8vpC0qIlJRL07OjbTRaWoyj9OQfV1kHvBwD7/ tJb0FeznVViBSCOE1kmfkeq6Vfv27Vn3O/EqkWgc6OtF8cNj02AzJsQI6rRO72tVYCa7x2 QbE2XjH9d6+81DNFnXmTve8rwHnJQ2WzRKchsSga8cEeSMaeCOM8D5dpZ04+LudBCR4qWD RG7qXj69NcqT2WFFOSN1aVcrybNi5GcSEgVyXHelcWQ82KpjikWgrJbjZ0FJ+/F7spaWt5 ja2/nHb94MV/9cRKfSWvBu0jLTN5TXl7z5YOl9dNxYnMx1dcLZvabmfVq6PVLg== 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 4VNqVr2jNqzJBd; Tue, 23 Apr 2024 04:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N4qqRW064069; Tue, 23 Apr 2024 04:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N4qqYI064066; Tue, 23 Apr 2024 04:52:52 GMT (envelope-from git) Date: Tue, 23 Apr 2024 04:52:52 GMT Message-Id: <202404230452.43N4qqYI064066@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: f578d0199761 - main - ifconfig tunnelfib is implemented in wg(4) 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: f578d0199761136e82850d8f086b8806f2dbad8d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f578d0199761136e82850d8f086b8806f2dbad8d commit f578d0199761136e82850d8f086b8806f2dbad8d Author: Gregory Shapiro AuthorDate: 2024-04-22 22:10:00 +0000 Commit: Warner Losh CommitDate: 2024-04-23 04:52:14 +0000 ifconfig tunnelfib is implemented in wg(4) MFC After: 1 week Reviewed by: imp, zlei, kevans Pull Request: https://github.com/freebsd/freebsd-src/pull/1186 --- sbin/ifconfig/ifconfig.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index b88772e0e5e9..e8a18d08635b 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -549,9 +549,10 @@ A FIB .Ar fib_number is assigned to all packets encapsulated by tunnel interface, e.g., .Xr gif 4 , -.Xr gre 4 +.Xr gre 4 , +.Xr vxlan 4 , and -.Xr vxlan 4 . +.Xr wg 4 . .It Cm maclabel Ar label If Mandatory Access Control support is enabled in the kernel, set the MAC label to From nobody Tue Apr 23 05:03: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 4VNqks525Wz5JRPd; Tue, 23 Apr 2024 05:03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqks4DnVz4d6b; Tue, 23 Apr 2024 05:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713848597; 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=0jFi3KBnHGz4d6cNU1+t8yMbae6HN5ABsIehz4UbFVc=; b=kPvdlMpUWykwnmbsD2UzZtU3Uuxth9iqIH38TZ6Cn6KfE9rFAqntVolvMnRvzmsPbrq6Jv 7xbaArhRMIzQnCcgWRDJRkI55+qMOM0Oyb8FtxfXL22YTdGzPG7mYQF2vSHSxbSSoTQxjr OLL/8ACZeq2CNW1C6Rm5ArW1XBQB2seSHYbgFeKrT06lv7xTkoizscBd+7D5tvrMJrGg5s 4HdoyWWXX3xy5aV1Z2vlIqP9NBJvIkNow2qwiG8RoRYzr8Y+i5/ApjXldDtPxFQCX3hh4H jYY0TPk6FKzc56R2yxlfu1sD+uYjUTXhsFNtdQTeF4qAXdx2XdWjr2XAamyeiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713848597; a=rsa-sha256; cv=none; b=lcOxIZHx+Rua8WeSw3jSv+yrsPGM3/QsPewnbG8Qcwk9Xj5C4DNj4DeU4xZjey31vm6iOr 9hS/zYO3eCu/GxGXOMPJya1DqZm7psYnFJjs8t7247shFhnuLCDOOKGBXf7X+/1ZZwHFjR svK1z2rOLWQI9D220RPBKwD5C/3h37aVDk30qpIsdR5lbhlXD5B67ZWv+8GunHFG2Ihye5 BOT7xd1GaeDdMVghud/AHsB01LG4PIV8+rJY4lCFiXrHd1F3iTw1ZpZpU8vGcDG3EQCsQW mmqGygNGJP+idK7yQJM5p+7Zu9CneC6Mv5yGK64POuEqj1B4IBgOeoMReUxbxg== 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=1713848597; 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=0jFi3KBnHGz4d6cNU1+t8yMbae6HN5ABsIehz4UbFVc=; b=INJs4n+39M08SPNMijEuuMYe24xZEOoQ042ycwEG4xcCT9keiGd69vRACJQNB8HC0iaO7L 9i324Yo33AiNmSCb9hAX7/IburjAvwiYXK+dLtb2OHo1HvuzpEbkGt6cp7oSrqm9RjS426 npicX1Oqzq1w1mvOl5bRizLxEIv4T6ThO6FwGCbu04evYcYc0631ld00Nob4j1UpLOMSYv QqAgjapQABmpno0w4/X/4ZK1Tmxz9jmiZDZa1HQAO7G6hbpezazm6LnxAIQgxaYzErB6Xu z4bXrOVcdWJhDd6MuDeUSfcJYHsSNzZpu3kxFPVsuxM+z98zpyAYvxRG4bcGuA== 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 4VNqks3rLhzJjL; Tue, 23 Apr 2024 05:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N53Hdn081672; Tue, 23 Apr 2024 05:03:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N53HWZ081669; Tue, 23 Apr 2024 05:03:17 GMT (envelope-from git) Date: Tue, 23 Apr 2024 05:03:17 GMT Message-Id: <202404230503.43N53HWZ081669@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: bac2eea13ae3 - main - swab.c(libc): use a simplified version of byte swapping 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: bac2eea13ae3e4dc8fd2aec261b2a18930138495 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bac2eea13ae3e4dc8fd2aec261b2a18930138495 commit bac2eea13ae3e4dc8fd2aec261b2a18930138495 Author: rilysh AuthorDate: 2024-04-22 21:52:25 +0000 Commit: Warner Losh CommitDate: 2024-04-23 05:01:54 +0000 swab.c(libc): use a simplified version of byte swapping This version of swab function simplifies the logic of swapping adjacent bytes. Previous version of swab() used an arbitrary unrolling, which was relevant back in the day but unnecessary for modern compilers, as if the input size is known at compile time, they can do it automatically. This version of swab() is inspired by musl. A similar version can be found at: https://github.com/openbsd/src/blob/master/lib/libc/string/swab.c Signed-off-by: rilysh Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1086 --- lib/libc/string/swab.c | 58 ++++++++++---------------------------------------- 1 file changed, 11 insertions(+), 47 deletions(-) diff --git a/lib/libc/string/swab.c b/lib/libc/string/swab.c index e3765fa08d07..2b044d68ca46 100644 --- a/lib/libc/string/swab.c +++ b/lib/libc/string/swab.c @@ -1,35 +1,6 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Jeffrey Mogul. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright (c) 2024 rilysh */ #include @@ -37,22 +8,15 @@ void swab(const void * __restrict from, void * __restrict to, ssize_t len) { - unsigned char temp; - size_t n; - const unsigned char *fp; - unsigned char *tp; + const unsigned char *f = from; + unsigned char *t = to; - if (len <= 0) - return; - n = (size_t)len >> 1; - fp = (const unsigned char *)from; - tp = (unsigned char *)to; -#define STEP temp = *fp++,*tp++ = *fp++,*tp++ = temp - /* round to multiple of 8 */ - for (; n & 0x7; --n) - STEP; - for (n >>= 3; n > 0; --n) { - STEP; STEP; STEP; STEP; - STEP; STEP; STEP; STEP; + while (len > 1) { + t[0] = f[1]; + t[1] = f[0]; + + f += 2; + t += 2; + len -= 2; } } From nobody Tue Apr 23 05:04: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 4VNqlr11scz5JRKx; Tue, 23 Apr 2024 05:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNqlr0X3pz4dS4; Tue, 23 Apr 2024 05:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713848648; 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=q74tubgfojgLAKPcyMB0VPSxblQCh2SzfFGOljNlTTw=; b=oZrWSDq/3EKsoDQwCzWs9Amxzy0vUNOZWLKMWAd9Pm00WoF4PfSwnSiBRRLTJ8nzBdkX2J o9Cm6fQvrrnGtUxMGiMMhnTTmOAwgyGYm/dh1h9KzVc2m/s08uyGVm7gQwJlSHHzvvk7SL k1zoJVi9gqxan19yVIyoU0NKJ4dovk4UlubTt5Fq5ZKcno9iiaQsSUnqlJthz6E+XIos4X WLLU0SXtB3IbhFUaFIrEATDh0HUCeBdvCEamJUir8zFey8cb0SZkiHvn7m+2mdt+Ag1yHm B0UpzHWvmLeyvtaiQdezD+NXj0j7EyTO1ZS+Dpz21LViAq7o7Azu9kfYm+9W6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713848648; a=rsa-sha256; cv=none; b=AzIWAEWdzU+MFjn012q46c+TCqIeF3Flb6wsT+AXHJM0p6YL8FttsdjdfCw3IKXjbGWqqD ZDVpF31zsLQ0HIWd6iLOonZbhnmERsGS1WouJ9bEHLZVoM3oKAT/s5+1mepR1QFWWCcYiG Jsiz/DkBuDeNTZmheP7j+pOZwKICHl+7Rx5F0u/BIP3wiPsYzlg/dYd9srecbin5HeB+vB hXkmzpa/OAU7C6bpa/XQsKq4jC0rL9YmP2FWmM1nXOl1MyMMdL8W9vGQZL4cI90NaA2/jy RMkwiK795xy/nmJM7Kepegu/Q4cA7PKbqCQtrAE/fChkbxpvoFt3mt9z7LnUnQ== 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=1713848648; 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=q74tubgfojgLAKPcyMB0VPSxblQCh2SzfFGOljNlTTw=; b=b9mUwK35bHb2IwFoobKyzyC6e/O0TK/RhOtJi/idg3jo46UD5jIy/7fhveonHKjkPU8xhe gPQLS+ePyPfwx43eNq6G+C7KS/Nf0cfghDoP4bdkTEtXbDLkPNqx8lgQzVolB4xZF2kUyQ rge6Xnzu4ptMT9lSYgo7ZUks4MzNbR+NBAtn2PxmYUCs/2c6Dkb3O4Yk0vcRGmI9hP79vv 8q7NGhHKs6sP3GJwYivqnAc6g2OwA/EiU2nF9trS5zfjPn3WImfvYF5itdo4FOgbfCTyTq Tblw3wSxxFrLUxddA0ay2VISVI+bUlrqOYUNgyoHnYX2zEEeJQSaJZu3yfUuzQ== 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 4VNqlr07RjzJfr; Tue, 23 Apr 2024 05:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43N547a3081908; Tue, 23 Apr 2024 05:04:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43N547xn081905; Tue, 23 Apr 2024 05:04:07 GMT (envelope-from git) Date: Tue, 23 Apr 2024 05:04:07 GMT Message-Id: <202404230504.43N547xn081905@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: 74adb39cf2a5 - main - zfsbootcfg(8), zpool_influxdb(8): move to the zfs package 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: 74adb39cf2a545e966390c9d7df85cd514db0130 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=74adb39cf2a545e966390c9d7df85cd514db0130 commit 74adb39cf2a545e966390c9d7df85cd514db0130 Author: Lexi Winter AuthorDate: 2024-04-22 22:07:30 +0000 Commit: Warner Losh CommitDate: 2024-04-23 05:04:03 +0000 zfsbootcfg(8), zpool_influxdb(8): move to the zfs package These tools are only useful on a system running ZFS. Reviewed by: imp, manu Pull Request: https://github.com/freebsd/freebsd-src/pull/1175 --- cddl/usr.libexec/zpool_influxdb/Makefile | 1 + sbin/zfsbootcfg/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile b/cddl/usr.libexec/zpool_influxdb/Makefile index 7c0a245903a7..bd50df9e3c4c 100644 --- a/cddl/usr.libexec/zpool_influxdb/Makefile +++ b/cddl/usr.libexec/zpool_influxdb/Makefile @@ -4,6 +4,7 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/cmd/zpool_influxdb .PATH: ${ZFSTOP}/man/man8 +PACKAGE=zfs PROG= zpool_influxdb MAN= zpool_influxdb.8 BINDIR?= /usr/libexec/zfs diff --git a/sbin/zfsbootcfg/Makefile b/sbin/zfsbootcfg/Makefile index 1833fc542ce0..318de8a030fa 100644 --- a/sbin/zfsbootcfg/Makefile +++ b/sbin/zfsbootcfg/Makefile @@ -1,3 +1,4 @@ +PACKAGE=zfs PROG= zfsbootcfg MAN= zfsbootcfg.8 From nobody Tue Apr 23 05:34: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 4VNrQn1kFYz5JTqt; Tue, 23 Apr 2024 05:34:25 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNrQm41f0z4nn8; Tue, 23 Apr 2024 05:34:24 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1713850457; 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=kknUAAxE3vW4Xoqt9g2joOVL6nSts+K0zN7kBgvN78w=; b=DVR/16BKfandWWYpsWedYYYt3jjK5f3D3rvz0cZF62h5LwdAIGj91b2oTHZbt981diEb1s 2xPsg14LrUbF1uA/9vlB1dCoJ+6zDf3cdFQkhIdbsei1Es45aeIXvxauuZBNScFRBT2x8X KhOzpz2Z9VaeeMPc5ZVsJiLCY5kHnrs= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id c66585b1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 23 Apr 2024 05:34:17 +0000 (UTC) Date: Tue, 23 Apr 2024 07:34:16 +0200 From: Emmanuel Vadot To: lexi@le-Fay.ORG, Warner Losh Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 7209444a80fd - main - package: move cron into its own package Message-Id: <20240423073416.3d80f63230474c0f6ddf9099@bidouilliste.com> In-Reply-To: <202404230452.43N4qksG063814@gitrepo.freebsd.org> References: <202404230452.43N4qksG063814@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.0) 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-Transfer-Encoding: 7bit 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:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Queue-Id: 4VNrQm41f0z4nn8 Hi, On Tue, 23 Apr 2024 04:52:46 GMT Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=7209444a80fd37de0e19c7cf93623f84709827e3 > > commit 7209444a80fd37de0e19c7cf93623f84709827e3 > Author: Lexi Winter > AuthorDate: 2024-04-22 22:05:53 +0000 > Commit: Warner Losh > CommitDate: 2024-04-23 04:36:35 +0000 > > package: move cron into its own package > > Reviewed by: imp, manu, Mina Galic > Pull Request: https://github.com/freebsd/freebsd-src/pull/1172 > --- > lib/libpam/pam.d/Makefile | 5 ++++- > libexec/rc/rc.d/Makefile | 5 ++++- > usr.sbin/cron/cron/Makefile | 1 + > usr.sbin/cron/crontab/Makefile | 1 + > 4 files changed, 10 insertions(+), 2 deletions(-) Something I forgot to say in the PR but we need an UPDATING entry to tell people to pkg install FreeBSD-cron as they will lost cron on a regular update. Cheers, -- Emmanuel Vadot From nobody Tue Apr 23 12:27:20 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 4VP1bD73dGz5H8LY; Tue, 23 Apr 2024 12:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP1bD5njMz4cBD; Tue, 23 Apr 2024 12:27:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713875240; 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=qPko+7xHlKKJO/qDmnGyLw5nT0z8IzYRhEqGts1+6XQ=; b=X6o9oLtjGD/gyLmvj4Kbzjg5qSFur86+PKHxOQRogNSIso0kdXsZ7xSg0WDAgbZ3qmroy3 zcteBmcjFpXB9KI1H+sEbKDLAe8LjWVcgE/m/TEPaZnOrV6t6zdxj3kSOjiaRAOQev2jmP qUU2iKNalNuQaFM4+ptuvsHq8b6VF1p6SHDhMuGRP4PhLMlvMYtDohandh5179u1R8EL2L DaEreKSnX02qdh6JqWYjkD6cTRcDJ3DTUQiQ1XPLoX5TimfRKJ7sS10KVAYRM9MkRtD0FD 4TZDD2j2hrMRlpjH1yVFiohct6lKywtevvpmb1+BtzT7VTYWVJ2z4pywG9Yvuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713875240; a=rsa-sha256; cv=none; b=XqBKWYyKDRHiyfsTXu2YO1ti4SUIjsNTLzVN92oap/YhjQxlFLuf4VZ8Z0T9eQXa4DnbOk /9uoNRGe08pPlVqNVfQBPUO+NKI7bQVRmSjWW0nQjpY+MwsHF5lCK3FQt6LK0VRgnzE0mt 9jznm0XRpnk7Q7LHGWQtBazkPsl8YNt/XdYAGaJ+oq7Hjh4QNpHhgc0JDf7/qti/atQbIw 4uzgYjvTQGBH75j8LFTY6gpbOkqjdQxetLfW2Atg1wvksLJEZ9xY9YAKsHPxCIPI52EWie pia95g/uzllwOAzpAttpIBOXVNVCpkOtsZFHTG6mT06L9X+L53Bm4EInhluewQ== 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=1713875240; 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=qPko+7xHlKKJO/qDmnGyLw5nT0z8IzYRhEqGts1+6XQ=; b=oPHCuvbK2YGeM4I2KdPVEniO8jxthmnX1pjtOUdj/R7mucJ7Lh5E0zc1NZkHx7eEPnZCPG wCdLyJAvvWbePjYgFBQTegoBve+ZHN75flAzL1OUwaLs7NsnMYmeFRuSp+UAqZ/+UrA29D p0eMwd4qcDsDTm+3MIHzRcfavPnYgFNCHCZUe3wFoLCyis6pdj/1TkzUNfvYHTUhKEsdVO e38KhhNHmY/PGHabosAt5NDLP27tPDia5NBZkpLtaI9MKPo8vBuzhyPguqTzL+tVBqZHYS miOE8cTLri2fzRNNh3FDMQxvm2PRb64vm52W4r4VNf4DXLv3scoFNInTu5/0ZA== 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 4VP1bD55qXzXXd; Tue, 23 Apr 2024 12:27:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NCRKtY030631; Tue, 23 Apr 2024 12:27:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NCRKnq030628; Tue, 23 Apr 2024 12:27:20 GMT (envelope-from git) Date: Tue, 23 Apr 2024 12:27:20 GMT Message-Id: <202404231227.43NCRKnq030628@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: 91d35fb663e0 - main - Remove WITHOUT_CAPSICUM build 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91d35fb663e0276abc4963ae559e4759ea929842 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=91d35fb663e0276abc4963ae559e4759ea929842 commit 91d35fb663e0276abc4963ae559e4759ea929842 Author: Ed Maste AuthorDate: 2024-04-23 11:20:59 +0000 Commit: Ed Maste CommitDate: 2024-04-23 12:26:28 +0000 Remove WITHOUT_CAPSICUM build support Capsicum is non-optional as of c24c117b9644 ("Remove WITHOUT_{CAPSICUM,CASPER} options"). `#ifndef WITHOUT_CAPSICUM` is left in the source for the benefit of downstream consumers, but is never defined in FreeBSD. Reviewed by: oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42077 --- share/mk/src.opts.mk | 5 ----- tools/build/options/WITHOUT_CAPSICUM | 1 - usr.bin/xz/Makefile | 4 ---- 3 files changed, 10 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 2ea0cbf24268..3d3a1299fac9 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -218,7 +218,6 @@ __DEFAULT_NO_OPTIONS = \ ZONEINFO_LEAPSECONDS_SUPPORT \ __REQUIRED_OPTIONS = \ - CAPSICUM \ CASPER # LEFT/RIGHT. Left options which default to "yes" unless their corresponding @@ -383,10 +382,6 @@ BROKEN_OPTIONS+= TESTS # Force some options off if their dependencies are off. # Order is somewhat important. # -.if ${MK_CAPSICUM} == "no" -MK_CASPER:= no -.endif - .if ${MK_SOURCELESS} == "no" MK_SOURCELESS_HOST:= no MK_SOURCELESS_UCODE:= no diff --git a/tools/build/options/WITHOUT_CAPSICUM b/tools/build/options/WITHOUT_CAPSICUM deleted file mode 100644 index 19d821f6c981..000000000000 --- a/tools/build/options/WITHOUT_CAPSICUM +++ /dev/null @@ -1 +0,0 @@ -This option has no effect. diff --git a/usr.bin/xz/Makefile b/usr.bin/xz/Makefile index e3cbafb0ebc3..5b61202a981e 100644 --- a/usr.bin/xz/Makefile +++ b/usr.bin/xz/Makefile @@ -43,10 +43,6 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ -I${XZDIR}/common -.if ${MK_CAPSICUM} == "no" -CFLAGS+= -DWITHOUT_CAPSICUM -.endif - LIBADD= lzma .include From nobody Tue Apr 23 12:49: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 4VP24H2yN1z5H9tB; Tue, 23 Apr 2024 12:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP24H2PtPz4fyw; Tue, 23 Apr 2024 12:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713876543; 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=TpKRQnUZ7SsYVFsx5T8L3pZ6zYDpg3UzM143G0QX3cA=; b=XwSFcqx5RLlCoXGDFazxF9EJK4jzhSeQ94Ps2hslHnHnfm+d21yqvgodYqezhAhl/NcCGH LEvy7I8P9JFIXBUJ7P3VVEeOZP8U82YVnT1hIrpcvHzujsF/teN8574GTlCWb0bh3lK6PW afH/3BJ1KlZSVaKkxVEiKs99biZ948ITcB7V+XAgqmAvRkqwmyD3ZYzp2XyXOoiqens5Wt EY0ChSX9pZL9QAyqpi68A+BC1gHVMTmwAdykB0VXLqiiubJF7Dy3C1Yi0404Ssp2lXKQTG yew4qkXEXpJBtn/Ng/YOuErvqrqtuA10szeIEarb8k8LRaba6xArmCbgjZXfQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713876543; a=rsa-sha256; cv=none; b=OXu+OH6Yl8q6DlAaQfMopMSuZG5WT/neUevPofr3xoAMK1Do2kvuSmX5H4XfYt1OyB4QcG y4C5V9ZXTviqdVSKClgv5878PGcdZSVOY8Z7mR26pRL3lc57lkIOvTFtX5WqxCt3QBI+Qh GE4Ln6RWADOKj2bcrvyy61cKoWZOxmSJZcXrTeEGsjCmm+v7VA90ghGSomS0GtRwbWuCZZ a3b2bTyWe9QZdKOZS8PpCBNmQyDvpwhnM0tPYqdbBJFIGi4gF5XGKaGOuxR+2a6XZ7vxeF otinGCptq8eMyeBay5PtDyNMA4RjW0FfqTUj/7YcxDzTD08cG7GQfLiqw/PWog== 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=1713876543; 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=TpKRQnUZ7SsYVFsx5T8L3pZ6zYDpg3UzM143G0QX3cA=; b=fOEl+FDDf9CmYl+5UdHnhDXTZNwTKji2UgxfXrLDXzTutpJQckUcY4PauTpft7DN40ZKkH qBMyo9JGZGV5x02seCoa5rKTttGADdOPq3ZLHfzK+jTVll5Ld1fnjVfoDFnlPWI4RsOpcJ BsknvfH4u9NSwlVOGs+vFZ4S52oBWPzBhEbbvCa9WxI57+/2Ljib7h0tS9GUs/7RuABx6G W15bHpR1S52Skuf4hqrFBKbauuqU8WKQ6t/EVya+SueB39kIM5OEm0qYAFsKRtUoUzI9Dh ybXsSOn0FTCqsZf/vU8ZdqIORjwNq7Pg5UtIeF+IHGSPc8COSsG+36BIbUMNxQ== 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 4VP24H2147zY0X; Tue, 23 Apr 2024 12:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NCn3Z7065167; Tue, 23 Apr 2024 12:49:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NCn3sk065164; Tue, 23 Apr 2024 12:49:03 GMT (envelope-from git) Date: Tue, 23 Apr 2024 12:49:03 GMT Message-Id: <202404231249.43NCn3sk065164@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: 4329887454b0 - main - src.conf: regen after 91d35fb663e0, WITHOUT_CAPSICUM removal 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: 4329887454b008e42e809dcd275a69f596b9dc83 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4329887454b008e42e809dcd275a69f596b9dc83 commit 4329887454b008e42e809dcd275a69f596b9dc83 Author: Ed Maste AuthorDate: 2024-04-23 12:48:18 +0000 Commit: Ed Maste CommitDate: 2024-04-23 12:48:18 +0000 src.conf: regen after 91d35fb663e0, WITHOUT_CAPSICUM removal Sponsored by: The FreeBSD Foundation --- share/man/man5/src.conf.5 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 3f35e4146b52..7effd3f08ccc 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd April 18, 2024 +.Dd April 23, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -264,8 +264,6 @@ Build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR Do not build .Xr calendar 1 . -.It Va WITHOUT_CAPSICUM -This option has no effect. .It Va WITHOUT_CAROOT Do not add the trusted certificates from the Mozilla NSS bundle to base. From nobody Tue Apr 23 14:21:30 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 4VP46z409sz5HLQl; Tue, 23 Apr 2024 14:21:31 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP46z3Z22z4r2B; Tue, 23 Apr 2024 14:21:31 +0000 (UTC) (envelope-from gbe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713882091; 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=n6BXeTFQB5LbXToY4JUm8kdwWoAMIFR2M283UjQK6fc=; b=emMLHaV27g9O85yHOeSr3NJYtvXEae2d+vNmWYiAksi3iL1h3uPrrpJVDi3KULNUm6eHVK mfcbjo0gGk9tfEuYvYY2zhktG2M8YvPu4lOj64Bo7tdgosjrW5QOK4Md0TBNvfhhoBJohN QUfcuOJ/I1yuvkr0iPZZakApyKpfdX9HcRkLyR1kS1LCLLdN6KH6xTXP4s+k9YchukQfpD 4oEW8gRN53xjcXj0M3cE6rlf8hCtD82Dj3E7d5Pu1jkn4BkVrKDQk71dDjrpmkMaHHTMb2 j2VAI8F7Iwe3RjDQvQmuaSiRoXxOG3FEEf5PCQHtGbHTq4ziUCwLmIIUkiYMQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713882091; a=rsa-sha256; cv=none; b=yXDUj0vhGj31+FXuxR8NCq5U4QI8L9v12nw4gcyANLy+RIOIjVrIGxM+EXjcNfrkK25iCo UuoFTAfw2yFQ/kVjOvWyUWTRKi5TUoVo7CX82G2rRBAmietDk3R88GveEqWiruuQLcKoHD g/KQ0ultHfeyvglWFEbjcnJLnU6f4VIo4FzbNMO1u0IN1U0wjMHnaApRrwky0EZxMq3qlf NUUSZc+URSfPuihsZ9mQ2RPOPGNcEuD2QBmBdXPXuEjrLzqtHcqEIVQtuVJ7Y/vfs15THF R+HyLmUn4ahi86wdgZjkYie04YB0c3Uqz0Qj3O5WRxm8LtlXZzOBlSvHIvYhFg== 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=1713882091; 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=n6BXeTFQB5LbXToY4JUm8kdwWoAMIFR2M283UjQK6fc=; b=wJvrTdTs3zuiZTp6kYPwj8OChD2r/R5EF00TYELXZRcdXt/F5R9EvvW+tYDlWh446V7PB2 7nU2ahR+wJy3ppIbHpMqH9EDchrg0yhkq1ddfUCnL3a6qciN5UnANP9iqhGSzNQ1s8MWL9 2elHDlrTcCCxaCSEG/39NnDf79aq7Ln6qYJc+SeApCt/q97QXKRZ64zAWSvf0Mi8838cdA OoMN34Kx5A2sst/aIj9xoFDakWqKGqfhHBYo0g/00QB0bSEhbb7IQnQskOsC7FTuGKOG+q s/31YBe91fPswZ329NC+p1au0GiHCU8JKLM6phlaDd4EhvhtxW5Epb5DTB5EdQ== Received: from localhost (p200300cb8707821becb918c29f154d1c.dip0.t-ipconnect.de [IPv6:2003:cb:8707:821b:ecb9:18c2:9f15:4d1c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VP46z0KH1zb1g; Tue, 23 Apr 2024 14:21:30 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Tue, 23 Apr 2024 16:21:30 +0200 From: Gordon Bergling To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8993d785a261 - main - expand.1: Fix markup for the '-t' option Message-ID: References: <202404191540.43JFeDXd088443@gitrepo.freebsd.org> <86plujaklx.fsf@ltc.des.dev> 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/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PUq3DGEPkp19jxkN" Content-Disposition: inline In-Reply-To: <86plujaklx.fsf@ltc.des.dev> X-Url: X-Operating-System: FreeBSD 14.0-RELEASE-p6 amd64 X-Host-Uptime: 4:06PM up 7 days, 22:20, 3 users, load averages: 0.24, 0.26, 0.24 --PUq3DGEPkp19jxkN Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi des, On Sat, Apr 20, 2024 at 09:40:26PM +0200, Dag-Erling Sm=F8rgrav wrote: > Gordon Bergling writes: > > expand.1: Fix markup for the '-t' option > > =20 > > When viewing the manpage the '-t' option is shown as follows > > =20 > > -t -Sm tab1, tab2, ..., tabn Sm > > =20 > > with the markup '\&Sm' included within '.It Fl t', which doesn't > > makes any sense. > > =20 > > So just remove it. >=20 > You can't just remove the Sm, you need to add Ns before and after each > comma to do what the Sm was intended to do. This is why we have a patch > review system, please use it. I usualy always create differentials for changes, but I try to avoid them for one-line changes. I have tested various combinations for the .Sm usage, but I didn't saw any change in the manual page formating when removing the macro, so that was the easiest thing to have the '-t' option not advertising a none existing '-Sm' option. --Gordon --PUq3DGEPkp19jxkN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEYbWI0KY5X7yH/Fy4OQX2V8rP09wFAmYnw+gACgkQOQX2V8rP 09zWqAf5AdbDDc2359uTyAhHWEMTgBxdw0wMF7gL99vXHfPwdppd+YlIcdLUhQbw 7W+bxG3r9TzhlxF4ljJZxFfyQbYkMBptcCtnp6eb39sBZoFvRbFMC3LMA37VuvV3 Q/w3RNTC/M21U+g/TdniT9iWh1OjhLVmRuy//cKH1vWZ+zS+3XbMSKSwBcHhOLAB XoWOH0d5hAjTWnulHiFcTl2ehcrJa8b5KwfZE2z5Uld9Bz6ylY9q+YIuBZ3LGKu6 PQzRM2JLOpABXtP/oQysPT8R9MoQgRMghKcFjhnbFE4r7OlimIy7o9UEqkyJCMo7 Cnl1lKGiHzSUtJGHcuGorTngRqeWRA== =SRTp -----END PGP SIGNATURE----- --PUq3DGEPkp19jxkN-- From nobody Tue Apr 23 14:50: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 4VP4mf4tvGz5HPd9; Tue, 23 Apr 2024 14:50:42 +0000 (UTC) (envelope-from des@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP4mf2dFdz4twT; Tue, 23 Apr 2024 14:50:42 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713883842; 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=zL9d7fVFr56FM28bwJbGQpnWw5G03WHsUhZiu9xB6mA=; b=mLyqSoQQIzGry3OanjgxUIi5R4DrBXKLFeGVpJMTYJwePt2cupwoOwwUCgo6BDrWy0/Cd7 2CKy6YqAE8EORiQQ2sOfo4LX5LHtGWdVCGinpI6hATBYxI9WIDaChv9HjrJGCEn8ofGoHl 3fnMa3li1xc74jGoLeFCCtudDmN6phYA1z5O6a8GQgZkUN04FnoFEwkky3gGwkkBVs+j+6 O37sZB+wbcykvbJ5TCOBu2mYzLUCMmIrRFuWHIRs/10Hw/voZLoAeDSJlyw5VPeT94ff4S VDWc/NP4DCZYsfaSveX+RD9Xa0xws5ol+DYSuQK/lGsilGU3g81vX84EHQ12nA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713883842; a=rsa-sha256; cv=none; b=wfP60Y/6G+fmJwjO2fYAoLzRftjSANz56Yj+yCC6baaiBN/AkbS4eAoISiCcYO5HF2LTGW zY7GVeXjAyt7b4lHEsNBbYm22nlv2rwQ+MifeGxLDlNLiXuxSxnILY3giY/mgmb98NH4d9 VJ39+AVqBuf2A0mPrB0m9YeICNznvETTxlW9orPtCNF8GDD+nu1x51dPAzH+m7AjvRVOUv rQSgJUUldPjWpRWkpi4/mWee6Wl1Cjdqx7suuiexBeXLL7Ykvs4LcTgCNL1RHXB3gPZHYr ilydJxrnZIaXB06+dHhZw7nrKdO/JZgm9ufQUDU5iDAZr5unFOTm/+n4UB6S8A== 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=1713883842; 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=zL9d7fVFr56FM28bwJbGQpnWw5G03WHsUhZiu9xB6mA=; b=WZ06D3E5zWdc9boQDD5yY/VOtkxUfUg73cCtW8QEyBnGWoJSot2q7gJFeV40pmaeKAAFIy /PO1BJl8sdq6+8M20C7EZ8PHmmCeJ4UjSbrs2Zl35b18C0ikAEtoWu45pkuwkPGtaGCYqR 1wJnL4h7xhoD+3mtI6Eu+uUIVTpOwaC7S8pfMxcX0HR/mRzVKz7+irQJDl7bniSi4JwMzG mmW0xfT2/fR+vcNEIFeY2AXQtBy9eaqOo9zdxDJEGAb6JlfR78KaWqkW2gk7gKmXygPe7T 7B128/wsBloNMlwIj5LXhC0hopunQ1n4EYZG4XnVHtk0vBqmeOBH7YHZvolLmg== Received: from ltc.des.dev (2a02-8428-0993-f001-922e-16ff-fef1-acef.rev.sfr.net [IPv6:2a02:8428:993:f001:922e:16ff:fef1:acef]) (using TLSv1.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: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VP4mf1DzSzbbs; Tue, 23 Apr 2024 14:50:42 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id E71EA1F285; Tue, 23 Apr 2024 16:50:40 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gordon Bergling Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8993d785a261 - main - expand.1: Fix markup for the '-t' option In-Reply-To: (Gordon Bergling's message of "Tue, 23 Apr 2024 16:21:30 +0200") References: <202404191540.43JFeDXd088443@gitrepo.freebsd.org> <86plujaklx.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 23 Apr 2024 16:50:40 +0200 Message-ID: <86h6fs6slb.fsf@ltc.des.dev> 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: quoted-printable Gordon Bergling writes: > I usualy always create differentials for changes, but I try to avoid them > for one-line changes. I have tested various combinations for the .Sm usag= e, > but I didn't saw any change in the manual page formating when removing the > macro, so that was the easiest thing to have the '-t' option not advertis= ing > a none existing '-Sm' option. Sm is used to turn spacing on and off, cf. mdoc(7) or even just the synopsis section of the man page you were editing. I don't know why it doesn't work in that specific context, the easiest solution is to use Ns before and after each comma. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Tue Apr 23 15:52: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 4VP68B6PtRz5HWFs; Tue, 23 Apr 2024 15:52:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP68B5yQcz43gc; Tue, 23 Apr 2024 15:52:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713887562; 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=EFUpRIZ0mqJDNmouV7jvtfKy4b6rrAgq8kJ/Q9TmunM=; b=a/cEBxCI/JKVJGcaaLIb+KMtSAXnqL+oALFhj6LytLEYvdaU3nu6O98/Wal6PFdW11t1En NJLI83nrHysR0P9mnBbyEZ9iOe6qrPej1TtdOM39YFh/GC2ilUi175WsTHgZJlMFHolr+7 L4OdU8fvVGitZJ9qK1T8WJzUXhREI5Bv/oSTIpz/4idLXnQkDhA1EUDPM7oahlsaUeUupT y7hSA3jO04/zxCeILQKBhrOLSpFfNqyhGGaJgO8ppTqByVI0PyiQxcixwrWTs7ZCMw7r7R uTv3c/l+izhugUyQEj9ZFFqD9ncTNhNUEnZCd4HrG7jj176W98IHJuXBRiFi2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713887562; a=rsa-sha256; cv=none; b=sWzo5c7kgFH9Ixx7QD7+qtSw/6DCAadzGI/Hqh7AROdVdR1MtUWx65TrGvYs2fBE+e0wAe ygD6e2TM3/bhVUC23ZemTSR66sRtTqCRnjjdh/ggMCSZRFLRoP3QOFgERqb7sLaCSSdlN2 1jXdLpGBRg4ZojnPreO1Q93bn9CivChRNMqA+V8sFXE4v0B0i4tNowwfJfhwmSXINXolng ef6Q8r2zKTtjVbMW9cdU9XeZrPu6Q+KKkVSRo1s1oB725a4kWz0lCMCiwMFJzUCuDaY5HX zMO+Nha2oMLOGqbtfyWFFQrJjfD27YYWQMtznasDQPngj6dvwDAJKNw8sq3HOQ== 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=1713887562; 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=EFUpRIZ0mqJDNmouV7jvtfKy4b6rrAgq8kJ/Q9TmunM=; b=i6UBsHdFlOZx4PpwHCt+mhU/TiKULGCrEGYjOVd/hMoPwCX+R0UOIsP1SBy+1sRGQ1RsC/ LxmtJ8ncVgXHV7nUW99h9z4J+B4JPiPzEl9VWu/2B3NuQs+u60CwbFeNicPZV2Vj2nZFEr gcNAiNGNTh7J/K6SPK2GbHjMqIUaNChf+opVkDtPKMuxTlrgqKljVGHXlocRJ8tdvuuBsQ hdRNYgMzdA+13vB39PiCxkrkXsv8aGG5k86cw9zlWjk7kJeCJtsSMacnmJml7xs94bR2E4 ndbGpG49Nm9zNkRqe/3ke1nV2xUG9Ak2o89otxkF2D2TktKr6t2ldoz+r1gNHg== 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 4VP68B5FHDzdgg; Tue, 23 Apr 2024 15:52:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NFqgI0086987; Tue, 23 Apr 2024 15:52:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NFqga9086984; Tue, 23 Apr 2024 15:52:42 GMT (envelope-from git) Date: Tue, 23 Apr 2024 15:52:42 GMT Message-Id: <202404231552.43NFqga9086984@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: 96a2e036b709 - main - Update manual page references and macros to align to mandoc syntax 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: 96a2e036b7095e819cc536b6145950b54dffb929 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=96a2e036b7095e819cc536b6145950b54dffb929 commit 96a2e036b7095e819cc536b6145950b54dffb929 Author: Christopher Davidson AuthorDate: 2024-02-09 03:57:52 +0000 Commit: Mitchell Horne CommitDate: 2024-04-23 15:50:54 +0000 Update manual page references and macros to align to mandoc syntax xlocale.3: Comment out reference to atof_l(3), atoi_l(3), atol_l(3), atoll_l(3) These manual page references do not exist. lagg.4: Change the reference for /etc/rc.conf from a reference link .Xr -> .Pa based on the context within the manual page it is used. buf.9: Remove .Xr entries from the file The buf.9 manual page contains a commented out .Xr reference. The 9 entry is a placeholder and has been removed for clarity. Reviewed by: mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/1114 --- lib/libc/locale/xlocale.3 | 8 ++++---- share/man/man4/lagg.4 | 2 +- share/man/man9/buf.9 | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/libc/locale/xlocale.3 b/lib/libc/locale/xlocale.3 index daa754dfc473..3af7a38a76d1 100644 --- a/lib/libc/locale/xlocale.3 +++ b/lib/libc/locale/xlocale.3 @@ -166,10 +166,10 @@ along with the headers that expose them, is provided here: .Xr vsprintf_l 3 , .Xr vsscanf_l 3 .It In stdlib.h -.Xr atof_l 3 , -.Xr atoi_l 3 , -.Xr atol_l 3 , -.Xr atoll_l 3 , +.\".Xr atof_l 3 , +.\".Xr atoi_l 3 , +.\".Xr atol_l 3 , +.\".Xr atoll_l 3 , .Xr mblen_l 3 , .Xr mbstowcs_l 3 , .Xr mbtowc_l 3 , diff --git a/share/man/man4/lagg.4 b/share/man/man4/lagg.4 index b2ca5a02b4a9..4eaed2cf3a88 100644 --- a/share/man/man4/lagg.4 +++ b/share/man/man4/lagg.4 @@ -214,7 +214,7 @@ The following example shows how to create an infiniband failover interface. .Ed .Pp Configure two ethernets for failover with static IP in -.Xr /etc/rc.conf 5 : +.Pa /etc/rc.conf : .Bd -literal -offset indent cloned_interfaces="lagg0" ifconfig_lagg0="laggproto failover laggport bge0 laggport bge1 \e diff --git a/share/man/man9/buf.9 b/share/man/man9/buf.9 index 975a1bf2074f..ecd4a1487735 100644 --- a/share/man/man9/buf.9 +++ b/share/man/man9/buf.9 @@ -132,8 +132,6 @@ instantiated VM Buffers (struct buf's) prevent their underlying pages in the buffer cache from being freed. This can complicate the life of the paging system. -.\" .Sh SEE ALSO -.\" .Xr 9 .Sh HISTORY The .Nm From nobody Tue Apr 23 16:00: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 4VP6Kb2sbmz5HWbt; Tue, 23 Apr 2024 16:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP6Kb1StSz44DL; Tue, 23 Apr 2024 16:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713888051; 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=U9N/QYudOD3gbv5fq8Pli4ZolVdNHPMDJRoq+C/kPxM=; b=r3O4yU167ILSQmLVvlN2IRzbi+3CE0dlNK1mumIb0dqcgdw0y84O+lJsYHZASp9mXBYZY7 UNns8f8emcV1vBB7A+pSI+4unuiogUC4eDWJbExsAz9c/nm6vvMgdUXzXxUD+CdK1dH9y8 bSS1O5HLiKV42ExgiRs4M+3a5zZSptGggQ/D9rB1iZ6Gw5D1CzNBJjkPFye559Po4UnyVs s0Ukx2jxPBb/wx3JKZZktpRakSZr8jemayF/pClONGmBXzYn3BpnLps6LYhl21lvZft21Z C0IrJOl2mN2YPCJTsCbyoFtgbjPMRvgHeDGxLeOPHA+sPquuJL9c14HlA8ufjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713888051; a=rsa-sha256; cv=none; b=ngLrQLpwDdBp2XuJs1pyoJp29H2Q1oBztwMoW0MLcD0Zd40P/9ZprzXcf8TKDUW2r+uu02 xBHZyNDkU5PzWWF5abyCKISvcHLVP+gnm9Z//TgawhB6m7OvfB5DBeFwm4MH57ocEWL6e7 zgzV04gvbNTxqkNWKQYlm0JN6DH0JqSRRB4hweoOul0Faf66YUYaJ7yUce2ogwes7tZVBM OcyJZfV64EZIeEloBfaV4f21RdXcbDIpMo8Fy4KVl4av36JtSogHGE9VScWilWAhvfmX+U bf/t7cZNyZV8ucUNX6pG0Swa69KY91fnWznAkEJtKDXOzMew6J3kqkzWVxJxyQ== 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=1713888051; 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=U9N/QYudOD3gbv5fq8Pli4ZolVdNHPMDJRoq+C/kPxM=; b=IhWEcNebkz+S99K2Y+IgST37ahRrKuBC0XDWbqwtu8+AgOovQsl5+gaVNjPUV3+xAuCbfz tayN8c5U27f+4m34SZ+SJDaYE6umrMMJvz+QyrvT4KyCw0FbABpL0OZAfG8gtrvXMIFlhg /Onh4lMmlqlSZX+W4HfBo5qnOOoZOCJO5xZ2qwbRxBrrC0EtcmSGkiG9VSwvsB/dVbFmKF MzVn4nf8MqogX20WnIbinNlaVosQXiN+nnaXyQ04AYCghrTVcrJkMDWmJmyms9jQRLYedq RqmmJb++DmvsD1HUEUbW4lApfDEEXegjziIMYkTAr/7/QeJdoPhpZdwNbvja8Q== 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 4VP6KZ6Xqzzdsc; Tue, 23 Apr 2024 16:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NG0oqu098782; Tue, 23 Apr 2024 16:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NG0ouf098779; Tue, 23 Apr 2024 16:00:50 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:00:50 GMT Message-Id: <202404231600.43NG0ouf098779@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: c5989febcc00 - main - ieee80211_vap(9): fix the title 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: c5989febcc00be41e05b4b714bbfc6ea1359abaf Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c5989febcc00be41e05b4b714bbfc6ea1359abaf commit c5989febcc00be41e05b4b714bbfc6ea1359abaf Author: Mitchell Horne AuthorDate: 2023-03-19 22:58:56 +0000 Commit: Mitchell Horne CommitDate: 2024-04-23 16:00:28 +0000 ieee80211_vap(9): fix the title MFC after: 3 days --- share/man/man9/ieee80211_vap.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/ieee80211_vap.9 b/share/man/man9/ieee80211_vap.9 index e0c9760d8d31..ee811107f035 100644 --- a/share/man/man9/ieee80211_vap.9 +++ b/share/man/man9/ieee80211_vap.9 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .Dd August 4, 2009 -.Dt IEEE8021_VAP 9 +.Dt IEEE80211_VAP 9 .Os .Sh NAME .Nm net80211_vap From nobody Tue Apr 23 16:31: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 4VP70h0RXQz5HZpL; Tue, 23 Apr 2024 16:31:16 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP70h01zdz46cp; Tue, 23 Apr 2024 16:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713889876; 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=yhNGnw/S2QqkX6l53e2yCG/t8ywhu78kx5vk1eELCWc=; b=hk060D/PLk0oMAybLI9Enir7Ia5PwOyLNuJhJcAKWCSuFywfb2wgnBafrXuC8IU+i12jb2 nS3uSyr7UO+RLAYX7bHGkeP+sFdZTx/siVbGseDGw9TSPWhm1cwGjRC1UcPRBOUM6FwNWp wH9+YMY6U5gxjjEdqmuuzbFAjrbE65y4kJF/bspUcUL6eLmIkj4K0IgNb0hOJS3/p8C/p9 IY4pB/YQZHTJM35u3jSln1VNMM3efQBIwP2uG2AIafdHvTXSSWqYSTEZivW/yQnhJjLjSH aALWeeyRWdLTCjdZeUsm7QFzAf4qZVeq/UK26YJ1zrQ6oixPeDC1UzPq+MLb4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713889876; a=rsa-sha256; cv=none; b=ZTBe9cIOJQ6C33kG/FfVYHsTCq5zsc0t2H5FTxWPGPNNg0CH363YiW8P0B1agUqd8NPLGi HdMFhuxWztHGXa1kRrXVg+U40d1q6GLJVetG8Qzm72WaqRxblzbH9eV6vFmfpsu/LmY05Y AkopSRLHxINFxucChPTYvrICScGwbWaIvFxdk09i7xIOuJ1H2O4Uhs3IMgKIraA17ihYOq thYAhxPozq9C0HIjlzq4cJi7/mmTn2Y66T53fHEoWe7WUCz4OwQ0LXxKryib97feYZSLP2 8iWGVBJvP7ZCuCKP9pp+/VLyg2KWVlL4Qpyy2H9/XeYGgQpwCoGs5ybWnWnkaA== 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=1713889876; 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=yhNGnw/S2QqkX6l53e2yCG/t8ywhu78kx5vk1eELCWc=; b=As0T5CV315xVII3LYh5DiZzFEWncnETvhYka0bS/xAAIhoQkxPiu71a6PH5G3fxOv+VsOq Wqs+SE1jrA63oJk/m45GJ3QYfA5H1W4T9WKR56Fa5PFf7HvX9BCVzshU+8Clw3cEVHkAOa 7YGlunKxiKteei9kitGv6nwU57gwIm2XPbzrx8uJD/JSm+ka1rf5CxqNf8BfrRR9FgOgGs NImi3Lk1TzniSQ7rbfL9sskz0ppMarkZIehANoTfBCw9KJkhpE6fvtv+RW1Orki/wz9BL9 kJlbwOpntt4y7VFfMzJkTs6Kz+wQCRR39Ys0b4yLt8BYzhdGRf1Amzn0LlEihA== 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 4VP70g6lPfzftq; Tue, 23 Apr 2024 16:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGVFfS047450; Tue, 23 Apr 2024 16:31:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGVFJn047447; Tue, 23 Apr 2024 16:31:15 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:31:15 GMT Message-Id: <202404231631.43NGVFJn047447@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: fcdf9a19893b - main - Support ARP for 802 networks 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: fcdf9a19893b9b5beb7a21407de507f0ae4c500b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fcdf9a19893b9b5beb7a21407de507f0ae4c500b commit fcdf9a19893b9b5beb7a21407de507f0ae4c500b Author: Denny Page AuthorDate: 2024-04-13 17:16:08 +0000 Commit: Ed Maste CommitDate: 2024-04-23 16:30:53 +0000 Support ARP for 802 networks This is used by 802.3 Ethernet. (Also be used by 802.4 Token Bus and 802.5 Token Ring, but we don't support those.) This was accidentally removed along with FDDI support in commit 0437c8e3b198, presumably because comments implied it was used only by FDDI or Token Ring. Fixes: 0437c8e3b198 ("Remove support for FDDI networks.") Reviewed-by: emaste Signed-off-by: Denny Page Pull-request: https://github.com/freebsd/freebsd-src/pull/1166 --- sys/net/if_arp.h | 2 +- sys/netinet/if_ether.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/net/if_arp.h b/sys/net/if_arp.h index 0c3ee5d7acc6..6a944276674c 100644 --- a/sys/net/if_arp.h +++ b/sys/net/if_arp.h @@ -45,7 +45,7 @@ struct arphdr { u_short ar_hrd; /* format of hardware address */ #define ARPHRD_ETHER 1 /* ethernet hardware format */ -#define ARPHRD_IEEE802 6 /* token-ring hardware format */ +#define ARPHRD_IEEE802 6 /* 802.2 networks (ethernet/tb/tr) */ #define ARPHRD_FRELAY 15 /* frame relay hardware format */ #define ARPHRD_IEEE1394 24 /* firewire hardware format */ #define ARPHRD_INFINIBAND 32 /* infiniband hardware format */ diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 4b3d2a91d996..543e6a3922fb 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -682,6 +682,10 @@ arpintr(struct mbuf *m) hlen = ETHER_ADDR_LEN; /* RFC 826 */ layer = "ethernet"; break; + case ARPHRD_IEEE802: + hlen = ETHER_ADDR_LEN; + layer = "ieee802"; + break; case ARPHRD_INFINIBAND: hlen = 20; /* RFC 4391, INFINIBAND_ALEN */ layer = "infiniband"; From nobody Tue Apr 23 16:52: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 4VP7TC3Z9Gz5HcXM; Tue, 23 Apr 2024 16:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TC33sKz486b; Tue, 23 Apr 2024 16:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891151; 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=871OyYucLEf0d/STERroQYHPziIprfXy6l0E5/XTJ+M=; b=iu9idOfROcHtSU2aBLrtxRLNmm/z4/8iLtY04QBj813PUwBRsbqAihj5xeKcb3aUnEIgvH xs14MGGyZgwEcrv7h6Hh3Sb2wqWp0a05+ipGGLXsRrG9gzT1s9H8gvOJ/OPXIiS47DAirF gbdV+c99atN+Nab1gj0ab2RA55IdQH5gWzOAIgaETGzBMLJfKvEN0HK++lOOgA3oLHCUdY NoA7q0noTkjUIfwrpeFtM/UDr7SzAA+hLXGH9teozP/OlBN7uSWuT8uWeZpn3y8tB3wPPH yqnPGLi27mgfdnOO9mXi7vgE0/6v/cWNBeLksjfTIhHWAt1GHaHyWlZX4yvx7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891151; a=rsa-sha256; cv=none; b=ddhp+aOaJlKXPQMH4179LDi+Q5RwcjcrVBdjaNIVm+RXakWD2XOP1cJah9VQVr0hdD6REZ ZKShvx3Bxkz+doAkkLyszVnhvypPUxZ1tPj5GD/n9KWZ/p5Z5pzqeHQqoDU5E1xg+KnzzU PjpN/VSmdqnkFWPeZ+gjPTxa8TDPA2mhLLzN5NtRK1UgnaGfCAaA6n4PwssyUohOGvr/H+ bmdfMkzBmapgOJPioLUmUXbI7/iqp9hDy8h+w7jfXwphDnu6yF7WyWgTSumAAMTArNydI2 t1PDayZp0m/odllQlj6YEipmAB61zckeOriu8HjiOUUVlPBMIydg8ewPt2umsw== 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=1713891151; 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=871OyYucLEf0d/STERroQYHPziIprfXy6l0E5/XTJ+M=; b=telsBagY4ZRCKnXzZEuyfqL+BdNukHZ5tq7BzUj5sIPB+apvodvFGbK4jOMdwnHbMbTft6 OgHyxtxLV6aaSogxtbOTRjjVVT8kJMcnGJisev+bBlrDaeQpwgA6RzkHo4tpXHday8Ta44 rZqbQD7xDyidrek7Bin78YgdgiqEWdFXiIvWiIHy0835sVMAV5YrELBg5ubdpIs20zH+0H NNPyO3kV5icAQRjlVWaIiSzY7tTKhS86kt4p7Qayj8qB+XHjPTDjOEk7mF6OHOCbAwC4UD 8kCQgHbaVm8YGxxa098qTDCyXE/rMfB88NQEnzGj4oCl0hRtlYHeizSsgNXltQ== 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 4VP7TC2gQXzgNx; Tue, 23 Apr 2024 16:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqVQ4087986; Tue, 23 Apr 2024 16:52:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqVk9087983; Tue, 23 Apr 2024 16:52:31 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:31 GMT Message-Id: <202404231652.43NGqVk9087983@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: 53e0938b0b56 - main - kern_thread.c: remove unneeded include of sys/param.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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53e0938b0b5619fa851e8550c2396bd8c440b7ae Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=53e0938b0b5619fa851e8550c2396bd8c440b7ae commit 53e0938b0b5619fa851e8550c2396bd8c440b7ae Author: Konstantin Belousov AuthorDate: 2024-04-19 14:46:08 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:03 +0000 kern_thread.c: remove unneeded include of sys/param.h Handled by sys/systm.h already. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- sys/kern/kern_thread.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 4a9d1bc8a042..179ced38b715 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -31,7 +31,6 @@ #include "opt_witness.h" #include "opt_hwpmc_hooks.h" -#include #include #include #include From nobody Tue Apr 23 16:52: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 4VP7TF5h3Wz5HcTv; Tue, 23 Apr 2024 16:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TF4wwHz489D; Tue, 23 Apr 2024 16:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891153; 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=tB683nGuWMuY+LbxhnqzRMA3/D1BNT5c0AQoaOWZjyQ=; b=kQP4oIbmip5kSPibQqSIV/RAwblDMlCnt0O5lgVWGHkQaKDD3vnOyYqgfkCmwfa67yMf+V gvq8ucn0ipHg0DMheXPL2RVEZIQl9stNxl+qdo8pcTdnX3ca5r/q4uUborIh6vlX/msMwG CuJW4AjNID2pMN+Y098nqnJHi921ickt8Q82mmx+QksLUvA8mZaEMbnA9cFiJZMlTlvhgp BIxQVOEsLsZ5maUkoYngSZ4EZ8KZzkkzpdu3wLEY2lIGKIR3dLIYtx0y8Ym7qRU0r2uNih Wdbaodd3O9r5E6gv0fsh9iKnibdoK3ceseNw3Q74e2norezmd1hhKzNwmQptgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891153; a=rsa-sha256; cv=none; b=xNiAtnHghjsCxpmtvIQZ7rNMyWDhHwJkYbc/Fb0u8wjWxtSZ4T67CJ2LgAN0cazG46kbhH JUfsKtJ0xVb2OqdO/kQ7IOs8Cv9oSlFV2tGTmNpTuIuiIm+RCNytOBXDLZLgivZGYdvW1y 3Rz5+km0a2+GRmDon73VnI/MB/9dRlLqr9PjX067uCFiTpjQLM/1YvEEKRV43McVjJz67Y rTQ1EYzfQ5qDy2ElHkcJ4cNQa7zuDbgENvyD8cCEPPHom6CgRu+W17HoESTDrkS2BbQ+M3 7nvHo3SiPd/IRtM8JgCr4KrApg/faRw0PfCyNKkHROXib6rmiXfZH+8A3yXghw== 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=1713891153; 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=tB683nGuWMuY+LbxhnqzRMA3/D1BNT5c0AQoaOWZjyQ=; b=ihNPsXBeNinQ52pRZqXzJqytjY1w2FOTX92BOFZTiCarVwDx1z/fR5JgDLBFgtIMWJZGP1 Iu8zwGUC3V6SxtsOQXAnfHpMH1yZ5mJi6fw09+xurWalcZ0TO8yRO4sV4IUrYMMHtsH126 kxIPl9of3F2ZRmKh4ci4yg002dwRZXXnrAOMoL/7kSF2oRb5pCtzWKaac88wl5xUwFYHGQ 4RaIHt4HTFJJFt8Lz4ioaZVzijzcWKQ7VNfneOW2/LD4xg/k4qxljdXhAHTgrkHNhgYhCd 5Htb86JHedVzkxgT5LL0dNUVkG4rlJBacleFRVeibGdMW4eFVARtGPPC68vOWw== 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 4VP7TF4QVmzgB7; Tue, 23 Apr 2024 16:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqXFD088066; Tue, 23 Apr 2024 16:52:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqXDH088063; Tue, 23 Apr 2024 16:52:33 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:33 GMT Message-Id: <202404231652.43NGqXDH088063@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: 0c11c1792b13 - main - kern_thr.c: normalize includes 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: 0c11c1792b139baffbf74e5f1c6fe065708301cc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0c11c1792b139baffbf74e5f1c6fe065708301cc commit 0c11c1792b139baffbf74e5f1c6fe065708301cc Author: Konstantin Belousov AuthorDate: 2024-04-19 14:27:42 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:07 +0000 kern_thr.c: normalize includes Remove extra sys/param.h, provided by sys/systm.h. Order the rest alphabetically. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- sys/kern/kern_thr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 5df5620842fd..0ab4cb5f7970 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -29,8 +29,9 @@ #include "opt_posix.h" #include "opt_hwpmc_hooks.h" -#include +#include #include +#include #include #include #include @@ -39,21 +40,19 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include -#include #include -#include +#include #include -#include #ifdef HWPMC_HOOKS #include #endif From nobody Tue Apr 23 16:52: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 4VP7TD5xRvz5HcXP; Tue, 23 Apr 2024 16:52:32 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TD43C4z484k; Tue, 23 Apr 2024 16:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891152; 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=AHiCc63xM+R3p0jWmDIEzRSoF1lMZMzKhMnMzKWnRSg=; b=F1tKUqd5HuEdX1LoupKuECPndZ9N1q63tFJfWAhN8QZpVbjXm24Mp8f5zD2YJezxA9dWZ3 cfKlyp3wA1+/A2z9pXwMGuEF/ng4MOo5rC729DKH1JdtbMwW7CTVZBUKLO0pg6gzEplGEI roqiZVhg/BDoyJVBR4SXxG4gPHHmBikBGIsP/nqJt2Mre5deM89YAseufNs3zopje4YDHb 3f2TDy3WjUVxpajy0TcuQmalcutTN24A+W5m1TIf3FVQqU0anAGUKAa1R2lW1folJUGg/d VlcabdUYFeP0i5dGe65OrKUOaRPw2iAZxjL+TxhlhKd4SN8vW4LsPmDDeZ97QA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891152; a=rsa-sha256; cv=none; b=wPlnLjSrysKLFCHUZu7O30G4pmNkNcaYb0jQNe0N2/G/Zs31jkooOIf4Ktb6ehHRgaQ+qq 3oN9AdxxhndyGbcyR4KTNImEfF6iyBOB1U2rgCVVCL94DBF1PlD8lX+ZmhAYU52goR8sAr C7hg6kagA5JWPaPGlVuLf40RfAS0QOAOjL9IB2yghzGlGP8hAt1y2D+E6mggSNIZQI+9up HRAV86ryuIr7inrdqKJoo1YPw9WEXNAo8jZyTqtSyuBWE1gfdWA8vWfRW1U0mL0fZ6MJso MsmVCPYij3MjN8/nU7drnStKiiQndErjb08+xzOi/45cqlWgGJQWFE+aAaWoaw== 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=1713891152; 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=AHiCc63xM+R3p0jWmDIEzRSoF1lMZMzKhMnMzKWnRSg=; b=lKp/404C8XhpKKC9gsZjqhsZoS9qVoUxVkJuknrFq7vgMZCkQjHgp4f2qGqcDpAkBlUYry CH+sIgtObDZ35Ddav0e4zI8z4o860zHNzqNBcalaKKRCx+brXhqO4iJLDWw9/J/cRZ5L05 TKFPrwp1lAQVjpGE4VddyLtGw4Npwgx/FEmFMdLM8Evu0PTwvkEZChzt07k9lsmpvP0ZkX 1UzgbNz2xFukIgNUfIeR0YPSGn1N35CJV8yYWO1oHM4jB+m5VjX7F5mY2NtNYeKDiRmcwM Pq7YrLNc4mspeSOR2oLJoJprdyk8NkFq2xIu10tQ8BvUbpopR+6WYBuZ+azxKQ== 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 4VP7TD3g1gzfgH; Tue, 23 Apr 2024 16:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqWAP088022; Tue, 23 Apr 2024 16:52:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqW9q088019; Tue, 23 Apr 2024 16:52:32 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:32 GMT Message-Id: <202404231652.43NGqW9q088019@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: 2effad53b467 - main - kern_thr.c/kern_sig.c: remove sys/cdefs.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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2effad53b4676dcfe4da892cd72a9a235a9539d1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2effad53b4676dcfe4da892cd72a9a235a9539d1 commit 2effad53b4676dcfe4da892cd72a9a235a9539d1 Author: Konstantin Belousov AuthorDate: 2024-04-19 14:25:04 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:05 +0000 kern_thr.c/kern_sig.c: remove sys/cdefs.h Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- sys/kern/kern_sig.c | 1 - sys/kern/kern_thr.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 11b3a3374a4d..a533460090eb 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -34,7 +34,6 @@ * SUCH DAMAGE. */ -#include #include "opt_capsicum.h" #include "opt_ktrace.h" diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index e2f1b6baca4b..5df5620842fd 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -26,9 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "opt_posix.h" #include "opt_hwpmc_hooks.h" + #include #include #include From nobody Tue Apr 23 16:52: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 4VP7TH1FqHz5HcMh; Tue, 23 Apr 2024 16:52:35 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TG5pbgz4875; Tue, 23 Apr 2024 16:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891154; 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=EPxgEIbd6gSpTls4ab0knQ6/mkxv+VewSBVLqcZlaWU=; b=CCShln7ASYXMsPPFMSzBjnseemabL7hx7INsQ/UjcD2Tr/2TZFgqkgQUhiCe3jnx/P9qpy VCK5N4eo9IEGiOsL969UC/3q0AZtkRofq6hCt994MuE+91W/8gF8tzRm8lyOhJfOA6WCuI eUTiHyY0XK8xLsuCyIL9q6FMml2KkS2WFmVCva9EaJxgJctq+pihP6U336LKY/0/RLxSZB LA5WmfRQrx7qLpJdqpWMeDGn5rK9fNMarWlkpfo45b38GuwzDE5zXk0xNB/Yf7WgoEfBkF /eeF0pNsxd92YWu2CiaFz4nx6wzOSHL6KqLAW5MEBaRlXbua9Sh6asmSY6kPlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891154; a=rsa-sha256; cv=none; b=U9cJlP3pk8uvpiSYonGJqlUh4ltFlAG7q9svCDKJgeKrcTscVztpCewV+MWOyVOgh8+GIN nsPLt40F8n7gdW4AqWzhs5Vi3ZgjhadhQCp4Ra0XFUB/jW1bxiv4xbFFv/yY448CAaW1KB rMx7dVHjXv9jG61zHCaifU+trr6u6WF7y2CnsE0GQV1SBrdJBEJKX8UUur21Qxx01GnsV0 RzyexsZRz6+o8++PHJdvzWzNV8HmOjrYFfLsK/7j3HuSgNqISyex7Ci6VAkyX53vMYo3Lc sJiDFOXC9mW80DgHCoKObEGR5O+2tf3hxqGJbIWdHgX6LuXc7/DfPqsvCZ7Ztg== 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=1713891154; 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=EPxgEIbd6gSpTls4ab0knQ6/mkxv+VewSBVLqcZlaWU=; b=ClM7tjqRMnSH2j17Rc4KNiXh83jY1i+aWMbDtd64/rXaEqbYo8soSKAPKxgGzSk6KhiQBV 1e6ua59R7ZAd6HRXRgYdfUqAotoRWXGjpGy38L1Xfij8tU6hRA20xB4JL6VpYuxWvYvg5O wt4k4xgQ7xFWASPCao/GkLw5WZIhvJipbqTNt58KBtqCKREAFPM08CBSKhv/4sQEanIqno GyUeTL9HXeNF+/DH8vOGAzM3l3fbq93+TPFJHG3m8SARMxXCxTfArE7f7XpXM2fDwOa3O6 qVMfyy4XIQciWxh1BUelxJ2pJQ9mzTB5Ab4fhUtqo/LaVL4Np1PASgS7jkLBuw== 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 4VP7TG55hqzgB8; Tue, 23 Apr 2024 16:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqYm5088111; Tue, 23 Apr 2024 16:52:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqYxS088108; Tue, 23 Apr 2024 16:52:34 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:34 GMT Message-Id: <202404231652.43NGqYxS088108@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: 53186bc1435e - main - sigqueue(2): add impl-specific flag __SIGQUEUE_TID 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: 53186bc1435e2c3ccf9c2124c066a08c6a80c504 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=53186bc1435e2c3ccf9c2124c066a08c6a80c504 commit 53186bc1435e2c3ccf9c2124c066a08c6a80c504 Author: Konstantin Belousov AuthorDate: 2024-04-19 14:29:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:09 +0000 sigqueue(2): add impl-specific flag __SIGQUEUE_TID The flag allows the pid argument to designate a thread from the calling process. The flag value is carved from the high bit of the signal number, which slightly changes the ABI of syscall. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- sys/kern/kern_sig.c | 22 +++++++++++++++++----- sys/sys/signal.h | 4 ++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index a533460090eb..7ac9dcb8cb40 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2012,13 +2012,16 @@ sys_sigqueue(struct thread *td, struct sigqueue_args *uap) } int -kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value) +kern_sigqueue(struct thread *td, pid_t pid, int signumf, union sigval *value) { ksiginfo_t ksi; struct proc *p; + struct thread *td2; + u_int signum; int error; - if ((u_int)signum > _SIG_MAXSIG) + signum = signumf & ~__SIGQUEUE_TID; + if (signum > _SIG_MAXSIG) return (EINVAL); /* @@ -2028,8 +2031,17 @@ kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value) if (pid <= 0) return (EINVAL); - if ((p = pfind_any(pid)) == NULL) - return (ESRCH); + if ((signumf & __SIGQUEUE_TID) == 0) { + if ((p = pfind_any(pid)) == NULL) + return (ESRCH); + td2 = NULL; + } else { + p = td->td_proc; + td2 = tdfind((lwpid_t)pid, p->p_pid); + if (td2 == NULL) + return (ESRCH); + } + error = p_cansignal(td, p, signum); if (error == 0 && signum != 0) { ksiginfo_init(&ksi); @@ -2039,7 +2051,7 @@ kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value) ksi.ksi_pid = td->td_proc->p_pid; ksi.ksi_uid = td->td_ucred->cr_ruid; ksi.ksi_value = *value; - error = pksignal(p, ksi.ksi_signo, &ksi); + error = tdsendsignal(p, td2, ksi.ksi_signo, &ksi); } PROC_UNLOCK(p); return (error); diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 068a7e7bc6da..690cab414e9e 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -475,6 +475,10 @@ struct sigstack { #if __BSD_VISIBLE #define BADSIG SIG_ERR + +/* sigqueue(2) signo high-bits flags */ +#define __SIGQUEUE_TID 0x80000000 /* queue for tid, instead of pid */ +#define __SIGQUEUE_RSRV 0x40000000 /* reserved */ #endif #if __POSIX_VISIBLE || __XSI_VISIBLE From nobody Tue Apr 23 16:52:35 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 4VP7TJ2SVGz5HcdB; Tue, 23 Apr 2024 16:52:36 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TJ0t4Tz48vp; Tue, 23 Apr 2024 16:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891156; 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=D5X5orykgk5Zd919uzUWBCuD7vScWmfgkK1sj2IAakQ=; b=IUUepOUZTRX6ErBBXTdmpczQQgndLLVS7YK+ANA9B40fcA4vG9cUU4T7+XNHI7DaKgL88Q mAoWWAchdBQiZTZuAF2h6IYRahlrma2sTqdhCTPLKihXiGSYivBjAaqvVsot7bD+rP7aKI wZ2ibMdAcsPCtIT92ww62/Fht6Xk2tagdXy1SdxLn7u2rNFSHpAWgzKBo3PeCvv6eBRiil OXfhm0A5+osa3hJI3T0MujXHbLLg6gGbu4+skVdKXEJuWZS8GxsgYv8wLOob4ysAY8UllE o9j5YL0nWuydknj2hAV31/7O3saBlnZYCvuh3iV+0slWX0xpJ3NDXN5pOFwP8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891156; a=rsa-sha256; cv=none; b=XcvZWclJLRrdOfiFPevLAF49jLQ9qr/z3ecTJV4RHM5jWd1qwySXrqMZfVNBM3XyBkU3Dm FevNu9m6X8hLJIfT7TASdleGpH15llW4vTl+JYCo1CBepj4nBvjhtLBTZwlXgq/hNpYLKM Ioc9S7ByHDFjKgB+eD7daCNRKZT4kWo4dRrOAYgDlFwxMmiiWfCaB1rOcpsnKzZLPEQ6UY Vn/qH8n6xjnOmLDVm5BTl3K7JwTwB1B8M6oqOOnomNbnMULGz5DNgX3T93mlNvwdxyPe/z xahYO+Y8I0Ecbtf78psNShofmJMEEoPeWwDNH91fzwAN7Szd9EUkhSPgufgHYA== 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=1713891156; 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=D5X5orykgk5Zd919uzUWBCuD7vScWmfgkK1sj2IAakQ=; b=cg7jSN5/xEhb9KdSS6cICjIXpDyiyOSxAGpNRMLx6s9YwliSU8972HLgIORSwGxQ9HqbFx Ierlk7hWpP8SaMnhR43x5Es7dtVWqESMX0UhDAicfVQw7tb1YRZwL3EpORBELmUkiyflnZ v4quY6OGw2Do8S9ZI/DA8sFNzqRew4btf/bpmW9UrlS22i26SRbZWrA0lAfyyTjqxESs7n p1EU9watT9UWsMhJYtV/u9YsHo51r3igKnQ4oB1IJ/ALwkTcvOjOYXD9koFWyqkUq+vIvw Hrlu6Pq1gFzI1MwBKYz3RzDli67c3FPn7B8Ajq7ER9tk2wUddSeCgFnWngHWOQ== 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 4VP7TH64lbzfxr; Tue, 23 Apr 2024 16:52:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqZxx088156; Tue, 23 Apr 2024 16:52:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqZjS088153; Tue, 23 Apr 2024 16:52:35 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:35 GMT Message-Id: <202404231652.43NGqZjS088153@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: dcc180c51b9c - main - sigqueue(2): Document __SIGQUEUE_TID 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: dcc180c51b9c13df3d1158d14d450308711fe93c Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dcc180c51b9c13df3d1158d14d450308711fe93c commit dcc180c51b9c13df3d1158d14d450308711fe93c Author: Konstantin Belousov AuthorDate: 2024-04-20 21:58:15 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:10 +0000 sigqueue(2): Document __SIGQUEUE_TID Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- lib/libsys/sigqueue.2 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/libsys/sigqueue.2 b/lib/libsys/sigqueue.2 index 5b154efa20fd..2fac63610ac7 100644 --- a/lib/libsys/sigqueue.2 +++ b/lib/libsys/sigqueue.2 @@ -25,7 +25,7 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 5, 2017 +.Dd April 21, 2024 .Dt SIGQUEUE 2 .Os .Sh NAME @@ -96,6 +96,19 @@ be selected for delivery, it is the lowest numbered one. The selection order between realtime and non-realtime signals, or between multiple pending non-realtime signals, is unspecified. +.Pp +As a +.Fx +extension, the value of +.Fa signo +can be or-ed with the following flags: +.Bl -tag -width __SIGQUEUE_TID +.It Dv __SIGQUEUE_TID +The +.Fa pid +parameter is the thread identifier of a thread in the current process, +and the specified signal is queued into the specified thread' queue. +.El .Sh RETURN VALUES .Rv -std .Sh ERRORS @@ -122,6 +135,10 @@ to the receiving process. The process .Fa pid does not exist. +.It Bq Er ESRCH +The thread with id +.Fa pid +does not exist in the current process. .El .Sh SEE ALSO .Xr kill 2 , From nobody Tue Apr 23 16:52: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 4VP7TK1mHVz5Hcb2; Tue, 23 Apr 2024 16:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TK04qxz48tf; Tue, 23 Apr 2024 16:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891157; 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=VGf31jmc61w56+NKk0e6gn+/AFHOTvDHE3kDdYARYtk=; b=BLeuiYTlRUmrVUmo2+JqH2fRAAcfOA/4s9a53+eYfU0KSyWJ9C0I90IBQxFkvTgwfup3xD ACMbkfUnhmWQW+ipuxdMjSS1mqBoBQI0lap77bQjmGkolrYQDmnG7Wak2KQh9CJ6xaPOrz m6ITZbOAB9d0Dv/DiZoDGPz81HVqELJ+siWq2Tt15styGvbLHoR+fswyq2OXLoyNYPk5qx NpWsgN6Fx1ToNENzhBr7vJKKyPc3NXqMlhSa+aHo6a/by4fgErgvT1xTOGn5EA6sb74wZU s3dYFdfdFJP39OG1Em43OgQQ7Kdd2MAkBY3RKbXUhKRBBy0ccGIra4TjciCiPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891157; a=rsa-sha256; cv=none; b=II7MIH1a+0lCOfZmgiQPtlwiF5GpekkDyo9BbGQy8xcH+WNovZkMFKos4BbXN+TUMPI4Vx fX8usNjE8a0cMDBkKmWl7GhBF0hvJdkrk9Z1DoZuVHXemGc1xecrw/9oJKFTAv4sMGc2bz RYFg4+dXztTyJS45pk5GqwurzAts/V/7SYALMQGgGMfjoKyvGXJQY7yJT8zG3BiaztStAt AXK4x6o+NmxwwvtLBogk5jLitk+47YGpLjUxlAetIBUV3gMhce0EVDb6yvEdjbAw/0OSuS ArZTBMdcFaljsQbh7ysbnXydHzLFvcKBLjP3k6Pfsc2k5trdSoBS7PnxzN6XdQ== 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=1713891157; 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=VGf31jmc61w56+NKk0e6gn+/AFHOTvDHE3kDdYARYtk=; b=Y05sFespw2tlpeeEPthwHjG7OTC5jRZ085BvwlAlvIYO91BMMoD6pt8wAf/BJ8hYdvy5dm uFij9XHtGyJXNWdDMbqAnE+0lJNYdkphhWrvgS5r86n2aPdsqNXTT/ON6rnCHU5b7I1kmY FAhHwt+gPXkRD/Y8wcR3j8ulM7R/CCemCpzZWTo07d+Feh6MHnB5oLakkEBRpPomAIsF6d 9aScQKr69R/lWydQGqLwBwqn7laHpf+Qj3zXSFutWHquxmUQJl4ZUACIGVXaHaSkDKtv+q xZb6hq7vUw+8xlFgm0mDORzJQk43Ue0c7/Q6wLDZRG/9B87gznLMW1GKkiC2Pg== 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 4VP7TJ6njxzfxs; Tue, 23 Apr 2024 16:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqacJ088210; Tue, 23 Apr 2024 16:52:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqaFZ088207; Tue, 23 Apr 2024 16:52:36 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:36 GMT Message-Id: <202404231652.43NGqaFZ088207@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: 97acb35bd704 - main - sys/signal.h: move union sigval into dedicated private header sys/_sigval.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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97acb35bd704ac1ef0bd2e286eb8bd09ce4b3ef0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=97acb35bd704ac1ef0bd2e286eb8bd09ce4b3ef0 commit 97acb35bd704ac1ef0bd2e286eb8bd09ce4b3ef0 Author: Konstantin Belousov AuthorDate: 2024-04-19 14:57:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:20 +0000 sys/signal.h: move union sigval into dedicated private header sys/_sigval.h Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- sys/sys/_sigval.h | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/signal.h | 22 +------------------- 2 files changed, 62 insertions(+), 21 deletions(-) diff --git a/sys/sys/_sigval.h b/sys/sys/_sigval.h new file mode 100644 index 000000000000..b25a88b9bd71 --- /dev/null +++ b/sys/sys/_sigval.h @@ -0,0 +1,61 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1982, 1986, 1989, 1991, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __SYS__SIGVAL_H +#define __SYS__SIGVAL_H + +#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500 +union sigval { + /* Members as suggested by Annex C of POSIX 1003.1b. */ + int sival_int; + void *sival_ptr; + /* 6.0 compatibility */ + int sigval_int; + void *sigval_ptr; +}; + +#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) +union sigval32 { + int sival_int; + __uint32_t sival_ptr; + /* 6.0 compatibility */ + int sigval_int; + __uint32_t sigval_ptr; +}; +#endif +#endif + +#endif /* __SYS__SIGVAL_H */ diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 690cab414e9e..113b5aaa9fa1 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -41,6 +41,7 @@ #include #include #include +#include #include /* __MINSIGSTKSZ */ #include /* sig_atomic_t; trap codes; sigcontext */ @@ -165,27 +166,6 @@ typedef __sigset_t sigset_t; #endif #endif -#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500 -union sigval { - /* Members as suggested by Annex C of POSIX 1003.1b. */ - int sival_int; - void *sival_ptr; - /* 6.0 compatibility */ - int sigval_int; - void *sigval_ptr; -}; - -#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) -union sigval32 { - int sival_int; - uint32_t sival_ptr; - /* 6.0 compatibility */ - int sigval_int; - uint32_t sigval_ptr; -}; -#endif -#endif - #if __POSIX_VISIBLE >= 199309 struct pthread_attr; From nobody Tue Apr 23 16:52: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 4VP7TL4Ndsz5Hcb3; Tue, 23 Apr 2024 16:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TL160nz48vQ; Tue, 23 Apr 2024 16:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891158; 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=Ku3mgbf6f+GOCSTCVV2LULmgeweBeWYdEhlJ5HFtf/I=; b=W+nytnbAzblldr7p54OZNKI+GG2MIIdNqnSnaBZkGO364U8MttosegXDIwH+G9nXEyfCSt I5JzySz1azab3QNd775MwqtF7+Tf02vEK8YnLamGYr4qThKqT4189s6698PW66xF41Jv4W 3nfsQB+Atz6y+O13dJem9MPWowHtJ+IaRuAy5Qltu+AoOq8t1dj/TKnFMPCU/Fufcbiw5+ 0QQL469B3N0X6i0LoentL+XXfBRmU/cbeN/ET6hjng2uDb7cGJLbzSE/yVnFXU6r8MRN4/ HwfFyh62WI9eyui7tkcXWD8/j+70v0ghfZxEJik+Pj+dOamK5RAOQowc46jt1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891158; a=rsa-sha256; cv=none; b=n221rUQWMUvG+ByasFvmcS9NrIQeLmIrxYharBunW+eY/BiW5WQsyaGzYzcAzKtKyBP+2g U2329lmcso04QP0dpus3zgqtfOHJ7Nqk2vGFnrebgj4gmcz59GMLjmOMmZt8jQXY6OVB/C y8GnogpcvDCNldLKyLjfsgJ8nyay7Mx6cLseHkY4FOsygwG8EGtXF/DIZ6/q4uzkOkk8c5 3DbHPf+q9dfJpXjBoFSN3wQgvaqn+1jk6gfQ9rmpEnXslbJnbMo8bCaJyX0X53y6pFh+oD LtjfCDhI8+ecm1BE1vgQHqkoRfuTnIsIrD88bK2FIg3LYqpUaQWqCFdBOs6FGg== 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=1713891158; 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=Ku3mgbf6f+GOCSTCVV2LULmgeweBeWYdEhlJ5HFtf/I=; b=UHSnX3PKRAUN74Fk4lgolEnaZmjNsGNMaZtqsJ0cp6f46rjE86A/mmtAz3ZZ3JzspvjkIf vO20Wzu9R7tDWbqfiTauN7wPDX79pyrawEe2Yywgo4FRdKAzo3dUFtjEkr5Gz255JzFvHU gCwuVFTNEyf6lEmzytNxY6qAqaWon/hhyt01gxXuL3TlrgagRqSEkZxesDG21Ct6+OQAQp NWbr9LP8N1mvnJCxtUSQx40X4Jrcs/KTFtX38t9+k1xnI3PIjKVGTTjk+huxQBEhTMxqSp ToHuFlqvWdFgoxdiAeUZ3ArPGxBBYWRuPaWsgzVkWvr4yHvobj6yj6i11C448A== 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 4VP7TL0gbczgBB; Tue, 23 Apr 2024 16:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqbRZ088246; Tue, 23 Apr 2024 16:52:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqb1C088243; Tue, 23 Apr 2024 16:52:37 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:37 GMT Message-Id: <202404231652.43NGqb1C088243@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: 220aa0f45040 - main - libthr: add pthread_sigqueue(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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 220aa0f450409948b869237e5c4505f992c913ce Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=220aa0f450409948b869237e5c4505f992c913ce commit 220aa0f450409948b869237e5c4505f992c913ce Author: Konstantin Belousov AuthorDate: 2024-04-19 14:40:40 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:22 +0000 libthr: add pthread_sigqueue(3) PR: 278459 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- include/pthread.h | 7 ++++ lib/libthr/pthread.map | 4 ++ lib/libthr/thread/Makefile.inc | 1 + lib/libthr/thread/thr_private.h | 1 + lib/libthr/thread/thr_sigqueue.c | 79 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 92 insertions(+) diff --git a/include/pthread.h b/include/pthread.h index feb094c39fce..311211cb48f1 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -43,6 +43,9 @@ #include #include #include +#if __BSD_VISIBLE +#include +#endif #include #include @@ -302,6 +305,10 @@ void pthread_yield(void); int pthread_getname_np(pthread_t, char *, size_t); int pthread_setname_np(pthread_t, const char *); + +int pthread_sigqueue(pthread_t thread, int sig, + const union sigval value); + #endif int pthread_mutexattr_getprioceiling( diff --git a/lib/libthr/pthread.map b/lib/libthr/pthread.map index aa9abb7e6114..f75ef4c9135e 100644 --- a/lib/libthr/pthread.map +++ b/lib/libthr/pthread.map @@ -337,3 +337,7 @@ FBSD_1.6 { pthread_peekjoin_np; pthread_setname_np; }; + +FBSD_1.8 { + pthread_sigqueue; +}; diff --git a/lib/libthr/thread/Makefile.inc b/lib/libthr/thread/Makefile.inc index 33b95e9dd76d..c75322d6be95 100644 --- a/lib/libthr/thread/Makefile.inc +++ b/lib/libthr/thread/Makefile.inc @@ -47,6 +47,7 @@ SRCS+= \ thr_setprio.c \ thr_setschedparam.c \ thr_sig.c \ + thr_sigqueue.c \ thr_single_np.c \ thr_sleepq.c \ thr_spec.c \ diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index e590fb0c1e7a..f89941f96c78 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -1102,6 +1102,7 @@ int __Tthr_mutex_lock(pthread_mutex_t *); int __Tthr_mutex_trylock(pthread_mutex_t *); bool __thr_get_main_stack_base(char **base); bool __thr_get_main_stack_lim(size_t *lim); +int _Tthr_sigqueue(pthread_t pthread, int sig, const union sigval value); __END_DECLS __NULLABILITY_PRAGMA_POP diff --git a/lib/libthr/thread/thr_sigqueue.c b/lib/libthr/thread/thr_sigqueue.c new file mode 100644 index 000000000000..6f7ad8c63bad --- /dev/null +++ b/lib/libthr/thread/thr_sigqueue.c @@ -0,0 +1,79 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1997 John Birrell . + * All rights reserved. + * + * Copyright 2024 The FreeBSD Foundation + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "namespace.h" +#include +#include +#include +#include "un-namespace.h" + +#include "thr_private.h" + +__weak_reference(_Tthr_sigqueue, _pthread_sigqueue); +__weak_reference(_Tthr_sigqueue, pthread_sigqueue); + +int +_Tthr_sigqueue(pthread_t pthread, int sig, const union sigval value) +{ + struct pthread *curthread; + int e, ret; + + if (sig < 0 || sig > _SIG_MAXSIG) + return (EINVAL); + + curthread = _get_curthread(); + ret = 0; + + if (curthread == pthread) { + if (sig > 0) { + e = sigqueue(pthread->tid, sig | __SIGQUEUE_TID, + value); + if (e == -1) + ret = errno; + } + } else if ((ret = _thr_find_thread(curthread, pthread, + 0)) == 0) { + if (sig > 0) { + e = sigqueue(pthread->tid, sig | __SIGQUEUE_TID, + value); + if (e == -1) + ret = errno; + } + THR_THREAD_UNLOCK(curthread, pthread); + } + + return (ret); +} From nobody Tue Apr 23 16:52: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 4VP7TM6Qndz5HcXZ; Tue, 23 Apr 2024 16:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TM2XcPz49Gj; Tue, 23 Apr 2024 16:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891159; 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=ZR8ST/cnlBvaj6SORULJuz+/7VCbZrq1+dPQpJbKnhs=; b=t1Q4csbDda0RHmA4amJvAbouXEYmLW0eHYutUwGRUE/LgZBp80/7KW4gaSdNI2OzEeC1ok FYcYHltKd1D9s0Ax+VcMeicmDSJ5sRkZTEsqHdOMwh+tiqiQfCi9HhgGUEtOWuctvfl11s jFJOvyAroK6qVtqtVkxWv1RudoSlHjJ6+sAU1xwMVnuuoWt6oTaX1aK/1l7DyhNjRCszut XEgUxeKgVwkp4uk6L8ohmcSop57J9BkI6F/4n+mw4pMxcNMTNkdHJdw+URK7ltucb9yIGU moT+4uTMaAC+ZHRI57/Urs8aDO/dT75zAIQAZGHBIRUV7tIBdUMar+6QOc3d3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891159; a=rsa-sha256; cv=none; b=o/2UlHfJqdsYpG3dwn74QAIRvXdhFHKE3Uw7b/Fxm48jt/AC2mBF7Cm19Gz8u5DFeGbk7n Yw97+d1gCZnapQ5Y5S4A8a3QYmv2VlKZXx39dhZuzX4w5X2wnxDXm2e9bKS9eADq+NcD/U B81sGA8WA2eXPTOFJTbhb9kcxWPM1JegWLHqhm2/aORbXNVl2FKTLCmROTunaQQ/8d53jA cI8SP1WTKaJHoMcmciNWqVbq81q85Csk/KDvwy0VmM1L7l+HCaz4fZLN+i3XR3b2oScAqV jtAI++OdU/LeCUOco2vfFzIp5x36V70RYtwz0ODWOQU9SyhYxPV2QSY9lYC+jw== 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=1713891159; 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=ZR8ST/cnlBvaj6SORULJuz+/7VCbZrq1+dPQpJbKnhs=; b=BMC5VByEQpR0yUkoQa+EI0O2T8z3zQ+Fbu5pttOJcAqGLM+XRlpJTt0riNww0OTB4NOfTL 7gYeLvOlEypPw3ugDwWZCWZSiofZUfPiqmKrjeW4gP9h8t+eu9Ayfbm3ifyq4jKTECAvHx O5pxz3tF+PaTLE1Pv0YczNdWZevl7M0F8MYJfBgSpPE24EsH1ojori6hbnDTuhScloulGZ DS0MqX3USAAag6XL+LuWIxzDtjsRZKeO4dSffJ9CLKC/uNPeDZmgO3rBu5c0IRhNFHwSi3 u25l948xr1+MN7KoufDGIoZeRMaEgyimTaa2qBHAIXaFyWvoEDzhtSH8RW/U8Q== 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 4VP7TM1kcJzfxt; Tue, 23 Apr 2024 16:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqd8c088279; Tue, 23 Apr 2024 16:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqdwI088276; Tue, 23 Apr 2024 16:52:39 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:39 GMT Message-Id: <202404231652.43NGqdwI088276@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: 91da6becae62 - main - pthread_sigqueue(3): document 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: 91da6becae6291533b9b59646b59bace2f905c81 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=91da6becae6291533b9b59646b59bace2f905c81 commit 91da6becae6291533b9b59646b59bace2f905c81 Author: Konstantin Belousov AuthorDate: 2024-04-20 22:16:08 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:25 +0000 pthread_sigqueue(3): document Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- share/man/man3/Makefile | 1 + share/man/man3/pthread_sigqueue.3 | 102 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index d82ff2bccd51..5c8dced71743 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -452,6 +452,7 @@ PTHREAD_MAN= pthread.3 \ pthread_set_name_np.3 \ pthread_setspecific.3 \ pthread_sigmask.3 \ + pthread_sigqueue.3 \ pthread_spin_init.3 \ pthread_spin_lock.3 \ pthread_suspend_all_np.3 \ diff --git a/share/man/man3/pthread_sigqueue.3 b/share/man/man3/pthread_sigqueue.3 new file mode 100644 index 000000000000..bf5dd62f04e6 --- /dev/null +++ b/share/man/man3/pthread_sigqueue.3 @@ -0,0 +1,102 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright 2024 The FreeBSD Foundation, Inc. +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice(s), this list of conditions and the following disclaimer as +.\" the first lines of this file unmodified other than the possible +.\" addition of one or more copyright notices. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice(s), 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 COPYRIGHT HOLDER(S) ``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 HOLDER(S) 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 21, 2024 +.Dt PTHREAD_SIGQUEUE 3 +.Os +.Sh NAME +.Nm pthread_sigqueue +.Nd queue a signal to a specified thread +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread.h +.In signal.h +.Ft int +.Fn pthread_sigqueue "pthread_t thread" "int sig" "const union sigval value" +.Sh DESCRIPTION +The +.Fn pthread_queue +function queues a signal, specified by +.Fa sig , +to a thread, specified by +.Fa thread . +If +.Fa sig +is 0, error checking is performed, but no signal is actually sent. +The +.Fa value +is queued together with the signal, and becomes available in +.Vt siginfo_t +data passed to the signal handler. +.Pp +The +.Nm +function is similar to +.Xr sigqueue 2 , +but targets a thread in the current process instead of a process. +See +.Xr sigqueue 2 +for details about signal queueing and delivery selection. +.Sh RETURN VALUES +If successful, +.Fn pthread_sigqueue +returns 0. +Otherwise, an error number is returned. +.Sh ERRORS +The +.Fn pthread_sigqueue +function will fail if: +.Bl -tag -width Er +.It Bq Er EAGAIN +No resources are available to queue the signal. +The current process has already queued +.Brq Dv SIGQUEUE_MAX +signals that are still pending, +or a system-wide resource limit has been exceeded. +.It Bq Er ESRCH +.Fa thread +is an invalid thread ID. +.It Bq Er EINVAL +.Fa sig +is an invalid or unsupported signal number. +.El +.Sh SEE ALSO +.Xr sigqueue 2 +.Sh STANDARDS +The +.Fn pthread_sigqueue +function is a +.Fx +extension. +An identical function with the same semantic is available in other +operating systems. From nobody Tue Apr 23 16:52: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 4VP7TP0WJkz5HcXc; Tue, 23 Apr 2024 16:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7TN3BRvz49Mg; Tue, 23 Apr 2024 16:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891160; 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=TWcuxf1Q+UaEnFHq6HKkCjdJm3UAuebLIcm2THUoU0U=; b=fcBQ+A2FBIY3MuH0vG9zjIS5tTeKY1oylNGoTpB3e/Rmlq1BH1WV5t837MZI/j9Fun2Imw U5H89VhtmsF1k8fViZncG6LcUiJY7WlmMKVzKsB1VrrrHSnI97wZ1gg85wVx6CfttNNFit vwKJL8c/4DxeA3sbUPd6O5FG+bwFSZTiGt2XgkUagYlfZ68OpPAIrilnNHsDmRSlBdYeQO R7RjGRxvAZV95kXi/oBP5pnrA8/D/5+pCmxSEz4jCi50esU3s4YQKfewMGUuzDrK84r9z/ gdqx6Ly9vtT38+5bB6ApxQEalafOAap39uVleYm8f2areDHHAIZxgbgdbkRsMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891160; a=rsa-sha256; cv=none; b=la8CSESQpXIor9tcRrYa6bNug7DDQ3iJ9GB72Udf0V33xliThVSQW22JKsHA3IcY4qNTSb LqqsFgtCxw6hbps5Uki0656BkzB5GfRlp1rUvgXLyO1kXN+cxRAxcK+BefoZAIpAbJ7Lle rVwQRTawzG+BfZBlchQFuJVAFHKVi/fG4J7R+cRQOCrjWQH69AxxxrCiObJpcL/ACgYsOd 9ZrToKOezvIxQ7mNBgp+xoYbmnZ3nQOU+N0Fcg5afMk7d0pnTzVwA0cRCWrqNmV8aTNtl1 tIEi/GU01Fo6iEdG0TA5tvYyXrrdNlY2xlk9U0ta2W72Ii6jqRNQv/p1jOyFWw== 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=1713891160; 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=TWcuxf1Q+UaEnFHq6HKkCjdJm3UAuebLIcm2THUoU0U=; b=nINYoVSLvHfhbn+myAUAr7blVZKtrQtgctCjLtsiuYFxB0olU+W386xw3GlK4AyYozwvOd DVor3rq1RmvH3tff8HDAhLolC7DIFQlLm6LWz87d5scmfbTnTEFkIBm/jDY2ZiSgaAJr/f e1gdMq3j2/MPac09eCGVtppNLa5VJ1Bga/6vaI23PLxSmEE7lmCAKRHqPZZOZMuhO4KwQr GF0EJGGGpUF24UsYonsc3m5PtJv1Yxu2MoV+9qRjSc1s0rFnq9qY1Yapg0IhSw1ZGnJAN7 +rnsX2t1DAhhJ9amF1qVwG/rQ7is/v1nX5oSQ5pGcLkmd8knIZhViWkqrhOGOA== 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 4VP7TN2mcmzfxv; Tue, 23 Apr 2024 16:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGqeIH088318; Tue, 23 Apr 2024 16:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGqep0088315; Tue, 23 Apr 2024 16:52:40 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:52:40 GMT Message-Id: <202404231652.43NGqep0088315@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: fb2ab7ce52d3 - main - Add test for pthread_sigqueue(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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb2ab7ce52d3f1e9d0998f3e5c12c3468ce4563a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fb2ab7ce52d3f1e9d0998f3e5c12c3468ce4563a commit fb2ab7ce52d3f1e9d0998f3e5c12c3468ce4563a Author: Konstantin Belousov AuthorDate: 2024-04-20 19:59:14 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 16:51:31 +0000 Add test for pthread_sigqueue(3) Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867 --- lib/libthr/tests/Makefile | 1 + lib/libthr/tests/pthread_sigqueue_test.c | 120 +++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile index 8b7850b94265..d882ccfd877c 100644 --- a/lib/libthr/tests/Makefile +++ b/lib/libthr/tests/Makefile @@ -35,6 +35,7 @@ NETBSD_ATF_TESTS_SH+= exit_test NETBSD_ATF_TESTS_SH+= resolv_test ATF_TESTS_C+= umtx_op_test +ATF_TESTS_C+= pthread_sigqueue_test LIBADD+= pthread LIBADD.fpu_test+= m diff --git a/lib/libthr/tests/pthread_sigqueue_test.c b/lib/libthr/tests/pthread_sigqueue_test.c new file mode 100644 index 000000000000..053a8dac4039 --- /dev/null +++ b/lib/libthr/tests/pthread_sigqueue_test.c @@ -0,0 +1,120 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2024 The FreeBSD Foundation + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define NTHREADS 330 +static int value[NTHREADS]; +static pthread_t thr[NTHREADS]; +static pthread_barrier_t barrier; + +static void +handler(int signo __unused, siginfo_t *info, void *data __unused) +{ + pthread_t self; + int i; + + /* + * Formally this is thread-unsafe but we know context from + * where the signal is sent. + */ + self = pthread_self(); + for (i = 0; i < NTHREADS; i++) { + if (pthread_equal(self, thr[i])) { + value[i] = info->si_value.sival_int; + pthread_exit(NULL); + } + } +} + +static void * +threadfunc(void *arg __unused) +{ + pthread_barrier_wait(&barrier); + for (;;) + pause(); +} + +ATF_TC(pthread_sigqueue); +ATF_TC_HEAD(pthread_sigqueue, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks pthread_sigqueue(3) sigval delivery"); +} + +ATF_TC_BODY(pthread_sigqueue, tc) +{ + struct sigaction sa; + union sigval sv; + int error, i; + + error = pthread_barrier_init(&barrier, NULL, NTHREADS + 1); + ATF_REQUIRE_EQ(0, error); + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = handler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_SIGINFO; + + if (sigaction(SIGUSR1, &sa, NULL) != 0) + atf_tc_fail("sigaction failed"); + + memset(&sv, 0, sizeof(sv)); + + for (i = 0; i < NTHREADS; i++) { + error = pthread_create(&thr[i], NULL, threadfunc, NULL); + ATF_REQUIRE_EQ(0, error); + } + error = pthread_barrier_wait(&barrier); + ATF_REQUIRE(error == 0 || error == PTHREAD_BARRIER_SERIAL_THREAD); + + for (i = 0; i < NTHREADS; i++) { + sv.sival_int = i + 1000; + error = pthread_sigqueue(thr[i], SIGUSR1, sv); + ATF_REQUIRE_EQ(0, error); + error = pthread_join(thr[i], NULL); + ATF_REQUIRE_EQ(0, error); + } + for (i = 0; i < NTHREADS; i++) + ATF_REQUIRE_EQ(i + 1000, value[i]); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, pthread_sigqueue); + return atf_no_error(); +} From nobody Tue Apr 23 16:56: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 4VP7YM4Q0yz5HdGX; Tue, 23 Apr 2024 16:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7YM3rxGz4Dy4; Tue, 23 Apr 2024 16:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891367; 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=q3J6Y3ym1t0JKNE36xoy7dcZ2HEzsB+yVwphuzTpPAE=; b=eR1b5dn11G8pWKYqFQv8LBvdeRRQURSLVkb7clgFN2ynec+/jKOwCdo3670Zm/ir0Th4MB vJLcPX6ffFeL5AbqZUtLbWG7fMD1t4alQb5C4g1AnW84Nt1RsW4wA7Wh2yiVWe8pJVJHtV 3durl1Si8TYKGIjNnybheffIlxyKKhOI0RzSmA9tWNomCPJXi9gRXj50Uls9x91MZ4iHy/ 241U4012ggG3UarOnKigwxVbggPxWXsGvCNdxu54A3eNJFVehUl0+/fDlkrtrEv/HQesj4 YuVt3p++UjFDs5PQnt9BQGvYsDFLVUUAU90/7NeZ6VtCh5Fiu/S9wSBcjp+MUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891367; a=rsa-sha256; cv=none; b=LAqEnmkkO4NbbIWmBLfK2Bta+hV3q1cvBbrPRVDaVtY4JnF6gLA1gfOnQ6B7LA/6a/sw/2 X+AeLjMEoATFB9TyartsUYkadsr3QSzy9iuCqbv2sgYb8ROPIcgTwU6aUCXW1wlKuVH2Zq Px/5uYzB6EQVyENMY45bYwyqcs4z2j4F01zTAisDK1mRNhu6nKBaJVvKqHs3qK51rYlPSC 1h6NATkMds/u9/pteumXHwd76W6v9mFBkSezmjGa9Xne7O2QnjCQPIF6AxQ3S+1iKNtP9S fGp9Y0cSKkJQomaszQ+BhrBwNzHKBg2h0zv1CxtHITr5rjD4zdImLEiy5lXeIw== 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=1713891367; 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=q3J6Y3ym1t0JKNE36xoy7dcZ2HEzsB+yVwphuzTpPAE=; b=lS1bySo4IqFGwIqZxTBL/Q8krrk9w9ouL9GFb1Xk1hShfqqaX0J7bZbcnUWWkVikwF9S3p g8UbXlU0Vbx2+pC/+nZ4qTs6X/JxRHxZe/ufngalIB+OJsv03qQ9O/NXQHeDZy3oVk65Tx N3dcFxTbsWPQnvr6pCIgAGJa9IFzfFqxQ090Dd07OnEY+ZnSyKAT+qc89zCBkr9/Z3gyB9 Sh5+WicVhrWaURE7QVdlG7+umH7Bd2hWaAeQyQIDb99oA+RMKVRP4ZuJqOUDGNW8HPMbPI Kaxurco0w4L0cVDw1uq4YvisaZ+7JKVxZXuPyr6MuzrnZARGNYO5Zf0j0i/mqQ== 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 4VP7YM3SNgzgNy; Tue, 23 Apr 2024 16:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGu7Pd088996; Tue, 23 Apr 2024 16:56:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGu7M5088993; Tue, 23 Apr 2024 16:56:07 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:56:07 GMT Message-Id: <202404231656.43NGu7M5088993@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: 6d5ce2bb6344 - main - nfsserver: Default to nfs_reserved_port_only="YES" 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: 6d5ce2bb63445e9c09c3b5c29fb18983e1e2628c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6d5ce2bb63445e9c09c3b5c29fb18983e1e2628c commit 6d5ce2bb63445e9c09c3b5c29fb18983e1e2628c Author: Mark Johnston AuthorDate: 2024-04-23 16:51:03 +0000 Commit: Mark Johnston CommitDate: 2024-04-23 16:54:46 +0000 nfsserver: Default to nfs_reserved_port_only="YES" This setting causes the NFS server to check that all RPCs are sent from a privileged (<= 1023) port, rejecting those that are not. This slightly raises the bar for a user with network access to an unauthenticated NFS server to access exported NFS filesystems. Users that use traditional NFS clients (e.g., those provided by FreeBSD or Linux) should not see any difference, assuming that unprivileged filesystem mounting is disallowed. Note that the setting is per-VNET, so may be overridden in VNET jails without affecting the rest of the system. Discussed with: freebsd-arch@ Reviewed by: rmacklem, bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44906 --- libexec/rc/rc.conf | 2 +- sys/fs/nfsserver/nfs_nfsdkrpc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 96dd0c534dc2..6a8b6e257b17 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -386,7 +386,7 @@ nfs_server_maxio="131072" # Maximum I/O size for the nfsd. mountd_enable="NO" # Run mountd (or NO). mountd_flags="-r -S" # Flags to mountd (if NFS server enabled). weak_mountd_authentication="NO" # Allow non-root mount requests to be served. -nfs_reserved_port_only="NO" # Provide NFS only on secure port (or NO). +nfs_reserved_port_only="YES" # Provide NFS only on secure port (or NO). nfs_bufpackets="" # bufspace (in packets) for client rpc_lockd_enable="NO" # Run NFS rpc.lockd needed for client/server. rpc_lockd_flags="" # Flags to rpc.lockd (if enabled). diff --git a/sys/fs/nfsserver/nfs_nfsdkrpc.c b/sys/fs/nfsserver/nfs_nfsdkrpc.c index 022f7403d28b..ce1189d40425 100644 --- a/sys/fs/nfsserver/nfs_nfsdkrpc.c +++ b/sys/fs/nfsserver/nfs_nfsdkrpc.c @@ -82,7 +82,7 @@ int newnfs_nfsv3_procid[NFS_V3NPROCS] = { SYSCTL_DECL(_vfs_nfsd); -NFSD_VNET_DEFINE_STATIC(int, nfs_privport) = 0; +NFSD_VNET_DEFINE_STATIC(int, nfs_privport) = 1; SYSCTL_INT(_vfs_nfsd, OID_AUTO, nfs_privport, CTLFLAG_NFSD_VNET | CTLFLAG_RWTUN, &NFSD_VNET_NAME(nfs_privport), 0, "Only allow clients using a privileged port for NFSv2, 3 and 4"); From nobody Tue Apr 23 16:56: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 4VP7YN6YdGz5Hcxj; Tue, 23 Apr 2024 16:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP7YN4qqKz4Dj0; Tue, 23 Apr 2024 16:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713891368; 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=+oCzBBgalZzbBbY43o0tZPD8b//FerMBGAOfZtOyeNc=; b=sjhoAKeaZjZKT6RD4WvP98t6H5/rTQcFYcsQQi0TcnXMjMxN7YxohseYMsgI8WPS4O4m4w G7nIlf43FSdLQWJv7SD3kRN7t2JVZepmAr7fkQLheLi9VnqL1/MqDK/db7V8e9BsH8dppR OO2Exz0H56Vwparpz+A5WC0vht2n47jFBr980qY0Q19Q14xPypBcJy6QMeQ6drQdKgZE+Z 6qY87UsQS1W0QCW/udj31X8Ki9zYblAq5Q13HZUlIEu9Bd7NZEXThOkEYUEFbpa4Fzxlli IiliPtE55v8KjK27olUZiF3b5OJylhTZHNAtGucuHzXCjoy42pHLj+d0ogDiBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713891368; a=rsa-sha256; cv=none; b=RXneRfDUPBhPFkyU2WnRU0NTdfuepGELwNuttWe5NcKkCJ8/0zSWVmDqXMplHNC2nz7OL+ BkwfxNYJJWBtWUn368sUb02fgpq6RfHDeNBURj4K82vteO3kjAVr7+FXA7PnDJqGUpbRGv AhHzbadkjb7bIRk43MQxibgnoZPHHADrlM7+xv0rXRH8+w/DlqNCVXnnbrvsjXtU2HL9xe xVf9I3P54kq2lv1usRvrsmwfGJDVM5plgGgmav0JdWjgIA7bhi5cXJO4IocdEDszDcmL6w OIHmrirBE0W0WOlsfo5RiNFfTFKJ56iZVdmYfKFgYi3YLne8h1nqFMyvO7TPDA== 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=1713891368; 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=+oCzBBgalZzbBbY43o0tZPD8b//FerMBGAOfZtOyeNc=; b=Mx/EDJYXHG5iOeKfg+Gr0VgBxdQHDm1byP3zBzfXJHm8ebwNl/aBlC3J5aIsdv62nnf9mw b3sgru2LsOvT+i92LMIiP9ixa1HzZOsusRQ5W5U13VYvkXRlxE1Lpp6Z+hbkoHdfFPr+R8 GDflWe2HFo0pkug4QqmJ5v8fhaxeq57t+ceioUO8edrBV7nDG1+pQDKNFKU7dStainkAg6 4OE7++SEmR6EprdUkdWM8feGooh6JPZSd9rYTja/207MIwSxg89qh7gS8qg8lhwTT18Gt/ Z/VSDiwzGu20W66yJW2bgwkEA5c40J7PKFO8SpqkmspJhrydSxxOPeAlj2424Q== 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 4VP7YN4S78zg0q; Tue, 23 Apr 2024 16:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGu8Oh089050; Tue, 23 Apr 2024 16:56:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGu8N5089048; Tue, 23 Apr 2024 16:56:08 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:56:08 GMT Message-Id: <202404231656.43NGu8N5089048@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: ca0620b70750 - main - RELNOTES: Add an entry for the nfs_reserved_port_only default change 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: ca0620b70750d4b5b03a7f03393acbe9600870c1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ca0620b70750d4b5b03a7f03393acbe9600870c1 commit ca0620b70750d4b5b03a7f03393acbe9600870c1 Author: Mark Johnston AuthorDate: 2024-04-23 16:52:30 +0000 Commit: Mark Johnston CommitDate: 2024-04-23 16:55:10 +0000 RELNOTES: Add an entry for the nfs_reserved_port_only default change Sponsored by: The FreeBSD Foundation --- RELNOTES | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/RELNOTES b/RELNOTES index 59131dc70dac..91d6d74a38fc 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,10 +10,19 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +6d5ce2bb6344: + The default value of the nfs_reserved_port_only rc.conf(5) setting has + changed. The FreeBSD NFS server now requires the source port of + requests to be in the privileged port range (i.e., <= 1023), which + generally requires the client to have elevated privileges on their local + system. The previous behavior can be restored by setting + nfs_reserved_port_only=NO in rc.conf. + aea973501b19: ktrace(2) will now record detailed information about capability mode violations. The kdump(1) utility has been updated to display such information. + f32a6403d346: One True Awk updated to 2nd Edition. See https://awk.dev for details on the additions. Unicode and CSVs (Comma Separated Values) are now From nobody Tue Apr 23 17:43: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 4VP8c70Cfnz5HjGP; Tue, 23 Apr 2024 17:43:35 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP8c66jv8z4L3V; Tue, 23 Apr 2024 17:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713894214; 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=nmbz2ItH6lXLUvslH8q9PtOwuuMr3pI32PF25Hyq1JQ=; b=iqY1vIc6b2Fy6pDCHWYiVhZbNpaozXLlSJ6TmGAFAiZajj3+Z3R5Zp+jhUMb/6udAibl9A DQ7SlNbUDEC/Eby6pJHcR0413OOPTtL4TlyVr+fl1WqGq0DBX8MHvMwzFJDitk5BkItuWK TLJqsviCXSc2uoE+kRK33+CTVyubS6flZO+kcvdsOZgbOgApmEBoflpEcYQJVgBdW0cKAF 5IDC6CE1snJ77NE1YKfS505fPrUX3CDAn0vWdDu59e43vCe+29y4XBLUAzELQtcG4BUsR2 1xLbF7DdsSykQlCarJnRhDecX8VacHdkjDXvcnd3/igTbYkNIY0Pqes5CYUflw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713894214; a=rsa-sha256; cv=none; b=FNSeb33bDCmVi54wxbLcoCGHkWhwlFxfRYiDFetkdW4HQk+wSGRAKDAaUgQ0v/pQ2/xVlh A0jWklT+plYWtsl7MzM3T+ZsKTmwjNR182FpdIDIt5XbeKlwgvFBjk4c+WG6sB7MAPNkhC fpLYGFcJTWNFyGP/eeRXcDYN6l9GdTiTTBDyorfr93T85pHypEzAB8MW8EnLUTxEsfnOCs aV6hDmGYp7QsnRpUrHd+lh+4coZ5tGs7hpvnQs5j3jr0a0n50CGbpdoLoKgz1U+C4JEe42 s4XV2bsDz67al09u+J8xBmik0io9vl9DvC5tIyQ30bvSQlZJQ82jd1J5cSq/Xw== 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=1713894214; 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=nmbz2ItH6lXLUvslH8q9PtOwuuMr3pI32PF25Hyq1JQ=; b=uQm12it8BhHEEvBeETgV73IEuMtlxXnP7MMAHBk4z2GoEyPpFLPuIgiwrC9yf8rDKODzPl ce4cK5DhyL5GVfmLYu59/DWOT0hywBAuZX2E2RF5UAt9E7xOrmd1kypbS79FD4pzZ8Avg0 Q+1q8UbKHKoR0FZ5W+DOvObyFNF2c1P+WJok52Ilfk6dZvqvjvbtxaQddMBchSbGmC3fS5 tCiCCdLHWxz7MgEhx7jNZG4k5WjHqFt9hUbwPU09UFUKNiDf8Nu8HzkY7INWWlpCJp/+b4 1nyDdQ71G1iQxtdTNviOe5AiHg3R3yREda08Z+heZ+oAIscaoTJriwMoNtJAYw== 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 4VP8c66KDwzh7x; Tue, 23 Apr 2024 17:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NHhYWt073125; Tue, 23 Apr 2024 17:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NHhYC2073122; Tue, 23 Apr 2024 17:43:34 GMT (envelope-from git) Date: Tue, 23 Apr 2024 17:43:34 GMT Message-Id: <202404231743.43NHhYC2073122@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: f48643d376a4 - main - Use MOVED_LIBS for usr/lib/libcxxrt.so.1 ObsoleteFiles.inc entry 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: f48643d376a45529094d39db25a471a19ab40870 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f48643d376a45529094d39db25a471a19ab40870 commit f48643d376a45529094d39db25a471a19ab40870 Author: Dimitry Andric AuthorDate: 2024-04-23 17:40:29 +0000 Commit: Dimitry Andric CommitDate: 2024-04-23 17:40:29 +0000 Use MOVED_LIBS for usr/lib/libcxxrt.so.1 ObsoleteFiles.inc entry Otherwise, the "make delete-old-libs" mechanism also deletes 32-bit copies, such as in /usr/lib32. Reported by: Josef 'Jeff' Sipek Fixes: 911a6479e18b --- ObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index a4301ebdab41..02477bbebd0b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,7 +52,7 @@ # done # 20240422: remove improperly installed libcxxrt.so.1 -OLD_LIBS+=usr/lib/libcxxrt.so.1 +MOVED_LIBS+=usr/lib/libcxxrt.so.1 # 20240414: unix_socketpair_test renamed OLD_FILES+=usr/tests/sys/kern/unix_socketpair_test From nobody Tue Apr 23 18:49: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 4VPB3r5WTXz5Hr3h; Tue, 23 Apr 2024 18:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPB3r4sXvz4Y5k; Tue, 23 Apr 2024 18:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713898152; 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=PA+Omt+tVgzlctiRWMEQ1DBqTTfzfJxgZ2dVsBwJpQo=; b=eKqLIx5IOa0+iF4qO5WE51372krEKodoYB5YArw6qxLbZFYrQCSoKF9RInadkG7ZGsAu78 ughcQGJ2B0tv8lw6GHPMTt9v12wkIIyBgRWUtdtSddO6FbzeKE9pI/WNdg3AzdiCOv5MzE gQt3M7CFf5ttbkmkpnl9QbXuDMkU9tN+aYAF5GcDbB95T9iKI9gQbNbc1HZIXHL4aaLc9F TMmL8cystb6Z0ppoq/jauyUoL/260BC+bqbHICR9GhVeruyaWcvUJ17xIs1QCEAzU2zZ5E xyFtAoMjxD1X2heP6JAI2CpnkSFLGAzCkcKUh5lu/TsMywfAyLe48xXhcvaOmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713898152; a=rsa-sha256; cv=none; b=oSJGj8rm4Es69/wfvZk0IOGwdQ1/EL+yHyT/VWMs3daoGCww227CAsrfwKoqSx3rfDZzAs Z6XcPu6n36Gja0ZVfvvm6ZHH5k2GrImVlk/2zXEH/hJ5PRItruUookU8OReyeJcGWwTpRe aYjJmKgXQPByMkmcd8GzHcIDbABl0vM9j8KiPKWYLo3CQkvsUkV2sqVf8Fnt+NxSQUGB2Q EiIsHBKiGie1+YzLSE0gM56eiGb1jdek1o3r4ZgOlh9gGm1GeqW4WjmVz6NQWBlD2oGziC da7UAAT+v2xMStHu2I8Ils1vSWiRzHP41LK96qY5pr5iAokxKEeeur7P59Tf6g== 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=1713898152; 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=PA+Omt+tVgzlctiRWMEQ1DBqTTfzfJxgZ2dVsBwJpQo=; b=uD1Vjt78a60VRAiXgxhqbG6tarKyDHsjzWLt5LzYWcBON0odfS5zH/c/viFV+EWaVzzeCk kq1QNkPcpWdmtfc6RTOuXuE3UXBwdC8toNZzJbzofSECgZv38BmghTL5FztkoQgbMoMrvp ItWEq1kBeEAxppD7HmFTuRz8vksyTzHpnUYe5mkjnGovMGRtC2S3Nh770TZTsud7p1msvk jClPdUoGsDtuQDNJUyCIDjvokzj9yN+S25fg1mb+Or6jC09cv/CEUjZ4vdAN1aYbywufxW uPDO6HgshdFc+91H3manogqqpyLNxo+WQEZGiGWic+EgUa6rwQ+Gvnkq73iMTw== 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 4VPB3r48k5zkDR; Tue, 23 Apr 2024 18:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NInCUF076631; Tue, 23 Apr 2024 18:49:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NInC2C076628; Tue, 23 Apr 2024 18:49:12 GMT (envelope-from git) Date: Tue, 23 Apr 2024 18:49:12 GMT Message-Id: <202404231849.43NInC2C076628@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: 2b676a66c00a - main - camcontrol: Enable WITH_NVME unconditionally 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: 2b676a66c00af03e4b64d072658d2478dbdf0a97 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2b676a66c00af03e4b64d072658d2478dbdf0a97 commit 2b676a66c00af03e4b64d072658d2478dbdf0a97 Author: John Baldwin AuthorDate: 2024-04-23 18:46:53 +0000 Commit: John Baldwin CommitDate: 2024-04-23 18:47:12 +0000 camcontrol: Enable WITH_NVME unconditionally MK_NVME is no longer marked broken for any platforms, so just include support for it always as we do for ATA and SCSI. Reviewed by: emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44841 --- sbin/camcontrol/Makefile | 4 +--- sbin/camcontrol/camcontrol.c | 14 -------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile index e0407dd20a56..b04eb5614c62 100644 --- a/sbin/camcontrol/Makefile +++ b/sbin/camcontrol/Makefile @@ -14,14 +14,12 @@ SRCS+= progress.c SRCS+= timestamp.c SRCS+= util.c SRCS+= zone.c -.if ${MK_NVME} != "no" .PATH: ${SRCTOP}/sbin/nvmecontrol -CFLAGS+= -I${SRCTOP}/sbin/nvmecontrol -DWITH_NVME +CFLAGS+= -I${SRCTOP}/sbin/nvmecontrol SRCS+= identify_ext.c SRCS+= nc_util.c .PATH: ${SRCTOP}/sys/dev/nvme SRCS+= nvme_util.c -.endif # This is verboten .if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 555a67001443..db26b45ac508 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -60,9 +60,7 @@ #include #include #include "camcontrol.h" -#ifdef WITH_NVME #include "nvmecontrol_ext.h" -#endif typedef enum { CAM_CMD_NONE, @@ -278,9 +276,7 @@ static int print_dev_ata(struct device_match_result *dev_result, char *tmpstr); static int print_dev_semb(struct device_match_result *dev_result, char *tmpstr); static int print_dev_mmcsd(struct device_match_result *dev_result, char *tmpstr); -#ifdef WITH_NVME static int print_dev_nvme(struct device_match_result *dev_result, char *tmpstr); -#endif static int requestsense(struct cam_device *device, int argc, char **argv, char *combinedopt, int task_attr, int retry_count, int timeout); @@ -600,14 +596,12 @@ getdevtree(int argc, char **argv, char *combinedopt) skip_device = 1; break; } -#ifdef WITH_NVME } else if (dev_result->protocol == PROTO_NVME) { if (print_dev_nvme(dev_result, &tmpstr[0]) != 0) { skip_device = 1; break; } -#endif } else { sprintf(tmpstr, "<>"); } @@ -781,7 +775,6 @@ print_dev_mmcsd(struct device_match_result *dev_result, char *tmpstr) return (0); } -#ifdef WITH_NVME static int nvme_get_cdata(struct cam_device *dev, struct nvme_controller_data *cdata) { @@ -843,7 +836,6 @@ print_dev_nvme(struct device_match_result *dev_result, char *tmpstr) cam_close_device(dev); return (0); } -#endif static int requestsense(struct cam_device *device, int argc, char **argv, @@ -2489,7 +2481,6 @@ ataidentify(struct cam_device *device, int retry_count, int timeout) return (0); } -#ifdef WITH_NVME static int nvmeidentify(struct cam_device *device, int retry_count __unused, int timeout __unused) { @@ -2501,12 +2492,10 @@ nvmeidentify(struct cam_device *device, int retry_count __unused, int timeout __ return (0); } -#endif static int identify(struct cam_device *device, int retry_count, int timeout) { -#ifdef WITH_NVME struct ccb_pathinq cpi; if (get_cpi(device, &cpi) != 0) { @@ -2517,7 +2506,6 @@ identify(struct cam_device *device, int retry_count, int timeout) if (cpi.protocol == PROTO_NVME) { return (nvmeidentify(device, retry_count, timeout)); } -#endif return (ataidentify(device, retry_count, timeout)); } @@ -5410,7 +5398,6 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts) "enabled" : "disabled"); } } -#ifdef WITH_NVME if (cts->protocol == PROTO_NVME) { struct ccb_trans_settings_nvme *nvmex = &cts->xport_specific.nvme; @@ -5427,7 +5414,6 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts) nvmex->speed, nvmex->max_speed); } } -#endif } /* From nobody Tue Apr 23 18:49: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 4VPB3s725Tz5Hqyp; Tue, 23 Apr 2024 18:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPB3s5Znyz4YYS; Tue, 23 Apr 2024 18:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713898153; 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=/qFzq3LzTeK1+QgeqTkmJBXeLoMOw50u+Hat4+r54xU=; b=x+3piUK4Gx9nZoavX1WZBZ7uVETKDjFD6+kW+hYzK/7Ro6SvipDfGGsVC8UFItn4TN5zqf T7XI4lwtO0+CoJm2tcSSeR7ixCl8k9eulnbt3N//1ckF8GhYJ2QksmRRZMzmnDpwDmx3HU fiXFpDNEtPk1+hGWOH21hAIJnQGVQ6m0LszZ/GhfWnbEpjMOM8ANYhODbgUUtCp7KJp08J +jMuXCI6+0CgVVqiRel0QA8J02II2DgXClZpCKnZTcUOzMn53fG3k+zGWG02aDR+EeH0Nu QTZ+yJD4AZpfSjaC5Yjj+mw5Hzv1JoPb7IEku1HhfU85GSJUPaqSXix2EnIFRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713898153; a=rsa-sha256; cv=none; b=Prh0w2wP2gXeLquFejlb1M9rPC6Ax/KtVLrmBZNrag/nBCppSyj5FQRMilZLbFpQF7q5cN gAigRA8ALX2fuSD4iq81f0e9szsViunOYXbkaRvkOMyHjCiOWHF+OHKFgtCIIDFS49CJG6 v831/v7RgZrZaBlcl6heYwTVMs841tF8oAwq+siMSXnCSArtkTT5XAaKS0cGHz+sQ6g16b 2iKdDf8FNKZ/SlB3BvCwaTzhDmLDEqizexInlZtqrI1XkBvWcfQi/24IeMN1XFLjPh1d+J ElVEp+stMf4zTlvvzNrakTl+VMfXNkZJnGudcf1IOrfYVG8lVPfGu8cO+frkEw== 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=1713898153; 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=/qFzq3LzTeK1+QgeqTkmJBXeLoMOw50u+Hat4+r54xU=; b=yIVT2dTKgUotEqyl0bhk2Ks+BAYKROIVxaKf44kRC7LyJ7O7YhfChtbpS/4kUKB8l9aO6k R01gFiv8ctJaF9l30MJYG7uc5GPzP02GqNqQHgGjk03XYPmH6qi6DHxwsIgWSCrV25PIVg Bb2NF0CcJFNCuYUvB+M9vHF+m3GyuTPi8/TDpM8FCxvNDpbzpW8brStDkxvRXBE1AxtAw/ AkK9lTjKjz6Jlprl5Orl8PMXeM8RrESRpV9nlnE+0zQ46Qiz7l5xtCdyAnQMWkXC8RViuJ DrjHvIAGgNoxGYyGCUA48//4AOPkcryWLELzPLLqPNHE2PnbKIp65wovlVqn1A== 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 4VPB3s5B39zk2N; Tue, 23 Apr 2024 18:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NInD9A076686; Tue, 23 Apr 2024 18:49:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NInDTE076683; Tue, 23 Apr 2024 18:49:13 GMT (envelope-from git) Date: Tue, 23 Apr 2024 18:49:13 GMT Message-Id: <202404231849.43NInDTE076683@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: 2d51a9898e26 - main - nvmecontrol: Always build instead of being conditional on WITH_NVME 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: 2d51a9898e26c87586ba50e71b6b3fdf1591713d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2d51a9898e26c87586ba50e71b6b3fdf1591713d commit 2d51a9898e26c87586ba50e71b6b3fdf1591713d Author: John Baldwin AuthorDate: 2024-04-23 18:47:26 +0000 Commit: John Baldwin CommitDate: 2024-04-23 18:47:26 +0000 nvmecontrol: Always build instead of being conditional on WITH_NVME This now builds fine on all platforms so always include it similar to other tools such as camcontrol. Reviewed by: imp, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44842 --- sbin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/Makefile b/sbin/Makefile index 342f385f090b..200dc9da11c8 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -51,6 +51,7 @@ SUBDIR=adjkerntz \ newfs_msdos \ nfsiod \ nos-tun \ + nvmecontrol \ pfilctl \ rcorder \ reboot \ @@ -77,7 +78,6 @@ SUBDIR.${MK_INET6}+= rtsol SUBDIR.${MK_IPFILTER}+= ipf SUBDIR.${MK_IPFW}+= ipfw SUBDIR.${MK_IPFW}+= natd -SUBDIR.${MK_NVME}+= nvmecontrol SUBDIR.${MK_OPENSSL}+= decryptcore SUBDIR.${MK_PF}+= pfctl SUBDIR.${MK_PF}+= pflogd From nobody Tue Apr 23 18:49: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 4VPB3v10zQz5Hqyq; Tue, 23 Apr 2024 18:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPB3t6GvPz4YTB; Tue, 23 Apr 2024 18:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713898154; 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=1vSf0FyPbA2yGfCK/f1/E6XgP/IqiW+jN4g2kGHR/lo=; b=P9vEbQJq+/4Dax3st1d0kX28KCVE4DjHfgTkYfQ9P6RATBApbKRXv8N+cE6+/PbUnyQg6I 4zzhnN1DZYrDMmtozgFKB8zwRWbnO7nXCDzTe2MCa0jbZ1L7q7sc2B7Nc8i7EOJ1IaV7Tb bMORUyEQZrzZYPLEC24b7oZdIiaH6vYchax80QyhX649DFQ2MeiFxsaDEGsQQfBdBjtbRD 0MZk7jJo16KbWTTvvIZjHIUhzEDkwiWGcmNLXvbkYiN0RNiTPgNW/4w/yW+tiz0FfALyVK g1Rv2nFNSDtzgN7iEhnWEJACNOJk37+NZnD1P5w8DQ5QlHCgqvoina1dMkORqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713898154; a=rsa-sha256; cv=none; b=qhoH3nkqsoPbYh38NbESEVY5MTWbcoIqmWDjButwMu3CavixWZuBf1qZBou+2Bo8dG282f 14yV2Hxz2yZid76a2BNMZ8/TAFmU2SDMXVXkFrDjUzPmf3D9LWZPtv8rEkQl4Z5FgXli7k CE/Irj52oNw3fkIrv6Jr1Ti20Ngcj7+m7DCL6JgjfTY/dGmhtUJIeMbx74bHiSQkkmo3Sz fuu3RLPzQqKa5RgXDssDISWKhj57NMRk74WoUZjjGU7EzehpvSc1KHpUzvQNXZ6kU+3v+a foEzivx5m/xKcC8Fc79xV08GihyB3TYLK/oxpzU0837CeQ8/SDpd9j58B9pVMQ== 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=1713898154; 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=1vSf0FyPbA2yGfCK/f1/E6XgP/IqiW+jN4g2kGHR/lo=; b=KyYUzOwHfCvNLBgcmAL2V754+GUt24c5LXdRDtGmSkGnBQqd2l+uM26HR9v0OiCZkJAHaV NXvVS9HDokXhaAhKW+mnyIIlsrNvg/fGQrHdMvnZWFUqvq2sifz3WEFxWOWE+Mp5AQGLlZ tz/AVYMewz48Ny8THcRZtJfB9/iBhK0nBkIyCuBiiDr5U074xKA9m0PS0gzNMevoxeMjkj JqRAenGut5HgeftM+n65LVaKxulMWfKD1pJDsJz4pEsFCSQBg4pFXci8guhSKJm2RCgZgw UTGbxaCoEFg0ncTXTSjJCP+6PVKd3D65GiHUZnJOQknd1LJk8eIFzwKRP2LuqA== 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 4VPB3t5tSKzjW2; Tue, 23 Apr 2024 18:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NInEtV076728; Tue, 23 Apr 2024 18:49:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NInESA076725; Tue, 23 Apr 2024 18:49:14 GMT (envelope-from git) Date: Tue, 23 Apr 2024 18:49:14 GMT Message-Id: <202404231849.43NInESA076725@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: ee3187f6fa79 - main - Remove the MK_NVME build 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee3187f6fa7986c6bfaa97528e050b796eaca343 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ee3187f6fa7986c6bfaa97528e050b796eaca343 commit ee3187f6fa7986c6bfaa97528e050b796eaca343 Author: John Baldwin AuthorDate: 2024-04-23 18:47:44 +0000 Commit: John Baldwin CommitDate: 2024-04-23 18:47:44 +0000 Remove the MK_NVME build option The drivers and utilities are now built and installed unconditionally. Reviewed by: imp, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44843 --- share/mk/src.opts.mk | 1 - tools/build/options/WITHOUT_NVME | 1 - tools/build/options/WITH_NVME | 1 - 3 files changed, 3 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 3d3a1299fac9..b7196b6fe824 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -149,7 +149,6 @@ __DEFAULT_YES_OPTIONS = \ NS_CACHING \ NTP \ NUAGEINIT \ - NVME \ OFED \ OPENSSL \ PAM \ diff --git a/tools/build/options/WITHOUT_NVME b/tools/build/options/WITHOUT_NVME deleted file mode 100644 index 9669deb2ed9e..000000000000 --- a/tools/build/options/WITHOUT_NVME +++ /dev/null @@ -1 +0,0 @@ -Do not build nvme related tools and kernel modules. diff --git a/tools/build/options/WITH_NVME b/tools/build/options/WITH_NVME deleted file mode 100644 index 053cfc568b10..000000000000 --- a/tools/build/options/WITH_NVME +++ /dev/null @@ -1 +0,0 @@ -Build nvme related tools and kernel modules. From nobody Tue Apr 23 18:49: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 4VPB3w2v19z5Hr8T; Tue, 23 Apr 2024 18:49:16 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPB3w0RJqz4YTX; Tue, 23 Apr 2024 18:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713898156; 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=KEpp6VBwgAJQfwDAbmj3a4IT3gASHTr0SawbexMFP0E=; b=FK+34KYpFJwXzRabxJAXVy6kNCDgmT4dzznPd17KM0C3R2FEyoFmJLevj1WBa0PeGkKL4P 1M3BEg0jBCqU3d+i1/xv7SjbPGvbrzvk0a9qy8efsT1zpPbW/JB9BMgL90OG4kPVtyba9L rTEZPZWhb+BduopwP6BotBt4hLVa6xS7VWC6/6mFShpViOgZV3f8qq/JjPAmXVIBU0OEoB 93KUsB+TvrgRTUbXrHf9rdEZheL8u2VvBiTZQOiVUnL//pm48u8ON6VX+CQnJfrU6dDRHS JRtkl+OjFNadYCe0e6taUBQfNT9D6TIGhf1AbOwsr7su6AR+wKd8AUjhrybyaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713898156; a=rsa-sha256; cv=none; b=Rcy5mqjP0whCKjH0s7hANnOhnlSFP6ysaVWKWjWeoZ9J6t9U3Y3R5Q0KGSjhdj/4exaPIl SwDlPzIRPHDNelbik3cGomaAmi7HILmqir5pmjDatB9TVjWYr6o6Ex7v9KGaiWKlinaVvR DKgBGvgGdmxZ2hUOr6WQWcfus5qbitIIv7Ud56z5GhcH1Mpcmz1LvhPuUkTaq3bLO5vMZY yEUHigLEVRoNmrkJ/N0xstIAqyhtho/tRLk8Xu1C4g5SlRW5Te6XVZsSNqa1g5LH+uvpgO 0Lyo7rTZIzBLuVFn+8I67RbCisFBapqgA5ARzCz59o0I9MVMsV7UO5dvuBQl1Q== 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=1713898156; 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=KEpp6VBwgAJQfwDAbmj3a4IT3gASHTr0SawbexMFP0E=; b=S5LA92+rtgbwcr6JL2aG26YuGJj5cr0vuRGwURrmj/pZuJyoAGXuVJ3NtWOHZ36c+zdCm4 XtC7Gk/7Mw7oAKFifqj2nJaxNYIJ88OBmR+FKmMMlc/mrxSWCi0mN3Tit1TIOc711kVpL8 3dlEYyyWdTUtY9nolrBtgcAQ5I7yhppECSEpl3L/Q/iwhQ8lC8X10IcCeiZkF62NceSdkV J1dYp2MAQQmsEToh1rQ++yFP4n1g7R1VmoTxn2sxTCnqq835e7G8E6oM0DjRmJed4tz6gw ohUOmXvhNQymW11+cBnId8lsHiOZ9Z+aQv9FY6/EpMIxJajPLqBNssqv0dlm+Q== 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 4VPB3w03k4zjW3; Tue, 23 Apr 2024 18:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NInFZq076773; Tue, 23 Apr 2024 18:49:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NInFXO076770; Tue, 23 Apr 2024 18:49:15 GMT (envelope-from git) Date: Tue, 23 Apr 2024 18:49:15 GMT Message-Id: <202404231849.43NInFXO076770@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: cbbc5770a30b - main - src.conf.5: Regen after removing MK_NVME 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: cbbc5770a30b6769d9d9a3a4504b81a5400a9110 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cbbc5770a30b6769d9d9a3a4504b81a5400a9110 commit cbbc5770a30b6769d9d9a3a4504b81a5400a9110 Author: John Baldwin AuthorDate: 2024-04-23 18:48:50 +0000 Commit: John Baldwin CommitDate: 2024-04-23 18:48:50 +0000 src.conf.5: Regen after removing MK_NVME --- share/man/man5/src.conf.5 | 2 -- 1 file changed, 2 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 7effd3f08ccc..5301fc488021 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1314,8 +1314,6 @@ Do not build and related programs. .It Va WITHOUT_NUAGEINIT Do not install the limited cloud init support scripts. -.It Va WITHOUT_NVME -Do not build nvme related tools and kernel modules. .It Va WITHOUT_OFED Do not build the .Dq "OpenFabrics Enterprise Distribution" From nobody Tue Apr 23 19:02: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 4VPBMM3mB5z5Hs4B; Tue, 23 Apr 2024 19:02:39 +0000 (UTC) (envelope-from glebius@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPBMM2vVRz4bSB; Tue, 23 Apr 2024 19:02:39 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713898959; 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=RJS8of/My1AeVFoPPkCllgQtvjL6O6MVS5IsRwSddpM=; b=xNZYIstF+Fg1MNpXzMD4ErGDjsI4525l8PMxOJOM1ihPLegObQ+eX9Zzi7/9MQIqisRrm0 BjoBSnWkA1MEt3R2UYyXeQ47g/cbkf7jhcrwmydDuOOhKFNTW1GvAhvIf3OgU2T8lT0BO5 /UdH4Jp1ZDBZo+iFw1QgbcoJTu7vfKj/Uxi82ccU2ROrJ3gcVHZ3MKoFBrTBFMITQae9i7 7J7jN5qvl8VapvSqZ+uWNDQ+2lOq3rPrnUd3nCt7Seh1VQb4DqXu4EbbvbTkLhxk+4B0a8 y2ETidbbPsipbWM8U80BVr4EOrPmi8C9ER5YcREp+uLUvM1JDiqicq17ZQpwzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713898959; a=rsa-sha256; cv=none; b=fDxWD2c0bWI5snjhIJK2uCzm3ta7jTlCHvk1nJDX3pu7AspIYpssFjrjQWh762BZW5vK4x lWavLb0M8KTcDjqrSj6kT3aNTJVsfIQEkI4ROybmsND+kuobIQ1kitTz27hyj+y4BAv4zw vaU77UoGnZpZk1/N4sacbFkPQu/livhHQnykUC3zQAhQ+AQV1O1cI5qyo5oES7gnaRx6t+ ZJv3W6AWTx8Mz6mAYZlNgTbVaqjrOTVFVrSEt/aVnx6NzFiotLOj6lu8j0qEHA+pR42Co5 zcC20U+TF3EL6jPFvOX4zDFo7BxwS60J1Nv9Jd74UcpB/ThWNRnma2dQcefQSg== 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=1713898959; 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=RJS8of/My1AeVFoPPkCllgQtvjL6O6MVS5IsRwSddpM=; b=rLctRsqfzMZGCxP0yq5kVfxHsY/NDZPZqUhR1hBWEiZHvNlENdTaxGgBLVTD0u5/nx3vOg Hk1c4QDpNPYKt4e1j49b6HYiQ1+Bl8aVt1kc71mxIdx6zwgQ46kICqfTCw1lEU9FQ/2YkA JwLjw/7RGDRz8gaqOiK3q8DyTjXPTW464E9dU21Y7c5MB2xKjXsX0sfQL/sT+ItlY4AOPm mrWUev8HwpXyFyEfe2Cx6YSUxdH3KurwnGtS4NTSLs4c5m6TG0gV9jPpSQEGI/BH6s5GGs +34ZxveRrlkpAcekt0olWver37Q4csAHuAVVyodzVTqRc7gA9u3XqE9zgAaWkA== 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 4VPBML4WhWzhWn; Tue, 23 Apr 2024 19:02:38 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 23 Apr 2024 12:02:36 -0700 From: Gleb Smirnoff To: Lexi Winter Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, imp@freebsd.org Subject: Re: git: 67783db661f8 - main - CONTRIBUTING: request only one submission type per change Message-ID: References: <202404181915.43IJFEoG020480@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: Lexi, On Thu, Apr 18, 2024 at 08:27:56PM +0100, Lexi Winter wrote: L> as a non-committer src contributor, i've discussed this with imp@ quite L> a bit and i think this should be phrased more strongly in favour of L> using GitHub for commits. L> L> the current situation is that Phabricator is useless for non-committers L> because 1) you have to know who can review your commit, and 2) once your L> commit is reviewed, someone has to commit it, and Phabricator doesn't L> address this. The 1) is actually not as bad. Phabricator has subscribtion hooks, and many committers have rules installed to get notifications of new reviews that touch certain paths of code. The problem 2), IMHO, equally applies to github and Phabricator. L> i think it might make more sense to suggest that people submit all L> patches via either GitHub or Bugzilla, and only use Phabricator if L> specifically asked to. I don't agree here. Looks like we should address those phabricator submissions that go unnoticed due to lack of maintainers of a code. I don't think submitting same patch to github will improve visibility. -- Gleb Smirnoff From nobody Tue Apr 23 19:34: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 4VPC4F2Qk8z5Hwcv; Tue, 23 Apr 2024 19:34:37 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPC4F0BNpz4f3Y; Tue, 23 Apr 2024 19:34:37 +0000 (UTC) (envelope-from delphij@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3476dcd9c46so4552570f8f.0; Tue, 23 Apr 2024 12:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713900873; x=1714505673; 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=5oQy2wNwh+0orEsg0qyWPlCjL/huz+bTTa1yh00LnBM=; b=BZEhx/7nZWJBXZUebThg4cvL2dpyjmwoJFvNBmswP3KKbzclVZK9i8NmWW2wCLzn8c 7QsB2cVha/DD8Vt+/L4pC/8R+T4z8xTuII6rdHqIvQEZ4kt97rdz9ZnLgcXa+0WKTd+J 6Dx2ZRkwc96MOHb6koRtq4b6K2G8C5lz7z5oLu+vMXxfH8dh2hIQVkpeaAb0uftFpONu C7PfMJmCt1zEB0vCLEMPd5bO6wcfUZP07XQy6Bf2N4fBsO7GGnoF0WMGEoIiLBzNc2kx HqTH2DJ4ynSVb6OZm5KS5VCX6vY1MjfksaR43XL7LG+bU4aUCfl7DIom5lCAduXQ5kuf i6vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713900873; x=1714505673; 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=5oQy2wNwh+0orEsg0qyWPlCjL/huz+bTTa1yh00LnBM=; b=qJxm1oIc8si/DlBewxZn5fwUPG5vyyd+ZXEGgu9pnHRVyve/ddHEdqxi7VGcvrwotM d+Axvv2YGpTZoaxX3oRK7i7EYdKgeNLEHeMGHp/ylqUk6wvJTI592NLUljVdk/sOQ472 zc1Kt750lA6otKbhi0V0CHx2FtjYQBnXe1d36MN6DnfQwXljyYX14Cccdtz3BJSm2XMk 6+5/5KQ7M3p/cDvqJ8jvuEy2YZiKcwz5Wv8CW2Y1dt3SYPP3jLA983K/Bm8Y5aKzwZLe WCrnMQEEN5DuXrgLLNLSJ5/Id0LhRZkGeIfY6vMEa8OkP/E0Y8D3wK3jNU9qOrQ04CFY U4FQ== X-Forwarded-Encrypted: i=1; AJvYcCV4T2J0y+fecUBJURE4tyOznn93DJWzY9/UcoCDoBYoewjZeFhEAkEXgOCqBFg03ixm7qAiAu8DSma4D0UxQgkIjGz7BzZtXfHZI198g0q6qh5icOs9epp4MB5L6gOBND01aDbUafx8P8LVT8FPsolC0vBsVjxRyWbSwQc7eCFcGzQFjuqvwZWT/BaN2fRew3hiPsuEm1hgCXhPmhKsEJsvh3og8yk2mEAINTJYQGJY1Az6 X-Gm-Message-State: AOJu0YwY9DCU4+i2vNCPRveDbMTjoOuagYR6FwxVR4xCKGGWD7h0eBfT BVqXV68WysildFUEE53CiFu3pq+4GLw3hMBqzuZBS+OLXMTQ6B6X9xlTg08mN15aZVpefMMahU3 w+wH+auyUIuOg8RvMTWoJuHtGHk23hw== X-Google-Smtp-Source: AGHT+IF5o5BDdcxLRJmxmHIhLVWnzfrnM3DrU9pLDi6/18pZMU1ggiOakbMGven42Z2JRsQKF1/FHsMZ7+x5CnKouvY= X-Received: by 2002:adf:fe41:0:b0:345:5f6a:cc05 with SMTP id m1-20020adffe41000000b003455f6acc05mr132685wrs.34.1713900872958; Tue, 23 Apr 2024 12:34:32 -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: <202404181915.43IJFEoG020480@gitrepo.freebsd.org> In-Reply-To: From: Xin LI Date: Tue, 23 Apr 2024 12:34:21 -0700 Message-ID: Subject: Re: git: 67783db661f8 - main - CONTRIBUTING: request only one submission type per change To: Gleb Smirnoff Cc: Lexi Winter , Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, imp@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b68e410616c8a429" 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: 4VPC4F0BNpz4f3Y --000000000000b68e410616c8a429 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Possibly slightly off-topic, but have we considered some other alternatives to Phabricator, like Gerrit ? (My opinion might be biased as we use Gerrit at $WORK). I liked the review UI more (the context representation is cleaner compared to Phabricator and one can easily navigate between different amendment revisions of one change), and it is integrated with Git with a customizable workflow (e.g. can have complex submit requirements, like a change must be approved by a different person, has to pass certain presubmit workflow, etc.) and is actively developed and maintained (both Android and Chrome makes heavy use of Gerrit). Cheers, On Tue, Apr 23, 2024 at 12:02=E2=80=AFPM Gleb Smirnoff wrote: > Lexi, > > On Thu, Apr 18, 2024 at 08:27:56PM +0100, Lexi Winter wrote: > L> as a non-committer src contributor, i've discussed this with imp@ quit= e > L> a bit and i think this should be phrased more strongly in favour of > L> using GitHub for commits. > L> > L> the current situation is that Phabricator is useless for non-committer= s > L> because 1) you have to know who can review your commit, and 2) once yo= ur > L> commit is reviewed, someone has to commit it, and Phabricator doesn't > L> address this. > > The 1) is actually not as bad. Phabricator has subscribtion hooks, and > many > committers have rules installed to get notifications of new reviews that > touch certain paths of code. > > The problem 2), IMHO, equally applies to github and Phabricator. > > L> i think it might make more sense to suggest that people submit all > L> patches via either GitHub or Bugzilla, and only use Phabricator if > L> specifically asked to. > > I don't agree here. Looks like we should address those phabricator > submissions that go unnoticed due to lack of maintainers of a code. > I don't think submitting same patch to github will improve visibility. > > > -- > Gleb Smirnoff > --000000000000b68e410616c8a429 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Possibly slightly off-topic, but have we considered some other= alternatives to Phabricator, like Gerrit?=C2=A0 (My opinion might be biased as we use Gerrit at $WO= RK).=C2=A0 I liked the review UI more (the context representation is cleane= r compared to Phabricator and one can easily navigate between different ame= ndment revisions of one change), and it is integrated with Git with a custo= mizable workflow (e.g. can have complex submit requirements, like a change = must be approved by a different person, has to pass certain presubmit workf= low, etc.) and is actively developed and maintained (both Android and Chrom= e makes heavy use of Gerrit).

Cheers,

On Tue, Apr 23, 2024= at 12:02=E2=80=AFPM Gleb Smirnoff <glebius@freebsd.org> wrote:
=C2=A0 Lexi,

On Thu, Apr 18, 2024 at 08:27:56PM +0100, Lexi Winter wrote:
L> as a non-committer src contributor, i've discussed this with imp@= quite
L> a bit and i think this should be phrased more strongly in favour of L> using GitHub for commits.
L>
L> the current situation is that Phabricator is useless for non-committe= rs
L> because 1) you have to know who can review your commit, and 2) once y= our
L> commit is reviewed, someone has to commit it, and Phabricator doesn&#= 39;t
L> address this.

The 1) is actually not as bad.=C2=A0 Phabricator has subscribtion hooks, an= d many
committers have rules installed to get notifications of new reviews that touch certain paths of code.

The problem 2), IMHO, equally applies to github and Phabricator.

L> i think it might make more sense to suggest that people submit all L> patches via either GitHub or Bugzilla, and only use Phabricator if L> specifically asked to.

I don't agree here. Looks like we should address those phabricator
submissions that go unnoticed due to lack of maintainers of a code.
I don't think submitting same patch to github will improve visibility.<= br>

--
Gleb Smirnoff
--000000000000b68e410616c8a429-- From nobody Tue Apr 23 19:34: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 4VPC4j0n0Cz5Hwd2 for ; Tue, 23 Apr 2024 19:35:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPC4h4zkQz4flq for ; Tue, 23 Apr 2024 19:35:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-518a3e0d2ecso9115353e87.3 for ; Tue, 23 Apr 2024 12:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1713900898; x=1714505698; 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=4nABtxjxFiAq3elyYlUpVzeUNJzI/LREKyWCXdEbjjU=; b=IpxfeBiQ3snlai+mewC18ierXhoqF/Z9dneWX25IoI6fnZ0Tkgq3aL9cyCMImWbZQO G0u384O/AZ8jmdaKgHMKkCi+mqv6cP5JBV44g5RlarUGR8TflaHbfa4Ecje8GzPCD0P5 kgNWNm7mr4y/z/Ite+6TPwzXeiZe3OphiCDRVQMbZ66huitQPKK8jF2zeVWFklETY1GB eaCCEhgx/sPCII+zTyTgG2I/4iLO3SlNslHhNQxIdu2ziQxfDbipbt7ECpTUH8OWfycO rF8W5VlVaL3bBkn5kCK0/cH9SNcll1aGZ6YLbgm2xpjGy7FL49F1rmJJDhRolbgH2Ar3 oeyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713900898; x=1714505698; 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=4nABtxjxFiAq3elyYlUpVzeUNJzI/LREKyWCXdEbjjU=; b=oyb0106jVYHNvV6jn8h9FWQvvGcaGJfztIVc+Rca4FO3X69P9RteAc6afUUxVMHcjk zz3ef/sMQ7SRYisXR3/SAHVAtfaUCq/Jo/8NJNjC012Ou2pqAGb+w3Kxx7IAbhbcfPrH jH1bul7/gQQnV/5fnkjk7YHgKvmyQU4E89atlpUxp+JfK3ciQqcjlAJaodtTHH5bH6iA mZnMcnf///DINi4pAE2dBODYuc/1Q5nxrwdWek03zloW5jea8OwgyqPaAPAJm3BaeqKl sxgNic9TPdn2AtstThD0jO2adHYtQ5kKhNKxy6suQp2F4qButKTid9W1QsgkDRu5eaB1 NjOA== X-Forwarded-Encrypted: i=1; AJvYcCVntLsLJSapBXr3w7nxjeJsC+Ygw3gSC0UNw4CkI4K7xJO482KVeNFRGQ4hDMq2j8MqIEbYl4fn4yFdiIO9m2nEwgHgsRPbhEu+yCPx/kznkA== X-Gm-Message-State: AOJu0Ywa2BtdnWB+YGSf+qWup/oRV1LgfGdAiiTJlxM9WoH46lwFjfci PSk+Tyn20ybdyMlqFUi1hGB+HVyV4IR0f4hPtgmqRqD5VNfexpcE6JzPlyZ4bH7nbN3I5I392Ty b1s9+KMu9k4GWSupGH4lVwoumjce278b4ePnJmw== X-Google-Smtp-Source: AGHT+IGoQKi2BkPQ6szTmdYqlx2d8fzEwCrPUqvpv8t2ccXNM63BOiB8I2i8TCPErjOcnDB+0EPeS2DKXUV8AESPwlM= X-Received: by 2002:ac2:4ed9:0:b0:51a:f362:ab40 with SMTP id p25-20020ac24ed9000000b0051af362ab40mr443789lfr.2.1713900898322; Tue, 23 Apr 2024 12:34:58 -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: <202404181915.43IJFEoG020480@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 23 Apr 2024 13:34:46 -0600 Message-ID: Subject: Re: git: 67783db661f8 - main - CONTRIBUTING: request only one submission type per change To: Gleb Smirnoff Cc: Lexi Winter , Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, imp@freebsd.org Content-Type: multipart/alternative; boundary="00000000000039b3cd0616c8a614" 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: 4VPC4h4zkQz4flq --00000000000039b3cd0616c8a614 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024 at 1:02=E2=80=AFPM Gleb Smirnoff = wrote: > Lexi, > > On Thu, Apr 18, 2024 at 08:27:56PM +0100, Lexi Winter wrote: > L> as a non-committer src contributor, i've discussed this with imp@ quit= e > L> a bit and i think this should be phrased more strongly in favour of > L> using GitHub for commits. > L> > L> the current situation is that Phabricator is useless for non-committer= s > L> because 1) you have to know who can review your commit, and 2) once yo= ur > L> commit is reviewed, someone has to commit it, and Phabricator doesn't > L> address this. > > The 1) is actually not as bad. Phabricator has subscribtion hooks, and > many > committers have rules installed to get notifications of new reviews that > touch certain paths of code. > Except we have really crappy coverage in phabricator from the herald rules, so external submitters usually don't even get a 'hey we got it' feedback from the submission.... networking gets good reviews, ports get decent reviews, some other select areas are OK... but on the whole, random submissions just disappear here. > The problem 2), IMHO, equally applies to github and Phabricator. > I can land a github PR in < 5 minutes. I can find all the open ones and make sure they are progressing. The tools to automate this are easy to write. I keep refining to reduce this time and push more automation into useful places. We've not even begun to explore what we can do in this space. With Phabricator, though, it's impossible to find things that are languishing, landing them is much harder, and there's no clear set of responsibility for doing something with it. Plus, Phorge doesn't really address these concerns... > L> i think it might make more sense to suggest that people submit all > L> patches via either GitHub or Bugzilla, and only use Phabricator if > L> specifically asked to. > > I don't agree here. Looks like we should address those phabricator > submissions that go unnoticed due to lack of maintainers of a code. > I don't think submitting same patch to github will improve visibility. > I've put a ton of energy into that... Good luck. I'm done trying because it's too hard. I can't even easily do a query for 'Find me all the stalled requests'. Or 'find all the ones I tagged as interesting' or half a dozen other things that are necessary to manage the queue. And lots of people (myself included) have been bad about closing out the stale requests, making the problem even worse. While specific queries can be written to address my concerns, they are so tightly focused that I can't refine them at all (since the criteria for selection isn't in the search interface). It's a mess, and not likely to get better. So until the "disappearing into phab" is fixed, we should concentrate on github pull requests. I've had good luck tagging the right people on github of late... and most of the submissions, frankly, don't require a lot more than a quick once-over to know if it's good or not. There are some that have languished, though, due to this lack... But I've learned to pull people in earlier in the process rather than letting it languish. So respectfully, I'd like to leverage the little bit of github pull request success we've had, reserve phabricator for the 'exception path' when something needs actual review from a developer who will take the responsibility to either commit or explicitly reject the phab review than to pin our hopes on making phabricator easier to use first. Warner --00000000000039b3cd0616c8a614 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Apr 23, 2024 at 1:02=E2=80=AF= PM Gleb Smirnoff <glebius@freebsd= .org> wrote:
=C2=A0 Lexi,

On Thu, Apr 18, 2024 at 08:27:56PM +0100, Lexi Winter wrote:
L> as a non-committer src contributor, i've discussed this with imp@= quite
L> a bit and i think this should be phrased more strongly in favour of L> using GitHub for commits.
L>
L> the current situation is that Phabricator is useless for non-committe= rs
L> because 1) you have to know who can review your commit, and 2) once y= our
L> commit is reviewed, someone has to commit it, and Phabricator doesn&#= 39;t
L> address this.

The 1) is actually not as bad.=C2=A0 Phabricator has subscribtion hooks, an= d many
committers have rules installed to get notifications of new reviews that touch certain paths of code.

Except we = have really crappy coverage in phabricator from the herald rules,
so external submitters usually don't even get a 'hey we got it'= ; feedback from
the submission.... networking gets good reviews, = ports get decent reviews,
some other select areas are OK... but o= n the whole, random submissions just
disappear here.
= =C2=A0
The problem 2), IMHO, equally applies to github and Phabricator.

I can land a github PR in < 5 minutes. I can f= ind all the open ones and
make sure they are progressing. The too= ls to automate this are easy
to write. I keep refining to reduce = this time and push more automation
into useful places. We've = not even begun to explore what we can
do in this space.

With Phabricator, though, it's impossible to find thing= s that are languishing,
landing them is much harder, and there= 9;s no clear set of responsibility
for doing something with it. P= lus, Phorge doesn't really address these
concerns...
=C2=A0
L> i think it might make more sense to suggest that people submit all L> patches via either GitHub or Bugzilla, and only use Phabricator if L> specifically asked to.

I don't agree here. Looks like we should address those phabricator
submissions that go unnoticed due to lack of maintainers of a code.
I don't think submitting same patch to github will improve visibility.<= br>

I've put a ton of energy into that.= .. Good luck. I'm done trying
because it's too hard. I ca= n't even easily do a query for 'Find me
all the stalled r= equests'. Or 'find all the ones I tagged as interesting'
<= div>or half a dozen other things that are necessary to manage the queue.
And lots of people (myself included) have been bad about closing
out the stale requests, making the problem even worse. While specif= ic
queries can be written to address my concerns, they are so tig= htly
focused that I can't refine them at all (since the crite= ria for selection
isn't in the search interface). It's a = mess, and not likely to get better.

So until the &= quot;disappearing into phab" is fixed, we should concentrate
on github pull requests. I've had good luck tagging the right people
on github of late... and most of the submissions, frankly, don'= ;t require
a lot more than a quick once-over to know if it's = good or not. There are
some that have languished, though, due to = this lack... But I've learned
to pull people in earlier in th= e process rather than letting it languish.

So resp= ectfully, I'd like to leverage the little bit of github pull request
success we've had, reserve phabricator for the 'exception p= ath' when
something needs actual review from a developer who = will take the
responsibility to either commit or explicitly rejec= t the phab review than
to pin our hopes on making phabricator eas= ier to use first.

Warner
--00000000000039b3cd0616c8a614-- From nobody Tue Apr 23 19:44: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 4VPCHW5RxVz5HxL7; Tue, 23 Apr 2024 19:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCHW2Qnqz4h8r; Tue, 23 Apr 2024 19:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713901463; 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=NyqU+DDEdDNB2MkD106/HGB55s7ukJn4xxCQamdfsZM=; b=AwBJAVln/H0977MDQ1oB/WuPye7+JCS1ZDWs/xFyEmX6xj7M4KqmCnimoRJpWKv5gNU2+p NdLM2fs6Ou8JpzFEncHyUuMFZj8iPxv88D90gdI+jOwuDpNUCVFQSd6ovEfO2W2yRqY9Sq 3VVNpDsbxxXhVj69SFF1BCP1SDPWHMqUyEKtsAfDod7vGdH+ie+ASxLnVyOD3sPr1efILn vVLvfYYrfdoBQG1JdntxV9xugHswtPBBSNHaeSmPaClC9Bz3ZNSf1Hi8ZmJhxnyc/fFf4S ks6uKwqww7MiUaXP85ZZq+yx9oxbFA20pchul1hBWHr+8d3y7owhceSyLbm1LQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713901463; a=rsa-sha256; cv=none; b=G6X2aLUl/aeLFP8S16ymUNZa5n/1GG4VNfLEOvS8DipSQR8raVtke9T6vdKE3NqTCL7oYU E8c1v7Zlv+1SN5G0g+PLqhL77PzCaAulW7CzHzKjnh76ZRINP/d5doni13t7OA6H8uB4Bz 7wwAbis2JTo0KXsS1/SuXKhZbOk0F81SSIU4sElqXVkzPeszuT+XM9EnBmLqakbVRliULS 4q0FqpOThbCoxSH+Y04rusNlOvMCsx967lpGqtFQvUIJL9NJFv3FAkoZMaA0ZbH0p3IhOu Pex5V8iablm8L6hkiplc3JBidy0Ece8fZ9xv7IUKquBUymFvwGi+TfpIiAXsjw== 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=1713901463; 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=NyqU+DDEdDNB2MkD106/HGB55s7ukJn4xxCQamdfsZM=; b=QbzC927Y4/WT6xr8vVRc8VJvEeKpHerHe89S0li2dZPxx7DPKlIC5eLCXi40nZuCc/GNI6 wn7wwNI4FJFi3F79BKeUxxp5QPrdm7/BX+J0AR+w09EEMl57jC/oZTa2Qgz9FbPjGde3uM B3EbjRfmvE46V1vtUWX+XY4eDMs9Lr4yywDSDGcd2fR//3HpwMA/Cz0KlsAg6F4afOQfi4 SLx7VygME+rGGSuqt12VAEfQs6xCm8EKlmnHScp+9C2lY8MqPBWwJ7aGNv0LidTDd9Npt1 Kk3UfDTI+525x3TrtJfFO+GYKBgi4hrhGpAS05XFcQmoAULM1yFbHkf2gapkhg== 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 4VPCHW22rBzlMk; Tue, 23 Apr 2024 19:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NJiN8V077501; Tue, 23 Apr 2024 19:44:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NJiN85077498; Tue, 23 Apr 2024 19:44:23 GMT (envelope-from git) Date: Tue, 23 Apr 2024 19:44:23 GMT Message-Id: <202404231944.43NJiN85077498@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: 92771bc00ad0 - main - libc: make strerror_rl() usable for libc 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: 92771bc00ad0f567b27876c34450bef7a0ee61d0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=92771bc00ad0f567b27876c34450bef7a0ee61d0 commit 92771bc00ad0f567b27876c34450bef7a0ee61d0 Author: Konstantin Belousov AuthorDate: 2024-04-23 17:04:29 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 19:40:29 +0000 libc: make strerror_rl() usable for libc Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916 --- lib/libc/include/libc_private.h | 2 ++ lib/libc/string/strerror.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 73b22beffe88..2b16ce736e3a 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -374,5 +374,7 @@ struct __nl_cat_d; struct _xlocale; struct __nl_cat_d *__catopen_l(const char *name, int type, struct _xlocale *locale); +int __strerror_rl(int errnum, char *strerrbuf, size_t buflen, + struct _xlocale *locale); #endif /* _LIBC_PRIVATE_H_ */ diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 69c9d1da69af..ecad55caa673 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -74,8 +74,8 @@ errstr(int num, const char *uprefix, char *buf, size_t len) strlcat(buf, t, len); } -static int -strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale) +int +__strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale) { int retval = 0; #if defined(NLS) @@ -116,7 +116,7 @@ strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale) int strerror_r(int errnum, char *strerrbuf, size_t buflen) { - return (strerror_rl(errnum, strerrbuf, buflen, __get_locale())); + return (__strerror_rl(errnum, strerrbuf, buflen, __get_locale())); } char * @@ -124,7 +124,7 @@ strerror_l(int num, locale_t locale) { static _Thread_local char ebuf[NL_TEXTMAX]; - if (strerror_rl(num, ebuf, sizeof(ebuf), locale) != 0) + if (__strerror_rl(num, ebuf, sizeof(ebuf), locale) != 0) errno = EINVAL; return (ebuf); } @@ -134,7 +134,7 @@ strerror(int num) { static char ebuf[NL_TEXTMAX]; - if (strerror_rl(num, ebuf, sizeof(ebuf), __get_locale()) != 0) + if (__strerror_rl(num, ebuf, sizeof(ebuf), __get_locale()) != 0) errno = EINVAL; return (ebuf); } From nobody Tue Apr 23 19:44: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 4VPCHX5v0yz5Hx3n; Tue, 23 Apr 2024 19:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCHX3WNwz4hC1; Tue, 23 Apr 2024 19:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713901464; 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=1Ek64r5YuK5HCM8ITy49MLljM4JYWUp0au6GvsUpuLU=; b=lO27iK6ArDXsaPPIkWkk1wvE4T3eiICRgyXA4iZhI20T0lMqYKPM5jw0RA0kxoj6h4T9TJ fkmQvHZrYEWXqUeMxzonaF6OXp5ZQy+5RHnUDdiVzZTND25BiZrBgQ/9W8njZUcFSiz/MW eCfDV7QQNo27XNwal7kYCWBLvr34InPGNNLBCMkNlXlvpb5I68TzkVDnMphMDoHuUYq3+d 7jK2tOzuvEe7HsthHlAYQVdLil4AZuKPmkwRBG7Rw4MbmIns7JZy2j9sHfGgmZArxgfqBQ pZJbFaVvAw8QpKkdJNTPZtBOSFkXCA2QVvS6st5wFgR/gv75y3UuWmfB3kum/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713901464; a=rsa-sha256; cv=none; b=EYVHUrX83U29H0Jwt8uEzp5kVhsJP5ri1pPSwCR0HjzH3eJkAqSn9cjMXvb76e0HxpshOj pHP05xhtGRZN7ET6pooXg/xQTbWwSJdRi8aVXZZL20VNo1uGmec+4jWj2OIuoeI3JqpJeW AJwCbqyxh5vriWEXUSYKIi8a7gCzXGx6ED7yLWtvggw8tOc0evGuB8H+5JGm08CI0UYHBi 19Ttsq8cP6Zsjk45c2aBJyWAAnUXXCp2C/I9799g6BBFQitqei7P4u4qH8NiJFLMYmwt18 /4Gs7xSp4Q2WFPYoFsU83+7ClBuZYR135qX1XPNLdNe6T0mM408wMAwDLk8OyA== 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=1713901464; 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=1Ek64r5YuK5HCM8ITy49MLljM4JYWUp0au6GvsUpuLU=; b=QHCYAxTQhB55NJpRDq1tBtC1e2p+O6rxQXNnMUao3KH4VxaiWmUhjBnauN0hoIQpXSuYfR REuLPy572IQz4tbRGo8BEBOwFd4X7qlgy4nRGU0FsfYuOGeDDU0fMrB+cIs8wzfA6/SA64 ke3E7RclGjZ2fesLr76XWv9i8tC/Ld6/X8q76dzirfPLK9FRgohXhOotJ4rhBxIzlBtNln JFtCDhrjhR9VAeGwC5IPSOOM07f6V0NfYJSV8dsqeqWk/ofmmdayDVmoBq/IVs4IDYI3Aj 1x7XEGEyLa1luwfDhLfLSJctKErc1YJiGxD+W1FNMnCzXFbfX+5JPmoO2N3qtA== 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 4VPCHX37TSzl8c; Tue, 23 Apr 2024 19:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NJiOvm077546; Tue, 23 Apr 2024 19:44:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NJiOhl077543; Tue, 23 Apr 2024 19:44:24 GMT (envelope-from git) Date: Tue, 23 Apr 2024 19:44:24 GMT Message-Id: <202404231944.43NJiOhl077543@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: f88766769463 - main - __vprintf(): switch from strerror() to strerror_rl() 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: f887667694632c829b0599b54ff86a072e93df87 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f887667694632c829b0599b54ff86a072e93df87 commit f887667694632c829b0599b54ff86a072e93df87 Author: Konstantin Belousov AuthorDate: 2024-04-23 17:10:30 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 19:43:01 +0000 __vprintf(): switch from strerror() to strerror_rl() This eliminates the use of non-thread-safe function in printf*() family, and make the call locale-aware. Also, it stops obliterating the strerror() static buffer, which aligns with the POSIX requirement that implementations must behave as if no standard-mandated functions call strerror(). PR: 278556 Reported by: Jonathan Gruber Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916 --- lib/libc/stdio/vfprintf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 6c7c6982c8dc..7048315a8d78 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -312,6 +312,8 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) int width; /* width from format (%8d), or 0 */ int prec; /* precision from format; <0 for N/A */ int saved_errno; + int error; + char errnomsg[NL_TEXTMAX]; char sign; /* sign prefix (' ', '+', '-', or \0) */ struct grouping_state gs; /* thousands' grouping info */ @@ -829,7 +831,9 @@ fp_common: break; #endif /* !NO_FLOATING_POINT */ case 'm': - cp = strerror(saved_errno); + error = __strerror_rl(saved_errno, errnomsg, + sizeof(errnomsg), locale); + cp = error == 0 ? errnomsg : ""; size = (prec >= 0) ? strnlen(cp, prec) : strlen(cp); sign = '\0'; break; From nobody Tue Apr 23 19:44:25 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 4VPCHY5C8Jz5Hx3s; Tue, 23 Apr 2024 19:44:25 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCHY4RnHz4gn3; Tue, 23 Apr 2024 19:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713901465; 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=UCrsLWsSzBmDSdfMeiNA21OMsFra7yZAq1OzudHYM88=; b=p/FaM3ljr+c7KcQXswctKgYYvu54nPBvQmIQOZuUpSjbInE1TUR0P97myMcOrWsRxZ3gbO OiTco4hwM+MUemVh/qO0EwJj3O5JtwG9ahlY1fS7VFQwmRWOqpETjtOs8zdTdc1LoZdmvZ Zie+d9lb+yVFxjkrhQINEvJATGRiYs7dBsYJ1Bz4XUSvjPM1duV8PRGnviecw1++DC+wGl OvMzAbp+XCR0Gy1Ar+KIXwKxfjg3Oc9IWve/jIpOmycgVBLTuDmsq9g5tZAUKxjs5d9kl2 hJBMIgGI5XNcLVpabtiPa1HR0s8zo9QL85xEomiBPujXNdWGWJGNR2bCXrW4Mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713901465; a=rsa-sha256; cv=none; b=j12jIbPSdcmRJC676kXE+epkz4sugTGlvLKYeB5f09BiV4s+CvpdgIa7PdNgsPBcCnXInr CA1QD8p7RPSKJNyw3etr2OWjcPeo/YM+qqVZS2iokXD2bHwM/tkIpd9AfentwsUCGVPIkx NpwfJRTiN0oC2T0zW0QdUCN7l0yAiv21XYHmgCHRvCmjl01kGWuUdhGGJiaouVb790zO5E mzdKL9IMivULXb744JCeJB5xYzRkk85YPMLDQIX8/+AoFM/FIzxAKuDXbzW4F2F9i7KBE6 0C89RxhZA57of9RFeFAiSxidz1y/QeGzy+sWJnKEmhAEUn37utgEm7sZ+LsnGg== 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=1713901465; 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=UCrsLWsSzBmDSdfMeiNA21OMsFra7yZAq1OzudHYM88=; b=d5qKJXTzXBsIgywoaz897vlaEZzhlRrcliMlpcHxl3DUWJYGl8QANY56dk2Uk7RiTklD74 aUBVnbRIaWTHh60LL3LZrUJleiVlQrTucGNNbPaPuQ21CJ9MAOAOTmgzTIq10eLEQxW+t8 KOAWUPBr4vz5H88BJbDJjKU6jZtWBiGdZgp6Xeo2jniAi0d/RL+9NZJG7lnOZcdwvrygr9 rqjn55QC9t7Gp7YV2SxtFUt4psyzy0/Cx8JSk6KcwF7zWu4u8r7l+3UgIy0yp+LDe35K3N y/IEyaAMvGQpPuHyI3oYrwNP4fSLb8hWTPv/XDZBmWol7oliHfDHItC86lcEuQ== 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 4VPCHY447yzkt9; Tue, 23 Apr 2024 19:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NJiPjA077593; Tue, 23 Apr 2024 19:44:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NJiPNh077590; Tue, 23 Apr 2024 19:44:25 GMT (envelope-from git) Date: Tue, 23 Apr 2024 19:44:25 GMT Message-Id: <202404231944.43NJiPNh077590@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: bac9d7e8f293 - main - libc: minor style, wrap long lines 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: bac9d7e8f2931149815c3d5a9ab69594bbdffde6 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bac9d7e8f2931149815c3d5a9ab69594bbdffde6 commit bac9d7e8f2931149815c3d5a9ab69594bbdffde6 Author: Konstantin Belousov AuthorDate: 2024-04-23 17:14:34 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 19:44:07 +0000 libc: minor style, wrap long lines Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916 --- lib/libc/stdio/xprintf_errno.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdio/xprintf_errno.c b/lib/libc/stdio/xprintf_errno.c index db897328f0fe..c63a7afd35e0 100644 --- a/lib/libc/stdio/xprintf_errno.c +++ b/lib/libc/stdio/xprintf_errno.c @@ -38,7 +38,8 @@ #include "printf.h" int -__printf_arginfo_errno(const struct printf_info *pi __unused, size_t n, int *argt) +__printf_arginfo_errno(const struct printf_info *pi __unused, size_t n, + int *argt) { assert(n >= 1); @@ -47,7 +48,8 @@ __printf_arginfo_errno(const struct printf_info *pi __unused, size_t n, int *arg } int -__printf_render_errno(struct __printf_io *io, const struct printf_info *pi __unused, const void *const *arg) +__printf_render_errno(struct __printf_io *io, const struct printf_info *pi + __unused, const void *const *arg) { int ret, error; char buf[64]; From nobody Tue Apr 23 19:44: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 4VPCHb1BBmz5Hx6D; Tue, 23 Apr 2024 19:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCHZ5TP7z4gsR; Tue, 23 Apr 2024 19:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713901466; 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=EuE0weCK1Yv/KfFwSMIc2/wT122P/Jp2dgLr0TkXkok=; b=C07KmjFSZsOArivrPyoIlp86QG1NSuHFniwQrUxyYOXW0o2h6bS9eJoZiBZiRK180aM6u/ 4tDWBxZRXLCBdMNmmkkwWr5fhdxGhUvWd6AzAP73HcC0A1RilwjUi0BoGkpv4wBF91N35q e4POYkdRbmwNedHwS5WwDwApnNfsDwuD+F3mwlDW3hxhXV4yioUM2enkUF9RT7uGid0Lcw qBqE3X0MJHJK8gHfBeZQHhFHCXnPGfbnpVOqCUghYD7fkiDwOb1s4Iq/YFuAnjfJ/vopEQ uu5qDIP7KknmZJu0qSbKNLWrJJEk/DEqkB4k0HDay6luxyzyE/Rcn2kR3zykTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713901466; a=rsa-sha256; cv=none; b=dGxIT4dNzEHrO8k78H3aHJR1Ck9zqoRYeLKouKcK+VLpBHe8Cd0u/EplKBOKYclSEmMjkk P5NsF0pkgGRt+SB5tMTCUh5b9umFLYsBjtM8kJuoS/u22EVqv3B2Fr0hiYUs+Q8m2crdph csbz28PKhe0mUeET2EOnDYQhy7ASfCcjj2lnsiGwckvYMq8xdxrIpX5q8SmlwDzLMgqV9e HwrxidRBWTlwvWrU3V+HYyepfbGKB6Vtt5i03duZcgB9r9TRfbGZGw4Qm5We+sJNvfCc4O i5gdGeeEl/yBvN/QGu6f7gsrDrwHyTFIo+/pv9WftNGkwgVh9nX3jMybWPLFZg== 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=1713901466; 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=EuE0weCK1Yv/KfFwSMIc2/wT122P/Jp2dgLr0TkXkok=; b=lkYHsnZh5wNDnM84XC57v3VUkpdND02m9AlTspu1FCimDTAOFYjSuczaBB+HXQ1fOivJm6 LcyFVPFFqZ6jRqF6nEVn2n9msJEndlfLhlnI/Htj7iYwvxZRTgCgnHCR3EDELjnUy2AAzl T5LnpfY+qi4RpR6GSkq6OqN8g3v2ZqjchxVEDGLWAefOUs/vVTm8NYUBNJLgQSw+4zLipy M0jxq3aFNEyXSXHqNYJLmCM2dBp3BkgRjsOQJmY0SHEAvWlW33X0VM6qz9kD1T04/nd++9 +ZWnxPCpYfT3yYj63PWUdTnvJdSh/1vFwBNXaN6uoWpYn8eOBkyQ5xvrlJ0jIg== 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 4VPCHZ53mxzlLP; Tue, 23 Apr 2024 19:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NJiQKl077647; Tue, 23 Apr 2024 19:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NJiQfJ077644; Tue, 23 Apr 2024 19:44:26 GMT (envelope-from git) Date: Tue, 23 Apr 2024 19:44:26 GMT Message-Id: <202404231944.43NJiQfJ077644@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: aa66995b4c80 - main - libc printf_render_errno(): do not use strerror() 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: aa66995b4c804cbb579f71645d97fe282a798bfc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=aa66995b4c804cbb579f71645d97fe282a798bfc commit aa66995b4c804cbb579f71645d97fe282a798bfc Author: Konstantin Belousov AuthorDate: 2024-04-23 17:15:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-23 19:44:07 +0000 libc printf_render_errno(): do not use strerror() Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916 --- lib/libc/stdio/xprintf_errno.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdio/xprintf_errno.c b/lib/libc/stdio/xprintf_errno.c index c63a7afd35e0..f1e5421f60c8 100644 --- a/lib/libc/stdio/xprintf_errno.c +++ b/lib/libc/stdio/xprintf_errno.c @@ -27,6 +27,7 @@ */ #include +#include #include #include #include @@ -53,13 +54,13 @@ __printf_render_errno(struct __printf_io *io, const struct printf_info *pi { int ret, error; char buf[64]; - const char *p; + char errnomsg[NL_TEXTMAX]; ret = 0; error = *((const int *)arg[0]); if (error >= 0 && error < __hidden_sys_nerr) { - p = strerror(error); - return (__printf_out(io, pi, p, strlen(p))); + strerror_r(error, errnomsg, sizeof(errnomsg)); + return (__printf_out(io, pi, errnomsg, strlen(errnomsg))); } sprintf(buf, "errno=%d/0x%x", error, error); ret += __printf_out(io, pi, buf, strlen(buf)); From nobody Tue Apr 23 19:44: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 4VPCJ65wSrz5HxVr for ; Tue, 23 Apr 2024 19:44:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCJ639JTz4j8d for ; Tue, 23 Apr 2024 19:44:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a5883518135so111867666b.3 for ; Tue, 23 Apr 2024 12:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1713901492; x=1714506292; 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=QBA3rCiZsTrs8ArT33wL16SqzNbHpYJ0TEJcwhm6CmY=; b=XozSuXdxm5OedgtkGwQFfZ2OshsVpD1n69OmVdytrry5y4np0q0lAiESPQmg9TSgQM yUOyVIIACgd0+cvsuqz/cFnETdObAy71hU7/x8rJmq8I5Jq63Ljz65YhTowRkCjTG1AP Yxletkfy2GYnL5BnC0NbuK60d18jzwkRTzyvW+V4lOaMCGuOYm9tMZwMIVmQR3fUXuWS AZi6pFvIP+SN25u4TQsGXHt9OE4oLumdlVc2AVprbwB8j/9AZOfi+fNgaEb3F0oZZ7Mb OJ9c3ESn1TOznGtuCXDiUvebHoPyovmFS4MZkbkfrPJ2KMJIiEIHNXnk9uBQLsAzI1uc eAvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713901492; x=1714506292; 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=QBA3rCiZsTrs8ArT33wL16SqzNbHpYJ0TEJcwhm6CmY=; b=vBIolJ+1ViP+a4qnIFqJiONQBF4QUbTyIuJNS8wq7E7xEDbvVhleILO1QrFXbDvMDZ HcFDaDMmY3Ol48M6dXOPjowYkBquVoXEFDBkdR2NBw1A/xj1FPf+B0eZGf9VJc7+cT30 oYpfkq6f+Khg7k+WVmyznDVlxBxPij1lzypZSD5yNuxCiPNELul1ntFxKcptVTQs2Esz v98lLRVunQxxlcfGkR6qS7FyxkGdiCfbf+1XzQXyAbDOk+u3o4h8C2bgRPTGOeVCj2KY B8Mirdb1TzZGdUhFouHW3nhxuDw8JnvzZP5L/hsq88Ysj/LCajru8308T+hKnH11W+AE SkYQ== X-Forwarded-Encrypted: i=1; AJvYcCUUeuo8CApeLjz2s3NIYxknQMayS28znFU/cbtIudI3ckzPc8AaIOojgMPtCKWnB5ZDHs9mxs4rRRzLQK+yT15sow+ogjZsGSDU60/KAUVaJw== X-Gm-Message-State: AOJu0YxMXQ/r2oU4MVZZB0N7i5vJddXCIRNI9E9xx0tPgy4iW0FYS6C8 BZ5voFxxgM1ZrZGpydNbduVBhkATinKfylkTDfMu4AHvm+Ul7IUHH7CbyYGeBlAtbQ8pts8zaSb wAtWBsxnE8hbh1au4tWHNkNZSeApqS8dvtV10RA== X-Google-Smtp-Source: AGHT+IEm55hFV3ivHxJaaA3c5IG10EPEnQqmpKkrD6sKHAg2o1DlZYjLk/Wwt/fWZ9jJz81KCEPDQhsO8X+DigR6wB0= X-Received: by 2002:a17:906:4687:b0:a55:648f:3f03 with SMTP id a7-20020a170906468700b00a55648f3f03mr208906ejr.53.1713901492068; Tue, 23 Apr 2024 12:44:52 -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: <202404181915.43IJFEoG020480@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 23 Apr 2024 13:44:40 -0600 Message-ID: Subject: Re: git: 67783db661f8 - main - CONTRIBUTING: request only one submission type per change To: Xin LI Cc: Gleb Smirnoff , Lexi Winter , Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, imp@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009d821d0616c8c987" 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: 4VPCJ639JTz4j8d --0000000000009d821d0616c8c987 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable We have thought about it. People are setting one (forgejo) up right now as a proof of concept. Contact me if you'd like to participate, or setup something different to evaluate (past calls for the git next generation working group didn't produce too many interested parties that could move the ball). In the long term, though, we'll have to do something like Gerrit, Gitlab, or Forgejo or similar. There's a lot of factors to consider for each of the solutions that are available, but it's hard to setup something even as a test experiment to see if it can make things better. Github pull requests are my attempt to do something to move the needle on the project being so hard to contribute to in a way that won't get ignored. There's plenty of problems with it, but we're also getting some good code and contributors from it. Nothing is stopping other attempts, other than the time and effort it takes to set them up and administer them.... Warner On Tue, Apr 23, 2024 at 1:34=E2=80=AFPM Xin LI wrote: > Possibly slightly off-topic, but have we considered some other > alternatives to Phabricator, like Gerrit > ? (My opinion might be biased as we > use Gerrit at $WORK). I liked the review UI more (the context > representation is cleaner compared to Phabricator and one can easily > navigate between different amendment revisions of one change), and it is > integrated with Git with a customizable workflow (e.g. can have complex > submit requirements, like a change must be approved by a different person= , > has to pass certain presubmit workflow, etc.) and is actively developed a= nd > maintained (both Android and Chrome makes heavy use of Gerrit). > > Cheers, > > On Tue, Apr 23, 2024 at 12:02=E2=80=AFPM Gleb Smirnoff > wrote: > >> Lexi, >> >> On Thu, Apr 18, 2024 at 08:27:56PM +0100, Lexi Winter wrote: >> L> as a non-committer src contributor, i've discussed this with imp@ >> quite >> L> a bit and i think this should be phrased more strongly in favour of >> L> using GitHub for commits. >> L> >> L> the current situation is that Phabricator is useless for non-committe= rs >> L> because 1) you have to know who can review your commit, and 2) once >> your >> L> commit is reviewed, someone has to commit it, and Phabricator doesn't >> L> address this. >> >> The 1) is actually not as bad. Phabricator has subscribtion hooks, and >> many >> committers have rules installed to get notifications of new reviews that >> touch certain paths of code. >> >> The problem 2), IMHO, equally applies to github and Phabricator. >> >> L> i think it might make more sense to suggest that people submit all >> L> patches via either GitHub or Bugzilla, and only use Phabricator if >> L> specifically asked to. >> >> I don't agree here. Looks like we should address those phabricator >> submissions that go unnoticed due to lack of maintainers of a code. >> I don't think submitting same patch to github will improve visibility. >> >> >> -- >> Gleb Smirnoff >> > --0000000000009d821d0616c8c987 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
We have thought about it. People are setting one (for= gejo) up right now as a proof of
concept. Contact me if you'd= like to participate, or setup something different to evaluate (past
<= div>calls for the git next generation working group didn't produce too = many interested parties
that could move the ball). In the long te= rm, though, we'll have to do something like Gerrit,
Gitlab, o= r Forgejo or similar. There's a lot of factors to consider for each of = the solutions
that are available, but it's hard to setup some= thing even as a test experiment to see if
it can make things bett= er.

Github pull requests are my attempt=C2=A0to do= something to move the needle on the
project being so hard to con= tribute to in a way that won't get ignored. There's plenty
of problems with it, but we're also getting some good code and contri= butors from it.
Nothing is stopping other attempts, other than th= e time and effort it takes to set them
up and administer them....=

Warner

On Tue, Apr 23, 2024 at 1:34=E2= =80=AFPM Xin LI <delphij@gmail.com<= /a>> wrote:
<= div dir=3D"ltr">
Possibly sli= ghtly off-topic, but have we considered some other alternatives to Phabrica= tor, like G= errit?=C2=A0 (My opinion might be biased as we use Gerrit at $WORK).=C2= =A0 I liked the review UI more (the context representation is cleaner compa= red to Phabricator and one can easily navigate between different amendment = revisions of one change), and it is integrated with Git with a customizable= workflow (e.g. can have complex submit requirements, like a change must be= approved by a different person, has to pass certain presubmit workflow, et= c.) and is actively developed and maintained (both Android and Chrome makes= heavy use of Gerrit).
=
Cheers,
<= /div>
O= n Tue, Apr 23, 2024 at 12:02=E2=80=AFPM Gleb Smirnoff <glebius@freebsd.org> wrote:<= br>
=C2=A0 Lexi,

On Thu, Apr 18, 2024 at 08:27:56PM +0100, Lexi Winter wrote:
L> as a non-committer src contributor, i've discussed this with imp@= quite
L> a bit and i think this should be phrased more strongly in favour of L> using GitHub for commits.
L>
L> the current situation is that Phabricator is useless for non-committe= rs
L> because 1) you have to know who can review your commit, and 2) once y= our
L> commit is reviewed, someone has to commit it, and Phabricator doesn&#= 39;t
L> address this.

The 1) is actually not as bad.=C2=A0 Phabricator has subscribtion hooks, an= d many
committers have rules installed to get notifications of new reviews that touch certain paths of code.

The problem 2), IMHO, equally applies to github and Phabricator.

L> i think it might make more sense to suggest that people submit all L> patches via either GitHub or Bugzilla, and only use Phabricator if L> specifically asked to.

I don't agree here. Looks like we should address those phabricator
submissions that go unnoticed due to lack of maintainers of a code.
I don't think submitting same patch to github will improve visibility.<= br>

--
Gleb Smirnoff
--0000000000009d821d0616c8c987-- From nobody Tue Apr 23 19:58: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 4VPCbj0qLDz5HyGl; Tue, 23 Apr 2024 19:58:25 +0000 (UTC) (envelope-from pho@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCbj0FCBz4k02; Tue, 23 Apr 2024 19:58:25 +0000 (UTC) (envelope-from pho@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713902305; 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=nULj9aoC1FY/K7CVtmKJWal1IvMItYD2dvBoUygvvVw=; b=kpSB6HhU1JGRCyqsGyC9rQUhtj1yxHAkIgbRus2SFLz8666+eyZakmeDvQ718L2IoZ8aQi IT8cSI6KpmfjNdEWVJFkZS0UCs2JDB5zjn1MFpyxqgb5n1q/F1y/jStWQEof9K1K+Gr7dw t4+W0tg0HZGiGnZAT9o8C+WOvRCyFzNgNcLEoMEFcJvC2/6vOf7/H638hjk6D7biUIih4d miAIgTwxVMzEwdp89vqQ8dfPaffE1OZA36RFnKMo4MyTwdvUnUP2AfmGpxdai7JlvBxJve ZITL513fdxAh4MbeZzJEtUtttAinII5aHdLDUFdYohZASZOXLZ82sPnkIHxChA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713902305; a=rsa-sha256; cv=none; b=xzJaNnBkua6WmM+w5ZDG3avv+vWi6ZUKaDBgWc/LPnV45mcYmjyO8ivFMz5Z6XkAZfSbia rXKYaEaZR6sLOzTgkjed5yv/MmdbDm9/fY2L9M/yEZFbVZVGAyQHvTozW8zTUFByi5X6Xs B0t9fSwTMvfEGslyLZnDwX83IjRifr5x4dUFg4m8Df2NpZ7keYXE449dkrOrEGSAriZuMR Pony0yKG7qAs8MOq0ouYR4X9HZ+f2LeSwcfostpehjy6rjijMtf8pe3SPYprBfCShjjyfR KI2aeQFB+aM/o/PxjhQwBomlY9a5B621s4EwUBq8ORQcKgWP5ord4SvUrrqwQA== 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=1713902305; 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=nULj9aoC1FY/K7CVtmKJWal1IvMItYD2dvBoUygvvVw=; b=IsSIsux/ztQ6x44hj7FrwGG41kDgFEXmY6uFPz+uABZsp6ZpNe2jP7V6lvfDVNC0VKS/1z bdScMlcCsJ2LrM5pZBuHqIrC5Z8acMMsutSF3YO3aWcHSkRbq63j7IBG7WmqoRWiQ9OGSI jGtWjOpBimSAwxchbaDQgt8chSET7ZnYtXK5QYQCRfROzZ6nX0NC7tO7PvN1tYjoZGtx9g md9kP4vytcgafYSXQwWQFC1RnBjv0g0U0q33ZvKnW7qyj7XODy44G0RR53C/6CR0mp9gmW opIaeqfnsd2gYg2fqQv/dXee+lGQD95KlkvnK3cndk+gv24iqvlFtA4URc4W8g== Received: from Peters-Air (c-x599688e4.customers.hiper-net.dk [89.150.136.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 did not present a certificate) (Authenticated sender: pho) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VPCbh2c9MzjkT; Tue, 23 Apr 2024 19:58:24 +0000 (UTC) (envelope-from pho@FreeBSD.org) Date: Tue, 23 Apr 2024 21:58:19 +0200 From: Peter Holm To: Brooks Davis Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1fd880742ace - main - libsys: add a libsys.h Message-ID: References: <202404161648.43GGmLAN079971@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: <202404161648.43GGmLAN079971@gitrepo.freebsd.org> On Tue, Apr 16, 2024 at 04:48:21PM +0000, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1fd880742ace94e11fa60ee0b074f0b18e54c54f > > commit 1fd880742ace94e11fa60ee0b074f0b18e54c54f > Author: Brooks Davis > AuthorDate: 2024-04-16 16:48:07 +0000 > Commit: Brooks Davis > CommitDate: 2024-04-16 16:48:07 +0000 > > libsys: add a libsys.h > > This declares an API for libsys which currently consists of > __sys_() declarations for system call stubs and function pointer > typedefs of the form __sys__t. The vast majority of the > implementation resides in a generated _libsys.h which ensures that all > system call stub declarations match syscalls.master. > > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D44387 > --- > lib/libsys/Makefile | 2 + > lib/libsys/_libsys.h | 865 +++++++++++++++++++++++++++++++++++++++++++++++++ > lib/libsys/libsys.h | 25 ++ > sys/kern/syscalls.conf | 1 + > 4 files changed, 893 insertions(+) > Shouldn't readv() and writev() return ssize_t? Like this: diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h index d0dd144bc8f1..d4cd14ceb75f 100644 --- a/lib/libsys/_libsys.h +++ b/lib/libsys/_libsys.h @@ -141,8 +141,8 @@ typedef int (__sys_listen_t)(int, int); typedef int (__sys_gettimeofday_t)(struct timeval *, struct timezone *); typedef int (__sys_getrusage_t)(int, struct rusage *); typedef int (__sys_getsockopt_t)(int, int, int, void *, __socklen_t *); -typedef int (__sys_readv_t)(int, const struct iovec *, u_int); -typedef int (__sys_writev_t)(int, const struct iovec *, u_int); +typedef ssize_t (__sys_readv_t)(int, const struct iovec *, u_int); +typedef ssize_t (__sys_writev_t)(int, const struct iovec *, u_int); typedef int (__sys_settimeofday_t)(const struct timeval *, const struct timezone *); typedef int (__sys_fchown_t)(int, int, int); typedef int (__sys_fchmod_t)(int, mode_t); @@ -540,8 +540,8 @@ int __sys_listen(int s, int backlog); int __sys_gettimeofday(struct timeval * tp, struct timezone * tzp); int __sys_getrusage(int who, struct rusage * rusage); int __sys_getsockopt(int s, int level, int name, void * val, __socklen_t * avalsize); -int __sys_readv(int fd, const struct iovec * iovp, u_int iovcnt); -int __sys_writev(int fd, const struct iovec * iovp, u_int iovcnt); +ssize_t __sys_readv(int fd, const struct iovec * iovp, u_int iovcnt); +ssize_t __sys_writev(int fd, const struct iovec * iovp, u_int iovcnt); int __sys_settimeofday(const struct timeval * tv, const struct timezone * tzp); int __sys_fchown(int fd, int uid, int gid); int __sys_fchmod(int fd, mode_t mode); - Peter From nobody Tue Apr 23 20:04: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 4VPCkN3hjFz5HyrY; Tue, 23 Apr 2024 20:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCkN31kWz4l63; Tue, 23 Apr 2024 20:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713902652; 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=UJMKYG+Llr+Q5GqB5rhccv7ccFDWU/cWsRTKnZ+5pjE=; b=YYy2Zud6QnwLXVS6Es+ryLgIG6C+fwB7KpK7oZ5m6inakOA6q2XQy4BEs/Q9VufgYgliqO 9C/NT8/kLCt+QDg9T8603gGTxX9Zr1rWRBMnlKS6pyZuMhBVTa5CHg0nxUkFwHwXwqeMDG YipxlLGceusCjPnEGxif4BncT4MZiqyOZ0cnzx1oiBfDARcn+/0S21pVLbcIgCVJhJZyvt Uh2UzZsTj18gvq8p+NodPBB6pVacHl693CoDs0zdeKJ3KbHDODcTjHhJFIv+8ViolUH3D0 kyOvkT6HKECOr5pAxg11W6Vm4E+gNZjIz+3XE/Jc9ReYK038fJ0hXtOMrdTowQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713902652; a=rsa-sha256; cv=none; b=ouqHfNbPmW34wCab7t+/W+YIL8K47rN0efaG+gnASdUGK6D4ep6M0OuFST0/0NHhNvfy88 lmtkErZvZru7rDP3d/K3A2+UNCGgM0KUW/cmg9FDj7VVrnm1JxE6zJQ5MTQ4yJ22eWDVQL MuceyZExsaERbA8ZY1bMNR9ywC0LMY7JJPjCLK6vxRxzbqTEAEXDbe6X7Yd78/AjB8edpH 0EyNqY3C9dWtwAX849jMbhYNW0mEnScqz2pybxbB2GQdwpSKSuCMMw6E5OGlmt4aRQI8iI 7XiRWdTJqs4gVhC5oLgTp5f3jK64DmkKFrXD2/H2KaoTs5egKxCU6kkQfmR6vw== 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=1713902652; 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=UJMKYG+Llr+Q5GqB5rhccv7ccFDWU/cWsRTKnZ+5pjE=; b=wA3+6MI/Hbfr26oXDZqqQAY7KtH1cgty8RfEhgfgpOgxQlwH4ebjnyjWB/TXr4XmVgSAQv sRumvjaj1qNix3ntpeXzBbUqxXp0yMkLV12JoC99EJQKFj7clPcbilCs8LU36U5g00jPwE 8SzvU8OocXza78+HG/bgXr3BKOdVk4OLQe1ZztQKqldQ/mrbvuGeWbYUYTsiERdluJgfkV 63+IgRRdfcyyrTZn+zRZ9PSRZLDA7vPZk80hybQ0xYbAlb6h9IVxNHvaEzdnQkZwtRJO8N eLJUcKAaRYC3PxUm1Cn+lyfgmCewUWmci6PpJDTbKRoLY3KvTb4IsJw2mHiEKg== 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 4VPCkN2dfszlgN; Tue, 23 Apr 2024 20:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NK4C4I011985; Tue, 23 Apr 2024 20:04:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NK4C5i011982; Tue, 23 Apr 2024 20:04:12 GMT (envelope-from git) Date: Tue, 23 Apr 2024 20:04:12 GMT Message-Id: <202404232004.43NK4C5i011982@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: e75a1bbc233b - main - pow,powf(3),__ieee754_rem_pio2(f): Avoid negative integer left shift UB 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: e75a1bbc233bf112b9eb98a20ad4bdf9bc14b2cf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e75a1bbc233bf112b9eb98a20ad4bdf9bc14b2cf commit e75a1bbc233bf112b9eb98a20ad4bdf9bc14b2cf Author: Karl Tomlinson AuthorDate: 2024-04-23 18:18:25 +0000 Commit: Warner Losh CommitDate: 2024-04-23 20:04:07 +0000 pow,powf(3),__ieee754_rem_pio2(f): Avoid negative integer left shift UB A compiler clever enough to know that z is positive with a non-zero biased exponent could, for example, optimize away the scalbnf(z,n) in pow() because behavior for left shift of negative values is undefined. `n` is negative when y*log2(|x|) < -0.5. i.e. |x^y| < sqrt(0.5) The intended behavior for operator<< in this code is to shift the two's complement representation of the first operand. In the pow() functions, the result is added to the IEEE 754 exponent of z = 2^y'. n may be negative enough to underflow the biased IEEE 754 exponent below zero, which is manifested in the sign bit of j (which would correspond to the IEEE 754 sign bit). The conversion from uint32_t to int32_t for out-of-int32_t-range values is implementation defined. The assumed behavior of interpreting the uint32_t value as a two's complement representation of a signed value is already assumed in many parts of the code, such as uses of GET_FLOAT_WORD() with signed integers. This code passes all the current tests, and makes some out of tree fuzzing tests pass again rather than hit UB (detailed in the commentary of the pull request). Signed-off-by: Karl Tomlinson Reviewed by: imp, steve kargl, dim Pull Request: https://github.com/freebsd/freebsd-src/pull/1137 --- lib/msun/src/e_pow.c | 6 +++++- lib/msun/src/e_powf.c | 6 +++++- lib/msun/src/e_rem_pio2.c | 2 +- lib/msun/src/e_rem_pio2f.c | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/msun/src/e_pow.c b/lib/msun/src/e_pow.c index 85afacdbb6a2..85d1d551b6fb 100644 --- a/lib/msun/src/e_pow.c +++ b/lib/msun/src/e_pow.c @@ -299,7 +299,11 @@ pow(double x, double y) r = (z*t1)/(t1-two)-(w+z*w); z = one-(r-z); GET_HIGH_WORD(j,z); - j += (n<<20); + /* + * sign bit of z is 0. + * sign bit of j will indicate sign of 0x3ff-biased exponent. + */ + j += (int32_t)((u_int32_t)n<<20); if((j>>20)<=0) z = scalbn(z,n); /* subnormal output */ else SET_HIGH_WORD(z,j); return s*z; diff --git a/lib/msun/src/e_powf.c b/lib/msun/src/e_powf.c index 2e7c37542a77..9f670bcd1caa 100644 --- a/lib/msun/src/e_powf.c +++ b/lib/msun/src/e_powf.c @@ -242,7 +242,11 @@ powf(float x, float y) r = (z*t1)/(t1-two)-(w+z*w); z = one-(r-z); GET_FLOAT_WORD(j,z); - j += (n<<23); + /* + * sign bit of z is 0. + * sign bit of j will indicate sign of 0x7f-biased exponent. + */ + j += (int32_t)((u_int32_t)n<<23); if((j>>23)<=0) z = scalbnf(z,n); /* subnormal output */ else SET_FLOAT_WORD(z,j); return sn*z; diff --git a/lib/msun/src/e_rem_pio2.c b/lib/msun/src/e_rem_pio2.c index 76ae8050d36b..8a4006498a17 100644 --- a/lib/msun/src/e_rem_pio2.c +++ b/lib/msun/src/e_rem_pio2.c @@ -162,7 +162,7 @@ medium: /* set z = scalbn(|x|,ilogb(x)-23) */ GET_LOW_WORD(low,x); e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */ - INSERT_WORDS(z, ix - ((int32_t)(e0<<20)), low); + INSERT_WORDS(z, ix - ((int32_t)((u_int32_t)e0<<20)), low); for(i=0;i<2;i++) { tx[i] = (double)((int32_t)(z)); z = (z-tx[i])*two24; diff --git a/lib/msun/src/e_rem_pio2f.c b/lib/msun/src/e_rem_pio2f.c index 744060f18010..d9a3e2e34c46 100644 --- a/lib/msun/src/e_rem_pio2f.c +++ b/lib/msun/src/e_rem_pio2f.c @@ -67,7 +67,7 @@ __ieee754_rem_pio2f(float x, double *y) } /* set z = scalbn(|x|,ilogb(|x|)-23) */ e0 = (ix>>23)-150; /* e0 = ilogb(|x|)-23; */ - SET_FLOAT_WORD(z, ix - ((int32_t)(e0<<23))); + SET_FLOAT_WORD(z, ix - ((int32_t)((u_int32_t)e0<<23))); tx[0] = z; n = __kernel_rem_pio2(tx,ty,e0,1,0); if(hx<0) {*y = -ty[0]; return -n;} From nobody Tue Apr 23 20:04: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 4VPCkP62vsz5HyxB; Tue, 23 Apr 2024 20:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCkP4LhKz4kh7; Tue, 23 Apr 2024 20:04:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713902653; 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=psPrlt84z8YkVdbmmqVacr+S6N931DmbHEePspx6jHM=; b=pUqrRQ9didR3we5VUyvfsGgBvKWYNjnN6wOwT4abGbSiCKOCjj/L37F3hCfE5rCtX12JlM wH/aIadXDvvNyHjFj7fx7Tx6Eencjdwgrfivu9BI7OKnfxfIBiU3vMWMHV9IdWSPVOZWEs 9A0BFOOYGhFMNaznpI6FFiC3nb6SKq5gVIakviL8PxJR8nnfnmoRGNz+ppwJWuvkOy37Wa uDMMrrbJ7br51ooAbDn6IKc52/4JYdmFYbh39PmkeNYxtO4mPtvHsSnd/zgCHsg+PZf84a JXCqWmzQ1zBxsPwGPQPKczoWc78IfTqSVzNpyBuCgJ7GaESKg7TbQ/ix8iEpZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713902653; a=rsa-sha256; cv=none; b=OzS5TbgEjOz709nS80AyrgiyhirMwQQrEtmAydIeF5YDVnnpZHsw/3+HWjkI1NDo/1UWMl tlciYaGWZqx926ocytppyR5AVketf/2dGpo4sTAWbGpozeqqsqezjoi77LjYSbtiLDw41f 5Ml/fBYklOqT47kzFzSPDevjdNy40d7Wyshr6U2VHPQIQINy2daTi8PoVKN2PdiVrs7mU2 91RxKKEE4h7bPQgSkfOPsszBVPXtfhoJWR9AVWC6JTbe60Z9XF5k6ButhXpD6MDw0HFLeR aLRN6iMObELex/MmYsp3eyzs6MWebZUV/zgn+XH4yPsGdSv+8EMbCFX9jqfaUQ== 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=1713902653; 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=psPrlt84z8YkVdbmmqVacr+S6N931DmbHEePspx6jHM=; b=irF4X8c6p0PatKIhhGbUDwEsZ/TjFlKewgNoXIWe/DoMxAYt2I6plmZa9ndMTtI4pl4PFk NarFyAH/w9dQj+2M472otp9/GoD4ZqTismh52DuXbfv30YMSHQdEInYNW0ruBjWIkCaIcp VIECj3lAzm4ELC3hM/4qvTjZB0wZh410PQ3CUXeWbnGeVwaHhW0WmB1uQlpz14EMR1xos0 5HpUs/+dk+tM2WnSSjf9VbmcJvkVeDKNKi/cXhS3Dl6TYQjpY4hIjm9iqhFqgtuIq2k60Q oetkUjLwE+kmRIxGqYIHBh04+4oIVlvbXwfU9KaW+kWYKDAV+4l/aGkvgUzFPw== 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 4VPCkP3yl1zlTY; Tue, 23 Apr 2024 20:04:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NK4DG5012033; Tue, 23 Apr 2024 20:04:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NK4DlJ012030; Tue, 23 Apr 2024 20:04:13 GMT (envelope-from git) Date: Tue, 23 Apr 2024 20:04:13 GMT Message-Id: <202404232004.43NK4DlJ012030@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: ea6f2d7797c4 - main - checkstyle9.pl: Warn if there's no SOB line 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: ea6f2d7797c447e3c128b94ae7d825284a137600 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ea6f2d7797c447e3c128b94ae7d825284a137600 commit ea6f2d7797c447e3c128b94ae7d825284a137600 Author: Warner Losh AuthorDate: 2024-04-23 20:03:28 +0000 Commit: Warner Losh CommitDate: 2024-04-23 20:04:08 +0000 checkstyle9.pl: Warn if there's no SOB line If there's no Signed-off-by: line, complain. Sponsored by: Netflix --- tools/build/checkstyle9.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl index df9ec2bbd7c1..7fa02bcabc97 100755 --- a/tools/build/checkstyle9.pl +++ b/tools/build/checkstyle9.pl @@ -1252,6 +1252,7 @@ sub process { my $in_header_lines = $file ? 0 : 1; my $in_commit_log = 0; #Scanning lines before patch + my $has_sob = 0; my $non_utf8_charset = 0; our @report = (); @@ -1456,14 +1457,17 @@ sub process { if ($line =~ /^\s*signed-off-by:/i) { # This is a signoff, if ugly, so do not double report. $in_commit_log = 0; + $has_sob = 1; if (!($line =~ /^\s*Signed-off-by:/)) { ERROR("The correct form is \"Signed-off-by\"\n" . $herecurr); + $has_sob = 0; } if ($line =~ /^\s*signed-off-by:\S/i) { ERROR("space required after Signed-off-by:\n" . $herecurr); + $has_sob = 0; } } @@ -2649,6 +2653,10 @@ sub process { } + if ($has_sob == 0) { + ERROR("Missing Signed-off-by: line"); + } + # If we have no input at all, then there is nothing to report on # so just keep quiet. if ($#rawlines == -1) { From nobody Tue Apr 23 20:06: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 4VPCmq6pF6z5HypV; Tue, 23 Apr 2024 20:06:19 +0000 (UTC) (envelope-from brooks@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPCmq67Sdz4lkl; Tue, 23 Apr 2024 20:06:19 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713902779; 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=qXF/6u9LSl+xhA2hDmyCX7he6bneR8/jSQ057WG7LLc=; b=cprLb+3fVqqnP/eiY4F0nbWYonX+l6jBddOcAzMJmFAbiSgtf4VtbF9r3qZ+bL1QDNBoSw iW6v/TTNuYDstJB9COuh/6oUp1BhsjQMl6RtVHrVypthXhWywWG0t+Zib6CdZYkCYVlt3t Wgh++K+P6eCXU4/VbNGToHpufu+TZVx/YkCceuJjCoIDPJYExHkX3hhXhUDJcQkaAv57mM g4vrjg0sJEnpJp9VEuyJH8ak8ChhITXsV7Wo+lRqvUpLZMiCfWbIp6Y6A3y3qhmHEnzB72 yYifb6P9aHWmQXxOudB6PNGOUSn+SLeoy3F3krmRHB0g7EbLECAfd3N2ltiUCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713902779; a=rsa-sha256; cv=none; b=YQUQJL7w71vq4SbQzAnf7Nxin+GnBcdSDsWXsQMxbYLsa3rSrTBlDzgkll+bpb0EWUqJ9i 9FN+AKdTKhX9jE61mDp2iO+p2aVqlfqI8LNz0jvmrMqzgtAikwhz4XE1hjj74pN7Qbaoj1 F367MBn/+aHSqPiwHZ6gSufXgdAPvr6s8/tf2O4GbqBW+idX/vLHkglYr1U883fQnnbCuO CJH0Ij0QYDgmJO/8G7RGD95lvk19m+8wF4MngZFs5fqeng2lufxx0XyVslsIvBwI9kb5kB XfZZ7dZL9Rbqm7kAjdmHJg4kbKI6q9uzFU/qKUPzzp/reBV6eWIojpkxWYwUmg== 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=1713902779; 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=qXF/6u9LSl+xhA2hDmyCX7he6bneR8/jSQ057WG7LLc=; b=A2Wt5LklS+xlmmpmpNcVnqNgRGzHwGSPE0UlHJ2UHgIl1U1jKqr/+9OpH9RisRLQaIK4ck s1nIKAL0tIz3FqmepBszfXnnQs7i24Aok6olroxrmNL/1quU9hWbKKEPmuSN9+8tX1cOAK fRAIGN+BwQxzqyqcaXR0bRi6pUikV93p2O7N+UhRIJw7sgJWfO6xAO71Ud9rxjwFEjhA0R 8GiTbr/oS57idejM9u2VLZkXGiFhpcnzqdp/9Qxs4k5AS4o3rH64npHTKXR7b7DwQibCPh 0QUY0ootsQp+UpQSyYU+gyoVgpnO8+QLEL168srg1OLmcXEw+4HWkHT4JVLivQ== 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 4VPCmq5RlLzhXj; Tue, 23 Apr 2024 20:06:19 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id BD48D3C019B; Tue, 23 Apr 2024 20:06:18 +0000 (UTC) Date: Tue, 23 Apr 2024 20:06:18 +0000 From: Brooks Davis To: Peter Holm Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1fd880742ace - main - libsys: add a libsys.h Message-ID: References: <202404161648.43GGmLAN079971@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 Tue, Apr 23, 2024 at 09:58:19PM +0200, Peter Holm wrote: > On Tue, Apr 16, 2024 at 04:48:21PM +0000, Brooks Davis wrote: > > The branch main has been updated by brooks: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1fd880742ace94e11fa60ee0b074f0b18e54c54f > > > > commit 1fd880742ace94e11fa60ee0b074f0b18e54c54f > > Author: Brooks Davis > > AuthorDate: 2024-04-16 16:48:07 +0000 > > Commit: Brooks Davis > > CommitDate: 2024-04-16 16:48:07 +0000 > > > > libsys: add a libsys.h > > > > This declares an API for libsys which currently consists of > > __sys_() declarations for system call stubs and function pointer > > typedefs of the form __sys__t. The vast majority of the > > implementation resides in a generated _libsys.h which ensures that all > > system call stub declarations match syscalls.master. > > > > Reviewed by: kib > > Differential Revision: https://reviews.freebsd.org/D44387 > > --- > > lib/libsys/Makefile | 2 + > > lib/libsys/_libsys.h | 865 +++++++++++++++++++++++++++++++++++++++++++++++++ > > lib/libsys/libsys.h | 25 ++ > > sys/kern/syscalls.conf | 1 + > > 4 files changed, 893 insertions(+) > > > > Shouldn't readv() and writev() return ssize_t? Indeed. This is a bug in syscalls.master from which this header is generated. I'll fix it. Thanks, Brooks From nobody Tue Apr 23 21:02: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 4VPF1d4G65z5J4K9; Tue, 23 Apr 2024 21:02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPF1d3vXvz4qtN; Tue, 23 Apr 2024 21:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713906149; 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=/+LEWJyvuXENbeyjZjao5vljICQm+Xj1j32rf8Bn0uM=; b=uyXjsS39RJFnf7ktY5TLr5wil1Uclx54X5r3hpEbDs/YA5EKluLJTy2UO6PNsvBhQgFGU5 PItjdAktDu/RZpdinobBiECtvDz34RSzB9Vv4v+3zDp5MCta6W8BIOGo9mdH1v/JHYCEUk wcxAvKG6iRadf32VSNC78bsK24p8Fku3f1d7gvGerbT6x8Rs1iXodDeYRroMGEePL45Fwg 80vPyIjH03QY8h4OMd/EABc62QSl+bnC5uhXmOcHMghzG9jzsAiu3WajjgJc5JNsrrSQ4c rn5dxpHJvW0oRsXFMy1Z+hhLjDhbFhHop+Dq+r6DVvclRaA9V0+Binteu/q06w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713906149; a=rsa-sha256; cv=none; b=nG2M4YyKp666Rx4LPb3tdcmh0bkNaPGBkChk9FJn8UhX2i8S4vKD+QEOEXhnuvImtZrHXD 0QKo5gGsC4X8PpSgiUO1t8nYZeUDUIzdoTxIJP+bN/HkFF5HHXUBC/DfNsBNL1uQc6bZAj 1QlnoxT/hTNdbBfNPlyBk8aeFy76M9Q9tTzRaQPuc2BF+1oDRZcsSslRcJHeUlC84nict6 I1tvFcdbHDnAkSHSnHc96RPQhNzn4masVXrMU2jv0+uy82lZKeJ/gkKZPUJMQr5NxOvIy7 e+r3oNmJhYrZry8kLyyn/IXMlVUT2vZYYYfEajjr3SCzsmv4pfAkjBEWXuSE8w== 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=1713906149; 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=/+LEWJyvuXENbeyjZjao5vljICQm+Xj1j32rf8Bn0uM=; b=yduP7I2Ogcv5wppQvIpgvAOffEkMFo8pPOjmQCF9/0S1C7ZOrCOo6kOaCaCQ1r2NSKUq/b VlGt+hLLCdGx/BzNpMCTfJ8Mwrpzex+T3FmHZlGeVg+A0tXV01EvLxvW4xWA/WELd+9cl0 hYBQANTyGhCqV0HTsHcnZbpFGkrVVPQ0+FvbNAsLKG64I0EjC6Fh2uyeKdSOr2kXamgAVA vQYCjZ7C+1HVAhSabIdwwdIZy9eXbFEI6kM9O8yTlnfUF2PrDEwimbuRGJxXo/Iq5+GpnL mXxlNdn+qxY01BSrrW3YlaznQKVck3Kpq0TJtHOTyHiMScJCbzEwvrC9VCXf0Q== 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 4VPF1d3Vp4zmgL; Tue, 23 Apr 2024 21:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NL2T7D013055; Tue, 23 Apr 2024 21:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NL2Tk4013051; Tue, 23 Apr 2024 21:02:29 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:02:29 GMT Message-Id: <202404232102.43NL2Tk4013051@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: 65971073d935 - main - ahc(4) clean up old Linux defines 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: 65971073d935e8314bff8bca26d1445e9e336fce Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=65971073d935e8314bff8bca26d1445e9e336fce commit 65971073d935e8314bff8bca26d1445e9e336fce Author: HP van Braam AuthorDate: 2024-04-23 20:55:36 +0000 Commit: Warner Losh CommitDate: 2024-04-23 20:56:11 +0000 ahc(4) clean up old Linux defines Linux removed theirs starting in 2018 in commit: "scsi: aic7xxx: Fix build using bare-metal toolchain" Also remove now-useless sys/cdefs.h includes Signed-off-by: HP van Braam Reviewed by: imp, mav, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1189 --- sys/dev/aic7xxx/ahc_isa.c | 1 - sys/dev/aic7xxx/ahc_pci.c | 1 - sys/dev/aic7xxx/ahd_pci.c | 1 - sys/dev/aic7xxx/aic7770.c | 7 ------- sys/dev/aic7xxx/aic79xx.c | 35 +---------------------------------- sys/dev/aic7xxx/aic79xx.h | 4 ---- sys/dev/aic7xxx/aic79xx_osm.c | 1 - sys/dev/aic7xxx/aic79xx_pci.c | 6 ------ sys/dev/aic7xxx/aic79xx_reg_print.c | 1 - sys/dev/aic7xxx/aic7xxx.c | 35 +---------------------------------- sys/dev/aic7xxx/aic7xxx.h | 4 ---- sys/dev/aic7xxx/aic7xxx_93cx6.c | 7 ------- sys/dev/aic7xxx/aic7xxx_osm.c | 1 - sys/dev/aic7xxx/aic7xxx_pci.c | 7 ------- sys/dev/aic7xxx/aic7xxx_reg_print.c | 1 - 15 files changed, 2 insertions(+), 110 deletions(-) diff --git a/sys/dev/aic7xxx/ahc_isa.c b/sys/dev/aic7xxx/ahc_isa.c index 06ef509f2782..e096a9e5bb6d 100644 --- a/sys/dev/aic7xxx/ahc_isa.c +++ b/sys/dev/aic7xxx/ahc_isa.c @@ -37,7 +37,6 @@ * $Id$ */ -#include #include #include /* For CHAR_BIT*/ diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 6911f167c081..1f9cd33f9e00 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -31,7 +31,6 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_pci.c#19 $ */ -#include #include static int ahc_pci_probe(device_t dev); diff --git a/sys/dev/aic7xxx/ahd_pci.c b/sys/dev/aic7xxx/ahd_pci.c index ec828517c1c4..6af7169b49ff 100644 --- a/sys/dev/aic7xxx/ahd_pci.c +++ b/sys/dev/aic7xxx/ahd_pci.c @@ -31,7 +31,6 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahd_pci.c#17 $ */ -#include #include static int ahd_pci_probe(device_t dev); diff --git a/sys/dev/aic7xxx/aic7770.c b/sys/dev/aic7xxx/aic7770.c index 5ca98b8fd080..07d8eaf13419 100644 --- a/sys/dev/aic7xxx/aic7770.c +++ b/sys/dev/aic7xxx/aic7770.c @@ -42,16 +42,9 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7770.c#34 $ */ -#ifdef __linux__ -#include "aic7xxx_osm.h" -#include "aic7xxx_inline.h" -#include "aic7xxx_93cx6.h" -#else -#include #include #include #include -#endif #define ID_AIC7770 0x04907770 #define ID_AHA_274x 0x04907771 diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 58b795a9d4ce..61e65bf253d7 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -42,16 +42,9 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#246 $ */ -#ifdef __linux__ -#include "aic79xx_osm.h" -#include "aic79xx_inline.h" -#include "aicasm/aicasm_insformat.h" -#else -#include #include #include #include -#endif /******************************** Globals *************************************/ struct ahd_softc_tailq ahd_tailq = TAILQ_HEAD_INITIALIZER(ahd_tailq); @@ -2250,7 +2243,6 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) printerror = 0; } else if (ahd_sent_msg(ahd, AHDMSG_1B, MSG_BUS_DEV_RESET, TRUE)) { -#ifdef __FreeBSD__ /* * Don't mark the user's request for this BDR * as completing with CAM_BDR_SENT. CAM3 @@ -2262,7 +2254,6 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) CAM_LUN_WILDCARD, SCB_LIST_NULL, ROLE_INITIATOR)) aic_set_transaction_status(scb, CAM_REQ_CMP); -#endif ahd_handle_devreset(ahd, &devinfo, CAM_LUN_WILDCARD, CAM_BDR_SENT, "Bus Device Reset", /*verbose_level*/0); @@ -5223,23 +5214,11 @@ ahd_alloc(void *platform_arg, char *name) { struct ahd_softc *ahd; -#ifndef __FreeBSD__ - ahd = malloc(sizeof(*ahd), M_DEVBUF, M_NOWAIT); - if (!ahd) { - printf("aic7xxx: cannot malloc softc!\n"); - free(name, M_DEVBUF); - return NULL; - } -#else ahd = device_get_softc((device_t)platform_arg); -#endif memset(ahd, 0, sizeof(*ahd)); ahd->seep_config = malloc(sizeof(*ahd->seep_config), M_DEVBUF, M_NOWAIT); if (ahd->seep_config == NULL) { -#ifndef __FreeBSD__ - free(ahd, M_DEVBUF); -#endif free(name, M_DEVBUF); return (NULL); } @@ -5377,17 +5356,13 @@ ahd_free(struct ahd_softc *ahd) case 2: aic_dma_tag_destroy(ahd, ahd->shared_data_dmat); case 1: -#ifndef __linux__ aic_dma_tag_destroy(ahd, ahd->buffer_dmat); -#endif break; case 0: break; } -#ifndef __linux__ aic_dma_tag_destroy(ahd, ahd->parent_dmat); -#endif ahd_platform_free(ahd); ahd_fini_scbdata(ahd); for (i = 0; i < AHD_NUM_TARGETS; i++) { @@ -5423,9 +5398,6 @@ ahd_free(struct ahd_softc *ahd) free(ahd->seep_config, M_DEVBUF); if (ahd->saved_stack != NULL) free(ahd->saved_stack, M_DEVBUF); -#ifndef __FreeBSD__ - free(ahd, M_DEVBUF); -#endif return; } @@ -6146,9 +6118,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) for (i = 0; i < newcount; i++) { struct scb_platform_data *pdata; u_int col_tag; -#ifndef __linux__ int error; -#endif next_scb = (struct scb *)malloc(sizeof(*next_scb), M_DEVBUF, M_NOWAIT); @@ -6184,7 +6154,6 @@ ahd_alloc_scbs(struct ahd_softc *ahd) next_scb->sg_list_busaddr += sizeof(struct ahd_dma_seg); next_scb->ahd_softc = ahd; next_scb->flags = SCB_FLAG_NONE; -#ifndef __linux__ error = aic_dmamap_create(ahd, ahd->buffer_dmat, /*flags*/0, &next_scb->dmamap); if (error != 0) { @@ -6192,7 +6161,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) free(pdata, M_DEVBUF); break; } -#endif + next_scb->hscb->tag = aic_htole16(scb_data->numscbs); col_tag = scb_data->numscbs ^ 0x100; next_scb->col_scb = ahd_find_scb_by_tag(ahd, col_tag); @@ -6295,7 +6264,6 @@ ahd_init(struct ahd_softc *ahd) if ((AHD_TMODE_ENABLE & (0x1 << ahd->unit)) == 0) ahd->features &= ~AHD_TARGETMODE; -#ifndef __linux__ /* DMA tag for mapping buffers into device visible space. */ if (aic_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1, /*boundary*/BUS_SPACE_MAXADDR_32BIT + 1, @@ -6311,7 +6279,6 @@ ahd_init(struct ahd_softc *ahd) &ahd->buffer_dmat) != 0) { return (ENOMEM); } -#endif ahd->init_level++; diff --git a/sys/dev/aic7xxx/aic79xx.h b/sys/dev/aic7xxx/aic79xx.h index 7c7d023645f0..22de60d56316 100644 --- a/sys/dev/aic7xxx/aic79xx.h +++ b/sys/dev/aic7xxx/aic79xx.h @@ -625,9 +625,7 @@ struct scb { aic_io_ctx_t io_ctx; struct ahd_softc *ahd_softc; scb_flag flags; -#ifndef __linux__ bus_dmamap_t dmamap; -#endif struct scb_platform_data *platform_data; struct map_node *hscb_map; struct map_node *sg_map; @@ -1098,9 +1096,7 @@ struct ahd_completion struct ahd_softc { bus_space_tag_t tags[2]; bus_space_handle_t bshs[2]; -#ifndef __linux__ bus_dma_tag_t buffer_dmat; /* dmat for buffer I/O */ -#endif struct scb_data scb_data; struct hardware_scb *next_queued_hscb; diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c index 4a1e3336fe5f..32d4f393882c 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.c +++ b/sys/dev/aic7xxx/aic79xx_osm.c @@ -32,7 +32,6 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.c#35 $ */ -#include #include #include diff --git a/sys/dev/aic7xxx/aic79xx_pci.c b/sys/dev/aic7xxx/aic79xx_pci.c index 1ccc850648a4..6106b739057b 100644 --- a/sys/dev/aic7xxx/aic79xx_pci.c +++ b/sys/dev/aic7xxx/aic79xx_pci.c @@ -43,14 +43,8 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#88 $ */ -#ifdef __linux__ -#include "aic79xx_osm.h" -#include "aic79xx_inline.h" -#else -#include #include #include -#endif static __inline uint64_t ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) diff --git a/sys/dev/aic7xxx/aic79xx_reg_print.c b/sys/dev/aic7xxx/aic79xx_reg_print.c index 72f4ccd2e6b0..5c0e2de02950 100644 --- a/sys/dev/aic7xxx/aic79xx_reg_print.c +++ b/sys/dev/aic7xxx/aic79xx_reg_print.c @@ -6,7 +6,6 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#76 $ */ -#include #include static ahd_reg_parse_entry_t MODE_PTR_parse_table[] = { diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 4d97d8ee6367..b59a35ab5667 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -42,16 +42,9 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#155 $ */ -#ifdef __linux__ -#include "aic7xxx_osm.h" -#include "aic7xxx_inline.h" -#include "aicasm/aicasm_insformat.h" -#else -#include #include #include #include -#endif /****************************** Softc Data ************************************/ struct ahc_softc_tailq ahc_tailq = TAILQ_HEAD_INITIALIZER(ahc_tailq); @@ -1277,7 +1270,6 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) printerror = 0; } else if (ahc_sent_msg(ahc, AHCMSG_1B, MSG_BUS_DEV_RESET, TRUE)) { -#ifdef __FreeBSD__ /* * Don't mark the user's request for this BDR * as completing with CAM_BDR_SENT. CAM3 @@ -1291,7 +1283,6 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) ROLE_INITIATOR)) { aic_set_transaction_status(scb, CAM_REQ_CMP); } -#endif ahc_compile_devinfo(&devinfo, initiator_role_id, target, @@ -3878,23 +3869,11 @@ ahc_alloc(void *platform_arg, char *name) struct ahc_softc *ahc; int i; -#ifndef __FreeBSD__ - ahc = malloc(sizeof(*ahc), M_DEVBUF, M_NOWAIT); - if (!ahc) { - printf("aic7xxx: cannot malloc softc!\n"); - free(name, M_DEVBUF); - return NULL; - } -#else ahc = device_get_softc((device_t)platform_arg); -#endif memset(ahc, 0, sizeof(*ahc)); ahc->seep_config = malloc(sizeof(*ahc->seep_config), M_DEVBUF, M_NOWAIT); if (ahc->seep_config == NULL) { -#ifndef __FreeBSD__ - free(ahc, M_DEVBUF); -#endif free(name, M_DEVBUF); return (NULL); } @@ -4041,17 +4020,13 @@ ahc_free(struct ahc_softc *ahc) case 2: aic_dma_tag_destroy(ahc, ahc->shared_data_dmat); case 1: -#ifndef __linux__ aic_dma_tag_destroy(ahc, ahc->buffer_dmat); -#endif break; case 0: break; } -#ifndef __linux__ aic_dma_tag_destroy(ahc, ahc->parent_dmat); -#endif ahc_platform_free(ahc); ahc_fini_scbdata(ahc); for (i = 0; i < AHC_NUM_TARGETS; i++) { @@ -4085,9 +4060,6 @@ ahc_free(struct ahc_softc *ahc) free(ahc->name, M_DEVBUF); if (ahc->seep_config != NULL) free(ahc->seep_config, M_DEVBUF); -#ifndef __FreeBSD__ - free(ahc, M_DEVBUF); -#endif return; } @@ -4537,9 +4509,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc) newcount = MIN(newcount, (AHC_SCB_MAX_ALLOC - scb_data->numscbs)); for (i = 0; i < newcount; i++) { struct scb_platform_data *pdata; -#ifndef __linux__ int error; -#endif pdata = (struct scb_platform_data *)malloc(sizeof(*pdata), M_DEVBUF, M_NOWAIT); if (pdata == NULL) @@ -4554,12 +4524,11 @@ ahc_alloc_scbs(struct ahc_softc *ahc) next_scb->sg_list_phys = physaddr + sizeof(struct ahc_dma_seg); next_scb->ahc_softc = ahc; next_scb->flags = SCB_FLAG_NONE; -#ifndef __linux__ error = aic_dmamap_create(ahc, ahc->buffer_dmat, /*flags*/0, &next_scb->dmamap); if (error != 0) break; -#endif + next_scb->hscb = &scb_data->hscbs[scb_data->numscbs]; next_scb->hscb->tag = ahc->scb_data->numscbs; aic_timer_init(&next_scb->io_timer); @@ -4860,7 +4829,6 @@ ahc_init(struct ahc_softc *ahc) if ((AHC_TMODE_ENABLE & (0x1 << ahc->unit)) == 0) ahc->features &= ~AHC_TARGETMODE; -#ifndef __linux__ /* DMA tag for mapping buffers into device visible space. */ if (aic_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1, /*boundary*/BUS_SPACE_MAXADDR_32BIT + 1, @@ -4876,7 +4844,6 @@ ahc_init(struct ahc_softc *ahc) &ahc->buffer_dmat) != 0) { return (ENOMEM); } -#endif ahc->init_level++; diff --git a/sys/dev/aic7xxx/aic7xxx.h b/sys/dev/aic7xxx/aic7xxx.h index 617204580f82..5c32b1e227c5 100644 --- a/sys/dev/aic7xxx/aic7xxx.h +++ b/sys/dev/aic7xxx/aic7xxx.h @@ -589,9 +589,7 @@ struct scb { aic_io_ctx_t io_ctx; struct ahc_softc *ahc_softc; scb_flag flags; -#ifndef __linux__ bus_dmamap_t dmamap; -#endif struct scb_platform_data *platform_data; struct sg_map_node *sg_map; struct ahc_dma_seg *sg_list; @@ -932,9 +930,7 @@ typedef void ahc_callback_t (void *); struct ahc_softc { bus_space_tag_t tag; bus_space_handle_t bsh; -#ifndef __linux__ bus_dma_tag_t buffer_dmat; /* dmat for buffer I/O */ -#endif struct scb_data *scb_data; struct scb *next_queued_scb; diff --git a/sys/dev/aic7xxx/aic7xxx_93cx6.c b/sys/dev/aic7xxx/aic7xxx_93cx6.c index be608358f336..82516f1466f7 100644 --- a/sys/dev/aic7xxx/aic7xxx_93cx6.c +++ b/sys/dev/aic7xxx/aic7xxx_93cx6.c @@ -64,16 +64,9 @@ * bit to be sent from the chip. */ -#ifdef __linux__ -#include "aic7xxx_osm.h" -#include "aic7xxx_inline.h" -#include "aic7xxx_93cx6.h" -#else -#include #include #include #include -#endif /* * Right now, we only have to read the SEEPROM. But we make it easier to diff --git a/sys/dev/aic7xxx/aic7xxx_osm.c b/sys/dev/aic7xxx/aic7xxx_osm.c index 04037773c528..a42aeaef7c86 100644 --- a/sys/dev/aic7xxx/aic7xxx_osm.c +++ b/sys/dev/aic7xxx/aic7xxx_osm.c @@ -31,7 +31,6 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic7xxx_osm.c#20 $ */ -#include #include #include diff --git a/sys/dev/aic7xxx/aic7xxx_pci.c b/sys/dev/aic7xxx/aic7xxx_pci.c index 855d13f0db0c..26c11dc5dcaa 100644 --- a/sys/dev/aic7xxx/aic7xxx_pci.c +++ b/sys/dev/aic7xxx/aic7xxx_pci.c @@ -44,16 +44,9 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#78 $ */ -#ifdef __linux__ -#include "aic7xxx_osm.h" -#include "aic7xxx_inline.h" -#include "aic7xxx_93cx6.h" -#else -#include #include #include #include -#endif static __inline uint64_t ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) diff --git a/sys/dev/aic7xxx/aic7xxx_reg_print.c b/sys/dev/aic7xxx/aic7xxx_reg_print.c index 0535cab0d4d6..e0711c1a8e5c 100644 --- a/sys/dev/aic7xxx/aic7xxx_reg_print.c +++ b/sys/dev/aic7xxx/aic7xxx_reg_print.c @@ -6,7 +6,6 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#40 $ */ -#include #include static ahc_reg_parse_entry_t SCSISEQ_parse_table[] = { From nobody Tue Apr 23 21:02:30 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 4VPF1f5sppz5J4CJ; Tue, 23 Apr 2024 21:02:30 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPF1f50lyz4qws; Tue, 23 Apr 2024 21:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713906150; 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=e2VvIn+VOMOyusC1w86cDq4FrXoPzhrTp4SMug/cvzk=; b=L56v7IBCtNvKiYdvrErN1j6vUEq+QWGDjwrRNMDV6Q9QDv20ZvVHkOtVTKLec3/77uqjQJ oYxDt47jUB8RaEen9tgIyDB9kC5EC50fZFEyk8J3Edk4s8Jv100C0MfgtDRiaeQ/VTvseL 8JdGovRXuaAWP9j5CDI75sBe0dkVUgHdPx5E4LLaqqBDcCGFOxiBsZDddDLHo22NhylQw8 eNELRWe6+gR0iTWHmmT7LwH91azm+aiFUkENIW3pSW8NduRQID4xBHVbsulmIl5+aJc9Wt gOPC4NDRf+J7i9dsiL132dOS1Rh8Mg+BmO60UXnoiv5hMFqTitgnQxxSJUSZRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713906150; a=rsa-sha256; cv=none; b=ouwqY4hAVna1Hvcx1tkn0LxYQVmZJ3AXhlw70KnSsLoLvOyPQrP8c9W08WO0ZnjPhVHyEX df8pFPIpa/WIqGWgvMzdoiG2Iwq9ZOygGcIyWfjEMfS8WRCbjwKdw75FvXVMWNbZ1U88gW KfWiIavuFphh0JwEN3IXMhA9JDroyZ4VkS9o0GEhx3LRRsB07nvyeXguucDHVACpFatWf1 cz3QFu0Y4mljauul+nouiYWFZIpnEQ6D8FxSMQOOesYiX2lSXzHmE8tk6jHKxazQOnt7Pd 5NCH7p6AK4TKCQfMHzU74ZoGgpfbfD86us2VNTEGORlvoO+96kNGHZxkrzxC7A== 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=1713906150; 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=e2VvIn+VOMOyusC1w86cDq4FrXoPzhrTp4SMug/cvzk=; b=WF+kAqYiVQhuH7vtBEN0cq+zPXk4QP+kALCK2nWlzOPN1X8in4+D6F4OfV8UenbcESJ9wk mmTXp7vubGdNrJdnHiLWtQvTUm/Tr4wiij/hYwGz45Q8HoNgPa/ylDyh8SHI4O3J+JAaya kmNs76zjYmunX8TaoisDr8TjriUEUSB4KWUTsNiHiVuZlOU62ifWrhYZImUzfVHKyZHBtT 0byVktksl+eIgwdp24nVCrdFZZzg/kzmU1cj+QWgAk0v/LUFHoRa6gJz+Z1sET1tHHLNIv c04WC1BwYvCKbAntlf8zFTTntVMGGPfE8957Z73Qjr9nQ/S5tYDZmc+0Det1ug== 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 4VPF1f4cKvzncM; Tue, 23 Apr 2024 21:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NL2UOx013111; Tue, 23 Apr 2024 21:02:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NL2UYk013108; Tue, 23 Apr 2024 21:02:30 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:02:30 GMT Message-Id: <202404232102.43NL2UYk013108@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: d31b677356d7 - main - ahc(4)/ahd(4): target mode: cancel outstanding AIOs and INOTs 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: d31b677356d74b5747814f98a5151e8ee0595399 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d31b677356d74b5747814f98a5151e8ee0595399 commit d31b677356d74b5747814f98a5151e8ee0595399 Author: HP van Braam AuthorDate: 2024-04-23 20:47:12 +0000 Commit: Warner Losh CommitDate: 2024-04-23 20:57:19 +0000 ahc(4)/ahd(4): target mode: cancel outstanding AIOs and INOTs When disabling a lun there can still be outstanding AIOs and INOTs, when this happens previously the lun would just fail to disable and trying to re-use the lun would break the card. isp(4) in target mode does the same thing when disabling a lun, in testing this allows re-starting of ctld(8) with connected initiators and allows initiators to gracefully resume afterwards. Signed-off-by: HP van Braam Reviewed by: imp, mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1190 --- sys/dev/aic7xxx/aic79xx.c | 13 +++++++++++-- sys/dev/aic7xxx/aic7xxx.c | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 61e65bf253d7..1b1d31769f90 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -9803,6 +9803,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) struct ahd_tmode_tstate *tstate; struct ahd_tmode_lstate *lstate; struct ccb_en_lun *cel; + union ccb *cancel_ccb; cam_status status; u_int target; u_int lun; @@ -10021,12 +10022,20 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) if (SLIST_FIRST(&lstate->accept_tios) != NULL) { printf("ATIOs pending\n"); - ccb->ccb_h.status = CAM_REQ_INVALID; + while ((cancel_ccb = (union ccb *)SLIST_FIRST(&lstate->accept_tios)) != NULL) { + SLIST_REMOVE_HEAD(&lstate->accept_tios, sim_links.sle); + cancel_ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(cancel_ccb); + }; } if (SLIST_FIRST(&lstate->immed_notifies) != NULL) { printf("INOTs pending\n"); - ccb->ccb_h.status = CAM_REQ_INVALID; + while ((cancel_ccb = (union ccb *)SLIST_FIRST(&lstate->immed_notifies)) != NULL) { + SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle); + cancel_ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(cancel_ccb); + }; } if (ccb->ccb_h.status != CAM_REQ_CMP) { diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index b59a35ab5667..1560aa4fe312 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -7253,6 +7253,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) struct ahc_tmode_tstate *tstate; struct ahc_tmode_lstate *lstate; struct ccb_en_lun *cel; + union ccb *cancel_ccb; cam_status status; u_int target; u_int lun; @@ -7520,12 +7521,20 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) if (SLIST_FIRST(&lstate->accept_tios) != NULL) { printf("ATIOs pending\n"); - ccb->ccb_h.status = CAM_REQ_INVALID; + while ((cancel_ccb = (union ccb *)SLIST_FIRST(&lstate->accept_tios)) != NULL) { + SLIST_REMOVE_HEAD(&lstate->accept_tios, sim_links.sle); + cancel_ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(cancel_ccb); + }; } if (SLIST_FIRST(&lstate->immed_notifies) != NULL) { printf("INOTs pending\n"); - ccb->ccb_h.status = CAM_REQ_INVALID; + while ((cancel_ccb = (union ccb *)SLIST_FIRST(&lstate->immed_notifies)) != NULL) { + SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle); + cancel_ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(cancel_ccb); + }; } if (ccb->ccb_h.status != CAM_REQ_CMP) { From nobody Tue Apr 23 21:43: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 4VPFwp3Nlhz5J7TR; Tue, 23 Apr 2024 21:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPFwp2Xhqz4vHh; Tue, 23 Apr 2024 21:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713908602; 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=KISc76H043viJckgZ94GsF5CN5cGWg9EgtNvzVRZnbo=; b=ps1txq/ptg5jfpiVwCesRXrOLkuSH0+D5BojvzTRTLdyxvrx/64Ts5GYk0J9agzDAKEnPz u08LJScQXJ/hxblfm0yLWTVncUrhk1XFnF1ewhLWyX80VzV1NR36HqzoOdv7/zmdcbhs3H lEJBZ3v+Zb0mw0HWah57X3IWQKHsFHoKxrdmqWfRjSIhk54HQ5XphuIU5lX8Bb7q+0XHBM xpchFXGrQNUHj0c67cJcGHPDmPQcCVQXKAuXPqSKT6i8hvgMHQLC+BnJ+i4zGF6NhLpHPK T8Uxwj9hWk037hQ3wvyeI1PGlEirZBNsakXvL9yqRuGtn9Z+vgK6lUtGKEGm1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713908602; a=rsa-sha256; cv=none; b=m6Wt8JgSuP8UJ2cjAsY9SAewDTz3NELVkN9/vNq5D9fzThHLIRokMmqMH541b955Waqg/F 3+TBviI1Og+PWnVewd9DqRcvXhLBqR4U3oIPSJzVQM+nA3mzQZnt9l78jVdEE6uwdmCQyA 7BgVVmJI2XwCG66uM70Ob/YcEIklNYhpwzh/stPn4YlyObAztyHJKrqqsqwipiGLNuZXVF uFnrHt7NgQ5BSgp0AHbkAfE56cQvU6tlOJn38pKqutF77tqnA99amGpBtYai87DiQpQkD4 6AxQRfwgduwxUCcF109LwhqhBxSb4HB7EoyXrmrlL62d9AIRbW1ZKUOahcL/bg== 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=1713908602; 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=KISc76H043viJckgZ94GsF5CN5cGWg9EgtNvzVRZnbo=; b=fgwvPBifM3EsAairKnv2Np/+8BIGd7YTg0FC4abvSNlWSID1ySuT7EYFS5V+qrfeNxZsAX ipfSMW/vF5algliC5u8yyK62vMKh7dJFDShxTC7GdCK5JvBLDnMI8U3qzfsgSKev4Fp4ai VhP0OD72h2v4yMP6zFOn443DK1c4WU1mEOkOaWi7oCXslQ8gvY7RNXi3hgUt605Y/EzL7g k5wwhRN3Dv7UYiFJM2ARpOMk7MNMQ3ggVJS8b6RixR9MgmspPPOEHbNXQFerPsvkey0mlW q1D0y9AYHeVLghfKX+kEc6SfRSywRIy+8dL2O5lpWomFd/RUQ20rWN/OS1TcfQ== 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 4VPFwp2874zpY0; Tue, 23 Apr 2024 21:43:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLhMsc079921; Tue, 23 Apr 2024 21:43:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLhMxd079918; Tue, 23 Apr 2024 21:43:22 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:43:22 GMT Message-Id: <202404232143.43NLhMxd079918@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: 65767e6126a7 - main - sys/net/if_bridge: support non-INET kernels 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: 65767e6126a7e92bc76561b4ffd005cf85ba525e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=65767e6126a7e92bc76561b4ffd005cf85ba525e commit 65767e6126a7e92bc76561b4ffd005cf85ba525e Author: Lexi Winter AuthorDate: 2024-04-23 21:12:57 +0000 Commit: Warner Losh CommitDate: 2024-04-23 21:13:00 +0000 sys/net/if_bridge: support non-INET kernels Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1159 --- sys/net/if_bridge.c | 56 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 1b4ac92b62a3..7b44d85d1fe8 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -403,14 +403,19 @@ static int bridge_ioctl_sproto(struct bridge_softc *, void *); static int bridge_ioctl_stxhc(struct bridge_softc *, void *); static int bridge_pfil(struct mbuf **, struct ifnet *, struct ifnet *, int); +static void bridge_linkstate(struct ifnet *ifp); +static void bridge_linkcheck(struct bridge_softc *sc); + +#ifdef INET static int bridge_ip_checkbasic(struct mbuf **mp); +static int bridge_fragment(struct ifnet *, struct mbuf **mp, + struct ether_header *, int, struct llc *); +#endif /* INET */ + #ifdef INET6 static int bridge_ip6_checkbasic(struct mbuf **mp); #endif /* INET6 */ -static int bridge_fragment(struct ifnet *, struct mbuf **mp, - struct ether_header *, int, struct llc *); -static void bridge_linkstate(struct ifnet *ifp); -static void bridge_linkcheck(struct bridge_softc *sc); + /* * Use the "null" value from IEEE 802.1Q-2014 Table 9-2 @@ -3390,12 +3395,15 @@ bridge_state_change(struct ifnet *ifp, int state) static int bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) { - int snap, error, i, hlen; + int snap, error, i; struct ether_header *eh1, eh2; - struct ip *ip; struct llc llc1; u_int16_t ether_type; pfil_return_t rv; +#ifdef INET + struct ip *ip = NULL; + int hlen = 0; +#endif snap = 0; error = -1; /* Default error if not error == 0 */ @@ -3436,31 +3444,36 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) } /* - * If we're trying to filter bridge traffic, don't look at anything - * other than IP and ARP traffic. If the filter doesn't understand - * IPv6, don't allow IPv6 through the bridge either. This is lame - * since if we really wanted, say, an AppleTalk filter, we are hosed, - * but of course we don't have an AppleTalk filter to begin with. - * (Note that since pfil doesn't understand ARP it will pass *ALL* - * ARP traffic.) + * If we're trying to filter bridge traffic, only look at traffic for + * protocols available in the kernel (IPv4 and/or IPv6) to avoid + * passing traffic for an unsupported protocol to the filter. This is + * lame since if we really wanted, say, an AppleTalk filter, we are + * hosed, but of course we don't have an AppleTalk filter to begin + * with. (Note that since pfil doesn't understand ARP it will pass + * *ALL* ARP traffic.) */ switch (ether_type) { +#ifdef INET case ETHERTYPE_ARP: case ETHERTYPE_REVARP: if (V_pfil_ipfw_arp == 0) return (0); /* Automatically pass */ - break; + /*FALLTHROUGH*/ case ETHERTYPE_IP: +#endif #ifdef INET6 case ETHERTYPE_IPV6: #endif /* INET6 */ break; + default: /* - * Check to see if the user wants to pass non-ip - * packets, these will not be checked by pfil(9) and - * passed unconditionally so the default is to drop. + * We get here if the packet isn't from a supported + * protocol. Check to see if the user wants to pass + * non-IP packets, these will not be checked by pfil(9) + * and passed unconditionally so the default is to + * drop. */ if (V_pfil_onlyip) goto bad; @@ -3492,9 +3505,11 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) */ if (dir == PFIL_IN) { switch (ether_type) { +#ifdef INET case ETHERTYPE_IP: error = bridge_ip_checkbasic(mp); break; +#endif #ifdef INET6 case ETHERTYPE_IPV6: error = bridge_ip6_checkbasic(mp); @@ -3514,6 +3529,7 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) */ rv = PFIL_PASS; switch (ether_type) { +#ifdef INET case ETHERTYPE_IP: /* * Run pfil on the member interface and the bridge, both can @@ -3571,6 +3587,8 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) ip->ip_sum = in_cksum(*mp, hlen); break; +#endif + #ifdef INET6 case ETHERTYPE_IPV6: if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL && (rv = @@ -3628,6 +3646,7 @@ bad: return (error); } +#ifdef INET /* * Perform basic checks on header size since * pfil assumes ip_input has already processed @@ -3728,6 +3747,7 @@ bad: *mp = m; return (-1); } +#endif #ifdef INET6 /* @@ -3783,6 +3803,7 @@ bad: } #endif /* INET6 */ +#ifdef INET /* * bridge_fragment: * @@ -3859,6 +3880,7 @@ dropit: } return (error); } +#endif static void bridge_linkstate(struct ifnet *ifp) From nobody Tue Apr 23 21:43: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 4VPFwq49jkz5J7hg; Tue, 23 Apr 2024 21:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPFwq3dp9z4vMc; Tue, 23 Apr 2024 21:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713908603; 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=7FhTs1Bl8quoMvOhYqKsevabkvO2OfOCQ+fUSp6ezgk=; b=NRnuhcQDGr2mfpS+mmuCzzS9FGacXNeuX7fXLFSS70D0YXS1iud6U0ORF3U6kUZpi1uqd+ IcJYyi1UbrQp5bRczXBRFU0aEGbwZc003gvItc9h3beOM6angPbKzdDn5NY7UV4JQtvgZp T8e6ZEk2MnDNZVCF33AANJEVcKVXCnKtswbO9BeYYQuyuTUkxCvDvkKcoC6lUNXQJ4dypu 8zFFeBSM0ulaD0dWx7xZietceFruPBZV5EfeK8KSjPjiKH/Gldj7b0XysYttHs661/DT70 D1dJvQSwhkJABUrUg5IVe/3/BAha+il65hbRixJn+NOphrnmL0+lqL6rfXIkIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713908603; a=rsa-sha256; cv=none; b=srEQ8Jq7L/cPNMTVYQLDOIwgnn+fdwZDc4odMTA3ZEjYvYmqLTbOIZhnvWoiP8yXSvH0hj uE5UdRCUjTjwmj3CTabZfARdZuZ21nntDCjPHE+4BHch+E22MwZkBoQeJmBKuk+WPRT/jE zfxn9sIFkGFU0WPlvBbJCzDqq1N6XryUwuR6ZjSuUciPEy9VOk5NFIQL8PhWI2aiycDOgx rawt+PXSIKo55E0U7xlkx7sDMI4eND4DOIGls+US14k999/TT38FpNduTAIDxP0R40OP9W YwwyYQizmI9ksUAzcOTDQbEDZMeFim8xhGQjjEBG8B9Jgfy1gHEFG/XMmApRmQ== 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=1713908603; 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=7FhTs1Bl8quoMvOhYqKsevabkvO2OfOCQ+fUSp6ezgk=; b=F42YGLjtRnbW2sRF4ZxsfJX6YfYMXTuwuSTyGL7gX+LiqMx5bG4mr/tgRdE8M5mTUoJz7B lFgWZLOC10UAgrxOXaJ6dseCJuloYozOwR5CK7wyrgRx1jqvbWwVMTVIYZHBu4vQlIGUUb 6xxmGTABMQJmFBnQQYNo5g+hrm6dkBQsFmowV5lwbDsU7A8bEVnGldCenIGjUqvbf8OpdO yFbAoQcV6FQh88F7IO3fbAXoJhXZuQc+z9mMd82HtC72te0M+j1UMsy7uqXsIkU2saA0xv AZ9Dk4vMp1ac+bxfTIWMBZCGdmIuOUIqsn9kdfwcqfM2UJ5ehjPxt7T7CD26JA== 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 4VPFwq3FGQznMc; Tue, 23 Apr 2024 21:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLhN7H079963; Tue, 23 Apr 2024 21:43:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLhNaQ079960; Tue, 23 Apr 2024 21:43:23 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:43:23 GMT Message-Id: <202404232143.43NLhNaQ079960@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: 93c5ba5a83d6 - main - sys/netpfil/pf: fix non-INET module 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: 93c5ba5a83d6e23329e9ca9b9ed72eea613b611d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=93c5ba5a83d6e23329e9ca9b9ed72eea613b611d commit 93c5ba5a83d6e23329e9ca9b9ed72eea613b611d Author: Lexi Winter AuthorDate: 2024-04-22 21:59:12 +0000 Commit: Warner Losh CommitDate: 2024-04-23 21:13:21 +0000 sys/netpfil/pf: fix non-INET module build pf.ko, when built as a module without 'options INET' but with 'options VIMAGE', won't load: link_elf_obj: symbol vnet_entry_in_loopback_mask undefined This is because it uses IN_LOOPBACK(), which in the VIMAGE case uses INET-specific symbols. Fix by making this check conditional on #ifdef INET. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1157 --- sys/netpfil/pf/pf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index cbf5ebfc0e56..0dd4da5f271a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7956,7 +7956,10 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s, if (s != NULL && s->nat_rule.ptr != NULL && s->nat_rule.ptr->action == PF_RDR && - ((pd->af == AF_INET && IN_LOOPBACK(ntohl(pd->dst->v4.s_addr))) || + ( +#ifdef INET + (pd->af == AF_INET && IN_LOOPBACK(ntohl(pd->dst->v4.s_addr))) || +#endif (pd->af == AF_INET6 && IN6_IS_ADDR_LOOPBACK(&pd->dst->v6)))) { /* * If we're redirecting to loopback mark this packet From nobody Tue Apr 23 21:43: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 4VPFwr66Dqz5J7yF; Tue, 23 Apr 2024 21:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPFwr436Zz4vFM; Tue, 23 Apr 2024 21:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713908604; 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=jyerBt/sub8WEl5aRdEXy1wy1oQfOHqkfF+0a9FUuRE=; b=P7G3WDr8+Jm+1OGpir9S3s+L+ByRavxFgZ+7yPCC0MVw42aQChu8skgfoA7q6zbYkSTr1n /pJryYTu3S5o5I6ocO1lhSqCkM56706dlM91c9hPJAcNTbwbZXDPQ/LrPfWm2bODKxuW07 QXdiJjosHX3cGEV1054QTBPF4s0EZCJj+lXBwTcjDaTX2QYGe8I54oRLoR27ntftYsf28G yxHqgJztUXIFuXZeOzP94956qdFfsj4IsCQImqyM/U3oq5tpK7nM5rsUK+BAziVg4ktcie lj/d5osfRZlkkpV+XvzEJ3HLyQPP/rufMEZfzCAJX7hw9MGDPzSzR2s5+NRHHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713908604; a=rsa-sha256; cv=none; b=LDbJ+fsIbFi51/gjKG/kTAMeiGbcaOBgghq/9YaNMn4yiI4XQKOlN4HPxFRxGYXyVo/MGc e410fra7z8Ig0n9M5WbqxSrWXvPT9VXaGuTQ067Toi7Gak84Sc+dwIcXEcwLOzqIBMkkjG A3mx7zHKuHBrQeiU8UBJmrh7Xh7OmE0n21vxrs9doMpLzIhWPCcUAkKo+KRD/znBn8113t l33gcCWb651V+16xbJbtbdXyZXge3VRDOBTKVbd4XDSssgPBv46SkxItpB2mF4eyV/W8+6 aqIfH+34GE8an/YPAknYBMLyQYm3/IogTfRTec9c6bsFDSmDSGPkA/uIWL7w9Q== 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=1713908604; 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=jyerBt/sub8WEl5aRdEXy1wy1oQfOHqkfF+0a9FUuRE=; b=vIk0L9sfN8bCv7vNmnfSsLHqRRv4Nb1ZCZNEOMhqnTktKWonP5pshYuJvN0fFCmYELiMXs JyOdDCD7L0Pp5AvblKXON0eQrWMtelrsG7We5yQv0X9VGNOb/UpknZrIM6EfOjM8OWWkef /NPKYlo//20r87pSdYFCIb981hrrD8yo82M9DRJuuzLNsbIwIv9xPmZuDcacgeKGx71RMw ++y0QJUlfPQ0NEUh+n8GUjnf7sTCWD+Vr1mnzyBUFo8ANSMzKBhUyeWFgv+z0S9UnC8k/0 l9TLI3rkvFPYlzIKLZ2BxN3vOMzGSDbW0jeeGKEzNowbm9xBIVrILqbbmLQhiw== 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 4VPFwr3ccVzpW8; Tue, 23 Apr 2024 21:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLhOLv080008; Tue, 23 Apr 2024 21:43:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLhOd0080005; Tue, 23 Apr 2024 21:43:24 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:43:24 GMT Message-Id: <202404232143.43NLhOd0080005@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: 4f8f9d708e6a - main - sys: add conf/std.debug, generic debugging options 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: 4f8f9d708e6a4143f3b178bfab10d0a9b75ba2fe Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4f8f9d708e6a4143f3b178bfab10d0a9b75ba2fe commit 4f8f9d708e6a4143f3b178bfab10d0a9b75ba2fe Author: Lexi Winter AuthorDate: 2024-04-23 21:11:24 +0000 Commit: Warner Losh CommitDate: 2024-04-23 21:13:31 +0000 sys: add conf/std.debug, generic debugging options The new sys/conf/std.debug contains the list of debugging options enabled by default in -CURRENT, so they don't need to be listed individually in every kernel config. The enabled options are the set of all debug options which were enabled for the GENERIC kernel on any platform. This means some architectures now have debugging options enabled in GENERIC which weren't previously enabled: - amd64: [1] - arm64: [2] - arm: [2]. [3] - i386: [1], [2] - powerpc: [1], [2], [3] - riscv: [2] [1] ALT_BREAK_TO_DEBUGGER is now enabled. [2] BUF_TRACKING, FULL_BUF_TRACKING, and QUEUE_MACRO_DEBUG_TRASH are now enabled. [3] DEADLKRES is now enabled. While here, move the documentation for the (commented out) K*SAN options for amd64 from GENERIC to NOTES. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1124 --- sys/amd64/conf/GENERIC | 20 +------------------- sys/amd64/conf/MINIMAL | 2 ++ sys/amd64/conf/MINIMAL-NODEBUG | 11 +++++++++++ sys/amd64/conf/NOTES | 12 ++++++++++++ sys/arm/conf/std.armv6 | 14 +++----------- sys/arm/conf/std.armv7 | 14 +++----------- sys/arm64/conf/std.arm64 | 11 +---------- sys/conf/std.debug | 17 +++++++++++++++++ sys/i386/conf/GENERIC | 10 +--------- sys/i386/conf/MINIMAL | 2 ++ sys/i386/conf/MINIMAL-NODEBUG | 11 +++++++++++ sys/powerpc/conf/GENERIC | 9 +-------- sys/powerpc/conf/GENERIC64 | 9 +-------- sys/powerpc/conf/GENERIC64LE | 9 +-------- sys/riscv/conf/GENERIC | 11 +---------- 15 files changed, 68 insertions(+), 94 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index f11601891efd..a49a5c006d77 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -94,25 +94,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options BUF_TRACKING # Track buffer history -options DDB # Support DDB. -options FULL_BUF_TRACKING # Track more buffer history -options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options QUEUE_MACRO_DEBUG_TRASH # Trash queue(2) internal pointers on invalidation -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default - -# Kernel Sanitizers -#options COVERAGE # Generic kernel coverage. Used by KCOV -#options KCOV # Kernel Coverage Sanitizer -# Warning: KUBSAN can result in a kernel too large for loader to load -#options KUBSAN # Kernel Undefined Behavior Sanitizer -#options KCSAN # Kernel Concurrency Sanitizer +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index fb6d75a2ae1a..c413590586e6 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -78,6 +78,8 @@ options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use (turn off in stable branch): +include ../../conf/std.debug # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel diff --git a/sys/amd64/conf/MINIMAL-NODEBUG b/sys/amd64/conf/MINIMAL-NODEBUG new file mode 100644 index 000000000000..35281b2212d9 --- /dev/null +++ b/sys/amd64/conf/MINIMAL-NODEBUG @@ -0,0 +1,11 @@ +# +# MINIMAL-NODEBUG -- Non-debug MINIMAL kernel. +# +# This is the MINIMAL equivalent to GENERIC-NODEBUG. + +#NO_UNIVERSE + +include MINIMAL +include "../../conf/std.nodebug" + +ident MINIMAL-NODEBUG diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index 31db96e6d0e2..a6f12aec7dc8 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -159,3 +159,15 @@ options KSTACK_PAGES=5 # Enable detailed accounting by the PV entry allocator. options PV_STATS + +##################################################################### +# Kernel sanitizers + +#options COVERAGE # Generic kernel coverage. Used by KCOV +#options KCOV # Kernel Coverage Sanitizer +# Warning: KUBSAN can result in a kernel too large for loader to load +#options KUBSAN # Kernel Undefined Behavior Sanitizer +#options KCSAN # Kernel Concurrency Sanitizer +#options KASAN # Kernel Address Sanitizer +#options KCSAN # Kernel Concurrency Sanitizer +#options KMSAN # Kernel Memory Sanitizer diff --git a/sys/arm/conf/std.armv6 b/sys/arm/conf/std.armv6 index b4b83d66809a..9ae37eab90d5 100644 --- a/sys/arm/conf/std.armv6 +++ b/sys/arm/conf/std.armv6 @@ -63,18 +63,10 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. +options USB_DEBUG # Enable usb debug support code + # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -options GDB # Support remote GDB -#options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence -options USB_DEBUG # Enable usb debug support code -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Optional extras, never enabled by default: #options BOOTVERBOSE diff --git a/sys/arm/conf/std.armv7 b/sys/arm/conf/std.armv7 index 80b4e898bfdc..72f22efd0c28 100644 --- a/sys/arm/conf/std.armv7 +++ b/sys/arm/conf/std.armv7 @@ -63,18 +63,10 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. +options USB_DEBUG # Enable usb debug support code + # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -options GDB # Support remote GDB -#options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence -options USB_DEBUG # Enable usb debug support code -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Optional extras, never enabled by default: #options BOOTVERBOSE diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index 1b6b0e8b1812..cb3c591947fc 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -73,16 +73,7 @@ options PERTHREAD_SSP # Per-thread SSP canary options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB. -options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel Sanitizers #options COVERAGE # Generic kernel coverage. Used by KCOV diff --git a/sys/conf/std.debug b/sys/conf/std.debug new file mode 100644 index 000000000000..53789f269b80 --- /dev/null +++ b/sys/conf/std.debug @@ -0,0 +1,17 @@ +# +# std.debug -- Enable debug options for -CURRENT. +# + +options BUF_TRACKING # Track buffer history +options DDB # Support DDB. +options FULL_BUF_TRACKING # Track more buffer history +options GDB # Support remote GDB. +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options QUEUE_MACRO_DEBUG_TRASH # Trash queue(2) internal pointers on invalidation +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index b5898ed94b81..7bd01d4e60e7 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -88,15 +88,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB. -options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index e27bb68e31fe..b29a179d2bdf 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -86,6 +86,8 @@ options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use (turn off in stable branch): +include ../../conf/std.debug # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel diff --git a/sys/i386/conf/MINIMAL-NODEBUG b/sys/i386/conf/MINIMAL-NODEBUG new file mode 100644 index 000000000000..35281b2212d9 --- /dev/null +++ b/sys/i386/conf/MINIMAL-NODEBUG @@ -0,0 +1,11 @@ +# +# MINIMAL-NODEBUG -- Non-debug MINIMAL kernel. +# +# This is the MINIMAL equivalent to GENERIC-NODEBUG. + +#NO_UNIVERSE + +include MINIMAL +include "../../conf/std.nodebug" + +ident MINIMAL-NODEBUG diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index 47c84956facd..bb7865301fcb 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -91,14 +91,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -#options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 9d2de9c8095b..b077cf3f2feb 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -101,14 +101,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -#options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 6ca1a01e5969..f090cd47ecf8 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -97,14 +97,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -#options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index ca71f7423cfa..52edc01b5c89 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -156,17 +156,8 @@ device spigen options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB. -options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence +include "std.debug" # options EARLY_PRINTF=sbi -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options EKCD # Support for encrypted kernel dumps From nobody Tue Apr 23 21:43:25 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 4VPFwt13n5z5J83f; Tue, 23 Apr 2024 21:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPFws4wSqz4vjH; Tue, 23 Apr 2024 21:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713908605; 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=pAZcobxdaQuqTjV7QDU5pzkW1aL+/7DxJ5oVXraThig=; b=XHQDboZYW0y8xQW8gpuJ9wGoJibQNOBCvLWIuEYzvIwVVRUt80b6FilzzJw/Z0VEJguhAM kgp34oKTDwVkSM5YQj0zZgssQ2ff9aFV1sqQdE4OqUR/aQsiBIQpUEz+ICMIqMOzsAmriP HkFIRQmUvvL/0qKpD5YCG8XAIJ3EUEIxrkvEZArINkgpdmmqU+Ezt8ErdFzPTGd28isRQG qGCESIhlZcX/2xNROsZigqdjxy4plEdE0Ks542Ib2ebJPomAxxSPzwpqt4MouvQdKPGFiG 4HBC0nqg+DU5Xyo+B6M9P5KiG+CVZI72pfv5eOc321w38/vOgD3pkc4D5CrXwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713908605; a=rsa-sha256; cv=none; b=KJJUyrkP68EKP12oGOESslaxVaJ0Gye7SXtlxtDD+IJ6fTFmHp0XdRPQcK8CLQCJvDeslj BUg36iSZaGrKI+HtkZp7AU8nUxedAzeeETEatknkGiVrt1iDOimrCEqu6coPVGtUuNXt80 izEbGle14wgg0F1eMe8hp7ozc6/+IHkh+qEj4uEsTGDtVh+b6RvP6Geq7LTtOY95IIbD4L XXbs8sVlHatgiWA135GO4RYcAbPkSTNbvGp43xTfMJ8qjXcmu2nYQO3RLpMinP3rXg+hP/ DzmPf/4kzT60SVsRJbtujLzAyr3ilWOx31Lo48s8HUJGmDiQLrdBtGQr6x0CTg== 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=1713908605; 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=pAZcobxdaQuqTjV7QDU5pzkW1aL+/7DxJ5oVXraThig=; b=WNJPTtxN9O1CcGPpjnXzp1Ryhq0r+XoaU9SdknYt+jkImxGUn8Tqz8wUI7Y6Hs9xK+S5gm p75sKe/cYRGzx3Qqel6DqcN034dXBgL3A3xx2Kla8/vbOmQvwiRVtC5DHVk3J+FxbwNhnQ /aWuKhP8wSoomREs+CQJ6cdySSWs9+EszMw1J0l2NhxwBOcQiaAeUHlKtvurX/TIv6zot9 IuhoZRW9OzafqFpoQKLkHhdviKL52ewaJcpqm9os1hkXqOEMKMUHG0hQ6Mf9ZZc9UVa9ux 1p+cKhvc1b77Si9VimpAp/HDL+w6DZzo3e8iBVe3Tog6qluka0ugx3N6lgmZbQ== 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 4VPFws4Y23zpW9; Tue, 23 Apr 2024 21:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLhPUc080061; Tue, 23 Apr 2024 21:43:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLhP67080058; Tue, 23 Apr 2024 21:43:25 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:43:25 GMT Message-Id: <202404232143.43NLhP67080058@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: 8a8daeafaf70 - main - sys/*/conf: do not use "../../conf/" when including std.* 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: 8a8daeafaf7094fd6e65f93fa4e7687591e23fc2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a8daeafaf7094fd6e65f93fa4e7687591e23fc2 commit 8a8daeafaf7094fd6e65f93fa4e7687591e23fc2 Author: Lexi Winter AuthorDate: 2024-04-23 21:11:24 +0000 Commit: Warner Losh CommitDate: 2024-04-23 21:13:31 +0000 sys/*/conf: do not use "../../conf/" when including std.* Since config(8) searches sys/conf by default, there's no need to specify the full relative path here; replace it by the filename alone. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1124 --- sys/amd64/conf/GENERIC | 2 +- sys/amd64/conf/GENERIC-NODEBUG | 2 +- sys/amd64/conf/MINIMAL | 2 +- sys/amd64/conf/MINIMAL-NODEBUG | 2 +- sys/arm/conf/GENERIC-NODEBUG | 2 +- sys/arm/conf/std.armv6 | 2 +- sys/arm/conf/std.armv7 | 2 +- sys/arm64/conf/GENERIC-MMCCAM-NODEBUG | 2 +- sys/arm64/conf/GENERIC-NODEBUG | 2 +- sys/arm64/conf/std.arm64 | 2 +- sys/i386/conf/GENERIC | 2 +- sys/i386/conf/GENERIC-NODEBUG | 2 +- sys/i386/conf/MINIMAL | 2 +- sys/i386/conf/MINIMAL-NODEBUG | 2 +- sys/powerpc/conf/GENERIC | 2 +- sys/powerpc/conf/GENERIC-NODEBUG | 2 +- sys/powerpc/conf/GENERIC64 | 2 +- sys/powerpc/conf/GENERIC64-NODEBUG | 2 +- sys/powerpc/conf/GENERIC64LE | 2 +- sys/powerpc/conf/GENERIC64LE-NODEBUG | 2 +- sys/riscv/conf/GENERIC-NODEBUG | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index a49a5c006d77..4a84e8e56596 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -94,7 +94,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/amd64/conf/GENERIC-NODEBUG b/sys/amd64/conf/GENERIC-NODEBUG index 85ff32ea329b..1939b0efd352 100644 --- a/sys/amd64/conf/GENERIC-NODEBUG +++ b/sys/amd64/conf/GENERIC-NODEBUG @@ -26,6 +26,6 @@ # include GENERIC -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC-NODEBUG diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index c413590586e6..3447cbc366fb 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -79,7 +79,7 @@ options INCLUDE_CONFIG_FILE # Include this file in kernel options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel diff --git a/sys/amd64/conf/MINIMAL-NODEBUG b/sys/amd64/conf/MINIMAL-NODEBUG index 35281b2212d9..7b7c22bbcaf6 100644 --- a/sys/amd64/conf/MINIMAL-NODEBUG +++ b/sys/amd64/conf/MINIMAL-NODEBUG @@ -6,6 +6,6 @@ #NO_UNIVERSE include MINIMAL -include "../../conf/std.nodebug" +include "std.nodebug" ident MINIMAL-NODEBUG diff --git a/sys/arm/conf/GENERIC-NODEBUG b/sys/arm/conf/GENERIC-NODEBUG index 58f78036470d..0b3199245187 100644 --- a/sys/arm/conf/GENERIC-NODEBUG +++ b/sys/arm/conf/GENERIC-NODEBUG @@ -26,6 +26,6 @@ # include GENERIC -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC-NODEBUG diff --git a/sys/arm/conf/std.armv6 b/sys/arm/conf/std.armv6 index 9ae37eab90d5..a24227fc838f 100644 --- a/sys/arm/conf/std.armv6 +++ b/sys/arm/conf/std.armv6 @@ -66,7 +66,7 @@ options KDB_TRACE # Print a stack trace for a panic. options USB_DEBUG # Enable usb debug support code # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Optional extras, never enabled by default: #options BOOTVERBOSE diff --git a/sys/arm/conf/std.armv7 b/sys/arm/conf/std.armv7 index 72f22efd0c28..4ef60c331212 100644 --- a/sys/arm/conf/std.armv7 +++ b/sys/arm/conf/std.armv7 @@ -66,7 +66,7 @@ options KDB_TRACE # Print a stack trace for a panic. options USB_DEBUG # Enable usb debug support code # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Optional extras, never enabled by default: #options BOOTVERBOSE diff --git a/sys/arm64/conf/GENERIC-MMCCAM-NODEBUG b/sys/arm64/conf/GENERIC-MMCCAM-NODEBUG index 6a475c8c6325..b2e865129012 100644 --- a/sys/arm64/conf/GENERIC-MMCCAM-NODEBUG +++ b/sys/arm64/conf/GENERIC-MMCCAM-NODEBUG @@ -9,6 +9,6 @@ #NO_UNIVERSE include GENERIC-MMCCAM -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC-MMCCAM-NODEBUG diff --git a/sys/arm64/conf/GENERIC-NODEBUG b/sys/arm64/conf/GENERIC-NODEBUG index a0dbb030c109..086942dfaab1 100644 --- a/sys/arm64/conf/GENERIC-NODEBUG +++ b/sys/arm64/conf/GENERIC-NODEBUG @@ -26,6 +26,6 @@ # include GENERIC -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC-NODEBUG diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index cb3c591947fc..cc4a5acbb314 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -73,7 +73,7 @@ options PERTHREAD_SSP # Per-thread SSP canary options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Kernel Sanitizers #options COVERAGE # Generic kernel coverage. Used by KCOV diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 7bd01d4e60e7..b32986e13769 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -88,7 +88,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/i386/conf/GENERIC-NODEBUG b/sys/i386/conf/GENERIC-NODEBUG index 64b9ecb8a332..ea07613a796f 100644 --- a/sys/i386/conf/GENERIC-NODEBUG +++ b/sys/i386/conf/GENERIC-NODEBUG @@ -26,6 +26,6 @@ # include GENERIC -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC-NODEBUG diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index b29a179d2bdf..c70fd27a5c69 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -87,7 +87,7 @@ options INCLUDE_CONFIG_FILE # Include this file in kernel options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel diff --git a/sys/i386/conf/MINIMAL-NODEBUG b/sys/i386/conf/MINIMAL-NODEBUG index 35281b2212d9..7b7c22bbcaf6 100644 --- a/sys/i386/conf/MINIMAL-NODEBUG +++ b/sys/i386/conf/MINIMAL-NODEBUG @@ -6,6 +6,6 @@ #NO_UNIVERSE include MINIMAL -include "../../conf/std.nodebug" +include "std.nodebug" ident MINIMAL-NODEBUG diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index bb7865301fcb..6083b4d2baca 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -91,7 +91,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC-NODEBUG b/sys/powerpc/conf/GENERIC-NODEBUG index 9d069a41acc1..0761376a8160 100644 --- a/sys/powerpc/conf/GENERIC-NODEBUG +++ b/sys/powerpc/conf/GENERIC-NODEBUG @@ -26,6 +26,6 @@ # include GENERIC -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC-NODEBUG diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index b077cf3f2feb..26b308a4e06e 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -101,7 +101,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC64-NODEBUG b/sys/powerpc/conf/GENERIC64-NODEBUG index 2659899940ef..a4c3dbd856e2 100644 --- a/sys/powerpc/conf/GENERIC64-NODEBUG +++ b/sys/powerpc/conf/GENERIC64-NODEBUG @@ -26,6 +26,6 @@ # include GENERIC64 -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC64-NODEBUG diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index f090cd47ecf8..84c27690211d 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -97,7 +97,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -include ../../conf/std.debug +include "std.debug" # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC64LE-NODEBUG b/sys/powerpc/conf/GENERIC64LE-NODEBUG index ab48bf7a0547..fd2d3ca84a19 100644 --- a/sys/powerpc/conf/GENERIC64LE-NODEBUG +++ b/sys/powerpc/conf/GENERIC64LE-NODEBUG @@ -26,6 +26,6 @@ # include GENERIC64LE -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC64LE-NODEBUG diff --git a/sys/riscv/conf/GENERIC-NODEBUG b/sys/riscv/conf/GENERIC-NODEBUG index ca4d07fbd2da..e4f4b41f2c41 100644 --- a/sys/riscv/conf/GENERIC-NODEBUG +++ b/sys/riscv/conf/GENERIC-NODEBUG @@ -26,6 +26,6 @@ # include GENERIC -include "../../conf/std.nodebug" +include "std.nodebug" ident GENERIC-NODEBUG From nobody Tue Apr 23 21:43: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 4VPFwv0bh8z5J81c; Tue, 23 Apr 2024 21:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPFwt5zkYz4vR4; Tue, 23 Apr 2024 21:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713908606; 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=PLGhiVlITbbxMh04DJY2Bp71GBDcO6grv5CBL5eAnkY=; b=CAEbbLPh2BbzQuK/6bju6FcOZA6oo2+P71gmLcN83y7Lioe4A2onu/MiPUUFrwp8iy4qMm VqIrwnMkzNaA7UYN9YMuFiQaTFft+mAJF3sOhVhF0dFz/ib3XkTlezY6TY8VbfqVF9DaOR lS0IPbeoqv9gDRBvM6L16uO4SQVz/C6YQ6tFZxLY29v7M/ITYZ4selqnLMk5YhTpiQpBhc Vqp6ZcHwuhSoVIsPZ3o9jTULfT31J4bnlywles8NF8kQKroG+kj/hzSPwq3D5fezIrysAr YT/MQplhy5Pra8BaJCkIFhev5QO9EnzrKZIGCljiM+24osghztx4Q3zY30L70w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713908606; a=rsa-sha256; cv=none; b=IyYphtlKmxf31Vj7gFihio4Oeiqk90vkvVtXczxn5AnzoyfT2ODI6avDVUnZsLgV73+tKG IlLSrRY2au/eOMiiWVbrydhfPw0/CJP+aWQyAFEmeHCtRdQIdmK8FWVR5fkkr8Yb5wYoFH yLtMsHsjwnmJqM2ix+fNe9f1lI4/aghAzi+KTP/ckoQDzT+1DLznf/afqu3P+yKqia4SyK 67JkyIFgOBX6XZLu+yUdHTdOXHAKBdhg5NpagbhAykqBF2Gftk+OAM3w9ea6TIK3vJaic5 EJFSFhELwuXuFOKE4cmEczXYRpYS3s1rlTpNluSXz3ZZhsJhwypDqC/9wlMgQQ== 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=1713908606; 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=PLGhiVlITbbxMh04DJY2Bp71GBDcO6grv5CBL5eAnkY=; b=XSubsEP1ZYdt6ufEw+Th2/VBQrtuAfvcbGInkQHoOT1tAQtfBLEYVEnnB/q3D0VPZOZnGv YFf1q5m/0+iYp/qhmGn5CiZIIl9bNYVh008zDGqvLfpzkqekoNJXwdDTbvmyQvREIMyfiY 2b+szwaZOhQpuI0jzA54HjjnZPHVL7KJAEk5ETOVJ3DQINYZ0GAqB70vsVfNZ/JZRh1gJz tjcM7PcA//79/p4d3Qp1g2B1n5Gf3nDaBPhmhkkc3z5Jm6HoHSryVHzFupxSE8p9RPOtsM YxPYQQNdxAJdg3bo7Dw+FVJVNj+NkTSCbbqqHeGGTX1n5Em0liL0+yC3eqD97w== 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 4VPFwt5cHNzpSK; Tue, 23 Apr 2024 21:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLhQ7o080118; Tue, 23 Apr 2024 21:43:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLhQNB080115; Tue, 23 Apr 2024 21:43:26 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:43:26 GMT Message-Id: <202404232143.43NLhQNB080115@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: 14e3f2d8d3eb - main - nanobsd: Set a GPT label for EFI and cfg partitions 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: 14e3f2d8d3eb6f47556e59bee3e2004ac9a9d7e6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=14e3f2d8d3eb6f47556e59bee3e2004ac9a9d7e6 commit 14e3f2d8d3eb6f47556e59bee3e2004ac9a9d7e6 Author: Jose Luis Duran AuthorDate: 2024-04-23 21:12:45 +0000 Commit: Warner Losh CommitDate: 2024-04-23 21:13:35 +0000 nanobsd: Set a GPT label for EFI and cfg partitions Use efiboot0 for the EFI partition, the nomenclature efiboot + #index was taken from bsdinstall (zfsboot). Use cfg for the cfg partition. Poudriere firmware images are already using this label. PR: 278480 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1187 --- tools/tools/nanobsd/embedded/common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/nanobsd/embedded/common b/tools/tools/nanobsd/embedded/common index 17caef798af2..bcb1061df629 100644 --- a/tools/tools/nanobsd/embedded/common +++ b/tools/tools/nanobsd/embedded/common @@ -293,9 +293,9 @@ create_diskimage_mbr ( ) ( # p1 is boot for uefi, p2 is boot for gpt, p3 is cfg, p4 is / # and p5 is alt-root (after resize) mkimg -a 2 ${fmtarg} ${bootmbr} -s gpt \ - -p efi:=${NANO_WORLDDIR}/boot/efiboot.img \ + -p efi/efiboot0:=${NANO_WORLDDIR}/boot/efiboot.img \ -p freebsd-boot:=${NANO_WORLDDIR}/boot/gptboot \ - -p ${p3}:=${NANO_LOG}/_.p3 \ + -p ${p3}/cfg:=${NANO_LOG}/_.p3 \ -p ${p4}:=${NANO_LOG}/_.p4 \ -o ${out} ;; From nobody Tue Apr 23 21:43: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 4VPFww2kFkz5J81h; Tue, 23 Apr 2024 21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPFwv6z0wz4vgC; Tue, 23 Apr 2024 21:43:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713908608; 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=8BsmIAZrMEVMPyxVVP46Q+whkfQa0gke4R4LVZnQmeo=; b=ZaihPr8Jezc4rCdsBJ4jKtrmqKrrI9hdAn1fkwOOGHWDB/6icABRI75QoHU9BPWYw0QVMf LntVaHYRCw34Z6C4QWBpS3WUQe9n+p2N4sULjo0JOsGK7rcGFVsWIxT/HZRnrPUv89tV5o tda9LnAe1/BRRQAJ10GqX/pHTudTNWnMnGzLfk2/qWDXfqym7K8Ac4hMCCEbUqAH5cbPDS dqAj54tD95Lv0qq7pzM77chG88ODBeIFvpEvT2pufB8plPzxlNtF5R2S98y8EwHKJ2OyHQ LG7drp+HseyyWXTJGDF1Dvr5z0NNcHMQzjYIf/Xzw3SBiwiopSf+cM0xAybfWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713908608; a=rsa-sha256; cv=none; b=eywGnNcMpF7naqyiwZHOZWei8uAC3k3/B+4wseUL1Kn2XHoB8Mhr5mxt1r00bhBpM+pjNy RBuKfJ6KoXScAb7l+2emgsyokNiES55RT8FB5tdWNLwKMlsDGbvqsm1wIj5oCYM50erTAH 5A2+1u/GTb1VT4EAMFZ6nvreu0t8i2INlhWi3qNKKhSgEbjzMUZbcmOJhAPQXjWkdVRVp4 IP0VskEvsDQ6l5x7DzhVCZrfOHiWTiPD2bA+pe7qdGINUhb7rDkfe/JgTlL8PKvsdCzKg0 uWhxmV9sukw/2r2woNLJsMIO9FckM2v7GL2wO+aGrcANCJHxm4iIKoi62UUeAw== 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=1713908608; 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=8BsmIAZrMEVMPyxVVP46Q+whkfQa0gke4R4LVZnQmeo=; b=iKKSBvs989Dq8nhEMg3wDvHxKwTx9YkU3j9CUru5P57tOltsLBy++L5qNQncU0dmw3vEk2 NxzCOEwhhmNXd0+8N/Jya4JbEUYboIidhstCznSaeAqRg35LfPt/8nK31sZHXEWG/XDCjD h5W0uW/7QAW/C2Ii8AtX91onGumnNugI5rngk5LuGEcgauPELGdkMS464H7hh+qI9iJ9Hr ZqzYJNXE4367RlTcaipLFNyJmbf3/QVYzjlNS+SJD/9BwpoGWOceRp8uPVicnLyEwfXHha tyhuOTMI13atJ6tyJQJgMZu4BMT4TXbgp7Fit9KKfQS4TR/3V2VrZjvG1o5Wlg== 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 4VPFwv6ZN2zpSL; Tue, 23 Apr 2024 21:43:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLhR7e080169; Tue, 23 Apr 2024 21:43:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLhRJE080166; Tue, 23 Apr 2024 21:43:27 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:43:27 GMT Message-Id: <202404232143.43NLhRJE080166@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: 4f223e0da7b4 - main - release: Change vmimage EFI GPT label 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: 4f223e0da7b4a055d9416f9161b44ffed765a9c3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4f223e0da7b4a055d9416f9161b44ffed765a9c3 commit 4f223e0da7b4a055d9416f9161b44ffed765a9c3 Author: Jose Luis Duran AuthorDate: 2024-04-23 21:12:30 +0000 Commit: Warner Losh CommitDate: 2024-04-23 21:13:40 +0000 release: Change vmimage EFI GPT label This matches the default bsdinstall nomenclature. PR: 278480 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1188 --- release/tools/vmimage.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 0346e33b81b4..93658b9a03da 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -301,11 +301,11 @@ vm_create_disk() { # Create an ESP espfilename=$(mktemp /tmp/efiboot.XXXXXX) make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi - BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}" + BOOTPARTS="${BOOTPARTS} -p efi/efiboot0:=${espfilename}" # Add this to fstab mkdir -p ${DESTDIR}/boot/efi - echo "/dev/${ROOTLABEL}/efiesp /boot/efi msdosfs rw 2 2" \ + echo "/dev/${ROOTLABEL}/efiboot0 /boot/efi msdosfs rw 2 2" \ >> ${DESTDIR}/etc/fstab fi From nobody Tue Apr 23 21:50: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 4VPG4l06WWz5J8hK; Tue, 23 Apr 2024 21:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPG4k6llTz4y91; Tue, 23 Apr 2024 21:50:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713909014; 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=ZnEQbRYB8LDmv7+uRBGeXKhNJBYoP6K2VYUfk6Acrkc=; b=mbXLsMI6d4paitzsi7u1WbHfA+icBRoadcWw+m0yb8P1bYlIZMDOtAxnknVqFb8ifOSXPO f0nB5rL541P01NOTZBy2UXrQufwQveDXqrR/VWzbwLuV5IIAoKCEKJmtiqiAIsACl1rMs0 0voCGBWCFE3jPsIqgRzheeWsHHQyZ9ogzYi1SpDNFhw5GNXg0yGsoDOzoHs6lHoKvKYx+H c1G4t9l0hTVRXO4gRXvH1jWQHFvqCjLS/HowX8C9EN2Ru8REJlvstJd3r32zWDB5CvWn1A cuAJsPAgRNge+sSgFOqyCBdAieeRda/gzD+UrBZQWjljb+fbRTpUUxFQeat1WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713909014; a=rsa-sha256; cv=none; b=lYWz53Lk2raRsVi+9bU0XMBH6dhxgTxTVwqtbWw9ivH7wclE3f+F8HkE9a/dz3W3kO6IWR aQACebTR81ghJD0HnWPgA+kAiB5/vv9xo/GpkYmis0GrT7fmydgTo+cHz5SA49AvNGx5p4 XighCfzaHlMsHmgznySMB/BXcR9wDN9/CXi2jMXp/7n5HEEAmfj2/kZtDuR9nkdvh6WIHg evFZcXk9s7vDSwgZw3xOMyc2wc0V2xSQ0VlPIxhexoXpq6y2jO5tV8DeA3QGVAI4HQy0Ex NlsR9DrmpvGyTyle7qjTFhXOMRlMSSZOQ/mYAGxdiBDdIE0LwtCdPfH2Z54W6Q== 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=1713909014; 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=ZnEQbRYB8LDmv7+uRBGeXKhNJBYoP6K2VYUfk6Acrkc=; b=MvftF+LwsKa+zouDJvUznxZdCG5ihxwfEOXjsZICvDUCzupUgbkTmZFlZzdAbxP5CPOLNx 4g54041J1Oeox6GklZIDpTEKsiQdDZJ6Y0Ply0cL2kEcf99E3h1ZrgjR9bODihpgTSUl/k DMGROgK2RByBMNv5NKJVCXIxQ/AWdbrVGdXLlDUnA0UChBW5l0/wYZD/Nvs6D1iCjJIzor oMy1aeg4/hA8MHhjqZWUJ6ejunyFb5LEg4oKEIuKO2nOFJLSG+sftQIaC/fPuIiMoCPjBa zY1CdWTD3fvw/5WkKPAbnlMskG+CoywtB5804hQ4kJM6O91BAKTEP4Ze3kJsLA== 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 4VPG4k616tzntS; Tue, 23 Apr 2024 21:50:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLoEPJ087801; Tue, 23 Apr 2024 21:50:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLoEsI087796; Tue, 23 Apr 2024 21:50:14 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:50:14 GMT Message-Id: <202404232150.43NLoEsI087796@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: cf04a7775a4e - main - swapon: Do not overwrite Linux swap 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf04a7775a4e8ff6fd28c768be9daa3d83dd382e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cf04a7775a4e8ff6fd28c768be9daa3d83dd382e commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e Author: Ricardo Branco AuthorDate: 2024-04-23 21:47:56 +0000 Commit: Warner Losh CommitDate: 2024-04-23 21:48:01 +0000 swapon: Do not overwrite Linux swap header Reviewed by: imp, jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1084 --- sbin/swapon/Makefile | 2 ++ sbin/swapon/extern.h | 5 ++++ sbin/swapon/swaplinux.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ sbin/swapon/swapon.c | 54 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 126 insertions(+), 1 deletion(-) diff --git a/sbin/swapon/Makefile b/sbin/swapon/Makefile index 27808aed5857..930e938e5b05 100644 --- a/sbin/swapon/Makefile +++ b/sbin/swapon/Makefile @@ -6,6 +6,8 @@ LINKS= ${BINDIR}/swapon ${BINDIR}/swapoff LINKS+= ${BINDIR}/swapon ${BINDIR}/swapctl MLINKS= swapon.8 swapoff.8 MLINKS+=swapon.8 swapctl.8 +SRCS= swapon.c swaplinux.c +HDRS+= extern.h LIBADD= util diff --git a/sbin/swapon/extern.h b/sbin/swapon/extern.h new file mode 100644 index 000000000000..cb33dbbee953 --- /dev/null +++ b/sbin/swapon/extern.h @@ -0,0 +1,5 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + */ + +int is_linux_swap(const char *); diff --git a/sbin/swapon/swaplinux.c b/sbin/swapon/swaplinux.c new file mode 100644 index 000000000000..d01a94345e68 --- /dev/null +++ b/sbin/swapon/swaplinux.c @@ -0,0 +1,66 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include + +#include "extern.h" + +/* + * Definitions and structure taken from + * https://github.com/util-linux/util-linux/blob/master/include/swapheader.h + */ + +#define SWAP_VERSION 1 +#define SWAP_UUID_LENGTH 16 +#define SWAP_LABEL_LENGTH 16 +#define SWAP_SIGNATURE "SWAPSPACE2" +#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1) + +struct swap_header_v1_2 { + char bootbits[1024]; /* Space for disklabel etc. */ + uint32_t version; + uint32_t last_page; + uint32_t nr_badpages; + unsigned char uuid[SWAP_UUID_LENGTH]; + char volume_name[SWAP_LABEL_LENGTH]; + uint32_t padding[117]; + uint32_t badpages[1]; +}; + +typedef union { + struct swap_header_v1_2 header; + struct { + uint8_t reserved[4096 - SWAP_SIGNATURE_SZ]; + char signature[SWAP_SIGNATURE_SZ]; + } tail; +} swhdr_t; + +#define sw_version header.version +#define sw_volume_name header.volume_name +#define sw_signature tail.signature + +int +is_linux_swap(const char *name) +{ + uint8_t buf[4096]; + swhdr_t *hdr = (swhdr_t *) buf; + int fd; + + fd = open(name, O_RDONLY); + if (fd == -1) + return (-1); + + if (read(fd, buf, 4096) != 4096) { + close(fd); + return (-1); + } + close(fd); + + return (hdr->sw_version == SWAP_VERSION && + !memcmp(hdr->sw_signature, SWAP_SIGNATURE, SWAP_SIGNATURE_SZ)); +} diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 26a7dc22654a..0f2ad1f5e213 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -54,10 +54,15 @@ #include #include +#include "extern.h" + +#define _PATH_GNOP "/sbin/gnop" + static void usage(void) __dead2; static const char *swap_on_off(const char *, int, char *); static const char *swap_on_off_gbde(const char *, int); static const char *swap_on_off_geli(const char *, char *, int); +static const char *swap_on_off_linux(const char *, int); static const char *swap_on_off_md(const char *, char *, int); static const char *swap_on_off_sfile(const char *, int); static void swaplist(int, int, int); @@ -250,8 +255,13 @@ swap_on_off(const char *name, int doingall, char *mntops) return (swap_on_off_geli(name, mntops, doingall)); } - /* Swap on special file. */ free(basebuf); + + /* Linux swap */ + if (is_linux_swap(name)) + return (swap_on_off_linux(name, doingall)); + + /* Swap on special file. */ return (swap_on_off_sfile(name, doingall)); } @@ -466,6 +476,48 @@ swap_on_off_geli(const char *name, char *mntops, int doingall) return (swap_on_off_sfile(name, doingall)); } +static const char * +swap_on_off_linux(const char *name, int doingall) +{ + const char *ret; + char *nopname; + size_t nopnamelen; + int error; + + if (which_prog == SWAPON) { + /* Skip the header for Linux swap partitions */ + error = run_cmd(NULL, "%s create -o 4096 %s", _PATH_GNOP, + name); + if (error) { + warnx("gnop (create) error: %s", name); + return (NULL); + } + } + + /* Append ".nop" to name */ + nopnamelen = strlen(name) + sizeof(".nop"); + nopname = (char *) malloc(nopnamelen); + if (nopname == NULL) + err(1, "malloc()"); + (void)strlcpy(nopname, name, nopnamelen); + (void)strlcat(nopname, ".nop", nopnamelen); + + ret = swap_on_off_sfile(nopname, doingall); + + if (which_prog == SWAPOFF) { + error = run_cmd(NULL, "%s destroy %s", _PATH_GNOP, nopname); + if (error) { + warnx("gnop (destroy) error: %s", name); + free(nopname); + return (NULL); + } + } + + free(nopname); + + return (ret); +} + static const char * swap_on_off_md(const char *name, char *mntops, int doingall) { From nobody Tue Apr 23 21:59: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 4VPGJ00wjPz5J9Wv; Tue, 23 Apr 2024 22:00:00 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPGHz54Xtz50s4; Tue, 23 Apr 2024 21:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713909599; 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=466Tbuae1bTtSxh0lmrEhWealDpDlyX8jbmHL+DTmHk=; b=XmGbhTTol7t8soicFdUAfkNUw/5jxN5CRMGPDRhy6tYu7YkTE7Rivvn+jUWeENozUQdJgc IYuZxSDkfwhA2SxX42gX29Wnz8pr7sLw0KTnmgUPZbbcVQ9J5Smfev1LJgiaGMFqUucjcd OO6WqOW6lx8Orh+Z6VGh6PlNlw14I9Rzw6fOPv3ZKu73kY9JlYcb0qfuY1FPhfpoWDvSKK sWn51VbNY0grsU7IfZF4aii7wWLau/YhSLm5oQ7mwFz8uVveRhGFYG/XcVB9J0ft9Zjj6u CGaDMsfB66M1PAf2JEuHmD/yZJOeCqLCJ+jOvj9ZcQRJidal4H0joi1gHSQPuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713909599; a=rsa-sha256; cv=none; b=t1u21rZsX+mdC77Cz6xfkU8DpTwzG0GSICozy7vOCDrhaUBHWpfACXS1Id8HtwljRJNl5X 688cuRRq1N3SQTxvv68H7QjbMKRiTdE9NgQDD4U9GS5UsR1KHD9Oo/HWLFfBtv8FaeAHdc 0wkwSY5xBrdmSyXRg9GFF5ZkFWLE/xMNuQVBfmlq9Bi1++3Tcq5KYaz0EQ3cmvsaSSNzym 469yaM4oWWz/TY9/4fWDY98vXmdt+ZnR5xDII0st19r8zEJngrATGx+f4iJdr7Mmkkqnjh BKbYX+dt54KFix5lJYr12G8uFXUjDTpPNvMGs37pJW9i4S13kJb2dCyxRCWuDQ== 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=1713909599; 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=466Tbuae1bTtSxh0lmrEhWealDpDlyX8jbmHL+DTmHk=; b=WnR0KRCTDpiGM/qlHmMUu3N6CZQ/O22aDHf6/0A4JeIhi10SkC6mRyf0fyF/aJPybv6os3 pMOvWqLV6khUKqB2kAykJG7J3buRDU5ImtSyHY7x909FGuwdxtSA6zfgXfLEDW1hVBwK4Y 1ZnC8NArjKuTJGA4Qf5+x3WAYrZrpWMu6v3ifAHNLfRODcBK2anZKsJxREiz3wzyEboiLS wI15nMzUbPZN+D6OcolR2SJ+HLfavhf5Ye7VqbhiEorEJl0ahCVqkaXyvxAgTP/ZgWWB1S ZflhISx9RQc2/fyd2bdl6ZN4o7EqG6cs1sjZWwEYo/oB/Ji05bepnMiTygBn1g== 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 4VPGHz4gbwzpqR; Tue, 23 Apr 2024 21:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLxxOx097550; Tue, 23 Apr 2024 21:59:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLxuUu097544; Tue, 23 Apr 2024 21:59:56 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:59:56 GMT Message-Id: <202404232159.43NLxuUu097544@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: 0d4ad64077bc - main - zfs: merge openzfs/zfs@1f940de07 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: 0d4ad64077bcddcff5a170ee97273db95b9cab55 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=0d4ad64077bcddcff5a170ee97273db95b9cab55 commit 0d4ad64077bcddcff5a170ee97273db95b9cab55 Merge: cf04a7775a4e 1f940de07224 Author: Martin Matuska AuthorDate: 2024-04-23 21:57:56 +0000 Commit: Martin Matuska CommitDate: 2024-04-23 21:59:18 +0000 zfs: merge openzfs/zfs@1f940de07 Notable upstream pull request merges: #16038 1f940de07 L2ARC: Cleanup buffer re-compression #16093 c183d164a Parallel pool import #16094 cd3e6b4f4 Add zfetch stats in arcstats #16103 35bf25848 Fix: FreeBSD Arm64 does not build currently #16104 4036b8d02 Refactor dbuf_read() for safer decryption #16110 9f83eec03 Handle FLUSH errors as "expected" #16117 c346068e5 zfs get: add '-t fs' and '-t vol' options Obtained from: OpenZFS OpenZFS commit: 1f940de07224c2068e7c721222b1f3a519820ca9 sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/arcstat.in | 47 ++++- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 22 ++- sys/contrib/openzfs/cmd/zinject/zinject.c | 115 ++++++++++- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 76 ++++++-- sys/contrib/openzfs/include/libzutil.h | 4 +- sys/contrib/openzfs/include/sys/spa.h | 2 + sys/contrib/openzfs/include/sys/spa_impl.h | 3 +- sys/contrib/openzfs/include/sys/zfs_ioctl.h | 4 +- sys/contrib/openzfs/include/sys/zio.h | 4 +- sys/contrib/openzfs/man/man8/zfs-set.8 | 11 +- sys/contrib/openzfs/man/man8/zinject.8 | 8 + sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 120 +++++++----- sys/contrib/openzfs/module/zfs/arc.c | 59 ++---- sys/contrib/openzfs/module/zfs/dbuf.c | 214 ++++++++++----------- sys/contrib/openzfs/module/zfs/spa.c | 58 ++++-- sys/contrib/openzfs/module/zfs/spa_misc.c | 26 ++- sys/contrib/openzfs/module/zfs/vdev_initialize.c | 5 +- sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 4 +- sys/contrib/openzfs/module/zfs/vdev_trim.c | 9 +- sys/contrib/openzfs/module/zfs/zio.c | 3 +- sys/contrib/openzfs/module/zfs/zio_inject.c | 138 ++++++++++++- sys/contrib/openzfs/rpm/redhat/zfs-kmod.spec.in | 2 +- sys/contrib/openzfs/scripts/zfs-tests.sh | 10 +- sys/contrib/openzfs/tests/runfiles/common.run | 3 +- .../tests/test-runner/bin/test-runner.py.in | 23 ++- .../openzfs/tests/zfs-tests/tests/Makefile.am | 3 + .../zpool_import/zpool_import_parallel_admin.ksh | 165 ++++++++++++++++ .../zpool_import/zpool_import_parallel_neg.ksh | 130 +++++++++++++ .../zpool_import/zpool_import_parallel_pos.ksh | 137 +++++++++++++ .../zfs-tests/tests/functional/quota/quota.kshlib | 7 + .../tests/functional/quota/quota_001_pos.ksh | 2 + .../tests/functional/quota/quota_002_pos.ksh | 2 + .../tests/functional/quota/quota_003_pos.ksh | 2 + .../tests/functional/quota/quota_004_pos.ksh | 2 + .../tests/functional/quota/quota_005_pos.ksh | 9 +- .../tests/functional/quota/quota_006_neg.ksh | 2 +- .../user_namespace/user_namespace_004.ksh | 4 +- sys/modules/zfs/zfs_config.h | 6 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 40 files changed, 1141 insertions(+), 304 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_admin.ksh index 000000000000,c681d1b7dd23..c681d1b7dd23 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_admin.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_admin.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_neg.ksh index 000000000000,339dc2575ede..339dc2575ede mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_neg.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_neg.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh index 000000000000,71b2437a37ec..71b2437a37ec mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh diff --cc sys/modules/zfs/zfs_config.h index 0e18c6092b9c,000000000000..6e1f5de7cf9e mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1218 -1,0 +1,1218 @@@ +/* + */ + +/* 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 + +/* 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_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 */ + +/* 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 */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the 'issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel has kernel_neon_* functions */ +/* #undef HAVE_KERNEL_NEON */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* strlcpy() exists */ +/* #undef HAVE_KERNEL_STRLCPY */ + +/* strscpy() exists */ +/* #undef HAVE_KERNEL_STRSCPY */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the 'mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* page_size() is available */ +/* #undef HAVE_MM_PAGE_SIZE */ + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* shrinker_register exists */ +/* #undef HAVE_SHRINKER_REGISTER */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* 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 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 'strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* have super_block s_shrink */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ + *** 330 LINES SKIPPED *** From nobody Tue Apr 23 22:42: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 4VPHFS4z3nz5JDVX; Tue, 23 Apr 2024 22:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPHFS4PLtz53w9; Tue, 23 Apr 2024 22:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713912172; 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=nTMxoCM+Vyjm6ePv3qo9PSoBboIxI5qnpuWIb5vYF0Q=; b=PxFTzNXzgLU2r9dA1vi9wylNqQsIfem7UVQmjBPgdd0r49jHthhbTuOcU+8LVlRE89gcT1 tdEocfUkcRPn3qno+qR3irXfUKHlPvYxOKOSyT7QaB0WP9WvOj4fopxZ/SnBQ58VfyqI8W +/z1t1sfy/Jply87KRh+9SwW6xohyt7A5XbUs/9erG9vBO60dUwAFbMCqPuyeDxkCrx4Gk shyG8C7+2khj4ptM5yNsNEOz0vJSQy/R+MDBsr3tCEK5+zKZ1g0szVtiG+yIpW5cIxxM53 Bt2N87O+ZhFQmsjA28kXQEs1CuRCjgK0K7+3NAt/go1/nWVwteEUxAf1pqp8CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713912172; a=rsa-sha256; cv=none; b=gjWxpuEVQvFlviPjAPuSYyM/lLsZHUP+vUh9JK7LIz0w6J312JlLELiKD7aUTUHT/gZynA HnzaG5lOVqEHhnhgZMvULfIrh2w1oG7ZRdD2VgJV5YS+LDgPFisM6XP5RKKSQtjGISgRg9 7njPTXVdUxMyJZa77hoUgJJOy7HIJ269RvJQ1jrbljeLbD6Pa0dWmLlg/UvxBS2VIIlPHg 4K+xcOSJj2jBkzN44FI4tLJ4xLBu4fxSBSUKtEn4jlGjvYKi2dwSuJoT8DsVu7EG9+N6Tf sz+HUdlH8seWFbKsPM+tqgkka+B9Eqd00WVbdR+PUGpwSrY9Pn0RN1Xkd5JyDQ== 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=1713912172; 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=nTMxoCM+Vyjm6ePv3qo9PSoBboIxI5qnpuWIb5vYF0Q=; b=CAHF1A5yxjiFPYby0LHWiTsJOA1QM6LpXqz3xyvDpEPHhpkC+EKnGEO81+ZAW5MBuWGqcU D5w1f5jAuuMRSCiLOv8NeB17nBEPgL6uiyzuplWsdj5aOh5jkd4vcBs3CcHm8ziMgyMVnS tyeQoUq98RknoOdik0yklJvHnOXLI8Z1u8+mW0R8ME+tZ/SNddAIvSqsFTDDoeH2sxKWJ8 niXfI50Klb1rT0ev76Z6CL9SrAdYup3fb25Uxlkgi42APHaDqSoR4m2bRpGOnZHMmU6y9l 5Od4rvzyXAl/f+NLvWZsDEuHEsD0suUvP0a+vSjV38vT+ppqQ219JyPMeeSisQ== 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 4VPHFS40HHzqkq; Tue, 23 Apr 2024 22:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NMgqZF082029; Tue, 23 Apr 2024 22:42:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NMgqxx082026; Tue, 23 Apr 2024 22:42:52 GMT (envelope-from git) Date: Tue, 23 Apr 2024 22:42:52 GMT Message-Id: <202404232242.43NMgqxx082026@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: 91bdebc958bb - main - bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation 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: 91bdebc958bb0da03f604bad19f99e3b10e96ac7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=91bdebc958bb0da03f604bad19f99e3b10e96ac7 commit 91bdebc958bb0da03f604bad19f99e3b10e96ac7 Author: rilysh AuthorDate: 2024-04-23 22:40:19 +0000 Commit: Warner Losh CommitDate: 2024-04-23 22:42:38 +0000 bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation errors 1. Currently, distfetch checks environment variables existence when it will use them or in a case (in chdir()) it doesn't check at all. As they are necessary to set before doing anything with it, check them, if they set or not, before proceeding any further. This also avoids extra cleaning when that environment variable isn't set. 2. Handle memory allocation error in malloc(PATH_MAX) and replace (sizeof const char *) with (sizeof char *). Both are similar and const doesn't have a size. 3. Indent the error message a bit in chdir(). Signed-off-by: rilysh Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1071 --- usr.sbin/bsdinstall/distfetch/distfetch.c | 33 +++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index c431e187799d..094929d89ea1 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -46,7 +46,7 @@ static int fetch_files(int nfiles, char **urls); int main(void) { - char *diststring; + char *diststring, *dists, *distdir, *distsite; char **urls; int i; int ndists = 0; @@ -54,17 +54,24 @@ main(void) char error[PATH_MAX + 512]; struct bsddialog_conf conf; - if (getenv("DISTRIBUTIONS") == NULL) + if ((dists = getenv("DISTRIBUTIONS")) == NULL) errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); - diststring = strdup(getenv("DISTRIBUTIONS")); + if ((distdir = getenv("BSDINSTALL_DISTDIR")) == NULL) + errx(EXIT_FAILURE, "BSDINSTALL_DISTDIR variable is not set"); + + if ((distsite = getenv("BSDINSTALL_DISTSITE")) == NULL) + errx(EXIT_FAILURE, "BSDINSTALL_DISTSITE variable is not set"); + + if ((diststring = strdup(dists)) == NULL) + errx(EXIT_FAILURE, "Error: diststring variable out of memory!"); + for (i = 0; diststring[i] != 0; i++) if (isspace(diststring[i]) && !isspace(diststring[i+1])) ndists++; ndists++; /* Last one */ - urls = calloc(ndists, sizeof(const char *)); - if (urls == NULL) { + if ((urls = calloc(ndists, sizeof(char *))) == NULL) { free(diststring); errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!"); } @@ -78,15 +85,21 @@ main(void) bsddialog_backtitle(&conf, OSNAME " Installer"); for (i = 0; i < ndists; i++) { - urls[i] = malloc(PATH_MAX); + if ((urls[i] = malloc(PATH_MAX)) == NULL) { + free(urls); + free(diststring); + bsddialog_end(); + errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!"); + } + snprintf(urls[i], PATH_MAX, "%s/%s", - getenv("BSDINSTALL_DISTSITE"), strsep(&diststring, " \t")); + distsite, strsep(&diststring, " \t")); } - if (chdir(getenv("BSDINSTALL_DISTDIR")) != 0) { + if (chdir(distdir) != 0) { snprintf(error, sizeof(error), - "Could not change to directory %s: %s\n", - getenv("BSDINSTALL_DISTDIR"), strerror(errno)); + "Could not change to directory %s: %s\n", + distdir, strerror(errno)); conf.title = "Error"; bsddialog_msgbox(&conf, error, 0, 0); bsddialog_end(); From nobody Wed Apr 24 00:15: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 4VPKJy081Tz5JMnc for ; Wed, 24 Apr 2024 00:16:02 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPKJx5QY3z3xfZ for ; Wed, 24 Apr 2024 00:16:01 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-343c891bca5so4934689f8f.2 for ; Tue, 23 Apr 2024 17:16:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713917760; x=1714522560; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nsc8o3gozv+Iz3FoGcfQRos0OPAlQoiRR0fzOIZ6ubg=; b=iKxZg81nhGdVNSQRlofPrmUqMBXs7w7KZbBymrTu5eWvVEvPYl1CV003VT0XaU9AVM KFwffwMY0GnVGMwJ7uM0ofx06ryzA1t2sby9ZQ+ASQfpN+pm2x+DBI5FGsQkExZOYrwb rJqDrxTXH1R/kJejk5gt+kXMPhOIXA6k6gTOZOBD7VR5dxugySf0xOdu0qAFwLPJX9JO bWqHZ6F3yGfO6tpArw7syfV+yqmEU36Tfz/XnpHCdWgCOL5yRcn20t07dW1sirkyn4nz p3Ixu3lSZefx19+UUXHjsVVLUUOi5pZQqhqTxCCfO7xz60y63dCwgMAizB5XvfjJtdQi ELKQ== X-Forwarded-Encrypted: i=1; AJvYcCWfTG256KLgQIivUs4lqVfTHFHyibdcc6Nb/1IBtHj1LWJLr73S7JrDOFrsYjJ2R707p8EbF931RPQKmfygDu61yThAIN9dDTM4Nuy3QC71RQ== X-Gm-Message-State: AOJu0YzUVXKqfHtwTgSccZ5WBQnhL3MwFwu7AKOMXZFvzLGMjbseCbqA RgvRS5TFBUOYf3T92CVmHzAqBiV+ll17/ra9OKt+FeB/Kp7AJzK0Ojaj22d+nXw= X-Google-Smtp-Source: AGHT+IFw39ATGw8OmoD+slq1tR/eEa8+q6KYigqxrRV/uqiaYdPD74xM3yDGFcp2NU8oJx9PIyxZNg== X-Received: by 2002:a5d:4b84:0:b0:34b:88e:3712 with SMTP id b4-20020a5d4b84000000b0034b088e3712mr618494wrt.60.1713917759648; Tue, 23 Apr 2024 17:15:59 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id e18-20020a056000195200b003462fec9f5asm15627382wry.62.2024.04.23.17.15.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2024 17:15:58 -0700 (PDT) Content-Type: text/plain; charset=utf-8 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.200.91.1.1\)) Subject: Re: git: cf04a7775a4e - main - swapon: Do not overwrite Linux swap header From: Jessica Clarke In-Reply-To: <202404232150.43NLoEsI087796@gitrepo.freebsd.org> Date: Wed, 24 Apr 2024 01:15:48 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202404232150.43NLoEsI087796@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3774.200.91.1.1) 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:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4VPKJx5QY3z3xfZ On 23 Apr 2024, at 22:50, Warner Losh wrote: > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dcf04a7775a4e8ff6fd28c768be9daa3d= 83dd382e >=20 > commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e > Author: Ricardo Branco > AuthorDate: 2024-04-23 21:47:56 +0000 > Commit: Warner Losh > CommitDate: 2024-04-23 21:48:01 +0000 >=20 > swapon: Do not overwrite Linux swap header I don=E2=80=99t think this is a sensible default. swapon should, by = default, do exactly what you asked for, rather than magically do something more convoluted and different, with no way to opt out of it. The fact that it looks like some other random OS happened to touch the partition in the past shouldn=E2=80=99t be relevant; we=E2=80=99re not Linux, we=E2=80=99= re FreeBSD. Especially in the age of GPT where the OSes have different GUIDs for their swap partitions. Having some user-friendly way to the gnop dance seems fine, but it should be optional and off by default, not forced upon you. As it stands the only way to avoid this silent behaviour change is to zero out the first 4K of the partition, which is not user-friendly (and starts to sound like going back to the old days when that was a common thing to do when partitioning). I also don=E2=80=99t believe the patch to be uncontested as you state in = your comment on the PR; kib@ had last commented on 1083 that it should be documented and left up to the user to configure. Jess > Reviewed by: imp, jhb > Pull Request: https://github.com/freebsd/freebsd-src/pull/1084 > --- > sbin/swapon/Makefile | 2 ++ > sbin/swapon/extern.h | 5 ++++ > sbin/swapon/swaplinux.c | 66 = +++++++++++++++++++++++++++++++++++++++++++++++++ > sbin/swapon/swapon.c | 54 +++++++++++++++++++++++++++++++++++++++- > 4 files changed, 126 insertions(+), 1 deletion(-) >=20 > diff --git a/sbin/swapon/Makefile b/sbin/swapon/Makefile > index 27808aed5857..930e938e5b05 100644 > --- a/sbin/swapon/Makefile > +++ b/sbin/swapon/Makefile > @@ -6,6 +6,8 @@ LINKS=3D ${BINDIR}/swapon ${BINDIR}/swapoff > LINKS+=3D ${BINDIR}/swapon ${BINDIR}/swapctl > MLINKS=3D swapon.8 swapoff.8 > MLINKS+=3Dswapon.8 swapctl.8 > +SRCS=3D swapon.c swaplinux.c > +HDRS+=3D extern.h >=20 > LIBADD=3D util >=20 > diff --git a/sbin/swapon/extern.h b/sbin/swapon/extern.h > new file mode 100644 > index 000000000000..cb33dbbee953 > --- /dev/null > +++ b/sbin/swapon/extern.h > @@ -0,0 +1,5 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +int is_linux_swap(const char *); > diff --git a/sbin/swapon/swaplinux.c b/sbin/swapon/swaplinux.c > new file mode 100644 > index 000000000000..d01a94345e68 > --- /dev/null > +++ b/sbin/swapon/swaplinux.c > @@ -0,0 +1,66 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +#include > +#include > +#include > +#include > +#include > + > +#include "extern.h" > + > +/* > + * Definitions and structure taken from > + * = https://github.com/util-linux/util-linux/blob/master/include/swapheader.h > + */ > + > +#define SWAP_VERSION 1 > +#define SWAP_UUID_LENGTH 16 > +#define SWAP_LABEL_LENGTH 16 > +#define SWAP_SIGNATURE "SWAPSPACE2" > +#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1) > + > +struct swap_header_v1_2 { > + char bootbits[1024]; /* Space for disklabel etc. */ > + uint32_t version; > + uint32_t last_page; > + uint32_t nr_badpages; > + unsigned char uuid[SWAP_UUID_LENGTH]; > + char volume_name[SWAP_LABEL_LENGTH]; > + uint32_t padding[117]; > + uint32_t badpages[1]; > +}; > + > +typedef union { > + struct swap_header_v1_2 header; > + struct { > + uint8_t reserved[4096 - SWAP_SIGNATURE_SZ]; > + char signature[SWAP_SIGNATURE_SZ]; > + } tail; > +} swhdr_t; > + > +#define sw_version header.version > +#define sw_volume_name header.volume_name > +#define sw_signature tail.signature > + > +int > +is_linux_swap(const char *name) > +{ > + uint8_t buf[4096]; > + swhdr_t *hdr =3D (swhdr_t *) buf; > + int fd; > + > + fd =3D open(name, O_RDONLY); > + if (fd =3D=3D -1) > + return (-1); > + > + if (read(fd, buf, 4096) !=3D 4096) { > + close(fd); > + return (-1); > + } > + close(fd); > + > + return (hdr->sw_version =3D=3D SWAP_VERSION && > + !memcmp(hdr->sw_signature, SWAP_SIGNATURE, SWAP_SIGNATURE_SZ)); > +} > diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c > index 26a7dc22654a..0f2ad1f5e213 100644 > --- a/sbin/swapon/swapon.c > +++ b/sbin/swapon/swapon.c > @@ -54,10 +54,15 @@ > #include > #include >=20 > +#include "extern.h" > + > +#define _PATH_GNOP "/sbin/gnop" > + > static void usage(void) __dead2; > static const char *swap_on_off(const char *, int, char *); > static const char *swap_on_off_gbde(const char *, int); > static const char *swap_on_off_geli(const char *, char *, int); > +static const char *swap_on_off_linux(const char *, int); > static const char *swap_on_off_md(const char *, char *, int); > static const char *swap_on_off_sfile(const char *, int); > static void swaplist(int, int, int); > @@ -250,8 +255,13 @@ swap_on_off(const char *name, int doingall, char = *mntops) > return (swap_on_off_geli(name, mntops, doingall)); > } >=20 > - /* Swap on special file. */ > free(basebuf); > + > + /* Linux swap */ > + if (is_linux_swap(name)) > + return (swap_on_off_linux(name, doingall)); > + > + /* Swap on special file. */ > return (swap_on_off_sfile(name, doingall)); > } >=20 > @@ -466,6 +476,48 @@ swap_on_off_geli(const char *name, char *mntops, = int doingall) > return (swap_on_off_sfile(name, doingall)); > } >=20 > +static const char * > +swap_on_off_linux(const char *name, int doingall) > +{ > + const char *ret; > + char *nopname; > + size_t nopnamelen; > + int error; > + > + if (which_prog =3D=3D SWAPON) { > + /* Skip the header for Linux swap partitions */ > + error =3D run_cmd(NULL, "%s create -o 4096 %s", _PATH_GNOP, > + name); > + if (error) { > + warnx("gnop (create) error: %s", name); > + return (NULL); > + } > + } > + > + /* Append ".nop" to name */ > + nopnamelen =3D strlen(name) + sizeof(".nop"); > + nopname =3D (char *) malloc(nopnamelen); > + if (nopname =3D=3D NULL) > + err(1, "malloc()"); > + (void)strlcpy(nopname, name, nopnamelen); > + (void)strlcat(nopname, ".nop", nopnamelen); > + > + ret =3D swap_on_off_sfile(nopname, doingall); > + > + if (which_prog =3D=3D SWAPOFF) { > + error =3D run_cmd(NULL, "%s destroy %s", _PATH_GNOP, nopname); > + if (error) { > + warnx("gnop (destroy) error: %s", name); > + free(nopname); > + return (NULL); > + } > + } > + > + free(nopname); > + > + return (ret); > +} > + > static const char * > swap_on_off_md(const char *name, char *mntops, int doingall) > { From nobody Wed Apr 24 00:19: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 4VPKNT4bHsz5JNDB; Wed, 24 Apr 2024 00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPKNT446xz3xyF; Wed, 24 Apr 2024 00: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=1713917945; 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=ajjwMg7FzO/EsP0G/41YDXEf02e/Oj3CK8Rdgql070A=; b=xsnwlSjHUhqbLGVWItLemaN/obM9UZsBUuNaAB10CluOqinn4O1k1yxpXGfBIUJukJc5o6 npbarviRVXLXyemhy7tVaHi/bKYE2OIyxEVFXpZrDuOx26AfOuBjafOVsslsWiSDylLEXE yOKS6IuqqJ6xgHwwOxpw7rgA+lOkDZDbhlbTxVmhCKzsojIfbrtfEzejPBAjXs8iAJ2BXr N/oKiJNNclidNKLcmVnUkzUHDR6Xh+YKmv2ZzHo3+AgNuzn9Y7gCwp1pa4pgL60eHfz4CQ qxVLOy6rNpIHh3o9kxp0S2XiVMyrV89xa6W2UA2+t+7UYyqIPI6pmcKiFPtg6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713917945; a=rsa-sha256; cv=none; b=UADk/An4jOXQ5f9SDDZpkRAQVevSeSD1hV/G6cm4jv3SctraHivudfdut0tr5QVHrB2FNC /MMQnu51Qd6opEgfedeXR+m6MS+6czaHJjeghYdqpkiFEkIaR9pR5kWGxfWxiv8AjVgImZ m75EB/OEDUdudC+iFx8xFKj9jxebdCyTAzeI5Z6PiR2GjxyZOU148rpRTjsJ8NjUnuY+wb Rlt/2oBs3LixdpdE5/MeiPEhyBQTEmwfeejuUopkJsrXKOgCE8wJSMK2sQ/dtd4dopNEfD 6qJ8VscHao6U5w278yAaFajnplAW7PZzZziYNVAYP2qX77qYfr0wUNF5nZZnhQ== 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=1713917945; 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=ajjwMg7FzO/EsP0G/41YDXEf02e/Oj3CK8Rdgql070A=; b=AMgTgSlFtKFTucpYUqxuHAjSOAsiUdgpoozRo/SFgqAUoj1ymKNbVOCeAr6V47LfOve6IG SpZKFyDHG1OZ8AgRI3B21Q9EDD4KTGGTZWV5tfgoN+aXeFIKvpsdi72DFMOacI8aHfTDaY Pn6cDgtjE1iN71X6m2nldj+VzMMenhxFWFTOuAolqH/EFfTLstfCS34754yCf8n0dYGehZ yENOwyYXHSOPQ+jgjtZxTZ4QetC+X1ySO4J64QM4vXr5vdf1rVlw/a3i9rjqZE7r98dwBe GVYKsgRF/cSBslXwlsoaNB26opVs2S8OrvIHO54BPoEMvct7WGDx5JKPgRnNUQ== 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 4VPKNT3fnqzt3Q; Wed, 24 Apr 2024 00:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O0J5WG034185; Wed, 24 Apr 2024 00:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O0J50g034182; Wed, 24 Apr 2024 00:19:05 GMT (envelope-from git) Date: Wed, 24 Apr 2024 00:19:05 GMT Message-Id: <202404240019.43O0J50g034182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: a8acc2bf5699 - main - sockets: inherit SO_ACCEPTFILTER from listener to child 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8acc2bf5699556946dda2a37589d3c3bd9762c6 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a8acc2bf5699556946dda2a37589d3c3bd9762c6 commit a8acc2bf5699556946dda2a37589d3c3bd9762c6 Author: Gleb Smirnoff AuthorDate: 2024-04-24 00:17:14 +0000 Commit: Gleb Smirnoff CommitDate: 2024-04-24 00:17:14 +0000 sockets: inherit SO_ACCEPTFILTER from listener to child This is crucial for operation of accept_filter(9). See added comment. Fixes: d29b95ecc0d049406d27a6c11939d40a46658733 --- sys/kern/uipc_socket.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index c040bdf4d3eb..f0b36fc5595e 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -761,9 +761,13 @@ solisten_clone(struct socket *head) * including those completely irrelevant to a new born socket. For * compatibility with older versions we will inherit a list of * meaningful options. + * The crucial bit to inherit is SO_ACCEPTFILTER. We need it present + * in the child socket for soisconnected() promoting socket from the + * incomplete queue to complete. It will be cleared before the child + * gets available to accept(2). */ - so->so_options = head->so_options & (SO_KEEPALIVE | SO_DONTROUTE | - SO_LINGER | SO_OOBINLINE | SO_NOSIGPIPE); + so->so_options = head->so_options & (SO_ACCEPTFILTER | SO_KEEPALIVE | + SO_DONTROUTE | SO_LINGER | SO_OOBINLINE | SO_NOSIGPIPE); so->so_linger = head->so_linger; so->so_state = head->so_state; so->so_fibnum = head->so_fibnum; From nobody Wed Apr 24 00:21: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 4VPKRp2bfMz5JNGm for ; Wed, 24 Apr 2024 00:21:58 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPKRp0v07z40bJ for ; Wed, 24 Apr 2024 00:21:58 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-41a5b68ed4fso23252505e9.0 for ; Tue, 23 Apr 2024 17:21:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713918116; x=1714522916; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hLqaLJommJyVlke3fhNCKj4COU1kjDI1tkHaz/HPaGg=; b=eaM5oRj9l3QCEVZX8pwy+nsOVSspmJoUB5TKWGFdCMrxnmaHzw9PoGTeoxICXusZzf /48084bWnJ0DAXqpTn0jkjcY38K9fzSmrWyah3+IsoM8BqlZ56fIkFi0QKwlKTGRGjkT DXRpUxN3++UxMc09AJSMk33vSZvLFkVGY/H8Ai+aktbTyEb1MNc5EBcsLI8W9ixHsXIX 3nNe0OtmcCkaPZg5d9Sml2xG8lF0BvgVFHOg8Ao2UkxWVcWHis1FkKYEq0dPsLRHT2f0 /X1bAdwqb9c0cAyLAzYmmxmrDts0L+d4OKUvxhh8s4PmDTIuqlpemvqKBEwFsFb3heUX +QYg== X-Forwarded-Encrypted: i=1; AJvYcCUme/VelsNEm1+GAWS+3qUJ+Ofhhujf3irkdS7CwBwQPaiOcSFCE0YoYCQZ57rpSl+Nl0QimITyLTMIXQ9ImZUwPXWVGxoZLnH54utI6UuVng== X-Gm-Message-State: AOJu0YxnFL3H1rusjK89v7ZWiJmHJOAfbh6lSOnBm5H+ijNjYFmoPZol c4SdFw7t+eOuRKi9B2u77+9TjNyMfwvamDlprTy/y9Y+fno/mFJtm+iYR/KYzAw= X-Google-Smtp-Source: AGHT+IHMJttjP1sLZFVC3JHlZ7nbBM3yJvV/rmuab6fgpBE1cgXINjtVKWPV9s9tgZWcQhWI7SbIJw== X-Received: by 2002:a05:600c:a005:b0:41a:1d3a:3fc1 with SMTP id jg5-20020a05600ca00500b0041a1d3a3fc1mr574770wmb.3.1713918116595; Tue, 23 Apr 2024 17:21:56 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id w14-20020adfee4e000000b00343d6c7240fsm15597785wro.35.2024.04.23.17.21.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2024 17:21:56 -0700 (PDT) Content-Type: text/plain; charset=utf-8 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.200.91.1.1\)) Subject: Re: git: 91bdebc958bb - main - bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation errors From: Jessica Clarke In-Reply-To: <202404232242.43NMgqxx082026@gitrepo.freebsd.org> Date: Wed, 24 Apr 2024 01:21:45 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <9C180198-A6B6-41D3-AB49-D9582D356ADE@freebsd.org> References: <202404232242.43NMgqxx082026@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3774.200.91.1.1) 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:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4VPKRp0v07z40bJ On 23 Apr 2024, at 23:42, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D91bdebc958bb0da03f604bad19f99e3b= 10e96ac7 >=20 > commit 91bdebc958bb0da03f604bad19f99e3b10e96ac7 > Author: rilysh > AuthorDate: 2024-04-23 22:40:19 +0000 > Commit: Warner Losh > CommitDate: 2024-04-23 22:42:38 +0000 >=20 > bsdinstall/distfetch.c: check environment variables before = downloading and handle memory allocation errors >=20 > 1. Currently, distfetch checks environment variables existence > when it will use them or in a case (in chdir()) it doesn't check > at all. As they are necessary to set before doing anything with > it, check them, if they set or not, before proceeding any further. > This also avoids extra cleaning when that environment variable > isn't set. >=20 > 2. Handle memory allocation error in malloc(PATH_MAX) and replace > (sizeof const char *) with (sizeof char *). Both are similar and > const doesn't have a size. Latter is fine I guess but they=E2=80=99re the same by definition, = it=E2=80=99s churn. > 3. Indent the error message a bit in chdir(). AKA violate style(9). > Signed-off-by: rilysh > Reviewed by: imp > Pull Request: https://github.com/freebsd/freebsd-src/pull/1071 > --- > usr.sbin/bsdinstall/distfetch/distfetch.c | 33 = +++++++++++++++++++++---------- > 1 file changed, 23 insertions(+), 10 deletions(-) >=20 > diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c = b/usr.sbin/bsdinstall/distfetch/distfetch.c > index c431e187799d..094929d89ea1 100644 > --- a/usr.sbin/bsdinstall/distfetch/distfetch.c > +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c > @@ -46,7 +46,7 @@ static int fetch_files(int nfiles, char **urls); > int > main(void) > { > - char *diststring; > + char *diststring, *dists, *distdir, *distsite; > char **urls; > int i; > int ndists =3D 0; > @@ -54,17 +54,24 @@ main(void) > char error[PATH_MAX + 512]; > struct bsddialog_conf conf; >=20 > - if (getenv("DISTRIBUTIONS") =3D=3D NULL) > + if ((dists =3D getenv("DISTRIBUTIONS")) =3D=3D NULL) > errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); >=20 > - diststring =3D strdup(getenv("DISTRIBUTIONS")); > + if ((distdir =3D getenv("BSDINSTALL_DISTDIR")) =3D=3D NULL) > + errx(EXIT_FAILURE, "BSDINSTALL_DISTDIR variable is not set"); > + > + if ((distsite =3D getenv("BSDINSTALL_DISTSITE")) =3D=3D NULL) > + errx(EXIT_FAILURE, "BSDINSTALL_DISTSITE variable is not set"); > + > + if ((diststring =3D strdup(dists)) =3D=3D NULL) > + errx(EXIT_FAILURE, "Error: diststring variable out of memory!"); > + > for (i =3D 0; diststring[i] !=3D 0; i++) > if (isspace(diststring[i]) && !isspace(diststring[i+1])) > ndists++; > ndists++; /* Last one */ >=20 > - urls =3D calloc(ndists, sizeof(const char *)); > - if (urls =3D=3D NULL) { > + if ((urls =3D calloc(ndists, sizeof(char *))) =3D=3D NULL) { Moving into the if is pointless. > free(diststring); > errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!"); > } > @@ -78,15 +85,21 @@ main(void) > bsddialog_backtitle(&conf, OSNAME " Installer"); >=20 > for (i =3D 0; i < ndists; i++) { > - urls[i] =3D malloc(PATH_MAX); > + if ((urls[i] =3D malloc(PATH_MAX)) =3D=3D NULL) { Moving into the if is pointless. > + free(urls); > + free(diststring); Like I said in the review, reviewing urls and diststring but not the elements of urls is a stupid halfway house, and it=E2=80=99s all a waste = of time when you=E2=80=99re about to call errx. If one wants to be super = pedantic and free memory prior to calling errx, fine, but do it in full, don=E2=80=99= t do an arbitrary subset. > + bsddialog_end(); > + errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!"); > + } > + > snprintf(urls[i], PATH_MAX, "%s/%s", > - getenv("BSDINSTALL_DISTSITE"), strsep(&diststring, " \t")); > + distsite, strsep(&diststring, " \t")); Breaks style(9). > } >=20 > - if (chdir(getenv("BSDINSTALL_DISTDIR")) !=3D 0) { > + if (chdir(distdir) !=3D 0) { > snprintf(error, sizeof(error), > - "Could not change to directory %s: %s\n", > - getenv("BSDINSTALL_DISTDIR"), strerror(errno)); > + "Could not change to directory %s: %s\n", > + distdir, strerror(errno)); Breaks style(9). Jess > conf.title =3D "Error"; > bsddialog_msgbox(&conf, error, 0, 0); > bsddialog_end(); From nobody Wed Apr 24 00:29: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 4VPKbz2ntYz5JNgs; Wed, 24 Apr 2024 00:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPKbz2Hjsz41Yp; Wed, 24 Apr 2024 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713918543; 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=HljoOh7u6Xd9zN/oRaDrL9yD8j2ofGXUuGm2CAYtqvw=; b=Clgnqj9rtjo72zamXJBLTLt9v5ewtmdNtNGY216mImGCQnMM8Nc1YsNTcFhQ7y6NtQhXvk cGAro9ztFjH7bTPo8Wr4p/196GbjEvKnfVy0b7KP2CW8xVwsAG5HxW8xsYkdtdFy4fqgW1 0nSxnb8+tXJTPGzSY0vizXLWJ7p1yNotLptgZ9E+2X1gYE7cp7ctMw10o5uaJrTcjjAaKT Q68RrlrK2AJ7fw6MlxOoO11DLzBHZ6q5b9PWY9h8ge/UB57drji41vBIrXm2PQQ5dytbfJ CAJ/L0iy4A+6/jx4KzSGKMhk8lhyDuE1aYqVV/+gwAuhIapQhOZkDMpSHinp9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713918543; a=rsa-sha256; cv=none; b=CHQS38lSDOqGRCGFTPrh7KyIIwJmPvct/2HddaM+ysqB45UhKmyw0M+xkQ1dbQBsvFpqG9 54GDPko9J4Oy0nVHdbnaSEJv7/S1j0B3nqFvaU76ulNex6OZftIllwbAuwPg4wZV7okA7j XgzFBkRydOlZIcgNbvoCEjnBB35XPbf9CbsAo6LAUHZQoUp6GQBsmoY2K8/oHwc6ICEyH3 Nt/zhsNfedPyPESX4T8A8ouRPQypq23ZQ8bdWjYEzoE1SbWAVIGpe+Nx3zPfJsrQpeszPg ZS+Okv6eZC764vDRLLXUC4rThTTUVZf+ocIDLqJogOge6RVvRSnbc3FqPkkaug== 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=1713918543; 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=HljoOh7u6Xd9zN/oRaDrL9yD8j2ofGXUuGm2CAYtqvw=; b=Ua0IPMvIZps8bOGYDHr29MdSY4TQTzyWgoSbruh561Pe9NITkOoArid1E8PjCqLrjTDliA 9HEET8erPxGT2184LbmcwqxD1fvgWAPEYu+cmfjd7FM0g+mYZaiFz/B3oup0mWHr4kHnXw AEfiXcB8vDrEAsyvyzhhmk+JTDsSjyBc2X1zKtB8VhcLYSz+IR/dAy95gjDKkPp31p75Cd VKEvlcNi7RSAP1dNEzGcLqTjxoPbsbQisu+NaGR1x1sGMmOh24cVehV9G0a9x/BidYhZ9k fIUkKpX+FnT1js1xD6tqXm6eAhuVQiq3+g/KHn2Jt4rUlHd5+AYbRpfJjJxWaQ== 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 4VPKbz1vKMzt21; Wed, 24 Apr 2024 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O0T3VB051341; Wed, 24 Apr 2024 00:29:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O0T3Rp051338; Wed, 24 Apr 2024 00:29:03 GMT (envelope-from git) Date: Wed, 24 Apr 2024 00:29:03 GMT Message-Id: <202404240029.43O0T3Rp051338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jake Freeland Subject: git: 4f2ada0d8821 - main - ktrace: Describe CAPFAIL trace point in man page 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: jfree X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f2ada0d88219746fdfbc0907c28b0950ad18725 Auto-Submitted: auto-generated The branch main has been updated by jfree: URL: https://cgit.FreeBSD.org/src/commit/?id=4f2ada0d88219746fdfbc0907c28b0950ad18725 commit 4f2ada0d88219746fdfbc0907c28b0950ad18725 Author: Jake Freeland AuthorDate: 2024-04-24 00:25:16 +0000 Commit: Jake Freeland CommitDate: 2024-04-24 00:25:16 +0000 ktrace: Describe CAPFAIL trace point in man page Update the ktrace(1) man page to describe the recently improved capability failure tracing. Approved by: markj (mentor) Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44886 --- usr.bin/ktrace/ktrace.1 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 7167ad1e646a..5ccb206456b8 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2019 +.Dd April 20, 2024 .Dt KTRACE 1 .Os .Sh NAME @@ -151,6 +151,21 @@ The and .Ar command options are mutually exclusive. +.Sh CAPABILITY VIOLATION TRACING +When the +.Cm p +trace point is specified, +.Nm +will record +.Xr capsicum 4 +capability mode violations made by the traced process. +Violations will be logged regardless of whether the process has actually +entered capability mode. +.Pp +For developers that are interested in Capsicumizing their programs, the +.Cm c , n , p +trace points can help quickly identify any system calls and path lookups that +are triggering violations. .Sh EXAMPLES Run "make", then trace it and any child processes: .Dl $ ktrace -i make @@ -183,7 +198,8 @@ Disable tracing of all user-owned processes: .Xr kdump 1 , .Xr truss 1 , .Xr ktrace 2 , -.Xr utrace 2 +.Xr utrace 2 , +.Xr capsicum 4 .Sh HISTORY The .Nm From nobody Wed Apr 24 00:29: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 4VPKc041kQz5JNyk; Wed, 24 Apr 2024 00:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPKc03bn9z41fg; Wed, 24 Apr 2024 00:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713918544; 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=J7QVpGARZBIGmb7NtUsGx8eWw0p6Lrjc3cq8ocyjO5k=; b=xasMov919lZR4ACRQARe9VtUl8FGGjeYQ7Mwrh6GLdLaruTb2fsR+/LVnay4F5MEpN0QiX Kax6KLOUUQnqCnj4gjl7HIaWM5Wg5xsmci9V4rIFjyHwFGUowhtFtJlUdRrgHrsNqpVfna qukpRVpUNvhYBc6o6KW0Z8ogLbWNXkOV4H5LzxSfF2pzw/+yJ7rfVf0mGwfl6r3Nhmrx0H 7VOI+n41u0+VkxYYkDiFu1PqBX+oGkbeZcaUOt5Tl3RcOTGlDGFdcPs845byA3EC7S2aPL OyfYAPZPS3H4o1u2ZuR3KvcXLPrbp5KEZ1MVEzRbgADdY0kVaUDI+eYheZPLaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713918544; a=rsa-sha256; cv=none; b=msF45pMxy17eWr7kDBgySzX30wOSUyZ4dNohGeotasaE5ooEzp2QB4+Ocbg65fEC2AAmMy qLPUD0qgY0XBM7bad0csUAhTMYc9nkeJKxT01dS1EKO2VUilzok97pi8Sc3XIxeyd22Iw/ wQ14YRD+gOkwapiZks2vmd2rTzCMJvutFMJwe2cmRIoZYoGfaK5j/+vXWToK4ZulJIBaTA W0nvXCwP+rl7gUPBgn15+5LMu2GneHVxj0+TNuHiBYDTzyD0Bf0mhit6CX6aTKqy8eRiLW 7aK6Yv0Cs+71Zi/SnMREhkICa/wzpIgYUPtx0+MFG0uBxrGLDed6QO6yDj1fzw== 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=1713918544; 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=J7QVpGARZBIGmb7NtUsGx8eWw0p6Lrjc3cq8ocyjO5k=; b=x7GGkhCfx2nCPNO0Qe2ds3PmL1Rz2k7PTu1NPVAoJypbaOYytnJGFJ8V+ncEi83Fjmv1PV t6sVv7xWqUJ/lt/CWS+2Xa7osEWxChjVvCl7wATetpcjmk7MGQ2LW22Vwmi4xmIrPSluj2 IR+gcl8RhrYs04KF4k+HAkAqdO1f5ACqPxqiqG2BKr3N1VtM7C4XA+0FH4k+2FYQjpAHiL h3uWIy21oXsExWeAo1qoh+7dFOL2+AJlyc26y74DpH/m3zvQ8p1vvOxo+rv422t0yXUeUP 02Koz3Vmb+9vnIi77Di0X8uZHkAyRkgyBgrmCmVosCScXRABKu6UgbPEo8+2KA== 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 4VPKc03CZWztLn; Wed, 24 Apr 2024 00:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O0T4U4051389; Wed, 24 Apr 2024 00:29:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O0T4jF051386; Wed, 24 Apr 2024 00:29:04 GMT (envelope-from git) Date: Wed, 24 Apr 2024 00:29:04 GMT Message-Id: <202404240029.43O0T4jF051386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jake Freeland Subject: git: f239db4800ee - main - ktrace: Remove CAPFAIL from default trace points 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: jfree X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f239db4800ee9e7ff8485f96b7a68e6c38178c3b Auto-Submitted: auto-generated The branch main has been updated by jfree: URL: https://cgit.FreeBSD.org/src/commit/?id=f239db4800ee9e7ff8485f96b7a68e6c38178c3b commit f239db4800ee9e7ff8485f96b7a68e6c38178c3b Author: Jake Freeland AuthorDate: 2024-04-24 00:26:14 +0000 Commit: Jake Freeland CommitDate: 2024-04-24 00:26:14 +0000 ktrace: Remove CAPFAIL from default trace points The CAPFAIL tracepoint was recently extended to report ECAPMODE capability violations for processes that do not enter capability mode. This allows developers that are interested in Capsicumizing their programs to determine where violations are being raised. Previously, CAPFAIL only produced output for processes using Capsicum(4) capabilties. Thus, most ktrace users never received log output from the trace point. With the recent changes, this is no longer the case. Having this trace point enabled by default will produce output for all processes that use syscalls that are not permitted in capability mode. This may lead to confusion for users that are not familiar with the feature. Remove KTRFAC_CAPFAIL from ktrace's default points to avoid this. Approved by: markj (mentor) Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44887 --- usr.bin/ktrace/ktrace.1 | 2 +- usr.bin/ktrace/ktrace.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 5ccb206456b8..da39aac7800f 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -137,7 +137,7 @@ trace requests .It Cm + trace the default set of trace points - -.Cm c , i , n , p , s , t , u , y +.Cm c , i , n , s , t , u , y .El .It Ar command Execute diff --git a/usr.bin/ktrace/ktrace.h b/usr.bin/ktrace/ktrace.h index 1022f06532b1..bf3f70539310 100644 --- a/usr.bin/ktrace/ktrace.h +++ b/usr.bin/ktrace/ktrace.h @@ -31,13 +31,12 @@ #define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \ KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_USER | \ - KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_CAPFAIL | \ - KTRFAC_STRUCT_ARRAY) + KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_STRUCT_ARRAY) #define PROC_ABI_POINTS (KTRFAC_PROCCTOR | KTRFAC_PROCDTOR) -#define ALL_POINTS (DEF_POINTS | KTRFAC_CSW | PROC_ABI_POINTS | \ - KTRFAC_FAULT | KTRFAC_FAULTEND) +#define ALL_POINTS (DEF_POINTS | KTRFAC_CAPFAIL | KTRFAC_CSW | \ + PROC_ABI_POINTS | KTRFAC_FAULT | KTRFAC_FAULTEND) #define DEF_TRACEFILE "ktrace.out" From nobody Wed Apr 24 01:48: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 4VPMMd3H86z5JVG5 for ; Wed, 24 Apr 2024 01:48:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPMMc5MZ8z47VT for ; Wed, 24 Apr 2024 01:48:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a5872419e31so259714166b.3 for ; Tue, 23 Apr 2024 18:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1713923307; x=1714528107; 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=gebWBBrTSu7bpKrnWlPYXjxLzXv1sON+vhM7CEbEn2k=; b=YiZ4iRTAG2tZZS57u1/Sn1lzwp33sNJFenz/jqRIwvIuO2a8GB4nrvtuA6pxeE2Fyu ztCbHgUEP1YO0R9mMGLFsLNeLDf/Him3T3ePs5IlXJZg0ba+xqZ6qyazk6IIrjuyDbX9 nuP1SMcRKrFp8plTN4pG2atsAYrXDZ4XpRxHz6x3MfrwkUuyF2GRxD5QWczdjS5VVSY3 c8785blaJAvT6x5qknxg+QEG5J1oL9hsiAFORvhCW3euou6WR5AGfj7e2esnFDpcFuwF X7PxPojkO/tbnV0BFT5+FueqLjSShvuhGYWgTM4GvvvD0ZEItuwlO59P8U0ow8prcauz C1yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713923307; x=1714528107; 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=gebWBBrTSu7bpKrnWlPYXjxLzXv1sON+vhM7CEbEn2k=; b=EP/KE9IEY7Nohm3ofFYmS2ultdQgqBdv/Za0pCDS/qhGGTFF4mPG2fqa8O+hX8o3eb zML09Qbz34J0+vDjCnSwXKAzYHWNgYmMGtTOzP8CNXLftchHdpzU9IFYnrEKUj/DENt+ nvI29dV2qgWXYorAAl0O30/gtls5gaDGpeesuiepGE4gSIqc3SOJ6Y7YGiS/jYfSXZob SZ5blH/AjOfiVeSZcC9a2Q7Pzla3YLxmHJE10Qo17rHilJK1EJnGZqyfWBcJlbD7tXbX Keuv1kdbpUfgqXBgfYkdMdkFNiqXMdjcC5eNZb0Kjg22y1OEKafRk9LvAISy34ZVgMRi Djtw== X-Forwarded-Encrypted: i=1; AJvYcCXVyZN4z++XsOABm0siUZQkuT0Ph/9nemxbN35vggJy8naYHvyLjzVgYq/oogxPRXKu9gKoO0iiuP/i/cQJiJnCaPeth9w5z+fvS1Y3U5Efvw== X-Gm-Message-State: AOJu0YwKAi3h70As1+CFlV1kbLEUnq3IBblN3raqc7dlJh/L7RLMVNpm Q7vw4W1eU8ugEwRqBuTgwibAUn+osr7wvria0qLH1aa8kPTgRIap9ve3fiTM9vL3gXT5T2X5/mJ 0KAxSdSK+tT4ZXcbomt09Sewi6CkCKQFMx3HU0Q== X-Google-Smtp-Source: AGHT+IGnfIafLiwY2r+J411vyzZBKl40iA2T89hKF4lbKaPJxagoXpiEqXNaZzPa+nlm5FAth02udHt5zpDnnPSO/A0= X-Received: by 2002:a17:906:b00b:b0:a58:7832:c278 with SMTP id v11-20020a170906b00b00b00a587832c278mr550823ejy.63.1713923306707; Tue, 23 Apr 2024 18:48:26 -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: <202404232150.43NLoEsI087796@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 23 Apr 2024 19:48:14 -0600 Message-ID: Subject: Re: git: cf04a7775a4e - main - swapon: Do not overwrite Linux swap header To: Jessica Clarke Cc: Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000de798a0616cddde4" 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: 4VPMMc5MZ8z47VT --000000000000de798a0616cddde4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024, 6:16=E2=80=AFPM Jessica Clarke w= rote: > On 23 Apr 2024, at 22:50, Warner Losh wrote: > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dcf04a7775a4e8ff6fd28c768be9daa3= d83dd382e > > > > commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e > > Author: Ricardo Branco > > AuthorDate: 2024-04-23 21:47:56 +0000 > > Commit: Warner Losh > > CommitDate: 2024-04-23 21:48:01 +0000 > > > > swapon: Do not overwrite Linux swap header > > I don=E2=80=99t think this is a sensible default. swapon should, by defau= lt, do > exactly what you asked for, rather than magically do something more > convoluted and different, with no way to opt out of it. The fact that > it looks like some other random OS happened to touch the partition in > the past shouldn=E2=80=99t be relevant; we=E2=80=99re not Linux, we=E2=80= =99re FreeBSD. > Especially in the age of GPT where the OSes have different GUIDs for > their swap partitions. Having some user-friendly way to the gnop dance > seems fine, but it should be optional and off by default, not forced > upon you. As it stands the only way to avoid this silent behaviour > change is to zero out the first 4K of the partition, which is not > user-friendly (and starts to sound like going back to the old days when > that was a common thing to do when partitioning). > > I also don=E2=80=99t believe the patch to be uncontested as you state in = your > comment on the PR; kib@ had last commented on 1083 that it should be > documented and left up to the user to configure. > Yea. I'll back it out... i didn't realize the coupling of the issues until i re-read it... also armv7 is broken... I'm thinking we should just close those two PRs: they aren't ready and the argument is whether to do it or not... Warner Jess > > > Reviewed by: imp, jhb > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1084 > > --- > > sbin/swapon/Makefile | 2 ++ > > sbin/swapon/extern.h | 5 ++++ > > sbin/swapon/swaplinux.c | 66 > +++++++++++++++++++++++++++++++++++++++++++++++++ > > sbin/swapon/swapon.c | 54 +++++++++++++++++++++++++++++++++++++++- > > 4 files changed, 126 insertions(+), 1 deletion(-) > > > > diff --git a/sbin/swapon/Makefile b/sbin/swapon/Makefile > > index 27808aed5857..930e938e5b05 100644 > > --- a/sbin/swapon/Makefile > > +++ b/sbin/swapon/Makefile > > @@ -6,6 +6,8 @@ LINKS=3D ${BINDIR}/swapon ${BINDIR}/swapoff > > LINKS+=3D ${BINDIR}/swapon ${BINDIR}/swapctl > > MLINKS=3D swapon.8 swapoff.8 > > MLINKS+=3Dswapon.8 swapctl.8 > > +SRCS=3D swapon.c swaplinux.c > > +HDRS+=3D extern.h > > > > LIBADD=3D util > > > > diff --git a/sbin/swapon/extern.h b/sbin/swapon/extern.h > > new file mode 100644 > > index 000000000000..cb33dbbee953 > > --- /dev/null > > +++ b/sbin/swapon/extern.h > > @@ -0,0 +1,5 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-3-Clause > > + */ > > + > > +int is_linux_swap(const char *); > > diff --git a/sbin/swapon/swaplinux.c b/sbin/swapon/swaplinux.c > > new file mode 100644 > > index 000000000000..d01a94345e68 > > --- /dev/null > > +++ b/sbin/swapon/swaplinux.c > > @@ -0,0 +1,66 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-3-Clause > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include "extern.h" > > + > > +/* > > + * Definitions and structure taken from > > + * > https://github.com/util-linux/util-linux/blob/master/include/swapheader.h > > + */ > > + > > +#define SWAP_VERSION 1 > > +#define SWAP_UUID_LENGTH 16 > > +#define SWAP_LABEL_LENGTH 16 > > +#define SWAP_SIGNATURE "SWAPSPACE2" > > +#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1) > > + > > +struct swap_header_v1_2 { > > + char bootbits[1024]; /* Space for disklabel etc. */ > > + uint32_t version; > > + uint32_t last_page; > > + uint32_t nr_badpages; > > + unsigned char uuid[SWAP_UUID_LENGTH]; > > + char volume_name[SWAP_LABEL_LENGTH]; > > + uint32_t padding[117]; > > + uint32_t badpages[1]; > > +}; > > + > > +typedef union { > > + struct swap_header_v1_2 header; > > + struct { > > + uint8_t reserved[4096 - SWAP_SIGNATURE_SZ]; > > + char signature[SWAP_SIGNATURE_SZ]; > > + } tail; > > +} swhdr_t; > > + > > +#define sw_version header.version > > +#define sw_volume_name header.volume_name > > +#define sw_signature tail.signature > > + > > +int > > +is_linux_swap(const char *name) > > +{ > > + uint8_t buf[4096]; > > + swhdr_t *hdr =3D (swhdr_t *) buf; > > + int fd; > > + > > + fd =3D open(name, O_RDONLY); > > + if (fd =3D=3D -1) > > + return (-1); > > + > > + if (read(fd, buf, 4096) !=3D 4096) { > > + close(fd); > > + return (-1); > > + } > > + close(fd); > > + > > + return (hdr->sw_version =3D=3D SWAP_VERSION && > > + !memcmp(hdr->sw_signature, SWAP_SIGNATURE, SWAP_SIGNATURE_SZ)); > > +} > > diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c > > index 26a7dc22654a..0f2ad1f5e213 100644 > > --- a/sbin/swapon/swapon.c > > +++ b/sbin/swapon/swapon.c > > @@ -54,10 +54,15 @@ > > #include > > #include > > > > +#include "extern.h" > > + > > +#define _PATH_GNOP "/sbin/gnop" > > + > > static void usage(void) __dead2; > > static const char *swap_on_off(const char *, int, char *); > > static const char *swap_on_off_gbde(const char *, int); > > static const char *swap_on_off_geli(const char *, char *, int); > > +static const char *swap_on_off_linux(const char *, int); > > static const char *swap_on_off_md(const char *, char *, int); > > static const char *swap_on_off_sfile(const char *, int); > > static void swaplist(int, int, int); > > @@ -250,8 +255,13 @@ swap_on_off(const char *name, int doingall, char > *mntops) > > return (swap_on_off_geli(name, mntops, doingall)); > > } > > > > - /* Swap on special file. */ > > free(basebuf); > > + > > + /* Linux swap */ > > + if (is_linux_swap(name)) > > + return (swap_on_off_linux(name, doingall)); > > + > > + /* Swap on special file. */ > > return (swap_on_off_sfile(name, doingall)); > > } > > > > @@ -466,6 +476,48 @@ swap_on_off_geli(const char *name, char *mntops, > int doingall) > > return (swap_on_off_sfile(name, doingall)); > > } > > > > +static const char * > > +swap_on_off_linux(const char *name, int doingall) > > +{ > > + const char *ret; > > + char *nopname; > > + size_t nopnamelen; > > + int error; > > + > > + if (which_prog =3D=3D SWAPON) { > > + /* Skip the header for Linux swap partitions */ > > + error =3D run_cmd(NULL, "%s create -o 4096 %s", _PATH_GNOP, > > + name); > > + if (error) { > > + warnx("gnop (create) error: %s", name); > > + return (NULL); > > + } > > + } > > + > > + /* Append ".nop" to name */ > > + nopnamelen =3D strlen(name) + sizeof(".nop"); > > + nopname =3D (char *) malloc(nopnamelen); > > + if (nopname =3D=3D NULL) > > + err(1, "malloc()"); > > + (void)strlcpy(nopname, name, nopnamelen); > > + (void)strlcat(nopname, ".nop", nopnamelen); > > + > > + ret =3D swap_on_off_sfile(nopname, doingall); > > + > > + if (which_prog =3D=3D SWAPOFF) { > > + error =3D run_cmd(NULL, "%s destroy %s", _PATH_GNOP, nopname); > > + if (error) { > > + warnx("gnop (destroy) error: %s", name); > > + free(nopname); > > + return (NULL); > > + } > > + } > > + > > + free(nopname); > > + > > + return (ret); > > +} > > + > > static const char * > > swap_on_off_md(const char *name, char *mntops, int doingall) > > { > > --000000000000de798a0616cddde4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Apr 23, 2024, 6:16=E2=80=AFPM Jessica Clarke &= lt;jrtc27@freebsd.org> wrote:<= br>
On 23 Apr 2024, at 22:50, Warner Lo= sh <imp@FreeBSD.org> wrote:

> The branch main has been updated by imp:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dcf04a7775a4e8ff6fd28c768be9daa= 3d83dd382e
>
> commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e
> Author:=C2=A0 =C2=A0 =C2=A0Ricardo Branco <rbranco@suse.de>
> AuthorDate: 2024-04-23 21:47:56 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-04-23 21:48:01 +0000
>
>=C2=A0 =C2=A0 swapon: Do not overwrite Linux swap header

I don=E2=80=99t think this is a sensible default. swapon should, by default= , do
exactly what you asked for, rather than magically do something more
convoluted and different, with no way to opt out of it. The fact that
it looks like some other random OS happened to touch the partition in
the past shouldn=E2=80=99t be relevant; we=E2=80=99re not Linux, we=E2=80= =99re FreeBSD.
Especially in the age of GPT where the OSes have different GUIDs for
their swap partitions. Having some user-friendly way to the gnop dance
seems fine, but it should be optional and off by default, not forced
upon you. As it stands the only way to avoid this silent behaviour
change is to zero out the first 4K of the partition, which is not
user-friendly (and starts to sound like going back to the old days when
that was a common thing to do when partitioning).

I also don=E2=80=99t believe the patch to be uncontested as you state in yo= ur
comment on the PR; kib@ had last commented on 1083 that it should be
documented and left up to the user to configure.

Yea. I'll back it out..= . i didn't realize the coupling of the issues until i re-read it... als= o armv7 is broken...

I&#= 39;m thinking we should just close those two PRs: they aren't ready and= the argument is whether to do it or not...

Warner

Jess

>=C2=A0 =C2=A0 Reviewed by: imp, jhb
>=C2=A0 =C2=A0 Pull Request: https://g= ithub.com/freebsd/freebsd-src/pull/1084
> ---
> sbin/swapon/Makefile=C2=A0 =C2=A0 |=C2=A0 2 ++
> sbin/swapon/extern.h=C2=A0 =C2=A0 |=C2=A0 5 ++++
> sbin/swapon/swaplinux.c | 66 +++++++++++++++++++++++++++++++++++++++++= ++++++++
> sbin/swapon/swapon.c=C2=A0 =C2=A0 | 54 +++++++++++++++++++++++++++++++= ++++++++-
> 4 files changed, 126 insertions(+), 1 deletion(-)
>
> diff --git a/sbin/swapon/Makefile b/sbin/swapon/Makefile
> index 27808aed5857..930e938e5b05 100644
> --- a/sbin/swapon/Makefile
> +++ b/sbin/swapon/Makefile
> @@ -6,6 +6,8 @@ LINKS=3D ${BINDIR}/swapon ${BINDIR}/swapoff
> LINKS+=3D ${BINDIR}/swapon ${BINDIR}/swapctl
> MLINKS=3D swapon.8 swapoff.8
> MLINKS+=3Dswapon.8 swapctl.8
> +SRCS=3D swapon.c swaplinux.c
> +HDRS+=3D extern.h
>
> LIBADD=3D util
>
> diff --git a/sbin/swapon/extern.h b/sbin/swapon/extern.h
> new file mode 100644
> index 000000000000..cb33dbbee953
> --- /dev/null
> +++ b/sbin/swapon/extern.h
> @@ -0,0 +1,5 @@
> +/*-
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +int is_linux_swap(const char *);
> diff --git a/sbin/swapon/swaplinux.c b/sbin/swapon/swaplinux.c
> new file mode 100644
> index 000000000000..d01a94345e68
> --- /dev/null
> +++ b/sbin/swapon/swaplinux.c
> @@ -0,0 +1,66 @@
> +/*-
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +#include <fcntl.h>
> +#include <err.h>
> +#include <stdint.h>
> +#include <string.h>
> +#include <unistd.h>
> +
> +#include "extern.h"
> +
> +/*
> + * Definitions and structure taken from
> + * https:/= /github.com/util-linux/util-linux/blob/master/include/swapheader.h
> + */
> +
> +#define SWAP_VERSION 1
> +#define SWAP_UUID_LENGTH 16
> +#define SWAP_LABEL_LENGTH 16
> +#define SWAP_SIGNATURE "SWAPSPACE2"
> +#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1)
> +
> +struct swap_header_v1_2 {
> + char=C2=A0 =C2=A0 =C2=A0 bootbits[1024];=C2=A0 =C2=A0 /* Space for d= isklabel etc. */
> + uint32_t=C2=A0 =C2=A0 =C2=A0 version;
> + uint32_t=C2=A0 =C2=A0 =C2=A0 last_page;
> + uint32_t=C2=A0 =C2=A0 =C2=A0 nr_badpages;
> + unsigned char uuid[SWAP_UUID_LENGTH];
> + char=C2=A0 =C2=A0 =C2=A0 volume_name[SWAP_LABEL_LENGTH];
> + uint32_t=C2=A0 =C2=A0 =C2=A0 padding[117];
> + uint32_t=C2=A0 =C2=A0 =C2=A0 badpages[1];
> +};
> +
> +typedef union {
> + struct swap_header_v1_2 header;
> + struct {
> + uint8_t reserved[4096 - SWAP_SIGNATURE_SZ];
> + char signature[SWAP_SIGNATURE_SZ];
> + } tail;
> +} swhdr_t;
> +
> +#define sw_version header.version
> +#define sw_volume_name header.volume_name
> +#define sw_signature tail.signature
> +
> +int
> +is_linux_swap(const char *name)
> +{
> + uint8_t buf[4096];
> + swhdr_t *hdr =3D (swhdr_t *) buf;
> + int fd;
> +
> + fd =3D open(name, O_RDONLY);
> + if (fd =3D=3D -1)
> + return (-1);
> +
> + if (read(fd, buf, 4096) !=3D 4096) {
> + close(fd);
> + return (-1);
> + }
> + close(fd);
> +
> + return (hdr->sw_version =3D=3D SWAP_VERSION &&
> +=C2=A0 =C2=A0 !memcmp(hdr->sw_signature, SWAP_SIGNATURE, SWAP_SIGN= ATURE_SZ));
> +}
> diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
> index 26a7dc22654a..0f2ad1f5e213 100644
> --- a/sbin/swapon/swapon.c
> +++ b/sbin/swapon/swapon.c
> @@ -54,10 +54,15 @@
> #include <string.h>
> #include <unistd.h>
>
> +#include "extern.h"
> +
> +#define _PATH_GNOP "/sbin/gnop"
> +
> static void usage(void) __dead2;
> static const char *swap_on_off(const char *, int, char *);
> static const char *swap_on_off_gbde(const char *, int);
> static const char *swap_on_off_geli(const char *, char *, int);
> +static const char *swap_on_off_linux(const char *, int);
> static const char *swap_on_off_md(const char *, char *, int);
> static const char *swap_on_off_sfile(const char *, int);
> static void swaplist(int, int, int);
> @@ -250,8 +255,13 @@ swap_on_off(const char *name, int doingall, char = *mntops)
> return (swap_on_off_geli(name, mntops, doingall));
> }
>
> - /* Swap on special file. */
> free(basebuf);
> +
> + /* Linux swap */
> + if (is_linux_swap(name))
> + return (swap_on_off_linux(name, doingall));
> +
> + /* Swap on special file. */
> return (swap_on_off_sfile(name, doingall));
> }
>
> @@ -466,6 +476,48 @@ swap_on_off_geli(const char *name, char *mntops, = int doingall)
> return (swap_on_off_sfile(name, doingall));
> }
>
> +static const char *
> +swap_on_off_linux(const char *name, int doingall)
> +{
> + const char *ret;
> + char *nopname;
> + size_t nopnamelen;
> + int error;
> +
> + if (which_prog =3D=3D SWAPON) {
> + /* Skip the header for Linux swap partitions */
> + error =3D run_cmd(NULL, "%s create -o 4096 %s", _PATH_GNOP= ,
> +=C2=A0 =C2=A0 name);
> + if (error) {
> + warnx("gnop (create) error: %s", name);
> + return (NULL);
> + }
> + }
> +
> + /* Append ".nop" to name */
> + nopnamelen =3D strlen(name) + sizeof(".nop");
> + nopname =3D (char *) malloc(nopnamelen);
> + if (nopname =3D=3D NULL)
> + err(1, "malloc()");
> + (void)strlcpy(nopname, name, nopnamelen);
> + (void)strlcat(nopname, ".nop", nopnamelen);
> +
> + ret =3D swap_on_off_sfile(nopname, doingall);
> +
> + if (which_prog =3D=3D SWAPOFF) {
> + error =3D run_cmd(NULL, "%s destroy %s", _PATH_GNOP, nopna= me);
> + if (error) {
> + warnx("gnop (destroy) error: %s", name);
> + free(nopname);
> + return (NULL);
> + }
> + }
> +
> + free(nopname);
> +
> + return (ret);
> +}
> +
> static const char *
> swap_on_off_md(const char *name, char *mntops, int doingall)
> {

--000000000000de798a0616cddde4-- From nobody Wed Apr 24 03:19: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 4VPPN757mVz5JdBW; Wed, 24 Apr 2024 03:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPPN74S4Rz4HP7; Wed, 24 Apr 2024 03:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713928743; 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=A5wRFnwM7J/irJwG/8RVXU3xGns7LYDE9VUSnthOTe4=; b=NGreFmvUN/3qDrC4ZDxMcnp+Pk7o3IPbehfqu4nVtsbEE+rtFMn0rXMEaZZ3ETCtUia628 k3NYP1PjpuxhlvP4YLRu3OZSfNntpe6BJoeSctRrbICJfO2oo2NMNLKXWThYEVhpp/KWtq xWX3k51EKaJWTjGtwake7hZ7VWrd24e6OiSH+5pgvVN5HkJ0oahdwYNp2h2CKaQGAo7ZYJ vr8S/sU5LUUvwP8A+c2iIZ1FYYBy9NxXGf1sfNWAoYathapyWMgolVL12O0Iefcp9lqcGT 1TijCs0UilaNDVYYA1mDE3xzmQokLbPCVNW60swzQ3tDLjFA3pG9usRj1R5AOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713928743; a=rsa-sha256; cv=none; b=OZpKFBoB8HjtXkjBag08tfqlWeVOqsWOJAoUjZ3d3rMfLLjDQ5+Q6XVEKLSD3CPuIn6Iq9 ogRMS9occf0L1MFMvVh/9qylz+6sexN7JU4I6Cx+vb7Pm64RYn+frouAFb/3JXy7pn49uq GnfiF0/8uQnSis+0iF7NO0+RjcBEGPQn10GJmmbVq9bu+SqCFkpeaU+fXKBJD1hVsRZ3PD /1n4/NYbSYdvFKNcpenaTrtfuAM/rB496KdDlNjYZem2AJ8HZ4DCij/06Pmhl6AqUqWlrs Aqwf3bLAyvNzQXCJzx6MsBipuymKi70ebKINCW2xKLFZTKuuH3k3W7ZfFMEq3w== 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=1713928743; 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=A5wRFnwM7J/irJwG/8RVXU3xGns7LYDE9VUSnthOTe4=; b=tubxtGR+OUMMsgPDjXc+HtL/jea0AmpG0PSxS6wprFg305ru1OWrcWOGzdQi/INmawOTTX lICtvVGjjF23FrIX4090NwCYKiYsS6zRUeW28F4UtKiwoxCn/J2KnR8z0aQDkE+q7mYXkU Be5qP3zd2c5rZKCZRo/1ViMh3oDYdxEl2LzNvaj0lZ8ZQWr0a7k8AwvUtqMtWmNBKwAcuX ev4oWtypOlwXw0I0a7wO86CVrGvJWUmUEyXbOYzclpVejmYztvQSSZazn+8fsp18HLonN6 JUQjDkTdpPIW4GGHP4jvyUqhBfxaT7mgGiajGQiB6UXFVQoze2HrvcKjB+440Q== 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 4VPPN741gNzySD; Wed, 24 Apr 2024 03:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O3J3Uf038931; Wed, 24 Apr 2024 03:19:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O3J3XS038928; Wed, 24 Apr 2024 03:19:03 GMT (envelope-from git) Date: Wed, 24 Apr 2024 03:19:03 GMT Message-Id: <202404240319.43O3J3XS038928@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: 560931508c7d - main - Revert "bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation 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: 560931508c7d69a28bb199b6f6ed855b3e77c52e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=560931508c7d69a28bb199b6f6ed855b3e77c52e commit 560931508c7d69a28bb199b6f6ed855b3e77c52e Author: Warner Losh AuthorDate: 2024-04-24 03:16:58 +0000 Commit: Warner Losh CommitDate: 2024-04-24 03:18:56 +0000 Revert "bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation errors" This reverts commit 91bdebc958bb0da03f604bad19f99e3b10e96ac7. It wasn't as ready as I thought --- usr.sbin/bsdinstall/distfetch/distfetch.c | 33 ++++++++++--------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index 094929d89ea1..c431e187799d 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -46,7 +46,7 @@ static int fetch_files(int nfiles, char **urls); int main(void) { - char *diststring, *dists, *distdir, *distsite; + char *diststring; char **urls; int i; int ndists = 0; @@ -54,24 +54,17 @@ main(void) char error[PATH_MAX + 512]; struct bsddialog_conf conf; - if ((dists = getenv("DISTRIBUTIONS")) == NULL) + if (getenv("DISTRIBUTIONS") == NULL) errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); - if ((distdir = getenv("BSDINSTALL_DISTDIR")) == NULL) - errx(EXIT_FAILURE, "BSDINSTALL_DISTDIR variable is not set"); - - if ((distsite = getenv("BSDINSTALL_DISTSITE")) == NULL) - errx(EXIT_FAILURE, "BSDINSTALL_DISTSITE variable is not set"); - - if ((diststring = strdup(dists)) == NULL) - errx(EXIT_FAILURE, "Error: diststring variable out of memory!"); - + diststring = strdup(getenv("DISTRIBUTIONS")); for (i = 0; diststring[i] != 0; i++) if (isspace(diststring[i]) && !isspace(diststring[i+1])) ndists++; ndists++; /* Last one */ - if ((urls = calloc(ndists, sizeof(char *))) == NULL) { + urls = calloc(ndists, sizeof(const char *)); + if (urls == NULL) { free(diststring); errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!"); } @@ -85,21 +78,15 @@ main(void) bsddialog_backtitle(&conf, OSNAME " Installer"); for (i = 0; i < ndists; i++) { - if ((urls[i] = malloc(PATH_MAX)) == NULL) { - free(urls); - free(diststring); - bsddialog_end(); - errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!"); - } - + urls[i] = malloc(PATH_MAX); snprintf(urls[i], PATH_MAX, "%s/%s", - distsite, strsep(&diststring, " \t")); + getenv("BSDINSTALL_DISTSITE"), strsep(&diststring, " \t")); } - if (chdir(distdir) != 0) { + if (chdir(getenv("BSDINSTALL_DISTDIR")) != 0) { snprintf(error, sizeof(error), - "Could not change to directory %s: %s\n", - distdir, strerror(errno)); + "Could not change to directory %s: %s\n", + getenv("BSDINSTALL_DISTDIR"), strerror(errno)); conf.title = "Error"; bsddialog_msgbox(&conf, error, 0, 0); bsddialog_end(); From nobody Wed Apr 24 03: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 4VPPN90D8rz5Jd0P; Wed, 24 Apr 2024 03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPPN85gG9z4H4Z; Wed, 24 Apr 2024 03:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713928744; 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=blvRggDsgz7AwSB9DF/QAzZkR66k4UVJ87w0rlReH/I=; b=stZpsxKYkhhQE3eCcuUhxblLIumkPhxJsEph6IcrWxA0wIZXffXqattSkOL141JkoIyued IZrkEcmzvckkMct0D+igpOFPchwZ2aXmQDJYZS9ROLFIA0YEfGwVYDV2qBnaatjXvHcutJ cS5hbJq3YO0FzVar5LEDcOTAvJxikzzDqXSg2o9K+myxdgb56MvjURDR9toOUnD5A+gJed lUMK9am1gDnDOPrk+cIn9cQGLm3r4ygZbD5ePEF3rQETQTB0H9Jf9UEDmysy7s+VGSUk1l DaLfYdwMccfMXVAvOa9c0b8cGQEH2VDz2lesNk2fM6LKWjFFc525KAqmSVO4cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713928744; a=rsa-sha256; cv=none; b=D3EbDwvC0UjzApUyPLsL3UT3WNfiy/lGwrLM6QBjdByN2QZdIMx77d05XLApaSV1ejo91L EoPYVJPUEf5uZDvpMfg7mIBpkbcUPgCFMzX1bUPF5tU+Igrglw/rv+rcK0c5OTZ3gdWYmc Nw0w3yAaIhuVwQBXcpUOk77+19Om+XH+nfblKqRvTqSO/nLhTWggImIHiWhrmk2/GLkx7m IULLYdTuSvdKHMpZ3IAWDVwBkF2VJsiDZww7ppWYgJ+Wey8puohosle1YApdtwRSY3nWMi ojyKL3opnJwxan7rkyaq9m7d84iVZTEB3qsqlRngNxJ34tieq11XN1Q9m7BHfg== 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=1713928744; 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=blvRggDsgz7AwSB9DF/QAzZkR66k4UVJ87w0rlReH/I=; b=aLrT/2sGuKCB0OU08LfcYFMY3MreajPKntUQRV7iEn5GSf0yJqq3G41oPMirdwkPyaBFvR MHy6zjzIsKkKwJGWq4MzKu7atlyZ4LE8R51RHRRooiazPuNjp3O2Ik4I97fxJosGyYLuuj VsiBjy1xDk3E4Elhyi4KKtYArpt7hGgza032cmORcLwUqzroo1ou/ktsciS08h/ngzK1Mj UhN/AwT9k42ALq8EG47sT1E6zBhVY2Z08MslyIw++RFJkRToQ5S7iSo+4DsFXrgBQhWAtK 8nI9fJlhVx1hmNOEM5SLlQgo3IDAinlCX6KLhYEh2G22UEmopL6tmbIHO0LpmA== 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 4VPPN84yZTzxwG; Wed, 24 Apr 2024 03:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O3J4hk038990; Wed, 24 Apr 2024 03:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O3J4tw038987; Wed, 24 Apr 2024 03:19:04 GMT (envelope-from git) Date: Wed, 24 Apr 2024 03:19:04 GMT Message-Id: <202404240319.43O3J4tw038987@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: feabaf8d5389 - main - Revert "swapon: Do not overwrite Linux swap 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: feabaf8d5389d43b404aacfcd3298bfed94a41ab Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=feabaf8d5389d43b404aacfcd3298bfed94a41ab commit feabaf8d5389d43b404aacfcd3298bfed94a41ab Author: Warner Losh AuthorDate: 2024-04-24 03:18:00 +0000 Commit: Warner Losh CommitDate: 2024-04-24 03:18:56 +0000 Revert "swapon: Do not overwrite Linux swap header" This reverts commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e.This is broken on armv7, and closer scrutiny of the reviews shows I was in error when I thought it was ready. --- sbin/swapon/Makefile | 2 -- sbin/swapon/extern.h | 5 ---- sbin/swapon/swaplinux.c | 66 ------------------------------------------------- sbin/swapon/swapon.c | 54 +--------------------------------------- 4 files changed, 1 insertion(+), 126 deletions(-) diff --git a/sbin/swapon/Makefile b/sbin/swapon/Makefile index 930e938e5b05..27808aed5857 100644 --- a/sbin/swapon/Makefile +++ b/sbin/swapon/Makefile @@ -6,8 +6,6 @@ LINKS= ${BINDIR}/swapon ${BINDIR}/swapoff LINKS+= ${BINDIR}/swapon ${BINDIR}/swapctl MLINKS= swapon.8 swapoff.8 MLINKS+=swapon.8 swapctl.8 -SRCS= swapon.c swaplinux.c -HDRS+= extern.h LIBADD= util diff --git a/sbin/swapon/extern.h b/sbin/swapon/extern.h deleted file mode 100644 index cb33dbbee953..000000000000 --- a/sbin/swapon/extern.h +++ /dev/null @@ -1,5 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - */ - -int is_linux_swap(const char *); diff --git a/sbin/swapon/swaplinux.c b/sbin/swapon/swaplinux.c deleted file mode 100644 index d01a94345e68..000000000000 --- a/sbin/swapon/swaplinux.c +++ /dev/null @@ -1,66 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include -#include -#include -#include - -#include "extern.h" - -/* - * Definitions and structure taken from - * https://github.com/util-linux/util-linux/blob/master/include/swapheader.h - */ - -#define SWAP_VERSION 1 -#define SWAP_UUID_LENGTH 16 -#define SWAP_LABEL_LENGTH 16 -#define SWAP_SIGNATURE "SWAPSPACE2" -#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1) - -struct swap_header_v1_2 { - char bootbits[1024]; /* Space for disklabel etc. */ - uint32_t version; - uint32_t last_page; - uint32_t nr_badpages; - unsigned char uuid[SWAP_UUID_LENGTH]; - char volume_name[SWAP_LABEL_LENGTH]; - uint32_t padding[117]; - uint32_t badpages[1]; -}; - -typedef union { - struct swap_header_v1_2 header; - struct { - uint8_t reserved[4096 - SWAP_SIGNATURE_SZ]; - char signature[SWAP_SIGNATURE_SZ]; - } tail; -} swhdr_t; - -#define sw_version header.version -#define sw_volume_name header.volume_name -#define sw_signature tail.signature - -int -is_linux_swap(const char *name) -{ - uint8_t buf[4096]; - swhdr_t *hdr = (swhdr_t *) buf; - int fd; - - fd = open(name, O_RDONLY); - if (fd == -1) - return (-1); - - if (read(fd, buf, 4096) != 4096) { - close(fd); - return (-1); - } - close(fd); - - return (hdr->sw_version == SWAP_VERSION && - !memcmp(hdr->sw_signature, SWAP_SIGNATURE, SWAP_SIGNATURE_SZ)); -} diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 0f2ad1f5e213..26a7dc22654a 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -54,15 +54,10 @@ #include #include -#include "extern.h" - -#define _PATH_GNOP "/sbin/gnop" - static void usage(void) __dead2; static const char *swap_on_off(const char *, int, char *); static const char *swap_on_off_gbde(const char *, int); static const char *swap_on_off_geli(const char *, char *, int); -static const char *swap_on_off_linux(const char *, int); static const char *swap_on_off_md(const char *, char *, int); static const char *swap_on_off_sfile(const char *, int); static void swaplist(int, int, int); @@ -255,13 +250,8 @@ swap_on_off(const char *name, int doingall, char *mntops) return (swap_on_off_geli(name, mntops, doingall)); } - free(basebuf); - - /* Linux swap */ - if (is_linux_swap(name)) - return (swap_on_off_linux(name, doingall)); - /* Swap on special file. */ + free(basebuf); return (swap_on_off_sfile(name, doingall)); } @@ -476,48 +466,6 @@ swap_on_off_geli(const char *name, char *mntops, int doingall) return (swap_on_off_sfile(name, doingall)); } -static const char * -swap_on_off_linux(const char *name, int doingall) -{ - const char *ret; - char *nopname; - size_t nopnamelen; - int error; - - if (which_prog == SWAPON) { - /* Skip the header for Linux swap partitions */ - error = run_cmd(NULL, "%s create -o 4096 %s", _PATH_GNOP, - name); - if (error) { - warnx("gnop (create) error: %s", name); - return (NULL); - } - } - - /* Append ".nop" to name */ - nopnamelen = strlen(name) + sizeof(".nop"); - nopname = (char *) malloc(nopnamelen); - if (nopname == NULL) - err(1, "malloc()"); - (void)strlcpy(nopname, name, nopnamelen); - (void)strlcat(nopname, ".nop", nopnamelen); - - ret = swap_on_off_sfile(nopname, doingall); - - if (which_prog == SWAPOFF) { - error = run_cmd(NULL, "%s destroy %s", _PATH_GNOP, nopname); - if (error) { - warnx("gnop (destroy) error: %s", name); - free(nopname); - return (NULL); - } - } - - free(nopname); - - return (ret); -} - static const char * swap_on_off_md(const char *name, char *mntops, int doingall) { From nobody Wed Apr 24 03:28:25 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 4VPPbD3KGSz5JfDt for ; Wed, 24 Apr 2024 03:28:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPPbC6Z4mz4JjW for ; Wed, 24 Apr 2024 03:28:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-516d3a470d5so7968000e87.3 for ; Tue, 23 Apr 2024 20:28:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1713929317; x=1714534117; 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=tLBfZrUot7JTc6M8RhNNq09LLplwrMoPYmhHS2Ae3Wk=; b=kHCiqdDuMxOO9jcqB4WtWpz1NRtYnH8Ug09gVzYlq9zWixvF/TmUaWciZ4qAfTnDk6 w4lloY82hjdEWduFHtXBI/lv7R5M0bBAe52yxVjaH3PNnXcTZur7w25Nwzg58QTLB9Yq lkBovYckPboUbpD6ZqyQvOyZCvTF3xFaVcfZvGA4tQcxCo9UfMt+d4yWMLG4zDucTUs4 YZlwsSgyS+qJ3c93ZJXJ5Gjyl8b00KEhOouxoPCC9CqR2mqqYvmt8uMavjAxrMI43+wT fhkeh4LM3sxDxC58OR4OxY80KRqkQVPqjYgwEOYn+YrsjzMONKLGZR7BngMoiansaGad DP1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713929317; x=1714534117; 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=tLBfZrUot7JTc6M8RhNNq09LLplwrMoPYmhHS2Ae3Wk=; b=WtUp7dnGA1sHCRHS83iozyYAJmP4WefSCdy6ZFK0JKJ2TUcc9/WgZQdtu0u42Itvbs 35EKHrpKzFKSCTXW+G6izrZknt9aqcUaArFFk+nqSKSI5vamWssY/BmUA0P0gu+qX8ms fQtTFF0AMZLzvhBmCSKpgn1JsDZH8poloij/ZLff6C4+6q3/yKkIDu5piptAvCdmhxkn 8b9tgLE7GkNWcZii43CmsjJilvAPr8obFup7IviUqmbmQ2R25bYn+DR7X0yl44oSZ/bC mBvZ7b/iei2rr/9JAzWQPxyYCv5D0bZFFPdemfF8iMmLnbTkkd0ZfWYXWMM4ZcMjrIKh yvHQ== X-Forwarded-Encrypted: i=1; AJvYcCWqE3WR+RoqmmhDFB9GwKbHRGYB6aCTThSP8E04xHqvkAvi0d2IpnwBUytr9OkGB9UZ9F9mfNV44BYY83C2auTyavsyuPb8TWZZL2u5Gk4ULA== X-Gm-Message-State: AOJu0Yz4wXwYuUPOvaMvKra9OEZ9wor3B36IlfZj2w5EFVKV9d1fN3+r hmMruqebvn3fcV153U60cuNTj8NWAaKu2j79dG7XEkJt5zjM6mRgIR42MoZnfvOsPx84G8unjPH 9wUAhMutOamHsYvgg39BM3Mtb0iz6I+fipFStfA== X-Google-Smtp-Source: AGHT+IGModitcFOwINgolXN6Y3e2CiOCZf1JUDY+wKRY4xjLeKcrkcPcyVaD1T3H55WgOrRLQAHNTD8tdcNMkOq3pn4= X-Received: by 2002:a05:6512:3d2a:b0:518:dc5b:6f4a with SMTP id d42-20020a0565123d2a00b00518dc5b6f4amr1191546lfv.45.1713929317020; Tue, 23 Apr 2024 20:28:37 -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: <202404232242.43NMgqxx082026@gitrepo.freebsd.org> <9C180198-A6B6-41D3-AB49-D9582D356ADE@freebsd.org> In-Reply-To: <9C180198-A6B6-41D3-AB49-D9582D356ADE@freebsd.org> From: Warner Losh Date: Tue, 23 Apr 2024 21:28:25 -0600 Message-ID: Subject: Re: git: 91bdebc958bb - main - bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation errors To: Jessica Clarke Cc: Warner Losh , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000001c939c0616cf44d6" 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: 4VPPbC6Z4mz4JjW --0000000000001c939c0616cf44d6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I've backed this out as well... I'd thought that the style stuff had been worked out... And I'll leave the pull request closed since our newer guidance would suggest this isn't enough of a win (I've been processing the older ones under the old guidance on this point, but now I'm questioning that)... The cleanups aren't that bad (moduo style), but they don't really move the needle enough and would only be acceptable in the context of other improvements (though even then it might be tough to justify). Warner On Tue, Apr 23, 2024 at 6:21=E2=80=AFPM Jessica Clarke = wrote: > On 23 Apr 2024, at 23:42, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D91bdebc958bb0da03f604bad19f99e3= b10e96ac7 > > > > commit 91bdebc958bb0da03f604bad19f99e3b10e96ac7 > > Author: rilysh > > AuthorDate: 2024-04-23 22:40:19 +0000 > > Commit: Warner Losh > > CommitDate: 2024-04-23 22:42:38 +0000 > > > > bsdinstall/distfetch.c: check environment variables before > downloading and handle memory allocation errors > > > > 1. Currently, distfetch checks environment variables existence > > when it will use them or in a case (in chdir()) it doesn't check > > at all. As they are necessary to set before doing anything with > > it, check them, if they set or not, before proceeding any further. > > This also avoids extra cleaning when that environment variable > > isn't set. > > > > 2. Handle memory allocation error in malloc(PATH_MAX) and replace > > (sizeof const char *) with (sizeof char *). Both are similar and > > const doesn't have a size. > > Latter is fine I guess but they=E2=80=99re the same by definition, it=E2= =80=99s churn. > > > 3. Indent the error message a bit in chdir(). > > AKA violate style(9). > > > Signed-off-by: rilysh > > Reviewed by: imp > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1071 > > --- > > usr.sbin/bsdinstall/distfetch/distfetch.c | 33 > +++++++++++++++++++++---------- > > 1 file changed, 23 insertions(+), 10 deletions(-) > > > > diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c > b/usr.sbin/bsdinstall/distfetch/distfetch.c > > index c431e187799d..094929d89ea1 100644 > > --- a/usr.sbin/bsdinstall/distfetch/distfetch.c > > +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c > > @@ -46,7 +46,7 @@ static int fetch_files(int nfiles, char **urls); > > int > > main(void) > > { > > - char *diststring; > > + char *diststring, *dists, *distdir, *distsite; > > char **urls; > > int i; > > int ndists =3D 0; > > @@ -54,17 +54,24 @@ main(void) > > char error[PATH_MAX + 512]; > > struct bsddialog_conf conf; > > > > - if (getenv("DISTRIBUTIONS") =3D=3D NULL) > > + if ((dists =3D getenv("DISTRIBUTIONS")) =3D=3D NULL) > > errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); > > > > - diststring =3D strdup(getenv("DISTRIBUTIONS")); > > + if ((distdir =3D getenv("BSDINSTALL_DISTDIR")) =3D=3D NULL) > > + errx(EXIT_FAILURE, "BSDINSTALL_DISTDIR variable is not set"); > > + > > + if ((distsite =3D getenv("BSDINSTALL_DISTSITE")) =3D=3D NULL) > > + errx(EXIT_FAILURE, "BSDINSTALL_DISTSITE variable is not set"); > > + > > + if ((diststring =3D strdup(dists)) =3D=3D NULL) > > + errx(EXIT_FAILURE, "Error: diststring variable out of memory!"); > > + > > for (i =3D 0; diststring[i] !=3D 0; i++) > > if (isspace(diststring[i]) && !isspace(diststring[i+1])) > > ndists++; > > ndists++; /* Last one */ > > > > - urls =3D calloc(ndists, sizeof(const char *)); > > - if (urls =3D=3D NULL) { > > + if ((urls =3D calloc(ndists, sizeof(char *))) =3D=3D NULL) { > > Moving into the if is pointless. > > > free(diststring); > > errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!"); > > } > > @@ -78,15 +85,21 @@ main(void) > > bsddialog_backtitle(&conf, OSNAME " Installer"); > > > > for (i =3D 0; i < ndists; i++) { > > - urls[i] =3D malloc(PATH_MAX); > > + if ((urls[i] =3D malloc(PATH_MAX)) =3D=3D NULL) { > > Moving into the if is pointless. > > > + free(urls); > > + free(diststring); > > Like I said in the review, reviewing urls and diststring but not the > elements of urls is a stupid halfway house, and it=E2=80=99s all a waste = of > time when you=E2=80=99re about to call errx. If one wants to be super ped= antic > and free memory prior to calling errx, fine, but do it in full, don=E2=80= =99t > do an arbitrary subset. > > > + bsddialog_end(); > > + errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!"); > > + } > > + > > snprintf(urls[i], PATH_MAX, "%s/%s", > > - getenv("BSDINSTALL_DISTSITE"), strsep(&diststring, " \t")); > > + distsite, strsep(&diststring, " \t")); > > Breaks style(9). > > > } > > > > - if (chdir(getenv("BSDINSTALL_DISTDIR")) !=3D 0) { > > + if (chdir(distdir) !=3D 0) { > > snprintf(error, sizeof(error), > > - "Could not change to directory %s: %s\n", > > - getenv("BSDINSTALL_DISTDIR"), strerror(errno)); > > + "Could not change to directory %s: %s\n", > > + distdir, strerror(errno)); > > Breaks style(9). > > Jess > > > conf.title =3D "Error"; > > bsddialog_msgbox(&conf, error, 0, 0); > > bsddialog_end(); > > --0000000000001c939c0616cf44d6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've backed this out as well... I'd thought t= hat the style stuff had been worked out...

And I&#= 39;ll leave the pull request closed since our newer guidance would suggest = this isn't enough of a win (I've been processing the older ones und= er the old guidance on this point, but now I'm questioning that)... The= cleanups aren't that bad (moduo style), but they don't really move= the needle enough and would only be acceptable in the context of other imp= rovements (though even then it might be tough to justify).

Warner

On Tue, Apr 23, 2024 at 6:21=E2=80=AFPM Jessica Clarke &= lt;jrtc27@freebsd.org> wrote:<= br>
On 23 Apr 2024, = at 23:42, Warner Losh <imp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D91bdebc958bb0da03f604bad19f99e3b10e96ac7<= /a>
>
> commit 91bdebc958bb0da03f604bad19f99e3b10e96ac7
> Author:=C2=A0 =C2=A0 =C2=A0rilysh <
nightquick@proton.me>
> AuthorDate: 2024-04-23 22:40:19 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-04-23 22:42:38 +0000
>
>=C2=A0 =C2=A0 bsdinstall/distfetch.c: check environment variables befor= e downloading and handle memory allocation errors
>
>=C2=A0 =C2=A0 1. Currently, distfetch checks environment variables exis= tence
>=C2=A0 =C2=A0 when it will use them or in a case (in chdir()) it doesn&= #39;t check
>=C2=A0 =C2=A0 at all. As they are necessary to set before doing anythin= g with
>=C2=A0 =C2=A0 it, check them, if they set or not, before proceeding any= further.
>=C2=A0 =C2=A0 This also avoids extra cleaning when that environment var= iable
>=C2=A0 =C2=A0 isn't set.
>
>=C2=A0 =C2=A0 2. Handle memory allocation error in malloc(PATH_MAX) and= replace
>=C2=A0 =C2=A0 (sizeof const char *) with (sizeof char *). Both are simi= lar and
>=C2=A0 =C2=A0 const doesn't have a size.

Latter is fine I guess but they=E2=80=99re the same by definition, it=E2=80= =99s churn.

>=C2=A0 =C2=A0 3. Indent the error message a bit in chdir().

AKA violate style(9).

>=C2=A0 =C2=A0 Signed-off-by: rilysh <nightquick@proton.me>
>=C2=A0 =C2=A0 Reviewed by: imp
>=C2=A0 =C2=A0 Pull Request: https://github.com/f= reebsd/freebsd-src/pull/1071
> ---
> usr.sbin/bsdinstall/distfetch/distfetch.c | 33 +++++++++++++++++++++--= --------
> 1 file changed, 23 insertions(+), 10 deletions(-)
>
> diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdi= nstall/distfetch/distfetch.c
> index c431e187799d..094929d89ea1 100644
> --- a/usr.sbin/bsdinstall/distfetch/distfetch.c
> +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c
> @@ -46,7 +46,7 @@ static int fetch_files(int nfiles, char **urls);
> int
> main(void)
> {
> - char *diststring;
> + char *diststring, *dists, *distdir, *distsite;
> char **urls;
> int i;
> int ndists =3D 0;
> @@ -54,17 +54,24 @@ main(void)
> char error[PATH_MAX + 512];
> struct bsddialog_conf conf;
>
> - if (getenv("DISTRIBUTIONS") =3D=3D NULL)
> + if ((dists =3D getenv("DISTRIBUTIONS")) =3D=3D NULL)
> errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set");
>
> - diststring =3D strdup(getenv("DISTRIBUTIONS"));
> + if ((distdir =3D getenv("BSDINSTALL_DISTDIR")) =3D=3D NULL= )
> + errx(EXIT_FAILURE, "BSDINSTALL_DISTDIR variable is not set"= ;);
> +
> + if ((distsite =3D getenv("BSDINSTALL_DISTSITE")) =3D=3D NU= LL)
> + errx(EXIT_FAILURE, "BSDINSTALL_DISTSITE variable is not set&quo= t;);
> +
> + if ((diststring =3D strdup(dists)) =3D=3D NULL)
> + errx(EXIT_FAILURE, "Error: diststring variable out of memory!&q= uot;);
> +
> for (i =3D 0; diststring[i] !=3D 0; i++)
> if (isspace(diststring[i]) && !isspace(diststring[i+1]))
> ndists++;
> ndists++; /* Last one */
>
> - urls =3D calloc(ndists, sizeof(const char *));
> - if (urls =3D=3D NULL) {
> + if ((urls =3D calloc(ndists, sizeof(char *))) =3D=3D NULL) {

Moving into the if is pointless.

> free(diststring);
> errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!");<= br> > }
> @@ -78,15 +85,21 @@ main(void)
> bsddialog_backtitle(&conf, OSNAME " Installer");
>
> for (i =3D 0; i < ndists; i++) {
> - urls[i] =3D malloc(PATH_MAX);
> + if ((urls[i] =3D malloc(PATH_MAX)) =3D=3D NULL) {

Moving into the if is pointless.

> + free(urls);
> + free(diststring);

Like I said in the review, reviewing urls and diststring but not the
elements of urls is a stupid halfway house, and it=E2=80=99s all a waste of=
time when you=E2=80=99re about to call errx. If one wants to be super pedan= tic
and free memory prior to calling errx, fine, but do it in full, don=E2=80= =99t
do an arbitrary subset.

> + bsddialog_end();
> + errx(EXIT_FAILURE, "Error: distfetch URLs out of memory!")= ;
> + }
> +
> snprintf(urls[i], PATH_MAX, "%s/%s",
> -=C2=A0 =C2=A0 getenv("BSDINSTALL_DISTSITE"), strsep(&di= ststring, " \t"));
> + distsite, strsep(&diststring, " \t"));

Breaks style(9).

> }
>
> - if (chdir(getenv("BSDINSTALL_DISTDIR")) !=3D 0) {
> + if (chdir(distdir) !=3D 0) {
> snprintf(error, sizeof(error),
> -=C2=A0 =C2=A0 "Could not change to directory %s: %s\n",
> -=C2=A0 =C2=A0 getenv("BSDINSTALL_DISTDIR"), strerror(errno)= );
> + "Could not change to directory %s: %s\n",
> + distdir, strerror(errno));

Breaks style(9).

Jess

> conf.title =3D "Error";
> bsddialog_msgbox(&conf, error, 0, 0);
> bsddialog_end();

--0000000000001c939c0616cf44d6-- From nobody Wed Apr 24 05:33: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 4VPSMg4qyYz5JqPg; Wed, 24 Apr 2024 05:33: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPSMg4KNfz4XXQ; Wed, 24 Apr 2024 05:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713936831; 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=EI40gCwItkAy8zqUwXvah1h5ls23p93iUKhmgMzOn6w=; b=e0ec9zURJXGosdFyBV4grJ/OvjUN6FaiJhcUbIPqVb62ajueesa9oI9h1kgDygGhUdMlFI sIAbvYyeRXj4/l4v7F7AdVCIgUsOpRagSfbJIlxXJPUgU5FkyFM4Do8Yi0GYm9tcwkp/Ba yowAjgaXDUB3KmxRbURrSq2xy0s1ZQ5hnQz2RsNW5lgTOPLsXW7cYr32J7chAT2ENleyld yhQBZqN9Xc5a3U/rtVlELQ1BpI9kNz8zLEwLu2holu8VKbNEAPGmibXj0UNQ6Xz2KiJWEL RsrfKsXJvaISxw7eTuJ5ijGUyeJpCEp5iXmF9Bsyhi/h87kxLqros7AYGm7iSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713936831; a=rsa-sha256; cv=none; b=f8oIBMoRmkRey+eKE+APRP7L+4Ly90d8hIEz1sFHEToWxU8hBuNYOkyPvgHItRo5ducBry cToVOmFGsZV2Abpmq31Z0BQ/2GiLAwTJvWU9lqUS1U1peomXR8e4YYHTh2j05cb8ow6DY9 N7qsfSz+gE83dff9FK5MBjU6h1HGVL97EHwcf9mS6pxKgNFIiOUu1k6CbVFgMV/4v3/kYF 336uCNA0wVYs0s8cFmKiZuhYZ22Ckv41r40o3nLhFAi6bxRns3qJ85Xn7LqpjEuDohVEEZ vuV9Xfw+7aeQZ/kCUFzkhP8dkxtvfByEuwtW+mrsCPjma+PQ+/xMW1zZSKSh8Q== 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=1713936831; 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=EI40gCwItkAy8zqUwXvah1h5ls23p93iUKhmgMzOn6w=; b=uIkzuOAtCSYH07Q2muK64731r2SZL8WIRcxSPlQU3XW6AZ7EpeQjDNgFhIAcr2OT2Hu9pX Woa78dj13xAHX2iITEspcOOPtEMB3+AYfc3X6dtgo/WOSrm5P75Kv5E61gprgGZzUb3zgS TakFSTrYKJz0Ruq3Qi++SZXVqeqZO/H0qrwNi0hnCD+Wa2UQdEP0I5+Qr2cDGOsD8EPQ62 QO2FIDA9j2TTmfczPiYLJWabvPi3rOnhzzZeeeP00JCBMFLX5DNgTdfsg2dvkJUymw4hZl M9401QOMxgnXN4JjCZBEOX1KrB7QGuClmGjlw0qpOV9ppT8PFNvepu22erYhbA== 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 4VPSMg3sGCz13D6; Wed, 24 Apr 2024 05:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O5XpGP074346; Wed, 24 Apr 2024 05:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O5Xpox074343; Wed, 24 Apr 2024 05:33:51 GMT (envelope-from git) Date: Wed, 24 Apr 2024 05:33:51 GMT Message-Id: <202404240533.43O5Xpox074343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: cae336280b0d - main - MFV: less: Do not trust st_size if it equals zero 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: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cae336280b0d7ad3d49788c5fc0986f91328eb50 Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=cae336280b0d7ad3d49788c5fc0986f91328eb50 commit cae336280b0d7ad3d49788c5fc0986f91328eb50 Merge: feabaf8d5389 e8ec4b5d1202 Author: Ricardo Branco AuthorDate: 2024-04-24 05:29:46 +0000 Commit: Xin LI CommitDate: 2024-04-24 05:33:26 +0000 MFV: less: Do not trust st_size if it equals zero This is a smaller version of upstream 1fafd968b48e5cea6c85f126d77071a8de707a55 to address the issue that less not being able to operate on files residing in pseudo-filesystems that advertize a zero size value. PR: bin/276133 MFC after: 3 days contrib/less/ch.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) From nobody Wed Apr 24 05:55: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 4VPSr62qxQz5Js75; Wed, 24 Apr 2024 05:55:02 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPSr62LBmz4bTn; Wed, 24 Apr 2024 05:55:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713938102; 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=6phvVLuvFmcENJ3P8V1+T5OMFa6d9HnhnsxepZAwtJI=; b=l/ksok6y4NzjnH6OwPejUY17rOmf/XUBeASqtnHYcqUpIIRz3SkyLk/ihOU+RZd5MGd1Nr okvLNTzGzSrEGj7GJ1lT0uSvE5Ds9EMyihQqraSK+uQ26w0d/IkB0JDlw3I9lepVzu+6vX cXPKB4KGimzn+9UDo3wyZYEN8CwBoKZRKVXN9N6dH243Gx/GzZw5KDNuCW3dkSTiYsy2DB Ag0EC4kCKhvdwNQ8qG8cMQ2Ur0y1hLdnzzWqfYwELBBXvZSGte9KOGKMrP1i1KlECFAt4n Og08+AvnU7IZ304lDg8uSghbPoeXFfqqjtGoC+5fdhoJ7DPQobJ17v0/fzVuug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713938102; a=rsa-sha256; cv=none; b=fNIW355RiavAeyHhc0tknxC/XfIX72phaSw6Db2fXuLqGjcz0KlPrrnMM/2CWD0uf6+nIQ DjzxJxjE7BcWvR+1zZvl5ZDXzw+tIV4ic9wvxhcr9uE9l4JBOI/8N4CUwi4ooQJ6Pak811 fTgeqlQ1IQOQ1peUrI2uOpa5MURHPjliejfjZ8T0/HJm/K4N9qkYJA9zMY/EQ3VQwFQKv8 71Q42h1RWRXQFdVKMAxxv6fbtFswJ2TQ76LGPN2ZqoDzSO7gC+oM6tnax91ppydCqCsKNY 1VMho5ctCewQdICIUAsVnqR1Bsa/Yuw60Bssd39hUkhgUNC27l9AG4z7fyoJ1w== 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=1713938102; 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=6phvVLuvFmcENJ3P8V1+T5OMFa6d9HnhnsxepZAwtJI=; b=dawadovZZxRRGboNjfbnDqvvqaARLAZegYEQLKq/EGBpwCqt2w6NsjKOr2P3FB3d59uCAU mZSGGij1RODrFn2MKBJo8nRNTlBoXJdL/VMvo9xnNoO+6XHX6aHACyIkuq6FPLXIEjIP8e xs4unMx3wMm6P0jkM+siWibUB9SgGqc6hksCaCkYfyalQAB1vQzoZ9Fj63insWTjbiVfHh AbSVOKAS51BqKbvBtl27+sxi01wUHEc20jC4mpQqXKtgIkEpQZsJFLuktddsiFWMQ93GD1 cxD90PmZ3nRnQtfTy9H/JlkqBMoL8q6umQh1e8xdMM9cUkGkF58W46PVVL/SJA== 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 4VPSr61sKtz13Fd; Wed, 24 Apr 2024 05:55:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O5t2L8008644; Wed, 24 Apr 2024 05:55:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O5t2BC008641; Wed, 24 Apr 2024 05:55:02 GMT (envelope-from git) Date: Wed, 24 Apr 2024 05:55:02 GMT Message-Id: <202404240555.43O5t2BC008641@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: 9e248b7f645c - main - kdc: Add restart 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e248b7f645cdf05615a49cc15295df49b54d659 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9e248b7f645cdf05615a49cc15295df49b54d659 commit 9e248b7f645cdf05615a49cc15295df49b54d659 Author: Cy Schubert AuthorDate: 2024-04-18 18:56:54 +0000 Commit: Cy Schubert CommitDate: 2024-04-24 05:50:38 +0000 kdc: Add restart option Add a new kdc_restart rc variable that manages kdc (or krb5kdc) under daemon(8). This automatically restarts the kdc should it fail, i.e. when it's configured to use LDAP as a backend and cannot connect to its LDAP directory. Set kdc_restart="YES" to auto restart kdc on abnormal termination. Set kdc_restart_delay="N" to the number of seconds to delay before restarting the kdc. The daemon(8) default seconds applies when not set. Reported by: Lexi Winter PR: 278395 Differential Revision: https://reviews.freebsd.org/D44898 --- libexec/rc/rc.conf | 2 ++ libexec/rc/rc.d/kdc | 29 +++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 6a8b6e257b17..c91f13bd9812 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -330,6 +330,8 @@ resolv_enable="YES" # Enable resolv / resolvconf kdc_enable="NO" # Run a kerberos 5 KDC (or NO). kdc_program="/usr/libexec/kdc" # path to kerberos 5 KDC kdc_flags="" # Additional flags to the kerberos 5 KDC +kdc_restart="NO" # Auto restart kdc on abnormal termination +kdc_restart_delay="" # Auto restart delay seconds kadmind_enable="NO" # Run kadmind (or NO) kadmind_program="/usr/libexec/kadmind" # path to kadmind kpasswdd_enable="NO" # Run kpasswdd (or NO) diff --git a/libexec/rc/rc.d/kdc b/libexec/rc/rc.d/kdc index c3059f261e09..a2d9f87f8e20 100755 --- a/libexec/rc/rc.d/kdc +++ b/libexec/rc/rc.d/kdc @@ -12,15 +12,40 @@ name=kdc desc="Kerberos 5 server" rcvar=${name}_enable +: ${kdc_restart:="NO"} +: ${kdc_restart_delay:=""} set_rcvar_obsolete kerberos5_server_enable kdc_enable set_rcvar_obsolete kerberos5_server kdc_program set_rcvar_obsolete kerberos5_server_flags kdc_flags - load_rc_config $name if [ "${kdc_program}" = /usr/libexec/kdc -o \ "${kdc_program}" = /usr/local/libexec/kdc ]; then - command_args="$command_args --detach" + detach="--detach" + flavor=heimdal +else + flavor=mit + unset detach fi + +case ${kdc_restart} in +[Yy][Ee][Ss]) + if [ "$flavor" = mit ]; then + detach=-n + else + unset detach + fi + case ${kdc_restart_delay} in + "") unset daemon_restart_delay;; + *) daemon_restart_delay="-R ${kdc_restart_delay}";; + esac + command_args="-r ${daemon_restart_delay} ${kdc_program} ${detach} ${command_args}" + kdc_program=/usr/sbin/daemon + ;; +*) + command_args="${detach} ${command_args}" + ;; +esac + run_rc_command "$1" From nobody Wed Apr 24 05:55: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 4VPSr73vdGz5Js3p; Wed, 24 Apr 2024 05:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPSr73Fc6z4bjM; Wed, 24 Apr 2024 05:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713938103; 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=jgP0gX2MQ8ADTYCbkzBih3co4JNuGD7VQFDobPzEYag=; b=yOldZ3VLwa9AljJ8xrrCMzfia5lw0ESzxzmCSWIOIFDN53drtNVNqjonjm2dSPe8BPLG9C w6ld09h6FUtohQprLibRVQjZXVCaZVQUkYhWVe132Khgm3HY3Sn8o/Oxv8aZSgwP3aEmtC IovtxR/GRAE2Pm/E0FapyK9QKA0Dli0Zjw0GbDHEtqrRSpUUkrHP9r3RNbp0KNI5suYxHN JGIF1F3Gk/lmMSVWgoHfo4wjxA62QbnWpHVYFO13nP28xkA8oQh7/v8ouWqWm9ekI3T8KO KqvqatRhr5K/kpNI5tDSBQV/1rZOf2P0MswONtC2G3BMZHAohBvQoY+te5TQhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713938103; a=rsa-sha256; cv=none; b=fSTMjZUKMJiZRyi8Ghtf5gEqRq4Ea9Tv5oLh96tpm2GIu1Aib+LksMWUgnmhLx0o1E85ql QEhOg5AksquW/HgxR8IMVwAMi24vsFyB0I2ER7h1Qdno/06Sm7p1d9xhEpP1ZzhkHwBEkK EvLo87wQAuhRxpsXQrEqjl8gVU4ZNSZRffbAQd8wvlp/fwt8midWOgJ2V6kgPQUtuhT03F 9mA04RlslJJdx28QtUfXDhgKkfpetvIxPMq8Xibx34cgE2BmF1gOlEJliEYALJMMXcrNUI J2wdx+kDSz4CuNOHEgD342cXQTDFEsruaYYJMbGpMn1WXe8A454w2kGrStDVtQ== 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=1713938103; 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=jgP0gX2MQ8ADTYCbkzBih3co4JNuGD7VQFDobPzEYag=; b=h7z0SWTV4YnoBtaOSXdUIAD3DZYEiAoXXSiQ7E7eMU/0L6T9BHNMF319q61plCvclGxZFo 9GbWAr1H3Zp+cFPNc7tUeVbmP2oJXJQOEwsUmomhy5XqH6TP4jQEv3aszQOFHpJR9639Ux j9izWbd3zGXDbk3ycsLamtDpNE94ttYTuQKRQhAJ6H1HkdeKdSFj6HB4WrnnK24FkopwNu UtL9QVP0Y1UWk71jwszrEmDVOzraTH1SMCfg/WSFK/RvrE3CCvkRpyahYUElFbdzdG3F5E SX0OiLgfc8s+P1br8lzUxpdwc6ArlSSOCiWwsHh1MSTwUVBbIwRZWom/qdVyYA== 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 4VPSr72s1nz13CH; Wed, 24 Apr 2024 05:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O5t35h008698; Wed, 24 Apr 2024 05:55:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O5t3Of008695; Wed, 24 Apr 2024 05:55:03 GMT (envelope-from git) Date: Wed, 24 Apr 2024 05:55:03 GMT Message-Id: <202404240555.43O5t3Of008695@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: a0d7d68a2dd8 - main - heimdal: Fix compiling hdb ldap as a module 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: a0d7d68a2dd818ce84e37e1ff20c8849cda6d853 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a0d7d68a2dd818ce84e37e1ff20c8849cda6d853 commit a0d7d68a2dd818ce84e37e1ff20c8849cda6d853 Author: Cy Schubert AuthorDate: 2014-01-10 19:18:06 +0000 Commit: Cy Schubert CommitDate: 2024-04-24 05:54:20 +0000 heimdal: Fix compiling hdb ldap as a module Fix build when WITH_OPENLDAP defined. PR: 278430 Obtained from: Upstream c1c7da7f79 --- crypto/heimdal/lib/hdb/hdb-ldap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crypto/heimdal/lib/hdb/hdb-ldap.c b/crypto/heimdal/lib/hdb/hdb-ldap.c index 1b4024aa540a..d58ffe8e06e9 100644 --- a/crypto/heimdal/lib/hdb/hdb-ldap.c +++ b/crypto/heimdal/lib/hdb/hdb-ldap.c @@ -44,6 +44,9 @@ static krb5_error_code LDAP__connect(krb5_context context, HDB *); static krb5_error_code LDAP_close(krb5_context context, HDB *); +static krb5_error_code hdb_ldap_create(krb5_context context, HDB **, const char *); +static krb5_error_code hdb_ldapi_create(krb5_context context, HDB **, const char *); + static krb5_error_code LDAP_message2entry(krb5_context context, HDB * db, LDAPMessage * msg, int flags, hdb_entry_ex * ent); @@ -797,10 +800,10 @@ need_quote(unsigned char c) (c == 0x7f); } -const static char hexchar[] = "0123456789ABCDEF"; +static const char hexchar[] = "0123456789ABCDEF"; static krb5_error_code -escape_value(krb5_context context, const unsigned char *unquoted, char **quoted) +escape_value(krb5_context context, const char *unquoted, char **quoted) { size_t i, len; @@ -816,7 +819,7 @@ escape_value(krb5_context context, const unsigned char *unquoted, char **quoted) } for (i = 0; unquoted[0] ; unquoted++) { - if (need_quote((unsigned char *)unquoted[0])) { + if (need_quote((unsigned char)unquoted[0])) { (*quoted)[i++] = '\\'; (*quoted)[i++] = hexchar[(unquoted[0] >> 4) & 0xf]; (*quoted)[i++] = hexchar[(unquoted[0] ) & 0xf]; From nobody Wed Apr 24 11:32: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 4VPcLJ26f3z5H9WJ; Wed, 24 Apr 2024 11:33:12 +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) client-signature ECDSA (P-256)) (Client CN "mailgate.leidinger.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPcLJ0N7tz4CW8; Wed, 24 Apr 2024 11:33: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=1713958386; 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=spd8NQ+oav6QL+iDRdb5Z0VgiDnNZ/0zYqGQTPIw0GY=; b=MO8Wd7G7CjG7S8/Q42yGJxB/BaPe6dsWJ1eQQo41JgkRp+akcZ5u7j9FY3vkW0rotU8ceH +G1X7t9DCwv/nPEq19k3Lg81DnOO6iMDf2jt0C6RBcEb+UUgMYshgg8Kch9/SmZyD8Lrn3 A61RkTeolsjn92PJZWmMXp3qtj6n8S3XKql0eySn6i1SXbnQ2YZ014rol9+Py+/qd65fBK BL1SvHq4+OoIlqZP/GBjHp1+jgyluX1RLSG6U+IzXU4DCtXhEGJfLT8GzPtxFzDotFE8aa ehumwGy/Qq/Sc4TUH7gaITYWX+E4MCHDO57ZmA8Y5WRkhPP59hYVIiJqOPnvQA== Date: Wed, 24 Apr 2024 13:32:42 +0200 From: Alexander Leidinger To: Jake Freeland Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f239db4800ee - main - ktrace: Remove CAPFAIL from default trace points In-Reply-To: <202404240029.43O0T4jF051386@gitrepo.freebsd.org> References: <202404240029.43O0T4jF051386@gitrepo.freebsd.org> Message-ID: <1ddb4f99cc141fa6701c0a770382af02@Leidinger.net> Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_169e9ba8f1b0b7778fba92c6a8da64f8"; 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: 4VPcLJ0N7tz4CW8 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_169e9ba8f1b0b7778fba92c6a8da64f8 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Am 2024-04-24 02:29, schrieb Jake Freeland: > The branch main has been updated by jfree: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=f239db4800ee9e7ff8485f96b7a68e6c38178c3b > > commit f239db4800ee9e7ff8485f96b7a68e6c38178c3b > Author: Jake Freeland > AuthorDate: 2024-04-24 00:26:14 +0000 > Commit: Jake Freeland > CommitDate: 2024-04-24 00:26:14 +0000 > > ktrace: Remove CAPFAIL from default trace points > > The CAPFAIL tracepoint was recently extended to report ECAPMODE > capability violations for processes that do not enter capability > mode. > This allows developers that are interested in Capsicumizing their > programs to determine where violations are being raised. > > Previously, CAPFAIL only produced output for processes using > Capsicum(4) > capabilties. Thus, most ktrace users never received log output from > the > trace point. With the recent changes, this is no longer the case. > > Having this trace point enabled by default will produce output for > all > processes that use syscalls that are not permitted in capability > mode. > This may lead to confusion for users that are not familiar with the > feature. Remove KTRFAC_CAPFAIL from ktrace's default points to > avoid > this. Thanks for the opt-in instead of the opt-out! I stumbled over this a few hours ago and I can confirm that I was confused at first look... until I remembered a commit message about adding more info in this regard. Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_169e9ba8f1b0b7778fba92c6a8da64f8 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmYo7ekACgkQEg2wmwP4 2IZhbw//eGVduCkjhH3DH0TIN2cgizofwfS3Qv8P5hqVL9XvDCJbfKulB+G75w18 cRDMT4EIOneYk5fjGIBb1uE49k6MUFbnKkuazTrObA4XNR9GJeJRp3rNb7RK8S7I WkSha00VjHkcX+PWa7syhhtdkP7SxY6ajVYPx25p32uTUfnSt/4681UNrccQh/W/ 0NNlbcFq5bQFCBH2UBZCVNIiqQGY8f5FqUDqewQBueiAazCNwip5LeQ3PMAx7ZDm KbMYNFhVyIrmKOxxEtq0tuYI+FLErmbH+vsoiNCFFTycZ1uMUdZnUxKF7zv0QJYg 5AL1eAcvjSSYoOT+lgaPM7FgCCgplNImBKj1tMPvY0fZdIrx4d3oHKW13fuULMmJ poXdtbDxEFn4k88yhkRUG4/D6Jh7r1hqB54OEC0oHaaxgxulHvXXyY8/li1nhU2s PDGKj5AwjktVb9S4i1tBGAgq7DdVbo/WAkSqCZRpz+Qcu2/BczyWY/Axf5LnppWU aZNaWLrapFa6YsomGlrHO1MLggWGR19P6Zs79KekNYb96tbuktUmQvlHyQoMHBkQ RVTDfmNsaJOIZyy4D57uydqfvlLUt+4/dGAiAcPpFACC9vyJtf0lVCV8V4QndLB0 Wwkuogf2hI6gkn9cWWZ/2H8DaaWbyQRFemF7RsyWm1vj5q8FKas= =9bda -----END PGP SIGNATURE----- --=_169e9ba8f1b0b7778fba92c6a8da64f8-- From nobody Wed Apr 24 13:17: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 4VPffD1rrBz5HKyy; Wed, 24 Apr 2024 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffD11Tyz4LQl; Wed, 24 Apr 2024 13:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964628; 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=+HrqYYj9yBMc/Yd8kYNS9QFviZ5xHOsaUpvrTNMNY1A=; b=JH292eo/gjKgtSpwF9aQsnzeIGjsKfKoUBgmLlJiBl1IIjz0qNy2xPxZFeDlIOdEdFctXU arLEZNLbPShud4DGqVgg4zjsVl04l/56vsLdWvtbLlBCiY1eLeILCGNH7pzUMSO4RRVhCs NkpiHpnjUPh5xxFvfkp9TboDkwZVSv+22mwyjx09PQ88+SYbzCpECyGz5rHB91rRCmK0au uJLc0olx4nn2wlL990gSfLYJc1yQrDzdv98XuthEGx+CM8hC5C9KP+ph6ej9JuGCAQLEP3 xm4WdZWPrid+TAQO5+LWcOmOIBkLXU+L2fgf1sw5fy3kcapvY9g00JtONryAiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964628; a=rsa-sha256; cv=none; b=LNOekzkCMRZWO1KAbhOaVQfM4uatZWUxzYtgMDRg1ATINBJGL29QSpgUO+R4+v0YzyFz4a rji8eQ6+4fyrrqJ471FL8lRB/MVn2iZiWRF1Qso8d3zeI0pa8LspT8hwfZyC5OqMC7zJMx G1AixQkbDZDUQ2DKiaN+QEepe1umOrbFlgvElNZvKAmIoqAJGS2FYG1Q1xCcyKqOJKzn/J R+01LcthJkilaZyiEmG/2BgG9Zu40t6ZIK9ioNjYIyglTq6YiYB81SFbSv0h6Je04gWzfP +e3v0ThXCxzOn0D1FeGyo0+1FJghKHLLsJQPxDYDRSkuKF5PnqYoGqw4+oa8Iw== 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=1713964628; 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=+HrqYYj9yBMc/Yd8kYNS9QFviZ5xHOsaUpvrTNMNY1A=; b=cJ9dBYF5sLMTTZBIPkuk+INxpQJewfTwmR/1i6Q+Kw5A9+0GB0csH9a7aL01Z5Hb0/mHVg 3kxZ7O95YBYhksxFwBTTDYFDth3W/SUv0X3FC8wSeBQZdY8ByC6sIo9tyEMm+ICLK8/P3r QXfZ1CHdIwkxOIQqpDzq3nqlma61AfhcBfrfQEThg2Sw4Ne8YedVJuYVmUZlHmsB9CpoOP NGxuaZkXZU9EIPCtdBf0zk8u8NPfmCPGzm96fzVLUyBr8k03xSh2oo/LLYjwQc7JaXnR1g oCNTh8B5O9KeB35s47eonXMKtO9jCGX1QHSifXyE8YjMGVbhqKidYHSXWbc+uQ== 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 4VPffD0K8hzH1D; Wed, 24 Apr 2024 13:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODH7mY053179; Wed, 24 Apr 2024 13:17:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODH7Pj053176; Wed, 24 Apr 2024 13:17:07 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:07 GMT Message-Id: <202404241317.43ODH7Pj053176@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: 8512311fb500 - main - ng_pipe: Fix whitespace 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: 8512311fb5004444f43701eb122b6d77c76d7564 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8512311fb5004444f43701eb122b6d77c76d7564 commit 8512311fb5004444f43701eb122b6d77c76d7564 Author: Martin Vahlensieck AuthorDate: 2024-04-17 18:50:39 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:40:51 +0000 ng_pipe: Fix whitespace Signed-off-by: Martin Vahlensieck Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181 --- sys/netgraph/ng_pipe.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/netgraph/ng_pipe.c b/sys/netgraph/ng_pipe.c index a2966c9a0349..c2424e3db48a 100644 --- a/sys/netgraph/ng_pipe.c +++ b/sys/netgraph/ng_pipe.c @@ -34,7 +34,7 @@ * This node permits simple traffic shaping by emulating bandwidth * and delay, as well as random packet losses. * The node has two hooks, upper and lower. Traffic flowing from upper to - * lower hook is referenced as downstream, and vice versa. Parameters for + * lower hook is referenced as downstream, and vice versa. Parameters for * both directions can be set separately, except for delay. */ @@ -195,8 +195,8 @@ static const struct ng_cmdlist ngp_cmds[] = { { .cookie = NGM_PIPE_COOKIE, .cmd = NGM_PIPE_GET_STATS, - .name = "getstats", - .respType = &ng_pipe_stats_type + .name = "getstats", + .respType = &ng_pipe_stats_type }, { .cookie = NGM_PIPE_COOKIE, @@ -494,7 +494,7 @@ parse_cfg(struct ng_pipe_hookcfg *current, struct ng_pipe_hookcfg *new, if (new->qin_size_limit == -1) current->qin_size_limit = 0; - else if (new->qin_size_limit >= 5) + else if (new->qin_size_limit >= 5) current->qin_size_limit = new->qin_size_limit; if (new->qout_size_limit == -1) @@ -547,7 +547,7 @@ parse_cfg(struct ng_pipe_hookcfg *current, struct ng_pipe_hookcfg *new, } else if (new->bandwidth >= 100 && new->bandwidth <= 1000000000) current->bandwidth = new->bandwidth; - if (current->bandwidth | priv->delay | + if (current->bandwidth | priv->delay | current->duplicate | current->ber) hinfo->noqueue = 0; else @@ -686,9 +686,9 @@ ngp_rcvdata(hook_p hook, item_p item) } /* Drop a frame from the queue head/tail, depending on cfg */ - if (hinfo->cfg.drophead) + if (hinfo->cfg.drophead) ngp_h = TAILQ_FIRST(&ngp_f->packet_head); - else + else ngp_h = TAILQ_LAST(&ngp_f->packet_head, p_head); TAILQ_REMOVE(&ngp_f->packet_head, ngp_h, ngp_link); m1 = ngp_h->m; @@ -783,7 +783,7 @@ pipe_dequeue(struct hookinfo *hinfo, struct timeval *now) { hinfo->run.qin_octets -= m->m_pkthdr.len; ngp_f->packets--; } - + /* Calculate the serialization delay */ if (hinfo->cfg.bandwidth) { hinfo->qin_utime.tv_usec += From nobody Wed Apr 24 13:17: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 4VPffF2swlz5HL4d; Wed, 24 Apr 2024 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffF0z8Nz4L9b; Wed, 24 Apr 2024 13:17:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964629; 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=k6UZqfSDHpR1KEuMVYkIM0zzSiko82KQkeEQc0Uudtw=; b=gNIDUAw4ip7zIhQyQcmVRkboq908/PlFBlauB/1YgCbOI6p+PCnnkmr4dQLfFcrD005J/n kAxxAKNxYk0OOKF4fV/IM1bkzsrE1BtT/BLxRHN9LBjChZ2lsvcgO/E8g2C/2D8o1TXLJV YWPSDYWfMGB4JuCzh53XrykGhDBauqsCrYv+KzZDdOAA3ufTW6KlNOXrNXyhyFTkx+oDdL OkIXXSXGKaqDG6xr7Pba/PVS9SDt0gTfnu3xh+U805FWOEuAxUMMH+LNNYRo2eceQ1mUht nwbFSDDVJGHeoog1i1PfvoJzqMyYKdoOUpnMZwjBEzbVStY9AsyAqU1MrsayxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964629; a=rsa-sha256; cv=none; b=G3UU5i3wZwe5egk0b8ikfjfRYsmTNAxVr3DpeDyDPtMVD/k7vYoGp/mr3qWXP98UKmZJSu nIc6T6A0c+9F44LKhnTltgzWH1J2+n3d8i8uATHOQKkaA+EaMi4NmTTggWlWiP1EEw/m4l CQz0lveJ6cPpnK6ckt5jm9u4Oii9cZjUFHWw7n0faaYm9oYLHO30TvnxEl6aanEskUXMg/ SNJvXXRuCL9CTqGR8xSwx9wve9lSQjAgD89oPXrpV2ZyTMCx3JX0Lzp40SwC1sig5zsymw MG4rNFRrlQzYj+Z/eB13OI6N2vYi9q8nyqfQBjIwxBbdcfPRl6m7yGgyUWL2tw== 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=1713964629; 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=k6UZqfSDHpR1KEuMVYkIM0zzSiko82KQkeEQc0Uudtw=; b=OWtEUCcQ8NF5dCygmczAq40woPB90G0cj6vZ8Akv0ja9Ul1H1qAqtcyelBtbA+V0yy2Cw6 7GxDZKxW7uDkxM/squim18EGi7BzGShTrlZ6vOHTL23NgI7C2824GRyljPGzBmVynIvFyz IWNfLEi1nTO6khMs2g//WS31OF6EEXBFtrUJLjUYK7aCFfFATpcS/ZSSBpGIHLsobnb5D/ ImhYzQVWXUcyKrpUb2N59dRBvuNnPHBLkGCKzWafkjuBPogwhiZXy+Fx8Yb5OxdYAYHz4I 2GRCibemXgtnJJARVCIpf2CvhnMK+t7ua0MIaFtlhI+PgKkMpGwxsZrN4sYcyw== 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 4VPffF0b1JzHHl; Wed, 24 Apr 2024 13:17:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODH9MM053230; Wed, 24 Apr 2024 13:17:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODH921053227; Wed, 24 Apr 2024 13:17:09 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:09 GMT Message-Id: <202404241317.43ODH921053227@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: bb2ab7a374b9 - main - ng_pipe: Remove node when all hooks are disconnected 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: bb2ab7a374b9d81f8368acc506c9700af20a22d6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bb2ab7a374b9d81f8368acc506c9700af20a22d6 commit bb2ab7a374b9d81f8368acc506c9700af20a22d6 Author: Martin Vahlensieck AuthorDate: 2024-04-17 18:51:40 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:44:50 +0000 ng_pipe: Remove node when all hooks are disconnected This is the behavior described in the man page. Signed-off-by: Martin Vahlensieck Discussed with: glebius Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181 --- sys/netgraph/ng_pipe.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/netgraph/ng_pipe.c b/sys/netgraph/ng_pipe.c index c2424e3db48a..7afaf24f5914 100644 --- a/sys/netgraph/ng_pipe.c +++ b/sys/netgraph/ng_pipe.c @@ -936,6 +936,7 @@ ngp_disconnect(hook_p hook) struct hookinfo *const hinfo = NG_HOOK_PRIVATE(hook); struct ngp_fifo *ngp_f; struct ngp_hdr *ngp_h; + priv_p priv; KASSERT(hinfo != NULL, ("%s: null info", __FUNCTION__)); hinfo->hook = NULL; @@ -962,6 +963,12 @@ ngp_disconnect(hook_p hook) if (hinfo->ber_p) free(hinfo->ber_p, M_NG_PIPE); + /* Destroy the node if all hooks are disconnected */ + priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); + + if (priv->upper.hook == NULL && priv->lower.hook == NULL) + ng_rmnode_self(NG_HOOK_NODE(hook)); + return (0); } From nobody Wed Apr 24 13:17: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 4VPffG44wrz5HL00; Wed, 24 Apr 2024 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffG1qDwz4LNN; Wed, 24 Apr 2024 13:17:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964630; 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=d1BNERdWaeDsoKR2DutVKVED6BTgIdvpZOLVOcxdsNc=; b=TyCUmwi4/abXyT1PS3KrVRlfqZAkk5qCuijqDryHvK8gvG68ZarK9tKMsFqukukGmg2miD CDjIKmbeBx1eMcN5F3mIfDPuds0y49gqGnmMRqUou+vFtl4WxpBXolZigwaCsRin0L1Npm wdscADziGIulZ+WrVyEuQtaK6hLF2akFUl/z1V+1KkRZ8SX5eQ/cqoE96uyILFsEifNqBS 8e2EolBOMvKHaHO5bPbFqoGbKbuEhZE11tCbhtGz/PaIJndMCQ4cL4O9+QNt35s7bg4dgv l29g+yX5li87NzXkc7GFAt4OpggJ+rVXLwV3WJW7GE3laYHD7ND9zf4gk7/fqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964630; a=rsa-sha256; cv=none; b=wAk2QWtTDPJ2AUmmIoqnJGTlbWvtshF+aLefDgmHJJcKq9dYSiz/UoutsWWzHQIJrc3eJr qEKE6j9Z09KAn3ApxgAfTN3gEGZ/MatNuYYJgvZRtubzPzPwVXEAjEbzcN9mxJjlrEaFe3 PwfN4iK71lik6uSL3YaWT2SPRwIvP66lIDrLVaZIBEN3ZoEO4f4U98F5SG0FXmOuBTBqYB D/oSqzIrCYgi6Pa2Km5Hysjzv+W2Vve1zNc3wePMBk2vuzivfpAeaUamDvmBI3aA7ZDKIz M322TG9HjizDYhSXrks6HFzyUMdN6sJFU5ZbIVnURCs9etYd09JcSWKrb0iAeA== 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=1713964630; 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=d1BNERdWaeDsoKR2DutVKVED6BTgIdvpZOLVOcxdsNc=; b=C+KPPRgKzeXRkqFKXymAePNYy5wGHE21C5hBSnAsEhO0ljl6WJr0mmE2s8CJ9+QRRXooPQ GlMm0hYSKHo2i2spsPqKB3dIEAfUS3H7HDM9iFCykX2xJ6XuQML+6GaFZRbauEugVHGJcU d60gh+DL41obotASKF4a2Gonnyny4a2n64fUa/Pvi97t7yyqS9TJoOCtMqOzPi4O6Hb8PR lOOg+eR5QVJ4qph1BOO5jsX5/5C6KWCD0oR3I/nJUJ6goIJEbL/CorbE/K6t4gCMjggndA rDKSd7pIABY4Y8ugR23cd4rH9Umi6ROYneLhq8nMZcCFEL99IU/e9DovaQioVQ== 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 4VPffG1QJNzGqF; Wed, 24 Apr 2024 13:17:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODHAq3053281; Wed, 24 Apr 2024 13:17:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODHAMQ053278; Wed, 24 Apr 2024 13:17:10 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:10 GMT Message-Id: <202404241317.43ODHAMQ053278@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: a3ecf8c78636 - main - ng_pipe: Replace deprecated random() with prng32_bounded() 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: a3ecf8c7863683e53c77a17f96ab7012352265b9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a3ecf8c7863683e53c77a17f96ab7012352265b9 commit a3ecf8c7863683e53c77a17f96ab7012352265b9 Author: Martin Vahlensieck AuthorDate: 2024-04-17 18:59:22 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:44:50 +0000 ng_pipe: Replace deprecated random() with prng32_bounded() Signed-off-by: Martin Vahlensieck MFC after: 2 weeks Reviewed by: markj Pull Request: https://github.com/freebsd/freebsd-src/pull/1181 --- sys/netgraph/ng_pipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/ng_pipe.c b/sys/netgraph/ng_pipe.c index 7afaf24f5914..d368c142b1ab 100644 --- a/sys/netgraph/ng_pipe.c +++ b/sys/netgraph/ng_pipe.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -771,7 +772,7 @@ pipe_dequeue(struct hookinfo *hinfo, struct timeval *now) { * the original packet... */ if (hinfo->cfg.duplicate && - random() % 100 <= hinfo->cfg.duplicate) { + prng32_bounded(100) <= hinfo->cfg.duplicate) { ngp_h = uma_zalloc(ngp_zone, M_NOWAIT); KASSERT(ngp_h != NULL, ("ngp_h zalloc failed (3)")); m = m_dup(m, M_NOWAIT); @@ -814,7 +815,7 @@ pipe_dequeue(struct hookinfo *hinfo, struct timeval *now) { /* Randomly discard the frame, according to BER setting */ if (hinfo->cfg.ber) { oldrand = rand; - rand = random(); + rand = prng32_bounded(1U << 31); if (((oldrand ^ rand) << 17) >= hinfo->ber_p[priv->overhead + m->m_pkthdr.len]) { hinfo->stats.out_disc_frames++; From nobody Wed Apr 24 13:17: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 4VPffH3Pr8z5HL01; Wed, 24 Apr 2024 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffH2bdwz4LWn; Wed, 24 Apr 2024 13:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964631; 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=lZcOXL59KsefQIMUd9MK//Yhh0K1ciwYRVjirGY9XaY=; b=AUQUrQ92dml2u6kUtzTTY+vzimb/YP7xQPPELHBhusb0rnWePJECEYgkG7Lf9wHo3v5u2g Xywuoc1CWcxFluXicf4b+Z+aybOqsautNiUg/xLGixDR+gRSXzq7wXi8k+wT71IxWs56g9 9L/eLtkzV0/+n86WVDpMaXhxdU+zApJN0CI/0j6X8K9trVhGSSFhI8k7C+lZCGats9qmIL zgdeBgaSRG4j3qNNi/fSclvsGlQkwHpWOIu6eIMzZHL6raec9w6WEY/nVfyXO8TT8kwTMu G2iw7oMIjJNIHSoD6UsA0MttaOrNPG1IRL7GM5dqHdKfj30HhVfTgFsad43fxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964631; a=rsa-sha256; cv=none; b=WCNedQQkOJQ6sPbHXC5qt5Y/wuwDazXC3+nYyjFVfux8qjSNejiNuMcR4Uj3xcBCv/Uh/r ghKaS3YchdsEKuXSMMcNVhMY5M6MQcgy6ukCNwi7c2kZCvCcpK/gzOHKhiUIPmIvxKfM2p IdDWvkw8v7kDJbnW3llMDH8MjVjNOszDAMhSmvF44IxfHyesDOnmXjlT7MqlY5CtlqFNjC 1l5ZN1QqSrRsVqPGggbES641wSAn0kTb2BKomOppYYGhjt3cH7916B7cz5YN0AX8pl/ocH Pd4LiOzkVzze9pQ6GAgyItmjEAmdnmS5ygeNbkonUYVJ3LZwbL7JRhBc4FDUVQ== 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=1713964631; 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=lZcOXL59KsefQIMUd9MK//Yhh0K1ciwYRVjirGY9XaY=; b=oEOvpj8G8h9wVreo40HhGx59hMNWVHHXZTbSevgPYrFNVZKPFouAbiW3oo5aAwR1/7DId4 xbGNKA2yhet0ebc6azyllEmb1e6hxyGkVIx9GkzsL+5j4OfxblbTrDUs2IhQmiSIYWadQX o6/tMEQk8GgKWli/z/Kh9V3VAqQfCI6IembcaLDq3QZxQwublt8jrstaZX3E4rDK5tLgYg u2n8pSYCpybSwEItI5htWnbblQ+HvH6G5WLqwUr9zQMz+/LbGuuPv/hjU+dFJMEgJdsn42 2PJGIHwHemz7uqxeKB8agZvlWb6sHNl7OAJrYLjKkCDnWW5hAODDYRxlzr1oeA== 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 4VPffH27P2zGqG; Wed, 24 Apr 2024 13:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODHB6L053340; Wed, 24 Apr 2024 13:17:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODHBiZ053337; Wed, 24 Apr 2024 13:17:11 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:11 GMT Message-Id: <202404241317.43ODHBiZ053337@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: d44c78074d87 - main - ng_pipe: Do not panic when memory allocations fail 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: d44c78074d8738db67a2fa6bf07b630c61eee6ab Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d44c78074d8738db67a2fa6bf07b630c61eee6ab commit d44c78074d8738db67a2fa6bf07b630c61eee6ab Author: Martin Vahlensieck AuthorDate: 2024-04-17 19:01:34 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:44:50 +0000 ng_pipe: Do not panic when memory allocations fail Signed-off-by: Martin Vahlensieck Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181 --- sys/netgraph/ng_pipe.c | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/sys/netgraph/ng_pipe.c b/sys/netgraph/ng_pipe.c index d368c142b1ab..42a5991e8dc7 100644 --- a/sys/netgraph/ng_pipe.c +++ b/sys/netgraph/ng_pipe.c @@ -641,12 +641,14 @@ ngp_rcvdata(hook_p hook, item_p item) } /* Populate the packet header */ - ngp_h = uma_zalloc(ngp_zone, M_NOWAIT); - KASSERT((ngp_h != NULL), ("ngp_h zalloc failed (1)")); NGI_GET_M(item, m); - KASSERT(m != NULL, ("NGI_GET_M failed")); - ngp_h->m = m; NG_FREE_ITEM(item); + ngp_h = uma_zalloc(ngp_zone, M_NOWAIT); + if (ngp_h == NULL) { + NG_FREE_M(m); + return (ENOMEM); + } + ngp_h->m = m; if (hinfo->cfg.fifo) hash = 0; /* all packets go into a single FIFO queue */ @@ -659,7 +661,11 @@ ngp_rcvdata(hook_p hook, item_p item) break; if (ngp_f == NULL) { ngp_f = uma_zalloc(ngp_zone, M_NOWAIT); - KASSERT(ngp_h != NULL, ("ngp_h zalloc failed (2)")); + if (ngp_f == NULL) { + NG_FREE_M(ngp_h->m); + uma_zfree(ngp_zone, ngp_h); + return (ENOMEM); + } TAILQ_INIT(&ngp_f->packet_head); ngp_f->hash = hash; ngp_f->packets = 1; @@ -733,7 +739,7 @@ pipe_dequeue(struct hookinfo *hinfo, struct timeval *now) { const priv_p priv = NG_NODE_PRIVATE(node); struct hookinfo *dest; struct ngp_fifo *ngp_f, *ngp_f1; - struct ngp_hdr *ngp_h; + struct ngp_hdr *ngp_h, *ngp_dup; struct timeval *when; struct mbuf *m; int plen, error = 0; @@ -768,16 +774,27 @@ pipe_dequeue(struct hookinfo *hinfo, struct timeval *now) { } /* - * Either create a duplicate and pass it on, or dequeue - * the original packet... + * Either create a duplicate and pass it on, or + * dequeue the original packet. When any of the + * memory allocations for the duplicate package fail, + * simply do not duplicate it at all. */ + ngp_dup = NULL; if (hinfo->cfg.duplicate && prng32_bounded(100) <= hinfo->cfg.duplicate) { - ngp_h = uma_zalloc(ngp_zone, M_NOWAIT); - KASSERT(ngp_h != NULL, ("ngp_h zalloc failed (3)")); - m = m_dup(m, M_NOWAIT); - KASSERT(m != NULL, ("m_dup failed")); - ngp_h->m = m; + ngp_dup = uma_zalloc(ngp_zone, M_NOWAIT); + if (ngp_dup != NULL) { + ngp_dup->m = m_dup(m, M_NOWAIT); + if (ngp_dup->m == NULL) { + uma_zfree(ngp_zone, ngp_dup); + ngp_dup = NULL; + } + } + } + + if (ngp_dup != NULL) { + ngp_h = ngp_dup; + m = ngp_h->m; } else { TAILQ_REMOVE(&ngp_f->packet_head, ngp_h, ngp_link); hinfo->run.qin_frames--; @@ -983,8 +1000,6 @@ ngp_modevent(module_t mod, int type, void *unused) ngp_zone = uma_zcreate("ng_pipe", max(sizeof(struct ngp_hdr), sizeof (struct ngp_fifo)), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - if (ngp_zone == NULL) - panic("ng_pipe: couldn't allocate descriptor zone"); break; case MOD_UNLOAD: uma_zdestroy(ngp_zone); From nobody Wed Apr 24 13:17: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 4VPffJ5SGTz5HLDl; Wed, 24 Apr 2024 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffJ3fNRz4LNg; Wed, 24 Apr 2024 13:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964632; 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=GI5tq0QnjHnIpgL9vIPGfqnT/tCmM7G9EWBxwkmk7A0=; b=W8rtj/xMfuoscEDcFS5lu0/RrcklynH2TRg/PkB56R7RIyXthG7dG+DBlePF8MlQ7i/jln Iz4p7K3AZKwpEEDjhnbaUwC9vb907M0RE/q6EgBEl4giD8Ty+M6ketS/MzXa6Yil3ZhfrK xjc13ld1gy8mZIGjdt3zxtoFEAWWJkFi3yweHhRLl6YJEBCLAV9sNpMrkjXOSwSjHLZ3lG 78a368RMvGzYr0/WLEoGk3Xvb0XvAHhky9vGvGaxnOEyFgL0rG6uOB/VQ0plxqzsR294jg H0YFf73Tn3fhsp2ljcDpr7t2gLC2VLJjbaUf/D7MaIQiVS7Ad2mxB0Yns3zXfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964632; a=rsa-sha256; cv=none; b=PE4BjKx3PblgDQ4pBds9+1bi8AZUhZ8u9pI4FVR0zOqJ9EGC6eGCVKjaW43MYZ15stUGDk djerv5+fMJTkMz2dGBGXcNRbtKAaQZ7BCqUE8VhVuaWvH5K+CVpf0Wi57sXQi9cRW7q0E5 2ecVLalEsCMCiqo3geDfwzco3d1R/+aaPN1jBjWT775ZQO3vBRZcTbPWX8rl7Aj8W143nc YUGR5PQJKUCBvjMU2kobWBUxdCE34INNPVqw9ePlikqccKNTi0qE/iK9qbhEYF0JCsEUZH GPK3yJxU/BpwewZ84uo1tGX7jWVWgqyF4TpPPdIN+luRUep1undKHWsSFP1E7w== 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=1713964632; 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=GI5tq0QnjHnIpgL9vIPGfqnT/tCmM7G9EWBxwkmk7A0=; b=VoWA7s9jrDhzYLueu0NEjyKs79/P2ck2klRr2VMj6nH2wu+R6QDftYBwofWvsdHpH1vF0t lQIzpXLOX3fAt3aLOtxnwQTSvE5I/P19tP4JlVM6lcdEfQMcgUXaniO+CbAhQafK0AAlrl NWGJ6TQNAcKFdJf8lMwbECA2V4725gg9jJmUk1zlfCcG1ElgpOXjq60p9IkNuAojeKh4sQ 6tnDrcV0tZf8KSsIiPH1WSqksciiOLRMUPjY2uZ7mDOyHTrBShPzP3Ii+i8XniMhN3rsEJ B3qPPYe+1S7fqaWtJrQ4nK4nOfMYb/a3gMrGxJ3yY8EZ/z088hbkf3lyQ/qZnA== 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 4VPffJ3CNfzGdr; Wed, 24 Apr 2024 13:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODHC9r053382; Wed, 24 Apr 2024 13:17:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODHC9e053379; Wed, 24 Apr 2024 13:17:12 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:12 GMT Message-Id: <202404241317.43ODHC9e053379@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: 964064937ea0 - main - dpaa: uma_zcreate() does not fail 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: 964064937ea04519bd400668dc1ce38848d50901 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=964064937ea04519bd400668dc1ce38848d50901 commit 964064937ea04519bd400668dc1ce38848d50901 Author: Mark Johnston AuthorDate: 2024-04-23 16:18:21 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:45:24 +0000 dpaa: uma_zcreate() does not fail No functional change intended. MFC after: 1 week --- sys/dev/dpaa/if_dtsec_rm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/dev/dpaa/if_dtsec_rm.c b/sys/dev/dpaa/if_dtsec_rm.c index 62ea8ba74e9c..0b9f8e0ae6c7 100644 --- a/sys/dev/dpaa/if_dtsec_rm.c +++ b/sys/dev/dpaa/if_dtsec_rm.c @@ -115,8 +115,6 @@ dtsec_rm_fi_pool_init(struct dtsec_softc *sc) sc->sc_fi_zone = uma_zcreate(sc->sc_fi_zname, sizeof(struct dtsec_rm_frame_info), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - if (sc->sc_fi_zone == NULL) - return (EIO); return (0); } @@ -312,8 +310,6 @@ dtsec_rm_pool_rx_init(struct dtsec_softc *sc) sc->sc_rx_zone = uma_zcreate(sc->sc_rx_zname, FM_PORT_BUFFER_SIZE, NULL, NULL, NULL, NULL, FM_PORT_BUFFER_SIZE - 1, 0); - if (sc->sc_rx_zone == NULL) - return (EIO); sc->sc_rx_pool = bman_pool_create(&sc->sc_rx_bpid, FM_PORT_BUFFER_SIZE, 0, 0, DTSEC_RM_POOL_RX_MAX_SIZE, dtsec_rm_pool_rx_get_buffer, From nobody Wed Apr 24 13:17: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 4VPffL0JNhz5HKrf; Wed, 24 Apr 2024 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffK4YZZz4LXH; Wed, 24 Apr 2024 13:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964633; 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=BYx9mOH5/ypFOxAa/KVAben5Fu0zsyjHN+B0Sl2O010=; b=Gt+U0jj27EGQE2iI17T6NzUTTdhmUCC0edAXmYO1V3Sybr7fBt3tOFmiyyvlAmdo/35+hR KWAFA9Tgwu2TYpXRLXcJs/cTTzkxOD6Y2ypkCM0EZ+IYJK3ShbGTuUMpGO99a6pVE/zdGQ aigfoL+/Vjiq/fhBDN0EZB3Evnn2MDI9hxibaBdTmM5eRAbs+OdvpsWTr7R1LJCvv5kp/E Kl9OEO0ieGPR9wapZ8WQhbB4pxI9aigP+SQKEjWvjWEAJ+kGr8nAq5SHy3twZLoei3BdaU NXtty6/0W3eIqEWqyFYABmqM1bldqgUDo2E0DtZcz9shlaPAgjdKkidSOEYubA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964633; a=rsa-sha256; cv=none; b=oCtyRlLhvEYcRzp4s89ucKigbhIRXfw5WqXVu6Fvp7DXpY/DlXIxrwj0z6Lz6tGx/vTnY6 Z4aHkzsckSDKqPkxOr/opvZVbKy9+JElMSpZTnBqTaj5fwIPwklvmYK/vyOAZxrWTW+yLy mIN+x9szwWQBJqevSvxF2DrXT9Bdw8dfk15RKZSvnHbUacFFRvDi3nAU+R/Cl1z3w4onuP 9BiMJyo5sZHvYBN7ibYwbG8boxcvhVl1nDwOEk2hbf0GtQg3XxUzT3jUEdbeHDRacJoX9j ZI2R+ZBVxHWno/AUHpbz0h7k0VlzUSnLOQhv7Nx2ydxL1K3faANRQwODJPm7Kw== 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=1713964633; 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=BYx9mOH5/ypFOxAa/KVAben5Fu0zsyjHN+B0Sl2O010=; b=akrus5bq0cyjrv4ZNeTrYMii5VPRq4S186jXslkSp7S+Dj3YBBluyUv+SNNjt2T9cJn75C Ubt7mOGMz5+r3RT2SvEgdHx2YfmqKSZ2Q97pRAQRT/n3JByYX6DCpMxnaMb42mv9KrDNsC u7my36IXAj1I4sfvRP4aK+k5ANQtUdiec+/U/D0BfK3isdpbrsCqxxUfnFcGO9KXKkE9CH St8GVmV/G253+Vjj947a3ZVcpFwlc7hgQNIif8MZHZu+Tk7k8yaBbQwr0aVPYfNqBGF5zJ s24aq6wHGYUoKM7HRTPoxqU0CkGq1bF56g3VGXHbAywptqNKs+rd3q0g+nElWw== 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 4VPffK45cFzH5m; Wed, 24 Apr 2024 13:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODHDLk053425; Wed, 24 Apr 2024 13:17:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODHD6K053422; Wed, 24 Apr 2024 13:17:13 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:13 GMT Message-Id: <202404241317.43ODHD6K053422@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: b6a0ed7c78dd - main - wg: uma_zcreate() does not fail 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: b6a0ed7c78dd45937e404706620467bef61c308d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b6a0ed7c78dd45937e404706620467bef61c308d commit b6a0ed7c78dd45937e404706620467bef61c308d Author: Mark Johnston AuthorDate: 2024-04-23 16:19:08 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:45:40 +0000 wg: uma_zcreate() does not fail No functional change intended. MFC after: 1 week --- sys/dev/wg/if_wg.c | 6 +++--- sys/dev/wg/wg_cookie.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 57caa69bde3b..d0b75d5cbf4b 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -3135,9 +3135,9 @@ wg_module_init(void) [PR_METHOD_REMOVE] = wg_prison_remove, }; - if ((wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet), - NULL, NULL, NULL, NULL, 0, 0)) == NULL) - return (ENOMEM); + wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet), + NULL, NULL, NULL, NULL, 0, 0); + ret = crypto_init(); if (ret != 0) return (ret); diff --git a/sys/dev/wg/wg_cookie.c b/sys/dev/wg/wg_cookie.c index 6ff9325c6613..80617d473471 100644 --- a/sys/dev/wg/wg_cookie.c +++ b/sys/dev/wg/wg_cookie.c @@ -85,9 +85,8 @@ static uma_zone_t ratelimit_zone; int cookie_init(void) { - if ((ratelimit_zone = uma_zcreate("wg ratelimit", - sizeof(struct ratelimit_entry), NULL, NULL, NULL, NULL, 0, 0)) == NULL) - return ENOMEM; + ratelimit_zone = uma_zcreate("wg ratelimit", + sizeof(struct ratelimit_entry), NULL, NULL, NULL, NULL, 0, 0); ratelimit_init(&ratelimit_v4); #ifdef INET6 From nobody Wed Apr 24 13:17: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 4VPffM1BJFz5HL56; Wed, 24 Apr 2024 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffL5TJXz4LXP; Wed, 24 Apr 2024 13:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964634; 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=0Vgh9gn99OzncbM5AVF/ohN9ecUfPHkbAh08PvMTSoI=; b=IXlffjrASyUEX8WaDouJAXtzIwjJeJx1sz/CMA7S0rNRBr+NS+gUGp5Rc/ptLy9zss6JBt dRIZr/9sc+OpcPwkp8gHgiE8PXrme3975Za5A7OhTsHDVNaLizWZHpG9fZYJZsms3jMOe/ xT1w1WE7HpNINfTkbbzmUIl0mCbuWfQn28FDHGtoyGhh4T/mBscy7QNiGmWUCzV4ull5RM 9bcsopTidHFq/T81bseRdJCbpJR4mFfvg9VE6iGgF4mcQ22OOLSh7uS9GveyUiqUiGEfJw Zt4f/scIdZ5q1n/xsUyEsSyGoCsYwBkkDCkgqr6dzKzF+4yj4tqpImseU5w9kQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964634; a=rsa-sha256; cv=none; b=LqkMvL8EL5S83gZyOrtaAEwpOsiJfFsRdVcrJh5FaZA5jpfhGBzfQSHW35urU9j7+ki+5y pZnFJvcpvMdmzy+pxPC6qGlSaEYnOBjuL8HwZkfkGxjyKncREb+felxJsNkXNmO1ytUpkm 3eyq+A9RtxB2XyIPK4R6HLcWoVQKXhvI6HQUgyXq7fcOufZ5vK96fgRDUqQ70OkIMe47Vy crwgspf0KwrXk9kB9AjhrF2WYIBggpGkgIvy7hoSHZtUnJd9xYzE5yLYFFb01zoiKEdQsQ c8JaEz53UW4BfWKnU/+vVwmJuFdU6hiSKBST4AxmCipHtjOo5Byp5QgnqsuFUA== 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=1713964634; 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=0Vgh9gn99OzncbM5AVF/ohN9ecUfPHkbAh08PvMTSoI=; b=A0zwAXYxUD5lJBxoicyU+jVsSP+S1C26MRT6M25HaMs2vCOc9tMLzXdPTiGmC8uMKVJ3Rx PW3X3pwI+lbLMTjE5KVx6XNvm1ccwOVGm4yQQ/n4R1MRGXZuSXJLdVupyIFyRafWWXSBNU uX4ZSguYcBtyQE5kYmYMoW1L3EowaXhcxmH/Dievkso0Wg3qx+qhlGkvVso5DP2UEM9WZm ZXk3gMfW42IgzhpI6CqwDGJtQyaDYgasVFLaoYaSiiTmBu/qdmFpw+HBoy1fWpPvWMrYKc HpPKZj0QrZ7TReBln5H3+5bd/FhR9sG70W2JNHw5Ml9JkOAZjH4f3QnNClNH3w== 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 4VPffL553RzGds; Wed, 24 Apr 2024 13:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODHE2Z053467; Wed, 24 Apr 2024 13:17:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODHET5053464; Wed, 24 Apr 2024 13:17:14 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:14 GMT Message-Id: <202404241317.43ODHET5053464@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: 78c51db3c492 - main - udf: uma_zcreate() does not fail 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: 78c51db3c4927db2437ec616b33ba1faf73f08ee Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=78c51db3c4927db2437ec616b33ba1faf73f08ee commit 78c51db3c4927db2437ec616b33ba1faf73f08ee Author: Mark Johnston AuthorDate: 2024-04-23 16:20:50 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:45:59 +0000 udf: uma_zcreate() does not fail While here remove an old comment regarding preallocation; it appears to refer to an optimization that is almost certainly irrelevant at this point. No functional change intended. MFC after: 1 week --- sys/fs/udf/udf_vfsops.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index e844a4e540f4..866d0172f745 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -140,11 +140,6 @@ static int udf_init(struct vfsconf *foo) { - /* - * This code used to pre-allocate a certain number of pages for each - * pool, reducing the need to grow the zones later on. UMA doesn't - * advertise any such functionality, unfortunately =-< - */ udf_zone_trans = uma_zcreate("UDF translation buffer, zone", MAXNAMLEN * sizeof(unicode_t), NULL, NULL, NULL, NULL, 0, 0); @@ -154,12 +149,6 @@ udf_init(struct vfsconf *foo) udf_zone_ds = uma_zcreate("UDF Dirstream zone", sizeof(struct udf_dirstream), NULL, NULL, NULL, NULL, 0, 0); - if ((udf_zone_node == NULL) || (udf_zone_trans == NULL) || - (udf_zone_ds == NULL)) { - printf("Cannot create allocation zones.\n"); - return (ENOMEM); - } - return 0; } From nobody Wed Apr 24 13:17: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 4VPffN1mvKz5HKxY; Wed, 24 Apr 2024 13:17:16 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffM6S3Fz4LPK; Wed, 24 Apr 2024 13:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964635; 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=EIqwoXlr8LtqKxU4q9uvd+W1sP2dRfyc2+z8WpYoRDM=; b=AAH7YNq8UHK9knX2RPZnI/Dk6usBDFKTsMQKK/cyFbf8OVrI7GwfMUK+5yf8QB3T3eC1xA 7NkBS/BVKnBCKY9g7Wy/3PtGCHFu30sPwSxlGwpeOisYa2xJkT/mvbCuQMwSnLl37Sxmhp fM+vmxMW1qzOxpJeNlYcvKhK5qg9LxOf8R899U0ucrV7dArO6v3vpV+fHzrV6pOyQQOa7S PTy4nciadwdi7ojevLdWfpQhIoK7wlkb3/mSmCSrgicVhG3vjAgZCqK0+C0G161peKYd+I ifxgRmaSQKMMscl23b2+f1o/zVYNdFv6wku45gsAKTiflr4Iq5HoIwL2OlsMBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964635; a=rsa-sha256; cv=none; b=ACzxnfuh68v61vpiRy8TutzfYTVCw6zYOW2kzTsR3zaNxBr2HQifBlBCVTjMgjXZOqIs3T AT+bWBibmRNVQkB7BC80Vam+t3QC1nn+0j84n8zkqzt/XTNYjAzCLmqDkeQkzvxVL7AyF/ wf/F0Eg38h9TzMnsw4SZSOrcfO6SpYobR9FUOg5Z6D3xoBDLOi8vjjeXwZ3fQMFXBz1NpS W1AXm0JodwzO7ivH/INCaHU5+rUiDTB+m+fEe0wGMGe3aKy5x9XR3CyCuhIDYe7rKD4EvO THLxT/pq9d4gbcr83K7SUC/fROWvGVmt0rn0lEBodK5x4wQSnJVsaNCf/hY65Q== 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=1713964635; 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=EIqwoXlr8LtqKxU4q9uvd+W1sP2dRfyc2+z8WpYoRDM=; b=AhXgtmSOftGTA3HFJJ9sswNALdAPQZIdAOVC7jAyHG/lk5PyyeDd93KrGjKk98CL3wyyGv UWQSpqq/WvWzTMPbBrup/Q57rcwCYEkLTygnValUXgbW21THRhgmN4qFOK2eB2u6UU3dJm vv+28FDX4ZF396XjJE29oTp8etvrtWPhZh2Om5uBGigSzmj82zz04p0Yi6KUumjcNbnhCq x2Ij1oDNE8AOCkSMWWChTpYdrGStTlJvjs4xuijMe/aKEDDISE+2QOhDYGNJZ9mToTyeYK Y3gtHwA8qOIyEhCSM0HEURAGw3xUlREVZbzBUbzsS4FI04bAgq3mYjj73uzbzQ== 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 4VPffM64KszGqH; Wed, 24 Apr 2024 13:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODHF52053513; Wed, 24 Apr 2024 13:17:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODHFtq053510; Wed, 24 Apr 2024 13:17:15 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:15 GMT Message-Id: <202404241317.43ODHFtq053510@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: 1e607a0753ff - main - khelp: uma_zcreate() does not fail 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: 1e607a0753ff93847926a46003fe74087426b580 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1e607a0753ff93847926a46003fe74087426b580 commit 1e607a0753ff93847926a46003fe74087426b580 Author: Mark Johnston AuthorDate: 2024-04-23 16:22:27 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:46:35 +0000 khelp: uma_zcreate() does not fail No functional change intended. MFC after: 1 week --- sys/kern/kern_khelp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/kern/kern_khelp.c b/sys/kern/kern_khelp.c index a5308756b2c4..1ab56780f394 100644 --- a/sys/kern/kern_khelp.c +++ b/sys/kern/kern_khelp.c @@ -330,10 +330,6 @@ khelp_modevent(module_t mod, int event_type, void *data) kmd->helper->h_zone = uma_zcreate(kmd->name, kmd->uma_zsize, kmd->umactor, kmd->umadtor, NULL, NULL, 0, 0); - if (kmd->helper->h_zone == NULL) { - error = ENOMEM; - break; - } } strlcpy(kmd->helper->h_name, kmd->name, HELPER_NAME_MAXLEN); kmd->helper->h_hooks = kmd->hooks; From nobody Wed Apr 24 13:17: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 4VPffP22Vnz5HL59; Wed, 24 Apr 2024 13:17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPffP0Nngz4LVY; Wed, 24 Apr 2024 13:17:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713964637; 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=6VOrtbhapOul468S9KTbI3r4JtAYjBtE+9HnqYvTtj8=; b=yjkX1PBb3fjbipEep387guWUl3rctQ9gpyp++wP4TZET+arSWj+nOFsK2Si9ZaVEvpIchO TQ8A7hDxCk0Pmgjh1KnN456cX36uk5z5twAN/RI4EmSosujztZm7UVHgnV8y20JZ2wBhrH cwkLjK28AbtneYCgQcNv0GRar9/MkPXgBnyLT2gjaFE1CKpsjilfAPMg96+rjxWBXcWjlH Wai59KVUrp7qoS9RKZXfN2r2qVMmo8XY6G5eUVrb0ANqhcSiDs5yTJ8vPmo5rGsVNy12Qe ymbLFdAPkP33gM+UboY1Y6YhGiXefqlSvGn75NZm6OKF5K50ZvFxMQmJVkf84A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713964637; a=rsa-sha256; cv=none; b=QBosIUqDSQlCSMJQZ9UXz/yHRTsE2sSWrdIByhHaKQsCIR+yVYePY05QkTNENTljpHJErY XgQGHPX0XRCEDER0hQSlQ9dc3YpXrdo2GIyS5zXMa//+c1x1qQUc5NF4Fw+SoHh6/qDHXe Z52Ta1n6faYBBzHSsE8lfAdMW5ETG1E4sDKgHrS+feW03EVTfmhS61BIQpnA38s38C4vXd c02FH5v7lMBZHS4+2bLisQw7vP6y8iGdS840nm7SCD5v6QSVfJK/BaLNGbk9Fu9wkrKhud oaMn0n4gFk/kwTID3L9D4mdTvBpGmO31P3uLIFEPOl0dHWCw88AppANmduMeXA== 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=1713964637; 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=6VOrtbhapOul468S9KTbI3r4JtAYjBtE+9HnqYvTtj8=; b=IeMryzzlkRvZMo+KFVZxs6b65Dq7UcSrbNj/9GMKpl6Zggs3TY6UPB+xtPM7JkHULvxPT+ Sazc7HfKgmKV9cGlUagy5vVjZmleij41Ks6QUcuJWEGRLQvCWo57WDQ+qxvf/GeHV7AJTQ RG4Drj9IJrLpgz/36tsYRrzCwwj8G0dfDy1dgBTsYs5sdujiKZ4TyzEak8MGOaJ5sVl5yI kB5JMCyUf+/b7ozo00FlQ+xwt0bbAkwnWQG3rOuVlP22FlHJDX+Q2piHJikCnyuRB7ZYyz MeSninKy3H5qMa9M/LgANY/iBuzGL79cu1mOAUJtPECIDlU1G2ylZKJ6jJRaHw== 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 4VPffN75YlzGqJ; Wed, 24 Apr 2024 13:17:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODHGx9053557; Wed, 24 Apr 2024 13:17:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODHGjU053554; Wed, 24 Apr 2024 13:17:16 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:17:16 GMT Message-Id: <202404241317.43ODHGjU053554@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: 8ef2c021822f - main - busdma: uma_zcreate() does not fail 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: 8ef2c021822f59a334e3926e8505c8a8e8a3475f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8ef2c021822f59a334e3926e8505c8a8e8a3475f commit 8ef2c021822f59a334e3926e8505c8a8e8a3475f Author: Mark Johnston AuthorDate: 2024-04-23 16:23:13 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 12:46:41 +0000 busdma: uma_zcreate() does not fail No functional change intended. MFC after: 1 week --- sys/kern/subr_busdma_bufalloc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/kern/subr_busdma_bufalloc.c b/sys/kern/subr_busdma_bufalloc.c index 2cc47b006753..fa7191341db6 100644 --- a/sys/kern/subr_busdma_bufalloc.c +++ b/sys/kern/subr_busdma_bufalloc.c @@ -100,10 +100,6 @@ busdma_bufalloc_create(const char *name, bus_size_t minimum_alignment, bz->size = cursize; bz->umazone = uma_zcreate(bz->name, bz->size, NULL, NULL, NULL, NULL, bz->size - 1, zcreate_flags); - if (bz->umazone == NULL) { - busdma_bufalloc_destroy(ba); - return (NULL); - } if (alloc_func != NULL) uma_zone_set_allocf(bz->umazone, alloc_func); if (free_func != NULL) From nobody Wed Apr 24 13:53: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 4VPgSf3Fbfz5HPk6; Wed, 24 Apr 2024 13:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPgSf14T7z4Spb; Wed, 24 Apr 2024 13:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713966834; 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=1mYrLTzgtlgzOxG+4BaOzDWvSnqJVoxrSDuEPUOOL8I=; b=YMYjMCFK9Src+Mh5PnOxOsUkf9fkTWEzQOiTKR7cQE1Nsm0/Fw7TLvKCKc4+sBk7E4a+Lt QUPwloD2+6hutG5TJX8WXNdjEJj4Bifjo/P5UyFH08GCiVNbMu5cGMeYjN7W8fIL7hKFN7 9c5Y8uFXd0BBOc/0SgKuM6wKxM6/9a4mGQ4bCgi6mPOocdVAaN5zTiIXCDkdbhOfo7Mrvl ou9dJJ/XacYcnXdJEWOyFtxjTKkxX62kXBsA7CZ6d6vTeuI32AiFAi6y0/32hlkq/KhnHq QLKrfzBkz6rm8s3d3sQpnzCZhMnKIPxX7YGLL6DAxoXs2mDqt0vh3TjMj48Z3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713966834; a=rsa-sha256; cv=none; b=sdzrXO54t8IzPWfupx6TXVmwJAvn5KhpaGCKRPardRRN4saFsF8KXU3hxpWtPXiWigU7B9 +ryPd/Ir4ZeQbVgL18f7GiXVDU/JFB72nkxeYNDkeKKXHYs1e4T3rlZ9cJ1SK+yRuMU3s7 QNjMVZTv6upZ/NutZjm7jBdJMVjUDMPgzujungPP1oXTsfoU3KdDIBzTGIP8736cxt0aqm QXQFd0ZuOX7SF0sH1h1wWEUsav/Ra/7jkRVVhllXMbcIlr4ifHlqJp+CY5Cegxx5Isx1W6 C823KxJqCktuWBEVrp9glxmsWoLDrcX8zfs+Iu5KfHKVbVDIVFU+Dyi2FJVqoQ== 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=1713966834; 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=1mYrLTzgtlgzOxG+4BaOzDWvSnqJVoxrSDuEPUOOL8I=; b=VuDMDfq9KIAoDopmxmla4eqHn4IaLkXeZTjb0EqDUyvHkMkHdyp9oyQI7pPbBIrh2r/XeQ 3Syr0aE2WaoduAuv8eqP8M8VhHThwakcZLb/972D0/CL2mcbf6+k0w3+rgClJf5mABC833 vYtxfOzAe6YPOCYS6gfekP7hN8V3+XOEpjg9c+MzofWFh8m7dBYzhlzFQ5PZpwttS+2Vr9 xu2r1uWurh5Wpiy2embvq2DmdZzMsrtYnhYpROYtZ/1BlLLIZfZiEs3fBDXHGeykUmi8HT /KP2KyGq9R2u0JNyZ7IVolkNzZbZghuud53rMlaPnFmXy5M1M+tYSEfK38Xx6A== 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 4VPgSf0W4KzJ10; Wed, 24 Apr 2024 13:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODrr8p020511; Wed, 24 Apr 2024 13:53:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODrrPW020508; Wed, 24 Apr 2024 13:53:53 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:53:53 GMT Message-Id: <202404241353.43ODrrPW020508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 4b7949144cfb - main - geli.8: add some notes regarding performance tuning 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b7949144cfbf25b0e0bf593b135a88417304d71 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4b7949144cfbf25b0e0bf593b135a88417304d71 commit 4b7949144cfbf25b0e0bf593b135a88417304d71 Author: Alan Somers AuthorDate: 2024-04-22 21:52:07 +0000 Commit: Alan Somers CommitDate: 2024-04-24 13:53:37 +0000 geli.8: add some notes regarding performance tuning MFC after: 1 week Sponsored by: Axcient Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44908 --- lib/geom/eli/geli.8 | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/lib/geom/eli/geli.8 b/lib/geom/eli/geli.8 index 501b948fde49..098ba4d0485e 100644 --- a/lib/geom/eli/geli.8 +++ b/lib/geom/eli/geli.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 20, 2024 +.Dd April 24, 2024 .Dt GELI 8 .Os .Sh NAME @@ -851,6 +851,15 @@ This variable should be set in Specifies how many times the Master Key is overwritten with random values when it is destroyed. After this operation it is filled with zeros. +.It Va kern.geom.eli.use_uma_bytes +.Nm +must allocate a buffer for every write operation, used when performing +encryption. +This sysctl reports the maximum size in bytes for which geli will perform the +allocation using +.Xr UMA 9 , +as opposed to +.Xr malloc 9 . .It Va kern.geom.eli.visible_passphrase : No 0 If set to 1, the passphrase entered on boot will be visible. This alternative should be used with caution as the entered @@ -863,6 +872,9 @@ Specifies how many kernel threads should be used for doing software cryptography. Its purpose is to increase performance on SMP systems. If set to 0, a CPU-pinned thread will be started for every active CPU. +Note that this variable must be set prior to attaching +.Nm +to a disk. .It Va kern.geom.eli.batch : No 0 When set to 1, can speed-up crypto operations by using batching. Batching reduces the number of interrupts by responding to a group of @@ -891,6 +903,34 @@ This is an optimization which reduces the overhead of I/O processing. This variable is intended for debugging purposes and must be set in .Pa /boot/loader.conf . .El +.Sh PERFORMANCE CONSIDERATIONS +The default value of +.Va kern.geom.eli.threads +is usually good for a system with one SSD. +However, it may need to be lowered on systems with many disks, +so as to avoid creating too much thread-switching overhead. +On systems with more disks than CPUs, it's best to set this variable +to 1. +.Pp +.Nm +internally uses +.Xr malloc 9 +to allocate memory for operations larger than +.Va kern.geom.eli.use_uma_bytes , +but malloc is slow for allocations larger than +.Va vm.kmem_zmax . +So it's best to avoid writing more than +.Ms MAX(kern.geom.eli.use_uma_bytes, vm.kmem_zmax) +in a single write operation. +On systems that format +.Xr zfs 4 +on top of +.Nm , +the maximum write size can be controlled by +.Va vfs.zfs.vdev.aggregation_limit +and +.Va vfs.zfs.vdev.aggregation_limit_non_rotating +for HDDs and SSDs, respectively. .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES From nobody Wed Apr 24 13:58: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 4VPgYs60qLz5HQFM; Wed, 24 Apr 2024 13:58:25 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPgYr3xz4z4VbT; Wed, 24 Apr 2024 13:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713967104; 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=Ra8EZCeZbH523yu1Ae7scmG8GPk+nCKMWgcsWoCSDXw=; b=JCDFDKrAa8y7n+sG2o1NG6JsFECrO4sxPvErfCxOsRyzbe+haEqJKcjje4mgQlqgKHRhtn aP15WxGI5EDcUepj1XWLcvdIA9AZFXRUW7g6P8kYgVslpfcYB7ATQiB6nOgI6Z88jf24bh rt0LtIyf/WMVqeycumjCEO2bn1UA4D+QCPyDYrxTpNA3eryjIHGZZCzC2eUsDU+z4c/dR5 BLAbQis8ibEHgJM/wGu2IHUj8uxXxvtyF1nALsVoKO01NsnhXX/ydRJ29vV20pTi0hGNao AGC3T73YkWPEQVWTFHc1MFDUzwCKdG1qci4bB5Y+4FSuI0rFf24ygF2ErP+JRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713967104; a=rsa-sha256; cv=none; b=tjONmwX8y2J0y8AlpXrhwQbt31vMpqmPT2P50IoC74n6cxlL9/tvrDQi8mDvCwYzFqxi+d VuoYfKrAAVCFxh6ExDCy4hfDbm8ACm6JZQoLRey9NoQ6rTuf4yWhfhj1NRCwc74WndXYCM zIEfezFjEy1MvFKlJIXB0bR0kQ4K9ibI+dX3DHFbmCQPSb3PU/tJ0Hct9fB1UE6kG/1Uy8 2JoI27ef1cWQx3dQ7W1649dia0rYvKsBgF0zlOlbmB+G+Wl0K9QtJvtX62fJkiwILh8WZ9 u+dChzf/qqnVsTyaAm7xHSLcTaM3NNa90BRUu61xiTPCPQ7BY5ZOWvJma9cmkw== 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=1713967104; 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=Ra8EZCeZbH523yu1Ae7scmG8GPk+nCKMWgcsWoCSDXw=; b=axd0alMk71+urGnw58dWLUAAdYjM7RGw5yfkSX167AEcjwCuBq60lWivDuLe8k2tj5UTPM ZGcV8kuM4GxsiQoiyJPmnG5DwKRu5b+ce9vk3I2YNtBqEE5O924JYdmFQykSL7w7jOlhP4 L552YUQnCfW/ybBtg0a39MjbeE40JGiJ3YYjH50xCBem6IyXQBtKL4ARNle9spY4OM+lKM MBuzRdH+UDLWaLYTRMD2r92I6hIsK83oRKNo7xqWSuzRljiM4/MuzqRZeD/CXe/r5b1Eas eXmWSf3XkN1mwheG2DZLEQNS8ZPxobupBtFkhpsqfqs4Y0G67QQdutQy5MZxog== 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 4VPgYr1ZdDzH7y; Wed, 24 Apr 2024 13:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODwN0L021457; Wed, 24 Apr 2024 13:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODwND8021454; Wed, 24 Apr 2024 13:58:23 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:58:23 GMT Message-Id: <202404241358.43ODwND8021454@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: 107584716cde - main - bhyve.8: Remove mention of the -A flag 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: 107584716cdeaa36c718a42861df1cb4b8b87e62 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=107584716cdeaa36c718a42861df1cb4b8b87e62 commit 107584716cdeaa36c718a42861df1cb4b8b87e62 Author: Mark Johnston AuthorDate: 2024-04-24 13:57:12 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 13:57:12 +0000 bhyve.8: Remove mention of the -A flag It is a no-op on amd64 now and is not implemented on arm64, so let's remove mention of it altogether so as to reduce confusion for arm64 users. Reviewed by: corvink, jhb Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44737 --- usr.sbin/bhyve/amd64/bhyverun_machdep.c | 3 +-- usr.sbin/bhyve/bhyve.8 | 13 +++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c index fc2f91e31db7..c453092107d5 100644 --- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -73,11 +73,10 @@ bhyve_usage(int code) progname = getprogname(); fprintf(stderr, - "Usage: %s [-AaCDeHhPSuWwxY]\n" + "Usage: %s [-aCDeHhPSuWwxY]\n" " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n" " %*s [-G port] [-k config_file] [-l lpc] [-m mem] [-o var=value]\n" " %*s [-p vcpu:hostcpu] [-r file] [-s pci] [-U uuid] vmname\n" - " -A: create ACPI tables\n" " -a: local apic is in xAPIC mode (deprecated)\n" " -C: include guest memory in core file\n" " -c: number of CPUs and/or topology specification\n" diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 12e3f3ba926e..31b093ffaad0 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 29, 2023 +.Dd February 10, 2024 .Dt BHYVE 8 .Os .Sh NAME @@ -30,7 +30,7 @@ .Nd "run a guest operating system inside a virtual machine" .Sh SYNOPSIS .Nm -.Op Fl AaCDeHhPSuWwxY +.Op Fl aCDeHhPSuWwxY .Oo .Sm off .Fl c\~ @@ -110,9 +110,6 @@ runs until the guest operating system reboots or an unhandled hypervisor exit is detected. .Sh OPTIONS .Bl -tag -width 10n -.It Fl A -Generate ACPI tables. -bhyve always generates ACPI tables so this option is obsolete. .It Fl a The guest's local APIC is configured in xAPIC mode. The xAPIC mode is the default setting so this option is redundant. @@ -1033,7 +1030,7 @@ block device backed by the filesystem image, and a serial port for the console: .Bd -literal -offset indent bhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\ - -l com1,stdio -A -H -P -m 1G vm1 + -l com1,stdio -H -P -m 1G vm1 .Ed .Pp Run a 24GB single-CPU virtual machine with three network ports, one of which @@ -1043,7 +1040,7 @@ bhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \\ -s 2:1,virtio-net,tap1 \\ -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \\ -s 3,virtio-blk,/my/image -l com1,stdio \\ - -A -H -P -m 24G bigvm + -H -P -m 24G bigvm .Ed .Pp Run an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI @@ -1061,7 +1058,7 @@ hd:/images/disk.7,hd:/images/disk.8,\\ cd:/images/install.iso \\ -s 3,virtio-net,tap0 \\ -l com1,/dev/nmdm0A \\ - -A -H -P -m 8G + -H -P -m 8G .Ed .Pp Run a UEFI virtual machine with a display resolution of 800 by 600 pixels From nobody Wed Apr 24 13:58: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 4VPgYt6fNbz5HQFm; Wed, 24 Apr 2024 13:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPgYt2KyLz4Vdq; Wed, 24 Apr 2024 13:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713967106; 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=GUx6ubs4almqD2UAEk2SpzMxB+eTLrOLNKHhO1iClp0=; b=WsaXPFTOIf39ZDl5/OUc+M9C2fKK+G6AKIdWru1mnGoH+4CxETOAn3PVv5XnY3HSKTKCtl SHSsalMrPPlZeo5KNjWPFCv4pFYegOLdhqf0xwFUUoawYkn4vbZm6UQ7ceT6yTj+yR2YtY wuXc9OBNczXz6xCiBkvXU0Vt3sq1zw4Q4m2KTSvy54Y2cnhiEIdLY4YzET6TAtE+OWG3nx jZOAg2yYn7RlvlgenA9RYvzAh3u1Kz4RXoZaQiVs3KyIvMpk7n6AGd4I1skwZ/lhCEOkxf CR5+eMEZvD8tlhp5r/r+gBe7m5bzN8CkSxTAltDQkKQ10i2REknKiQsJSVoZcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713967106; a=rsa-sha256; cv=none; b=xGLwmYnHNgEmwyGwmFFEmVAPXWJcu+t6MQ7TFknu+N29rl6QnO+0CW5xfGi5B4qyc4JxSu LfnuVW0EOkByLgQ/GUAaL0Z7yLsbqGOz48J8CczOWG+e0w5kFA6WMoGjnEYdXRh526g8hp TlxF0aG2IxloDVSRXUaA0HbhVp42Iqu5GPIsaHe56pNhlA9m+RGGjSjmvJOipeYzHKOtP6 32O7myU5RZanDBo25FOJE286EmRJc3hAygPQoabI6xXG8zUjNqRupq5Ktd7Jfxt9j0sUxj 2KQhmtWyAlT3epj96+18Qwgkjbqfo+FNwUpzP8N5XiVmBvhQhXTgh+/Fl4D/RA== 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=1713967106; 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=GUx6ubs4almqD2UAEk2SpzMxB+eTLrOLNKHhO1iClp0=; b=X/GUKzpIXN/ioMN2rLH3V9oTWYOU/D04l5HG3erSXJgWclKSzFBAXoEv4vBhO7jHnVZl3E qU+JHMm77VM9Yg/IFSAlsJnWeEK3ivtdguZ2o2SCB/vvaWDNiY0EUdXvpUW8eBkcjX4OiA tOj0OnyL0+hO942/q5C0TIHzWdnPVYKdfDYJyyX/t413SJXWhcs2LLFrz9GXnQJf/jQEeT uklyufL8gH3xG7bHnCCQWezDWsNX4BG9T4wcdNQq9WMl6Ru60yi0rMRz1jUF+ifTzSNk2n SUnuTXIbuzz+nkTUvIb7aaIjirZeOfc6hsFoR/yrfBh8esTaA85Hd6vuTwZytQ== 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 4VPgYt1wKfzH80; Wed, 24 Apr 2024 13:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODwQM5021543; Wed, 24 Apr 2024 13:58:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODwQxY021540; Wed, 24 Apr 2024 13:58:26 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:58:26 GMT Message-Id: <202404241358.43ODwQxY021540@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: 71b2ba909911 - main - bhyve.8: Document arm64 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: 71b2ba9099115db3c63f15e5085c0a677511f8b8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=71b2ba9099115db3c63f15e5085c0a677511f8b8 commit 71b2ba9099115db3c63f15e5085c0a677511f8b8 Author: Mark Johnston AuthorDate: 2024-04-24 13:57:42 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 13:58:04 +0000 bhyve.8: Document arm64 support - Mention the options that are amd64-only. - Provide a minimal example for booting an arm64 guest. Reviewed by: corvink Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44738 --- usr.sbin/bhyve/bhyve.8 | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 31b093ffaad0..42ba328451a9 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -93,17 +93,25 @@ .Nm is a hypervisor that runs guest operating systems inside a virtual machine. +It can run guests on amd64 and arm64 platforms with suitable hardware support. .Pp Parameters such as the number of virtual CPUs, amount of guest memory, and I/O connectivity can be specified with command-line parameters. .Pp +.Nm +is typically used with a boot ROM that can load the guest operating system. +On arm64 platforms, this is currently required. If not using a boot ROM, the guest operating system must be loaded with .Xr bhyveload 8 or a similar boot loader before running .Nm , -otherwise, it is enough to run -.Nm -with a boot ROM of choice. +otherwise. +On amd64, the +.Pa edk2-bhyve +package provides a UEFI firmware that can be used to boot the guest; +on arm64 the +.Pa u-boot-bhyve-arm64 +package provides a U-Boot image that can be used to boot the guest. .Pp .Nm runs until the guest operating system reboots or an unhandled hypervisor @@ -112,10 +120,11 @@ exit is detected. .Bl -tag -width 10n .It Fl a The guest's local APIC is configured in xAPIC mode. -The xAPIC mode is the default setting so this option is redundant. +This option only applies to the amd64 platform. +xAPIC mode is the default setting so this option is redundant. It will be deprecated in a future version. .It Fl C -Include guest memory in core file. +Include guest memory in core files. .It Fl c Op Ar setting ... Number of guest virtual CPUs and/or the CPU topology. @@ -154,7 +163,7 @@ Destroy the VM on guest initiated power-off. Force .Nm to exit when a guest issues an access to an I/O port that is not emulated. -This is intended for debug purposes. +This is intended for debug purposes and only applies to the amd64 platform. .It Fl f Ar name Ns Cm \&, Ns Oo Cm string Ns No | Ns Cm file Ns Oc Ns Cm \&= Ns Ar data Add a fw_cfg file .Ar name @@ -187,6 +196,7 @@ will pause execution at the first instruction waiting for a debugger to attach. .It Fl H Yield the virtual CPU thread when a HLT instruction is detected. If this option is not specified, virtual CPUs will use 100% of a host CPU. +This option applies only to the amd64 platform. .It Fl h Print help message and exit. .It Fl k Ar config_file @@ -235,6 +245,12 @@ The possible values for the argument are listed in the .Fl s flag description. +.Pp +This option applies only to the amd64 platform. +On arm64, the console and boot ROM devices are configured using the +more generic +.Fl o +option. .It Xo .Fl m Ar memsize Ns Oo .Sm off @@ -260,8 +276,12 @@ Set the configuration variable .Ar var to .Ar value . +See +.Xr bhyve_config 5 +for configuration options. .It Fl P Force the guest virtual CPU to exit when a PAUSE instruction is detected. +This option applies only to the amd64 platform. .It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu Pin guest's virtual CPU .Em vcpu @@ -938,8 +958,10 @@ Ignore accesses to unimplemented Model Specific Registers (MSRs). This is intended for debug purposes. .It Fl x The guest's local APIC is configured in x2APIC mode. +This option applies only to the amd64 platform. .It Fl Y Disable MPtable generation. +This option applies only to the amd64 platform. .It Ar vmname Alphanumeric name of the guest. This should be the same as that created by @@ -1033,6 +1055,12 @@ bhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\ -l com1,stdio -H -P -m 1G vm1 .Ed .Pp +To do the same on arm64: +.Bd -literal -offset indent +.Ed +bhyve -c 2 -s 0,hostbridge -s 1,virtio-blk,/my/image -o console=stdio \\ + -o bootrom=/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin -m 1G vm1 +.Pp Run a 24GB single-CPU virtual machine with three network ports, one of which has a MAC address specified: .Bd -literal -offset indent From nobody Wed Apr 24 13:58:25 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 4VPgYt6f0pz5HPyL; Wed, 24 Apr 2024 13:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPgYs6QMbz4Vbc; Wed, 24 Apr 2024 13:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713967106; 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=RXlufmkcuvhQSkPZjdMk/t+tilyFK1EWKb2jdUBYFmo=; b=LKncHn87QhBJ6LXfTYp2RyFQkZVH19KqQo6T++7o/6C7Jh5fDgVtjSbPg1QMjb1Jmm/13Q bjskz8Uhm/vI1T2vKnWnmWbK17IXpZf8rHSP+JmLs5jN/xOrFBHDWgULEFvJcfqfI+1mDW u7yU1uQhZyrjvnF/z72EkZXCLb7Fbjck6jdR5FaZAXgorLdzUnni7IFQKKgf+mNrn97G7h gKvmT7XkFxqQ41/0++p6eTNXfTT4zts8EHxWQRuMTswIbTvFaCTnbArPeLI+OaOScfCfM1 rNZAfQxX8rTUq5yokCtWeU7QTk3QriXJICDiryxUNK8Ll+/iroGhqIHIChrmCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713967106; a=rsa-sha256; cv=none; b=DJ2zJbotIcltmQewPniS+YSqLTd5zdhqjomLS2oqKqAaksKLWA4bYkIFGPZj6yBPP/3Zp1 wuPr7QftsYAlYw7ioX/o4O+Ym7dbB0Zme4aToa++ubBeDwiwmc7zXA2aW/KbSk/lxpDA5U s4PcVXtbG7bXa3llp6b8axX0TiiuWde9i7XfNuwbmBDFSBBTFXWfEgxlDhB95B6JN7kgd5 LuUdiZDFryjZ2eUbSb4/O25+5VLWuBMYclB2pa5toGraKwLZfNsJxQykWhllLePKL4VeVa Zq08HUbMQjatMROLWxJhbL7w3bjv3gKyA8vTEo6Biw1VP6r4llYTMIZVkD/HhQ== 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=1713967106; 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=RXlufmkcuvhQSkPZjdMk/t+tilyFK1EWKb2jdUBYFmo=; b=W67HJSBl4xNvgo2YTU/jJYc+DwqaLJeHLi4sQ7lxsJxTFe+fo64zIckzCwprmqXql9ZaEP sOZRbjE0B5c92Qu/5IUdjd6RTHhipTVNrr0F/KPg5GIMzvlVt2sti7tUZglI82xg3LT3nk Cnl75qNNs2JocBUQXi5LpxwW9bPh03HuGpG3XY8Lr7AXBIOxqglwvljMoQBBKlTLZ5ktFW J3Fr3yiR31+Tn6KQ8MuzlDyGgkKoG2iCNRycZ7g2klLSk54lN8OVAmgTZ/ZHzxbP+7dzXW a/b5Irbjc78q4buGvpfUWGAMnAWAIqRXLfNqasIrlIJ1sfOm9JaNbT/iMDejJg== 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 4VPgYs34TnzJGc; Wed, 24 Apr 2024 13:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODwPZx021504; Wed, 24 Apr 2024 13:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODwPA8021501; Wed, 24 Apr 2024 13:58:25 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:58:25 GMT Message-Id: <202404241358.43ODwPA8021501@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: 63d5f8c0f25a - main - vmrun.sh: Stop passing -A to bhyve 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: 63d5f8c0f25ae0ec17ad902c5ba89644e4bd1019 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=63d5f8c0f25ae0ec17ad902c5ba89644e4bd1019 commit 63d5f8c0f25ae0ec17ad902c5ba89644e4bd1019 Author: Mark Johnston AuthorDate: 2024-04-24 13:57:50 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 13:58:04 +0000 vmrun.sh: Stop passing -A to bhyve It's a no-op now. Sponsored by: Innovate UK --- share/examples/bhyve/vmrun.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index 323d8e22a041..19eed87af0bf 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -121,7 +121,7 @@ tap_total=0 disk_total=0 disk_emulation=${DEFAULT_DISK} loader_opt="" -bhyverun_opt="-H -A -P" +bhyverun_opt="-H -P" pass_total=0 # EFI-specific options From nobody Wed Apr 24 18:31: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 4VPndB2zpkz5J6Tp; Wed, 24 Apr 2024 18:31:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPndB1NsNz42ts; Wed, 24 Apr 2024 18:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713983502; 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=ypHKyiVeQc09yMjLYI0V+mIKx4BjPJYhNEbTqWpLc+w=; b=mV4PDq4H0jh5XC60njgKffrfvqGKuoK7KAKMFnfwVPc1PKV0cgGRuFnm+Fs5wzWBo3BBZX yWXKx8181TD9T/krCnbVGu5FEcclKxjEn0K2YQFrpqOj5FjuWf/ZxAp/hGNolSzAo/wxCB gbX6U9AFYIJfXsQy/DieMaAKowwaI7bIuDi/GppZiEcfwXf2R81a9pLemIXhYxGAkTyzDt MN+E65W5yjEnqjlnK9qXieMCxBGhC7IjMN2c7ng3YzBnvmDJG9QXCM0gdu8PY2z8ZlBHmW PeO40lMKC4N2dbekWgRjpL9K+UCvJco47btPlBl6udGCFMO7Xvin8RZgzh7vEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713983502; a=rsa-sha256; cv=none; b=ivTZp/+CdmC07q2weWWJF4mda8E+7eIQGFi6lSF07wGpmbFm7WH2T3TAMERnfdoVHTPJkf CEo3u8Xz0PNugqUgFPa3b6iH3tjTaGOVYOQu5LJB33Y2nzs6tSs/pRGXVKxwT5YUMPKnFY M0x5UpWd5Q0j7SL5akX1JWBuLHmITpq51Zq/AI0tZEHAxpXjrz3OAJbDprLHoIDtKcv/EA ZLuxzMvz0j6aMn2PbBzPcL/EDP8XHwt5XCyt6qPpT3TFVm1C7OINGld8d9oYnbfO4Thk2D +4jtouHM0blv81mgqX4nL3Bp2nJawEUFblKljaylUxGoBPnIt5FLZLHfxf7Aqw== 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=1713983502; 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=ypHKyiVeQc09yMjLYI0V+mIKx4BjPJYhNEbTqWpLc+w=; b=mcjg6m+DwnXVvC3xo3EDvQp3RPdgeSYlwFTrfNnZV4mNcITRTFhCWfEhRb0ZM3hENTbM2S nfa8E4ki99JjUc9mEv0Chzd0ddOcunx75GAouzv7ypSkfUk1eT2SOc//KXe9GGZ5dKQoet zidoey1Xk+dYAgmR49UdD7VEIwBVrCI+A62iyEOhi8idVTPBhyKXflFGq7ImMNl4iR3Q1A D0LbgQ0DLWpOewwHC/tOvd901NOEE+TxOvzX0tgWDfW2gwv6c66VOsNcDwVp6bLwMCwHsd /f+LUJQZNqSNS9NQI+VCzhpj1Gwt34MzkBDMmlF/wBU0zMZXTq17w/Go0D4Zvw== 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 4VPndB0jddzQMQ; Wed, 24 Apr 2024 18:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OIVgeI091188; Wed, 24 Apr 2024 18:31:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OIVfGT091185; Wed, 24 Apr 2024 18:31:41 GMT (envelope-from git) Date: Wed, 24 Apr 2024 18:31:41 GMT Message-Id: <202404241831.43OIVfGT091185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: ef80df0a7191 - main - arm64/vmm: Ensure the tlbi has completed 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef80df0a71912500ad84060334a24e903869f00b Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ef80df0a71912500ad84060334a24e903869f00b commit ef80df0a71912500ad84060334a24e903869f00b Author: Andrew Turner AuthorDate: 2024-04-15 14:36:20 +0000 Commit: Andrew Turner CommitDate: 2024-04-24 18:17:19 +0000 arm64/vmm: Ensure the tlbi has completed Ensure the TLB is invalidated before enabling the EL2 MMU. Without this the TLB may be in an inconsistant state leading to a possible exception when enabling the MMU. PR: 277559 Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44799 --- sys/arm64/vmm/vmm_hyp_exception.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm64/vmm/vmm_hyp_exception.S b/sys/arm64/vmm/vmm_hyp_exception.S index 77cb8cfd6cd7..0e8b31ae8b12 100644 --- a/sys/arm64/vmm/vmm_hyp_exception.S +++ b/sys/arm64/vmm/vmm_hyp_exception.S @@ -215,7 +215,10 @@ LENTRY(handle_hyp_init) /* Load the base address for the translation tables */ msr ttbr0_el2, x0 /* Invalidate the TLB */ + dsb ish tlbi alle2 + dsb ishst + isb /* Use the same memory attributes as EL1 */ mrs x9, mair_el1 msr mair_el2, x9 From nobody Wed Apr 24 18:31: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 4VPndF0Tskz5J6Lr; Wed, 24 Apr 2024 18:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPndD2qfQz4347; Wed, 24 Apr 2024 18:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713983504; 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=M751VqXBxg80UHckkKhKXxyu8ny0c/9mmAxmq3RLoP0=; b=ngsbOHsXU8+v2ywYu96eQmfjrwlWp+q7wWL6218zydsJavOLi6fRnuQqED6WL2U7gr+Awp eOv8XTAretaceKJHzVJ0eeC3hZ/nwHl02Zl0PSq41VTb1I58cuYQ+kHCjhB0h+TLCXjnk5 AavuC9lz82ewcpZdDnB4GWN/eww98AWaT45dPoIqirB+EFQt4g7I15dXZDzn2b7fxp+HSj JfEh6LH/JLTd530LbRlNXg2ge2PtbcTiGWU3MhQjUeipK0v7Gb4AW4JlD3PJzhtErFf0ZD UQl+veRIzs0ZjpcSnsux3jegXQasU0+VKpWjnyR5m5YIGDwAfL3+i363KIWHwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713983504; a=rsa-sha256; cv=none; b=UtN68Wda6SqnHseNI/o/WAfkVcW3j5kt/IJo/DGeJ4JRe7GPM8r8FSmsJ++LjI8owHUD6d ER7oXqxBUSdcHMxbVy1E2ifTW/18r4bwp4T03IQbuhc72OKT9kjInKG+qb0gblDN7V/uVG xI0Uphe0YU1qhN/IYGSuElTK+mLOpPjmkbMFBmQLGw3uHoqT/LSAnuMA4uLQ16M4EpFrcJ 7uAp2J8WiFgkcCTMakEhBa0N5XovELF72Dd7/EcgX1zE4f0jFP2cU9iLzC3x+EDX7AsHlh uCOwiurcaoui5vYMrfQ0nhOIIc1YKJ3dWeTaORBmApjauB3EoMMrv7NJQ0ZTwQ== 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=1713983504; 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=M751VqXBxg80UHckkKhKXxyu8ny0c/9mmAxmq3RLoP0=; b=wE5xUr5iwqe9IvsWRfFNcRYVZi4KXukx1bpAbKQvQN8Bq11TREFvQRsN62jkiZIaVMVCXl KqyHU54nDZQ5FA+VHZvAc88oHEqnAjG3YtNkUqL41rAKhBzJzgQDD9O0Dhqn61YFCwk86a kul2+OcxWNPfdzImKs8hle6MriRa19WPk1Gd/mPysUsyno68ukYGBsdxD/wQ5/yaNGgcML V5CAv5w6cwyBc4TdM3ASUqXcxlUQl4sSz+x6Ztf3AEw2Y5lEndvS8dwVHmxf/NA1qNzHcR qGyZj/XtuB42hSdwTuYMgbbFvan/raloWzYkUKIubQPAoDiG1gKDkt/XHIIR+w== 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 4VPndD2RxvzQqq; Wed, 24 Apr 2024 18:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OIVict091288; Wed, 24 Apr 2024 18:31:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OIVigU091285; Wed, 24 Apr 2024 18:31:44 GMT (envelope-from git) Date: Wed, 24 Apr 2024 18:31:44 GMT Message-Id: <202404241831.43OIVigU091285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 2c35c867ba05 - main - showconfig: Set MACHINE for src.opts.mk 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c35c867ba05c8de167e1597c9044a72febdda63 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2c35c867ba05c8de167e1597c9044a72febdda63 commit 2c35c867ba05c8de167e1597c9044a72febdda63 Author: Andrew Turner AuthorDate: 2024-04-18 15:22:46 +0000 Commit: Andrew Turner CommitDate: 2024-04-24 18:17:20 +0000 showconfig: Set MACHINE for src.opts.mk Also set MACHINE and MACHINE_ARCH when reading config options from src.opts.mk. This ensures any machine-dependent options are reported correctly. Reviewed by: emaste, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44838 --- Makefile.inc1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index a0fd539ed25f..0728df1221a0 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3598,7 +3598,8 @@ check-old: check-old-files check-old-libs check-old-dirs .PHONY # showconfig: .PHONY @(${MAKE} -n -f ${.CURDIR}/sys/conf/kern.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}; \ - ${MAKE} -n -f ${.CURDIR}/share/mk/src.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes) 2>&1 | grep -E '^(MK|OPT)_[A-Z]' | sort -u + ${MAKE} -n -f ${.CURDIR}/share/mk/src.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}) 2>&1 | \ + grep -E '^(MK|OPT)_[A-Z]' | sort -u .if !empty(KRNLOBJDIR) && !empty(KERNCONF) DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ From nobody Wed Apr 24 18:31: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 4VPndF5TPKz5J6GB; Wed, 24 Apr 2024 18:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPndF3MQYz439R; Wed, 24 Apr 2024 18:31:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713983505; 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=od1ds+i7wVK+PWJHGKDbNhESxh6G433+RuBZZYYJAY8=; b=BkwN2xBYSGNUUpn3fzvzuXnKAzESE+LM7UAZ8TMM1gM94meHI22fspm8YtE+amaVD/zGif /eWFsBDoxQef2WMzEVo2SxJVmV91rZad3h2elU1AxxdMkdm9oMS8jx3Lr3paj3kRt1Y+q6 5t+JSzC7Ma8uaks2HkBaW8lscvYtgPOcgLAkJ9uh1iLmmee8z6ok+/c+V+H1PnvYtF3BR2 htpkISH8pzMPl3+W88YoP1tdEFJ2IQ42tFIIrV6JCZsaQR85e6v4d28j0fRjUra1p8Pt59 4DJcF0myqPdDhQVnOLyXPEj3HFmsRJZWqaphfoi/tOtmETkRkp/s2EsOQZrsCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713983505; a=rsa-sha256; cv=none; b=TCZNZLtd82MeyMBL6adI2YW8UOhnMgljXPOAIPqVXQk3vuf06cSrnz71X2Vcbyzoire4fW PLZJs2ZwqqQ4ZjFQGN2F9xP3Dw7aCh+afbCMCXK+KQRUH43tUNkzfVq8h0zyNNnrMZIEp5 9RwsN/4cxgnzHMlzzoVRudRJQn/dAjPk3OWHUhF7DXacbDnvXzOZdNDnWO9LCEPz6IJHuI ZjflPf+BHx3aVij+6mFGtgZkXhRgwDo++BSN1k/wQkK5lfKlSxLrufX7Z/tGyWXAKOtjAS gW1+773uuJARzmB182HhEdCf3igS1fG5d3R10SebSvie3EI78njFxl++vfxUgA== 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=1713983505; 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=od1ds+i7wVK+PWJHGKDbNhESxh6G433+RuBZZYYJAY8=; b=Y7Y2Ug+LYWKjTKaGJ5RHHsDzKcKuEdzoBVC0A+ArdwIsyQNvkKHrvpvlswwcKYBucB7csZ Rb0nqQuG5ZnVbJurG3V/fYedzCBVn/WJrwhIfGjyDJM2fTGPjDJYCV6N1GV97hCLXCimyH tDyXpDU7CXWrwNHX/dW20+TpJ7+lwTK3TngvZRZtWy8CXZGw7Y2a3yND61mDkC8aPkiaVF VJt8XrHtHroOavTAK87O3IXFMMP6Khorh8CY0ek9AooMxK5IdtmlpuzwpKRF1BhO7c59Ta eKKmb+628WbkxElzhysPZGzdsjVGLdJjw783EdSPc+xup23vOC6kYLPuTLQ1kQ== 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 4VPndF2zvjzQvN; Wed, 24 Apr 2024 18:31:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OIVjxV092349; Wed, 24 Apr 2024 18:31:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OIVjUV092335; Wed, 24 Apr 2024 18:31:45 GMT (envelope-from git) Date: Wed, 24 Apr 2024 18:31:45 GMT Message-Id: <202404241831.43OIVjUV092335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d7ac42676dc4 - main - elf_common.h: Add STO_AARCH64_VARIANT_PCS 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7ac42676dc403cd31d4a6c9a91a2ed5680cca86 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d7ac42676dc403cd31d4a6c9a91a2ed5680cca86 commit d7ac42676dc403cd31d4a6c9a91a2ed5680cca86 Author: Andrew Turner AuthorDate: 2024-04-17 13:18:24 +0000 Commit: Andrew Turner CommitDate: 2024-04-24 18:17:20 +0000 elf_common.h: Add STO_AARCH64_VARIANT_PCS This is used to mark symbols that use a variant procedure call with a different calling convention to the main ABI. Reviewed by: kib, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44868 --- sys/sys/elf_common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 934f66fee953..b9e82cb8fa35 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -883,6 +883,9 @@ typedef struct { #define STV_SINGLETON 0x5 #define STV_ELIMINATE 0x6 +/* Architecture specific data - st_other */ +#define STO_AARCH64_VARIANT_PCS 0x80 + /* Special symbol table indexes. */ #define STN_UNDEF 0 /* Undefined symbol index. */ From nobody Wed Apr 24 19:27: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 4VPps53rNVz5JBb5; Wed, 24 Apr 2024 19:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPps53C0Wz4BrM; Wed, 24 Apr 2024 19:27:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713986825; 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=oacPFf5adgxca/NX0CHZAVxa+3RQBnQ+rxoUImv1O9Y=; b=cngqwGCUbXPVe0MligiuKIEUQe+aYrx9Xzwe1ylV/bYPgw9UJQR/HRiRiYnzbv1htHHtNG EaFkLXJ7spZN8FMhu5FhWHFRZkov0Un5OtyCci2u+d5RDE+pd5f7p4XqVuAHHvw/QV0M37 jrJhuZam5bAKi/vdKrajD5bbpxJZPqA512L+vvvzQRvWhgLIDvANZz2la7S1bydWcPvLys oThZghNx1IM7sV57H+MHHLBYnNXnPJTudo2wqkF5CO6BDwNpegjMQIUdBrUr9GtNM6SH9D 8tLtJkFMlrjSlN89IIKSQBzM5lD9NxrMFzS7FMAxfMnAzJrEhn0Ib8SUHgWSBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713986825; a=rsa-sha256; cv=none; b=ia1M7nkKc+QlejRw/D7Luyd0ggDJZO5W3QLnUiMjg3KVOUKBojfllK5gVXSsavpEwf9r5p PGWCW26lxTqcHRXAM7VcPZ/ltaN6fb/Ppx9IOAkmS0H78KMFqUZ3E3crJ0cdIDsqJa2xal KEvjJFjdOy3ZnJWif735kvSWb4NToWvFiUNVkQ916tJln/GCxhsUwRBC/zUYjbj2jBleyy MhcIjxsy9+IXON3dcAoYPrIW+x73A9KSwfS5HEkxaenVultetU4O+oR9Xu0uDWgHQc1WnT n6hSeztyEyibinr9oNs6cMEsaUBWK+WMebEAnBdq0q/z41CmV9jskQKa3Tb7Ig== 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=1713986825; 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=oacPFf5adgxca/NX0CHZAVxa+3RQBnQ+rxoUImv1O9Y=; b=T0Lg8jyLKhrkgtr91cky8MsLIPLxIvzPzMIVuS66eRrbBq0WW96EAf/90jdfT8hMytuJxI TVPMyvSL+XxetIoAloMvtu8OwlMCRSD1kqX5HRh2YHK8LKEnhkVj1s4KK1ftmvaGAaoQnS GglzvpHz6pZcR6knawvpXvLmtZiwnOGPncWoXIXzjwg/FPRFRpiFGEQ9Kp5vSj81tdzVbZ ONy7ifryIv5NpD/AsOuqKjyCkA7r1P0R0SeZGGOegXUHeDiDL6OUnLFjokS5IK/gBOs0FE E1WOk6U9PryMQlGV4vz16fVifBkzfNTIbkLYpkDGGCMAF7wRqcOT1lP6OdrUFQ== 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 4VPps52hP9zSK8; Wed, 24 Apr 2024 19:27:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OJR5mh080046; Wed, 24 Apr 2024 19:27:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OJR5Wc080043; Wed, 24 Apr 2024 19:27:05 GMT (envelope-from git) Date: Wed, 24 Apr 2024 19:27:05 GMT Message-Id: <202404241927.43OJR5Wc080043@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: 0135101e23f9 - main - meta.autodep.mk do not override start_utc 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: 0135101e23f98205157928dc819ef3bc993a4276 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0135101e23f98205157928dc819ef3bc993a4276 commit 0135101e23f98205157928dc819ef3bc993a4276 Author: Simon J. Gerraty AuthorDate: 2024-04-24 19:25:42 +0000 Commit: Simon J. Gerraty CommitDate: 2024-04-24 19:25:42 +0000 meta.autodep.mk do not override start_utc Update meta.autodep.mk If included at level 0 it is important not to override start_utc --- share/mk/meta.autodep.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/mk/meta.autodep.mk b/share/mk/meta.autodep.mk index 9824570ecc43..55f2d66e56aa 100644 --- a/share/mk/meta.autodep.mk +++ b/share/mk/meta.autodep.mk @@ -1,6 +1,6 @@ # SPDX-License-Identifier: BSD-2-Clause # -# $Id: meta.autodep.mk,v 1.62 2024/02/17 17:26:57 sjg Exp $ +# $Id: meta.autodep.mk,v 1.63 2024/04/24 18:56:41 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -308,7 +308,9 @@ CLEANFILES += *.meta filemon.* *.db # these make it easy to gather some stats now_utc ?= ${%s:L:localtime} +.if !defined(start_utc) start_utc := ${now_utc} +.endif meta_stats= meta=${empty(.MAKE.META.FILES):?0:${.MAKE.META.FILES:[#]}} \ created=${empty(.MAKE.META.CREATED):?0:${.MAKE.META.CREATED:[#]}} From nobody Wed Apr 24 19: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 4VPqDH2pM7z5HyqP; Wed, 24 Apr 2024 19:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPqDH25Phz4FPp; Wed, 24 Apr 2024 19:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713987823; 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=tmguB/Jj25pXaUbYV2Yb0stpf2PunLCHLZBzgNeN9EI=; b=xKYW8VFe3Qkgad9jujl4QPVRKUSDUhgWZbYAyhUahlGhskoCKqbAW/yPgnigIL1pLpwsyp 7ez2aBGOOnJLeRUIZ0xZ8Cm6Ad6WFZCoxHyRreNRBL+mo7eSW0ZowIZ1C0aKnLo0yCIks7 iwY9XJihCKqi4Vb0aKZeyOQLI8Z3YvWof777TCJ3NTrtbqKgTdGu6GoSshY1mcWi3rKfut uc0yeiFXbvrE8SeGt/fHjPflPk2N2OgYuaMG9CblV+sw9GRgHHtX63eb6rTq8BR0lHimJZ pZ0A7zASMWGGicyTpYSS4gE5V95Zjo+LwHTUNaMWEG2bey3uBPJtNRJ1GJLoxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713987823; a=rsa-sha256; cv=none; b=AfwPzq7zub63zy4btq2+shbWKEMMHu9S+GlSShZ5HPf/xirUt7ygc6CWJjkmokAy547cci SomewQRIOtZS687R9lehoKErmbgBZiYeYuPtGMXeL4SPfS9LzaT6oTL9QzHYxnLBnZLjAw DYoCk/FW8Vullggh0/9SaCugQSjNAY86/nAo1If1+6Up3u+6AnB8X6pQMuDvra7KCWJne9 mfU7tag3M15/F2tNoYDNrik78HYkVbypMGPnJT+I82wPnLf72uHKqb/WrDGo7ehHZzdSCZ hpd1QdNWuHkYqYfsWb6AAOvLerNXv/bFh/5WrKoVPHNfdgKo0fqxNxefUXBWXw== 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=1713987823; 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=tmguB/Jj25pXaUbYV2Yb0stpf2PunLCHLZBzgNeN9EI=; b=QJuoufyKPztGSUoljh1MDmdzAZha5/17x5otxc0I4OQFzyCySkb9udrt8ZNem8+iwhTGsz 7jgQ0TsMj/8jKU7A9zwRL3NUSqZms80FCtRCwrJZi9lp+MUjt5gti2icjlWc3QDzZWcw8W 38quOfmNlyj4PSo8GMRODjYec4LP4+srMqYcOW3oJTXWrarFXWTHzsB21G8PVgKmZZcd9T TJNIJInkvMS8VHmEuTFj23CXda8lYV9jVbw5Pjt057k611v0AVusaBX6Kd6tOsY/cuzaHJ lHAJqbnNZBL9fHCcdRyP/BY27yyjdQtsb5zwlEHUpLpDgyIsCXSqNLzUmdVthg== 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 4VPqDH1bs1zSyj; Wed, 24 Apr 2024 19:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OJhhOJ013940; Wed, 24 Apr 2024 19:43:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OJhhig013937; Wed, 24 Apr 2024 19:43:43 GMT (envelope-from git) Date: Wed, 24 Apr 2024 19:43:43 GMT Message-Id: <202404241943.43OJhhig013937@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: 66df81021e54 - main - sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c 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: 66df81021e5437e86ff5e0886c35170feb1cd3a0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=66df81021e5437e86ff5e0886c35170feb1cd3a0 commit 66df81021e5437e86ff5e0886c35170feb1cd3a0 Author: Konstantin Belousov AuthorDate: 2024-04-24 18:55:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-24 19:43:31 +0000 sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931 --- sys/kern/vfs_lookup.c | 5 +++++ sys/sys/namei.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 7d708bac607e..180605f9eb8a 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -86,6 +86,11 @@ static void NDVALIDATE_impl(struct nameidata *, int); ndp->ni_cnd.cn_flags |= ISRESTARTED; \ } while (0) +#define NI_CAP_VIOLATION(ndp, path) do { \ + ktrcapfail(CAPFAIL_NAMEI, (path)); \ + (ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \ +} while (0) + SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE4(vfs, namei, lookup, entry, "struct vnode *", "char *", "unsigned long", "bool"); diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 08395c6d699f..2ea4f502e8fd 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -205,11 +205,6 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, #define NI_LCF_CAP_DOTDOT_KTR 0x0008 /* ".." in strictrelative case */ #define NI_LCF_KTR_FLAGS (NI_LCF_STRICTREL_KTR | NI_LCF_CAP_DOTDOT_KTR) -#define NI_CAP_VIOLATION(ndp, path) do { \ - ktrcapfail(CAPFAIL_NAMEI, (path)); \ - (ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \ -} while (0) - /* * Initialization of a nameidata structure. */ From nobody Wed Apr 24 19:43: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 4VPqDJ6Jshz5Hyjp; Wed, 24 Apr 2024 19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPqDJ3vQCz4FHt; Wed, 24 Apr 2024 19: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=1713987824; 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=nvVY/3bEoPQVcpCL5lnzv2gjw+6ZtHsZo1dtfAiy2HY=; b=hGi23EFp3WlUVdu0IvDVAxpuAVRjDKWDKIge90JDFfGsK2gttaTMlGs1VRFGLSnGiGM3Us lNIbyRupHzcHpE4cjIwFbmXGKN/K96NPv2tYipJaPt1/tAt+EEUwEjPbsLqEcVWd9l5t0j qp/KPdIzVlPWgOV/yhW5JYHYB/W2vPOyJbgUaNizJ6k+D885S6LxFuq/OJ/LrDK5oB7057 oVuhfSoPrDxkx68rjVuk2kuOodA4E7LD1d9jQqFWSJF02KJdqpfd6P4FfbO3aFUqHzV0Rd VfYZW3RrQzpssehZoCDn//IN3HZBrTy9y/ZFlIBqoY3hYgVUEKK9pqWH9skoDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713987824; a=rsa-sha256; cv=none; b=fj3F1QLuBeOmy1Ie8wiNFTgcmeAppXUMER5/ACaUBxhdJa8v7SqIRL4BtMstdQPKP0daz0 Rj0mwyzaOmZYvc3IJVJZ+pPMKq9J151lckl9a3euaqZbr6UpZ89MSELe/vNdk/bIC9JKHB y4kgf0XOd819oU5KCmnZZOi7XtDzpT25U7WrDK8mbF/8x8YwxyOvIpF+9Zjp97pIpX5MGC iqiB8q1+TbfVcQ6bLNJtQCndIPaDS2Brkt9Jg1PjQlqlRVaU1XdGKwnrb228E/xPMwgikY HYnMl/GMP7sDzZcZD9W9CjOQtNfACQI5R3gTG8ujPiA+/Sz1PbR3k6FwegTzHg== 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=1713987824; 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=nvVY/3bEoPQVcpCL5lnzv2gjw+6ZtHsZo1dtfAiy2HY=; b=Ync5EW/+2g4Sac/eecqBaroV1LKb3K9fo8iRmrIJyWNZK1i6nu3vsFl0JMgcE9JnK4z8JU 9cG10qZfcqrOKTwk46VZnKL2heYJbDwRgC7Ods1P2o992xabq/wEjb2JI7gRSNk0Zkvcym 4pOQ6ZKabgS4l8HOg3lxhFaGmMQMW0ZzwoTjhYPycIbvS5e1ORz0+cYLrMqTAwk+pX5+5V M+owUdo2FTvrCyH+R/Kvjf7mDd+1nptIrNl0WDEUi/IdK536jCCwCrCRJpcyffpg2uJUnr k189GUyz1IDOFTdztVAgtMnFDu+E87RjTF6pP63e8iihUecXLlJYu1lTTQ4b3A== 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 4VPqDJ2brDzSgQ; Wed, 24 Apr 2024 19:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OJhigt013991; Wed, 24 Apr 2024 19:43:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OJhi1F013988; Wed, 24 Apr 2024 19:43:44 GMT (envelope-from git) Date: Wed, 24 Apr 2024 19:43:44 GMT Message-Id: <202404241943.43OJhi1F013988@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: 6b0cf2a2379b - main - vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled 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: 6b0cf2a2379b86b67269ed4549057cd6d69490e5 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6b0cf2a2379b86b67269ed4549057cd6d69490e5 commit 6b0cf2a2379b86b67269ed4549057cd6d69490e5 Author: Konstantin Belousov AuthorDate: 2024-04-24 19:06:14 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-24 19:43:32 +0000 vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931 --- sys/kern/vfs_lookup.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 180605f9eb8a..290834c10be5 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -86,8 +86,14 @@ static void NDVALIDATE_impl(struct nameidata *, int); ndp->ni_cnd.cn_flags |= ISRESTARTED; \ } while (0) +#ifdef KTRACE +#define NIKTRCAPFAIL(path) ktrcapfail(CAPFAIL_NAMEI, (path)) +#else +#define NIKTRCAPFAIL(path) +#endif + #define NI_CAP_VIOLATION(ndp, path) do { \ - ktrcapfail(CAPFAIL_NAMEI, (path)); \ + NIKTRCAPFAIL(path); \ (ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \ } while (0) From nobody Wed Apr 24 19:48: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 4VPqLJ3cdBz5HyyG; Wed, 24 Apr 2024 19:48:56 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPqLJ35wvz4GFD; Wed, 24 Apr 2024 19:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713988136; 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=/68mWIHjynLsDqVx2aj91jNmPdZu3sVhA+Ad2b70ilo=; b=dybOON+rA2EkWyaoTOoe1hLk3VqO/2RToTt7ZB0Tm1bsdvX3wW3QTBFXmf8Ugn4fpiB1uv 3SdI+obxvz9Uj8bQ09jpAhm0kCKNMyobUgqfFE+oDlPb8N/ICXOWbaU6po4KZnRnHDCqZ+ iIDtbGf7jF2UeQ808bsvYfAKcH/CTF0/VeSyi2n7umjT912jO7rEaeImXdWoM+/xJeD3al KduUaSscC6GkBkbS9G5dMbqEXEt5niHjbtAUvAAIEvIDGCQMpJRlf9UI0s9Aun2c4neeD0 7p+fmzXO64i1fUbZBVyISd5t9RtU7Y0a0YwB4sE8kOs+vyh+OcKqIqHJ1UDyYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713988136; a=rsa-sha256; cv=none; b=WacK1I9B7Ps5AS7cRDmoNioqg9Zc/IORkkBBmniiYQfvJfawhAANpETuD7dZZQalXhwEJX IIWp28gtSkpeQg/NIJd3TfJUHPw514y4PqschgYAIZZU+hEwXzX5puITQtE0ebcBovJ/MN NXAvNLGLkuPu1WGD7DU8PQ+Nnb35jPWG6w1bPRB4tV4wHnQzleOgGYjFF3muPBH3Q+iK8Q 6CR7OgoTg18dTTlZrAN5yNN3tYNGlLx63zlUuzmwGC8vWBz+acL/swQuZ+P1bhUCl8Y/+8 z9zmNge6KKS+ElbqPi8c0LP+Wb97Wi/mGgEx0y4YjRLPeHN7ppgKd2jcBn4lFA== 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=1713988136; 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=/68mWIHjynLsDqVx2aj91jNmPdZu3sVhA+Ad2b70ilo=; b=pUoukVzCWi6drN21d+WBlFLC9NIbl9moalHM75vziSXr39s2GJBqjcXc3oxIWZdnSoSFe1 L/PDLJKQIafYyRD7pXCGFZL/B4GCV6pUgxv+e/qSVqCiEoGN/fvA77OBwQA42J/FhXmXcL GpZhJ4aTkjX+YyDXCa8GRnM9ZE/nCxhrOIkJqz302lzDR4sksW1xSV7ecS+OiNOGm36FUF kJsok9D94kxmkkEOCujfI1zQwnTqD7fMxUnI6k7gJm/8N4OsfW1cJagrR963ITuic6woUY lV/vIhIFE657JCBTL2X9P7955a152IJcE/gQFfg2X2rS+CfXhoUVZKww/41iQQ== 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 4VPqLJ2VSszSgR; Wed, 24 Apr 2024 19:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43OJmuqV014904; Wed, 24 Apr 2024 19:48:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OJmuOL014901; Wed, 24 Apr 2024 19:48:56 GMT (envelope-from git) Date: Wed, 24 Apr 2024 19:48:56 GMT Message-Id: <202404241948.43OJmuOL014901@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: 78101d437a92 - main - syscalls.master: correct return type of {read,write}v 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: 78101d437a92d539584795ffd2c46724da37e662 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=78101d437a92d539584795ffd2c46724da37e662 commit 78101d437a92d539584795ffd2c46724da37e662 Author: Brooks Davis AuthorDate: 2024-04-24 19:47:22 +0000 Commit: Brooks Davis CommitDate: 2024-04-24 19:48:46 +0000 syscalls.master: correct return type of {read,write}v This was missed when read/write, etc were updated to return ssize_t. Fixes: 2e83b2816183 Fix a few syscall arguments to use size_t instead of u_int. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D44930 --- lib/libsys/_libsys.h | 8 ++++---- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/kern/syscalls.master | 4 ++-- sys/kern/systrace_args.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h index d0dd144bc8f1..d4cd14ceb75f 100644 --- a/lib/libsys/_libsys.h +++ b/lib/libsys/_libsys.h @@ -141,8 +141,8 @@ typedef int (__sys_listen_t)(int, int); typedef int (__sys_gettimeofday_t)(struct timeval *, struct timezone *); typedef int (__sys_getrusage_t)(int, struct rusage *); typedef int (__sys_getsockopt_t)(int, int, int, void *, __socklen_t *); -typedef int (__sys_readv_t)(int, const struct iovec *, u_int); -typedef int (__sys_writev_t)(int, const struct iovec *, u_int); +typedef ssize_t (__sys_readv_t)(int, const struct iovec *, u_int); +typedef ssize_t (__sys_writev_t)(int, const struct iovec *, u_int); typedef int (__sys_settimeofday_t)(const struct timeval *, const struct timezone *); typedef int (__sys_fchown_t)(int, int, int); typedef int (__sys_fchmod_t)(int, mode_t); @@ -540,8 +540,8 @@ int __sys_listen(int s, int backlog); int __sys_gettimeofday(struct timeval * tp, struct timezone * tzp); int __sys_getrusage(int who, struct rusage * rusage); int __sys_getsockopt(int s, int level, int name, void * val, __socklen_t * avalsize); -int __sys_readv(int fd, const struct iovec * iovp, u_int iovcnt); -int __sys_writev(int fd, const struct iovec * iovp, u_int iovcnt); +ssize_t __sys_readv(int fd, const struct iovec * iovp, u_int iovcnt); +ssize_t __sys_writev(int fd, const struct iovec * iovp, u_int iovcnt); int __sys_settimeofday(const struct timeval * tv, const struct timezone * tzp); int __sys_fchown(int fd, int uid, int gid); int __sys_fchmod(int fd, mode_t mode); diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index bfcf9a46b485..ff62adce85b9 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -9473,12 +9473,12 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* freebsd32_readv */ case 120: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* freebsd32_writev */ case 121: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* freebsd32_settimeofday */ case 122: diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 8a681889cc6a..274167ac11d8 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -782,14 +782,14 @@ } 119 AUE_NULL RESERVED 120 AUE_READV STD|CAPENABLED { - int readv( + ssize_t readv( int fd, _In_reads_(iovcnt) _Contains_long_ptr_ const struct iovec *iovp, u_int iovcnt ); } 121 AUE_WRITEV STD|CAPENABLED { - int writev( + ssize_t writev( int fd, _In_reads_(iovcnt) _Contains_long_ptr_ const struct iovec *iovp, u_int iovcnt diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 59152b25177c..e7231bf8570e 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -9618,12 +9618,12 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* readv */ case 120: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* writev */ case 121: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* settimeofday */ case 122: From nobody Thu Apr 25 03: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 4VQ1LZ0z5Yz5Jktf; Thu, 25 Apr 2024 03:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQ1LZ0LMHz4GNF; Thu, 25 Apr 2024 03:19:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714015190; 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=69RzxsqprP1hSYvq00oMDyRwpISzwprVLhioaWvwwRE=; b=tXOH5AfD1S5ixhhWzQtNqDzVpfY8alq2ZdiDZcidC4EPFEaxNXhi/KqQibEtC8LFm06MbZ Auii4t8DD0WDF42lUfidKku11cuuegD6blOSYXNNVoibXTpb9c3ihI8WoYmDyJyNxcD6bz +JfN5W6E49a7uWnam4ickN81Chk/j35pJ67QPDCIBXrlHnv+ebys/PdiAPdhgqKQHAl0Vr BsNfjPIAYwnb0uaLYDv6a7C2ihyyyQJ/txke5ZxHx9+RWAFGCoQwq9wjIso9tqeQK0xEby GLCHafB7WDTAX3/lzAYTqCwXvZZ7rnZYfyze2Dg9qazPldqlONIyepLVL962cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714015190; a=rsa-sha256; cv=none; b=IpypIAOk/OwgHbukkdl3uobyhykzMEQT+Qa7KErajxFmfoyZ91BwRLh//rcdOa/UIobEwN pwE1HKs72TGsjscjpj7UNlwfjTjQy19ojimU2O8k2ms9MKG58t+s3ASdTKhhEeL30NFk9y 8eoc3k1Rv/yRY5D7w+SQk15uVh44+vLnVA0vNsKKKOcFPwro8FnxDUD7OBcVXIDi8NL94b lk4KeKh2cl2wEBvjtRfqI7qItCBHbIhL1dCJF+5XehniYlBoIigCt7U/oi2q1tCaGSuY1X LuspFo3JpDyDxlQmnED41S17VOqceGm8AZkvQfhV7pipcWG4XQBnC5rObDPWgw== 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=1714015190; 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=69RzxsqprP1hSYvq00oMDyRwpISzwprVLhioaWvwwRE=; b=dmXVh6qurwummg8tc2CX/tqcOAzzgvOrgrUof6lq2YGpw0Fst/vyUoMwKWmf82pdGkf8O5 v6s3tVKOR9ZJQGS8eMTf2KVGN1arbsvckidMxbH21P0llAhE6LFzktJ4SFv0/QAZPYJEdJ /By3AIjazaji7f3NqJKjOMCiuaQJAEjnxR1mE0pthvIDwhNN2dIMWQXunbhLDYLrrq56cR fydDzfjczG7PUHCWnTk2l0d8LvA2QFCmSCuJ7RkzybByxVIVhW+fZDZQ3wtb/+0R30mOIh V/BRbMairf7UqiVT28/T+e0FHy6uYQoe1QHutyizWwsCFQoONIiwvc9YjTU/GA== 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 4VQ1LY6jkPzjb5; Thu, 25 Apr 2024 03:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43P3Jnwm079679; Thu, 25 Apr 2024 03:19:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43P3Jnrx079676; Thu, 25 Apr 2024 03:19:49 GMT (envelope-from git) Date: Thu, 25 Apr 2024 03:19:49 GMT Message-Id: <202404250319.43P3Jnrx079676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c68eed82a3dc - main - accf_tls: accept filter that waits for TLS handshake 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c68eed82a3dcadf0c826e9e150f59769f4c44f24 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c68eed82a3dcadf0c826e9e150f59769f4c44f24 commit c68eed82a3dcadf0c826e9e150f59769f4c44f24 Author: Gleb Smirnoff AuthorDate: 2024-04-24 20:36:43 +0000 Commit: Gleb Smirnoff CommitDate: 2024-04-25 00:53:10 +0000 accf_tls: accept filter that waits for TLS handshake header --- share/man/man9/Makefile | 1 + share/man/man9/accf_tls.9 | 95 +++++++++++++++++++++++++++++++++++++ sys/conf/NOTES | 1 + sys/conf/files | 1 + sys/conf/options | 1 + sys/modules/Makefile | 1 + sys/modules/accf_tls/Makefile | 7 +++ sys/netinet/accf_tls.c | 106 ++++++++++++++++++++++++++++++++++++++++++ tests/sys/kern/socket_accf.c | 61 +++++++++++++++++++++++- 9 files changed, 273 insertions(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index b9fbc624d1ec..a5fa777d037c 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -5,6 +5,7 @@ MAN= accept_filter.9 \ accf_data.9 \ accf_dns.9 \ accf_http.9 \ + accf_tls.9 \ acl.9 \ alq.9 \ altq.9 \ diff --git a/share/man/man9/accf_tls.9 b/share/man/man9/accf_tls.9 new file mode 100644 index 000000000000..331ea2aa4fb8 --- /dev/null +++ b/share/man/man9/accf_tls.9 @@ -0,0 +1,95 @@ +.\" +.\" Copyright (c) 2024 Gleb Smirnoff +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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 24, 2024 +.Dt ACCF_TLS 9 +.Os +.Sh NAME +.Nm accf_tls +.Nd "buffer incoming connections until a TLS handshake like requests arrive" +.Sh SYNOPSIS +.Nm options INET +.Nm options ACCEPT_FILTER_TLS +.Nm kldload accf_tls +.Sh DESCRIPTION +This is a filter to be placed on a socket that will be using +.Fn accept 2 +to receive incoming HTTPS connections. +It prevents the application from receiving the connected descriptor via +.Fn accept 2 +until a full TLS handshake has been buffered by the kernel. +The +.Nm +will first check that byte at offset 0 is +.Va 0x16 , +which matches handshake type. +Then it will read 2-byte request length value at offset 3 and will +continue reading until reading the entire length of the handshake is buffered. +If something other than +.Va 0x16 +is at offset 0, the kernel will allow the application to receive the +connection descriptor via +.Fn accept 2 . +.Pp +The utility of +.Nm +is such that a server will not have to context switch several times +before performing the initial parsing of the request. +This effectively reduces the amount of required CPU utilization +to handle incoming requests by keeping active +processes in preforking servers such as Apache low +and reducing the size of the file descriptor set that needs +to be managed by interfaces such as +.Fn select , +.Fn poll +or +.Fn kevent +based servers. +.Sh EXAMPLES +Assuming ACCEPT_FILTER_TLS has been included in the kernel config +file or the +.Nm +module +has been loaded, this will enable the TLS accept filter +on the socket +.Fa sok . +.Bd -literal -offset 0i + struct accept_filter_arg afa; + + bzero(&afa, sizeof(afa)); + strcpy(afa.af_name, "tlsready"); + setsockopt(sok, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)); +.Ed +.Sh SEE ALSO +.Xr setsockopt 2 , +.Xr accept_filter 9 +.Sh HISTORY +The +.Nm +accept filter was introduced in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +filter was written by +.An Maksim Yevmenkin . diff --git a/sys/conf/NOTES b/sys/conf/NOTES index cdeee4eb7fd6..216a96c2073c 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1066,6 +1066,7 @@ options MBUF_PROFILING options ACCEPT_FILTER_DATA options ACCEPT_FILTER_DNS options ACCEPT_FILTER_HTTP +options ACCEPT_FILTER_TLS # TCP_SIGNATURE adds support for RFC 2385 (TCP-MD5) digests. These are # carried in TCP option 19. This option is commonly used to protect diff --git a/sys/conf/files b/sys/conf/files index 59d99b9f832b..29c02a503027 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4299,6 +4299,7 @@ netgraph/ng_vlan_rotate.c optional netgraph_vlan_rotate netinet/accf_data.c optional accept_filter_data inet netinet/accf_dns.c optional accept_filter_dns inet netinet/accf_http.c optional accept_filter_http inet +netinet/accf_tls.c optional accept_filter_tls inet netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet diff --git a/sys/conf/options b/sys/conf/options index 4e9d8a5b0741..fcab21ad7e78 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -425,6 +425,7 @@ ISP_FCTAPE_OFF opt_isp.h ACCEPT_FILTER_DATA ACCEPT_FILTER_DNS ACCEPT_FILTER_HTTP +ACCEPT_FILTER_TLS ALTQ opt_global.h ALTQ_CBQ opt_altq.h ALTQ_CDNR opt_altq.h diff --git a/sys/modules/Makefile b/sys/modules/Makefile index d83a75ef2d4d..8af12fc02860 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -20,6 +20,7 @@ SUBDIR= \ accf_data \ accf_dns \ accf_http \ + accf_tls \ acl_nfs4 \ acl_posix1e \ ${_acpi} \ diff --git a/sys/modules/accf_tls/Makefile b/sys/modules/accf_tls/Makefile new file mode 100644 index 000000000000..f45b2f057f0a --- /dev/null +++ b/sys/modules/accf_tls/Makefile @@ -0,0 +1,7 @@ + +.PATH: ${SRCTOP}/sys/netinet + +KMOD= accf_tls +SRCS= accf_tls.c + +.include diff --git a/sys/netinet/accf_tls.c b/sys/netinet/accf_tls.c new file mode 100644 index 000000000000..9f1ed7000474 --- /dev/null +++ b/sys/netinet/accf_tls.c @@ -0,0 +1,106 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2024 Netflix + * Author: Maksim Yevmenkin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#define ACCEPT_FILTER_MOD + +#include +#include +#include +#include +#include +#include +#include + +static int sbfull(struct sockbuf *sb); +static uint8_t sbmget8(struct mbuf *m, int offset); +static int so_hastls(struct socket *so, void *arg, int waitflag); + +ACCEPT_FILTER_DEFINE(accf_tls, "tlsready", so_hastls, NULL, NULL, 1); + +static int +sbfull(struct sockbuf *sb) +{ + + return (sbused(sb) >= sb->sb_hiwat || sb->sb_mbcnt >= sb->sb_mbmax); +} + +static uint8_t +sbmget8(struct mbuf *m, int offset) +{ + struct mbuf *n = m->m_nextpkt; + + while (m != NULL && offset >= m->m_len) { + offset -= m->m_len; + m = m->m_next; + if (m == NULL) { + m = n; + n = m->m_nextpkt; + } + } + + return *(mtod(m, uint8_t *) + offset); +} + +static int +so_hastls(struct socket *so, void *arg, int waitflag) +{ + struct sockbuf *sb = &so->so_rcv; + int avail; + uint16_t reclen; + + if ((sb->sb_state & SBS_CANTRCVMORE) || sbfull(sb)) + return (SU_ISCONNECTED); /* can't wait any longer */ + + /* + * struct { + * ContentType type; - 1 byte, 0x16 handshake + * ProtocolVersion version; - 2 bytes (major, minor) + * uint16 length; - 2 bytes, NBO, 2^14 max + * opaque fragment[TLSPlaintext.length]; + * } TLSPlaintext; + */ + + /* Did we get at least 5 bytes */ + avail = sbavail(sb); + if (avail < 5) + return (SU_OK); /* nope */ + + /* Does this look like TLS handshake? */ + if (sbmget8(sb->sb_mb, 0) != 0x16) + return (SU_ISCONNECTED); /* nope */ + + /* Did we get a complete TLS record? */ + reclen = (uint16_t) sbmget8(sb->sb_mb, 3) << 8; + reclen |= (uint16_t) sbmget8(sb->sb_mb, 4); + + if (reclen <= 16384 && avail < (int) 5 + reclen) + return (SU_OK); /* nope */ + + return (SU_ISCONNECTED); +} diff --git a/tests/sys/kern/socket_accf.c b/tests/sys/kern/socket_accf.c index 384062810c8d..747bcda87010 100644 --- a/tests/sys/kern/socket_accf.c +++ b/tests/sys/kern/socket_accf.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2022 Gleb Smirnoff + * Copyright (c) 2022-2024 Gleb Smirnoff * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -151,10 +152,68 @@ ATF_TC_BODY(http, tc) ATF_REQUIRE((a = accept(l, NULL, 0)) > 0); } +ATF_TC_WITHOUT_HEAD(tls); +ATF_TC_BODY(tls, tc) +{ + struct accept_filter_arg afa = { + .af_name = "tlsready" + }; + struct sockaddr_in sin; + int l, s, a; + + l = listensock(&sin); + accfon(l, &afa); + s = clientsock(&sin); + + /* 1) No data. */ + ATF_REQUIRE(accept(l, NULL, 0) == -1); + ATF_REQUIRE(errno == EAGAIN); + + /* 2) Less than 5 bytes. */ + ATF_REQUIRE(usend(s, "foo", sizeof("foo")) == sizeof("foo")); + ATF_REQUIRE(errno == EAGAIN); + + /* 3) Something that doesn't look like TLS handshake. */ + ATF_REQUIRE(usend(s, "bar", sizeof("bar")) == sizeof("bar")); + ATF_REQUIRE((a = accept(l, NULL, 0)) > 0); + + close(s); + close(a); + + /* 4) Partial TLS record. */ + s = clientsock(&sin); + struct { + uint8_t type; + uint16_t version; + uint16_t length; + } __attribute__((__packed__)) header = { + .type = 0x16, + .length = htons((uint16_t)(arc4random() % 16384)), + }; + _Static_assert(sizeof(header) == 5, ""); + ATF_REQUIRE(usend(s, &header, sizeof(header)) == sizeof(header)); + ssize_t sent = 0; + do { + size_t len; + char *buf; + + ATF_REQUIRE(accept(l, NULL, 0) == -1); + ATF_REQUIRE(errno == EAGAIN); + + len = arc4random() % 1024; + buf = alloca(len); + ATF_REQUIRE(usend(s, buf, len) == (ssize_t)len); + sent += len; + } while (sent < ntohs(header.length)); + /* TLS header with bytes >= declared length. */ + ATF_REQUIRE((a = accept(l, NULL, 0)) > 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, data); ATF_TP_ADD_TC(tp, http); + ATF_TP_ADD_TC(tp, tls); return (atf_no_error()); } From nobody Thu Apr 25 04:56:20 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 4VQ3Tw4BzQz5JvdZ; Thu, 25 Apr 2024 04:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQ3Tw1r7Bz4Qm6; Thu, 25 Apr 2024 04:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714020980; 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=zS7Pp+nF1y39Is75NoCqjJWIg+bubIqtqDX2PwMoCYc=; b=lFcv4BvoKm1FDPhUFEQVZZTOnoEY6fSgLnrgNdPZ9FNlYSHl2JAEonabs5iDhACvSvA2cE K19fSJlZFiDPsePoz4bQ1ys8t5EblybnSXFM3cqvKyrXUz6yexN1rBNrq92BxKkknxBz5i 6E0RT6XpMjkb7VFUrD1oL5iQPlfCXJrcGhgiKJCRforceAB0Ew23wXzG5gSw7ZsKXvY7Tl qwl/ATw+0YJT2RKnzp1wg6d4ZIjBiD+S4Aq7/b+uKZGZsEZq5dvsafDK4Yy+BrHGB1EfIU ohMQpZgWCjGMOD9rEZAJii2ous/FrP1TiEg6lawN8qgDQoUnOQpV4U+o9eQYUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714020980; a=rsa-sha256; cv=none; b=cQ1JMBrnDHdzRqxMxpoUwA6ddP5aaVGOgnpdYbDdnpHJTXllPfygeaSL4O2gn7t01l82+1 Zv5NhJU0W76zynyZA3Axomd9Rlw4lPUgVvY5h3PI1b9ckcvwfbXX5e0w9pECVt70buoVyv 6z0Eqf1e9PEh7FXaEbxCLUSvxeuz2B2ivhcyijP14Qk/vyPiVPIXhZ0C+aT2DmycOBjBuG McQ7JBcG1Acxrhfw3OEcJAsbEVEyon9CL1Esre4JyGIXK1KBs5WRFvHQk4bbTDSzFkJ/0r D8cqTAH1msb0KWyJEDaP4E2S4Fj7TIEK1tKSLlXn4Uq311iUG2377h2GNBCrNw== 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=1714020980; 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=zS7Pp+nF1y39Is75NoCqjJWIg+bubIqtqDX2PwMoCYc=; b=ir0St3Ydhz2YGwmKssFAY+zrE95tGG+3MSuX8Uyea3AJm8CWBK+ZMp09uV8QkLcFlBXkME 7FeCJHtwlNzRcvqg1a4n550Pv9VVXsDh61lTtd/EJ2g2M+6m5DRKa+z2fzab/FgRafB0Q+ V51Q4UGYXn4lo0dmFfQN2Nkd0Xtry5UTyb2Xz9Xf7XjzoDVSwA9HJUpfIBNNjxEE7oJr89 qa1wB3pQ6qp1OX86xx33LLycKqUAjFvGpQeWRP9FMT3UUvU7x1+UTjvUiWH6SuM+1oWi4X Dwh/NFVj9nJaD4r75cgVztcTjWv0aEWKefvneXZAQssKFEKxWIbT+iKCRJqS7g== 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 4VQ3Tw1S3Gzm0d; Thu, 25 Apr 2024 04:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43P4uKdK047425; Thu, 25 Apr 2024 04:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43P4uKKd047422; Thu, 25 Apr 2024 04:56:20 GMT (envelope-from git) Date: Thu, 25 Apr 2024 04:56:20 GMT Message-Id: <202404250456.43P4uKKd047422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 19307b86d31b - main - accept_filter: return different errors for non-listener and a busy socket 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19307b86d31b7dea4bb5c3f7e233ee0e59049258 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=19307b86d31b7dea4bb5c3f7e233ee0e59049258 commit 19307b86d31b7dea4bb5c3f7e233ee0e59049258 Author: Gleb Smirnoff AuthorDate: 2024-04-25 04:50:58 +0000 Commit: Gleb Smirnoff CommitDate: 2024-04-25 04:55:58 +0000 accept_filter: return different errors for non-listener and a busy socket The fact that an accept filter needs to be cleared first before setting to a different one isn't properly documented. The requirement that the socket needs already be listening, although trivial, isn't documented either. At least return a more meaningful error than EINVAL for an existing filter. Cover this with a test case. --- sys/kern/uipc_accf.c | 6 +++++- tests/sys/kern/socket_accf.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_accf.c b/sys/kern/uipc_accf.c index c63b5a1179bc..9e30e7839103 100644 --- a/sys/kern/uipc_accf.c +++ b/sys/kern/uipc_accf.c @@ -276,10 +276,14 @@ accept_filt_setopt(struct socket *so, struct sockopt *sopt) * without first removing it. */ SOCK_LOCK(so); - if (!SOLISTENING(so) || so->sol_accept_filter != NULL) { + if (__predict_false(!SOLISTENING(so))) { error = EINVAL; goto out; } + if (__predict_false(so->sol_accept_filter != NULL)) { + error = EBUSY; + goto out; + } /* * Invoke the accf_create() method of the filter if required. The diff --git a/tests/sys/kern/socket_accf.c b/tests/sys/kern/socket_accf.c index 747bcda87010..ae6522397cf7 100644 --- a/tests/sys/kern/socket_accf.c +++ b/tests/sys/kern/socket_accf.c @@ -209,11 +209,43 @@ ATF_TC_BODY(tls, tc) ATF_REQUIRE((a = accept(l, NULL, 0)) > 0); } +/* Check changing to a different filter. */ +ATF_TC_WITHOUT_HEAD(change); +ATF_TC_BODY(change, tc) +{ + struct accept_filter_arg dfa = { + .af_name = "dataready" + }; + struct accept_filter_arg hfa = { + .af_name = "httpready" + }; + struct sockaddr_in sin; + int n, l; + + l = listensock(&sin); + accfon(l, &dfa); + + /* Refuse to change filter without explicit removal of the old one. */ + ATF_REQUIRE(setsockopt(l, SOL_SOCKET, SO_ACCEPTFILTER, &hfa, + sizeof(hfa)) != 0 && errno == EBUSY); + + /* But allow after clearing. */ + ATF_REQUIRE(setsockopt(l, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0) == 0); + ATF_REQUIRE(setsockopt(l, SOL_SOCKET, SO_ACCEPTFILTER, &hfa, + sizeof(hfa)) == 0); + + /* Must be listening socket. */ + ATF_REQUIRE((n = socket(PF_INET, SOCK_STREAM, 0)) > 0); + ATF_REQUIRE(setsockopt(n, SOL_SOCKET, SO_ACCEPTFILTER, &dfa, + sizeof(dfa)) != 0 && errno == EINVAL); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, data); ATF_TP_ADD_TC(tp, http); ATF_TP_ADD_TC(tp, tls); + ATF_TP_ADD_TC(tp, change); return (atf_no_error()); } From nobody Thu Apr 25 09:44: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 4VQ9sr6CD6z5HD73; Thu, 25 Apr 2024 09:44:00 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQ9sr5kN7z4sm9; Thu, 25 Apr 2024 09:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714038240; 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=ZHD3lz4sU0zDxv49UbuaD7f5ozIm1gVnf4ALUzLsSTw=; b=YOsiUPzKjnql0bF/GolB/EoQHz75lzkb2RUJBRZnc1sbffSzYJ7MsW46F34gE04Uu2kq2+ 9U9uW9qM+DuzobL2xFdD/C0mIebvKKivsli8gVFOn0dsJsXKtSHHkqh+j799N5bgtcI7yx TaE0OVZwVEssNQ9V7ak/3iujRnUUE7i0tGSWusMrme51B5qaRLF6tO8tiSo2IHJITBv4b3 iYHclZtw9nxyat69hmzVL+3lhrFHeE1jty7V0vc19VF3NIANC3eBflgssduG+SNKAvHL98 02PYmA4HARkJLyIkCyGD0gntnlVv4YJotK6kPFxJNnaQeNaxhLKtaO6g72cHBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714038240; a=rsa-sha256; cv=none; b=fihUb749wipIbn7xlb/3wOZXziKpitYrIwO7xxQw8qCUmEuyNDjdlaFuvmqgYocYGkZbZL bUjInSX4I09ZhHuHa+AsHvScEyc5+shGe4NIphhFrbjTbllE0T52VILGqwp+E++TrPid1r RbIQEGC5BQ8aanD7pZ3ZDaheiUgIY4I6OmrZW+EMz0QL6Hcv4rfbdNNjfh28fFXEyxK77V nH17eGOAxKezMKQQ+GPLINfLTqfOSYGQSSL65x2T0e3qrZeL2yJd8bgtyPMpBc2d2I9OtG dwpateayOldPaT9gzEpjkqH4rjnLSB6PFoLuuNvIt3Ua41dYMDVCRUCmdZhmRw== 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=1714038240; 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=ZHD3lz4sU0zDxv49UbuaD7f5ozIm1gVnf4ALUzLsSTw=; b=jhnptTQWkAvYVOCV3UeR7PSQTyd9PxH6t7orYMtYCBPOvqj3cpRWsUoIZ9q+glhTDhSWle WzgYkQlT7M1vxJNvFy0eewUB9wK065tZLYJXd0wVM4BKGP2os11doASUkmVVieik230YG0 gDwsCXOYhM0rfNgfYe0g7oJCUCRZz/bqw2xNrYFUN3kTtq+YO+BSw+WTv5nSPjohryDde+ Q1JM49/LMufqlZwGvUxp6EKyy1BVGhgBJn3HGpk+pkiTbCLvWClzTlbBPvqpRd77Z3nf6P 53nIJ+yDF61mEcPMIFzYVssyZX31DRFhudmm6TMnGwVunBRT2warU7xEQ7pPcQ== 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 4VQ9sr5L46zvHH; Thu, 25 Apr 2024 09:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43P9i0nM037392; Thu, 25 Apr 2024 09:44:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43P9i0I5037389; Thu, 25 Apr 2024 09:44:00 GMT (envelope-from git) Date: Thu, 25 Apr 2024 09:44:00 GMT Message-Id: <202404250944.43P9i0I5037389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 4395d3ced5cf - main - Document that gettimeofday() is obsolescent 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4395d3ced5cfa46df400b5bb9996f9d74476997e Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=4395d3ced5cfa46df400b5bb9996f9d74476997e commit 4395d3ced5cfa46df400b5bb9996f9d74476997e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-24 11:31:54 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-04-25 09:42:59 +0000 Document that gettimeofday() is obsolescent Reported by: kaktus Reviewed by: kaktus, pstef MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23942 --- lib/libsys/gettimeofday.2 | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/libsys/gettimeofday.2 b/lib/libsys/gettimeofday.2 index 5b867aaad33c..cfba97149199 100644 --- a/lib/libsys/gettimeofday.2 +++ b/lib/libsys/gettimeofday.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 13, 2021 +.Dd April 24, 2024 .Dt GETTIMEOFDAY 2 .Os .Sh NAME @@ -41,6 +41,17 @@ .Ft int .Fn settimeofday "const struct timeval *tp" "const struct timezone *tzp" .Sh DESCRIPTION +.Em Note : +The +.Nm gettimeofday +function +.Po but not +.Nm settimeofday Pc +is obsolescent. +See the +.Sx STANDARDS +section for more details. +.Pp The system's notion of the current Greenwich time and the current time zone is obtained with the .Fn gettimeofday @@ -121,6 +132,18 @@ A user other than the super-user attempted to set the time. .Xr ctime 3 , .Xr timeradd 3 , .Xr clocks 7 +.Sh STANDARDS +The +.Nm gettimeofday +function is considered obsolescent and its usage discouraged by +.\" XXX: This should be replaced in the future when an appropriate argument to +.\" the St macro is available: -p1003.1-2017 +.No IEEE Std 1003.1-2008, 2017 Edition (\\(LqPOSIX.1\\(Rq) . +Application should use the +.Xr clock_gettime 2 +function instead as +.Nm gettimeofday +might be removed in the future. .Sh HISTORY The .Fn gettimeofday From nobody Thu Apr 25 09:50: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 4VQB0z1pyJz5HDQq; Thu, 25 Apr 2024 09:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQB0z1GVRz4tvs; Thu, 25 Apr 2024 09:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714038611; 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=vgeutYwTFaZeF8FgImIVUi70d0kL7XeVnYEQQ5femSg=; b=uEqr5lXAXRAbAteMh6hZDUYQczoDRxCnKY9tUOQ2TkdbjRDj+9eAd99ZN8WMJbWqRGR9Kc OdOo1XQHEBS2yYTkKOEN0z9SuwrZEoCWW/ZTmSUf6AV0vY1ehWjbA+CxZG5BQZzyv3pICN S2QKuuL/aMg0R+AV68r98755hM6UnYs+9hgSwPEseyruWVan6MJGoYM8H2ZN1J3wfnRg7+ 1dRt4S4XTGwyh0EzE2OR5DKYjANSvqPhrV8DriLqx1C8acR/xIaw7OrnY2GapUsFpSc9Pb EITHp55zPa6ZfZP4FR/q0tKq8To/ENcLDrZvRCXHzUYRwdijwPMvQkUE4Cl6UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714038611; a=rsa-sha256; cv=none; b=RITXDV+RPomfSJZnJNqxTu9kRG7koKb7UvQF+d3K6UbNpsfezP58DYmSquODS+S1ytPOG2 GN4EJkjbVutjexXDVWK8U8boTqUHLBZRpgFBzb1ec2X7EBQfdzFfV5hMufP7zEa6eiogay 6KLqTgrlY3y5aD/YICMdwDYjYcBAvcxGnB4djbQJdr3JcJ5ACp/yltGEK+V5eeQpzhZBaS BjYcidf9aWfdIzy36+CDZ84Cx62Sayg0qT8zuT7q5/FhqW84VCyRlYetw+IIVoGxHiPDng kileUI3OrA5/wHncV2Iwk26ClgbIGMpY4tPglKbVaYJ6Ce6WtLHQbmmmY8APKw== 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=1714038611; 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=vgeutYwTFaZeF8FgImIVUi70d0kL7XeVnYEQQ5femSg=; b=VWozUnVoj5JhSXTcNTXvzt5D/Ij8gQmqajCtIv+J79K8WylWHQgSdLkUa12ueRAb0GzkGh I6oLIP1XFMaWoBJrkZxwEpUoG/2QDcMTDh25NI4OTEiohecTPVsQqvejh5/eederagtt8e C4qY8waJQ4YTFFTnHMkAIiWS0WWIJSKLKQHemJ5Y3Q4Q50o49LrE7HTKWCWM1PocnQJBzq d8Li7+xSisprDFKC5oQWJawcc5nWGcxQA2nVTlWClSaiHtppNwc8Ei96u7MbNivxMV8GZJ k/yAEAXYbbHqQJMCZD2SijOvjKFtl3l1Bu/xWE1VjICXq25rFI26EX9DBiy8bQ== 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 4VQB0z0tVJztyR; Thu, 25 Apr 2024 09:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43P9oBRl043009; Thu, 25 Apr 2024 09:50:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43P9oB6P043000; Thu, 25 Apr 2024 09:50:11 GMT (envelope-from git) Date: Thu, 25 Apr 2024 09:50:11 GMT Message-Id: <202404250950.43P9oB6P043000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 177ba183076b - main - sync.8: Document that the "sync dance" is not a thing 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 177ba183076bd6fe6b29b1d657b954cca256506b Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=177ba183076bd6fe6b29b1d657b954cca256506b commit 177ba183076bd6fe6b29b1d657b954cca256506b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-23 14:12:45 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-04-25 09:49:50 +0000 sync.8: Document that the "sync dance" is not a thing People still believe that it is essential to run sync(8) a couple of times before a reboot/halt. Document that this has not been necessary for a long time now. Reviewed by: imp, bcr, Pau Amma MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D33233 --- bin/sync/sync.8 | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/bin/sync/sync.8 b/bin/sync/sync.8 index d7a11c9fd217..fcd07ca72240 100644 --- a/bin/sync/sync.8 +++ b/bin/sync/sync.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 31, 1993 +.Dd April 25, 2024 .Dt SYNC 8 .Os .Sh NAME @@ -69,3 +69,31 @@ A .Nm utility appeared in .At v4 . +.Pp +On systems older than +.Bx 4.0 , +commands like +.Xr reboot 8 +and +.Xr halt 8 +were unavailable. +The shutdown procedure involved running +.Nm , +waiting for the lights to stop, +and turning off the machine. +.Pp +Issuing three separate +.Nm +commands (one line each) was a placebo that would generally suffice in +.At v7 +machines that were otherwise quiesced systems. +It replaced the one-per-line +.Nm +as a substitute for waiting. +.Pp +.Bx 4.0 +introduced +.Xr reboot 2 +and +.Xr sync 2 +which rendered this trick obsolete. From nobody Thu Apr 25 09:52: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 4VQB433rZCz5HDs4; Thu, 25 Apr 2024 09:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQB4339tlz4vMm; Thu, 25 Apr 2024 09:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714038771; 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=wHgcntN/y0nScgD9ynSvn9TGHYO830JeAdhQnPXZ2+4=; b=Z2aTuJiSN98XS/l9da964kr2Ve3ju+Z51QQVlOdGtx9nJjkZNIN4rQsJ2m5yErUOmb0kWw gOxch7Uo1H+bo2IqGBpVLKsyJYjTfMl2p3Zue3gTfENxVNlIyICYA+9lkUfJGxV7jG7hMH HJm81M4/745ESTf5oXAsWFkNJlluAsqnvofsMGoZXnj8GoR2kgKzhmozeL/A1NlqvAYOT3 LJyborZt70FwFf8Uv96+mSXFB+WCmUIuPu9QPG4+Akjxd1dCIyKlEtOTwAK6KOtlOxkvRq 1GTKqyOpN5Givwus0QqgYmu1qUFduBU+OOH9Rz9pvtfrzDK1KpdJ6/qG80Wpcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714038771; a=rsa-sha256; cv=none; b=iA75FPJAUTxeUT0ujEcwEa+ffYu5im/bs2RqYXYSFGgBmQ+hbjci59UusDmhjxrixtg8jW 70ArxufbFKqFyuipB1CmEi/xWRViNvmOQbNfrsafb9/DxxgvyeEiDvR5KZY1H755IdAW7U uJVwJnyd/bvqjoGL2ONW8WcPotF08zhFY6qlAMdUNTOdd/URaa0ysiAAyFWO5iUs9zdZXn fhZJCyE0xVKQdw3Mb/MwQpyx+kQdMrOSBfX1tCw2Co63mj4iir3kMKy/JS09I1QoQfB4IV WWlf73POWMUh/ZKCI7inDBkyqWHF5K3IxdB/sc7c/b/nTLeKH2+6Xmz427I+jQ== 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=1714038771; 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=wHgcntN/y0nScgD9ynSvn9TGHYO830JeAdhQnPXZ2+4=; b=A6z9ibfWdc/C1ubE2lt+ThjmObNkhfGQuXI53tTYqGgRvQyUHbILZVj4eS7ZzhSDWf+lfs 0WRY32WBOT9JxSQDibbiqgxe88h0js8UbXr+VcmA98s797mGTbROxh4fDBS5CNpMnAQ/SJ atQ3zjdfWLswJKLuqVkj4IfyoJdexh+gq4SOcHus6+duYKZG//Dl9OddtmmDesJ3RaB3RP si1+HkN5+xZdkrUvVusVDp0SeujRzoy9VJoAInbUDujcEO7gx2j9oSlnhpWmJqwCifKjMB vJvpII7a9Xyx5ZGs3vvJL2AtRIg9ynckUdQqneSq2bF+0BrW5jfWoTv1oTm9jA== 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 4VQB432mrgzv26; Thu, 25 Apr 2024 09:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43P9qpuY053719; Thu, 25 Apr 2024 09:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43P9qp61053716; Thu, 25 Apr 2024 09:52:51 GMT (envelope-from git) Date: Thu, 25 Apr 2024 09:52:51 GMT Message-Id: <202404250952.43P9qp61053716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 42255af64a54 - main - checkstyle9: Allow a space between "*" and _*restrict 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42255af64a5471a2668e3a0552d82639e1f70ee4 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=42255af64a5471a2668e3a0552d82639e1f70ee4 commit 42255af64a5471a2668e3a0552d82639e1f70ee4 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-23 10:29:02 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-04-25 09:51:25 +0000 checkstyle9: Allow a space between "*" and _*restrict Before the change, we would get errors like this: ERROR: "foo * bar" should be "foo *bar" #369: FILE: foobar.c:369: +barbaz(char * __restrict s, Reviewed by: des, imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D44911 --- tools/build/checkstyle9.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl index 7fa02bcabc97..99fd354fbacf 100755 --- a/tools/build/checkstyle9.pl +++ b/tools/build/checkstyle9.pl @@ -202,6 +202,7 @@ our $Sparse = qr{ # Notes to $Attribute: our $Attribute = qr{ const| + _*restrict| volatile| QEMU_NORETURN| QEMU_WARN_UNUSED_RESULT| From nobody Thu Apr 25 10:17: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 4VQBd94Tp5z5HHrh; Thu, 25 Apr 2024 10:18:05 +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 4VQBd90d6yz4xV1; Thu, 25 Apr 2024 10:18:04 +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 43PAHwLE076575; Thu, 25 Apr 2024 13:18:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 43PAHwLE076575 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 43PAHwGB076574; Thu, 25 Apr 2024 13:17:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 25 Apr 2024 13:17:58 +0300 From: Konstantin Belousov To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4395d3ced5cf - main - Document that gettimeofday() is obsolescent Message-ID: References: <202404250944.43P9i0I5037389@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: <202404250944.43P9i0I5037389@gitrepo.freebsd.org> 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.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) 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: 4VQBd90d6yz4xV1 On Thu, Apr 25, 2024 at 09:44:00AM +0000, Mateusz Piotrowski wrote: > The branch main has been updated by 0mp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4395d3ced5cfa46df400b5bb9996f9d74476997e > > commit 4395d3ced5cfa46df400b5bb9996f9d74476997e > Author: Mateusz Piotrowski <0mp@FreeBSD.org> > AuthorDate: 2024-04-24 11:31:54 +0000 > Commit: Mateusz Piotrowski <0mp@FreeBSD.org> > CommitDate: 2024-04-25 09:42:59 +0000 > > Document that gettimeofday() is obsolescent > > Reported by: kaktus > Reviewed by: kaktus, pstef > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D23942 > --- > lib/libsys/gettimeofday.2 | 25 ++++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > > diff --git a/lib/libsys/gettimeofday.2 b/lib/libsys/gettimeofday.2 > index 5b867aaad33c..cfba97149199 100644 > --- a/lib/libsys/gettimeofday.2 > +++ b/lib/libsys/gettimeofday.2 > @@ -25,7 +25,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" > -.Dd May 13, 2021 > +.Dd April 24, 2024 > .Dt GETTIMEOFDAY 2 > .Os > .Sh NAME > @@ -41,6 +41,17 @@ > .Ft int > .Fn settimeofday "const struct timeval *tp" "const struct timezone *tzp" > .Sh DESCRIPTION > +.Em Note : > +The > +.Nm gettimeofday > +function > +.Po but not > +.Nm settimeofday Pc > +is obsolescent. > +See the > +.Sx STANDARDS > +section for more details. > +.Pp > The system's notion of the current Greenwich time and the current time > zone is obtained with the > .Fn gettimeofday > @@ -121,6 +132,18 @@ A user other than the super-user attempted to set the time. > .Xr ctime 3 , > .Xr timeradd 3 , > .Xr clocks 7 > +.Sh STANDARDS > +The > +.Nm gettimeofday > +function is considered obsolescent and its usage discouraged by > +.\" XXX: This should be replaced in the future when an appropriate argument to > +.\" the St macro is available: -p1003.1-2017 > +.No IEEE Std 1003.1-2008, 2017 Edition (\\(LqPOSIX.1\\(Rq) . > +Application should use the > +.Xr clock_gettime 2 > +function instead as > +.Nm gettimeofday > +might be removed in the future. Obviously gettimeofday(2) is not going to be removed even in the far future. > .Sh HISTORY > The > .Fn gettimeofday From nobody Thu Apr 25 13:46: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 4VQHFw3D8Bz5Hlm3; Thu, 25 Apr 2024 13:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQHFw2bnTz42mF; Thu, 25 Apr 2024 13:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714052804; 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=lOUl1pcMmpXk3NC/P9b+4PNp4eR9dqZd99QG9TjIQZc=; b=jOiWyVW7PzUQn0kJFMllUqAu4tZ54DJ62Dow0e5noYmOjZ518v0i+YaVWILt+rF2Kg3pFs p4A1ufyg0Gse1OOcGhiO8JwB4BFVaLZe24ZQax0zoL/TUfR+4pqEJNJ2EIBiyCTsJO6ka0 xDxZbbDUTf/OBtguYrx+0MfCplTR6Ybxfo96BEKv2OVY/fP+zBAEpjfX/ysWjUHRe8ejpw JU84y9m9VEIxh7EKGk7CYR7BaK6dTR7DypQneWjDb+VeNmWyFdOAEQHc1BLdRg7DeeQ1an VzK5OlPzPF4V/XK7ASiQxkDJx5xKWSjgiSjIgGLUrtNedd5X4o98bLyUjwONvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714052804; a=rsa-sha256; cv=none; b=kcIIIK29/uRMC9SK+oibgQs5bZji2iJYdwXET1xL58psxmCL3v+erspIwBGyGJzIOEloWu e4fLc3jbjMyFahqsDSFJ274Jfaz3FZUO8M8eQIInWi77hL5OJHO6Fg5JBKtNFpdofecaeE Qhxa8/CDGlf+nS8orBJX6vn6CPN/gIJIXua3X9/lkNPVA92C8SLTeTjsDiNF7+wOjcDZ36 Q/M5o5+sSTa56Ss1NaAbb2NBV/FElJaS01N1zBKthsldC+rCU5AjCu361Lj1b3kPDwpv9p zE+qgJAlYPQSxe7aRahZGOLtQLA3b660eKOtMeoslqTmwgRzkz7Cp3XgDPbDBw== 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=1714052804; 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=lOUl1pcMmpXk3NC/P9b+4PNp4eR9dqZd99QG9TjIQZc=; b=RUwz/P01ATS1JFMa8bLUfGNg4qin3N0w+znWpFgY59w/hJAQqNRcF4/7WBQlFPzAkHEomS plcGMZ19EeOTlmqnzp/ed21WYuz7dOPw99W9g1fbqsOTXzLv2Ds1jfrPVBeZPwmti7FE3L QDKLbY8BYaP7Vc+AxBYQkYeNn9kiUVDTre2nVc2imrhhWPSkC9u628xseNg6c0VhGTMJO2 ogdrkuDDjId72CCAL1BnCbSIvPWMQtjWz9TmtXPKdseLFAfMa/V5EdP+/gzPmQhY6LW4ZJ VfW8Iswev+axLYixpQXaEwcuABzZfrwlTWg8bLKwAseoWdmEr7jcQ7xA9AIGdw== 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 4VQHFw2Bq2z12C4; Thu, 25 Apr 2024 13:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PDkimW043218; Thu, 25 Apr 2024 13:46:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PDkihh043215; Thu, 25 Apr 2024 13:46:44 GMT (envelope-from git) Date: Thu, 25 Apr 2024 13:46:44 GMT Message-Id: <202404251346.43PDkihh043215@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: d66399326cb4 - main - kthread: Set *tdptr earlier in kproc_kthread_add() 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: d66399326cb4f89d1565fb62c1c07974886893c5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d66399326cb4f89d1565fb62c1c07974886893c5 commit d66399326cb4f89d1565fb62c1c07974886893c5 Author: Mark Johnston AuthorDate: 2024-04-25 13:35:38 +0000 Commit: Mark Johnston CommitDate: 2024-04-25 13:35:38 +0000 kthread: Set *tdptr earlier in kproc_kthread_add() See commit ae77041e0714 ("kthread: Set *newtdp earlier in kthread_add1()") for details. That commit was incomplete since g_init()'s first call to kproc_kthread_add() will cause kproc_kthread_add() to take the `*procptr == NULL` branch, which avoids kthread_create(). To ensure that the thread pointer is initialized before the thread starts running, we have to start the kernel process with RFSTOPPED. We could perhaps go further and use RFSTOPPED only when tdptr != NULL, but it's probably better to have consistent behaviour. Reviewed by: olce, kib Reported by: syzbot+e91e798f3c088215ace6@syzkaller.appspotmail.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44927 --- sys/kern/kern_kthread.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index 8a84fd70918d..97d10fdb394a 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -495,13 +495,21 @@ kproc_kthread_add(void (*func)(void *), void *arg, struct thread *td; if (*procptr == NULL) { + /* + * Use RFSTOPPED to ensure that *tdptr is initialized before the + * thread starts running. + */ error = kproc_create(func, arg, - procptr, flags, pages, "%s", procname); + procptr, flags | RFSTOPPED, pages, "%s", procname); if (error) return (error); td = FIRST_THREAD_IN_PROC(*procptr); if (tdptr) *tdptr = td; + if ((flags & RFSTOPPED) == 0) { + thread_lock(td); + sched_add(td, SRQ_BORING); + } va_start(ap, fmt); vsnprintf(td->td_name, sizeof(td->td_name), fmt, ap); va_end(ap); From nobody Thu Apr 25 15:44: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 4VQKsT13QQz5Hyyp; Thu, 25 Apr 2024 15:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQKsT0b3Mz4Fds; Thu, 25 Apr 2024 15: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=1714059853; 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=ZzPoe0aRUv4RH06DIp1U8IM65hMQTUpGY6sY+oM4VII=; b=cUZrKYBKJSWY4tsL7lncXB412dR4T8nvbz1wWUOirgE5zriXIGNe/rUZndEilZ8au3VbY9 FRatgkHKTY6daUPG25hLTaAaCpUwmu3/IG8//Dc8UvUEW+s34fY1GJWDf7ZZrAtiyehS6j gcSE9isXg58AjgQAFE72EOR2QQ57fVVgb8gEqBcAUsNVIPz6DFYuty133g95YYAWMUDZmt J9f2/1cNO0vB3J+MdNzkg33zcSRe1erm9a7xfdRBvDkznLd5ADAjbN2mVgpOV+dEgUpplW jbTNfSbE7qsonfVwrYdLs+6vGp2G91PAA8hdSs8nS8mPllBvm3CLtiFcQ9cfnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714059853; a=rsa-sha256; cv=none; b=bh5ujLbQB8SpTnMy8V5h8u5sa2Gr+Oq9EGCOqLYy6stVlTs0CWLZWucIb4IWaIbPhKC9Be UflDysoMW4fx8JSAcRpy91cbz5MVxBPm51LmVxETiMWee4bD4vYcP74EHAyLkCHshlYSfc +bhUD5kV4mE4wFzAiduKKQ3w5NdlE7FVAntIL8iyi4NJVZDJ/IBFpYtjFEhBzqGfv50dq0 1HUjE47/g/op2kIU5YzNmDaBPmVUg/sMizBjOQQU5SnqHfq7A9AT+k1jhcBHE4MmyuIEfE 2OxAh/pZ+Bgph4yUhtRrjNWk+AO1xNWgNk5kqr+R6Hwg7hoMJJ2iNnZ6bTtR8A== 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=1714059853; 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=ZzPoe0aRUv4RH06DIp1U8IM65hMQTUpGY6sY+oM4VII=; b=jJGc/t4CphybmIerF2NzICQFu0BB/w2NPqKS8P8VDi6eyt1bTuDgthK8lhoLFSvty+jmRV VV1wQQWrgCsWYCdzkylljOC5SYJ/RvJal0zfe8FY0Ch/oXkP6Wdcs2NO7sxH7nWJNBXXl1 JtSO9OOLXAYVPbE9FbSmCxtRbjatG9ISkJ+t+qRUY1Cbl1krPY0m71KCfSuvDR5FznQbju 22Bk40018eM14kGrIFWdriJqSXjuAjjvwxxk1MqlstNjMScfNzxOOnYSxfSjeLq5m+zCha IDpvA+Uyf8PLnm8GiC69okNFPAEgGdga3ft3v25EeCm+VrDy3GiI20EC8PBh9A== 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 4VQKsT0Bchz155P; Thu, 25 Apr 2024 15:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PFiCxV044920; Thu, 25 Apr 2024 15:44:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PFiCRX044917; Thu, 25 Apr 2024 15:44:12 GMT (envelope-from git) Date: Thu, 25 Apr 2024 15:44:12 GMT Message-Id: <202404251544.43PFiCRX044917@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: 514773a5486d - main - Skip building libclang_rt when WITHOUT_CLANG is used 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: 514773a5486d1fa4f2d5acb5af1766965c20765b Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=514773a5486d1fa4f2d5acb5af1766965c20765b commit 514773a5486d1fa4f2d5acb5af1766965c20765b Author: Dimitry Andric AuthorDate: 2024-04-25 15:05:29 +0000 Commit: Dimitry Andric CommitDate: 2024-04-25 15:05:29 +0000 Skip building libclang_rt when WITHOUT_CLANG is used As noted in bug 277096, when building a pkgbase repository using WITHOUT_CROSS_COMPILER and WITHOUT_TOOLCHAIN (which sets WITHOUT_CLANG), the following residual files are left over: /usr/lib/clang/18/lib/freebsd/libclang_rt.asan-x86_64.so /usr/lib/clang/18/share/asan_ignore_list.txt /usr/lib/clang/18/share/cfi_ignore_list.txt /usr/lib/clang/18/share/msan_ignore_list.txt This is because the lib/libclang_rt directory is still descended into, even if WITHOUT_CLANG is used. Fix it by not descending into the libclang_rt directory in that case. PR: 277096 Reported by: Siva Mahadevan MFC after: 3 days --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index cd1476a62d35..6135cff10c15 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -182,7 +182,7 @@ SUBDIR.${MK_LDNS}+= libldns SUBDIR.${MK_STATS}+= libstats # The libraries under libclang_rt can only be built by clang. -.if ${COMPILER_TYPE} == "clang" +.if ${COMPILER_TYPE} == "clang" && ${MK_CLANG} != "no" _libclang_rt= libclang_rt .elif (${MK_ASAN} != "no" || ${MK_UBSAN} != "no") && make(all) .error Requested build with sanitizers but cannot build runtime libraries! From nobody Thu Apr 25 16:45: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 4VQMD66Zd9z5J5qD; Thu, 25 Apr 2024 16:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQMD65xtsz4LKs; Thu, 25 Apr 2024 16:45:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714063526; 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=aKGvvA/ZyV9A7wgRHVE7lNYQtE9dqKBfsZvKGpehPMo=; b=UI8nyRNPQ3pe9RagCB5ZrbwEY/JRF7j58Lm242z3aL2v0QCI/3qWJG7p/23boEjrKAQmD9 2xH3pk5JxCOgQfClR3CDmOpqsriMV9UimmceQbhMvsP6KUtky9mJDGwLPR0mfpOQnor3BW cNAi00ZgFV3qmXPu0hRs58duCBZihryjhExIbGzNQiVLl70RhR9j+LYwwen2hrK8LFLNUt GjCNjRTeewOansavH2d0ineBUy2v1WK/9HjpT3FUR0WUyMDASsKmZeHEoMSq0Pyy3jh/5t PQWbfFP1QicHvsi7STCV7QSeKeOH/aakDK4irrExKTV3UvX244DNXQgd/FpGhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714063526; a=rsa-sha256; cv=none; b=LSFcW5z14Hr5htTSIOMrxwEtWTN/HpJT1d/C4r2maRuf7sIH+PijkHK4MIlaN3DIxxbk8M uw6t1hQR7SAgH8wMrp3m2i3lB4ozcX7NPgue5rLY3/4yGDCX2qp+ZZB//adVjKMjVE1kva iYs00CxKqwiaa49vFZBAeThahjK4S400Bw9wG3s5ZgO+Yxayz3LEKlk0Gel8R3nIevvNO+ bJ28cgM9KD/nZTv6lLF8VGd5gFTxdO52eY4zyyKOgg+jNjG+OLg7ZrHow6nB+A0apXaInj fv+cuLQlDAJax/27F4w7KjYRpNVvxtnGzy4LgctpDNwHIolE6apTFohuFgh0fg== 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=1714063526; 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=aKGvvA/ZyV9A7wgRHVE7lNYQtE9dqKBfsZvKGpehPMo=; b=E108arSe2GvIQQBL4eKBBGclTJQRDkL4d9Lh7UaFnsx9SGpo1ZzyHZvFcUPm42LwHjOjbp 8/jprpNZrTq9NlGdxt6oSb6xJpnvH/QOXlB219aJOnDA+zusoyzZneYiA978PcMbLMJI/g xVtlm85ula0PDgZB9hpZVK2RGjrxx1EtXmGZyR88G1NmJ8OLjCbSIsOvvtLceBVQrj9Jro IkpmHllmpeoOdpklGyLWtmwfzl/0QO9bleU+UmMyT1Su9HbXTk24J59XPOZ+79aPnTX/fS eWqwwbmAl6IdLXnaMvU1xm2PwJaWJnHcbjOgDPc3T6Oer9l2eLm/DFXkWThBRw== 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 4VQMD65Xtgz161b; Thu, 25 Apr 2024 16:45:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PGjQ22046715; Thu, 25 Apr 2024 16:45:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PGjQjF046713; Thu, 25 Apr 2024 16:45:26 GMT (envelope-from git) Date: Thu, 25 Apr 2024 16:45:26 GMT Message-Id: <202404251645.43PGjQjF046713@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: 54c3aa02e926 - main - Revert "nfsd: Fix NFSv4.1/4.2 Claim_Deleg_Cur_FH" 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: 54c3aa02e926268ba5551cd7d28fddf38b3589a2 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=54c3aa02e926268ba5551cd7d28fddf38b3589a2 commit 54c3aa02e926268ba5551cd7d28fddf38b3589a2 Author: Rick Macklem AuthorDate: 2024-04-25 16:41:23 +0000 Commit: Rick Macklem CommitDate: 2024-04-25 16:41:23 +0000 Revert "nfsd: Fix NFSv4.1/4.2 Claim_Deleg_Cur_FH" This reverts commit f300335d9aebf2e99862bf783978bd44ede23550. It turns out that the old code was correct and it was wireshark that was broken and indicated that the RPC's XDR was bogus. Found during IETF bakeathon testing this week. --- sys/fs/nfsserver/nfs_nfsdserv.c | 10 ++-------- sys/fs/nfsserver/nfs_nfsdstate.c | 16 ++++------------ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 899e88508b60..8141ee6cbdb6 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -3003,18 +3003,12 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, */ NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); claim = fxdr_unsigned(int, *tl); - if (claim == NFSV4OPEN_CLAIMDELEGATECUR) { + if (claim == NFSV4OPEN_CLAIMDELEGATECUR || claim == + NFSV4OPEN_CLAIMDELEGATECURFH) { NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID); stateid.seqid = fxdr_unsigned(u_int32_t, *tl++); NFSBCOPY((caddr_t)tl,(caddr_t)stateid.other,NFSX_STATEIDOTHER); stp->ls_flags |= NFSLCK_DELEGCUR; - } else if (claim == NFSV4OPEN_CLAIMDELEGATECURFH) { - /* Fill in most of the stateid from the clientid. */ - stateid.seqid = 0; - stateid.other[0] = clientid.lval[0]; - stateid.other[1] = clientid.lval[1]; - stateid.other[2] = 0; - stp->ls_flags |= NFSLCK_DELEGCUR; } else if (claim == NFSV4OPEN_CLAIMDELEGATEPREV || claim == NFSV4OPEN_CLAIMDELEGATEPREVFH) { stp->ls_flags |= NFSLCK_DELEGPREV; diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index da57ebde7a52..c73840277022 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -2568,10 +2568,6 @@ tryagain: /* * For Delegate_Cur, search for the matching Delegation, * which indicates no conflict. - * For NFSv4.1/4.2 Claim_Deleg_Cur_FH only provides - * the clientid, which is the first two "other" elements - * for the stateid. This should be sufficient, since there - * is only one delegation per client and file. * An old delegation should have been recovered by the * client doing a Claim_DELEGATE_Prev, so I won't let * it match and return NFSERR_EXPIRED. Should I let it @@ -2582,8 +2578,8 @@ tryagain: (((nd->nd_flag & ND_NFSV41) != 0 && stateidp->seqid == 0) || stateidp->seqid == stp->ls_stateid.seqid) && - stateidp->other[0] == stp->ls_stateid.other[0] && - stateidp->other[1] == stp->ls_stateid.other[1]) + !NFSBCMP(stateidp->other, stp->ls_stateid.other, + NFSX_STATEIDOTHER)) break; } if (stp == LIST_END(&lfp->lf_deleg) || @@ -2834,10 +2830,6 @@ tryagain: /* * For Delegate_Cur, search for the matching Delegation, * which indicates no conflict. - * For NFSv4.1/4.2 Claim_Deleg_Cur_FH only provides - * the clientid, which is the first two "other" elements - * for the stateid. This should be sufficient, since there - * is only one delegation per client and file. * An old delegation should have been recovered by the * client doing a Claim_DELEGATE_Prev, so I won't let * it match and return NFSERR_EXPIRED. Should I let it @@ -2848,8 +2840,8 @@ tryagain: (((nd->nd_flag & ND_NFSV41) != 0 && stateidp->seqid == 0) || stateidp->seqid == stp->ls_stateid.seqid) && - stateidp->other[0] == stp->ls_stateid.other[0] && - stateidp->other[1] == stp->ls_stateid.other[1]) + !NFSBCMP(stateidp->other, stp->ls_stateid.other, + NFSX_STATEIDOTHER)) break; } if (stp == LIST_END(&lfp->lf_deleg) || From nobody Thu Apr 25 16:47:59 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 4VQMH33l8xz5J5wR; Thu, 25 Apr 2024 16:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQMH33DJCz4LZr; Thu, 25 Apr 2024 16:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714063679; 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=VtCIOnjJRf0w2s2OsYdd9l/8ZjtGJcLFMtHKJzp2kNs=; b=d3/Ecsur5SeRUIgaxOLK/zD+XfnOYG/N35y7qFm4dg8LE8jF+U+61m/gECVbvpRsyc2z3l ZzHFVveD8x1I8aPgU/Y9ougD8pxJpZNCuqCsHFPG/xB0PFWtT/5paqfB0gKrLvQ9+5AEtH Ifw4rR5kyRg1ne533qWaQP+WKDAIJfw5F5eP54sBetZkvR/FRRXNy5eWmLbsIzjQQTtA9Y qIjx9hd2oWxbnfiyy66SjQSLm0TTzQDQPLlbHH5jSSbOv5KtO6tSplkFEI5lsLKtjdyCqh S+RqkClNzfhOa+Jb7asdiwgmDI4JtGfG72sYBPOw6gVkTLABq31NPX0MUpVnJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714063679; a=rsa-sha256; cv=none; b=cLmci8TnFpLIPeHBw2QDbu9FQ3In0ciZgx/+5rCrayZX9gehsNdaJ7vewrNirItTM2em9B ZxhKw6gIPdYQ93E+VP6nyibXhbfA0mnR9E846njjUiw3fg1iJhKKwrHaZMGTK1P7XeYwUa YMmKrXJadHN9/uQANsZ7utYNKJEaOMlq0/d54xzgZjuqD7eHGoqboqRv4WS3RonhImpYXV RPryWu9XG9tAhwupe8zbyXgzZCo10gYMRmpgXHT2AccynBIm0aUtm4MwG4uBAOLi3qO+2J nnxBy3+TOio+AVO86naFTSYmb24aH9IqvlCUETQ8kws1hKM0drjQDwgaZGxQvw== 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=1714063679; 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=VtCIOnjJRf0w2s2OsYdd9l/8ZjtGJcLFMtHKJzp2kNs=; b=O6s0Fk0ahYHjiQVE40Zis7xg5PxgvE7uOiildHUVbgH+AmsYfUJmyq6bZWZeV5Z1pxpcnM 10XoPNtqDQGKNuF5qwP0wnKqsduy5vA7EpmfnNJ0PLxjycBU2kYIHLqAfnAVqff6NhQRoU fxTJB+NwPGsFYS2deK+RgRsYEh67oalq0jMS3mbw92l7PA8aL1hllC33IPvAr/l7uDGmXq Vz6yx1jKq/LS5+Jtx+ntsQRpX2lkY0PAA93FmXr3rY2VAq3SA7/Li2aBt5/y2JwUsYu+Cc Wsqr0eXbP/dTZw6+ex7hp1AyuTi7Z36QYxOEwgVvnmE4OtPKxpqiqHZrBhKFPw== 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 4VQMH32qWZz16Hc; Thu, 25 Apr 2024 16:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PGlxig047247; Thu, 25 Apr 2024 16:47:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PGlxn7047244; Thu, 25 Apr 2024 16:47:59 GMT (envelope-from git) Date: Thu, 25 Apr 2024 16:47:59 GMT Message-Id: <202404251647.43PGlxn7047244@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: f08bf5a3acf1 - main - Merge commit 0f329e0246d1 from llvm-project (by Dimitry Andric): 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: f08bf5a3acf146b17794fbde41279645ddbaa086 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f08bf5a3acf146b17794fbde41279645ddbaa086 commit f08bf5a3acf146b17794fbde41279645ddbaa086 Author: Dimitry Andric AuthorDate: 2024-04-25 16:47:31 +0000 Commit: Dimitry Andric CommitDate: 2024-04-25 16:47:47 +0000 Merge commit 0f329e0246d1 from llvm-project (by Dimitry Andric): [sanitizer_symbolizer] Cast arguments for format strings in markup (#89815) When compiling the common sanitizer libraries, there are many warnings about format specifiers, similar to: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:31:32: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat] 31 | buffer->AppendF(kFormatData, DI->start); | ~~~~~~~~~~~ ^~~~~~~~~ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:33:46: note: format string is defined here 33 | constexpr const char *kFormatData = "{{{data:%p}}}"; | ^~ | %lu compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:46:43: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat] 46 | buffer->AppendF(kFormatFrame, frame_no, address); | ~~~~~~~~~~~~ ^~~~~~~ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:36:48: note: format string is defined here 36 | constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; | ^~ | %lu ... This is because `uptr` is dependent on the platform, and can be either `unsigned long long`, `unsigned long`, or `unsigned int`. To fix the warnings, cast the arguments to the expected type of the format strings. PR: 276104 Reported by: pstef MFC after: 3 days --- .../lib/sanitizer_common/sanitizer_symbolizer_markup.cpp | 10 ++++++---- .../sanitizer_common/sanitizer_symbolizer_markup_constants.h | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp index b2a1069a9a61..31d91ef3c739 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp @@ -28,7 +28,7 @@ void MarkupStackTracePrinter::RenderData(InternalScopedString *buffer, const char *format, const DataInfo *DI, const char *strip_path_prefix) { RenderContext(buffer); - buffer->AppendF(kFormatData, DI->start); + buffer->AppendF(kFormatData, reinterpret_cast(DI->start)); } bool MarkupStackTracePrinter::RenderNeedsSymbolization(const char *format) { @@ -43,12 +43,13 @@ void MarkupStackTracePrinter::RenderFrame(InternalScopedString *buffer, const char *strip_path_prefix) { CHECK(!RenderNeedsSymbolization(format)); RenderContext(buffer); - buffer->AppendF(kFormatFrame, frame_no, address); + buffer->AppendF(kFormatFrame, frame_no, reinterpret_cast(address)); } bool MarkupSymbolizerTool::SymbolizePC(uptr addr, SymbolizedStack *stack) { char buffer[kFormatFunctionMax]; - internal_snprintf(buffer, sizeof(buffer), kFormatFunction, addr); + internal_snprintf(buffer, sizeof(buffer), kFormatFunction, + reinterpret_cast(addr)); stack->info.function = internal_strdup(buffer); return true; } @@ -118,7 +119,8 @@ static void RenderMmaps(InternalScopedString *buffer, // module.base_address == dlpi_addr // range.beg == dlpi_addr + p_vaddr // relative address == p_vaddr == range.beg - module.base_address - buffer->AppendF(kFormatMmap, range.beg, range.end - range.beg, moduleId, + buffer->AppendF(kFormatMmap, reinterpret_cast(range.beg), + range.end - range.beg, static_cast(moduleId), accessBuffer.data(), range.beg - module.base_address()); buffer->Append("\n"); diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h index 83643504e128..a43661eaecf2 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h @@ -33,13 +33,13 @@ constexpr uptr kFormatFunctionMax = 64; // More than big enough for 64-bit hex. constexpr const char *kFormatData = "{{{data:%p}}}"; // One frame in a backtrace (printed on a line by itself). -constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; +constexpr const char *kFormatFrame = "{{{bt:%d:%p}}}"; // Module contextual element. -constexpr const char *kFormatModule = "{{{module:%d:%s:elf:%s}}}"; +constexpr const char *kFormatModule = "{{{module:%zu:%s:elf:%s}}}"; // mmap for a module segment. -constexpr const char *kFormatMmap = "{{{mmap:%p:0x%x:load:%d:%s:0x%x}}}"; +constexpr const char *kFormatMmap = "{{{mmap:%p:0x%zx:load:%d:%s:0x%zx}}}"; // Dump trigger element. #define FORMAT_DUMPFILE "{{{dumpfile:%s:%s}}}" From nobody Thu Apr 25 17:45:20 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 4VQNYD5G9bz5JCZ6; Thu, 25 Apr 2024 17:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQNYD4jydz4SQh; Thu, 25 Apr 2024 17:45:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714067120; 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=PCnRvd5pJsiJ3UMZYI/wOkif5GMgQpXCWuPB5pmVzrA=; b=IY0ohuckMdVwVI7vt21fsWc+k0aN547ga7QNO7A/dj0b7V1MD9jDSLomtQ3807sA10k3F3 1hxjFa7RIq/dIexGNAoUbT+7vuk9ghoqPCmFErQhDg2xUbcszmeeJXCHF1MWCvZmrItQYt 4aCXICdLpxS0TJKoNxWNL37+oFb7TmKw49r4MEKPkPTwwYnes5luvth2/rm0IMbf1eHCrq 4nLPzMLi1jttZtaYfSPzq+/dABwSB9EIC8YUWuWlb5Pig/CJEOvnrCW9O4MNALpGLi4WHC FqRAqA4mO1Vkpdj2/ZrMfeAmYjTzG9CvQ0Yg7p5R2Ac1QYl/TWoS0k9Ke9uZAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714067120; a=rsa-sha256; cv=none; b=wOL80MPJlcXPBhDqOGdXHQofCtl+Tj7R+o31jUeN7rII9aMAp98s4JhwYNc3QcEMZ9feeQ xwqBcrPLze+9ipbx9Cc+oBuCuwwIeVSDT4j4lmF/gCyty7zdlehF9XTLI/eg97gpZEPT7z fM/Q7+bDNbSX/TPiF6075PUGOjhVVJm0x5C4WGud7wTS4lo0Ev14z9SI6U/FF6AlmvEhkT XXYHpQ8FTrlO5rwSoJCX7kpGRSBj/hDtDyTtJJMozHraDlsU6Was/GE687SyPsRtIrBmGN 7Q3sL15VBJrv1aDVVmTSv4F8V3TllWF9zgDh2IqCZ4gHbE7qzi4aW59ZnpZCLA== 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=1714067120; 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=PCnRvd5pJsiJ3UMZYI/wOkif5GMgQpXCWuPB5pmVzrA=; b=H1JxbS/VDkgOk8SY7TsI+6JO/nccTwHMU9rdRC5vHgO6KixYU78qdoik236lXrvtnuXebV +CnMnDSZgGW/JM1vy2oL2yhPWGcDqZdf+grg75+LnQe33cZkTt5Lh6+OP9QGUM0sPEaC11 LKaxwlYsBMtikYNAMjCffzWPpzQK2IByyxXfc9fOh2B81MFir1DkawKOCy0057Jn/bgMho m096on2hiKKxBOEYXWsEAw9PxpvC26uFPg0GU36BcbOkE+dBstbahiDP99mf6FovGHYHWF FcHuvcL49kBi61ZSfh3neeTZtsMR4kZFPFlZfEoRV2yBe4wtkXFIfJeh9Op7Rw== 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 4VQNYD4KY4z17g1; Thu, 25 Apr 2024 17:45:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PHjKTd047541; Thu, 25 Apr 2024 17:45:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PHjK82047538; Thu, 25 Apr 2024 17:45:20 GMT (envelope-from git) Date: Thu, 25 Apr 2024 17:45:20 GMT Message-Id: <202404251745.43PHjK82047538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ad31d4764255 - main - bsdinstall: update comment related to pkg 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad31d4764255c0848f1f0fa10760d16b5a2922aa Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ad31d4764255c0848f1f0fa10760d16b5a2922aa commit ad31d4764255c0848f1f0fa10760d16b5a2922aa Author: Bjoern A. Zeeb AuthorDate: 2024-04-25 14:47:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-04-25 17:44:18 +0000 bsdinstall: update comment related to pkg pkg_add has been gone since 2013(?). Refer to pkg(8) instead. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D44946 --- usr.sbin/bsdinstall/scripts/docsinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/docsinstall b/usr.sbin/bsdinstall/scripts/docsinstall index 8d22fdaa07b6..68a5798b0493 100755 --- a/usr.sbin/bsdinstall/scripts/docsinstall +++ b/usr.sbin/bsdinstall/scripts/docsinstall @@ -148,7 +148,7 @@ f_mustberoot_init dialog_menu_main || f_die f_dialog_menutag_fetch selected -# Let pkg_add be able to use name servers +# Let pkg(8) be able to use name servers f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ # From nobody Thu Apr 25 18:20: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 4VQPKJ6N78z5JGd6; Thu, 25 Apr 2024 18:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQPKJ5mB6z4XSm; Thu, 25 Apr 2024 18:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714069204; 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=SJfAxlyIH6GOkYoyS9urg9ASSRBlkzlhQyK3NZIwdqI=; b=A9ZXEVIoDPgNBXLzW6SddBiMGCcuUuHnPBr9QsQolJcMMHqaX5DIpzQ2XzDYKqoFYnB1Wo kdpWStHMg3+7pAu5vaIYCC6nk37lT9tQYPpB5JCjZo/5z/jPU3mDx+8WMsE724M3bYv9Tr /acXPYSN4cu2sA0bc6RnAesmPmtMNRCHCQAIFHOFDQHyqo+UZKYzp+35dIOb6Tt9W12uQP Q9TcjiGOA7qLm/GEaf+BmFmpT3GXVCYKoJpNB5UvDqFa4qwku8sWsMyIbGZnNee6mmRT+b 0k6JpQIgBEaRPAOgl/9tnETP0vaRJELo3kb6TRW5+enaxjpPZ2f4hMZUeME6lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714069204; a=rsa-sha256; cv=none; b=cB6yf15ETRo8IwaWXWXvj06qgtbefAF1nvTpxIrl4lmMRDfx0cV/88VrLY+vdJZnAvRTDv L1Q/QVm3FG0oj/lR7+DC8EvrRlAQRIV0tXC5vm8ouwEKyCWKTY0QWvHzhPx3MvHaGSMEcs a5L2wnnjWL+IZVDFsM9jsbJhDyHaClobVuESkUuHUQz3UNZu7LnyvsW8s37R/ekBPEoUFE OlkU0Zyln3wRPTCaytQFjjjm1IM3yOvgtA1U3BS3Q9zTDDrsTTU9toodhX/8pSsFNXMTZt 4YE6GB5O/4nz1qe1NqLUg+Ukb5vuV71pzBx8tJKw7Igvcucr2EOuUzvSon07Qw== 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=1714069204; 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=SJfAxlyIH6GOkYoyS9urg9ASSRBlkzlhQyK3NZIwdqI=; b=Tt+mGhkoZDTlLZKMId/EyjlJAtCc3GdDR2wDQYIKbLMUNgz7RcWeY3ZFMFMY+u73TpJpKq 4yKGl9jhMtH8sJLPqrbwDDm0EmVkUkMKmjlWOlETmRmuHdHqxfDvE+6oqterawLYjIw+J8 sCduEeVRqnNzw1h/nNVLU4Xir/XZI1s1io6Q0AVYxn51cPe3Wwq9y778QzF79d0dzvVjS2 hodW6xm2oAnlLsT5qM5LB3p6aCSBCQqpeL7yQ68bGiq/xWkFlTWKaEIbbrnSQhV2LI4eOi ywvK1YyM055kWHYsje025ec/q1fcLl/RvTuduAY68bWAf9InrXhFddtUcWePcg== 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 4VQPKJ4yB5z18TC; Thu, 25 Apr 2024 18:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PIK4Qp001532; Thu, 25 Apr 2024 18:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PIK4BO001528; Thu, 25 Apr 2024 18:20:04 GMT (envelope-from git) Date: Thu, 25 Apr 2024 18:20:04 GMT Message-Id: <202404251820.43PIK4BO001528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 73585176ffd8 - main - if_bridge: Minor style fixes 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73585176ffd84c13d68cad67c2ca81643f09075c Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=73585176ffd84c13d68cad67c2ca81643f09075c commit 73585176ffd84c13d68cad67c2ca81643f09075c Author: Zhenlei Huang AuthorDate: 2024-04-25 18:19:11 +0000 Commit: Zhenlei Huang CommitDate: 2024-04-25 18:19:11 +0000 if_bridge: Minor style fixes And more comments on the #ifdef INET blocks to improve readability. While here, revert the order of two prototypes to produce minimal diff compared to stable branches. MFC with: 65767e6126a7 --- sys/net/if_bridge.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 7b44d85d1fe8..1e6f9b578ee3 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -403,19 +403,16 @@ static int bridge_ioctl_sproto(struct bridge_softc *, void *); static int bridge_ioctl_stxhc(struct bridge_softc *, void *); static int bridge_pfil(struct mbuf **, struct ifnet *, struct ifnet *, int); -static void bridge_linkstate(struct ifnet *ifp); -static void bridge_linkcheck(struct bridge_softc *sc); - #ifdef INET static int bridge_ip_checkbasic(struct mbuf **mp); static int bridge_fragment(struct ifnet *, struct mbuf **mp, struct ether_header *, int, struct llc *); #endif /* INET */ - #ifdef INET6 static int bridge_ip6_checkbasic(struct mbuf **mp); #endif /* INET6 */ - +static void bridge_linkstate(struct ifnet *ifp); +static void bridge_linkcheck(struct bridge_softc *sc); /* * Use the "null" value from IEEE 802.1Q-2014 Table 9-2 @@ -3459,7 +3456,7 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) if (V_pfil_ipfw_arp == 0) return (0); /* Automatically pass */ - /*FALLTHROUGH*/ + /* FALLTHROUGH */ case ETHERTYPE_IP: #endif #ifdef INET6 @@ -3587,8 +3584,7 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) ip->ip_sum = in_cksum(*mp, hlen); break; -#endif - +#endif /* INET */ #ifdef INET6 case ETHERTYPE_IPV6: if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL && (rv = @@ -3747,7 +3743,7 @@ bad: *mp = m; return (-1); } -#endif +#endif /* INET */ #ifdef INET6 /* @@ -3880,7 +3876,7 @@ dropit: } return (error); } -#endif +#endif /* INET */ static void bridge_linkstate(struct ifnet *ifp) From nobody Thu Apr 25 18:36: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 4VQPh83Xg9z5JJBJ; Thu, 25 Apr 2024 18:36: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQPh82p5Nz4YTR; Thu, 25 Apr 2024 18:36:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714070184; 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=RlU5vc89ZJ9riQpFAqceaGMi6PUwkjXcgXSb+iX4g9U=; b=cWyqZjY/ntn1H33Ahx4CkTlv/6BiFjOD3QJLXie0jYwT/EYGyuxZG5PPjhlGiLd6dzdSyh 79AYsuIPXGOfNTm9JS4YDUv88ho6lxX03kVO2wrxdDkGmb+/sGfwM7rgu3M3lgWsBkIAp5 RSnntIgslxpJUllCMQB1muEhHHES9c74ZsnjaWsqgrv/GaqtSu7eaCO4/AsnKWa5aHkBo/ ejzxo8NM0gKeFfqSZArWdBjY7fO+YKV/XJHJYedsYPLCbpyC/GuwfWYrJ3fR3t0dwW7ZZr wdmHEsJwjeEVLvwERyeIZs2QMc63cvpabIHiq3KKgyqZE2JxmXdCJLU+NnBMuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714070184; a=rsa-sha256; cv=none; b=OBkOB836fFqFaG1JGF4xTEkrFMHqbAP+SC6h+60w5d2HaRxMI4IenSFzeyIvSkdst9nPtJ 0DJMZsZ/BylsnmVZ/ogeBiQs6eA+eEknBZl3wB4DTXNMvBWe0qCjI0vp2Fb2rAmESmU+lL LxTlqjjVX90CkU8YSlyHv01Z9LzF6SF7rbq7j+/jbZX81fc0DL2fLLQ16yPPI7YtWGcryI 3DaMACqTBb0gLXRtDnYhDYxbf12c51HtLcWsla3KUI81yBxt5R3ZEf4bqjwyXsS89ydQdj in18E4F7BygSs3bioHn67DAsYdZcux/pI7af8MM8PBLeNr2Npj8M0ju+quM4UA== 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=1714070184; 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=RlU5vc89ZJ9riQpFAqceaGMi6PUwkjXcgXSb+iX4g9U=; b=aiJW+TqHJCrWEkZCfkSu9Q7PDe+nFk/E7d4B92bThU/tkRELX2oTSmRrqP8L3NPwkb4+VK iYSs/mmh3iRZlT64nmeScLsAz2RyjINeD+vJIk84tQ5KgmnxpeDe5j7Xr3G/LVv2mxbaqV M3FXsD36+VA5zv+D/m4H9QQcJ5RJV36vSRmv0idFo9JQMF7a67NfH4lDYlWqyZJqQmbFSN 5NXbcA75WIVbSXd3zYbGaY51SiGukxQr8HRERYeI06HCjjteHEktSxPCZRRDQwaGPJEdAE MzmItp7FRvmc1F7T1EJf5d7nlBximJT9pRm/yt1OiQNCIDyn4FfsAq3AdTqoGA== 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 4VQPh82PSHz18jB; Thu, 25 Apr 2024 18:36:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PIaOD4032759; Thu, 25 Apr 2024 18:36:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PIaO1i032756; Thu, 25 Apr 2024 18:36:24 GMT (envelope-from git) Date: Thu, 25 Apr 2024 18:36:24 GMT Message-Id: <202404251836.43PIaO1i032756@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 1ed44fcc44b2 - main - tftpd: Use `size_t` where appropriate. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ed44fcc44b2c04db330663589541608135402f4 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1ed44fcc44b2c04db330663589541608135402f4 commit 1ed44fcc44b2c04db330663589541608135402f4 Author: Dag-Erling Smørgrav AuthorDate: 2024-04-25 18:35:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-04-25 18:36:12 +0000 tftpd: Use `size_t` where appropriate. * Limit the use of `ssize_t` to only where it's needed. * Correct one case of `int` being used for a length. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44954 --- libexec/tftpd/tests/functional.c | 52 ++++++++++++++++++++++++---------------- libexec/tftpd/tftp-utils.c | 4 ++-- libexec/tftpd/tftp-utils.h | 2 +- libexec/tftpd/tftpd.c | 16 ++++++------- 4 files changed, 42 insertions(+), 32 deletions(-) diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c index 0bdbcfe559ed..bf7b5c77c898 100644 --- a/libexec/tftpd/tests/functional.c +++ b/libexec/tftpd/tests/functional.c @@ -51,8 +51,8 @@ static bool s_flag = false; /* Pass -s to tftpd */ static bool w_flag = false; /* Pass -w to tftpd */ /* Helper functions*/ -static void require_bufeq(const char *expected, ssize_t expected_len, - const char *actual, ssize_t len); +static void require_bufeq(const char *expected, size_t expected_len, + const char *actual, size_t len); /* * Receive a response from tftpd @@ -68,7 +68,7 @@ static void require_bufeq(const char *expected, ssize_t expected_len, (struct sockaddr*)&from, &fromlen); \ ATF_REQUIRE(r > 0); \ require_bufeq((hdr), sizeof(hdr), buffer, \ - MIN(r, (ssize_t)sizeof(hdr))); \ + MIN((size_t)r, sizeof(hdr))); \ require_bufeq((const char*) (contents), (contents_len), \ &buffer[sizeof(hdr)], r - sizeof(hdr)); \ if (protocol == PF_INET) { \ @@ -117,12 +117,13 @@ recv_data(uint16_t blocknum, const char* contents, size_t contents_len) * @param cmd Command to send, as a char array */ static void -send_bytes(const void* cmd, ssize_t len) +send_bytes(const void *cmd, size_t len) { ssize_t r; r = sendto(s, cmd, len, 0, (struct sockaddr*)(&addr), addr.ss_len); - ATF_REQUIRE_EQ(r, len); + ATF_REQUIRE(r >= 0); + ATF_REQUIRE_EQ(len, (size_t)r); } static void @@ -261,16 +262,16 @@ cleanup(void) /* Assert that two binary buffers are identical */ static void -require_bufeq(const char *expected, ssize_t expected_len, const char *actual, - ssize_t len) +require_bufeq(const char *expected, size_t expected_len, const char *actual, + size_t len) { - ssize_t i; + size_t i; ATF_REQUIRE_EQ_MSG(expected_len, len, - "Expected %zd bytes but got %zd", expected_len, len); + "Expected %zu bytes but got %zu", expected_len, len); for (i = 0; i < len; i++) { ATF_REQUIRE_EQ_MSG(actual[i], expected[i], - "Expected %#hhx at position %zd; got %hhx instead", + "Expected %#hhx at position %zu; got %hhx instead", expected[i], i, actual[i]); } } @@ -391,8 +392,8 @@ write_all(int fd, const void *buf, size_t nbytes) while (nbytes > 0) { r = write(fd, buf, nbytes); ATF_REQUIRE(r > 0); - nbytes -= r; - buf = (const char*)buf + r; + nbytes -= (size_t)r; + buf = (const char*)buf + (size_t)r; } } @@ -804,8 +805,9 @@ TFTPD_TC_DEFINE(w_flag,, w_flag = 1;) fd = open("small.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq(contents, contents_len, buffer, r); + require_bufeq(contents, contents_len, buffer, (size_t)r); } /* @@ -841,8 +843,9 @@ TFTPD_TC_DEFINE(wrq_dropped_ack,) fd = open("medium.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq((const char*)contents, 768, buffer, r); + require_bufeq((const char*)contents, 768, buffer, (size_t)r); } /* @@ -874,8 +877,9 @@ TFTPD_TC_DEFINE(wrq_dropped_data,) fd = open("small.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq(contents, contents_len, buffer, r); + require_bufeq(contents, contents_len, buffer, (size_t)r); } /* @@ -908,8 +912,9 @@ TFTPD_TC_DEFINE(wrq_duped_data,) fd = open("medium.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq((const char*)contents, 768, buffer, r); + require_bufeq((const char*)contents, 768, buffer, (size_t)r); } /* @@ -972,8 +977,9 @@ TFTPD_TC_DEFINE(wrq_medium,) fd = open("medium.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq((const char*)contents, 768, buffer, r); + require_bufeq((const char*)contents, 768, buffer, (size_t)r); } /* @@ -1004,8 +1010,9 @@ TFTPD_TC_DEFINE(wrq_medium_window,) fd = open("medium.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq((const char*)contents, 768, buffer, r); + require_bufeq((const char*)contents, 768, buffer, (size_t)r); } /* @@ -1037,8 +1044,9 @@ TFTPD_TC_DEFINE(wrq_netascii,) fd = open("unix.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq(expected, sizeof(expected), buffer, r); + require_bufeq(expected, sizeof(expected), buffer, (size_t)r); } /* @@ -1075,8 +1083,9 @@ TFTPD_TC_DEFINE(wrq_small,) fd = open("small.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq(contents, contents_len, buffer, r); + require_bufeq(contents, contents_len, buffer, (size_t)r); } /* @@ -1162,8 +1171,9 @@ TFTPD_TC_DEFINE(wrq_window_rfc7440,) fd = open("rfc7440.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); + ATF_REQUIRE(r > 0); close(fd); - require_bufeq(contents, sizeof(contents), buffer, r); + require_bufeq(contents, sizeof(contents), buffer, (size_t)r); } diff --git a/libexec/tftpd/tftp-utils.c b/libexec/tftpd/tftp-utils.c index 9754c3238d50..b309a94f7653 100644 --- a/libexec/tftpd/tftp-utils.c +++ b/libexec/tftpd/tftp-utils.c @@ -104,8 +104,8 @@ unmappedaddr(struct sockaddr_in6 *sin6) } /* Get a field from a \0 separated string */ -ssize_t -get_field(int peer, char *buffer, ssize_t size) +size_t +get_field(int peer, char *buffer, size_t size) { char *cp = buffer; diff --git a/libexec/tftpd/tftp-utils.h b/libexec/tftpd/tftp-utils.h index 3fecf1fc8696..763b3b493c7e 100644 --- a/libexec/tftpd/tftp-utils.h +++ b/libexec/tftpd/tftp-utils.h @@ -63,7 +63,7 @@ extern int acting_as_client; /* */ void unmappedaddr(struct sockaddr_in6 *sin6); -ssize_t get_field(int peer, char *buffer, ssize_t size); +size_t get_field(int peer, char *buffer, size_t size); /* * Packet types diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index 9b56029797ec..45e7344c86ed 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -68,8 +68,8 @@ #include #endif -static void tftp_wrq(int peer, char *, ssize_t); -static void tftp_rrq(int peer, char *, ssize_t); +static void tftp_wrq(int peer, char *, size_t); +static void tftp_rrq(int peer, char *, size_t); /* * Null-terminated directory prefix list for absolute pathname requests and @@ -81,7 +81,7 @@ static void tftp_rrq(int peer, char *, ssize_t); #define MAXDIRS 20 static struct dirlist { const char *name; - int len; + size_t len; } dirs[MAXDIRS+1]; static int suppress_naks; static int logging; @@ -392,7 +392,7 @@ main(int argc, char *argv[]) tp->th_opcode = ntohs(tp->th_opcode); if (tp->th_opcode == RRQ) { if (allow_ro) - tftp_rrq(peer, tp->th_stuff, n - 1); + tftp_rrq(peer, tp->th_stuff, (size_t)n - 1); else { tftp_log(LOG_WARNING, "%s read access denied", peername); @@ -400,7 +400,7 @@ main(int argc, char *argv[]) } } else if (tp->th_opcode == WRQ) { if (allow_wo) - tftp_wrq(peer, tp->th_stuff, n - 1); + tftp_wrq(peer, tp->th_stuff, (size_t)n - 1); else { tftp_log(LOG_WARNING, "%s write access denied", peername); @@ -443,7 +443,7 @@ reduce_path(char *fn) } static char * -parse_header(int peer, char *recvbuffer, ssize_t size, +parse_header(int peer, char *recvbuffer, size_t size, char **filename, char **mode) { char *cp; @@ -489,7 +489,7 @@ parse_header(int peer, char *recvbuffer, ssize_t size, * WRQ - receive a file from the client */ void -tftp_wrq(int peer, char *recvbuffer, ssize_t size) +tftp_wrq(int peer, char *recvbuffer, size_t size) { char *cp; int has_options = 0, ecode; @@ -534,7 +534,7 @@ tftp_wrq(int peer, char *recvbuffer, ssize_t size) * RRQ - send a file to the client */ void -tftp_rrq(int peer, char *recvbuffer, ssize_t size) +tftp_rrq(int peer, char *recvbuffer, size_t size) { char *cp; int has_options = 0, ecode; From nobody Thu Apr 25 18:36:25 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 4VQPh94RSHz5JJ6N; Thu, 25 Apr 2024 18:36:25 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQPh93LxJz4YlS; Thu, 25 Apr 2024 18:36:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714070185; 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=BoyYLNA1oJxfFnMkhm4qKC2wdRetqzMGiA771B+BEvs=; b=LqBQvG21XAK23TrJ5f6k0S9nDYPinoE1mnN4VQx0BkKEWQnv4k3eqGdUhwDBdB+sLkQqBV fpE5L+eRZs9Q5PnKq2d+TsLdwUayoQp0l6cW4RSaqiVQvP8kUG/qEJ9SvLt6YfXxOmyu8g OxUPmW/Y7cmXTvhru03cQ8QI830xqqIbXKlPnE6kSx8c8f6LKBZzbMvto8tnN4t+atwFso 4xwi/a5wao878XijZhSZpyVThNJLoWlUO3Ll4D3CMCr99/gHE5k3H3ZlXI5Ur0DE7xiL80 9OyKT/eCgBwLZMfr5Q440J0je13EhH65hiQ4lIHjam8l3tOb/mOIe7FzzAKJ6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714070185; a=rsa-sha256; cv=none; b=ODldDdXtSeIgrq1yXKPp+bvX7I4rFm2H4vx3LV1x6BCoqwLY/JZcndROCbyR8XjqQEGmME yhg/IfzzSwHZh3uiDAs2mntvI/H9C0wZ+s4aQbnjznC2kOIchFb9YAvNeEVODjXtQmt+CH NUp5jYfLqra52pGzMqjIU0eoJgGM/0OX1q8iibpRIrpkcVs77BeVKa1aJkLoCawU+G9nMm MkgOopMIbgmTUyM5hZfnZuT3h576eY7waDSbx9CShTEaS4LAy3SYLheUQlvbKeQsCc4rwf eEZoY09Ye1nx8+JY+/UuznhvgKQrZkkp2VNprr6iOv6MNT6F4nOtpdIh903y/g== 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=1714070185; 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=BoyYLNA1oJxfFnMkhm4qKC2wdRetqzMGiA771B+BEvs=; b=jeT8Y1XaKHYg5MPn2yMtg4JDLAgFRZ54zG0nbawI/M+sIszCf5FS5SdnbF0V2jttlieOCX 95FK9JSrNINUD3D8olg9MRJ2/47Z/LnBG+KlLHVgT4TQnMHSuAE1mev0mEBNoKjcVLX75S JFZqW5l9yJE3zkUI3XoumLaZnq29mEMYBl0NTWfi9Tc7SnTFTeIP2ZimDxWT/60FPD/2dW BRHJfdY+pRTfoEd6Ajxks6rRvXUwowixJ3T1pnTwCpJP5pQXtHx0yLijzHAmPdFvhrPVka KCuM5GID0Aurp3i7trkY1hPyhv9efsNf0wgT3PZLQzFOHq8xwPJDcFVCh9PyZw== 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 4VQPh92y09z18xF; Thu, 25 Apr 2024 18:36:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PIaPLj032814; Thu, 25 Apr 2024 18:36:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PIaPM7032811; Thu, 25 Apr 2024 18:36:25 GMT (envelope-from git) Date: Thu, 25 Apr 2024 18:36:25 GMT Message-Id: <202404251836.43PIaPM7032811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 7ab7ecfcfe77 - main - tftpd: Clean up the tests. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ab7ecfcfe777f7816e3e01df5f277060b2b609a Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7ab7ecfcfe777f7816e3e01df5f277060b2b609a commit 7ab7ecfcfe777f7816e3e01df5f277060b2b609a Author: Dag-Erling Smørgrav AuthorDate: 2024-04-25 18:35:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-04-25 18:36:13 +0000 tftpd: Clean up the tests. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44955 --- libexec/tftpd/tests/functional.c | 253 ++++++++++++++++++++------------------- 1 file changed, 128 insertions(+), 125 deletions(-) diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c index bf7b5c77c898..bbe4f3782192 100644 --- a/libexec/tftpd/tests/functional.c +++ b/libexec/tftpd/tests/functional.c @@ -60,24 +60,24 @@ static void require_bufeq(const char *expected, size_t expected_len, * @param contents The reply's expected contents, as a char array * @param contents_len Length of contents */ -#define RECV(hdr, contents, contents_len) do { \ - char buffer[1024]; \ - struct sockaddr_storage from; \ - socklen_t fromlen = sizeof(from); \ - ssize_t r = recvfrom(s, buffer, sizeof(buffer), 0, \ - (struct sockaddr*)&from, &fromlen); \ - ATF_REQUIRE(r > 0); \ - require_bufeq((hdr), sizeof(hdr), buffer, \ - MIN((size_t)r, sizeof(hdr))); \ - require_bufeq((const char*) (contents), (contents_len), \ - &buffer[sizeof(hdr)], r - sizeof(hdr)); \ - if (protocol == PF_INET) { \ - ((struct sockaddr_in*)&addr)->sin_port = \ - ((struct sockaddr_in*)&from)->sin_port; \ - } else { \ - ((struct sockaddr_in6*)&addr)->sin6_port = \ - ((struct sockaddr_in6*)&from)->sin6_port; \ - } \ +#define RECV(hdr, contents, contents_len) do { \ + char buffer[1024]; \ + struct sockaddr_storage from; \ + socklen_t fromlen = sizeof(from); \ + ssize_t r = recvfrom(s, buffer, sizeof(buffer), 0, \ + (struct sockaddr *)&from, &fromlen); \ + ATF_REQUIRE(r > 0); \ + require_bufeq((hdr), sizeof(hdr), buffer, \ + MIN((size_t)r, sizeof(hdr))); \ + require_bufeq((const char *) (contents), (contents_len), \ + &buffer[sizeof(hdr)], r - sizeof(hdr)); \ + if (protocol == PF_INET) { \ + ((struct sockaddr_in *)&addr)->sin_port = \ + ((struct sockaddr_in *)&from)->sin_port; \ + } else { \ + ((struct sockaddr_in6 *)&addr)->sin6_port = \ + ((struct sockaddr_in6 *)&from)->sin6_port; \ + } \ } while(0) static void @@ -101,15 +101,15 @@ recv_oack(const char *options, size_t options_len) * @param contents_len Length of contents expected to receive */ static void -recv_data(uint16_t blocknum, const char* contents, size_t contents_len) +recv_data(uint16_t blocknum, const char *contents, size_t contents_len) { char hdr[] = {0, 3, blocknum >> 8, blocknum & 0xFF}; RECV(hdr, contents, contents_len); } -#define RECV_ERROR(code, msg) do { \ - char hdr[] = {0, 5, code >> 8, code & 0xFF}; \ - RECV(hdr, msg, sizeof(msg)); \ +#define RECV_ERROR(code, msg) do { \ + char hdr[] = {0, 5, code >> 8, code & 0xFF}; \ + RECV(hdr, msg, sizeof(msg)); \ } while (0) /* @@ -121,13 +121,13 @@ send_bytes(const void *cmd, size_t len) { ssize_t r; - r = sendto(s, cmd, len, 0, (struct sockaddr*)(&addr), addr.ss_len); + r = sendto(s, cmd, len, 0, (struct sockaddr *)(&addr), addr.ss_len); ATF_REQUIRE(r >= 0); ATF_REQUIRE_EQ(len, (size_t)r); } static void -send_data(uint16_t blocknum, const char* contents, size_t contents_len) +send_data(uint16_t blocknum, const char *contents, size_t contents_len) { char buffer[1024]; @@ -144,10 +144,10 @@ send_data(uint16_t blocknum, const char* contents, size_t contents_len) * @param cmd Command to send, as a const string * (terminating NUL will be ignored) */ -#define SEND_STR(cmd) ATF_REQUIRE_EQ( \ - sendto(s, (cmd), sizeof(cmd) - 1, 0, (struct sockaddr*)(&addr), \ - addr.ss_len), \ - sizeof(cmd) - 1) +#define SEND_STR(cmd) \ + ATF_REQUIRE_EQ(sizeof(cmd) - 1, \ + sendto(s, (cmd), sizeof(cmd) - 1, 0, \ + (struct sockaddr *)(&addr), addr.ss_len)) /* * Acknowledge block blocknum @@ -156,13 +156,12 @@ static void send_ack(uint16_t blocknum) { char packet[] = { - 0, 4, /* ACK opcode in BE */ - blocknum >> 8, - blocknum & 0xFF + 0, 4, /* ACK opcode in BE */ + blocknum >> 8, + blocknum & 0xFF }; send_bytes(packet, sizeof(packet)); - } /* @@ -175,71 +174,74 @@ send_ack(uint16_t blocknum) * @param filename filename as a string, absolute or relative * @param mode either "octet" or "netascii" */ -#define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode "\0") +#define SEND_RRQ(filename, mode) \ + SEND_STR("\0\001" filename "\0" mode "\0") /* * send a read request with options */ -#define SEND_RRQ_OPT(filename, mode, options) SEND_STR("\0\001" filename "\0" mode "\000" options) +#define SEND_RRQ_OPT(filename, mode, options) \ + SEND_STR("\0\001" filename "\0" mode "\000" options) /* * send a write request to tftpd. * @param filename filename as a string, absolute or relative * @param mode either "octet" or "netascii" */ -#define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode "\0") +#define SEND_WRQ(filename, mode) \ + SEND_STR("\0\002" filename "\0" mode "\0") /* * send a write request with options */ -#define SEND_WRQ_OPT(filename, mode, options) SEND_STR("\0\002" filename "\0" mode "\000" options) +#define SEND_WRQ_OPT(filename, mode, options) \ + SEND_STR("\0\002" filename "\0" mode "\000" options) /* Define a test case, for both IPv4 and IPv6 */ -#define TFTPD_TC_DEFINE(name, head, ...) \ -static void \ -name ## _body(void); \ -ATF_TC_WITH_CLEANUP(name ## _v4); \ -ATF_TC_HEAD(name ## _v4, tc) \ -{ \ - head \ -} \ -ATF_TC_BODY(name ## _v4, tc) \ -{ \ - __VA_ARGS__; \ - protocol = AF_INET; \ - s = setup(&addr, __COUNTER__); \ - name ## _body(); \ - close(s); \ -} \ -ATF_TC_CLEANUP(name ## _v4, tc) \ -{ \ - cleanup(); \ -} \ -ATF_TC_WITH_CLEANUP(name ## _v6); \ -ATF_TC_HEAD(name ## _v6, tc) \ -{ \ - head \ -} \ -ATF_TC_BODY(name ## _v6, tc) \ -{ \ - __VA_ARGS__; \ - protocol = AF_INET6; \ - s = setup(&addr, __COUNTER__); \ - name ## _body(); \ - close(s); \ -} \ -ATF_TC_CLEANUP(name ## _v6, tc) \ -{ \ - cleanup(); \ -} \ -static void \ +#define TFTPD_TC_DEFINE(name, head, ...) \ +static void \ +name ## _body(void); \ +ATF_TC_WITH_CLEANUP(name ## _v4); \ +ATF_TC_HEAD(name ## _v4, tc) \ +{ \ + head \ +} \ +ATF_TC_BODY(name ## _v4, tc) \ +{ \ + __VA_ARGS__; \ + protocol = AF_INET; \ + s = setup(&addr, __COUNTER__); \ + name ## _body(); \ + close(s); \ +} \ +ATF_TC_CLEANUP(name ## _v4, tc) \ +{ \ + cleanup(); \ +} \ +ATF_TC_WITH_CLEANUP(name ## _v6); \ +ATF_TC_HEAD(name ## _v6, tc) \ +{ \ + head \ +} \ +ATF_TC_BODY(name ## _v6, tc) \ +{ \ + __VA_ARGS__; \ + protocol = AF_INET6; \ + s = setup(&addr, __COUNTER__); \ + name ## _body(); \ + close(s); \ +} \ +ATF_TC_CLEANUP(name ## _v6, tc) \ +{ \ + cleanup(); \ +} \ +static void \ name ## _body(void) /* Add the IPv4 and IPv6 versions of a test case */ -#define TFTPD_TC_ADD(tp, name ) \ -do { \ - ATF_TP_ADD_TC(tp, name ## _v4); \ - ATF_TP_ADD_TC(tp, name ## _v6); \ +#define TFTPD_TC_ADD(tp, name) do { \ + ATF_TP_ADD_TC(tp, name ## _v4); \ + ATF_TP_ADD_TC(tp, name ## _v6); \ } while (0) /* Standard cleanup used by all testcases */ @@ -262,15 +264,15 @@ cleanup(void) /* Assert that two binary buffers are identical */ static void -require_bufeq(const char *expected, size_t expected_len, const char *actual, - size_t len) +require_bufeq(const char *expected, size_t expected_len, + const char *actual, size_t len) { size_t i; ATF_REQUIRE_EQ_MSG(expected_len, len, "Expected %zu bytes but got %zu", expected_len, len); for (i = 0; i < len; i++) { - ATF_REQUIRE_EQ_MSG(actual[i], expected[i], + ATF_REQUIRE_EQ_MSG(expected[i], actual[i], "Expected %#hhx at position %zu; got %hhx instead", expected[i], i, actual[i]); } @@ -304,17 +306,17 @@ setup(struct sockaddr_storage *to, uint16_t idx) addr4.sin_len = len; addr4.sin_family = PF_INET; addr4.sin_port = htons(port); - server_addr = (struct sockaddr*)&addr4; + server_addr = (struct sockaddr *)&addr4; } else { len = sizeof(addr6); bzero(&addr6, len); addr6.sin6_len = len; addr6.sin6_family = PF_INET6; addr6.sin6_port = htons(port); - server_addr = (struct sockaddr*)&addr6; + server_addr = (struct sockaddr *)&addr6; } - ATF_REQUIRE_EQ(getcwd(pwd, sizeof(pwd)), pwd); + ATF_REQUIRE_EQ(pwd, getcwd(pwd, sizeof(pwd))); /* Must bind(2) pre-fork so it happens before the client's send(2) */ server_s = socket(protocol, SOCK_DGRAM, 0); @@ -324,7 +326,7 @@ setup(struct sockaddr_storage *to, uint16_t idx) } ATF_REQUIRE_MSG(server_s >= 0, "socket failed with error %s", strerror(errno)); - ATF_REQUIRE_EQ_MSG(bind(server_s, server_addr, len), 0, + ATF_REQUIRE_EQ_MSG(0, bind(server_s, server_addr, len), "bind failed with error %s", strerror(errno)); pid = fork(); @@ -337,8 +339,8 @@ setup(struct sockaddr_storage *to, uint16_t idx) pfh = pidfile_open(pidfile, 0644, NULL); ATF_REQUIRE_MSG(pfh != NULL, "pidfile_open: %s", strerror(errno)); - ATF_REQUIRE_EQ(pidfile_write(pfh), 0); - ATF_REQUIRE_EQ(pidfile_close(pfh), 0); + ATF_REQUIRE_EQ(0, pidfile_write(pfh)); + ATF_REQUIRE_EQ(0, pidfile_close(pfh)); bzero(argv, sizeof(argv)); argv[0] = execname; @@ -348,9 +350,9 @@ setup(struct sockaddr_storage *to, uint16_t idx) if (s_flag) argv[argv_idx++] = s_flag_str; argv[argv_idx++] = pwd; - ATF_REQUIRE_EQ(dup2(server_s, STDOUT_FILENO), STDOUT_FILENO); - ATF_REQUIRE_EQ(dup2(server_s, STDIN_FILENO), STDIN_FILENO); - ATF_REQUIRE_EQ(dup2(server_s, STDERR_FILENO), STDERR_FILENO); + ATF_REQUIRE_EQ(STDOUT_FILENO, dup2(server_s, STDOUT_FILENO)); + ATF_REQUIRE_EQ(STDIN_FILENO, dup2(server_s, STDIN_FILENO)); + ATF_REQUIRE_EQ(STDERR_FILENO, dup2(server_s, STDERR_FILENO)); execv(execname, argv); atf_tc_fail("exec failed"); break; @@ -358,14 +360,14 @@ setup(struct sockaddr_storage *to, uint16_t idx) /* In parent */ bzero(to, sizeof(*to)); if (protocol == PF_INET) { - struct sockaddr_in *to4 = (struct sockaddr_in*)to; + struct sockaddr_in *to4 = (struct sockaddr_in *)to; to4->sin_len = sizeof(*to4); to4->sin_family = PF_INET; to4->sin_port = htons(port); to4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); } else { struct in6_addr loopback = IN6ADDR_LOOPBACK_INIT; - struct sockaddr_in6 *to6 = (struct sockaddr_in6*)to; + struct sockaddr_in6 *to6 = (struct sockaddr_in6 *)to; to6->sin6_len = sizeof(*to6); to6->sin6_family = PF_INET6; to6->sin6_port = htons(port); @@ -393,7 +395,7 @@ write_all(int fd, const void *buf, size_t nbytes) r = write(fd, buf, nbytes); ATF_REQUIRE(r > 0); nbytes -= (size_t)r; - buf = (const char*)buf + (size_t)r; + buf = (const char *)buf + (size_t)r; } } @@ -433,13 +435,13 @@ TFTPD_TC_DEFINE(abspath,) */ TFTPD_TC_DEFINE(dotdot,) { - ATF_REQUIRE_EQ(mkdir("subdir", 0777), 0); + ATF_REQUIRE_EQ(0, mkdir("subdir", 0777)); SEND_RRQ("../disallowed.txt", "octet"); RECV_ERROR(2, "Access violation"); - s = setup(&addr, __COUNTER__); \ + s = setup(&addr, __COUNTER__); SEND_RRQ("subdir/../../disallowed.txt", "octet"); RECV_ERROR(2, "Access violation"); - s = setup(&addr, __COUNTER__); \ + s = setup(&addr, __COUNTER__); SEND_RRQ("/etc/passwd", "octet"); RECV_ERROR(2, "Access violation"); } @@ -447,8 +449,9 @@ TFTPD_TC_DEFINE(dotdot,) /* * With "-s", tftpd should chroot to the specified directory */ -TFTPD_TC_DEFINE(s_flag, atf_tc_set_md_var(tc, "require.user", "root");, - s_flag = true) +TFTPD_TC_DEFINE(s_flag, + atf_tc_set_md_var(tc, "require.user", "root");, + s_flag = true) { int fd; char contents[] = "small"; @@ -505,7 +508,7 @@ TFTPD_TC_DEFINE(rrq_dropped_data,) close(fd); SEND_RRQ("medium.txt", "octet"); - recv_data(1, (const char*)&contents[0], 512); + recv_data(1, (const char *)&contents[0], 512); send_ack(1); (void) recvfrom(s, buffer, sizeof(buffer), 0, NULL, NULL); /* @@ -513,7 +516,7 @@ TFTPD_TC_DEFINE(rrq_dropped_data,) * Eventually, client should resend the last ACK */ send_ack(1); - recv_data(2, (const char*)&contents[128], 256); + recv_data(2, (const char *)&contents[128], 256); send_ack(2); } @@ -535,11 +538,11 @@ TFTPD_TC_DEFINE(rrq_duped_ack,) close(fd); SEND_RRQ("medium.txt", "octet"); - recv_data(1, (const char*)&contents[0], 512); + recv_data(1, (const char *)&contents[0], 512); send_ack(1); send_ack(1); /* Dupe an ACK packet */ - recv_data(2, (const char*)&contents[128], 256); - recv_data(2, (const char*)&contents[128], 256); + recv_data(2, (const char *)&contents[128], 256); + recv_data(2, (const char *)&contents[128], 256); send_ack(2); } @@ -593,9 +596,9 @@ TFTPD_TC_DEFINE(rrq_medium,) close(fd); SEND_RRQ("medium.txt", "octet"); - recv_data(1, (const char*)&contents[0], 512); + recv_data(1, (const char *)&contents[0], 512); send_ack(1); - recv_data(2, (const char*)&contents[128], 256); + recv_data(2, (const char *)&contents[128], 256); send_ack(2); } @@ -620,8 +623,8 @@ TFTPD_TC_DEFINE(rrq_medium_window,) SEND_RRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); recv_oack(options, sizeof(options) - 1); send_ack(0); - recv_data(1, (const char*)&contents[0], 512); - recv_data(2, (const char*)&contents[128], 256); + recv_data(1, (const char *)&contents[0], 512); + recv_data(2, (const char *)&contents[128], 256); send_ack(2); } @@ -764,13 +767,13 @@ TFTPD_TC_DEFINE(unknown_modes,) { SEND_RRQ("foo.txt", "ascii"); /* Misspelling of "ascii" */ RECV_ERROR(4, "Illegal TFTP operation"); - s = setup(&addr, __COUNTER__); \ + s = setup(&addr, __COUNTER__); SEND_RRQ("foo.txt", "binary"); /* Obsolete. Use "octet" instead */ RECV_ERROR(4, "Illegal TFTP operation"); - s = setup(&addr, __COUNTER__); \ + s = setup(&addr, __COUNTER__); SEND_RRQ("foo.txt", "en_US.UTF-8"); RECV_ERROR(4, "Illegal TFTP operation"); - s = setup(&addr, __COUNTER__); \ + s = setup(&addr, __COUNTER__); SEND_RRQ("foo.txt", "mail"); /* Obsolete in RFC-1350 */ RECV_ERROR(4, "Illegal TFTP operation"); } @@ -830,14 +833,14 @@ TFTPD_TC_DEFINE(wrq_dropped_ack,) SEND_WRQ("medium.txt", "octet"); recv_ack(0); - send_data(1, (const char*)&contents[0], 512); + send_data(1, (const char *)&contents[0], 512); /* * Servers "sends" an ACK packet, but network drops it. * Eventually, server should resend the last ACK */ (void) recvfrom(s, buffer, sizeof(buffer), 0, NULL, NULL); recv_ack(1); - send_data(2, (const char*)&contents[128], 256); + send_data(2, (const char *)&contents[128], 256); recv_ack(2); fd = open("medium.txt", O_RDONLY); @@ -845,7 +848,7 @@ TFTPD_TC_DEFINE(wrq_dropped_ack,) r = read(fd, buffer, sizeof(buffer)); ATF_REQUIRE(r > 0); close(fd); - require_bufeq((const char*)contents, 768, buffer, (size_t)r); + require_bufeq((const char *)contents, 768, buffer, (size_t)r); } /* @@ -902,11 +905,11 @@ TFTPD_TC_DEFINE(wrq_duped_data,) SEND_WRQ("medium.txt", "octet"); recv_ack(0); - send_data(1, (const char*)&contents[0], 512); - send_data(1, (const char*)&contents[0], 512); + send_data(1, (const char *)&contents[0], 512); + send_data(1, (const char *)&contents[0], 512); recv_ack(1); recv_ack(1); - send_data(2, (const char*)&contents[128], 256); + send_data(2, (const char *)&contents[128], 256); recv_ack(2); fd = open("medium.txt", O_RDONLY); @@ -914,7 +917,7 @@ TFTPD_TC_DEFINE(wrq_duped_data,) r = read(fd, buffer, sizeof(buffer)); ATF_REQUIRE(r > 0); close(fd); - require_bufeq((const char*)contents, 768, buffer, (size_t)r); + require_bufeq((const char *)contents, 768, buffer, (size_t)r); } /* @@ -969,9 +972,9 @@ TFTPD_TC_DEFINE(wrq_medium,) SEND_WRQ("medium.txt", "octet"); recv_ack(0); - send_data(1, (const char*)&contents[0], 512); + send_data(1, (const char *)&contents[0], 512); recv_ack(1); - send_data(2, (const char*)&contents[128], 256); + send_data(2, (const char *)&contents[128], 256); recv_ack(2); fd = open("medium.txt", O_RDONLY); @@ -979,7 +982,7 @@ TFTPD_TC_DEFINE(wrq_medium,) r = read(fd, buffer, sizeof(buffer)); ATF_REQUIRE(r > 0); close(fd); - require_bufeq((const char*)contents, 768, buffer, (size_t)r); + require_bufeq((const char *)contents, 768, buffer, (size_t)r); } /* @@ -1003,8 +1006,8 @@ TFTPD_TC_DEFINE(wrq_medium_window,) SEND_WRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); recv_oack(options, sizeof(options) - 1); - send_data(1, (const char*)&contents[0], 512); - send_data(2, (const char*)&contents[128], 256); + send_data(1, (const char *)&contents[0], 512); + send_data(2, (const char *)&contents[128], 256); recv_ack(2); fd = open("medium.txt", O_RDONLY); @@ -1012,7 +1015,7 @@ TFTPD_TC_DEFINE(wrq_medium_window,) r = read(fd, buffer, sizeof(buffer)); ATF_REQUIRE(r > 0); close(fd); - require_bufeq((const char*)contents, 768, buffer, (size_t)r); + require_bufeq((const char *)contents, 768, buffer, (size_t)r); } /* @@ -1107,8 +1110,8 @@ TFTPD_TC_DEFINE(wrq_truncate,) send_data(1, NULL, 0); recv_ack(1); - ATF_REQUIRE_EQ(stat("small.txt", &sb), 0); - ATF_REQUIRE_EQ(sb.st_size, 0); + ATF_REQUIRE_EQ(0, stat("small.txt", &sb)); + ATF_REQUIRE_EQ(0, sb.st_size); } /* From nobody Thu Apr 25 18:36: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 4VQPhB6NMnz5JJDW; Thu, 25 Apr 2024 18:36: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQPhB4nTVz4YRH; Thu, 25 Apr 2024 18:36:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714070186; 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=W9vJ/Ra0qJsBgjjaD+snGmOXN7Y0L5B7Usowu67fC/E=; b=hx3qaDLi5sgub4rlgtj9YfQiuiWIY+38E4yc6lOKbBPNM1MBQRc6eNT0/uqeFE6WeoAZWA EnF/yie4IlI5629WOeCpO87XPI+7zOAOLkaoxcJXJt7WpGK5EQT23D3g6ViZEU0/FamYqM U52n10+JcpTdEzyxlZyF38c1H6LhVgfnKzsISuuYbGMVy8uoO+PmS8xSvTqoAvxgebm9ly jH7hRx2HSiH8MM4uJfMVyAFEszGYsbS9z+ZdekEZccdLDtTFDZnUbqM+jrkNeYx01Q++TY rFGlzDivXq+Wy3AuCxp15aVJJuiTSAxCZ546hOvi68vvy4C2NvrMXqGk4KdKMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714070186; a=rsa-sha256; cv=none; b=us+Cr9bSQuJp8DYweuTgXxRW07NnfjRY9Fq0zziRvhXYBbJl8U3TvjiWdelZ8GhCFw/94t 719OHIWHuX0eUnGbIsE2SfbSeh4eKO768MBa4iBhmm4pGuOWH7LrMijWuNIXAd0xqvJPLi 7j0G8Yae1H7G7gF+GjBmmAa1SPfwoy1lbF7qeJWhWlLFiCANY+9RPePBvMjCttHx3RMjJc X95YSgME8sbOrdv2U4bWMtrAoxBbhCVO07Pp2Z9ORIK/OJSbcu6f1XjV8ADnQbUTbdaSA/ bKhnPvhxN6gUt4vUhQTxRX/V531+BmGqZgZHFD0ExYxKhMibTCC8cRaMNBmKlA== 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=1714070186; 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=W9vJ/Ra0qJsBgjjaD+snGmOXN7Y0L5B7Usowu67fC/E=; b=LE3DN1h6D00gLIA2yCk2WRFNyMEAH3RvKqkUHyHcf8vWcLE3xYW9Wk8lEEbti+PAnN17r4 CNkHqsZRurH5Y+Z/d3SQ77OP3k5uniYktZY61NSFH10Tn8GcRIJaCqYyr3AJShpWnBLA1f cMwXrlWjmnuJNO/7XP3tdgE2fgsR79SDRqvTAUfFgO8nRPPNVRlcIhHp6kTjVyp0cqwrjc W0pvnCcJvVVzVYS/pVD5vZXAap8tl3WVG60eKyQkK6fOD4yu0mmvV8Cla5zVj/rBhqsiyd tt+NCC0KA+Z0M399IgKnRIQCdyW1CX6X0hLbaszQhJMaLnAXnLUFBOnqBrYznA== 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 4VQPhB3YrLz19BS; Thu, 25 Apr 2024 18:36:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PIaQVP032875; Thu, 25 Apr 2024 18:36:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PIaQYn032872; Thu, 25 Apr 2024 18:36:26 GMT (envelope-from git) Date: Thu, 25 Apr 2024 18:36:26 GMT Message-Id: <202404251836.43PIaQYn032872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 83a6e984ac01 - main - tftpd: Check the server status after each 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83a6e984ac01657819418746f722163367ec30db Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=83a6e984ac01657819418746f722163367ec30db commit 83a6e984ac01657819418746f722163367ec30db Author: Dag-Erling Smørgrav AuthorDate: 2024-04-25 18:35:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-04-25 18:36:13 +0000 tftpd: Check the server status after each test. * In the setup phase, wait for the server to start (or fail to start) before proceeding with the test. This makes it possible to write test cases that don't expect a response from the server without ending up in a race over the server PID file. * After running each test, wait up to 30 seconds for the server to exit and check that the exit status matches what the test case says to expect (usually 0). * We still kill and collect the server in the cleanup phase, in case the test ended early. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44956 --- libexec/tftpd/tests/functional.c | 44 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c index bbe4f3782192..3b70962854ba 100644 --- a/libexec/tftpd/tests/functional.c +++ b/libexec/tftpd/tests/functional.c @@ -208,11 +208,14 @@ ATF_TC_HEAD(name ## _v4, tc) \ } \ ATF_TC_BODY(name ## _v4, tc) \ { \ + int exitcode = 0; \ __VA_ARGS__; \ protocol = AF_INET; \ s = setup(&addr, __COUNTER__); \ name ## _body(); \ close(s); \ + if (exitcode >= 0) \ + check_server(exitcode); \ } \ ATF_TC_CLEANUP(name ## _v4, tc) \ { \ @@ -225,11 +228,14 @@ ATF_TC_HEAD(name ## _v6, tc) \ } \ ATF_TC_BODY(name ## _v6, tc) \ { \ + int exitcode = 0; \ __VA_ARGS__; \ protocol = AF_INET6; \ s = setup(&addr, __COUNTER__); \ name ## _body(); \ close(s); \ + if (exitcode >= 0) \ + check_server(exitcode); \ } \ ATF_TC_CLEANUP(name ## _v6, tc) \ { \ @@ -244,6 +250,33 @@ name ## _body(void) ATF_TP_ADD_TC(tp, name ## _v6); \ } while (0) +static void +sigalrm(int signo __unused) +{ +} + +/* Check that server exits with specific exit code */ +static void +check_server(int exitcode) +{ + struct sigaction sa = { .sa_handler = sigalrm }; + struct itimerval it = { .it_value = { .tv_sec = 30 } }; + FILE *f; + pid_t pid; + int wstatus; + + f = fopen(pidfile, "r"); + ATF_REQUIRE(f != NULL); + ATF_REQUIRE_INTEQ(1, fscanf(f, "%d", &pid)); + ATF_CHECK_INTEQ(0, fclose(f)); + ATF_REQUIRE_INTEQ(0, sigaction(SIGALRM, &sa, NULL)); + ATF_REQUIRE_EQ(0, setitimer(ITIMER_REAL, &it, NULL)); + ATF_REQUIRE_EQ(pid, waitpid(pid, &wstatus, 0)); + ATF_CHECK(WIFEXITED(wstatus)); + ATF_CHECK_INTEQ(exitcode, WEXITSTATUS(wstatus)); + unlink(pidfile); +} + /* Standard cleanup used by all testcases */ static void cleanup(void) @@ -254,12 +287,12 @@ cleanup(void) f = fopen(pidfile, "r"); if (f == NULL) return; + unlink(pidfile); if (fscanf(f, "%d", &pid) == 1) { kill(pid, SIGTERM); waitpid(pid, NULL, 0); } fclose(f); - unlink(pidfile); } /* Assert that two binary buffers are identical */ @@ -299,6 +332,9 @@ setup(struct sockaddr_storage *to, uint16_t idx) struct pidfh *pfh; uint16_t port = BASEPORT + idx; socklen_t len; + int pd[2]; + + ATF_REQUIRE_EQ(0, pipe2(pd, O_CLOEXEC)); if (protocol == PF_INET) { len = sizeof(addr4); @@ -358,6 +394,10 @@ setup(struct sockaddr_storage *to, uint16_t idx) break; default: /* In parent */ + ATF_REQUIRE_INTEQ(0, close(pd[1])); + /* block until other end is closed on exec() or exit() */ + ATF_REQUIRE_INTEQ(0, read(pd[0], &pd[1], sizeof(pd[1]))); + ATF_REQUIRE_INTEQ(0, close(pd[0])); bzero(to, sizeof(*to)); if (protocol == PF_INET) { struct sockaddr_in *to4 = (struct sockaddr_in *)to; @@ -374,7 +414,7 @@ setup(struct sockaddr_storage *to, uint16_t idx) to6->sin6_addr = loopback; } - close(server_s); + ATF_REQUIRE_INTEQ(0, close(server_s)); ATF_REQUIRE((client_s = socket(protocol, SOCK_DGRAM, 0)) > 0); break; } From nobody Thu Apr 25 18:36: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 4VQPhD04vSz5JJBK; Thu, 25 Apr 2024 18:36: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQPhC56ljz4YXP; Thu, 25 Apr 2024 18:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714070187; 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=k80qAh0Bf21vaCQrJ61OwzBRiPVaM0P/MM4aY2o8YaI=; b=db38KYzgMhkCmGo+kU0E8x1KkWF1MoKgTSHjULxmQteNu0wS87RxJ9DfEgCXN740iWqOWj 9rmy/3AV7MLAzRFWvbm9c+c4W91TvXPFjOUNbeQsGDone+QwP8UwQm5He5B1+ZQ5mrLV2m AeuXMBzC1Y4m45nFwBlIkVcBTaVIHbbgghzNpHCkptFI+gfZ/kdiwC3ORfLoFHLojYN4vv cGZOMaEXPmbjscPtChyGNmxdM8DdksAl4ar86q71h2Vrmo2KjvqkU9Es94cnMO/vEyQ0Sd lQdJ2HvCedNrSV9ucQzfkRpOuhR5fLiYgIAARRC5c6W7EXMgeKOkf3q6FE5qyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714070187; a=rsa-sha256; cv=none; b=naDdBDOR3WNq2zfERBfQ7aLvkoBXkzV4SAwpQQ6NVx5IYCldnsFBEa7yidorogCQZHHj6Z STsWFLpdSOXxWPZSzVAMuYC5YyLXFhonSMDQgu3SFMvidk6iCZmP7nYjWYt79190tXl8fE NsUMcNzk1HgJuCPwGTzMBANhIabHr5g+t3iXN/j26mg/CZPKYluTbMPIz4TJJtLzb0d+QH 0wb2MQwRNnPGGBKx+daZ3JYx8jNQqxQZbOMndXf430BC5WaqRdCBHWwRJTh1KfeWEReXxO dIAxWEMLnGvGOFCnPF5JlXiYwx80GOwIq+SxVEQNciw8by1Kcc54o9GhzjSddQ== 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=1714070187; 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=k80qAh0Bf21vaCQrJ61OwzBRiPVaM0P/MM4aY2o8YaI=; b=gXsDX5EA+fV4RT7tRORPfqtWc1+11kmb/5Uno/0hkd9WQGXOFf8k0gqjHBiQmr8LreiZXm Kt1+VNry6NgLYub9TXLeeVx+DBoxVsvEc+N5Vqp5mhnJiuGhFRRhzIXqOlECoONG4VV993 kjpvqYQK0uheysmCc+77LehMJp6TE5EqQOydc59IGgyE6+gcz0OuC/8KaenQqRzARHa4+3 iJPpxIptSj27gaWVMk+fKbxCBWMsMgAzaWpM88J07C+Kf5fON5d/kIfMsId6nJp1IH8d9L MP7io5keWZo0GDrICpL+hL0qtpPZOsSWVjgPhLPrIn6qKtp5BXciiBNGrnDPnw== 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 4VQPhC4bKSz18fd; Thu, 25 Apr 2024 18:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PIaRGs032934; Thu, 25 Apr 2024 18:36:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PIaRJ0032931; Thu, 25 Apr 2024 18:36:27 GMT (envelope-from git) Date: Thu, 25 Apr 2024 18:36:27 GMT Message-Id: <202404251836.43PIaRJ0032931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 9f231af307b8 - main - tftpd: Immediately reject any request shorter than 4 bytes. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f231af307b80eb222d9761bbd81fa4e130bb3d7 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9f231af307b80eb222d9761bbd81fa4e130bb3d7 commit 9f231af307b80eb222d9761bbd81fa4e130bb3d7 Author: Dag-Erling Smørgrav AuthorDate: 2024-04-25 18:35:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-04-25 18:36:13 +0000 tftpd: Immediately reject any request shorter than 4 bytes. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44957 --- libexec/tftpd/tests/functional.c | 19 +++++++++++++++++++ libexec/tftpd/tftpd.c | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c index 3b70962854ba..d3d2f46ffdee 100644 --- a/libexec/tftpd/tests/functional.c +++ b/libexec/tftpd/tests/functional.c @@ -1219,6 +1219,22 @@ TFTPD_TC_DEFINE(wrq_window_rfc7440,) require_bufeq(contents, sizeof(contents), buffer, (size_t)r); } +/* + * Send less than four bytes + */ +TFTPD_TC_DEFINE(short_packet1, /* no head */, exitcode = 1) +{ + SEND_STR("\1"); +} +TFTPD_TC_DEFINE(short_packet2, /* no head */, exitcode = 1) +{ + SEND_STR("\1\2"); +} +TFTPD_TC_DEFINE(short_packet3, /* no head */, exitcode = 1) +{ + SEND_STR("\1\2\3"); +} + /* * Main @@ -1256,6 +1272,9 @@ ATF_TP_ADD_TCS(tp) TFTPD_TC_ADD(tp, wrq_small); TFTPD_TC_ADD(tp, wrq_truncate); TFTPD_TC_ADD(tp, wrq_window_rfc7440); + TFTPD_TC_ADD(tp, short_packet1); + TFTPD_TC_ADD(tp, short_packet2); + TFTPD_TC_ADD(tp, short_packet3); return (atf_no_error()); } diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index 45e7344c86ed..13f53024b147 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -228,6 +228,11 @@ main(int argc, char *argv[]) } getnameinfo((struct sockaddr *)&peer_sock, peer_sock.ss_len, peername, sizeof(peername), NULL, 0, NI_NUMERICHOST); + if ((size_t)n < 4 /* tftphdr */) { + tftp_log(LOG_ERR, "Rejecting %zd-byte request from %s", + n, peername); + exit(1); + } /* * Now that we have read the message out of the UDP From nobody Thu Apr 25 18:57:35 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 4VQQ8d2CRKz5JKk7 for ; Thu, 25 Apr 2024 18:57:37 +0000 (UTC) (envelope-from 0100018f169ec815-80f7f8e3-93d0-4e1e-810b-b808d0910c85-000000@amazonses.com) Received: from a8-60.smtp-out.amazonses.com (a8-60.smtp-out.amazonses.com [54.240.8.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQQ8c41rrz4d4T for ; Thu, 25 Apr 2024 18:57:36 +0000 (UTC) (envelope-from 0100018f169ec815-80f7f8e3-93d0-4e1e-810b-b808d0910c85-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tarsnap.com header.s=dqtolf56kk3wpt62c3jnwboqvr7iedax header.b="cD/SNeba"; dkim=pass header.d=amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=KTVMKIoj; dmarc=pass (policy=none) header.from=tarsnap.com; spf=pass (mx1.freebsd.org: domain of 0100018f169ec815-80f7f8e3-93d0-4e1e-810b-b808d0910c85-000000@amazonses.com designates 54.240.8.60 as permitted sender) smtp.mailfrom=0100018f169ec815-80f7f8e3-93d0-4e1e-810b-b808d0910c85-000000@amazonses.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=dqtolf56kk3wpt62c3jnwboqvr7iedax; d=tarsnap.com; t=1714071455; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=4nMNlHrF+1t4SWhNHUMLYqyk2b+HQNFibs2i3BVpyeU=; b=cD/SNebaUQ/Za9q4CMCpry1EdLtsP0BJbhfjYYQLPKDHTxTnQYqfGDDcnL67DwkB lR95gF6cKHU5CwYMcsOY6/Ls/Ypohk/yJFEq+Z0MUvDq86jq94DZm0m9h6MyVS0axkM sd9JZAM1WHyWUejrk7LOKQjbHsDQiG+5ermLlJts= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1714071455; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=4nMNlHrF+1t4SWhNHUMLYqyk2b+HQNFibs2i3BVpyeU=; b=KTVMKIojf6KYoP9sDcYv9wW80MG9XZuBIWrIZT8EvqJJlJKfmsgMTPgYIfLhSqSI UZD6uww/cyPcvx17+HmjG+zCMwFfOa5luhC4tMAdqsSWGqyMZAu5EvkSD2+2LIojOJM +k3dy46al+yUdwc3kV+kiifFnkaFfv3/aSwxo+Ew= Message-ID: <0100018f169ec815-80f7f8e3-93d0-4e1e-810b-b808d0910c85-000000@email.amazonses.com> Date: Thu, 25 Apr 2024 18:57:35 +0000 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: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, =?UTF-8?Q?Klaus_K=C3=BCchemann?= References: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> Content-Language: en-US From: Colin Percival Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93mnazEvh+x99vGYZnGKeJ8NDOF4QCUzeHquOWxDi8Zl reXyswKcrIquPxxX6+YyGe97VbvLnez3ksfzOYRj1F4qV0Rq8ZNK51+bvIrbcS3SfDaRioAk D7WWwFor8y/hSwxYkfsKbtP5PRcem20JUxuC085zqWLaKv5t5n2CBzAGMjwJaQ3tM3AXVwWJ uJaHA6ot/6fntJlmkfcyCYyyr0D6b0guRj3STbZ2hNn5o2AI+f6LJJ31s2sPFjl6rs7fORf3 hFSNOHDd2HxfVBXFdQy24ROkC4orBBz2xh9GScjxxT/hbXkfufkubFubw7n0HkvHzA3UF+Qq A8JiI3n+d7ocsP0/5BQ2sZdeqPGJgHx6RkAMuW1tJ29wSvCN1qMgFwhYkpQdfvHlociQrimU fvlRfSrBEe8o7tvIuEdpvwvCZSTJqQbVoMw8UHFE7nzyCXUSab5h6PbjakCqim13ekVO2KFF TTPcz5o5jEeUY75tzbIwcDfFbT5KqNjWy06TVdM9VEJDHSfOfxHR3kSEwZ+tT2aTvL3grsUn gFwSNcj4Cl4CRFfUw8zVZY+7O7RiMlhBqykikvUurrdGKc1Scwa0yuppdA6eVvylyTWSQGrQ +uLWtV1LUKN7ZqKJWBkLPt9nS4XZWGyBvxOHYqjOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2024.04.25-54.240.8.60 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.59 / 15.00]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[tarsnap.com,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[54.240.8.60:from]; FORGED_SENDER(0.30)[cperciva@tarsnap.com,0100018f169ec815-80f7f8e3-93d0-4e1e-810b-b808d0910c85-000000@amazonses.com]; R_SPF_ALLOW(-0.20)[+ip4:54.240.0.0/18]; R_DKIM_ALLOW(-0.20)[tarsnap.com:s=dqtolf56kk3wpt62c3jnwboqvr7iedax,amazonses.com:s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[54.240.8.60:from]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US]; DKIM_TRACE(0.00)[tarsnap.com:+,amazonses.com:+]; RCVD_COUNT_ZERO(0.00)[0]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[FreeBSD.org,googlemail.com]; FROM_NEQ_ENVFROM(0.00)[cperciva@tarsnap.com,0100018f169ec815-80f7f8e3-93d0-4e1e-810b-b808d0910c85-000000@amazonses.com]; DWL_DNSWL_NONE(0.00)[amazonses.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4VQQ8c41rrz4d4T On 4/19/24 16:11, Warner Losh wrote: > add dtb support for RPI CM4, CM4s, CM4_ioBoard > > Signed-off-by: Klaus Küchemann > Reviewed by: imp > Pull Request: https://github.com/freebsd/freebsd-src/pull/1182 > --- > --- a/release/arm64/RPI.conf > +++ b/release/arm64/RPI.conf > -DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" > +DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb bcm2710-rpi-cm3.dtb \ > + bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb bcm2711-rpi-cm4s.dtb" This broke the RPI release build, since bcm2711-rpi-cm4s.dtb doesn't exist. Is it provided by a port which we should add to the RPI build? -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Thu Apr 25 19:24: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 4VQQlV4qRHz5JNXW for ; Thu, 25 Apr 2024 19:24:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQQlT4HX5z4hJt for ; Thu, 25 Apr 2024 19:24:21 +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=Ps8aKA7j; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::130) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5176f217b7bso2493129e87.0 for ; Thu, 25 Apr 2024 12:24:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1714073060; x=1714677860; 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=swH1JWODvoD/36RjSda6oNaGH0F32FDjFPpJBirpj2k=; b=Ps8aKA7jIAv/oEFfH5jMtiWUhSYDWnbhR5MWSGC/jcJjHj0eaoV2mGTIsRv3MCKoML SiokG2yVwyA68GMnZhz7s8Uitu57KwEYxpP69aK6tIt9GAAjP428DJ3lvcSvH7UNsJgf MJqS3ErPygWrrjN7NiWA8TMAkU7+53wKbb+lLbUG9yEXM7GHCo2AvG6dif6QNc61Gz0W yZmHx47ZILINfpteKtGaMwPYaDeOsaCz1x5+fN+ToA9Tg1NwHjE9wQAM5VHFxGclgu/V G/FC6upxhPG1LlpOIReBejP7LnFPEtpeFVA/0CWAsuZPzOGhbigeKce6PHqsIcGczdSM Wdig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714073060; x=1714677860; 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=swH1JWODvoD/36RjSda6oNaGH0F32FDjFPpJBirpj2k=; b=khuQ2OpJ65FKGZ4bSgge6uaoD67FR5plLDrvxTDBUM2JHKrOb/Db9vtRm5XvIQCYL7 WkUpSFZPE6iHl2wbbgBCMhjd3UYBSajInTjj6WrGt7orLREQxjhAQ+qWyX7SXP7Xfw5C VeArwwnognEdW8j1UesYJGbWU4ySkYXVYy/5nqCvLkSxhAFNcMX68CQKAFKHGdxWq1RX eMDpB8wCT1lVQoQHT6louqC87uK+xpdU6Ky3JysmKQ4hDeljpTeH/7ZP1lM0iytHKsB8 Ek+wrakmGQgT9LufNYtu4aXWyTVXSSbnowQjBSASoKMzEmnTXA198+RxLMcgHkoIU2de mgHw== X-Forwarded-Encrypted: i=1; AJvYcCUT59XUaGAyW/CxcTpaCHKBlAx8exQWM3EUDFnL2RR1sKAJ+CUXnWpOPxexM86ttM60ajQuxyZ5guWDVpy2VjU/HLcESiV9EmeKes02VHggjw== X-Gm-Message-State: AOJu0Yx30NZUWuqEWEyexhRYRkx1h8mqpIThilblOPIRv+SSS1BdG0pf P2tTGDZtWJ6r8lNO0nHhsvFm1FRjcV8RS9W3YEl3SePdQuAsWmUAJbctbdaGVEbJ7huBGr/6ArH CiWmWe3tk9PrSv+K52w4XDLg6t4q5HQ2P6gkM7A== X-Google-Smtp-Source: AGHT+IEgYIhocUMNmKs86CIn4yPiS2nyefoML0yPoCBRrLwLB0qaOwiCy+cxPpEujlDQrhYooszjcS6X8fWN8+DwW6k= X-Received: by 2002:a05:6512:329c:b0:51c:778f:b569 with SMTP id p28-20020a056512329c00b0051c778fb569mr230788lfe.29.1714073059566; Thu, 25 Apr 2024 12:24: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: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> In-Reply-To: <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> From: Warner Losh Date: Thu, 25 Apr 2024 13:24:07 -0600 Message-ID: Subject: Re: git: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard To: Colin Percival Cc: Warner Losh , src-committers , "" , "" , =?UTF-8?Q?Klaus_K=C3=BCchemann?= Content-Type: multipart/alternative; boundary="000000000000d5d9d10616f0bb74" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; 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:2a00:1450::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::130:from]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,googlemail.com]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4VQQlT4HX5z4hJt --000000000000d5d9d10616f0bb74 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 25, 2024, 12:57=E2=80=AFPM Colin Percival wrote: > On 4/19/24 16:11, Warner Losh wrote: > > add dtb support for RPI CM4, CM4s, CM4_ioBoard > > > > Signed-off-by: Klaus K=C3=BCchemann > > Reviewed by: imp > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1182 > > --- > > --- a/release/arm64/RPI.conf > > +++ b/release/arm64/RPI.conf > > -DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dt= b > bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" > > +DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dt= b > bcm2710-rpi-cm3.dtb \ > > + bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb > bcm2711-rpi-cm4s.dtb" > > This broke the RPI release build, since bcm2711-rpi-cm4s.dtb doesn't exis= t. > Is it provided by a port which we should add to the RPI build? > I thought it was in tree. I'll look into this and report back. Warner --=20 > Colin Percival > FreeBSD Release Engineering Lead & EC2 platform maintainer > Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoi= d > --000000000000d5d9d10616f0bb74 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Apr 25, 2024, 12:57=E2=80=AFPM Colin Percival = <cperciva@tarsnap.com> wr= ote:
On 4/19/24 16:11, Warner Losh = wrote:
>=C2=A0 =C2=A0 =C2=A0 add dtb support for RPI CM4, CM4s, CM4_ioBoard
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Signed-off-by: Klaus K=C3=BCchemann <mac= iphone2@googlemail.com>
>=C2=A0 =C2=A0 =C2=A0 Reviewed by: imp
>=C2=A0 =C2=A0 =C2=A0 Pull Request: ht= tps://github.com/freebsd/freebsd-src/pull/1182
> ---
> --- a/release/arm64/RPI.conf
> +++ b/release/arm64/RPI.conf
> -DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-p= lus.dtb bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb"
> +DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-p= lus.dtb bcm2710-rpi-cm3.dtb \
> +=C2=A0 =C2=A0 =C2=A0bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm271= 1-rpi-cm4.dtb bcm2711-rpi-cm4s.dtb"

This broke the RPI release build, since bcm2711-rpi-cm4s.dtb doesn't ex= ist.
Is it provided by a port which we should add to the RPI build?

I thought it = was in tree. I'll look into this and report back.=C2=A0

Warner=C2=A0
<= br>
--
Colin Percival
FreeBSD Release Engineering Lead & EC2 platform maintainer
Founder, Tarsnap | www.tarsnap.com | Online backups for the tru= ly paranoid
--000000000000d5d9d10616f0bb74-- From nobody Thu Apr 25 19:33:35 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 4VQQy75ncqz5JP8q; Thu, 25 Apr 2024 19:33:35 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQQy74z8Dz4jlW; Thu, 25 Apr 2024 19:33:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714073615; 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=cbku9ZNc7U2P5sy6evPDxjMMX5vsgDfT8baYueUTGT4=; b=su4Gua+zGDzd/php7Hz4+ou+R/xIKdlPFFXFctmETmWPLaoB9buVy3jhdIgYLErDFlmW1L dgEPaoN5zoJXxB7WnlJcgZYcpX42iZJP3E6KFnKO5nQaTL5LwVSfSxAgHR5DOz5Yi5I73q ZeLyoV6TjWk3Z0anCUYDNKugddtEZi67FQV/QdtVIP+85zjaFhOZKGcZwqhyJP1qwqfLQP tdK9br6xyXTVtNV80Ysszp2jTx4MSSlhEayrKJ6kY4KDdkdsTfJDjEg2uGIVZtS3w6KZdV f9sVas9is0EyWiMMUS1TCQD9FmzcAfLRk8COEjwPtuUK85FUMS8SaGtqgoWzFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714073615; a=rsa-sha256; cv=none; b=FcyMdfekOG72REJ5wbCs/HHX6/9YT/ucQ8011wXkil8MMvIB5lM1AsEuj3AHieedrzKmHG bvbyxwoucjAYJZEZK9vocB0+3pQEcWeQ/dNYOsShjpMG9Qxms6r/BfKnr+1dLd/3/rdZ0K uwYQIX/nf0q7zk9hBdT0Z/fCW5d+9F4h66X+no+MZ27GWsqLDcXzg9rDfRI7jjoyFpbhKS UbvniMjx2JW9SFpTFyGTdQQ1NgV80E3BJzojOcuZVBMq7TnKvSJxw6EkzylARWON832jAF Ofwu3SgWDkeQE5VMmmH8yEdZ0Z1JC8Q/yK+Vm0rWtMX6LLtgLCcqJ9oeK6LlSw== 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=1714073615; 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=cbku9ZNc7U2P5sy6evPDxjMMX5vsgDfT8baYueUTGT4=; b=gDCIb/7WKbMlqKygS40sw8s1QpCwIDHy73nCTdRr8ZD8O7dNRUco+CgEoA+AVqO3oPL8gB Gqs8sCoP4GGd8ft2u+YW9qxqePlobByImwBpvCQpATysKyJRyH/KCRE2Zr1hPWdZ3mJpYk k85RqIzGWpDmwPQgwuJ0w0X45Ga6VslYuLQ8XMWoqJ1dDVmG0H8xNFvh2Nf8k1mBFvl2Vo VnV7edV/HCHKiym+gHmxgQraJhQHo3xQ375ssVTj0L0f2ibmc2Y4/Iy59ZI6kL5cZAoAn4 CDa3LEBJmp5lZ1EpL8vM3OjPMTeV48KWQ1iWAhhumxrfpOca60QjeQmvcALCYQ== 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 4VQQy74L6Pz1BjL; Thu, 25 Apr 2024 19:33:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PJXZrl033697; Thu, 25 Apr 2024 19:33:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PJXZv3033694; Thu, 25 Apr 2024 19:33:35 GMT (envelope-from git) Date: Thu, 25 Apr 2024 19:33:35 GMT Message-Id: <202404251933.43PJXZv3033694@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: 8efba70d7914 - main - nfscl: Revert part of commit 196787f79e67 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: 8efba70d7914324890b1f8fe3079036eb2b5c3db Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=8efba70d7914324890b1f8fe3079036eb2b5c3db commit 8efba70d7914324890b1f8fe3079036eb2b5c3db Author: Rick Macklem AuthorDate: 2024-04-25 19:32:02 +0000 Commit: Rick Macklem CommitDate: 2024-04-25 19:32:02 +0000 nfscl: Revert part of commit 196787f79e67 Commit 196787f79e67 erroneously assumed that the client code for Open/Claim_deleg_cur_FH was broken, but it was not. It was actually wireshark that was broken and indicated that the correct XDR was bogus. This reverts the part of 196787f79e67 that changed the arguments for Open/Claim_deleg_cur_FH. Found during the IETF bakeathon testing event this week. MFC after: 3 days --- sys/fs/nfsclient/nfs_clrpcops.c | 33 ++++++++++----------------------- sys/fs/nfsclient/nfs_clstate.c | 23 +---------------------- sys/fs/nfsclient/nfsmount.h | 1 - 3 files changed, 11 insertions(+), 46 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 09660730d485..75bb5236cb65 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -561,34 +561,21 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen, *tl = txdr_unsigned(delegtype); } else { if (dp != NULL) { - if (NFSHASNFSV4N(nmp)) { + if (NFSHASNFSV4N(nmp)) *tl = txdr_unsigned( NFSV4OPEN_CLAIMDELEGATECURFH); - NFSLOCKMNT(nmp); - if ((nmp->nm_privflag & NFSMNTP_BUGGYFBSDSRV) != - 0) { - NFSUNLOCKMNT(nmp); - /* - * Add a stateID argument to make old - * broken FreeBSD NFSv4.1/4.2 servers - * happy. - */ - NFSM_BUILD(tl, uint32_t *,NFSX_STATEID); - *tl++ = 0; - *tl++ = dp->nfsdl_stateid.other[0]; - *tl++ = dp->nfsdl_stateid.other[1]; - *tl = dp->nfsdl_stateid.other[2]; - } else - NFSUNLOCKMNT(nmp); - } else { + else *tl = txdr_unsigned(NFSV4OPEN_CLAIMDELEGATECUR); - NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID); + NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID); + if (NFSHASNFSV4N(nmp)) + *tl++ = 0; + else *tl++ = dp->nfsdl_stateid.seqid; - *tl++ = dp->nfsdl_stateid.other[0]; - *tl++ = dp->nfsdl_stateid.other[1]; - *tl = dp->nfsdl_stateid.other[2]; + *tl++ = dp->nfsdl_stateid.other[0]; + *tl++ = dp->nfsdl_stateid.other[1]; + *tl = dp->nfsdl_stateid.other[2]; + if (!NFSHASNFSV4N(nmp)) (void)nfsm_strtom(nd, name, namelen); - } } else if (NFSHASNFSV4N(nmp)) { *tl = txdr_unsigned(NFSV4OPEN_CLAIMFH); } else { diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index ebc11efea637..9fbaa6e63a56 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -4512,7 +4512,6 @@ nfscl_tryopen(struct nfsmount *nmp, vnode_t vp, u_int8_t *fhp, int fhlen, { int error; struct nfscldeleg *dp; - bool try_busted_xdr; dp = *ndpp; do { @@ -4520,29 +4519,9 @@ nfscl_tryopen(struct nfsmount *nmp, vnode_t vp, u_int8_t *fhp, int fhlen, error = nfsrpc_openrpc(nmp, vp, fhp, fhlen, newfhp, newfhlen, mode, op, name, namelen, ndpp, reclaim, delegtype, cred, p, 0, 0); - try_busted_xdr = false; if (error == NFSERR_DELAY) (void) nfs_catnap(PZERO, error, "nfstryop"); - else if (error == NFSERR_EXPIRED && NFSHASNFSV4N(nmp) && - reclaim == 0 && dp != NULL) { - /* This case is a Claim_Deleg_Cur_FH Open. */ - NFSLOCKMNT(nmp); - if ((nmp->nm_privflag & NFSMNTP_BUGGYFBSDSRV) == 0) { - /* - * Old FreeBSD NFSv4.1/4.2 servers erroneously - * expect a stateID argument for Open - * Claim_Deleg_Cur_FH and interpret the - * Getattr reply as a stateID. This results - * in an NFSERR_EXPIRED failure. - * Setting NFSMNTP_BUGGYFBSDSRV makes the Open - * send a stateID, in violation of RFC8881. - */ - try_busted_xdr = true; - nmp->nm_privflag |= NFSMNTP_BUGGYFBSDSRV; - } - NFSUNLOCKMNT(nmp); - } - } while (error == NFSERR_DELAY || try_busted_xdr); + } while (error == NFSERR_DELAY); if (error == EAUTH || error == EACCES) { /* Try again using system credentials */ newnfs_setroot(cred); diff --git a/sys/fs/nfsclient/nfsmount.h b/sys/fs/nfsclient/nfsmount.h index 7571add27b9c..37b84a015dab 100644 --- a/sys/fs/nfsclient/nfsmount.h +++ b/sys/fs/nfsclient/nfsmount.h @@ -124,7 +124,6 @@ struct nfsmount { #define NFSMNTP_DELEGISSUED 0x00000400 #define NFSMNTP_NODEALLOCATE 0x00000800 #define NFSMNTP_FAKEROOTFH 0x00001000 -#define NFSMNTP_BUGGYFBSDSRV 0x00002000 /* New mount flags only used by the kernel via nmount(2). */ #define NFSMNT_TLS 0x00000001 From nobody Thu Apr 25 19:43: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 4VQR9m5wghz5JPsG for ; Thu, 25 Apr 2024 19:43:40 +0000 (UTC) (envelope-from 0100018f16c8f1f7-10b9583e-10d1-4f35-9fa2-3fb9f22d5070-000000@amazonses.com) Received: from a8-176.smtp-out.amazonses.com (a8-176.smtp-out.amazonses.com [54.240.8.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQR9m2Jlhz4l6p for ; Thu, 25 Apr 2024 19:43:40 +0000 (UTC) (envelope-from 0100018f16c8f1f7-10b9583e-10d1-4f35-9fa2-3fb9f22d5070-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=dqtolf56kk3wpt62c3jnwboqvr7iedax; d=tarsnap.com; t=1714074219; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=c5cCERB0YG2/hbCrQ6yHear7QfQs4YiBiaylerms5X0=; b=VEHanHTs9EdujtW/SF03ItGwwLrtmNdlYUjE5K0IGbKK54Jeb1mLeM8EbJeA7Y8p tQi4IdB+uC+u4SzDWTxY8aX5Q8Q2BIiU0QG1aLZYVRiKk8y/XquHNl0Ag/cNaPy/NNN KR9+tszUdhK/Kv6mzROvCHAO7EsoHJEONf2euHLs= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1714074219; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=c5cCERB0YG2/hbCrQ6yHear7QfQs4YiBiaylerms5X0=; b=GU0OemMpl5YEwd3ZDp3hjwGdiMYKgfMOhTCCjB1nQJeUkeCAqGerCsU5UfOjMg32 0PJRfMg9kDnpHbJNht19e06XAeHeJ+lMYE8j8j60VWFvR+Sx+B2pwa9eb5wYFtr2J95 vQgqwvpJHTnJ0nklVAPuWNJfYP+G85jcX0mq2GY8= Message-ID: <0100018f16c8f1f7-10b9583e-10d1-4f35-9fa2-3fb9f22d5070-000000@email.amazonses.com> Date: Thu, 25 Apr 2024 19:43:39 +0000 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: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard To: Warner Losh Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, =?UTF-8?Q?Klaus_K=C3=BCchemann?= References: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> Content-Language: en-US From: Colin Percival Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93mnazEvh+x99vGYZnGKeJ8NDOF4QCUzeHquOWxDi8Zl reXyswKcrIquPxxX6+YyGe97VbvLnez3ksfzOYRj1F4qV0Rq8ZNK51+bvIrbcS3SfDaRioAk D7WWwFor8y/hSwxYkfsKbtP5PRcem20JUxuC085zqWLaKv5t5n2CBzAGMjwJaQ3tM3AXVwWJ uJaHA6ot/6fntJlmkfcyCYyyr0D6b0guRj3STbZ2hNn5o2AI+f6LJJ31s2sPFjl6rs7fORf3 hFSNOHDd2HxfVBXFdQy24ROkC4orBBz2xh9GScjxxT/hbXkfufkubFubw7n0HkvHzA3UF+Qq A8JiI3n+d7ocsP0/5BQ2sZdeqPGJgHx6RkAMuW1tJ29wSvCN1qMgFwhYkpQdfvHlociQrimU fvlRfSrBEe8o7tvIuEdpvwvCZSTJqQbVoMw8UHFE7nzyCXUSab5h6PbjakCqim13ekVO2KFF TTPcz5o5jEeUY75tzbIwcDfFbT5KqNjWy06TVdM9VEJDHSfOfxHR3kSEwZ+tT2aTvL3grsUn gFwSNcj4Cl4CRFfUw8zVZY+7O7RiMlhBqykikvUurrdGKc1Scwa0yuppdA6eVvylyTWSQGrQ +uLWtV1LUKN7ZqKJWBkLPt9nS4XZWGyBvxOHYqjOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2024.04.25-54.240.8.176 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:14618, ipnet:54.240.8.0/21, country:US] X-Rspamd-Queue-Id: 4VQR9m2Jlhz4l6p On 4/25/24 12:24, Warner Losh wrote: > On Thu, Apr 25, 2024, 12:57 PM Colin Percival > wrote: > On 4/19/24 16:11, Warner Losh wrote: > >      add dtb support for RPI CM4, CM4s, CM4_ioBoard > > > >      Signed-off-by: Klaus Küchemann > > >      Reviewed by: imp > >      Pull Request: https://github.com/freebsd/freebsd-src/pull/1182 > > > --- > > --- a/release/arm64/RPI.conf > > +++ b/release/arm64/RPI.conf > > -DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb > bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" > > +DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb > bcm2710-rpi-cm3.dtb \ > > +     bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb > bcm2711-rpi-cm4s.dtb" > > This broke the RPI release build, since bcm2711-rpi-cm4s.dtb doesn't exist. > Is it provided by a port which we should add to the RPI build? > > I thought it was in tree. I'll look into this and report back. Entirely possible. The release-building code is trying to copy it from /usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb so if it's somewhere else we need to adjust that code. -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Thu Apr 25 20:01:20 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 4VQRZG09lXz5JRJ2; Thu, 25 Apr 2024 20:01:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQRZF6lrDz4nZc; Thu, 25 Apr 2024 20:01:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714075285; 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=WWnYOS+akd2uFpC9goFDk3FEjozeo4UPZkYhmPnPIHQ=; b=aoVjvkybx/qBid2luY98nYUeKpaaH5AvV+WWiaXaLOsPZW7dYxkVd0U85zFbzskwNODfsc GJyRwDHzVbl7ek2UqsGkeSmf+eCyJWmDKJo3CP5XKx3WdEkCG8VjkEv79+4vsLTsGUjV4l zdM/kKkXIWO+hf9MEKKrlfyUojxAinpVNWAyBNUMPnxSXhfGlIoB3gfh7XLdtUK3uFkbVD xfjay0cwY+yOnTXWrQV1+zDZV3yvBtHWVX1gaDq0+H5HOFIXnJO5pXT64BDSRBH4fuA/Td 4OEDTDyNQwfqPNwFflchQLQEzWe32WFTZaSAXSTbjKm6SKKh22BI1T/Psry1Kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714075285; a=rsa-sha256; cv=none; b=BH7C38uiGu6XLyL/SOvYZtqF6YPpkeJKNkOL5G6YW6NdUbi00rhrjEgvkqicR9DfgjaEPw npoLJo9ahI3A+0OCBVoQAIhU4bpbcuQhzHF8Oo8KdjBUg1nlun5yb1AIDzJ8+DI1MDqbch lbNv/RHe6IY9YrhX/vlroIOd5aPtlYdLL5Fylw332G6kFgvhTZOctr49mgTCsERhXEXjXn wVC2v84HfgMLyQjNnpz7d/p3tdJRm6mtRicdea2dDr720R4MfjaVq7eVHToZqfBQOTAITU EaUnKVxdIoNqx2nMLfKGTNtbwyJA9foxcMdgdshG8JxDM2F/+4cORA+Xo1dhzA== 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=1714075285; 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=WWnYOS+akd2uFpC9goFDk3FEjozeo4UPZkYhmPnPIHQ=; b=O/qB+uQLwIoh1ruYWsIWa+DARpDo1WnNEk6dyFAgaQ9no51JQGVdIp22miagqZ/qcIAfcy UEo9iiT1f1TBRn5TDagTejgf9xlU3814z8x8Hdx07KzC3Agth/C63atEhcNQ0ziFXPLaP/ M1wv6LbvsTPKzoZ4fmf6dvZs4NaK9s7NryVFze0GPKVnbwIgSQL6YiRgYrlNWFpsZLgtds aX6urNNf/Qv9ZV1xeRZGxrzCKd/8fuEkneA5IOWHbKrafm4VFMyobJfVHV2n87hygqVydN n5g6fJsmU42kCGOWAuOKKaBgAi5FALGBvylTmx35bGTspknyGFinYzhCbUBrMg== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VQRZC6kQSzh0s; Thu, 25 Apr 2024 20:01:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <7473b5ed-433b-4d51-8a23-cf6464eb4416@FreeBSD.org> Date: Thu, 25 Apr 2024 15:01:20 -0500 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: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard To: Colin Percival , Warner Losh Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, =?UTF-8?Q?Klaus_K=C3=BCchemann?= References: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> <0100018f16c8f23a-eacbe781-3f6e-4f02-9b4d-d26468364b1f-000000@email.amazonses.com> Content-Language: en-US From: Kyle Evans In-Reply-To: <0100018f16c8f23a-eacbe781-3f6e-4f02-9b4d-d26468364b1f-000000@email.amazonses.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/25/24 14:43, Colin Percival wrote: > On 4/25/24 12:24, Warner Losh wrote: >> On Thu, Apr 25, 2024, 12:57 PM Colin Percival > > wrote: >>     On 4/19/24 16:11, Warner Losh wrote: >>      >      add dtb support for RPI CM4, CM4s, CM4_ioBoard >>      > >>      >      Signed-off-by: Klaus Küchemann >     > >>      >      Reviewed by: imp >>      >      Pull Request: >> https://github.com/freebsd/freebsd-src/pull/1182 >>     >>      > --- >>      > --- a/release/arm64/RPI.conf >>      > +++ b/release/arm64/RPI.conf >>      > -DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb >> bcm2710-rpi-3-b-plus.dtb >>     bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" >>      > +DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb >> bcm2710-rpi-3-b-plus.dtb >>     bcm2710-rpi-cm3.dtb \ >>      > +     bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb >> bcm2711-rpi-cm4.dtb >>     bcm2711-rpi-cm4s.dtb" >> >>     This broke the RPI release build, since bcm2711-rpi-cm4s.dtb >> doesn't exist. >>     Is it provided by a port which we should add to the RPI build? >> >> I thought it was in tree. I'll look into this and report back. > > Entirely possible.  The release-building code is trying to copy it from > /usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb > so if it's somewhere else we need to adjust that code. > The rpi-firmware port is supposed to provide all .dtb used here, but we've never installed that one. It really shouldn't have been included in the list to begin with, but I guess if there's demand we should fix the port to include it. Thanks, Kyle Evans From nobody Thu Apr 25 21:19: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 4VQTJZ5VKSz5JZRm for ; Thu, 25 Apr 2024 21:19:42 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-21.consmr.mail.gq1.yahoo.com (sonic310-21.consmr.mail.gq1.yahoo.com [98.137.69.147]) (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 4VQTJY2S8jz3wrq for ; Thu, 25 Apr 2024 21:19:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=UGMrXv3u; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1714079978; bh=iJsh0UyuHHepNP+Y94zUeYudZVPaRB0HaCSmam0P2FE=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=UGMrXv3ubtIN6uSzgwlciCKmOivCtMgSvIIaoCder3qTGrFaOz+hyn3/Y/ILlKZwck6ox1aLEXi1ujxTODcVNa6iV7oMmoTT3vpfHjVi/5KcOWKAeRHC+bNllMYnk/wYea+wQS4P4cCUEr5pJyR3T1sdPnV88p0Q15DQa+u1bQ5Y9fzr2rlzzDYvEe7H8b5CgcEyJMmzaXvn1ZPpjoj9qrb0gJHKKB3DPgq73WzKT+82MEkh0MamXzmwn0FP8+hyflvVV2fbfGuFv+hd2AXpKkMHwk/teJLY7Uzrlz/E9oODGKgueFRB0ykYDh4fW1la9mBFS0o90vgXKIpAtaeENg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1714079978; bh=071NAPD0iNh6OBptmYYKNYEjXziAgfkxqsLK+PevWPB=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=qS6kWeGHTh8DTJiUMAsrgZqjJIZPb6ksdfKR15bwoNZSPnZygPYv5xXN7vi2v02Vc62He9fJSjqYLR2HFA6zEEpVtN1abV6bk/4HTvHsS3jfpl8FaeuPAKWbWvYbyrqgnFHvifmQKZ4Jw+83B2rY8d1157ijo9vbFb10HBk84bRDZyhfEtbu+3WrKxvBuwU0BTmRS80P7xP5IR0eR9jRq4bQ0gHb64kiSMUFgDCCbbnF+ap0NhHIfSt4IM+feKfqWyed8PFEVELMt1cqZFmzem/8i1BaLJCEYfeotRzBf91LX4k+bmyPrIbe6Na2D0rZbrZNCDDb46I923oiS4/SRg== X-YMail-OSG: 0pU9HeUVM1m.9YZpdP4W9qmDrwZHuPDq9MU9.iR3lMkmGvWFDr_i4Xz.wcNqSuS 2h86yJ7et87F5SGL1Lg11E4MqMFwfTXtTYzDhTCSTGbHN4NgI8yL1nqzRtHk4ku1nuxLKD3jzpSq _yw0W.bFuBFBVeA7TFS6Xr1qU2ajXD83PqaK_PM6rz3P4w_trwVBrgBDAAQa07twU3d28bUQHKUP yzF20jUQnbrF7Z13AMAEw95kRdwRxOUj96kH47unPO2PIndck.Uk5q4PYGm9WeJvb6aNmAJsXPWQ 0o3KrpURQbyzNiSl7b9uO6jGSbMzIq1nHFEvc6DFfmUNox2iR_XZkJm621Zx9aTSbwPbYYHBEj71 Qyy7XZOrf.WYmhwFF.9r3WgjfzR4__It4yesl8sNDIm2lNF.J165R4SezW5901ZJ_v5j6N6Gjs.Y O.wyC8Z8BAyxD.IHf.Yarb_d6ClfE0ItSeB6nAD0Ft8Zm.wImSA90y.YSmLczhXiKH_Wbec1mMiR nknWDAydLBwfqX_NPvQG6tPEYD8OHLhAwXOQkhdIWBdmhHgLzo7C2lj74HSQq7KgI4X_riukIVpf uuhPg_6ZVaYug3bxKdb04OKnM4eTwmLelKCRBmVxh4kFp3pdKiYWA.mC6VCfE4prWxbG7S11Gkrv Wud2ihS21o9g7KVb_2usd98yzlDUmCnLAIh8RPtmHgBx9G107TnOdLCijo7KN_G4PPTIpyJo1sgO VYwsJKN3ewc2Lm9U_NB.l3HZe7dTbq9jxWNBF1iOrPV8hOuSjcNzDzo_AewdydDAxdhMomr6jB_E YTPV33.5N8FMAO46IXP6g3GS4bAU1J7dC7PDT6MsbDsQ2AVG.AnMn40OS6LJ_BdaSP.1RWTh8gqj CwYF3Yl27.k67J.kD_uu8Q6WAj2Len0VZ0dJbzT77EwELYLfviUxSAbHnDDgiEhsW6tZk6_VUMnO yrKSmzBtRAoodkGftceaU1grXRXncMrgt97_gs4QihjXNztaSOXQbr5Vno.CqHVqspSvp0PEfzjj gemaxK5wxOnCcIEStFwMSBnYJOSR3orEi3XFwCDRccO3sHU_ED0upmcKmFB7C8DOfr4U9wvo50.I 1YdUHBfY8nTMdohkgXudWwTGfyy.kTI2mT9iAiK0a1PQ58Y_jQsxNMLWOS49DA28ccqhdGEZKuZk PMnw0Mgo0JDWeJBKP_ACI1Lhb7DynxpGfSMZhsuMEGVh6SFEKp_D0B8oE5Bff0SUOowAb0BetZrg EQP48pbkUf5gz3Uzv33mDl1Bgz8RrV7tv26LTQYn9jLw0haOoy4xIOISA9irYsYGCl2JamBmDf1t .OgPkGk67kXQlOiJKp1kdA3x_F.zyEUvt4U0wu7sN8sDJMSA74uxXqlqWlK8Lce7yE3Gzgtv6l2E Rc5kStfR9K1xD6jHbyXAwx4KaTmdl2qS44BhoVAjN8PgDUHxuL.8v6rukXwsaxp.TD1S0VzqFTlV sw8ICwpHAryjgRMXCQOTbtBHDjWdTcZnyivmjjJMfKL4rSxMw_oOofFNqolgM34mDiKVMRfG7Ptw QJHB7luqbVexYv.3IqC4nb0cUrOVWPTcaw28VB7LnA8Uw1ZKIAtIgnExjVJzd.E1Ye4WJfg1_Zia 88WAd.UGcx05IzmKkaFYGhXHgCOkXhXDGat43R4HUvJgD9xc74imshRVMwg3aEK4TmMjdV7iodr4 EwcHbryemaznocOSIl5EteoDfrPEABL5XRZliRIn2BhZOopaZlGlmmGpsmlpDqAL.wDQU0eHk9dL .9hVYZBn1JSZ4lu0dqxAs1AOuSU5AeVpF98Fnve7CSQV0hBMI3Y_phxWNZVQM79A8kR76P5PlKd6 4N6VmxeqN9KHSRGOQxPxzVf4cOpwj0soPkEpqvSRLxPsLzYvfopeyTuAlTFjwGXcqddFdkS1AdQP UiJWyXQJf89rWq8Q.UXMCm0aIe_1QjMb1k0mrt7fiu92cgFBxL6nheAkV5Tgsthsja9lcjmeLOPN 9.vDv311xwKRNgFUKv.3014e9ls8dsH.wgTDozAbCzTFtDlnNv7EUAA6RGnS3lbfUDDUBJ_0Mgsp 9iP1GGduc8bWFb.ose6sOGBh3KiZMn0xJmAT7bJV0TkAtsVHYgld_Z42WTS5xPwhR1v8X7aO8410 0iAj4LQUYHTN1Xf6nwwpMPqs5t1uQtonGpA.Pz0FK5JoL1ThzwReZrfHGtwYzo3FuKDUF0qmNdO. jV9cLqGTQ6rG1NdBfNCZIVlIl8YF5dPi9XdnPbMsTkY.N_N5Yk.2ChCQfi36cfQmCGTceCbg- X-Sonic-MF: X-Sonic-ID: 454c150d-2eec-4539-91a3-f2afe056e1f1 Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Thu, 25 Apr 2024 21:19:38 +0000 Received: by hermes--production-gq1-59c575df44-n6ttj (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 80d9ce43338db665727486c34721e2f9; Thu, 25 Apr 2024 21:19:34 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=utf-8 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.500.171.1.1\)) Subject: Re: git: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard Message-Id: <248053AE-9F94-4C60-BEA1-C19A22E7058C@yahoo.com> Date: Thu, 25 Apr 2024 14:19:23 -0700 To: Warner Losh , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3774.500.171.1.1) References: <248053AE-9F94-4C60-BEA1-C19A22E7058C.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.44 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.94)[-0.938]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.147:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.147:from] X-Rspamd-Queue-Id: 4VQTJY2S8jz3wrq Warner Losh wrote on Date: Thu, 25 Apr 2024 19:24:07 UTC : > On Thu, Apr 25, 2024, 12:57=E2=80=AFPM Colin Percival = wrote: >=20 > > On 4/19/24 16:11, Warner Losh wrote: > > > add dtb support for RPI CM4, CM4s, CM4_ioBoard > > > > > > Signed-off-by: Klaus K=C3=BCchemann > > > Reviewed by: imp > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1182 > > > --- > > > --- a/release/arm64/RPI.conf > > > +++ b/release/arm64/RPI.conf > > > -DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb > > bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" > > > +DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb > > bcm2710-rpi-cm3.dtb \ > > > + bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb > > bcm2711-rpi-cm4s.dtb" > > > > This broke the RPI release build, since bcm2711-rpi-cm4s.dtb doesn't = exist. > > Is it provided by a port which we should add to the RPI build? > > >=20 > I thought it was in tree. I'll look into this and report back. The upstream RPi* distributions do not use the linux mainstream *.dts* files but build their own *.dts* files and distribute the resultant *.dtb's directly. For RPi*'s, FreeBSD uses the *.dtb files from some RPI* distribution (via the rpi-firmware port). FreeBSD does not use the linux mainstream *.dts* files for RPi*'s: RPi*'s have a a different compatibility criteria applied compared to most of the Small Arm Boards. So: not in tree. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu Apr 25 21:43: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 4VQTrK2h32z5JcVC; Thu, 25 Apr 2024 21:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQTrK25Lrz41qY; Thu, 25 Apr 2024 21:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714081425; 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=DzNk5oUWqhgCBtxs+2QpTp+dS4tIOsyEKdC0nFYR+VA=; b=hjm29Fw6fuTGDMcjdmMO8UFBH2JZtb+mWL/2YDt2lThKHSlv7/SCM6mFp34s253noJuVkf M9lBZsWd9xx6QAIhVsTIwGpNrgkowwKSiUZqfcyeUbWTNTdFmb02XRIT1Q3dauoLWftOVC +eSAFsGWJMbbmhPyXX77VrCYpAuj/UOmPxjqZUH5EfZor96xSmJ7lficcRVMUz163OBjEN fvgL+rHNzlYx2AqBfrdWiHUsWytnbzo7DfRIJMnPekgK4useUmVF2ZbdrU9qSC01K2u+3M ICSZGtlrXhcIK0tOo2OMQV7drzdLiIbG/l/J/Bwh9xz6DVM6GJ5XsOqhDq2G0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714081425; a=rsa-sha256; cv=none; b=lAjZHWTOLRyiARBqS7cngwuwzg3eGTfyDQSSgzo2R64y9WBpKEuB+TlasNbfRIcWHRzUdR LTJ9FznVL6UrEzS3puJoMRynecRo1ONFhbiL7HebLdw8ajB5yd3jbCb+BTu80nYJ5uNg2E wreJzh9/eJGYS+SSHmWdjC3gIBq5YpaM8oPQGXxMVUFs/0bp8+7Au1du9kDfqC9bpptMY3 cE9CzZ+/mPidPxq/Yg4qWP7IUYz0hZWLe0XNkB0jPtqs0rVbIbFpZd6Qj5hhTmbwbD8IyA W8ddGKELq/G/9kW43ELP8TSEsf1tVIir81Ia1X1qhk3EUGLx/yPdC+H9IlvMhQ== 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=1714081425; 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=DzNk5oUWqhgCBtxs+2QpTp+dS4tIOsyEKdC0nFYR+VA=; b=aDlhIJV3J53xafDveR9zWcDRwdZ1hEbg14APFcpfBGfsGszfpLC1532T1ziBpmciASjH/O VKL5NxP9giV1L9hkHjZCaBU/qr9RUDZ2EnZOf1bfsKoxHD759OgoeI+uY5n8HmenmRTtHo y5XEr+O7Gzyxn/IZBa7GKDq4C9SfgnD6OEsbZoV25j6xGsWxMZGPiw1us8v4mven43aPmX kgXZBlwunraPM45yMCPyZ4p0ynublkKTeDuIjzd/zjSkCV/x9+KGIALoiTyswZPMhVesc+ fOmXqdujfzDVx5Rw0uNzD1g3MG6+lbOWBB8GlihKEgCxdaTeRLfPPBtgwWO9Mw== 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 4VQTrK1hb1zGWM; Thu, 25 Apr 2024 21:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PLhj8s052106; Thu, 25 Apr 2024 21:43:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PLhjjm052103; Thu, 25 Apr 2024 21:43:45 GMT (envelope-from git) Date: Thu, 25 Apr 2024 21:43:45 GMT Message-Id: <202404252143.43PLhjjm052103@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: 68cbb072fd1c - main - Revert "config.mk: Add MK_VIMAGE knob" 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: 68cbb072fd1c7f0928efbb466f278e6c2e0a2024 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=68cbb072fd1c7f0928efbb466f278e6c2e0a2024 commit 68cbb072fd1c7f0928efbb466f278e6c2e0a2024 Author: Brooks Davis AuthorDate: 2024-04-25 21:38:15 +0000 Commit: Brooks Davis CommitDate: 2024-04-25 21:43:36 +0000 Revert "config.mk: Add MK_VIMAGE knob" This commit broke "make makeman" checks in github CI due to a lack of option description files. The split between VIMAGE and VIMAGE_SUPPORT is not clearly justified and the code is broken because there is no opt_vimage.h (it's in opt_global.h). This reverts commit 22ca6db50f4e6bd75a141f57cf953d8de6531a06. --- share/mk/src.opts.mk | 2 -- sys/conf/config.mk | 2 -- sys/conf/kern.opts.mk | 4 +--- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index b7196b6fe824..00405e3f934f 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -183,7 +183,6 @@ __DEFAULT_YES_OPTIONS = \ USB \ UTMPX \ VI \ - VIMAGE \ VT \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ @@ -248,7 +247,6 @@ __LIBC_MALLOC_DEFAULT= jemalloc NETGRAPH \ PAM \ TESTS \ - VIMAGE \ WIRELESS __DEFAULT_DEPENDENT_OPTIONS+= ${var}_SUPPORT/${var} .endfor diff --git a/sys/conf/config.mk b/sys/conf/config.mk index 6e26ee0d5e66..729111b4ef3a 100644 --- a/sys/conf/config.mk +++ b/sys/conf/config.mk @@ -11,9 +11,7 @@ opt_global.h: touch ${.TARGET} @echo "#define SMP 1" >> ${.TARGET} @echo "#define MAC 1" >> ${.TARGET} -.if ${MK_VIMAGE_SUPPORT} != "no" @echo "#define VIMAGE 1" >> ${.TARGET} -.endif # Note: Define 'options' in DEFAULTS to 1. For simplicity, no check if the # option is in opt_global.h. Nearly all the options in DEFAUlTS today are in # opt_global.h with GEOM_* being the main exceptions. Move any options from diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 8b1151f3d624..d9d96a133250 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -52,7 +52,6 @@ __DEFAULT_YES_OPTIONS = \ SPLIT_KERNEL_DEBUG \ TESTS \ USB_GADGET_EXAMPLES \ - VIMAGE \ ZFS __DEFAULT_NO_OPTIONS = \ @@ -183,8 +182,7 @@ OPT_${opt}:= ${rep} # .for var in \ INET \ - INET6 \ - VIMAGE + INET6 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" MK_${var}_SUPPORT:= no .else From nobody Thu Apr 25 21:44: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 4VQTsq1Qgvz5JcYZ; Thu, 25 Apr 2024 21:45:03 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQTsp6lZHz427Z; Thu, 25 Apr 2024 21:45:02 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-571e3f40e31so1326166a12.2; Thu, 25 Apr 2024 14:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1714081499; x=1714686299; darn=freebsd.org; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :from:to:cc:subject:date:message-id:reply-to; bh=rklUYOXZOuzPvGh/mfeHzDD7eCpuvjcoWmeqVa8NC+w=; b=Eh1p+03q7iYBQQEIVccjMTELp86cpPdnh4P1b4CmdkTNRFEs9QYqY63hcFE380AjBL b6IQ5RVZZrUeWv0FKx1DGsYmoW9Y5cQe0rvkJgSAj+Pr14KEVa1FfrVs6irpZ/s5nTih inPF3rp2reLCJR5SsM9c+FftJvDuk0uBFXkOyVDY38HMI+VftqSXoEv+Uf/B7pVVBVCY oQpzmvTZH2gC3LQ38z9CgM1xQqxIMJcTgTHtHgx3QRzWGd2F66C3NVW+IbjDCmaheLtf JzoOpyzNPjJoenuIkKrzkY4Oh1V/jvZohZhffifVs/5Z0B0S+TIWmsm+nP5v5hjmI2pE bBNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714081499; x=1714686299; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rklUYOXZOuzPvGh/mfeHzDD7eCpuvjcoWmeqVa8NC+w=; b=emeRrAH44Cm+4GlCsSQbwVdGmqbGQEvdz8f3ES0fWY2WnosswB+YbVaS1TxwfKW9K2 O4B+O26s4AJhurUbto24WySdhg5CH4duAKFgPAp5aQSkzrwxWXmUiJTW5cSj15334GsC 1Jgevu40TZmf1yQWuasVnYU4azQPoaJOX7R8ZPUqdVazRpsPmWRLFGIVQiQflkA4OJ9q Ioa9TK1MlcP7J+wE7YQMxk2IkOljeR/oPhqU4NQx/K9tAtggbHqDthdZ0NWSoSeO9pjL UM1HP8I4Houpcaa+z6OANgLRggFjMfvmCbYC7plexRbtXKBVoP2nCx4kRWAhYevKH1Cm Ft4A== X-Forwarded-Encrypted: i=1; AJvYcCUmOwOFo993/Pzi5LhkYKUs6GnmmefLq80dX5CtCd6ok3eem2XX7wHUnVKPLhB6nv3hpod4vemDrc+pBnioGhKhHCwdKHzCHlrcZH2rqHhz7UsyP56tfjVS3f5pvHCFDCPYv692OCRxMMog7/cD/tDCUeSPfRV1hwlCxA5cPqNSyLRwS51tSLc2ZfO5O6g= X-Gm-Message-State: AOJu0YxKc2oz5HI/pxnoi6sMJ7QV92MpW5Zzsr1thq4h3ZOCNziZG8JB gdCYyVyaMWl2HiCzQ/5AW9U6dEFAxSfzfbyhalFAGj0+yObSeumULMtRmQ== X-Google-Smtp-Source: AGHT+IEvaaNEXNdQYRBqOztU5dc1jCq96l+FGWeThWUHgw+A1qswKdxBH6FYtDp98qFWsOnLjqyg2Q== X-Received: by 2002:a50:9352:0:b0:56b:c210:870c with SMTP id n18-20020a509352000000b0056bc210870cmr528438eda.15.1714081498757; Thu, 25 Apr 2024 14:44:58 -0700 (PDT) Received: from smtpclient.apple (dynamic-046-115-021-017.46.115.pool.telefonica.de. [46.115.21.17]) by smtp.googlemail.com with ESMTPSA id u25-20020a056402111900b005720c59dc57sm4998961edv.23.2024.04.25.14.44.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2024 14:44:58 -0700 (PDT) From: =?utf-8?Q?Klaus_K=C3=BCchemann?= Content-Type: multipart/alternative; boundary="Apple-Mail=_022483E1-1624-4E13-9994-F726AF53F022" 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.500.171.1.1\)) Subject: Re: git: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard Date: Thu, 25 Apr 2024 23:44:45 +0200 References: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> <0100018f16c8f23a-eacbe781-3f6e-4f02-9b4d-d26468364b1f-000000@email.amazonses.com> <7473b5ed-433b-4d51-8a23-cf6464eb4416@FreeBSD.org> To: Kyle Evans , cperciva@tarsnap.com, Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: <7473b5ed-433b-4d51-8a23-cf6464eb4416@FreeBSD.org> Message-Id: <7FA67865-F391-4773-86BA-9998B3EC855E@googlemail.com> X-Mailer: Apple Mail (2.3774.500.171.1.1) 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: 4VQTsp6lZHz427Z --Apple-Mail=_022483E1-1624-4E13-9994-F726AF53F022 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 25.04.2024 um 22:01 schrieb Kyle Evans : >=20 > On 4/25/24 14:43, Colin Percival wrote: >> On 4/25/24 12:24, Warner Losh wrote: >>> On Thu, Apr 25, 2024, 12:57=E2=80=AFPM Colin Percival = > wrote: >>> On 4/19/24 16:11, Warner Losh wrote: >>> > add dtb support for RPI CM4, CM4s, CM4_ioBoard >>> > >>> > Signed-off-by: Klaus K=C3=BCchemann = >> > >>> > Reviewed by: imp >>> > Pull Request: = https://github.com/freebsd/freebsd-src/pull/1182 >>> >>> > --- >>> > --- a/release/arm64/RPI.conf >>> > +++ b/release/arm64/RPI.conf >>> > -DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb >>> bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" >>> > +DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb >>> bcm2710-rpi-cm3.dtb \ >>> > + bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb = bcm2711-rpi-cm4.dtb >>> bcm2711-rpi-cm4s.dtb" >>>=20 >>> This broke the RPI release build, since bcm2711-rpi-cm4s.dtb = doesn't exist. >>> Is it provided by a port which we should add to the RPI build? >>>=20 >>> I thought it was in tree. I'll look into this and report back. >> Entirely possible. The release-building code is trying to copy it = from >> /usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb >> so if it's somewhere else we need to adjust that code. >=20 > The rpi-firmware port is supposed to provide all .dtb used here, but = we've never installed that one. It really shouldn't have been included = in the list to begin with, but I guess if there's demand we should fix = the port to include it. >=20 > Thanks, >=20 > Kyle Evans we only have tested/fixed the CM4-model, not forceably need the = cm4s.dtb , so no objections to remove cm4s.dtb from the dtb-list at = least temporarily. =20 But please hold cm4.dtb and the cm4_io_.dtb, which will then hopefully = not break the rpi-release anymore.=20 Of course would be better to upgrade the port. thank you Regards Klaus --Apple-Mail=_022483E1-1624-4E13-9994-F726AF53F022 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

Am 25.04.2024 um 22:01 schrieb Kyle Evans = <kevans@FreeBSD.org>:

On 4/25/24 14:43, Colin = Percival wrote:
On 4/25/24 12:24, Warner = Losh wrote:
On Thu, Apr 25, 2024, = 12:57=E2=80=AFPM Colin Percival <cperciva@tarsnap.com = <mailto:cperciva@tarsnap.com>> wrote:
    On = 4/19/24 16:11, Warner Losh wrote:
     >  =     add dtb support for RPI CM4, CM4s, = CM4_ioBoard
     >
     = >      Signed-off-by: Klaus K=C3=BCchemann = <maciphone2@googlemail.com
    = <mailto:maciphone2@googlemail.com>>
     = >      Reviewed by: imp
     = >      Pull Request: = https://github.com/freebsd/freebsd-src/pull/1182
    = <https://github.com/freebsd/freebsd-src/pull/1182>
  &n= bsp;  > ---
     > --- = a/release/arm64/RPI.conf
     > +++ = b/release/arm64/RPI.conf
     > = -DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb
    bcm2710-rpi-cm3.dtb = bcm2711-rpi-4-b.dtb"
     > = +DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb
    bcm2710-rpi-cm3.dtb = \
     > +    =  bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb = bcm2711-rpi-cm4.dtb
    = bcm2711-rpi-cm4s.dtb"

    This broke the RPI = release build, since bcm2711-rpi-cm4s.dtb doesn't = exist.
    Is it provided by a port which we should = add to the RPI build?

I thought it was in tree. I'll look into = this and report back.
Entirely possible.  The = release-building code is trying to copy it = from
/usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb
so if it's = somewhere else we need to adjust that code.

The = rpi-firmware port is supposed to provide all .dtb used here, but we've = never installed that one.  It really shouldn't have been included = in the list to begin with, but I guess if there's demand we should fix = the port to include it.

Thanks,

Kyle = Evans

we only have tested/fixed the = CM4-model,  not forceably need the cm4s.dtb , so no objections to = remove cm4s.dtb from the dtb-list at least temporarily.  

But please hold cm4.dtb and the = cm4_io_.dtb, which will then hopefully not break the rpi-release = anymore. 

Of course = would be better to upgrade the port.

thank you

Regards

Klaus


= --Apple-Mail=_022483E1-1624-4E13-9994-F726AF53F022-- From nobody Thu Apr 25 22:09: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 4VQVPz4xmsz5JfC4; Thu, 25 Apr 2024 22:09:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQVPz4Mtmz44MN; Thu, 25 Apr 2024 22:09:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714082967; 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=cGQBksAFiITXqYzbNTyM4+flUys8SnQ9ywnjHuD198I=; b=kkIDrnZgqrAQFdHgQpOlhie3wZbfzjEar4z0a3qGumL3Iio6VKBsoXUjZQmOJVZ7YPcjUL EPoVZqaQcKXkiKlZLb+MF9/I2pmiUHQW5m54R/3Kw24vE/Fjx+igdzgcqSxp97NDGUpDkw rdKbJ2lr7R37wVo2gmiHDCNTvWQTyiGJAetugRa2BrbSj+VlFDD/mcupeCjXjALd/0LUxu NFwZmA5CarzHERfz/iJciYW01LNeA8yZrd3An+wZmqwm5kYVrqO9fJLcwqwj8ierGYPc9A ZLyRtePzlrumNX04J6ImKc6/xfBZ/VUA9uBUBFxmYf8MwLDAmAoEauiCwEVgmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714082967; a=rsa-sha256; cv=none; b=WswAgzLmsS/h4VMdu0stTqxBjtvBZ+BJIBuHqWEPZApA72vc68KynoHe/5boL9QDqOdJff vYKlDUv9Lq0JgJiW/qkn802X7LFBbhv79ADz7FbIu+pTkg4zfH8gB+8wyJ0BFKFhU3mJ5t J6rOTd4QAr9v3wD9Kh7RrT/6vD7UD9x7Sae0OYH40kJoNKSs5rc149flugV+mkokbAspwQ w79+c0dCwctOhORWNpi5fTENfmzMe8Izdz0Aakn1F9NO4r9Sdk4vpVdUeFlin3jp7AWMw1 ZTD296pgpzNMmWwOJrGcIgKeekrTIjCItaDTcJgdU0ugYoaPPNW3MITLtEVgRg== 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=1714082967; 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=cGQBksAFiITXqYzbNTyM4+flUys8SnQ9ywnjHuD198I=; b=FgdxFa2nDaZX8kTieoVOhm+WELjqlKB4JqNuSn1O2ciMv4GmFyPeqvVVVm4yHxZIBiqjBj CzjcO+WlpX+jC7oCzv7i4B5LSSu1L8nbasFhaPXwc+9B9WhpiNNNSiHHrmphiEVWBYt5Tx P3Zhvsbz+8+L6Ka6GNSpM5IfvhZcGyJDDf+wR7W8xCwzDJyXPKmY+qK/xgh3Pgd5MHi5mY Br8PcR94k3ueL1wXeS3KI14d5Fv++aZL8wXDqfbNGSXaVOQNtvCJetAxfDmXL8r6hPptvP fnRl/CRZo4AZhjl7PuIfJEG8xnjEZY28rwzH6m5AkeGyxu2aq8e6jbN7mtpbrg== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VQVPy0t8tz11xH; Thu, 25 Apr 2024 22:09:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <142362e6-8a88-43f5-bff6-6ff90a12802e@FreeBSD.org> Date: Thu, 25 Apr 2024 17:09:24 -0500 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: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard Content-Language: en-US To: =?UTF-8?Q?Klaus_K=C3=BCchemann?= , cperciva@tarsnap.com, Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> <0100018f16c8f23a-eacbe781-3f6e-4f02-9b4d-d26468364b1f-000000@email.amazonses.com> <7473b5ed-433b-4d51-8a23-cf6464eb4416@FreeBSD.org> <7FA67865-F391-4773-86BA-9998B3EC855E@googlemail.com> From: Kyle Evans In-Reply-To: <7FA67865-F391-4773-86BA-9998B3EC855E@googlemail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/25/24 16:44, Klaus Küchemann wrote: > > >> Am 25.04.2024 um 22:01 schrieb Kyle Evans : >> >> On 4/25/24 14:43, Colin Percival wrote: >>> On 4/25/24 12:24, Warner Losh wrote: >>>> On Thu, Apr 25, 2024, 12:57 PM Colin Percival >>> > wrote: >>>>     On 4/19/24 16:11, Warner Losh wrote: >>>>      >      add dtb support for RPI CM4, CM4s, CM4_ioBoard >>>>      > >>>>      >      Signed-off-by: Klaus Küchemann >>>     > >>>>      >      Reviewed by: imp >>>>      >      Pull Request: >>>> https://github.com/freebsd/freebsd-src/pull/1182 >>>>     >>>>      > --- >>>>      > --- a/release/arm64/RPI.conf >>>>      > +++ b/release/arm64/RPI.conf >>>>      > -DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb >>>> bcm2710-rpi-3-b-plus.dtb >>>>     bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" >>>>      > +DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb >>>> bcm2710-rpi-3-b-plus.dtb >>>>     bcm2710-rpi-cm3.dtb \ >>>>      > +     bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb >>>> bcm2711-rpi-cm4.dtb >>>>     bcm2711-rpi-cm4s.dtb" >>>> >>>>     This broke the RPI release build, since bcm2711-rpi-cm4s.dtb >>>> doesn't exist. >>>>     Is it provided by a port which we should add to the RPI build? >>>> >>>> I thought it was in tree. I'll look into this and report back. >>> Entirely possible.  The release-building code is trying to copy it from >>> /usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb >>> so if it's somewhere else we need to adjust that code. >> >> The rpi-firmware port is supposed to provide all .dtb used here, but >> we've never installed that one.  It really shouldn't have been >> included in the list to begin with, but I guess if there's demand we >> should fix the port to include it. >> >> Thanks, >> >> Kyle Evans > > we only have tested/fixed the CM4-model,  not forceably need the > cm4s.dtb , so no objections to remove cm4s.dtb from the dtb-list at > least temporarily. > > But please hold cm4.dtb and the cm4_io_.dtb, which will then hopefully > not break the rpi-release anymore. > I'm going to go ahead and remove just the rpi-cm4s.dtb, feel free to update the port (sysutils/rpi-firmware) to grab it then try again once new packages are available with it so that we don't break the snapshot again from the same file. Thanks, Kyle Evans From nobody Thu Apr 25 22:11: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 4VQVSp6832z5Jfvv for ; Thu, 25 Apr 2024 22:11:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQVSp1rw7z44jr for ; Thu, 25 Apr 2024 22:11:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-xa35.google.com with SMTP id 71dfb90a1353d-4daa8e14afbso489101e0c.3 for ; Thu, 25 Apr 2024 15:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1714083112; x=1714687912; 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=o7nMoV10V7vDN46T6ZzC0RFPgwEu9BB+wWEhKOtLlz4=; b=Fhhxy5lQ416a0Zj8TA2U+27/G+wAnl/gY3SKf46erpXU9YoIYd2UyTkZ8tUpeh8Hlj N2fk0AwJ5iLKhdhtynes/24OuDTxjKNRc7LbnR0LEkRzKDr9cz6fAesnI1VNZYRXBYZg kpuAY1O8yRe4GSUqGRWZNU71u4vQHrntH9lNYfvSYE6E/oTF2c+g7vtnug8u0T2FKpFQ 3dkwqz8Xvxa3UyDLRxIDQxgT1kY3OOQvxcBN7aY8TxxRwwJN+mAa8pVPIwCTyB85xjP3 7v/1SFWC2wzVckdaiPUWmaU82SMpu+nuU5meaiSQeikUYY6bowjlYlNAhMNeJdP+ozY5 70VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714083112; x=1714687912; 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=o7nMoV10V7vDN46T6ZzC0RFPgwEu9BB+wWEhKOtLlz4=; b=o1Hs9rWtMo8x+s/1BtS3oa4pa+sIZKXyGZD1Ds3eQGYUyz7MxgDKgvndJEM/6dtRX9 6L5/08mOWN+n2uhOVWBmhJXD607LjSPHC+kz8TFhxO3Ig8H0kjnFJuHOMKkSVRy81R1R q6f95joQ9aBYm//4Ap+0748Hxhzq697TU1qHWFn+BlpjCunmUVmVTIIh39mb9XjqF0Fx G+mvjt4NPsKhRj1aX66YQOn934WNHCv5SnG9uptx08ODsgGdYCdEs0RzsQnKAQLl/PeG aeBQ8OattNpWXscDaRTTmPHFP0WwWQx+6ay59QEXv9mDqnDewkrgfpllX8vCm9lDyO6Y 14Nw== X-Forwarded-Encrypted: i=1; AJvYcCWx+5odXtXmDln5tccO09oUFsPsa10uEzT+NjdMSL3QU7zUFaa0fy5sqj90MXBBt8Te16b2AXuYIRkXZ0cqpZJI7YzUkYS69c/IVJfuZB9A7Q== X-Gm-Message-State: AOJu0Yy1ELa0QUMSxwEjjYsZxV7jJt2MKkBPFzyMlnXIybN8bcOVHAeu OuRSc33i5ycxdgp2SL3ufwT1FMwu3tebVUHzimS/WxDdUXfJFRR1wK9gVKR8yyh0C+q7mNqxh4y rBr/GXIazlTpNRVtu0sgfMgodZ/cmn4N874JHYA== X-Google-Smtp-Source: AGHT+IG0kMyhTj9QYrsv6MLNGuss0KFUH92UOj2HRbrMu5tOlX48UET67/U8A3AkzxXsptFDOrug30rcaSnlg49dcB4= X-Received: by 2002:a05:6122:30a6:b0:4d4:3ec6:421e with SMTP id cd38-20020a05612230a600b004d43ec6421emr936581vkb.4.1714083111579; Thu, 25 Apr 2024 15:11:51 -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: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> <0100018f16c8f23a-eacbe781-3f6e-4f02-9b4d-d26468364b1f-000000@email.amazonses.com> <7473b5ed-433b-4d51-8a23-cf6464eb4416@FreeBSD.org> <7FA67865-F391-4773-86BA-9998B3EC855E@googlemail.com> <142362e6-8a88-43f5-bff6-6ff90a12802e@FreeBSD.org> In-Reply-To: <142362e6-8a88-43f5-bff6-6ff90a12802e@FreeBSD.org> From: Warner Losh Date: Thu, 25 Apr 2024 16:11:38 -0600 Message-ID: Subject: Re: git: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard To: Kyle Evans Cc: =?UTF-8?Q?Klaus_K=C3=BCchemann?= , Colin Percival , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000fb51510616f312a6" 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: 4VQVSp1rw7z44jr --000000000000fb51510616f312a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 25, 2024, 4:09=E2=80=AFPM Kyle Evans wrote= : > On 4/25/24 16:44, Klaus K=C3=BCchemann wrote: > > > > > >> Am 25.04.2024 um 22:01 schrieb Kyle Evans : > >> > >> On 4/25/24 14:43, Colin Percival wrote: > >>> On 4/25/24 12:24, Warner Losh wrote: > >>>> On Thu, Apr 25, 2024, 12:57=E2=80=AFPM Colin Percival >>>> > wrote: > >>>> On 4/19/24 16:11, Warner Losh wrote: > >>>> > add dtb support for RPI CM4, CM4s, CM4_ioBoard > >>>> > > >>>> > Signed-off-by: Klaus K=C3=BCchemann >>>> > > >>>> > Reviewed by: imp > >>>> > Pull Request: > >>>> https://github.com/freebsd/freebsd-src/pull/1182 > >>>> > >>>> > --- > >>>> > --- a/release/arm64/RPI.conf > >>>> > +++ b/release/arm64/RPI.conf > >>>> > -DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb > >>>> bcm2710-rpi-3-b-plus.dtb > >>>> bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" > >>>> > +DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb > >>>> bcm2710-rpi-3-b-plus.dtb > >>>> bcm2710-rpi-cm3.dtb \ > >>>> > + bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb > >>>> bcm2711-rpi-cm4.dtb > >>>> bcm2711-rpi-cm4s.dtb" > >>>> > >>>> This broke the RPI release build, since bcm2711-rpi-cm4s.dtb > >>>> doesn't exist. > >>>> Is it provided by a port which we should add to the RPI build? > >>>> > >>>> I thought it was in tree. I'll look into this and report back. > >>> Entirely possible. The release-building code is trying to copy it fr= om > >>> /usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb > >>> so if it's somewhere else we need to adjust that code. > >> > >> The rpi-firmware port is supposed to provide all .dtb used here, but > >> we've never installed that one. It really shouldn't have been > >> included in the list to begin with, but I guess if there's demand we > >> should fix the port to include it. > >> > >> Thanks, > >> > >> Kyle Evans > > > > we only have tested/fixed the CM4-model, not forceably need the > > cm4s.dtb , so no objections to remove cm4s.dtb from the dtb-list at > > least temporarily. > > > > But please hold cm4.dtb and the cm4_io_.dtb, which will then hopefully > > not break the rpi-release anymore. > > > > I'm going to go ahead and remove just the rpi-cm4s.dtb, feel free to > update the port (sysutils/rpi-firmware) to grab it then try again once > new packages are available with it so that we don't break the snapshot > again from the same file. > Thanks. Warner Thanks, > > Kyle Evans > --000000000000fb51510616f312a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Apr 25, 2024, 4:09=E2=80=AFPM Kyle Evans <<= a href=3D"mailto:kevans@freebsd.org">kevans@freebsd.org> wrote:
<= /div>
On 4/25/24 16:44, Klaus K=C3=BCchemann = wrote:
>
>
>> Am 25.04.2024 um 22:01 schrieb Kyle Evans <kevans@FreeBSD.org&g= t;:
>>
>> On 4/25/24 14:43, Colin Percival wrote:
>>> On 4/25/24 12:24, Warner Losh wrote:
>>>> On Thu, Apr 25, 2024, 12:57=E2=80=AFPM Colin Percival <= cperciva@tarsnap.com
>>>> <mailto:cperciva@tarsnap.com>> wrote:
>>>> =C2=A0=C2=A0=C2=A0 On 4/19/24 16:11, Warner Losh wrote: >>>> =C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0 add dtb = support for RPI CM4, CM4s, CM4_ioBoard
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 >
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0 Signed-o= ff-by: Klaus K=C3=BCchemann <maciphone2@googlemail.com
>>>> =C2=A0=C2=A0=C2=A0 <mailto:maciphone2@googlemail= .com>>
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0 Reviewed= by: imp
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0 Pull Req= uest:
>>>> https://github.com/freeb= sd/freebsd-src/pull/1182
>>>> =C2=A0=C2=A0=C2=A0 <h= ttps://github.com/freebsd/freebsd-src/pull/1182>
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 > ---
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 > --- a/release/arm64/RPI.conf=
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 > +++ b/release/arm64/RPI.conf=
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 > -DTB=3D"bcm2710-rpi-2-b= .dtb bcm2710-rpi-3-b.dtb
>>>> bcm2710-rpi-3-b-plus.dtb
>>>> =C2=A0=C2=A0=C2=A0 bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb= "
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 > +DTB=3D"bcm2710-rpi-2-b= .dtb bcm2710-rpi-3-b.dtb
>>>> bcm2710-rpi-3-b-plus.dtb
>>>> =C2=A0=C2=A0=C2=A0 bcm2710-rpi-cm3.dtb \
>>>> =C2=A0=C2=A0=C2=A0=C2=A0 > +=C2=A0 =C2=A0 =C2=A0bcm2711= -rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb
>>>> bcm2711-rpi-cm4.dtb
>>>> =C2=A0=C2=A0=C2=A0 bcm2711-rpi-cm4s.dtb"
>>>>
>>>> =C2=A0=C2=A0=C2=A0 This broke the RPI release build, since= bcm2711-rpi-cm4s.dtb
>>>> doesn't exist.
>>>> =C2=A0=C2=A0=C2=A0 Is it provided by a port which we shoul= d add to the RPI build?
>>>>
>>>> I thought it was in tree. I'll look into this and repo= rt back.
>>> Entirely possible.=C2=A0 The release-building code is trying t= o copy it from
>>> /usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb
>>> so if it's somewhere else we need to adjust that code.
>>
>> The rpi-firmware port is supposed to provide all .dtb used here, b= ut
>> we've never installed that one.=C2=A0 It really shouldn't = have been
>> included in the list to begin with, but I guess if there's dem= and we
>> should fix the port to include it.
>>
>> Thanks,
>>
>> Kyle Evans
>
> we only have tested/fixed the CM4-model, =C2=A0not forceably need the =
> cm4s.dtb , so no objections to remove cm4s.dtb from the dtb-list at > least temporarily.
>
> But please hold cm4.dtb and the cm4_io_.dtb, which will then hopefully=
> not break the rpi-release anymore.
>

I'm going to go ahead and remove just the rpi-cm4s.dtb, feel free to update the port (sysutils/rpi-firmware) to grab it then try again once
new packages are available with it so that we don't break the snapshot =
again from the same file.
Thanks.

Warner=C2=A0

<= div class=3D"gmail_quote">
Thanks,

Kyle Evans
--000000000000fb51510616f312a6-- From nobody Thu Apr 25 22:13: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 4VQVVT20Rjz5Jff1; Thu, 25 Apr 2024 22:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQVVT1NbRz45Gj; Thu, 25 Apr 2024 22:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714083201; 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=sWCD85z9p4i340bLpv8vjaNDDVkBPp6iaxnWmfnkpQU=; b=KvqRmLMy6K7aIUmUjcQWaEf/514hnhYPr0s7/PmtNvE82bjZxtPexjHxIc2mlkReIej0Dj Sc5oKZb5Jmoz5LzoEe6O0Nm9w5GlJuXAz/Dj4zfNneDVPWQbio+1b9hA3ObNb81aZmoA3g Bx7j9m4HIjeNkeXawKhQUCqGq5AT6lRrhuDDTlx58X2VUbEH1Jq/AgYGxR39N7H5rc0Wiy mfCuNn7KF0YK7latL5Z1S6+cqLwGMRRBTpZwtyA1vxu+PlfIYN9d7Hxh4joR9Q0ybQyUHm wMRInQbVPHwAVyP2vOwsywEpyl9JdL2OOEUE/B8HEP6GE/Nx5MePs/PXNfzi3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714083201; a=rsa-sha256; cv=none; b=tATi/oaogwzVv0P8lhGqj/ecBhRmvF84MwNPXSaOR+VLIxgQCxO9i0kS4tgA1Gotvo6zwW VHlsnjNfAiYna80EqlROQ6AzaYmxn+CSH350ZS+eD4lqCUC2f3ybXmwJHNSCAMHvKlL8uQ QuyqzyJhdeEDBAi0lDfg4FXx8bYWF/1PHR/osgfCiB4VJ5RAl2V5gnxxYdvxPQfPHnXrTE 09qQ/II2h6thm4HeVcorIajNfjdIB2d81eblnUTtJi/q20NhJJpNq7SDFB6fbS/YjDZRQR 1o/tNrOC6gxbx0y7d/76ua6U5/GU0aInLUABXEHUbmsHnVL0y9Tr4V9P3XCplw== 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=1714083201; 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=sWCD85z9p4i340bLpv8vjaNDDVkBPp6iaxnWmfnkpQU=; b=mICa17/RLj1E7VdA0uyHHBhYrOyyRWk7iSYp4gOzKUqg3SlMz7a6S4sYF93oTcbu0HynIL W0T3FKkhWcYDB5UwBje02j1zGpVOga1Ijf8HVwRmmhyN9YsnZqAMzBBeSXeWztWm5FnEdD uQ9pmEnLUq5Z7WJm49BnOI6JSOVk8nHMZ5EzhDBjk4/t8K6tJLyFD11fDrJTILw8esJh0f pZHxFuxOqNVBGAW6gdUpUHLkSItD4KAl3ykYTZQorHM8rt53HRmcl4hB/T05GbM7yXtnwK sHdhFulVRCv8/Trb9QaEozpNQanoQ4haA6snFz+5jGsdoBYwsZeuGsldP9xj2A== 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 4VQVVT0ycXzHKl; Thu, 25 Apr 2024 22:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PMDLDR003447; Thu, 25 Apr 2024 22:13:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PMDL3Y003444; Thu, 25 Apr 2024 22:13:21 GMT (envelope-from git) Date: Thu, 25 Apr 2024 22:13:21 GMT Message-Id: <202404252213.43PMDL3Y003444@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: 9245ced9c835 - main - release: remove the RPI CM4s .dtb 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: 9245ced9c8357d876141975a6431ce34143d2753 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9245ced9c8357d876141975a6431ce34143d2753 commit 9245ced9c8357d876141975a6431ce34143d2753 Author: Kyle Evans AuthorDate: 2024-04-25 22:10:32 +0000 Commit: Kyle Evans CommitDate: 2024-04-25 22:10:32 +0000 release: remove the RPI CM4s .dtb This isn't actually packaged by the sysutils/rpi-firmware port, so we cannot include it in the image. Fix the RPI release build until an interested party adds it to the port and packages are available. Reported by: cperciva --- release/arm64/RPI.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/arm64/RPI.conf b/release/arm64/RPI.conf index a38385a24e80..b973687c535d 100644 --- a/release/arm64/RPI.conf +++ b/release/arm64/RPI.conf @@ -4,7 +4,7 @@ DTB_DIR="/usr/local/share/rpi-firmware" DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb bcm2710-rpi-cm3.dtb \ - bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb bcm2711-rpi-cm4s.dtb" + bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb" EMBEDDED_TARGET_ARCH="aarch64" EMBEDDED_TARGET="arm64" EMBEDDEDBUILD=1 From nobody Thu Apr 25 22:19: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 4VQVf84h0zz5JgCx; Thu, 25 Apr 2024 22:20:00 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQVf827dkz45gB; Thu, 25 Apr 2024 22:20:00 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-56e6a1edecfso2347469a12.1; Thu, 25 Apr 2024 15:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1714083598; x=1714688398; darn=freebsd.org; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :from:to:cc:subject:date:message-id:reply-to; bh=ascjDHG1rTRggjeZijNFPSN/XY9vjTOU8Ld2NP8MnpE=; b=SaXhkFDsJyy9s0zS63sDg3Mvco6ksFDbYj3eogNWptdOirLWp7QDeVLAbK3dHE/673 xhF47P5pWudXMSBX/TUEoQQMY+yMMyC9AxJjEGkeCQ94reB7CkSQSa82sLQ+E6mAVqJD I7VV+J4dMQybbx9iOcT+RTtkOZCbpu9c/lygBuRgjAFPMjqzpL89zJdNi3rAT5KytIy4 rVDU+qkKKzlHQTo56/wjbPIEyNSNkyWxsquzkUCIfXQ3n9fS6M2T+ivc3rqF35NWnAmt i3Pk4jNErFjOLxnFu5QnCZUx5VH0pn/NS4L2oOaMA7+ZVJ+aYVxY1Pwcz0fs2zIs+NWe //qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714083598; x=1714688398; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ascjDHG1rTRggjeZijNFPSN/XY9vjTOU8Ld2NP8MnpE=; b=wRb8CNqaJyr159hPjiFDZkTVMvcUJS4EH7r3iBVnya/ncBBub/uZcrdH134DTPkEq6 FpTiUwAUA/F5hcZMZ7Hmk3HkIxIui3tAujKU1Ft6J0e2QKUR+loucsF7QwO5QqtnvmAZ y9bi1rDbVxA0bbVRyNBrhsD2POlioz+m/Z490fnH1cQv3V4qG1Yte018uQVankszs0P8 5zoIwv5oRUIIX5OFAoWCS59CZWwHhiwNO/HW05L6+OOaOn+6Pw2YEkeuiiaTt90DgCUf lgeVt7CXPLAKfbG07UBtFu39fe0AXYfZJXd046AhmSx3TAVNOUicr2vVpTPUxPYrsM6U wX+g== X-Forwarded-Encrypted: i=1; AJvYcCX2fPp4dYpY0wQRRHWTBXJhsJu3H+6r/DWH0VbfH7dOoTGzL0reC2UV0cR7k45H5CT0byVPCDwlCPH5c8/eLX4lFSqJqw2esvOwUw4/vM76CKZr44Prj4gqZccvnEe75/xrlNs/0byT+r4cGqzbog4f2DEyuYy2LozG3v4c4FwCEpFIQhuLU89BqQC6238= X-Gm-Message-State: AOJu0YyUdmshhUkgEfEgGIU45ib4C/pktq0kLoMbG2lZ8i7WYVsYXBtz WDX5hkeeactXNCzbg+iVMVv/2bebMXb8BUuK2eZvAJlhk2f9bJ//YbTexw== X-Google-Smtp-Source: AGHT+IF7DuU1xWOafxN9q3DhR0xEBYKfGjWWHxp9dYY8G04wLrwAqGHi0UmYKSUIUlKO4NI/Z966dQ== X-Received: by 2002:a05:6402:26c1:b0:572:5285:6dc2 with SMTP id x1-20020a05640226c100b0057252856dc2mr492736edd.12.1714083597800; Thu, 25 Apr 2024 15:19:57 -0700 (PDT) Received: from smtpclient.apple (dynamic-046-115-021-017.46.115.pool.telefonica.de. [46.115.21.17]) by smtp.googlemail.com with ESMTPSA id l11-20020a50cbcb000000b0057030326144sm9335245edi.47.2024.04.25.15.19.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2024 15:19:56 -0700 (PDT) From: =?utf-8?Q?Klaus_K=C3=BCchemann?= Content-Type: multipart/alternative; boundary="Apple-Mail=_1E6194A7-523A-4EAA-80C9-840CB6271984" 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.500.171.1.1\)) Subject: Re: git: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard Date: Fri, 26 Apr 2024 00:19:44 +0200 References: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> <0100018f16c8f23a-eacbe781-3f6e-4f02-9b4d-d26468364b1f-000000@email.amazonses.com> <7473b5ed-433b-4d51-8a23-cf6464eb4416@FreeBSD.org> <7FA67865-F391-4773-86BA-9998B3EC855E@googlemail.com> <142362e6-8a88-43f5-bff6-6ff90a12802e@FreeBSD.org> To: Kyle Evans , Warner Losh , cperciva@tarsnap.com, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, hp@tmm.cx In-Reply-To: <142362e6-8a88-43f5-bff6-6ff90a12802e@FreeBSD.org> Message-Id: X-Mailer: Apple Mail (2.3774.500.171.1.1) 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: 4VQVf827dkz45gB --Apple-Mail=_1E6194A7-523A-4EAA-80C9-840CB6271984 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 26.04.2024 um 00:09 schrieb Kyle Evans : >=20 > On 4/25/24 16:44, Klaus K=C3=BCchemann wrote: >>> Am 25.04.2024 um 22:01 schrieb Kyle Evans : >>>=20 >>> On 4/25/24 14:43, Colin Percival wrote: >>>> On 4/25/24 12:24, Warner Losh wrote: >>>>> On Thu, Apr 25, 2024, 12:57=E2=80=AFPM Colin Percival = > wrote: >>>>> On 4/19/24 16:11, Warner Losh wrote: >>>>> > add dtb support for RPI CM4, CM4s, CM4_ioBoard >>>>> > >>>>> > Signed-off-by: Klaus K=C3=BCchemann = >>>> > >>>>> > Reviewed by: imp >>>>> > Pull Request: = https://github.com/freebsd/freebsd-src/pull/1182 >>>>> >>>>> > --- >>>>> > --- a/release/arm64/RPI.conf >>>>> > +++ b/release/arm64/RPI.conf >>>>> > -DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb >>>>> bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" >>>>> > +DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb >>>>> bcm2710-rpi-cm3.dtb \ >>>>> > + bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb = bcm2711-rpi-cm4.dtb >>>>> bcm2711-rpi-cm4s.dtb" >>>>>=20 >>>>> This broke the RPI release build, since bcm2711-rpi-cm4s.dtb = doesn't exist. >>>>> Is it provided by a port which we should add to the RPI build? >>>>>=20 >>>>> I thought it was in tree. I'll look into this and report back. >>>> Entirely possible. The release-building code is trying to copy it = from >>>> /usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb >>>> so if it's somewhere else we need to adjust that code. >>>=20 >>> The rpi-firmware port is supposed to provide all .dtb used here, but = we've never installed that one. It really shouldn't have been included = in the list to begin with, but I guess if there's demand we should fix = the port to include it. >>>=20 >>> Thanks, >>>=20 >>> Kyle Evans >> we only have tested/fixed the CM4-model, not forceably need the = cm4s.dtb , so no objections to remove cm4s.dtb from the dtb-list at = least temporarily. >> But please hold cm4.dtb and the cm4_io_.dtb, which will then = hopefully not break the rpi-release anymore. >=20 > I'm going to go ahead and remove just the rpi-cm4s.dtb, feel free to = update the port (sysutils/rpi-firmware) to grab it then try again once = new packages are available with it so that we don't break the snapshot = again from the same file. >=20 > Thanks, >=20 > Kyle Evans Yes, better at the moment , because Updating the port would require to test every rpi-model again because = the provided dtb-files can sometimes be very =E2=80=9Esensitive=E2=80=9C or critical in = behavior .=20 thank you and sorry for the breakage. Klaus --Apple-Mail=_1E6194A7-523A-4EAA-80C9-840CB6271984 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

Am 26.04.2024 um 00:09 schrieb Kyle Evans = <kevans@FreeBSD.org>:

On 4/25/24 16:44, Klaus K=C3=BCchemann = wrote:
Am 25.04.2024 um 22:01 = schrieb Kyle Evans <kevans@FreeBSD.org>:

On 4/25/24 14:43, = Colin Percival wrote:
On 4/25/24 12:24, = Warner Losh wrote:
On Thu, Apr 25, 2024, = 12:57=E2=80=AFPM Colin Percival <cperciva@tarsnap.com = <mailto:cperciva@tarsnap.com>> = wrote:
    On 4/19/24 16:11, Warner = Losh wrote:
     >      = add dtb support for RPI CM4, CM4s, = CM4_ioBoard
     >
   &nb= sp; >    =   Signed-off-by: Klaus K=C3=BCchemann = <maciphone2@googlemail.com
    <mailto:maciphone2@googlem= ail.com>>
     >      = Reviewed by: imp
     >      = Pull Request: = https://github.com/freebsd/freebsd-src/pull/1182
    <https://github.com/freebs= d/freebsd-src/pull/1182>
     > = ---
     > --- = a/release/arm64/RPI.conf
     > +++ = b/release/arm64/RPI.conf
     > = -DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb
    bcm2710-rpi-cm3.dtb = bcm2711-rpi-4-b.dtb"
     > = +DTB=3D"bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb = bcm2710-rpi-3-b-plus.dtb
    bcm2710-rpi-cm3.dtb = \
     > +    =  bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb = bcm2711-rpi-cm4.dtb
    bcm2711-rpi-cm4s.dtb"

=     This = broke the RPI release build, since bcm2711-rpi-cm4s.dtb doesn't = exist.
    Is it provided by a port = which we should add to the RPI build?

I thought it was in tree. = I'll look into this and report back.
Entirely = possible.  The release-building code is trying to copy it = from
/usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb
so if it's = somewhere else we need to adjust that code.

The = rpi-firmware port is supposed to provide all .dtb used here, but we've = never installed that one.  It really shouldn't have been included = in the list to begin with, but I guess if there's demand we should fix = the port to include it.

Thanks,

Kyle = Evans
we only have tested/fixed the CM4-model,  not = forceably need the cm4s.dtb , so no objections to remove cm4s.dtb from = the dtb-list at least temporarily.
But please hold cm4.dtb and the = cm4_io_.dtb, which will then hopefully not break the rpi-release = anymore.

I'm = going to go ahead and remove just the rpi-cm4s.dtb, feel free to update = the port (sysutils/rpi-firmware) to grab it then try again once new = packages are available with it so that we don't break the snapshot again = from the same file.

Thanks,

Kyle = Evans

Yes, better at the moment = , because
Updating the port would require to test every = rpi-model again because the provided dtb-files
 can = sometimes be very =E2=80=9Esensitive=E2=80=9C or critical in behavior =  . 

 thank you and sorry for the = breakage.
Klaus

= --Apple-Mail=_1E6194A7-523A-4EAA-80C9-840CB6271984-- From nobody Thu Apr 25 22:27: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 4VQVqM5CX3z5JgqK; Thu, 25 Apr 2024 22:27:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQVqM4KTdz46Tx; Thu, 25 Apr 2024 22:27:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714084079; 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=4lDrKQcy0Fx61Y4n1YHs+kGgQSXEWsVhOC+ib8waH1U=; b=yLSUiDRCZUYaKID5lQlki/WlDtHdZnKhWxocv58Wv5NsEhWXgmujDHqhrCjmFJzy9yTtcN Y3lL6Bec3Hn4cll7qNMQQPTwUqMwqW9tkMMegpfgYqDLmREatBY+8VNW+3igp3QWZSoFze v+I1DQdnT+fux7b8j7uyFdNS83E1eYn/+3jbgrtTPw5qZReQSrKs4buQqpF0hAtoySiM19 rWyV3+L2JxjQ5mlBmiVsGrXVY/vBmkyOGNgpej78ePm8TGZp8LTKVWckfKAvRs04lDCBqf TkuK6bkqHdFif8D7UXStw3TDxNvezOTpZnyveeJ0t6+gQziwk9aN7p3/Mf50Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714084079; a=rsa-sha256; cv=none; b=iqjTyAmkObyfyrBfpj/8m2T7SsXK4XdL1d2NGUk/9lVIfw2vT0MYaAAsGyJsZvlvK96gTd abLHJUeBnrG1Xiuit8bDcmV8B9iK1niAjVd8uYbjkig2fUeErHMEg6pOxZGz7E3XNX7aEC ldRTJDjShckf85tXM1f6Q4xE6EXjMfvxs8T4xv7dbqipV5TWobnW/fW3ISPsRpxlZ8C6kx 1dMNDYKXuEzEBR/8DFANK2U55L25BinhAx52/hP4ls79eiznk2vQJIIMPCm7HyEXlm3J5R o9GeL2xsUrWGAdXt5v9+034zeintJgDBMmcjUm9JKLd2Y+5qazFatocwBf4MFA== 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=1714084079; 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=4lDrKQcy0Fx61Y4n1YHs+kGgQSXEWsVhOC+ib8waH1U=; b=WZgpgBaBPTbu0mCHdLQ0CfyruQP56TL1yArHnaQg51uttD/SpDIQx+M2sBvBwpkClcvVxT tWF8e0RJIUj9zEKzVIjYlfIxrP0WxgEhZGYLlE0gCvjKChfU54h33ZZDFtCUtbKnHueciR /6/k6jQEzkPkr2zJZef9AaOlbFmdBmEo4ECFV1O/6EskdXTmshmCkKLVVNGR8oJyOLblVb weLnqIQgPtxi5LCqmP9MRe5cq/Puox9w0HLcvHL0hNJnAld/1DmSydr/kBC3jlW8+GteZL A+x7OqpFKmqLCnc5Qkj1WjrfgrnkWuhnygo16gM8SeB402l7Lpj+uSRbiCx8pw== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VQVqL5tDfz127R; Thu, 25 Apr 2024 22:27:58 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <89871449-6893-4bfa-8f21-76dca37adb09@FreeBSD.org> Date: Thu, 25 Apr 2024 17:27:57 -0500 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: 1bd4f769caf8 - main - add dtb support for RPI CM4, CM4s, CM4_ioBoard Content-Language: en-US To: =?UTF-8?Q?Klaus_K=C3=BCchemann?= , Warner Losh , cperciva@tarsnap.com, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, hp@tmm.cx References: <202404192311.43JNBiVS059729@gitrepo.freebsd.org> <0100018f169ec80a-47d419c2-2cd6-4ee1-89da-3f4782429089-000000@email.amazonses.com> <0100018f16c8f23a-eacbe781-3f6e-4f02-9b4d-d26468364b1f-000000@email.amazonses.com> <7473b5ed-433b-4d51-8a23-cf6464eb4416@FreeBSD.org> <7FA67865-F391-4773-86BA-9998B3EC855E@googlemail.com> <142362e6-8a88-43f5-bff6-6ff90a12802e@FreeBSD.org> From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/25/24 17:19, Klaus Küchemann wrote: > > >> Am 26.04.2024 um 00:09 schrieb Kyle Evans : >> >> On 4/25/24 16:44, Klaus Küchemann wrote: >>>> Am 25.04.2024 um 22:01 schrieb Kyle Evans : >>>> >>>> On 4/25/24 14:43, Colin Percival wrote: >>>>> On 4/25/24 12:24, Warner Losh wrote: >>>>>> On Thu, Apr 25, 2024, 12:57 PM Colin Percival >>>>>> > wrote: >>>>>> On 4/19/24 16:11, Warner Losh wrote: >>>>>> >      add dtb support for RPI CM4, CM4s, CM4_ioBoard >>>>>> > >>>>>> >      Signed-off-by: Klaus Küchemann >>>>> > >>>>>> >      Reviewed by: imp >>>>>> >      Pull Request: https://github.com/freebsd/freebsd-src/pull/1182 >>>>>> >>>>>> > --- >>>>>> > --- a/release/arm64/RPI.conf >>>>>> > +++ b/release/arm64/RPI.conf >>>>>> > -DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb >>>>>> bcm2710-rpi-3-b-plus.dtb >>>>>> bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb" >>>>>> > +DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb >>>>>> bcm2710-rpi-3-b-plus.dtb >>>>>> bcm2710-rpi-cm3.dtb \ >>>>>> > +     bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb >>>>>> bcm2711-rpi-cm4s.dtb" >>>>>> >>>>>> This broke the RPI release build, since bcm2711-rpi-cm4s.dtb >>>>>> doesn't exist. >>>>>> Is it provided by a port which we should add to the RPI build? >>>>>> >>>>>> I thought it was in tree. I'll look into this and report back. >>>>> Entirely possible.  The release-building code is trying to copy it from >>>>> /usr/local/share/rpi-firmware/bcm2711-rpi-cm4s.dtb >>>>> so if it's somewhere else we need to adjust that code. >>>> >>>> The rpi-firmware port is supposed to provide all .dtb used here, but >>>> we've never installed that one.  It really shouldn't have been >>>> included in the list to begin with, but I guess if there's demand we >>>> should fix the port to include it. >>>> >>>> Thanks, >>>> >>>> Kyle Evans >>> we only have tested/fixed the CM4-model,  not forceably need the >>> cm4s.dtb , so no objections to remove cm4s.dtb from the dtb-list at >>> least temporarily. >>> But please hold cm4.dtb and the cm4_io_.dtb, which will then >>> hopefully not break the rpi-release anymore. >> >> I'm going to go ahead and remove just the rpi-cm4s.dtb, feel free to >> update the port (sysutils/rpi-firmware) to grab it then try again once >> new packages are available with it so that we don't break the snapshot >> again from the same file. >> >> Thanks, >> >> Kyle Evans > > Yes, better at the moment , because > Updating the port would require to test every rpi-model again because > the provided dtb-files >  can sometimes be very „sensitive“ or critical in behavior  . > You are over-complicating this... you don't need to actually update the port to a different version of the rpi-firmware repository. 055e044 is what's currently used, and the .dtb is there; it just needs to be added to the pkg-plist[0] so that it gets sucked into the package. We apparently stage all of boot/* into $DATADIR already (kind of ugly, but whatever floats the port's goat, man) so it shouldn't need anything else and won't invalidate any of the other blobs we package. [0] https://cgit.freebsd.org/ports/tree/sysutils/rpi-firmware/pkg-plist#n22 From nobody Thu Apr 25 23:47: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 4VQXbb5sHxz5JpBD; Thu, 25 Apr 2024 23:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQXbb4kdLz4GTS; Thu, 25 Apr 2024 23:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714088875; 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=t0/QCHGPhsrqexKYQihCctyKatJu4cd/XvbuxMpju3Q=; b=Yj/59zy5BR4GQ0h8GB/FqVrHtXKMh5j6UU9QAa68JZ2yZGXiWQqEgxKkDOTSmYekgo+32a XktPBbwrCkyWAbvZXbamH3zIzltCAa5Z/PG0ykiJr/Pw59JX8UDD4khsJQDgansvXMlUed P5sOeuTONn0s4cH13qoN4sZd+iKOh5GL1WBT7Mkuw71cKup56aqH01haevuO3fH3XKLFjw 6wQCdKfYBEAYpuuUD4tPkm4Py/HdlhHpWZRQ9ttVOVmGg+xVwiBJECkflEVVUj7y01IMy8 apIB54ok5UBzsCoBv1KXQ2BHick5SdyuXvDpF5d9coFBPfHUZpAKLu3cp1/ISQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714088875; a=rsa-sha256; cv=none; b=I332EIXdMnG+6L8KOEOTdd02DCaOfYOdpKLabawpylj/MRb4eXkUta+cAklgVf1FpgD7fO xicCQkJRytGtWUTG8ygWzGlG1YzSiqqRphygR1ZtTz2fikLE+2p2lRgbvn9dBfyrd47qdJ GctnG9pRUTJIc9kRLTFAUnbjEN7D7kLkCeHeRy+AnHImWDpfxTj0Hag+N+VpKUnFanfTOU XDuD7r0SOUmUuAX2qOvE5kZnshAxJo6DJ5og9QtfEXojMCxc8KKhCxUVeXHH0g53IUljm4 h6BRXscsppvIIzHEux0IAEbcxTxeTnH9bSsBFEmB/3ddWqA9F4T/Cujw/Imvkw== 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=1714088875; 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=t0/QCHGPhsrqexKYQihCctyKatJu4cd/XvbuxMpju3Q=; b=BNURWOtZVJGYelYqPjcoMzDn/tdypNgf7HL+3gVSnTOCrlKTEIcqxTzPwy2aMyEOCIpbXC ekvRjPK3bgx7USNYZE1EFJ5WdMV3Jk/zhjlbCffiLPDFQsarVd3BMeWBAcdhL2J8MPAgRJ uwJsCfI6PxMIhuDaQGVrGpKD/C1nGtzAKvHZbuINIRJB5wrLDY9dj1KMQF4Nm8xyGexKSV bGoy1O4IkN1VMDHBq4YlQq7m+S1f3HsBhspMnmWkLFCrpMSN/2iIXMU47RIEPHn+hykzf5 LefX3Io/bF3IhsKmkd2OdS/C41YMeZRPE66OokE/lUleULd8yXMQNjCi/ahkIA== 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 4VQXbb456czKct; Thu, 25 Apr 2024 23:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PNltmU055597; Thu, 25 Apr 2024 23:47:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PNltdv055594; Thu, 25 Apr 2024 23:47:55 GMT (envelope-from git) Date: Thu, 25 Apr 2024 23:47:55 GMT Message-Id: <202404252347.43PNltdv055594@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: ce3b53ffcc3e - main - nvmecontrol: Flesh out nvmecontrol format information 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: ce3b53ffcc3ecc00fa6283542c60ff1fe697d853 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ce3b53ffcc3ecc00fa6283542c60ff1fe697d853 commit ce3b53ffcc3ecc00fa6283542c60ff1fe697d853 Author: Warner Losh AuthorDate: 2024-04-25 23:47:18 +0000 Commit: Warner Losh CommitDate: 2024-04-25 23:47:18 +0000 nvmecontrol: Flesh out nvmecontrol format information The format command takes a number of different parameters. Include a brief summary of what the values mean, though since the driver's support for metadata is at best weak, 0's are almost always used for values other than -f format. Add an example that ties it all together. Sponsored by: Netflix Reviewed by: pauamma@gundo.com, chuck Differential Revision: https://reviews.freebsd.org/D44958 --- sbin/nvmecontrol/nvmecontrol.8 | 81 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 70 insertions(+), 11 deletions(-) diff --git a/sbin/nvmecontrol/nvmecontrol.8 b/sbin/nvmecontrol/nvmecontrol.8 index b812149b5c7d..b5a85b1ab9f5 100644 --- a/sbin/nvmecontrol/nvmecontrol.8 +++ b/sbin/nvmecontrol/nvmecontrol.8 @@ -442,24 +442,62 @@ Use Extended Data Structure. .Ss format Format either specified namespace, or all namespaces of specified controller, using specified parameters: +.Bl -tag -width 8n +.It Fl f Ar fmt +The index .Ar fmt -LBA Format, +of the parameters to use. +LBA Format #, as specified in the identification of the namespace using +.Dq nvmecontrol identify +command with a namespace specified maps this index into these parameters. +.It Fl m Ar mset +Metadata Setting. .Ar mset -Metadata Settings, -.Ar pi -Protection Information, -.Ar pil +.Bl -tag -compact -width 6n +.It Dv 0 +do not transfer metadata with LBA information +.It Dv 1 +Transfer the metadata as part of the extended LBA information. +.El +.It Fl p Ar pi +Protection Information. +.Bl -tag -compact -width 6n +.It Dv 0 +Protection Information not enabled. +.It Dv 1 +Type 1 information protection enabled. +.It Dv 2 +Type 2 information protection enabled. +.It Dv 3 +Type 3 information protection enabled. +.El +.It Fl l Ar pil Protection Information Location. +.Bl -tag -compact -width 6n +.It Dv 0 +Transfer the protection metadata as the last N bytes of the transfer. +.It Dv 1 +Transfer the protection metadata as the first N bytes of the transfer. +.El +.It Fl E +Enables User Data Erase during format. +All users data is erased and subsequent reads are indeterminate. +The drive may implement this as a cryptographic erase or it may +physically erase the underlying media. +.It Fl C +Enables Cryptographic Erase during format. +All user data is erased cryptographically by deleting the encryption key, +rendering it unintelligible. +.El +.Pp When formatting specific namespace, existing values are used as defaults. When formatting all namespaces, all parameters should be specified. Some controllers may not support formatting or erasing specific or all namespaces. -Option -.Fl E -enables User Data Erase during format. -Option -.Fl C -enables Cryptographic Erase during format. +The +.Xr nvme 4 +driver does not currently support metadata and protection information +transfers. .Ss sanitize Sanitize NVM subsystem of specified controller, using specified parameters: @@ -763,6 +801,27 @@ device. The corresponding .Pa nvmeXnsY device is used automatically. +.Pp +.Dl nvmecontrol format -f 2 -m 0 -p 0 -l 0 -C nvme2 +.Pp +Format all the name spaces on nvme2 using parameters from +.Dq LBA Format #2 +with no metadata or protection data using cryptographic erase. +If the +.Dq nvmecontrol identify -n 1 nvme2 +command ended with +.Pp +.Bl -verbatim +LBA Format #00: Data Size: 512 Metadata Size: 0 Performance: Good +LBA Format #01: Data Size: 512 Metadata Size: 8 Performance: Good +LBA Format #02: Data Size: 4096 Metadata Size: 0 Performance: Good +LBA Format #03: Data Size: 4096 Metadata Size: 8 Performance: Good +LBA Format #04: Data Size: 4096 Metadata Size: 64 Performance: Good +.El +.Pp +then this would give a 4k data format for at least namespace 1, with no +metadata. +.Pp .Sh DYNAMIC LOADING The directories .Pa /lib/nvmecontrol From nobody Fri Apr 26 03:13: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 4VQd9G0TJFz5HQZ1; Fri, 26 Apr 2024 03:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQd9F71h2z4YfB; Fri, 26 Apr 2024 03:13:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714101234; 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=CK9A/P3l3h6bvXB7aVmj1HyAph/yn7RMIXqUMsVJGfE=; b=FM9AyGfOJ9uGnt0xM6aiPSAycn9KTWmhN4hl5WeFf2D4d9iPtRfjlqb5suWc934NtBcHLw Cs38Mefior3L1sMHkbvpfZlDnlPmVy577jEddl2c0Lw45iTKega24e04jBo7UsPGbkTDyx NQnaF4juD2WR2agCNLCG1tkwbac+AQSH5E5O0mIl61p1gkTXlZzZfE1fRcqmbCti5TzhIV oMlNjN0LWb8VkXSEdrQSwYBD7q68+sOjK74oBSqVaMc0Z7OcrizuhghWM81tc9CPeDKSpJ Mry44iptwHHQJMBecbMXCel32MbdRlQUhwQPZG1WSKYQFiRdka0k7BS0NqiSAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714101234; a=rsa-sha256; cv=none; b=iKFJ81I7eQaqVge0LRqCIH8oBBrEZ2gojQ3lahMS4ibtMfsdFH3FedhENiAg0rhoHo3K+C gBJdPSSk5GRHZmRcaaFcjTIzx9WO+YHDJq4H9+HpRkC7he0wafkBIqbd/DogEooMOuWS0P x84PH8tDhk28Bv04AtZPnGLgPRSpE6BIX/cRUMscYmYuO8h7X9/pAxvEMiNq4HIWiN9r+t 4hQ4sOqVL+moYB8lyerEoe6/R08CFwWKhnGCe/S2geTMHFQ9t7mTuhwx/VPudHeVP21URC xZuEgUdwSs2B+tu8+P9zXR81VQ0ZzDv4O8Ya414wYnHJ4ocKnb6LoIHrPfQNAg== 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=1714101234; 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=CK9A/P3l3h6bvXB7aVmj1HyAph/yn7RMIXqUMsVJGfE=; b=Dl5AF3FoYtd5nH7dYiQhpL79veehPt5V4q3jLtJN50/Vb9+Nj365dppGJOukPSGe06TPnS /o+WHCMtxJvalCgYmRvmt1fDMIh72MqY8MgP3n2skxrPSeRLZtf6FasovCPPGSNQoTJEvR 9OWNGQx1FAhTSB87CZ1RRNbVktrDJKUjJ6wZG7k8uXpv6l2j29HJUXZV5/zVSUFGSsukVn MREetRIKB/QtOMwMDwjlX5460HOPgSBZNQet2hhygDguEDyJ7Z276pebWUhdrZ7KRcwc5s LxAmDy+LOVi+882TO8Uog/qTKsPg3bNK9EvaoJ3t8KdWw01WNbhxTYT6ODfQuA== 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 4VQd9F6cqHzR1Z; Fri, 26 Apr 2024 03:13:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43Q3Dr2R009583; Fri, 26 Apr 2024 03:13:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43Q3DrEh009580; Fri, 26 Apr 2024 03:13:53 GMT (envelope-from git) Date: Fri, 26 Apr 2024 03:13:53 GMT Message-Id: <202404260313.43Q3DrEh009580@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: f0e59ecff85d - main - CTL: READ(6) should be allowed on CD devices 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: f0e59ecff85d4b9e875464199e065a269c9c2530 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f0e59ecff85d4b9e875464199e065a269c9c2530 commit f0e59ecff85d4b9e875464199e065a269c9c2530 Author: HP van Braam AuthorDate: 2024-04-26 02:31:12 +0000 Commit: Warner Losh CommitDate: 2024-04-26 02:31:14 +0000 CTL: READ(6) should be allowed on CD devices DOS ASPI drivers use this, with this change applied it is possible to load a DOS ASPI CDROM driver and run the Windows 98 installer. Signed-off-by: HP van Braam Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1202 --- sys/cam/ctl/ctl_cmd_table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/cam/ctl/ctl_cmd_table.c b/sys/cam/ctl/ctl_cmd_table.c index 8b81ea7e56b3..a62c5e8c1e81 100644 --- a/sys/cam/ctl/ctl_cmd_table.c +++ b/sys/cam/ctl/ctl_cmd_table.c @@ -944,6 +944,7 @@ const struct ctl_cmd_entry ctl_cmd_table[256] = /* 08 READ(6) */ {ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_OK_ON_CDROM | CTL_CMD_FLAG_ALLOW_ON_PR_WRESV, CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE, 6, {0x1f, 0xff, 0xff, 0xff, 0x07}}, From nobody Fri Apr 26 04:00: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 4VQfBT5Qmrz5HlfV; Fri, 26 Apr 2024 04:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQfBT4rrKz4h83; Fri, 26 Apr 2024 04:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714104001; 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=rMyXfft9exwbpaMxWDTEp7EZjCVYtmx3EfiCryrMHMI=; b=oF5gv7v4DOHMITDwE0r6BAZ+gv2PanGInlTAkjHX5WYSXgPRI5qZXcKJ14rNuHpeoT+osQ 0WDHH1/MZBh8ulHqX20jkVjuMq6C91I7P2vhp3iK6UtpMuVqeQ1i1Vvv9jySII4H7c86rr pfIepgU5PbWinA0m/7E2TCc7zox9ZnAlWxcN47Z+G4okXm8P283YFnkRJ2WrXruXMUsjlC vOXvTGv7uMyf5KFzlj8UhBemvj/BNs/muZymhbzN7HS7xmil1OEJwEZL0PeoSfC1M86O4l bSuTXJs+3ETu/BUH5H5BzQhGhcIcU1satB6ca3NP/DGFtucVSZhy/WeKWSzLSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714104001; a=rsa-sha256; cv=none; b=R1lZPVxrd5cD6NtD2MF9MvO2tSPG03PoIhf59ZxC1NWAMGROVbdzDhdYTLWW4W9MvX7Jos KkMXIdVrA6PKUv3ewahRApHSm3oS+564OL5j6CXorOYwJ9R6uomnTgIHDfnwraNhYvQ42f ht+J21HgSPsc6NgGNW88ZVRbcZAHh6PCDD5+29Age7SRFWiHb5J0eIUPRvm1BeFPbF/O5p pLpB9gZejzWoQlp5BIdEJyOEHSdoTeeoBxLXMkMoJ2cKu7ceB1WDbx1iYA0qsGYYrdhJXH eqwD30Vvx+wdPqImBGaOQTTpsfEbY4Qr4kZgQk4mkjHM/n/LdsBcsgdAQevp/g== 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=1714104001; 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=rMyXfft9exwbpaMxWDTEp7EZjCVYtmx3EfiCryrMHMI=; b=rXtIR0YnXO1YZidBHaIbyn8GMHPr1ZKusYhkVtLDdQydEjrDgZXeMrBP+Xg8siD09+hHoc Tnsk4zlehpMP5CnQdogdv40Shmy940UQOq3/+uHAvABlp5cy24DJGKfRrWoSiJOYSkg0Z7 POtgLhTnaKS7CVtJQrzjgQeRYrad+K/YF+fiy2iM9wPYEB0EPTaWpjexDkJkPYoNzCeZqt 89/z9DZ5tQ48qWmA+LlfQbdM4kkebZdT3/lM6HYt1EP3HdTq8H3VPl+ysLUwT9w194Ukqw J+LCOOabM5KSVsOdFfDZ3csA2sEfbDMR2jmWh+tIKlXDiXy//sufbIrlO09mYg== 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 4VQfBT4QFLzRvZ; Fri, 26 Apr 2024 04:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43Q401Jb081435; Fri, 26 Apr 2024 04:00:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43Q401HZ081425; Fri, 26 Apr 2024 04:00:01 GMT (envelope-from git) Date: Fri, 26 Apr 2024 04:00:01 GMT Message-Id: <202404260400.43Q401HZ081425@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: 6251027c4252 - main - nfscl: Do not use nfso_own for delayed nfsrpc_doclose() 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: 6251027c4252edb3b8f8fc359a40e610349e9af3 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6251027c4252edb3b8f8fc359a40e610349e9af3 commit 6251027c4252edb3b8f8fc359a40e610349e9af3 Author: Rick Macklem AuthorDate: 2024-04-26 03:58:21 +0000 Commit: Rick Macklem CommitDate: 2024-04-26 03:58:21 +0000 nfscl: Do not use nfso_own for delayed nfsrpc_doclose() When an initial attempt to close an NFSv4 lock returns NFSERR_DELAY, the open structure is put on a list for delayed closing. When this is done, the nfso_own field is set to NULL, so it cannot be used by nfsrpc_doclose(). Without this patch, the NFSv4 client can crash when a NFSv4 server replies NFSERR_DELAY to a Close operation. Fortunately, most extant NFSv4 servers do not do this. This patch avoids the crash for any that do return NFSERR_DELAY for Close. Found during a IETF bakeathon testing event this week. MFC after: 5 days --- sys/fs/nfsclient/nfs_clrpcops.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 75bb5236cb65..8c5532268287 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -826,6 +826,7 @@ nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p, u_int64_t off = 0, len = 0; u_int32_t type = NFSV4LOCKT_READ; int error, do_unlock, trycnt; + bool own_not_null; tcred = newnfs_getcred(); newnfs_copycred(&op->nfso_cred, tcred); @@ -892,22 +893,29 @@ nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p, * There could be other Opens for different files on the same * OpenOwner, so locking is required. */ - NFSLOCKCLSTATE(); - nfscl_lockexcl(&op->nfso_own->nfsow_rwlock, NFSCLSTATEMUTEXPTR); - NFSUNLOCKCLSTATE(); + own_not_null = false; + if (op->nfso_own != NULL) { + own_not_null = true; + NFSLOCKCLSTATE(); + nfscl_lockexcl(&op->nfso_own->nfsow_rwlock, NFSCLSTATEMUTEXPTR); + NFSUNLOCKCLSTATE(); + } do { error = nfscl_tryclose(op, tcred, nmp, p, loop_on_delayed); if (error == NFSERR_GRACE) (void) nfs_catnap(PZERO, error, "nfs_close"); } while (error == NFSERR_GRACE); - NFSLOCKCLSTATE(); - nfscl_lockunlock(&op->nfso_own->nfsow_rwlock); + if (own_not_null) { + NFSLOCKCLSTATE(); + nfscl_lockunlock(&op->nfso_own->nfsow_rwlock); + } LIST_FOREACH_SAFE(lp, &op->nfso_lock, nfsl_list, nlp) nfscl_freelockowner(lp, 0); if (freeop && error != NFSERR_DELAY) nfscl_freeopen(op, 0, true); - NFSUNLOCKCLSTATE(); + if (own_not_null) + NFSUNLOCKCLSTATE(); NFSFREECRED(tcred); return (error); } From nobody Fri Apr 26 08:21:30 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 4VQm0C1WXXz5JCcg; Fri, 26 Apr 2024 08:21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQm0C12xwz446x; Fri, 26 Apr 2024 08:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714119691; 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=M+gHHkkL1Ue+8cL1UqO8MvuRJcmh40Vskuoy3QY/8kw=; b=Cd4sTQjCRMR0hbYECuPZejlqDubhcn7SvTN8gdjVkcA+gnF8VnFwEXLiNbU8k762xMcJST Di7nIFkSnFyV94nWEURCRNKSEE3xFZYCRN1rcxI28EKCHGWCcSIE19tiqfluk6VXrlLGTf 21hAdgSTu5avcnTnKntvMNyzfazgxwXX4SqsZdqh9LQJMahIqlF8L3fL+NFG9FLnyqvZTT dYPUlA/h70MA7oC1Z5atXRFz4WexV8oJ3KAaexP8B8NRopjafEFpJllqP2WdaQZ4smGZEl BynJWpGyxVNtct4oVMjWE2q0zYyMd0AECzIeVKA1jkVP6yi28oB4QWx8fXmHxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714119691; a=rsa-sha256; cv=none; b=L4Gc34srvXpDgS2pyYHZza1cH46RekDn5TU3eCXw2FuWjANBiGUhLotZB7BevmdvV+ElP/ Wo1XoB2NLch2Vw8Eow1TGPs+9BLtjFnLmu+h7J4q84PtNidumxFvtNsP8fbKk8RvSAl/L4 hoRBTHdw1g/7mf/rRyFmaCAyd8R4fh/ZdHpMb9dXdKv191hCAihPDL52I1LRvF9OGxlF2R ibFDv2zUMBYZfzgIguKBwdOwAoDMEOiLzghIRYtDCYVfMQMbwUTr9Yh8MEhRrzeukCE8Rh KPcrC9oDG1G0/0U0d0zUw91nlUchYBg8UY4F5yYt8UnwGj0+xWTu7o6saMJolQ== 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=1714119691; 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=M+gHHkkL1Ue+8cL1UqO8MvuRJcmh40Vskuoy3QY/8kw=; b=GrQKCFYfRL49LSvGBWhp1Rb0qrF2g2m2KE/TjQ9eiQgqEBFKZ5pJiSoBDSCcj3YTbLiKU7 0XSnrsyiBqERmJMbFS6oiGNSP38Z7FmUhz7iVNjQQmsdIIuwUvTAMMSfTna1luT6Iash/r xhi8+EGP+huG8wNEIGD4amdAM2qHOO5wnt+zEMAuaNmqHhu5tNRovXNMQ65xtSAYx5uPp4 WFEVddIBze0trCahfuy2I+clVmnszFulRbyQjhQn6QEvm/KA45Jd+Z9DJ5hxj1Z9IpX17f kAJiDrnmGGOi8EW/nTDhL1+7oNHwSNbNn19wpVUGqPEFo8tSgzTUmksWHOEJHQ== 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 4VQm0C0LLczZwc; Fri, 26 Apr 2024 08:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43Q8LU04032537; Fri, 26 Apr 2024 08:21:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43Q8LUVT032534; Fri, 26 Apr 2024 08:21:30 GMT (envelope-from git) Date: Fri, 26 Apr 2024 08:21:30 GMT Message-Id: <202404260821.43Q8LUVT032534@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: 9b10aa4a0591 - main - stress2: More detailed error reporting 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: 9b10aa4a05915a6519d942fea48113757dcf1699 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=9b10aa4a05915a6519d942fea48113757dcf1699 commit 9b10aa4a05915a6519d942fea48113757dcf1699 Author: Peter Holm AuthorDate: 2024-04-26 08:20:49 +0000 Commit: Peter Holm CommitDate: 2024-04-26 08:20:49 +0000 stress2: More detailed error reporting --- tools/test/stress2/misc/rdwr.sh | 50 +++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/tools/test/stress2/misc/rdwr.sh b/tools/test/stress2/misc/rdwr.sh index c77c955dc210..893056558560 100755 --- a/tools/test/stress2/misc/rdwr.sh +++ b/tools/test/stress2/misc/rdwr.sh @@ -28,6 +28,11 @@ # Test with read/write length of INT_MAX (i386) or INT_MAX+1 (amd64) +# Seen: +# rdwr: readv(). Expected 2147483648 (80000000), got -2147483648 (ffffffff80000000) bytes: No error: 0 +# rdwr: writev(). Expected 2147483648 (80000000), got -2147483648 (ffffffff80000000) bytes: No error: 0 +# Fixed by: 78101d437a92 + . ../default.cfg [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 @@ -61,11 +66,22 @@ EOF #include #include +static int s; + +static void +er(char * syscall, size_t len, ssize_t ret) +{ + warn("%8s. Expected %zu (%zx), got %zd (%zx) bytes", + syscall, len, len, ret, ret); + s=1; +} + int main(int argc, char **argv) { int fd1, fd2; size_t len; + ssize_t r; void *p; struct iovec iov; @@ -85,34 +101,34 @@ main(int argc, char **argv) MAP_FAILED) err(1, "mmap"); - if (read(fd2, p, len) != len) - err(1, "read"); + if ((r = read(fd2, p, len)) != len) + er("read()", len, r); - if (write(fd1, p, len) != len) - err(1, "write"); + if ((r = write(fd1, p, len)) != len) + er("write()", len, r); - if (pread(fd2, p, len, 0) != len) - err(1, "pread"); + if ((r = pread(fd2, p, len, 0)) != len) + er("pread()", len, r); - if (pwrite(fd1, p, len, 0) != len) - err(1, "pwrite"); + if ((r = pwrite(fd1, p, len, 0)) != len) + er("pwrite()", len, r); iov.iov_base = p; iov.iov_len = len; - if (readv(fd2, &iov, 1) != len) - err(1, "readv"); + if ((r = readv(fd2, &iov, 1)) != len) + er("readv()", len, r); - if (writev(fd1, &iov, 1) != len) - err(1, "writev"); + if ((r = writev(fd1, &iov, 1)) != len) + er("writev()", len, r); - if (preadv(fd2, &iov, 1, 0) != len) - err(1, "preadv"); + if ((r = preadv(fd2, &iov, 1, 0)) != len) + er("preadv()", len, r); - if (pwritev(fd1, &iov, 1, 0) != len) - err(1, "pwritev"); + if ((r = pwritev(fd1, &iov, 1, 0)) != len) + er("pwritev()", len, r); close(fd1); close(fd2); - return (0); + return (s); } From nobody Fri Apr 26 09:27:25 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 4VQnSG1BPtz5JK0W; Fri, 26 Apr 2024 09:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQnSG0hqzz49W4; Fri, 26 Apr 2024 09:27:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714123646; 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=7nkaYMmHZ9NFCWydKg/Ccz1Rt5JDbgcF0CEgqKK/eNc=; b=h3wsTPXVlmLn+EMxupTm+Ob0NtjMtXzUNK17GOhMyCh9l28Y1adD+0H9Kwll5QcVlx8jb9 LxrekiYBan9zwZ9U5dbQ2NdcAw6flcxqvVziOMrG+wp+IlFFFksS/5XgfJpYzRdj2fuxtJ z4zow02dpG8JSunNMgve0hvOD1pfUDgN/boN9ih3g2jeXyoT2F6ei+rgV6f9+sdFKAMipU nOZWxqBCvpFzWbfqCO7YzLtXRcr4HTchh/fcBVJ7iCN4kK47u6uJZ9+LeGUxqMnKeNYS66 hb0HtygHL3AREpalzNxrY7ONcuMizcPu/PFGnr58MPjF0+VgdrhsngM9ef7ZDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714123646; a=rsa-sha256; cv=none; b=ns45VFR6HjkPEf3eh4uonl+n0nZbtaMaDnDrTDn+zfBLh6K2SaYIKcdwcHlzTpKKAUQy2C gwalC3zNMEQ5uZb9yGzO5f5z/tOLEi6QiAngjePbNYpecPiLrRi2LaUtNVdg6GR4nyAw/e mopEn4W8+8naiOi7XxCShpc/cC7/L3vtplQp20IinM97l/J8raz4x0+2QcO+8TxXfe8PfG v2O9uNX65hQW1MUjltRyBitW2miw03VadIFXQLBLdHVeX9JczQVN7r2INQHVqZuC/yCpf8 uRx4l+pnLm0pD6lXFvUOgaIcdrG2QRSPiNvxzT0M+E+G5JO0QFzU6a/YtQbPIA== 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=1714123646; 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=7nkaYMmHZ9NFCWydKg/Ccz1Rt5JDbgcF0CEgqKK/eNc=; b=nV5bxjAiARmWny3rTxQPkIrc5FTjOal7s3jf4JWs2GdAUI8PAd1RR193o4rXC3aR9MzcOW /eXm4K0FqxKIyGAGLLtXBacUnrAlA23606HMTZnEmUWAsffd+Z+DjneWH3nOgY3eOBdx3d +glXZec/R2ZYXo0dsXqsTTec70a1q9753x/PaORWBEqB4GddocUDZHxaxSF9bVvhT963fh hnc/NZe+Re7Ubk5NxA8U2IiqzfdGlFwSKPvPBWzaW3NbcK+nEdP9VczF0Gnl+1/sTHEIez 0Tr6HlL8jWkzvcA3nstA7pNCIEAFMTTtgExmnM3PkXsLcFgAgIS1d9kdQzucrQ== 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 4VQnSG0BtzzcPk; Fri, 26 Apr 2024 09:27:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43Q9RP9r038492; Fri, 26 Apr 2024 09:27:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43Q9RPbT038489; Fri, 26 Apr 2024 09:27:25 GMT (envelope-from git) Date: Fri, 26 Apr 2024 09:27:25 GMT Message-Id: <202404260927.43Q9RPbT038489@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: eeb04a736cb9 - main - date: Add support for nanoseconds 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eeb04a736cb9c07d191af886e25d5f198824658e Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=eeb04a736cb9c07d191af886e25d5f198824658e commit eeb04a736cb9c07d191af886e25d5f198824658e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-21 21:25:32 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-04-26 09:26:50 +0000 date: Add support for nanoseconds This patch introduces support for a conversion specification for nanoseconds. The format of %N is meant to be compatible with that of GNU date. The nanoseconds conversion specification is implemented directly in date(1) instead of libc (in strftime(3)) to avoid introducing non-standard functions to libc at this time and modifying struct tm. Apart from introducing the nanoseconds conversion specification, this patch brings the following changes: - The "ns" format for ISO 8061 dates is now unlocked. E.g., date -Ins prints: 2024-04-22T12:20:28,763742224+02:00 - The -r flag when fed a file is now aware of the nanosecond part of the last modification time. - date(1) is now able to set the time with nanosecond precision. It is not possible as of now to do that by specifying nanoseconds directly via the command-line arguments. Instead, the -r flag can be used. - date(1) is now using the clock_gettime(3) family of functions instead of ctime(3) family of functions where possible. Reviewed by: des, markj Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D44905 --- bin/date/date.1 | 28 ++++++-- bin/date/date.c | 132 ++++++++++++++++++++++++++++------- bin/date/tests/format_string_test.sh | 17 ++++- 3 files changed, 142 insertions(+), 35 deletions(-) diff --git a/bin/date/date.1 b/bin/date/date.1 index 286b1f45414a..afa6d555a503 100644 --- a/bin/date/date.1 +++ b/bin/date/date.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 19, 2023 +.Dd April 26, 2024 .Dt DATE 1 .Os .Sh NAME @@ -141,17 +141,19 @@ values are .Cm date , .Cm hours , .Cm minutes , +.Cm seconds , and -.Cm seconds . +.Cm ns No Pq for nanoseconds . The date and time is formatted to the specified precision. When .Ar FMT is .Cm hours -(or the more precise -.Cm minutes +.Po or the more precise +.Cm minutes , +.Cm seconds , or -.Cm seconds ) , +.Cm ns Pc , the .St -iso8601 format includes the timezone. @@ -325,7 +327,9 @@ which specifies the format in which to display the date and time. The format string may contain any of the conversion specifications described in the .Xr strftime 3 -manual page, as well as any arbitrary text. +manual page and +.Ql %N +for nanoseconds, as well as any arbitrary text. A newline .Pq Ql \en character is always output after the characters specified by @@ -551,6 +555,7 @@ prints: and exits with status 1. .Sh SEE ALSO .Xr locale 1 , +.Xr clock_gettime 2 , .Xr gettimeofday 2 , .Xr getutxent 3 , .Xr strftime 3 , @@ -581,6 +586,12 @@ The format selected by the .Fl I flag is compatible with .St -iso8601 . +.Pp +The +.Ql %N +conversion specification for nanoseconds is a non-standard extension. +It is compatible with GNU date's +.Ql %N . .Sh HISTORY A .Nm @@ -599,3 +610,8 @@ The .Fl I flag was added in .Fx 12.0 . +.Pp +The +.Ql %N +conversion specification was added in +.Fx 15.0 . diff --git a/bin/date/date.c b/bin/date/date.c index 0ff3b9f74cbd..ccd72cb98445 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -50,14 +51,14 @@ #define TM_YEAR_BASE 1900 #endif -static time_t tval; - static void badformat(void); static void iso8601_usage(const char *) __dead2; static void multipleformats(void); static void printdate(const char *); -static void printisodate(struct tm *); -static void setthetime(const char *, const char *, int); +static void printisodate(struct tm *, long); +static void setthetime(const char *, const char *, int, struct timespec *); +static size_t strftime_ns(char * __restrict, size_t, const char * __restrict, + const struct tm * __restrict, long); static void usage(void) __dead2; static const struct iso8601_fmt { @@ -68,6 +69,7 @@ static const struct iso8601_fmt { { "hours", "T%H" }, { "minutes", ":%M" }, { "seconds", ":%S" }, + { "ns", ",%N" }, }; static const struct iso8601_fmt *iso8601_selected; @@ -76,6 +78,7 @@ static const char *rfc2822_format = "%a, %d %b %Y %T %z"; int main(int argc, char *argv[]) { + struct timespec ts; int ch, rflag; bool Iflag, jflag, Rflag; const char *format; @@ -126,11 +129,12 @@ main(int argc, char *argv[]) break; case 'r': /* user specified seconds */ rflag = 1; - tval = strtoq(optarg, &tmp, 0); + ts.tv_sec = strtoq(optarg, &tmp, 0); if (*tmp != 0) { - if (stat(optarg, &sb) == 0) - tval = sb.st_mtim.tv_sec; - else + if (stat(optarg, &sb) == 0) { + ts.tv_sec = sb.st_mtim.tv_sec; + ts.tv_nsec = sb.st_mtim.tv_nsec; + } else usage(); } break; @@ -149,8 +153,8 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (!rflag && time(&tval) == -1) - err(1, "time"); + if (!rflag && clock_gettime(CLOCK_REALTIME, &ts) == -1) + err(1, "clock_gettime"); format = "%+"; @@ -166,7 +170,7 @@ main(int argc, char *argv[]) } if (*argv) { - setthetime(fmt, *argv, jflag); + setthetime(fmt, *argv, jflag, &ts); ++argv; } else if (fmt != NULL) usage(); @@ -179,7 +183,7 @@ main(int argc, char *argv[]) if (outzone != NULL && setenv("TZ", outzone, 1) != 0) err(1, "setenv(TZ)"); - lt = localtime(&tval); + lt = localtime(&ts.tv_sec); if (lt == NULL) errx(1, "invalid time"); badv = vary_apply(v, lt); @@ -192,7 +196,7 @@ main(int argc, char *argv[]) vary_destroy(v); if (Iflag) - printisodate(lt); + printisodate(lt, ts.tv_nsec); if (format == rfc2822_format) /* @@ -202,7 +206,7 @@ main(int argc, char *argv[]) setlocale(LC_TIME, "C"); - (void)strftime(buf, sizeof(buf), format, lt); + (void)strftime_ns(buf, sizeof(buf), format, lt, ts.tv_nsec); printdate(buf); } @@ -216,19 +220,19 @@ printdate(const char *buf) } static void -printisodate(struct tm *lt) +printisodate(struct tm *lt, long nsec) { const struct iso8601_fmt *it; - char fmtbuf[32], buf[32], tzbuf[8]; + char fmtbuf[64], buf[64], tzbuf[8]; fmtbuf[0] = 0; for (it = iso8601_fmts; it <= iso8601_selected; it++) strlcat(fmtbuf, it->format_string, sizeof(fmtbuf)); - (void)strftime(buf, sizeof(buf), fmtbuf, lt); + (void)strftime_ns(buf, sizeof(buf), fmtbuf, lt, nsec); if (iso8601_selected > iso8601_fmts) { - (void)strftime(tzbuf, sizeof(tzbuf), "%z", lt); + (void)strftime_ns(tzbuf, sizeof(tzbuf), "%z", lt, nsec); memmove(&tzbuf[4], &tzbuf[3], 3); tzbuf[3] = ':'; strlcat(buf, tzbuf, sizeof(buf)); @@ -240,15 +244,14 @@ printisodate(struct tm *lt) #define ATOI2(s) ((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0')) static void -setthetime(const char *fmt, const char *p, int jflag) +setthetime(const char *fmt, const char *p, int jflag, struct timespec *ts) { struct utmpx utx; struct tm *lt; - struct timeval tv; const char *dot, *t; int century; - lt = localtime(&tval); + lt = localtime(&ts->tv_sec); if (lt == NULL) errx(1, "invalid time"); lt->tm_isdst = -1; /* divine correct DST */ @@ -329,18 +332,17 @@ setthetime(const char *fmt, const char *p, int jflag) } /* convert broken-down time to GMT clock time */ - if ((tval = mktime(lt)) == -1) + if ((ts->tv_sec = mktime(lt)) == -1) errx(1, "nonexistent time"); + ts->tv_nsec = 0; if (!jflag) { utx.ut_type = OLD_TIME; memset(utx.ut_id, 0, sizeof(utx.ut_id)); (void)gettimeofday(&utx.ut_tv, NULL); pututxline(&utx); - tv.tv_sec = tval; - tv.tv_usec = 0; - if (settimeofday(&tv, NULL) != 0) - err(1, "settimeofday (timeval)"); + if (clock_settime(CLOCK_REALTIME, ts) != 0) + err(1, "clock_settime"); utx.ut_type = NEW_TIME; (void)gettimeofday(&utx.ut_tv, NULL); pututxline(&utx); @@ -351,6 +353,82 @@ setthetime(const char *fmt, const char *p, int jflag) } } +/* + * The strftime_ns function is a wrapper around strftime(3), which adds support + * for features absent from strftime(3). Currently, the only extra feature is + * support for %N, the nanosecond conversion specification. + * + * The functions scans the format string for the non-standard conversion + * specifications and replaces them with the date and time values before + * passing the format string to strftime(3). The handling of the non-standard + * conversion specifications happens before the call to strftime(3) to handle + * cases like "%%N" correctly ("%%N" should yield "%N" instead of nanoseconds). + */ +static size_t +strftime_ns(char * __restrict s, size_t maxsize, const char * __restrict format, + const struct tm * __restrict t, long nsec) +{ + size_t prefixlen; + size_t ret; + char *newformat; + char *oldformat; + const char *prefix; + const char *suffix; + const char *tok; + bool seen_percent; + + seen_percent = false; + if (asprintf(&newformat, "%s", format) < 0) + err(1, "asprintf"); + tok = newformat; + for (tok = newformat; *tok != '\0'; tok++) { + switch (*tok) { + case '%': + /* + * If the previous token was a percent sign, + * then there are two percent tokens in a row. + */ + if (seen_percent) + seen_percent = false; + else + seen_percent = true; + break; + case 'N': + if (seen_percent) { + oldformat = newformat; + prefix = oldformat; + prefixlen = tok - oldformat - 1; + suffix = tok + 1; + /* + * Construct a new format string from the + * prefix (i.e., the part of the old fromat + * from its beginning to the currently handled + * "%N" conversion specification, the + * nanoseconds, and the suffix (i.e., the part + * of the old format from the next token to the + * end). + */ + if (asprintf(&newformat, "%.*s%.9ld%s", + (int)prefixlen, prefix, nsec, + suffix) < 0) { + err(1, "asprintf"); + } + free(oldformat); + tok = newformat + prefixlen + 9; + } + seen_percent = false; + break; + default: + seen_percent = false; + break; + } + } + + ret = strftime(s, maxsize, newformat, t); + free(newformat); + return (ret); +} + static void badformat(void) { @@ -374,7 +452,7 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n", - "usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]", + "usage: date [-jnRu] [-I[date|hours|minutes|seconds|ns]] [-f input_fmt]", " " "[ -z output_zone ] [-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]", " " diff --git a/bin/date/tests/format_string_test.sh b/bin/date/tests/format_string_test.sh index a3e2939bfe5c..c2fe2111373f 100755 --- a/bin/date/tests/format_string_test.sh +++ b/bin/date/tests/format_string_test.sh @@ -30,6 +30,17 @@ check() date -r ${TEST2} +%${format_string} } +atf_test_case flag_r_file_test +flag_r_file_test_body() +{ + local file + + file="./testfile" + touch "$file" + atf_check -o "inline:$(stat -f '%9Fm' "$file")\n" \ + date -r "$file" +%s.%N +} + format_string_test() { local desc exp_output_1 exp_output_2 flag @@ -98,6 +109,8 @@ iso8601_${desc}_parity_body() { atf_init_test_cases() { + atf_add_test_case flag_r_file_test + format_string_test A A Saturday Monday format_string_test a a Sat Mon format_string_test B B February November @@ -118,6 +131,7 @@ atf_init_test_cases() format_string_test l l " 7" " 9" format_string_test M M 04 20 format_string_test m m 02 11 + format_string_test N N 000000000 000000000 format_string_test p p AM PM format_string_test R R 07:04 21:20 format_string_test r r "07:04:03 AM" "09:20:00 PM" @@ -143,6 +157,5 @@ atf_init_test_cases() iso8601_string_test hours hours "" "1970-02-07T07+00:00" "2001-11-12T21+00:00" iso8601_string_test minutes minutes "" "1970-02-07T07:04+00:00" "2001-11-12T21:20+00:00" iso8601_string_test seconds seconds "" "1970-02-07T07:04:03+00:00" "2001-11-12T21:20:00+00:00" - # BSD date(1) does not support fractional seconds at this time. - #iso8601_string_test ns ns "" "1970-02-07T07:04:03,000000000+00:00" "2001-11-12T21:20:00,000000000+00:00" + iso8601_string_test ns ns "" "1970-02-07T07:04:03,000000000+00:00" "2001-11-12T21:20:00,000000000+00:00" } From nobody Fri Apr 26 09:38: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 4VQnj06FDpz5JKtY; Fri, 26 Apr 2024 09:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQnj05j2kz4Cn9; Fri, 26 Apr 2024 09:38:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714124308; 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=KmI843eki0qDU1cWG6yaA3xdGUDtBEP8CpOWf+yHhBk=; b=FdNqVQ7j0q/6OvNOIPUIW/q6baNc9O+qs3EI2gXc7bWDzxONzDv8KCkPkCtUDFMlyTTTAw MDIGTpimUzaySRglT3enOI/7Oa1y1Rnm/zQOVkZq+9e8WUF8ju1aF07nokSV+xPfKlvTgV H+b7o244w9LTnMR360SfG71gS3pnLARdSzgfNee4dozUYIGwRVXYlsJZUfmRm+5spRokfx c5+NRcIwZSenvl89TaOOsilyZ4K00bAbOfWon86B15oJJDYoPztACmyis+GEVTJTX7KYOG qIqqS/BxWIMhYDncT0tZeSc3cDuqTWJRQ794glrJqPoD29kVJmo4yS6miWWTow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714124308; a=rsa-sha256; cv=none; b=M7fU6hZFPJ/88jCNFH494JC7LAnD53GP80r9x8BNpmrQV4+jdmGukwyTTIyQlfGaJss0dB m6f/c/qJheqlYtTOgUdEdWxj/5zKXBipTRa3pWpLl2ycKB+kOMbNoQhNXHZlZ7qpeXNGOc N3fan0jYNzrkvJwLnCjzq+sFk9PsrZMGC3bhC7br6+R2gQwozxKD1d54QgO9s4c21+2ULt /0EGKq2DPkpCz/O5D9vplKnTR9ryC+sSlXoXzGdU7lbdSU/9NNFHc2FTkqytFFwxMG+qyW XVaZmCQekbfA4hZ3OogXkoKav91ntjzKzf11mhOvqQ62UOYDUjO8nZ/Ye4gDXg== 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=1714124308; 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=KmI843eki0qDU1cWG6yaA3xdGUDtBEP8CpOWf+yHhBk=; b=IS+zicWjICXEwHNiQis2beZLQ+CwirkPOlmHttG3IY8C0APMcUkNjYSSZMNDtrt0hQ49az stFzSjn7nE17S6X1RQrcW59aOTcstTuWMdCFdIjCtkSZKULeFGelhf7TX+RpEPe5bFz95I Gp7ZXzsIAA+p56NM5F8suBZCamA1fRAVuiLjroIneI7/oUBtAXuMRUzkwnAUJXG1W1Q6Pi 2dZda+Jp3T7AQeWRlmtsJmEGQvRQ/s+A0B5m3aYKRA6ypnHQuZYiSU1QWfuCQVGAllsIf2 kSbmq58fyQW9RtoRfzY4N7T3F7prGOK3BQKcl7UUcl42ddEi4Fpr2IbmTt+IRg== 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 4VQnj05JPDzdGC; Fri, 26 Apr 2024 09:38:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43Q9cSSl055240; Fri, 26 Apr 2024 09:38:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43Q9cSwG055237; Fri, 26 Apr 2024 09:38:28 GMT (envelope-from git) Date: Fri, 26 Apr 2024 09:38:28 GMT Message-Id: <202404260938.43Q9cSwG055237@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5626f9e79090 - main - style.9: Document the existence of tools/build/checkstyle9.pl 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5626f9e790901999def12040a60746b0ceeb9b95 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=5626f9e790901999def12040a60746b0ceeb9b95 commit 5626f9e790901999def12040a60746b0ceeb9b95 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-26 09:37:01 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-04-26 09:37:01 +0000 style.9: Document the existence of tools/build/checkstyle9.pl MFC after: 3 days Sponsored by: Klara, Inc. --- share/man/man9/style.9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index b111619e8ff6..8eb82e3419ec 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 29, 2024 +.Dd April 26, 2024 .Dt STYLE 9 .Os .Sh NAME @@ -904,6 +904,10 @@ instead of the older .Fn CTASSERT . .Sh FILES .Bl -tag -width indent +.It Pa /usr/src/tools/build/checkstyle9.pl +A script to check for violations of +.Nm +in a source file. .It Pa /usr/src/tools/tools/editing/freebsd.el An Emacs plugin to follow the .Fx From nobody Fri Apr 26 13:30: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 4VQtsX4N77z5JhCZ for ; Fri, 26 Apr 2024 13:31:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQtsX2c7kz4YGd for ; Fri, 26 Apr 2024 13:31:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a55911bff66so279926166b.0 for ; Fri, 26 Apr 2024 06:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1714138271; x=1714743071; 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=/O28NxtaPL2MkqAHhVyc6WqaYDhMrjj/eKi8Ydl5KI0=; b=xxg6FrZf4+f/ZWX9AwM2bZyOOy3JyJFi0q3SMcxXI6Iy8/65zvistc0zPRGD/C41Yd R5i/lzBlycnhTWJbqXCKLv1CJ8NCjoVZ01wehZrNCP5Vdp9o0t6nj6+EWn1mwEdzxdsI DvvJtN0Sid2MvWqeeaJILqAQdV2gwpYLiKr5XhJh6gsBeicp6xfkPlERE+nY9sBjiX9j VXF+4oDLPOvbK4H9XDTfTxFyCn5Ft/g0LYFBB5utHrGnzS6yXWOBUk5PK7Vy81K3XTlB 4YETmTxjBQtS66mmre28u1m/abuchWlBm4IHA4pUKmlpOxzWq1+Hpd6s03pmv2HPo44X 9iBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714138271; x=1714743071; 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=/O28NxtaPL2MkqAHhVyc6WqaYDhMrjj/eKi8Ydl5KI0=; b=pe7kfiywpgD3xwhHAuSFuNIqa1tFWh6bsWkfnP2mPDpnu4Y9PZb5xZoOCpaE8NKoAz tSefohenC7JIAitx4oYpytIB4uyeMaGyJCkU7x2+oiz8cuAEaeJTM6tW2v79fkL+fQHa +fAysgXqfvZqH5rdRrUTeeDAHBQwgLpFCkpbRLRpUZvcU1/0MEx0RG+3KNHlshO9WPfc LO1ViJ3aY55FielSp2Jr92iSfoN1dvO50cX8zdDH9JIGJmZZHuCE1ss3UpNDRdKV7qdn FpuvlypbAuzj3nHBFg2hzFTKH2DWOhRb5mvSh1bM5Q9XG3adFiAcq+qWSmD1P9QcJCqp 9Qxg== X-Forwarded-Encrypted: i=1; AJvYcCWl4DAyvdw5iyZoNeNbWFBhPUXlVlOrqsRaQ6of+JDMr7ZWSRKdI+9oOSNTsUei7wtPkWp7cjtKLExC/0dd+oNOWCXou3CFYQFPTSHm+zhjVw== X-Gm-Message-State: AOJu0YxV29aY8lhC9d20Hg+gRr1P6X72YTAF0gNygoSIHRq/KlAWL1Lw s1OhNZKmVGRGuJ0YdpXCj3rJsZaUd7WE1B6DxLbW4lLTDnMkvY0j8G+A6v9KMHvnR+Doi+RPp1/ q9joFRxW4mMaI5lG+2a3tvHOBfTQRBoqtyqBctNd2PMIDEIVF X-Google-Smtp-Source: AGHT+IFeOlRpgSbQcwWBNZrSeSmZZo99wxBkg2MUJ0giAu86R50zZbyOWYXo7bOXL0aFzHp4rZZ5+AtdUTANl+HVLX0= X-Received: by 2002:a17:906:2810:b0:a55:b93e:90ef with SMTP id r16-20020a170906281000b00a55b93e90efmr1771782ejc.77.1714138270665; Fri, 26 Apr 2024 06:31:10 -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: <202404260938.43Q9cSwG055237@gitrepo.freebsd.org> In-Reply-To: <202404260938.43Q9cSwG055237@gitrepo.freebsd.org> From: Warner Losh Date: Fri, 26 Apr 2024 07:30:57 -0600 Message-ID: Subject: Re: git: 5626f9e79090 - main - style.9: Document the existence of tools/build/checkstyle9.pl To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000b828ef0616ffea11" 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: 4VQtsX2c7kz4YGd --000000000000b828ef0616ffea11 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 26, 2024, 3:38=E2=80=AFAM Mateusz Piotrowski <0mp@freebsd.org> = wrote: > The branch main has been updated by 0mp: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D5626f9e790901999def12040a60746b= 0ceeb9b95 > > commit 5626f9e790901999def12040a60746b0ceeb9b95 > Author: Mateusz Piotrowski <0mp@FreeBSD.org> > AuthorDate: 2024-04-26 09:37:01 +0000 > Commit: Mateusz Piotrowski <0mp@FreeBSD.org> > CommitDate: 2024-04-26 09:37:01 +0000 > > style.9: Document the existence of tools/build/checkstyle9.pl > > MFC after: 3 days > Sponsored by: Klara, Inc. > --- > share/man/man9/style.9 | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 > index b111619e8ff6..8eb82e3419ec 100644 > --- a/share/man/man9/style.9 > +++ b/share/man/man9/style.9 > @@ -22,7 +22,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY = OF > .\" SUCH DAMAGE. > .\" > -.Dd January 29, 2024 > +.Dd April 26, 2024 > .Dt STYLE 9 > .Os > .Sh NAME > @@ -904,6 +904,10 @@ instead of the older > .Fn CTASSERT . > .Sh FILES > .Bl -tag -width indent > +.It Pa /usr/src/tools/build/checkstyle9.pl > +A script to check for violations of > Egregious violations and there are some false positives still. +.Nm > +in a source file. > .It Pa /usr/src/tools/tools/editing/freebsd.el > An Emacs plugin to follow the > .Fx > --000000000000b828ef0616ffea11 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Apr 26, 2024, 3:38=E2=80=AFAM Mateusz Piotrows= ki <0mp@freebsd.org> wrote:
The branch main has been updated by 0= mp:

URL: ht= tps://cgit.FreeBSD.org/src/commit/?id=3D5626f9e790901999def12040a60746b0cee= b9b95

commit 5626f9e790901999def12040a60746b0ceeb9b95
Author:=C2=A0 =C2=A0 =C2=A0Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2024-04-26 09:37:01 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2024-04-26 09:37:01 +0000

=C2=A0 =C2=A0 style.9: Document the existence of tools/build/checkst= yle9.pl

=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 3 days
=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0Klara, Inc.
---
=C2=A0share/man/man9/style.9 | 6 +++++-
=C2=A01 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/share/man/man9/style.9 b/share/man/man9/style.9
index b111619e8ff6..8eb82e3419ec 100644
--- a/share/man/man9/style.9
+++ b/share/man/man9/style.9
@@ -22,7 +22,7 @@
=C2=A0.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSS= IBILITY OF
=C2=A0.\" SUCH DAMAGE.
=C2=A0.\"
-.Dd January 29, 2024
+.Dd April 26, 2024
=C2=A0.Dt STYLE 9
=C2=A0.Os
=C2=A0.Sh NAME
@@ -904,6 +904,10 @@ instead of the older
=C2=A0.Fn CTASSERT .
=C2=A0.Sh FILES
=C2=A0.Bl -tag -width indent
+.It Pa /usr/src/tools/build/checkstyle9.pl
+A script to check for violations of

Egregious violations and there are so= me false positives still.

+.Nm
+in a source file.
=C2=A0.It Pa /usr/src/tools/tools/editing/freebsd.el
=C2=A0An Emacs plugin to follow the
=C2=A0.Fx
--000000000000b828ef0616ffea11-- From nobody Fri Apr 26 15:34: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 4VQxbG4bbRz5HQYq; Fri, 26 Apr 2024 15:34:02 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQxbG44xMz4jMf; Fri, 26 Apr 2024 15:34:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714145642; 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=2TsmtqaUqfaY8nbbGGUK75IvAOdEuXeOHJCjUyHlSyw=; b=I/gBo5bQMrVukznvjXjcV270UI0S18O2HTMA3MGmhVoPNaH9gdgBMxthY/9e503mycd/9S 7nsHQesCOTMjLUprHXT043IN+6OlbQ2J76hxpYUrXq/YUFZjNuLwRiZ4kF9UV5z07gEPrC CFBX2h4V2p8jTtMDjJdOrdi+GI2Az1VFJdhhyOwirn1g8I6+uscYSwR6Z9gBt6RBLDMv64 rmI6kEaEdOobGjXj9V4is1jcvkPbKV6NVJ6ileP/wrsf6+lo0f5DygMP1D3iDA5IC5vJ3S +MNGwleUKS9ABAGOh67LdV95AMxUCv2QZiApIk2KtuPvVT0EoWKmzD4ePwAdkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714145642; a=rsa-sha256; cv=none; b=y34VnJbZgJaJrdlfLhm8xtBLIjHJe/qVUi7vvO9skVGHMglj6pka20TqrpsHsyFTfkV6ka jhda9pGsIpi2QGatJ8MJno/xywoZfNdwKTgG1/m0jJ1RkPcX0CFT6gnqJTXk7mRCy+XW3S 5Aty8yG3HYOMPD0+qZRyiqtoaSwkHOw7dx6tw4ILocsKfvgWvSP03R8W4Gluha3gQY2VTd IyOaniaGE2kfB0jPp0C8jGadPeaF118cTf9hBGXJ7XoOLCiTHF/R1P5uqMHwLKthGEvH4O zUTf0aVsET7z+MiX0ARH2MIuywzY/09Aqbmxumpb4t2Q4Csrs873hFfis78zMw== 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=1714145642; 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=2TsmtqaUqfaY8nbbGGUK75IvAOdEuXeOHJCjUyHlSyw=; b=tMvrDRTyAZrm8w4k/XEjXoUQHv/VMin9NJBiZw/KrLtFaOKC1ULGk//KZALjPnxjLYk4dC QthOTWyJePmWlnLcKoCC5aeCCnMtaNl0bFhWeIkHARUMDp/tLIl9n577IfpFFravnkwsqu IOrHC9OpanHwH9/tzBp032YcHmgccMHmNT9ctlH8kOpDjiPrFLEiFVWfnNimEepMcb4ri6 4ac/2ntta2vjCPvDuVEv3QMUFprU94JbAcTYcyFlUBfe53U9CjlosbaUGiSkJurQch2HPB SDCKpyXh5ux5Zf5s0Eg5xGZa6O6CGAb3uw0G1/xKHKyb+5ch8PP1zMqRkq359g== 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 4VQxbG3h8pzpPT; Fri, 26 Apr 2024 15:34:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43QFY2vc062434; Fri, 26 Apr 2024 15:34:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43QFY2qb062431; Fri, 26 Apr 2024 15:34:02 GMT (envelope-from git) Date: Fri, 26 Apr 2024 15:34:02 GMT Message-Id: <202404261534.43QFY2qb062431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 7b390cb63689 - main - date: Fix tests by initializing timespec structure 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b390cb636899582243e4daa8edbdb30d686d9fb Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b390cb636899582243e4daa8edbdb30d686d9fb commit 7b390cb636899582243e4daa8edbdb30d686d9fb Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-26 15:19:18 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-04-26 15:32:57 +0000 date: Fix tests by initializing timespec structure The tests related to nanosecond support were failing on amd64 due to uninitialized timespec structure. Fixes: eeb04a736cb9 date: Add support for nanoseconds Reviewed by: markj Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D44975 --- bin/date/date.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/date/date.c b/bin/date/date.c index ccd72cb98445..718c94601dd6 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -96,6 +96,8 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); rflag = 0; Iflag = jflag = Rflag = 0; + ts.tv_sec = 0; + ts.tv_nsec = 0; while ((ch = getopt(argc, argv, "f:I::jnRr:uv:z:")) != -1) switch((char)ch) { case 'f': From nobody Fri Apr 26 16:39: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 4VQz2X3dHtz5Hmwp; Fri, 26 Apr 2024 16:39:16 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQz2X35MLz4p9S; Fri, 26 Apr 2024 16:39:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714149556; 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=G04ZG6NLqcJ8+PVM0XQV/LuItP2BKRsHKR/FFk5f21A=; b=bBXy2U/ImSfl/ej+Z5hBwo8UqasisXsm/PysTTa7GygrqxNQT/0jwSHc1JmdsyMdPOD/cU X3hTCfnag7zLl1xmrwrbO2ynr1XWCvjJucXiPPl35Psq50LtsETn7YSJ8I3gfo59DAnYNC MHh2ilNFK1acSoYreicCsxZU8NkNcqqIMvn2th/GjzII+LQuMD/i5ViqdHv8bfwjIz9ppI aVJtuosRK7d6vUYy+X3IgG/MLy/Uh7o5YVCuohnrWNf/oAQbuS7gY9lM0iattxqsYKkqM9 6MdvCh8fAd0O+8kLgvr1VKMsF1yD0bZk/B4/aOr1e8WN4nD1ipTJIxrhhhIwGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714149556; a=rsa-sha256; cv=none; b=ofmL1Sy5jb0NF+ne6313lN9Fl54cy4Y9xss+fatYjtjOL6V0BC3ESaHweNKAQTe6ZHWc2F ZmyNWA2IqwthniF+gzjucX44TBtNQBjX+IPBMy/79bdtPAUh4J8QUjhkDBn6jKrJEFPyVk Omzuy+GqicszUzu6SjqC4ESkprMSV39w5XO2lQjRWTEgyQpGjtHNTPzTtiNTFOYkBI0a7U yaIHuMe8R93VuXj/Br0jzQ3NY/yLjqGgmARW2BJbkhjjwyLW23ydU+BvkKVxfvY0+eJgr/ ykzO6+VFZ6/kW09Fa6ViNdcC+ZS8qObdx9gjIlrU1ctwrJaOiRLZBJnzz7KaGg== 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=1714149556; 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=G04ZG6NLqcJ8+PVM0XQV/LuItP2BKRsHKR/FFk5f21A=; b=Dbm/uS5DpQejEeDRNkxabcWpRE+6sRvS1xteo06YbpmcHkYYUYJx1dBvnrqcgU3leUcNHW K3QLGvPx0tVS2jnYgGB4nfZe4nBq2KGR7fP4QaRA4pwuObBDXWFIh583Yl/sDl4Ex2iZpi oqyXQXyUd2p6cj8filo0+LXdG2iYZoCCten5HQ50RwKsynibeIwSGYoOTk82dUM/wQpmpq Errz1K7R/Eeb0ruiaR5+QaNw+zIsaAZdNKITZO4N60zOKm9B0N5weixft7lB/uF1uaRIt/ lz4IADuUTbgKzad/IxB8m8SnNWUs66J1LhkOVNz5OthsTFOwdpSmyEAzqXqveg== 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 4VQz2X2ZHjzqll; Fri, 26 Apr 2024 16:39:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43QGdGZY064878; Fri, 26 Apr 2024 16:39:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43QGdGqG064875; Fri, 26 Apr 2024 16:39:16 GMT (envelope-from git) Date: Fri, 26 Apr 2024 16:39:16 GMT Message-Id: <202404261639.43QGdGqG064875@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: 4459abe334eb - main - script: minor style improvements 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: 4459abe334eb4dbd416fa8094a64afc065ccd1cc Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4459abe334eb4dbd416fa8094a64afc065ccd1cc commit 4459abe334eb4dbd416fa8094a64afc065ccd1cc Author: Xavier Beaudouin AuthorDate: 2024-04-26 16:10:15 +0000 Commit: Kyle Evans CommitDate: 2024-04-26 16:38:52 +0000 script: minor style improvements Fix some nits pointed out by checkstyle9.pl in advance of functional changes to script(1). Reviewed by: des Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D44167 --- usr.bin/script/script.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index a1fd6967c35c..0373a6667784 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -114,19 +115,19 @@ main(int argc, char *argv[]) usesleep = 1; rawout = 0; flushtime = 30; - fm_fd = -1; /* Shut up stupid "may be used uninitialized" GCC - warning. (not needed w/clang) */ + fm_fd = -1; showexit = 0; while ((ch = getopt(argc, argv, "adeFfkpqrT:t:")) != -1) - switch(ch) { + switch (ch) { case 'a': aflg = 1; break; case 'd': usesleep = 0; break; - case 'e': /* Default behavior, accepted for linux compat */ + case 'e': + /* Default behavior, accepted for linux compat. */ break; case 'F': Fflg = 1; @@ -239,6 +240,8 @@ main(int argc, char *argv[]) (void)tcsetattr(STDIN_FILENO, TCSAFLUSH, &rtt); } + assert(fflg ? fm_fd >= 0 : fm_fd < 0); + child = fork(); if (child < 0) { warn("fork"); @@ -331,7 +334,7 @@ main(int argc, char *argv[]) } } if (n > 0 && FD_ISSET(master, &rfd)) { - cc = read(master, obuf, sizeof (obuf)); + cc = read(master, obuf, sizeof(obuf)); if (cc <= 0) break; (void)write(STDOUT_FILENO, obuf, cc); @@ -417,7 +420,7 @@ done(int eno) if (showexit) (void)fprintf(fscript, "\nCommand exit status:" " %d", eno); - (void)fprintf(fscript,"\nScript done on %s", + (void)fprintf(fscript, "\nScript done on %s", ctime(&tvec)); } (void)printf("\nScript done, output file is %s\n", fname); @@ -459,8 +462,7 @@ consume(FILE *fp, off_t len, char *buf, int reg) if (reg) { if (fseeko(fp, len, SEEK_CUR) == -1) err(1, NULL); - } - else { + } else { while (len > 0) { l = MIN(DEF_BUF, len); if (fread(buf, sizeof(char), l, fp) != l) From nobody Fri Apr 26 16:39: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 4VQz2Y66xTz5HnBc; Fri, 26 Apr 2024 16:39: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQz2Y3yjDz4p6s; Fri, 26 Apr 2024 16:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714149557; 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=8fCEgSdIckIbn+RC1Mzvb+Mt8eM5Clg4YTbpvrX/t5g=; b=nKSp/7O7qE9wk26CgqYSzi6CP440aCRYfUuHYF6WYXitY9MLjafdXlm/4i2gPigicX+gYI ipUZej5U0S+NQ4z/h5LY/f/8NS0a9cWzUBqPDQ8+EMfa39NS9UJzyzhYb3H/TiI2BQijHv Ig/OyQwuBGsmhTPtBqlKK9gEanNXuwnXl2JS4XIH+cC57exSFE81n1p5gfya4DBAjgb4w9 WykbWFzG43s6L1C0SX3yZx5gPhfklsqOLlBBiL4zRkm6P46+ArDEXBsDLWGfHn5DwrZX47 nB6c2kBgLrUZFZI9yn/w4jH/ISSCO3fD2VWPq/sK5Sf5uJPuZC57OvLCfwqNMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714149557; a=rsa-sha256; cv=none; b=E4tTI++83oaSBpNW8x7I4Py3p4seWHK0xVqzwEi1OB0CGeaHak1Q63MOjBoi+BtFyf38zQ owj8DrU7h3xxpcxEHXNL7d8DRlXBN7Tm5cEYwKnYbfjOy0ipJbEB5rCO/gG5X5/us/Z/KY nsxq6f6N/HCCsERkOELG/6eH2cUerl7HxkiU+2/sMYjmL+VyE5uxhq8GyYsAOCX6kKzeJa xr2+eMaD8mwv9HxY9MxuagK5oRFHesfth7PchAmTh44Wjwr2VhX5CiLkryxqG8MO7dNw2o WQuV06PSnO89jdbwipUIxvlDAZX9RUGpi96yWenHlNfFL5P/ltcrDk5UYhIBCA== 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=1714149557; 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=8fCEgSdIckIbn+RC1Mzvb+Mt8eM5Clg4YTbpvrX/t5g=; b=JwmdzGbIvhGgRboxHMTgqlNhuAXvoL1Em/nQvBKB/1rB0+5znA6STJsJWOS5TR1BdlXXQp lN4kBW0Khl+LKjROiSgBE/jUMveNg/eVNpZs9JBl4rw+ium4FV142XwmPoESezYLBm41+d riPRO2x6xsSdpS1NMQzoF10sPkoLESyienO4Y0myo7OHC37raFhNpKTM1Kt+CmNgUvNmiL /UHtoDcIX3U1f3ep49BhyYH72tPARC8VwSSBuqbCHwC9wChSWVkgacSW43fGr9EXx58VrQ 38NIcmm7QAA84H9IGr3Rf2BnX9+16qpxxwl5VLlQ2txTp4BiOKS7dhogyKPfow== 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 4VQz2Y3ZgpzqYb; Fri, 26 Apr 2024 16:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43QGdHU1064934; Fri, 26 Apr 2024 16:39:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43QGdHOZ064931; Fri, 26 Apr 2024 16:39:17 GMT (envelope-from git) Date: Fri, 26 Apr 2024 16:39:17 GMT Message-Id: <202404261639.43QGdHOZ064931@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: 8ceac8e13dcc - main - script: handle terminal resize on SIGWINCH 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: 8ceac8e13dccbe4e177c8f2f443b87b7d2e3edb3 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8ceac8e13dccbe4e177c8f2f443b87b7d2e3edb3 commit 8ceac8e13dccbe4e177c8f2f443b87b7d2e3edb3 Author: Kyle Evans AuthorDate: 2024-04-26 16:12:00 +0000 Commit: Kyle Evans CommitDate: 2024-04-26 16:39:00 +0000 script: handle terminal resize on SIGWINCH Add a -w flag to forward terminal resize events on to the child, which can be useful in some circumstances to avoid terminal corruption. Reviewed by: des Co-authored-by: Xavier Beaudouin Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D44167 --- usr.bin/script/script.1 | 5 +++- usr.bin/script/script.c | 62 ++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/usr.bin/script/script.1 b/usr.bin/script/script.1 index 78e2feef3712..5f40e5af28ff 100644 --- a/usr.bin/script/script.1 +++ b/usr.bin/script/script.1 @@ -33,7 +33,7 @@ .Nd make typescript of terminal session .Sh SYNOPSIS .Nm -.Op Fl aeFfkqr +.Op Fl aeFfkqrw .Op Fl t Ar time .Op Ar file Op Ar command ... .Nm @@ -131,6 +131,9 @@ characters, it indicates the default format: which is useful for both tools and humans to read, should be used. Note that time-stamps will only be output when different from the previous one. +.It Fl w +Forward terminal size changes on +.Dv SIGWINCH . .El .Pp The script ends when the forked shell (or command) exits (a diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 0373a6667784..cca265b8941b 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -77,6 +77,7 @@ static char *fmfname; static int fflg, qflg, ttyflg; static int usesleep, rawout, showexit; static TAILQ_HEAD(, buf_elm) obuf_list = TAILQ_HEAD_INITIALIZER(obuf_list); +static volatile sig_atomic_t doresize; static struct termios tt; @@ -94,31 +95,43 @@ static void record(FILE *, char *, size_t, int); static void consume(FILE *, off_t, char *, int); static void playback(FILE *) __dead2; static void usage(void) __dead2; +static void resizeit(int); int main(int argc, char *argv[]) { struct termios rtt, stt; struct winsize win; - struct timeval tv, *tvp; + struct timespec tv, *tvp; time_t tvec, start; char obuf[BUFSIZ]; char ibuf[BUFSIZ]; + sigset_t *pselmask, selmask; fd_set rfd, wfd; struct buf_elm *be; ssize_t cc; - int aflg, Fflg, kflg, pflg, ch, k, n, fcm; + int aflg, Fflg, kflg, pflg, wflg, ch, k, n, fcm; int flushtime, readstdin; int fm_fd, fm_log; - aflg = Fflg = kflg = pflg = 0; + aflg = Fflg = kflg = pflg = wflg = 0; + doresize = 0; usesleep = 1; rawout = 0; flushtime = 30; fm_fd = -1; showexit = 0; - while ((ch = getopt(argc, argv, "adeFfkpqrT:t:")) != -1) + /* + * For normal operation, we'll leave pselmask == NULL so that pselect(2) + * leaves the signal mask alone. If -w is specified, we'll restore the + * process signal mask upon entry with SIGWINCH unblocked so that we can + * forward resize events properly. + */ + sigemptyset(&selmask); + pselmask = NULL; + + while ((ch = getopt(argc, argv, "adeFfkpqrT:t:w")) != -1) switch (ch) { case 'a': aflg = 1; @@ -157,6 +170,9 @@ main(int argc, char *argv[]) if (strchr(optarg, '%')) tstamp_fmt = optarg; break; + case 'w': + wflg = 1; + break; case '?': default: usage(); @@ -260,6 +276,23 @@ main(int argc, char *argv[]) } close(slave); + if (wflg) { + struct sigaction sa = { .sa_handler = resizeit }; + sigset_t smask; + + sigaction(SIGWINCH, &sa, NULL); + + sigemptyset(&smask); + sigaddset(&smask, SIGWINCH); + + if (sigprocmask(SIG_BLOCK, &smask, &selmask) != 0) + err(1, "Failed to block SIGWINCH"); + + /* Just in case SIGWINCH was blocked before we came in. */ + sigdelset(&selmask, SIGWINCH); + pselmask = &selmask; + } + start = tvec = time(0); readstdin = 1; for (;;) { @@ -272,19 +305,26 @@ main(int argc, char *argv[]) FD_SET(master, &wfd); if (!readstdin && ttyflg) { tv.tv_sec = 1; - tv.tv_usec = 0; + tv.tv_nsec = 0; tvp = &tv; readstdin = 1; } else if (flushtime > 0) { tv.tv_sec = flushtime - (tvec - start); - tv.tv_usec = 0; + tv.tv_nsec = 0; tvp = &tv; } else { tvp = NULL; } - n = select(master + 1, &rfd, &wfd, NULL, tvp); + n = pselect(master + 1, &rfd, &wfd, NULL, tvp, pselmask); if (n < 0 && errno != EINTR) break; + + if (doresize) { + if (ioctl(STDIN_FILENO, TIOCGWINSZ, &win) != -1) + ioctl(master, TIOCSWINSZ, &win); + doresize = 0; + } + if (n > 0 && FD_ISSET(STDIN_FILENO, &rfd)) { cc = read(STDIN_FILENO, ibuf, BUFSIZ); if (cc < 0) @@ -359,7 +399,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: script [-aeFfkpqr] [-t time] [file [command ...]]\n"); + "usage: script [-aeFfkpqrw] [-t time] [file [command ...]]\n"); (void)fprintf(stderr, " script -p [-deq] [-T fmt] [file]\n"); exit(1); @@ -605,3 +645,9 @@ playback(FILE *fp) (void)fclose(fp); exit(0); } + +static void +resizeit(int signo __unused) +{ + doresize = 1; +} From nobody Sat Apr 27 00:56:35 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 4VRB4M25FRz5JZyp; Sat, 27 Apr 2024 00:56:35 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VRB4M1R7Xz4c1P; Sat, 27 Apr 2024 00:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714179395; 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=r5R6ME5probAOMUSs1utt3s3rE3eQquea1nq49b4fl0=; b=PmhHZ7WAT4GPuHIOeBOLH8rYidYm6Dqj9k5XPldE6BLJZk6nPtDMhVjyWMy/y5Qg5JAa/c Ct0U6GmSfk3OuTF4lUVUSKN4mv/ms9mIIvWlKfGuhg6aFsN+m3mIrHy4ea9Kdirfq2R0ju ypi9aUqalAwop3gDc8S3Iy9dNxTytRTAo9oP7S9hMp7okISy94FSZmNZrsYN5/TYYrxvc5 lidrdAIfKzpaEvYgTe1ckl3/Cfl5xkvKaI6hya31b/dSojMq/LgEerKA0OzwTRkXzxsKM5 5cXuwdz6zIAWZ22El2HGoblhdQEG/llDR10O6P+sVtD1wq5lqMpWx2F4FZLxmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714179395; a=rsa-sha256; cv=none; b=fhw8g5OO9wsZFVoGbGWwK+DuQGpvsZ0usl/rjanh+DfeyNCoq5Mh19e5VOkCNTxL4noG2x kA3fMU+VbptFBtegV3SMtZE7T/sYAyLH9kwhqhquqdNjFfLg72Vv7nBKT3t9twmHqBMFUS U0QrKNtJIjbFsVYjonxtgbw8qlHW8+KkEr5F/xuHUIdGQrajaGS3ZJ7waE+y6GJRAu5PsT E+LJyT2qd/OSaAL5rjRzK0QaDXhgbbb9Y5cHY36SVOW/T9/GC1sXpSZuXUxRzJjhUCC6Ul Tn3QEdzsN+lftrgIdCKb1IVGfwmFNb2inhqt5wQEMuAHUzyR/TQKVxLqWSr4+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=1714179395; 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=r5R6ME5probAOMUSs1utt3s3rE3eQquea1nq49b4fl0=; b=IsHoZT08nWir7on8WfFKS32EZePCyL80F8kWYYIaQQkgRCcUEE8mKK5IUm6alc9UNNTSPZ RZCNPbdyx6QyrCr1npuRrBdt9NmWW3O70iGatmXCxQEXVe7ctLEENn/tVvYxeGUQQDpyfa P2JHdJuujAS2SyWmzmbziopQoS2/TB9wH0OqWz4A8t8GXSldVjQ64QlZjxYM/WjrbwdorQ cZKLGqOY3Lu6zErsJ/E4Ksxnny+w2HP2j0a7iVAOC2SgD4knKUVrj3jN6GtusLIfo/pGHp elR86bOjQE1jtDoFxerUN5sTuoh1DjndE+Vz1Yg9cfgJijBXl7UaDXGg+Yi0Bw== 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 4VRB4M12lpz152G; Sat, 27 Apr 2024 00:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43R0uZj2007495; Sat, 27 Apr 2024 00:56:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43R0uZC4007492; Sat, 27 Apr 2024 00:56:35 GMT (envelope-from git) Date: Sat, 27 Apr 2024 00:56:35 GMT Message-Id: <202404270056.43R0uZC4007492@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: 4ba444de708b - main - krpc: Ref cnt the client structures for TLS upcalls 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: 4ba444de708bada46a88ecac17b2f6c1dc912234 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4ba444de708bada46a88ecac17b2f6c1dc912234 commit 4ba444de708bada46a88ecac17b2f6c1dc912234 Author: Rick Macklem AuthorDate: 2024-04-27 00:55:24 +0000 Commit: Rick Macklem CommitDate: 2024-04-27 00:55:24 +0000 krpc: Ref cnt the client structures for TLS upcalls A crash occurred during testing, where the client structures had already been free'd when the upcall thread tried to lock them. This patch acquires a reference count on both of the structures and these are released when the upcall is done, so that the structures cannot be free'd prematurely. This happened because the testing is done over a very slow vpn. Found during a IETF bakeathon testing event this week. MFC after: 5 days --- sys/rpc/clnt_vc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c index 386153dc1f36..91556dddebaa 100644 --- a/sys/rpc/clnt_vc.c +++ b/sys/rpc/clnt_vc.c @@ -754,6 +754,7 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info) case CLSET_BACKCHANNEL: xprt = (SVCXPRT *)info; if (ct->ct_backchannelxprt == NULL) { + SVC_ACQUIRE(xprt); xprt->xp_p2 = ct; if (ct->ct_sslrefno != 0) xprt->xp_tls = RPCTLS_FLAGS_HANDSHAKE; @@ -767,9 +768,11 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info) ct->ct_sslusec = *p++; ct->ct_sslrefno = *p; if (ct->ct_sslrefno != RPCTLS_REFNO_HANDSHAKE) { + /* cl ref cnt is released by clnt_vc_dotlsupcall(). */ + CLNT_ACQUIRE(cl); mtx_unlock(&ct->ct_lock); /* Start the kthread that handles upcalls. */ - error = kthread_add(clnt_vc_dotlsupcall, ct, + error = kthread_add(clnt_vc_dotlsupcall, cl, NULL, NULL, 0, 0, "krpctls%u", thrdnum++); if (error != 0) panic("Can't add KRPC thread error %d", error); @@ -869,6 +872,7 @@ clnt_vc_destroy(CLIENT *cl) mtx_lock(&ct->ct_lock); xprt->xp_p2 = NULL; sx_xunlock(&xprt->xp_lock); + SVC_RELEASE(xprt); } if (ct->ct_socket) { @@ -1269,7 +1273,8 @@ clnt_vc_upcallsdone(struct ct_data *ct) static void clnt_vc_dotlsupcall(void *data) { - struct ct_data *ct = (struct ct_data *)data; + CLIENT *cl = (CLIENT *)data; + struct ct_data *ct = (struct ct_data *)cl->cl_private; enum clnt_stat ret; uint32_t reterr; @@ -1306,5 +1311,6 @@ clnt_vc_dotlsupcall(void *data) ct->ct_rcvstate &= ~RPCRCVSTATE_UPCALLTHREAD; wakeup(&ct->ct_sslrefno); mtx_unlock(&ct->ct_lock); + CLNT_RELEASE(cl); kthread_exit(); } From nobody Sat Apr 27 08:50: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 4VRNbK6wSyz5J9Vx; Sat, 27 Apr 2024 08:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VRNbK3glmz4G7r; Sat, 27 Apr 2024 08:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714207837; 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=fM8yPE6dQkkUFK7kDCmnosxhVvEhdya3kvg+/KSuGrA=; b=A0PX0chgA0TXKbZ8NtdxZnmUb0zGSUCfFY3GPOzhNZbgf2NlzxmXHxCwEbQ5Ptf3aJtet3 Jv7NhypCKvxWgVWy8U0xVIPMLZR+U/RHvWgkb962uwQ+WG5DccUIUUqCPFOqKI1o8/jdAF uAQ3VrtBm3S3DrQAUg8nZh8fF+gl+kBekF1LaZrsmhSSL+9iNrFlWpo+eT1wzzcbuqxaU2 l2kU/TS/mNASt/ToXELiPrLNnDs+ZKKaYowoms0Q/Vuo1P1aTd1guEmjrfcEWfwAHalEKe dWmm0O8Wz4iEJJOoxGKTQH9cWCjvAjdQ1pp7suogiJnSXHUS5+XGMNngVS9AQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714207837; a=rsa-sha256; cv=none; b=DQ+Mgy5Qu0Jh51nZnMr14R1w61IjgaDl9cd8Dd++cCO2UuHEsHwp0OSASWToaR6FOAYdid x31W2d5CrwuAFPtBRhG2qpwhhpReuI7zVxpj5KPzF5xXwNkvDn9VKAqCMxNKzKfpequavK ILk3JSIib5Fhb6vuqh+1alCDiRiKK+X9AZjh/k8fjfd8N9nARoLkJHWF5o5VdprO5pbkr0 5Pq99A7kpwm0nEm3auhBgkZM1rvUeFMylOfQyQ1Ezhs/wFTyvJHrE0AxuoEbJNwcYXpzkZ u2k8czmr48QU9gjbhI7elo3UxoKkrReai+Vx7fALYjjvJudYZmKdTr5XYzSFUw== 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=1714207837; 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=fM8yPE6dQkkUFK7kDCmnosxhVvEhdya3kvg+/KSuGrA=; b=HQ9BZU9WlUnJK8JWP+GxRmHUtbWjeBVnARWq/RL6lH2g2Bu7/D/Ex8VliWY5Q5c1bVehPa /H/jOHdTQzEqT9ONcmrShdQIn1BqDYgXILlQOWF+cQRuyyEVsqbUV2+owoPs8Ia28lVPyj AC2nDFWEUJEckE8fMur/H1VFqBgPqiWwMdIh+Vi4dERE8eieIxer3o0yfcIEjeMAiKjZ3M Q88MybyJrDf4goS6f3itcuTZUyg0wml00+xWEKx17Lfp4GLssC5DvYS5eV+SzZo5YYkEUh UdsbekYdgs6n2ghvaRNtvzSAQe4obLmIxITyWfmdWtPMw9Wc8CCFvtg+plEeVg== 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 4VRNbK3HkYzJj2; Sat, 27 Apr 2024 08:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43R8obCC014582; Sat, 27 Apr 2024 08:50:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43R8obwS014578; Sat, 27 Apr 2024 08:50:37 GMT (envelope-from git) Date: Sat, 27 Apr 2024 08:50:37 GMT Message-Id: <202404270850.43R8obwS014578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 9718d4ab9938 - main - snd_hdspe(4): Recognize newer firmware's PCI vendor id. 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: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9718d4ab99386918f5b5c207c58289eaade20623 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=9718d4ab99386918f5b5c207c58289eaade20623 commit 9718d4ab99386918f5b5c207c58289eaade20623 Author: Florian Walpen AuthorDate: 2024-04-27 08:48:37 +0000 Commit: Ruslan Bukin CommitDate: 2024-04-27 08:48:37 +0000 snd_hdspe(4): Recognize newer firmware's PCI vendor id. At least for HDSPe RayDAT cards, newer firmware comes with RME's own PCI vendor id instead of the Xilinx one. Other HDSPe cards are probably also affected. Update snd_hdspe(4) to recognize both the old Xilinx and the new RME vendor ids. Differential Revision: https://reviews.freebsd.org/D44978 MFC after: 1 day --- sys/dev/sound/pci/hdspe.c | 3 ++- sys/dev/sound/pci/hdspe.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pci/hdspe.c b/sys/dev/sound/pci/hdspe.c index 0773362f2bc3..f9c36df359e3 100644 --- a/sys/dev/sound/pci/hdspe.c +++ b/sys/dev/sound/pci/hdspe.c @@ -474,7 +474,8 @@ hdspe_probe(device_t dev) { uint32_t rev; - if (pci_get_vendor(dev) == PCI_VENDOR_XILINX && + if ((pci_get_vendor(dev) == PCI_VENDOR_XILINX || + pci_get_vendor(dev) == PCI_VENDOR_RME) && pci_get_device(dev) == PCI_DEVICE_XILINX_HDSPE) { rev = pci_get_revid(dev); switch (rev) { diff --git a/sys/dev/sound/pci/hdspe.h b/sys/dev/sound/pci/hdspe.h index de20462170e7..daffeb4ddebc 100644 --- a/sys/dev/sound/pci/hdspe.h +++ b/sys/dev/sound/pci/hdspe.h @@ -28,6 +28,7 @@ */ #define PCI_VENDOR_XILINX 0x10ee +#define PCI_VENDOR_RME 0x1d18 /* Newer firmware versions. */ #define PCI_DEVICE_XILINX_HDSPE 0x3fc6 /* AIO, MADI, AES, RayDAT */ #define PCI_CLASS_REVISION 0x08 #define PCI_REVISION_AIO 212 From nobody Sat Apr 27 11:21: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 4VRRz52ZxPz5JPhp; Sat, 27 Apr 2024 11:22:57 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (bastille.leidinger.net [89.238.82.207]) (using TLSv1.3 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 4VRRz35YGLz4Y17; Sat, 27 Apr 2024 11:22:55 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=leidinger.net header.s=outgoing-alex header.b="VXbB1H/X"; dmarc=pass (policy=quarantine) header.from=leidinger.net; spf=pass (mx1.freebsd.org: domain of Alexander@Leidinger.net designates 89.238.82.207 as permitted sender) smtp.mailfrom=Alexander@Leidinger.net 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=1714216957; 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=2LioOmscApLeVeTAh6LCfYdEn8EXzLLd2puFfr2bB/o=; b=VXbB1H/X+ykLpfLotc05VoDmQRS+bOUI7KUjttJDD+n0NQHpcwXdrlCRr0BNQYVC4C0ykM VqIftVx7AmqTlnW9B7lUcPqWj19mMql0Y6rRVa5C7KmSVabVVnpf8DjkVDtXNjmCinIJxR A4zb2eiSkv4kOFuIJnXF/hjWLcbi1MnDuOzH0u14rWc00p32NbacArmO31rnFrI0CfrQMo KujRHtKiWSXU1JZP/jSwfSR6J26ezitOajvjgvO6K2ZVpnjW+hC8WRwDdTIu3R1uxQFqvx s0FmA9/n7sdNd9drY1fpOQbBWs3XhYF+rIlYX2kLUZvOMiRtHAqlvfheryEmJw== Date: Sat, 27 Apr 2024 13:21:42 +0200 From: Alexander Leidinger To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ca63710d3668 - main - linux: ignore setsockopt(IPV6_RECVERR) In-Reply-To: <202404230452.43N4qiLN063717@gitrepo.freebsd.org> References: <202404230452.43N4qiLN063717@gitrepo.freebsd.org> Message-ID: <83548d055cfcd19ac14de1a91507d73e@Leidinger.net> Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_05fe25e9b3ac8b5e04a65dbe171b49d8"; micalg=pgp-sha256 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.09 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.990]; DMARC_POLICY_ALLOW(-0.50)[leidinger.net,quarantine]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_DKIM_ALLOW(-0.20)[leidinger.net:s=outgoing-alex]; ASN(0.00)[asn:34240, ipnet:89.238.64.0/18, country:DE]; HAS_ORG_HEADER(0.00)[]; DKIM_TRACE(0.00)[leidinger.net:+]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_ATTACHMENT(0.00)[] X-Rspamd-Queue-Id: 4VRRz35YGLz4Y17 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_05fe25e9b3ac8b5e04a65dbe171b49d8 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Am 2024-04-23 06:52, schrieb Warner Losh: > The branch main has been updated by imp: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=ca63710d3668cf6f3cb4faf065d8b4eeffa028ad > > commit ca63710d3668cf6f3cb4faf065d8b4eeffa028ad > Author: Lexi Winter > AuthorDate: 2024-04-22 21:58:11 +0000 > Commit: Warner Losh > CommitDate: 2024-04-23 04:36:34 +0000 > > linux: ignore setsockopt(IPV6_RECVERR) > Add support for ignoring IPV6_RECVERR, controlled by the same > sysctl. > This fixes DNS in Linux when using IPv6 resolvers. And all applications which depend upon a working DNS in an IPv6 enabled system (e.g. biology/linux-foldingathome started to work again for me). Any MFC target for this? Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_05fe25e9b3ac8b5e04a65dbe171b49d8 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmYs39UACgkQEg2wmwP4 2IY77RAAm/fXOs73/r3ENuoFEqLWupXB3SFsQeI/h/CPcFJogGVBgBoVeLT9dARE yOnzeb4PuhU7bEjBJCJn1flVBrCyaRxE4yJgXe395g+1HoxJFUXHZ9Ed9LVj50fF LpVaiITa4AYvWDWYPcDZHcp/lgTXdNzbv/XZrgV/y4Q79Tn1WbNcgMGQcUeYqwwu STzIfBecYbA8shI0f9i7Lqdp/IxD5daDs2illQJRhODUZDGynKc6oreysBjTWVZz ouMO9RMoNQXaCKKV+AAmA+x+bFRLyNb50ArhPXT0jQPhMIMCsiq7UlWZnOjeyQPF XNdYu+94JXS0lTZaubARwU4j5r1fz63QsrJVAF2DoWtzcmQ3lq3y8j21Q92cnAKl 2OW2h/4n2vdyd5m85zHRvpwf41h5mnqvSX5WirsezfcsueOl0xreD5kMgZUTZmDV SaXB8aeLeJ+T8OeBZX2VFdv4nXJbQoqvYbl8K8Kvu3I2XwsJ+7n8vzaKC1yLqhrV sX8XV97po7dJBBv+c8nsx/3SSlFVB/5cO/E0iQ9DkJiruPwy11YHbz8N8BwhfNOr dQTQtfYxLjqWOTHZFowXdiUt0757r6I6AxpAFAtxWqmyMR1+xv3UM5rJksKJ3nIf 9x6wFmBLFlicrLTiYk1piFmRHRu1FqAQ6ySTqwfPadua5Tb2DP8= =Ymvt -----END PGP SIGNATURE----- --=_05fe25e9b3ac8b5e04a65dbe171b49d8-- From nobody Sat Apr 27 13:02: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 4VRVBX69WSz5J4cW for ; Sat, 27 Apr 2024 13:03:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VRVBX24d7z4jFV for ; Sat, 27 Apr 2024 13:03:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a559b919303so394854766b.1 for ; Sat, 27 Apr 2024 06:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1714222977; x=1714827777; 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=ez8oU6KEhI+VJvjScZ6PN2TBAw/TCDpkwrcog2vec3c=; b=Vf1GoqPvbbjBCQmo2eOrmdQE4UpeKA1j9ukVJ6LRUnROImRYF/0gORJKJda18ZRxXR VGAX1j+6KF46UlkEcHs2w7hliSS5XgwJeEE5TfjYb0WobCoiL9yjdqJ32zihrUTRYQkS nnWrEI3HzOgEE1ZIEzZ9hehFTlce+U5RvkPCEHTKY8bYxuFQPJiKBzKWDiXF1myBVaXi owzcSOITAF9XyFqmXvApA6KcgYJhce2HQz7O/iXy69yh51suicjQqnM5d9and5HnXMXf cezANqMreWLDh62puXkc8IGnR7v3KmdRltCgAC0Z/k/D/ZQBtdwKtvn63cgVrMwfWpJS uWmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714222977; x=1714827777; 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=ez8oU6KEhI+VJvjScZ6PN2TBAw/TCDpkwrcog2vec3c=; b=euipI8xLx9yzSF1KNcf4e9r9Bt6p0FXXae+leItaXl3w68WlJ7WgkvgxTyIqQ1pcAQ YV44kH5BmVdgXXbCXW9FpcK/Ev+5+fGgcZriVKz9sZSfeXvncYypYm+wGDJc2jW33wvl zPZwqCbUqyUn5J3T84cutLqWOar955Rxi0IYyUiRh+kH8+uY80v44A//lnuxig4ItXXD NtkrWl+/cGKXkZmn4XTpQlbBs+owZftRmStJjcdJ9eF+r6qZU1LkdQuGLQfToNA9SXc6 cHaRcm7fujwTsZSSEKXnDK8P73xg1GKCeYe2h84DOPq4P0r6XURoj/9mOyl1j1mM07Xt z82Q== X-Forwarded-Encrypted: i=1; AJvYcCU7bODoQuT2u1pgOluDmNAwMII7YzCbMD+Oyc5ocZz8GlrFZu1jmT6minxpXsTcU/4pkAaXS7r8ZSMZO89PK2XzF9R4NUy1cKM3GhEL8rW6nA== X-Gm-Message-State: AOJu0YyyVGqtHXQcW48KpUH9/JpEM2GCldEMf8VsoJYJ6qA5MlFmDiw2 f6CzTdL6mhN4A6zUDLwG387uhMYsOapljQbMUgfRQ9nCBcOB1FKk5ZZNyZE+NTOMSL0ZJ8hX2iM jc9iP2ZUyCytucQTZfNLIcsOccSAG1LZds9x2xQ== X-Google-Smtp-Source: AGHT+IHUEOSiaZ/qmUgaxpKrBFnPuIMelkZXNzSy2V9V94PiLtP0B5bRr48AU/p8v3u8ZGhFo9Gsyz9/ecEs6RfFmow= X-Received: by 2002:a17:906:3bd5:b0:a55:3488:f730 with SMTP id v21-20020a1709063bd500b00a553488f730mr3877853ejf.31.1714222977151; Sat, 27 Apr 2024 06:02:57 -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: <202404230452.43N4qiLN063717@gitrepo.freebsd.org> <83548d055cfcd19ac14de1a91507d73e@Leidinger.net> In-Reply-To: <83548d055cfcd19ac14de1a91507d73e@Leidinger.net> From: Warner Losh Date: Sat, 27 Apr 2024 07:02:45 -0600 Message-ID: Subject: Re: git: ca63710d3668 - main - linux: ignore setsockopt(IPV6_RECVERR) To: Alexander Leidinger Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009e92b6061713a3ee" 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: 4VRVBX24d7z4jFV --0000000000009e92b6061713a3ee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Apr 27, 2024 at 5:22=E2=80=AFAM Alexander Leidinger wrote: > Am 2024-04-23 06:52, schrieb Warner Losh: > > The branch main has been updated by imp: > > > > URL: > > > https://cgit.FreeBSD.org/src/commit/?id=3Dca63710d3668cf6f3cb4faf065d8b4e= effa028ad > > > > commit ca63710d3668cf6f3cb4faf065d8b4eeffa028ad > > Author: Lexi Winter > > AuthorDate: 2024-04-22 21:58:11 +0000 > > Commit: Warner Losh > > CommitDate: 2024-04-23 04:36:34 +0000 > > > > linux: ignore setsockopt(IPV6_RECVERR) > > > Add support for ignoring IPV6_RECVERR, controlled by the same > > sysctl. > > This fixes DNS in Linux when using IPv6 resolvers. > > And all applications which depend upon a working DNS in an IPv6 enabled > system (e.g. biology/linux-foldingathome started to work again for me). > > Any MFC target for this? > I'll merge this now. I'd tagged it as mfc in the pull request. Warner --0000000000009e92b6061713a3ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Apr 27, 2024 at 5:22=E2=80=AF= AM Alexander Leidinger <Alexa= nder@leidinger.net> wrote:
Am 2024-04-23 06:52, schrieb Warner Losh:
> The branch main has been updated by imp:
>
> URL:
> https://cgit.= FreeBSD.org/src/commit/?id=3Dca63710d3668cf6f3cb4faf065d8b4eeffa028ad >
> commit ca63710d3668cf6f3cb4faf065d8b4eeffa028ad
> Author:=C2=A0 =C2=A0 =C2=A0Lexi Winter <lexi@le-Fay.ORG>
> AuthorDate: 2024-04-22 21:58:11 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-04-23 04:36:34 +0000
>
>=C2=A0 =C2=A0 =C2=A0linux: ignore setsockopt(IPV6_RECVERR)

>=C2=A0 =C2=A0 =C2=A0Add support for ignoring IPV6_RECVERR, controlled b= y the same
> sysctl.
>=C2=A0 =C2=A0 =C2=A0This fixes DNS in Linux when using IPv6 resolvers.<= br>
And all applications which depend upon a working DNS in an IPv6 enabled system (e.g. biology/linux-foldingathome started to work again for me).

Any MFC target for this?

I'll merge= this now. I'd tagged it as mfc in the pull request.

=
Warner
--0000000000009e92b6061713a3ee-- From nobody Sat Apr 27 17:30: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 4VRc781nrWz5JWdG for ; Sat, 27 Apr 2024 17:30:28 +0000 (UTC) (envelope-from 0100018f209bb34f-53541ffc-9f44-4e3f-be9a-27d57c8e0ffd-000000@amazonses.com) Received: from a8-60.smtp-out.amazonses.com (a8-60.smtp-out.amazonses.com [54.240.8.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VRc773wJTz4Z4G for ; Sat, 27 Apr 2024 17:30:27 +0000 (UTC) (envelope-from 0100018f209bb34f-53541ffc-9f44-4e3f-be9a-27d57c8e0ffd-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tarsnap.com header.s=dqtolf56kk3wpt62c3jnwboqvr7iedax header.b=beX7WB7A; dkim=pass header.d=amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=di+zXeB9; dmarc=pass (policy=none) header.from=tarsnap.com; spf=pass (mx1.freebsd.org: domain of 0100018f209bb34f-53541ffc-9f44-4e3f-be9a-27d57c8e0ffd-000000@amazonses.com designates 54.240.8.60 as permitted sender) smtp.mailfrom=0100018f209bb34f-53541ffc-9f44-4e3f-be9a-27d57c8e0ffd-000000@amazonses.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=dqtolf56kk3wpt62c3jnwboqvr7iedax; d=tarsnap.com; t=1714239026; h=Message-ID:Date:MIME-Version:Subject:To:References:Cc:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=Dkr68mq1vgLIE8VRfoy5aUGus+HiWuoWQ1rdVOlO0iA=; b=beX7WB7AZ0CNIHh31PQCr/Lwhkk7nyfHCodFWRKDz2bGuruxJAejQjBGRUwaHyVY aCstiQ/xxip/e79G5tZ13832CLR1vT03EQnWXIV8Sr9v0XRfSIbTElN8Vh4lyj+vI6/ zlZx/EIx+c4O5VH17vfG+Tq1je8LKF0q6g1jeIf8= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1714239026; h=Message-ID:Date:MIME-Version:Subject:To:References:Cc:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=Dkr68mq1vgLIE8VRfoy5aUGus+HiWuoWQ1rdVOlO0iA=; b=di+zXeB9elExRxH+aqvDjvw6ZsS7iKTSclIA8X53EF+R5wclc2dqOtKCc/W/eCwP opLaBB2VUjOWP5lLIO0WNhPvLGPDj39cIeqnKXc6jLspukaBY1PRuTCgJaA4MM8OtaK j9GITVLSGzilozXAOjbKPw6tOJMCRzuqp7VihWDc= Message-ID: <0100018f209bb34f-53541ffc-9f44-4e3f-be9a-27d57c8e0ffd-000000@email.amazonses.com> Date: Sat, 27 Apr 2024 17:30:26 +0000 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: a87dd74125d2 - main - scmi: Add an SCMI VirtIO transport driver To: Andrew Turner , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202404110959.43B9xVBJ090851@gitrepo.freebsd.org> Content-Language: en-US Cc: Isaac Cilia Attard From: Colin Percival Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93mnazEvh+x99vGYZnGKeJ8NDOF4QCUzeHquOWxDi8Zl reXyswKcrIquPxxX6+YyGe97VbvLnez3ksfzOYRj1F4qV0Rq8ZNK51+bvIrbcS3SfDaRioAk D7WWwFor8y/hSwxYkfsKbtP5PRcem20JUxuC085zqWLaKv5t5n2CBzAGMjwJaQ3tM3AXVwWJ uJaHA6ot/6fntJlmkfcyCYyyr0D6b0guRj3STbZ2hNn5o2AI+f6LJJ31s2sPFjl6rs7fORf3 hFSNOHDd2HxfVBXFdQy24ROkC4orBBz2xh9GScjxxT/hbXkfufkubFubw7n0HkvHzA3UF+Qq A8JiI3n+d7ocsP0/5BQ2sZdeqPGJgHx6RkAMuW1tJ29wSvCN1qMgFwhYkpQdfvHlociQrimU fvlRfSrBEe8o7tvIuEdpvwvCZSTJqQbVoMw8UHFE7nzyCXUSab5h6PbjakCqim13ekVO2KFF TTPcz5o5jEeUY75tzbIwcDfFbT5KqNjWy06TVdM9VEJDHSfOfxHR3kSEwZ+tT2aTvL3grsUn gFwSNcj4Cl4CRFfUw8zVZY+7O7RiMlhBqykikvUurrdGKc1Scwa0yuppdA6eVvylyTWSQGrQ +uLWtV1LUKN7ZqKJWBkLPt9nS4XZWGyBvxOHYqjOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: <202404110959.43B9xVBJ090851@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2024.04.27-54.240.8.60 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.38 / 15.00]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.994]; DMARC_POLICY_ALLOW(-0.50)[tarsnap.com,none]; FORGED_SENDER(0.30)[cperciva@tarsnap.com,0100018f209bb34f-53541ffc-9f44-4e3f-be9a-27d57c8e0ffd-000000@amazonses.com]; R_DKIM_ALLOW(-0.20)[tarsnap.com:s=dqtolf56kk3wpt62c3jnwboqvr7iedax,amazonses.com:s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug]; RWL_MAILSPIKE_VERYGOOD(-0.20)[54.240.8.60:from]; R_SPF_ALLOW(-0.20)[+ip4:54.240.0.0/18:c]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US]; RCVD_IN_DNSWL_NONE(0.00)[54.240.8.60:from]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[tarsnap.com:+,amazonses.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_NEQ_ENVFROM(0.00)[cperciva@tarsnap.com,0100018f209bb34f-53541ffc-9f44-4e3f-be9a-27d57c8e0ffd-000000@amazonses.com]; DWL_DNSWL_NONE(0.00)[amazonses.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4VRc773wJTz4Z4G Hi Andrew, It looks like this breaks arm64 kernel configs without 'device virtio_scmi' since sys/dev/firmware/arm/scmi_virtio.c (which is 'optional fdt scmi') uses functions from sys/dev/virtio/scmi/virtio_scmi.c (which is 'optional virtio_scmi'). In particular, the "ARM" kernel configuration (whcih has std.dev and std.arm but not std.virt) breaks. Reported by Isaac Cilia Attard (CCed). Colin Percival On 4/11/24 02:59, Andrew Turner wrote: > The branch main has been updated by andrew: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a87dd74125d290791d7259ceeab9507bada9987e > > commit a87dd74125d290791d7259ceeab9507bada9987e > Author: Cristian Marussi > AuthorDate: 2023-10-23 18:07:06 +0000 > Commit: Andrew Turner > CommitDate: 2024-04-11 09:58:57 +0000 > > scmi: Add an SCMI VirtIO transport driver > > Add an SCMI transport driver based on the virtio-scmi backend. > > Reviewed by: andrew, bryanv > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D43048 > --- > sys/conf/files.arm64 | 1 + > sys/dev/firmware/arm/scmi.c | 15 +- > sys/dev/firmware/arm/scmi.h | 2 + > sys/dev/firmware/arm/scmi_virtio.c | 298 +++++++++++++++++++++++++++++++++++++ > 4 files changed, 313 insertions(+), 3 deletions(-) > > diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 > index a22ffa2b7f0c..632fbab5070d 100644 > --- a/sys/conf/files.arm64 > +++ b/sys/conf/files.arm64 > @@ -275,6 +275,7 @@ dev/firmware/arm/scmi_clk.c optional fdt scmi > dev/firmware/arm/scmi_if.m optional fdt scmi > dev/firmware/arm/scmi_mailbox.c optional fdt scmi > dev/firmware/arm/scmi_smc.c optional fdt scmi > +dev/firmware/arm/scmi_virtio.c optional fdt scmi > dev/firmware/arm/scmi_shmem.c optional fdt scmi > > dev/gpio/pl061.c optional pl061 gpio > diff --git a/sys/dev/firmware/arm/scmi.c b/sys/dev/firmware/arm/scmi.c > index 945c2b2e9f6e..ef4bcbf13996 100644 > --- a/sys/dev/firmware/arm/scmi.c > +++ b/sys/dev/firmware/arm/scmi.c > @@ -484,10 +484,19 @@ scmi_process_response(struct scmi_softc *sc, uint32_t hdr) > > mtx_lock_spin(&req->mtx); > req->done = true; > - if (!req->timed_out) > - wakeup(req); > - else > + if (!req->timed_out) { > + /* > + * Consider the case in which a polled message is picked > + * by chance on the IRQ path on another CPU: setting poll_done > + * will terminate the other poll loop. > + */ > + if (!req->msg.polling) > + wakeup(req); > + else > + atomic_store_rel_int(&req->msg.poll_done, 1); > + } else { > timed_out = true; > + } > mtx_unlock_spin(&req->mtx); > > if (timed_out) > diff --git a/sys/dev/firmware/arm/scmi.h b/sys/dev/firmware/arm/scmi.h > index 572422594292..345ae6eeb03a 100644 > --- a/sys/dev/firmware/arm/scmi.h > +++ b/sys/dev/firmware/arm/scmi.h > @@ -62,12 +62,14 @@ struct scmi_softc { > > struct scmi_msg { > bool polling; > + int poll_done; > uint32_t tx_len; > uint32_t rx_len; > #define SCMI_MSG_HDR_SIZE (sizeof(uint32_t)) > uint32_t hdr; > uint8_t payld[]; > }; > +#define hdr_to_msg(h) __containerof((h), struct scmi_msg, hdr) > > void *scmi_buf_get(device_t dev, uint8_t protocol_id, uint8_t message_id, > int tx_payd_sz, int rx_payld_sz); > diff --git a/sys/dev/firmware/arm/scmi_virtio.c b/sys/dev/firmware/arm/scmi_virtio.c > new file mode 100644 > index 000000000000..12cbb9ecefd5 > --- /dev/null > +++ b/sys/dev/firmware/arm/scmi_virtio.c > @@ -0,0 +1,298 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2023 Arm Ltd > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#include > + > +#include "scmi.h" > +#include "scmi_protocols.h" > + > +#define SCMI_VIRTIO_POLLING_INTERVAL_MS 2 > + > +struct scmi_virtio_softc { > + struct scmi_softc base; > + device_t virtio_dev; > + int cmdq_sz; > + int evtq_sz; > + void *p2a_pool; > +}; > + > +static void scmi_virtio_callback(void *, unsigned int, void *); > +static void *scmi_virtio_p2a_pool_init(device_t, unsigned int); > +static int scmi_virtio_transport_init(device_t); > +static void scmi_virtio_transport_cleanup(device_t); > +static int scmi_virtio_xfer_msg(device_t, struct scmi_msg *); > +static int scmi_virtio_poll_msg(device_t, struct scmi_msg *, unsigned int); > +static void scmi_virtio_clear_channel(device_t, void *); > +static int scmi_virtio_probe(device_t); > +static int scmi_virtio_attach(device_t); > + > +static void > +scmi_virtio_callback(void *msg, unsigned int len, void *priv) > +{ > + struct scmi_virtio_softc *sc; > + uint32_t hdr; > + > + sc = priv; > + > + if (msg == NULL || len < sizeof(hdr)) { > + device_printf(sc->virtio_dev, "Ignoring malformed message.\n"); > + return; > + } > + > + hdr = le32toh(*((uint32_t *)msg)); > + scmi_rx_irq_callback(sc->base.dev, msg, hdr); > +} > + > +static void * > +scmi_virtio_p2a_pool_init(device_t dev, unsigned int max_msg) > +{ > + struct scmi_virtio_softc *sc; > + void *pool; > + uint8_t *buf; > + int i; > + > + sc = device_get_softc(dev); > + > + pool = mallocarray(max_msg, SCMI_MAX_MSG_SIZE, M_DEVBUF, > + M_ZERO | M_WAITOK); > + > + for (i = 0, buf = pool; i < max_msg; i++, buf += SCMI_MAX_MSG_SIZE) { > + /* Feed platform with pre-allocated P2A buffers */ > + virtio_scmi_message_enqueue(sc->virtio_dev, > + VIRTIO_SCMI_CHAN_P2A, buf, 0, SCMI_MAX_MSG_SIZE); > + } > + > + device_printf(dev, > + "Fed %d initial P2A buffers to platform.\n", max_msg); > + > + return (pool); > +} > + > +static void > +scmi_virtio_clear_channel(device_t dev, void *msg) > +{ > + struct scmi_virtio_softc *sc; > + > + sc = device_get_softc(dev); > + virtio_scmi_message_enqueue(sc->virtio_dev, VIRTIO_SCMI_CHAN_P2A, > + msg, 0, SCMI_MAX_MSG_SIZE); > +} > + > +static int > +scmi_virtio_transport_init(device_t dev) > +{ > + struct scmi_virtio_softc *sc; > + int ret; > + > + sc = device_get_softc(dev); > + > + sc->cmdq_sz = virtio_scmi_channel_size_get(sc->virtio_dev, > + VIRTIO_SCMI_CHAN_A2P); > + sc->evtq_sz = virtio_scmi_channel_size_get(sc->virtio_dev, > + VIRTIO_SCMI_CHAN_P2A); > + > + if (!sc->cmdq_sz) { > + device_printf(dev, > + "VirtIO cmdq virtqueue not found. Aborting.\n"); > + return (ENXIO); > + } > + > + /* > + * P2A buffers are owned by the platform initially; allocate a feed an > + * appropriate number of buffers. > + */ > + if (sc->evtq_sz != 0) { > + sc->p2a_pool = scmi_virtio_p2a_pool_init(dev, sc->evtq_sz); > + if (sc->p2a_pool == NULL) > + return (ENOMEM); > + } > + > + /* Note that setting a callback also enables that VQ interrupts */ > + ret = virtio_scmi_channel_callback_set(sc->virtio_dev, > + VIRTIO_SCMI_CHAN_A2P, scmi_virtio_callback, sc); > + if (ret) { > + device_printf(dev, "Failed to set VirtIO cmdq callback.\n"); > + return (ENXIO); > + } > + > + device_printf(dev, > + "VirtIO cmdq virtqueue configured - cmdq_sz:%d\n", sc->cmdq_sz); > + > + /* P2A channel is optional */ > + if (sc->evtq_sz) { > + ret = virtio_scmi_channel_callback_set(sc->virtio_dev, > + VIRTIO_SCMI_CHAN_P2A, scmi_virtio_callback, sc); > + if (ret == 0) { > + device_printf(dev, > + "VirtIO evtq virtqueue configured - evtq_sz:%d\n", > + sc->evtq_sz); > + } else { > + device_printf(dev, > + "Failed to set VirtIO evtq callback.Skip.\n"); > + sc->evtq_sz = 0; > + } > + } > + > + sc->base.trs_desc.reply_timo_ms = 100; > + > + return (0); > +} > + > +static void > +scmi_virtio_transport_cleanup(device_t dev) > +{ > + struct scmi_virtio_softc *sc; > + > + sc = device_get_softc(dev); > + > + if (sc->evtq_sz != 0) { > + virtio_scmi_channel_callback_set(sc->virtio_dev, > + VIRTIO_SCMI_CHAN_P2A, NULL, NULL); > + free(sc->p2a_pool, M_DEVBUF); > + } > + > + virtio_scmi_channel_callback_set(sc->virtio_dev, > + VIRTIO_SCMI_CHAN_A2P, NULL, NULL); > +} > + > +static int > +scmi_virtio_xfer_msg(device_t dev, struct scmi_msg *msg) > +{ > + struct scmi_virtio_softc *sc; > + > + sc = device_get_softc(dev); > + > + return (virtio_scmi_message_enqueue(sc->virtio_dev, > + VIRTIO_SCMI_CHAN_A2P, &msg->hdr, msg->tx_len, msg->rx_len)); > +} > + > +static int > +scmi_virtio_poll_msg(device_t dev, struct scmi_msg *msg, unsigned int tmo_ms) > +{ > + struct scmi_virtio_softc *sc; > + device_t vdev; > + int tmo_loops; > + > + sc = device_get_softc(dev); > + vdev = sc->virtio_dev; > + > + tmo_loops = tmo_ms / SCMI_VIRTIO_POLLING_INTERVAL_MS; > + while (tmo_loops-- && atomic_load_acq_int(&msg->poll_done) == 0) { > + struct scmi_msg *rx_msg; > + void *rx_buf; > + uint32_t rx_len; > + > + rx_buf = virtio_scmi_message_poll(vdev, &rx_len); > + if (rx_buf == NULL) { > + DELAY(SCMI_VIRTIO_POLLING_INTERVAL_MS * 1000); > + continue; > + } > + > + rx_msg = hdr_to_msg(rx_buf); > + rx_msg->rx_len = rx_len; > + /* Complete the polling on any poll path */ > + if (rx_msg->polling) > + atomic_store_rel_int(&rx_msg->poll_done, 1); > + > + if (__predict_true(rx_msg == msg)) > + break; > + > + /* > + * Polling returned an unexpected message: either a message > + * polled by some other thread of execution or a message not > + * supposed to be polled. > + */ > + device_printf(dev, "POLLED OoO HDR:|%08X| - polling:%d\n", > + rx_msg->hdr, rx_msg->polling); > + > + if (!rx_msg->polling) > + scmi_rx_irq_callback(sc->base.dev, rx_msg, rx_msg->hdr); > + } > + > + return (tmo_loops > 0 ? 0 : ETIMEDOUT); > +} > + > +static int > +scmi_virtio_probe(device_t dev) > +{ > + if (!ofw_bus_is_compatible(dev, "arm,scmi-virtio")) > + return (ENXIO); > + > + if (!ofw_bus_status_okay(dev)) > + return (ENXIO); > + > + device_set_desc(dev, "ARM SCMI VirtIO Transport driver"); > + > + return (BUS_PROBE_DEFAULT); > +} > + > +static int > +scmi_virtio_attach(device_t dev) > +{ > + struct scmi_virtio_softc *sc; > + > + sc = device_get_softc(dev); > + sc->virtio_dev = virtio_scmi_transport_get(); > + if (sc->virtio_dev == NULL) > + return (1); > + > + /* When attach fails there is nothing to cleanup*/ > + return (scmi_attach(dev)); > +} > + > +static device_method_t scmi_virtio_methods[] = { > + DEVMETHOD(device_probe, scmi_virtio_probe), > + DEVMETHOD(device_attach, scmi_virtio_attach), > + > + /* SCMI interface */ > + DEVMETHOD(scmi_transport_init, scmi_virtio_transport_init), > + DEVMETHOD(scmi_transport_cleanup, scmi_virtio_transport_cleanup), > + DEVMETHOD(scmi_xfer_msg, scmi_virtio_xfer_msg), > + DEVMETHOD(scmi_poll_msg, scmi_virtio_poll_msg), > + DEVMETHOD(scmi_clear_channel, scmi_virtio_clear_channel), > + > + DEVMETHOD_END > +}; > + > +DEFINE_CLASS_1(scmi_virtio, scmi_virtio_driver, scmi_virtio_methods, > + sizeof(struct scmi_virtio_softc), scmi_driver); > + > +/* Needs to be after the mmio_sram driver */ > +DRIVER_MODULE(scmi_virtio, simplebus, scmi_virtio_driver, 0, 0); > +MODULE_VERSION(scmi_virtio, 1); > -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Sat Apr 27 18:55:20 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 4VRf145NRDz5Jg2v; Sat, 27 Apr 2024 18:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VRf144sNbz4n8b; Sat, 27 Apr 2024 18:55:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714244120; 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=GXXN3EsqW0/5RddiVjDBZ+d8djSiJpV+pUehKFyAMYU=; b=sy9LaObxtHUzTRyHMSH06wBUmPXFe+5X/M7MuCPs/n/Al2A7IFOQ/92w5U7/qFzkfKqZEZ iixBxcCF6PIk04p/gUk04XVDrwtNglIQtNNSpx6iXQolJY4FtBONfKchFj8G3+DPjnuP2Q +D2SJfbr2/UC+0DDYsyFdd3GtIAGwAnUtVMlow7JaLrXnmib1EnVXCTcCUGT2aR8hi6ynm r2kPaZdq+QaH6Aaix00wFAVHczJzsOfI7n2r5yohvLtVbluz14PokYYE5hIsCZrDdUr4lF D994C5Chweh8EF4I8ra4eLftbuf0gkWo/6Me1sdutZ+hwQcqQyockyWMP9rzsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714244120; a=rsa-sha256; cv=none; b=V3MVuE8JL5z0YjPmYjR851NqkHe2xKS5d3MUxJ7twQ9+jJQSKQct/m5InwFaT5L2pyPR/n 8u+JOf97f7m/fjLJ6um68wxtL2Q7NXMLzzWJmCURCjOjKbu2Y723Rb8LP3riMNXKw5sUnW EDtQ+1NhaMVTOI+lM1inc4FdepwVoY0uO+HuXbgNnx4n05pC5+hR2rrA2Y8BR06z7QcVk8 ZNnH6VbKigF61gf/Vld0R/2T+rH4ljFj66iCruoN2DqLK2ELjESSXXZ9dFYhcBGnuEMBmp 68+X7jxorpBE/lNaLxu5AI8H7biguXq9w3D6d8I0P0vKAENdj8ynlfTQQLUong== 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=1714244120; 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=GXXN3EsqW0/5RddiVjDBZ+d8djSiJpV+pUehKFyAMYU=; b=g+Oaf3yB8uvHfb9lq3U6VgMo8ts0ZIkxcSSKmZAKVbtiPUUqcgihDZvQsn7TszcXfuG19/ PdX8rvc0RSuZj9+Fi+WvlBH88PDl+QVLGCVfACl/xhN3YL2C6pOWIKJonmqtAjGn1OjWGE 2urqAw0yj39TGNSpc/IF+Cvm8xw0O8X6sECJrn2wkNbjQzubatNwbF6yEGQxBoZC3I1mSE 1vjn/0qg5/l6UWb9PNFNG2xjzQnjZWj2Spnn/FnAX1Om3KBg9IBJmtSK3W02aNysiZMDs1 VbBjzT66TZxP4uA5H4gd51mXUMI696hlPmQUHOXQ1JLTkiFD0JuPWRmaQFVxKw== 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 4VRf144Jx9zt6W; Sat, 27 Apr 2024 18:55:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43RItKeH038413; Sat, 27 Apr 2024 18:55:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43RItKx3038410; Sat, 27 Apr 2024 18:55:20 GMT (envelope-from git) Date: Sat, 27 Apr 2024 18:55:20 GMT Message-Id: <202404271855.43RItKx3038410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: 6e74b603fc02 - main - uuidgen(1): Add EXAMPLES to manual page 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: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e74b603fc021761c0a20e08f58b674f45ad5f04 Auto-Submitted: auto-generated The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/src/commit/?id=6e74b603fc021761c0a20e08f58b674f45ad5f04 commit 6e74b603fc021761c0a20e08f58b674f45ad5f04 Author: Fernando Apesteguía AuthorDate: 2023-09-07 15:17:38 +0000 Commit: Fernando Apesteguía CommitDate: 2024-04-27 18:53:59 +0000 uuidgen(1): Add EXAMPLES to manual page Approved by: manpages@ (gbe@) Reviewed by: gbe@, pauamma Differential Revision: https://reviews.freebsd.org/D43494 --- bin/uuidgen/uuidgen.1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/bin/uuidgen/uuidgen.1 b/bin/uuidgen/uuidgen.1 index 51475c900bbc..1c2e7cce91d3 100644 --- a/bin/uuidgen/uuidgen.1 +++ b/bin/uuidgen/uuidgen.1 @@ -77,6 +77,30 @@ to each other, but operating system latency and processing time will be reflected in the distance between two successive identifiers. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Generate a batch of three UUIDs. +Notice the similarity of the string before the first hyphen of the UUID +(known as +.Em time_low +in +.Em rfc4122 +): +.Bd -literal -offset indent +$ uuidgen -n3 +8bc44345-4d90-11ee-88c7-b42e991fc52e +8bc44346-4d90-11ee-88c7-b42e991fc52e +8bc44347-4d90-11ee-88c7-b42e991fc52e +.Ed +.Pp +Generate a batch of random UUIDs without hyphens: +.Bd -literal -offset indent +$ uuidgen -r -c -n3 +5ad8b60a0f4e41f59c82d273202275f9 +6c41925486cd4bf59720a5bad85de2e4 +8144fdab63f648a1812d12453f975313 +.Ed +.Pp +Notice that the UUIDs are not similar to each other. .Sh SEE ALSO .Xr uuidgen 2 , .Xr uuid 3 From nobody Sun Apr 28 00:12: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 4VRn2j4m1Hz5K8KP; Sun, 28 Apr 2024 00:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VRn2j4bCTz4P9k; Sun, 28 Apr 2024 00:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714263133; 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=920bU7Y3n9lgRu2s/yWYYK4Z4IYIyCNmnuLYFvaT9A4=; b=Xxgp0QVzv7CkurulNelzNEVKs+Qa1N0g96wWN4Xav0CM0lZ2icZK/gCWA4nBLWMMJhD3ud zSj9D/JjP3lk9T5/4FtQIHgaw9Xpp/CCZL9PJiHBk0A35NDXKk8xTjxc4IE4wqkTOFNsRT WQLjy3+gWStcYnhzy+fqNNOfYGdMfwWoX/BVfNA24OtxupGUGwICo9Gfwkb6rZSwsJNLi3 tqC7vm8uzDId5sKYVNXld/WSdymeSVWNg8TlW+URJ/S8wrKcdiEYP1JTiizwq16FBm2gC+ 070mq2XgcTEuUzUSZ8xFWf6LJwV7wDU4Aysmr3tqMWrkMEi2KTUd67QjY6xE9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714263133; a=rsa-sha256; cv=none; b=yW337IsBiH7qmlXdLubEr/j6qAYf7cahDegcpr2i38um4Us1MmwlqpSI9ihJej4i1VGWZP RRYXiYjadqeBFTmhyMIMcclD7XhhP1EkhPHjMsMLTaIrS0FlxDjkZkGOfmQEVaaDMLlWKt P/zsLgmacdMj4Miy3ijF9T64ebU8eGghSEPANdsnfawT2RfL2Xshsd2sFUjihmNvjz9OQg 35fb7N9GDEASENf8sR6rR/Q14Lb0f+scSeSPIxVkckAv7oC+IkZryDZNdWg3QkSIa/Ajor PIGDcqD/zH2alxuZMfcLCwrBbdI9xLziazOsKGsQ1+99mhkWQ3WXnQZGe7HF5A== 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=1714263133; 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=920bU7Y3n9lgRu2s/yWYYK4Z4IYIyCNmnuLYFvaT9A4=; b=Z4w9jLPwAk8ZxItdg71OUi3EXLRO3cfzhT9303FZvQS2xyaHIsuoD3fGLMTLOWdDNE18gM w91jr0il86InneHFv6sDnXdb/MyJShhZ0NeQCIKvXXAZQJ8TJlDiVT65G3VHfwe93Q2l9O aI5XnNq4/0x+ePdBQryi0+pekbhYW7Cd0b33jo3n/WWhVsCWWM776CEya1YCjVC5Zo/Lak Uw5vdx8ML9HLeXui8tPkn80ZVHYwh4NjTvfWYK1eYzFODZNL2NXsjhbC24xQBJqNJX5FRX 7yqjZwHmwSxFwu6LTxmgwpLf6VZFoRfDO9st6JCKpwRNubAsL0GncL5+A3GEpA== 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 4VRn2j3tW2z130Z; Sun, 28 Apr 2024 00:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43S0CDtT077958; Sun, 28 Apr 2024 00:12:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43S0CDKd077955; Sun, 28 Apr 2024 00:12:13 GMT (envelope-from git) Date: Sun, 28 Apr 2024 00:12:13 GMT Message-Id: <202404280012.43S0CDKd077955@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: 03a39a17089a - main - nfscl: Clear out a lot of cruft related to B_DIRECT 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: 03a39a17089adc1d0e28076670e664dcdebccf73 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=03a39a17089adc1d0e28076670e664dcdebccf73 commit 03a39a17089adc1d0e28076670e664dcdebccf73 Author: Rick Macklem AuthorDate: 2024-04-28 00:10:48 +0000 Commit: Rick Macklem CommitDate: 2024-04-28 00:10:48 +0000 nfscl: Clear out a lot of cruft related to B_DIRECT There is only one place in the unpatched sources where B_DIRECT is set in the NFS client and this code is never executed. As such, this patch removes this code that is never executed, since B_DIRECT should never be set. During a IETF testing event this week, I saw a crash in ncl_doio_directwrite(), but this function is only called if B_DIRECT is set. I cannot explain how ncl_doio_directwrite() got called, but once this patch was applied to the sources, the crash did not recur. This is not surprising, since this patch deleted the function. Reviewed by: kib, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44980 --- sys/fs/nfs/nfs_commonport.c | 1 - sys/fs/nfs/nfsport.h | 2 - sys/fs/nfsclient/nfs.h | 1 - sys/fs/nfsclient/nfs_clbio.c | 237 ++++++++-------------------------------- sys/fs/nfsclient/nfs_clnfsiod.c | 19 ++-- sys/fs/nfsclient/nfs_clvnops.c | 24 +--- sys/fs/nfsclient/nfsnode.h | 3 - 7 files changed, 57 insertions(+), 230 deletions(-) diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index cfceaf604b13..2db9af5b9ea9 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -121,7 +121,6 @@ MALLOC_DEFINE(M_NEWNFSCLCLIENT, "NFSCL client", "NFSCL Client"); MALLOC_DEFINE(M_NEWNFSCLLOCKOWNER, "NFSCL lckown", "NFSCL Lock Owner"); MALLOC_DEFINE(M_NEWNFSCLLOCK, "NFSCL lck", "NFSCL Lock"); MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "NFS vnode"); -MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "NFS Direct IO buffer"); MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroff", "NFS directory offset data"); MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback", diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index 7e88ccdaffa1..0b16ba9b85a8 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -938,7 +938,6 @@ MALLOC_DECLARE(M_NEWNFSCLLOCKOWNER); MALLOC_DECLARE(M_NEWNFSCLLOCK); MALLOC_DECLARE(M_NEWNFSDIROFF); MALLOC_DECLARE(M_NEWNFSV4NODE); -MALLOC_DECLARE(M_NEWNFSDIRECTIO); MALLOC_DECLARE(M_NEWNFSMNT); MALLOC_DECLARE(M_NEWNFSDROLLBACK); MALLOC_DECLARE(M_NEWNFSLAYOUT); @@ -965,7 +964,6 @@ MALLOC_DECLARE(M_NEWNFSDSESSION); #define M_NFSCLLOCK M_NEWNFSCLLOCK #define M_NFSDIROFF M_NEWNFSDIROFF #define M_NFSV4NODE M_NEWNFSV4NODE -#define M_NFSDIRECTIO M_NEWNFSDIRECTIO #define M_NFSDROLLBACK M_NEWNFSDROLLBACK #define M_NFSLAYOUT M_NEWNFSLAYOUT #define M_NFSFLAYOUT M_NEWNFSFLAYOUT diff --git a/sys/fs/nfsclient/nfs.h b/sys/fs/nfsclient/nfs.h index aa755a6b5f4d..eeb68a434a6b 100644 --- a/sys/fs/nfsclient/nfs.h +++ b/sys/fs/nfsclient/nfs.h @@ -90,7 +90,6 @@ enum nfsiod_state { * Function prototypes. */ int ncl_meta_setsize(struct vnode *, struct thread *, u_quad_t); -void ncl_doio_directwrite(struct buf *); int ncl_bioread(struct vnode *, struct uio *, int, struct ucred *); int ncl_biowrite(struct vnode *, struct uio *, int, struct ucred *); int ncl_vinvalbuf(struct vnode *, int, struct thread *, int); diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 1cf45bb0c924..c691e797aa01 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -764,144 +764,58 @@ static int nfs_directio_write(struct vnode *vp, struct uio *uiop, struct ucred *cred, int ioflag) { - int error; + struct uio uio; + struct iovec iov; struct nfsmount *nmp = VFSTONFS(vp->v_mount); struct thread *td = uiop->uio_td; - int size; - int wsize; + int error, iomode, must_commit, size, wsize; + KASSERT((ioflag & IO_SYNC) != 0, ("nfs_directio_write: not sync")); mtx_lock(&nmp->nm_mtx); wsize = nmp->nm_wsize; mtx_unlock(&nmp->nm_mtx); - if (ioflag & IO_SYNC) { - int iomode, must_commit; - struct uio uio; - struct iovec iov; -do_sync: - while (uiop->uio_resid > 0) { - size = MIN(uiop->uio_resid, wsize); - size = MIN(uiop->uio_iov->iov_len, size); - iov.iov_base = uiop->uio_iov->iov_base; - iov.iov_len = size; - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - uio.uio_offset = uiop->uio_offset; - uio.uio_resid = size; - uio.uio_segflg = uiop->uio_segflg; - uio.uio_rw = UIO_WRITE; - uio.uio_td = td; - iomode = NFSWRITE_FILESYNC; - /* - * When doing direct I/O we do not care if the - * server's write verifier has changed, but we - * do not want to update the verifier if it has - * changed, since that hides the change from - * writes being done through the buffer cache. - * By passing must_commit in set to two, the code - * in nfsrpc_writerpc() will not update the - * verifier on the mount point. - */ - must_commit = 2; - error = ncl_writerpc(vp, &uio, cred, &iomode, - &must_commit, 0, ioflag); - KASSERT((must_commit == 2), - ("ncl_directio_write: Updated write verifier")); - if (error) - return (error); - if (iomode != NFSWRITE_FILESYNC) - printf("nfs_directio_write: Broken server " - "did not reply FILE_SYNC\n"); - uiop->uio_offset += size; - uiop->uio_resid -= size; - if (uiop->uio_iov->iov_len <= size) { - uiop->uio_iovcnt--; - uiop->uio_iov++; - } else { - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + size; - uiop->uio_iov->iov_len -= size; - } - } - } else { - struct uio *t_uio; - struct iovec *t_iov; - struct buf *bp; - + while (uiop->uio_resid > 0) { + size = MIN(uiop->uio_resid, wsize); + size = MIN(uiop->uio_iov->iov_len, size); + iov.iov_base = uiop->uio_iov->iov_base; + iov.iov_len = size; + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + uio.uio_offset = uiop->uio_offset; + uio.uio_resid = size; + uio.uio_segflg = uiop->uio_segflg; + uio.uio_rw = UIO_WRITE; + uio.uio_td = td; + iomode = NFSWRITE_FILESYNC; /* - * Break up the write into blocksize chunks and hand these - * over to nfsiod's for write back. - * Unfortunately, this incurs a copy of the data. Since - * the user could modify the buffer before the write is - * initiated. - * - * The obvious optimization here is that one of the 2 copies - * in the async write path can be eliminated by copying the - * data here directly into mbufs and passing the mbuf chain - * down. But that will require a fair amount of re-working - * of the code and can be done if there's enough interest - * in NFS directio access. + * When doing direct I/O we do not care if the + * server's write verifier has changed, but we + * do not want to update the verifier if it has + * changed, since that hides the change from + * writes being done through the buffer cache. + * By passing must_commit in set to two, the code + * in nfsrpc_writerpc() will not update the + * verifier on the mount point. */ - while (uiop->uio_resid > 0) { - size = MIN(uiop->uio_resid, wsize); - size = MIN(uiop->uio_iov->iov_len, size); - bp = uma_zalloc(ncl_pbuf_zone, M_WAITOK); - t_uio = malloc(sizeof(struct uio), M_NFSDIRECTIO, M_WAITOK); - t_iov = malloc(sizeof(struct iovec), M_NFSDIRECTIO, M_WAITOK); - t_iov->iov_base = malloc(size, M_NFSDIRECTIO, M_WAITOK); - t_iov->iov_len = size; - t_uio->uio_iov = t_iov; - t_uio->uio_iovcnt = 1; - t_uio->uio_offset = uiop->uio_offset; - t_uio->uio_resid = size; - t_uio->uio_segflg = UIO_SYSSPACE; - t_uio->uio_rw = UIO_WRITE; - t_uio->uio_td = td; - KASSERT(uiop->uio_segflg == UIO_USERSPACE || - uiop->uio_segflg == UIO_SYSSPACE, - ("nfs_directio_write: Bad uio_segflg")); - if (uiop->uio_segflg == UIO_USERSPACE) { - error = copyin(uiop->uio_iov->iov_base, - t_iov->iov_base, size); - if (error != 0) - goto err_free; - } else - /* - * UIO_SYSSPACE may never happen, but handle - * it just in case it does. - */ - bcopy(uiop->uio_iov->iov_base, t_iov->iov_base, - size); - bp->b_flags |= B_DIRECT; - bp->b_iocmd = BIO_WRITE; - if (cred != NOCRED) { - crhold(cred); - bp->b_wcred = cred; - } else - bp->b_wcred = NOCRED; - bp->b_caller1 = (void *)t_uio; - bp->b_vp = vp; - error = ncl_asyncio(nmp, bp, NOCRED, td); -err_free: - if (error) { - free(t_iov->iov_base, M_NFSDIRECTIO); - free(t_iov, M_NFSDIRECTIO); - free(t_uio, M_NFSDIRECTIO); - bp->b_vp = NULL; - uma_zfree(ncl_pbuf_zone, bp); - if (error == EINTR) - return (error); - goto do_sync; - } - uiop->uio_offset += size; - uiop->uio_resid -= size; - if (uiop->uio_iov->iov_len <= size) { - uiop->uio_iovcnt--; - uiop->uio_iov++; - } else { - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + size; - uiop->uio_iov->iov_len -= size; - } + must_commit = 2; + error = ncl_writerpc(vp, &uio, cred, &iomode, + &must_commit, 0, ioflag); + KASSERT(must_commit == 2, + ("ncl_directio_write: Updated write verifier")); + if (error != 0) + return (error); + if (iomode != NFSWRITE_FILESYNC) + printf("nfs_directio_write: Broken server " + "did not reply FILE_SYNC\n"); + uiop->uio_offset += size; + uiop->uio_resid -= size; + if (uiop->uio_iov->iov_len <= size) { + uiop->uio_iovcnt--; + uiop->uio_iov++; + } else { + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + size; + uiop->uio_iov->iov_len -= size; } } return (0); @@ -1467,7 +1381,7 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg) nanouptime(&ts); NFSLOCKNODE(np); } - if (np->n_directio_asyncwr == 0 && (np->n_flag & NMODIFIED) != 0) { + if ((np->n_flag & NMODIFIED) != 0) { np->n_localmodtime = ts; np->n_flag &= ~NMODIFIED; } @@ -1612,12 +1526,8 @@ again: BUF_KERNPROC(bp); TAILQ_INSERT_TAIL(&nmp->nm_bufq, bp, b_freelist); nmp->nm_bufqlen++; - if ((bp->b_flags & B_DIRECT) && bp->b_iocmd == BIO_WRITE) { - NFSLOCKNODE(VTONFS(bp->b_vp)); - VTONFS(bp->b_vp)->n_flag |= NMODIFIED; - VTONFS(bp->b_vp)->n_directio_asyncwr++; - NFSUNLOCKNODE(VTONFS(bp->b_vp)); - } + KASSERT((bp->b_flags & B_DIRECT) == 0, + ("ncl_asyncio: B_DIRECT set")); NFSUNLOCKIOD(); return (0); } @@ -1632,59 +1542,6 @@ again: return (EIO); } -void -ncl_doio_directwrite(struct buf *bp) -{ - int iomode, must_commit; - struct uio *uiop = (struct uio *)bp->b_caller1; - char *iov_base = uiop->uio_iov->iov_base; - - iomode = NFSWRITE_FILESYNC; - uiop->uio_td = NULL; /* NULL since we're in nfsiod */ - /* - * When doing direct I/O we do not care if the - * server's write verifier has changed, but we - * do not want to update the verifier if it has - * changed, since that hides the change from - * writes being done through the buffer cache. - * By passing must_commit in set to two, the code - * in nfsrpc_writerpc() will not update the - * verifier on the mount point. - */ - must_commit = 2; - ncl_writerpc(bp->b_vp, uiop, bp->b_wcred, &iomode, &must_commit, 0, 0); - KASSERT((must_commit == 2), ("ncl_doio_directwrite: Updated write" - " verifier")); - if (iomode != NFSWRITE_FILESYNC) - printf("ncl_doio_directwrite: Broken server " - "did not reply FILE_SYNC\n"); - free(iov_base, M_NFSDIRECTIO); - free(uiop->uio_iov, M_NFSDIRECTIO); - free(uiop, M_NFSDIRECTIO); - if ((bp->b_flags & B_DIRECT) && bp->b_iocmd == BIO_WRITE) { - struct nfsnode *np = VTONFS(bp->b_vp); - NFSLOCKNODE(np); - if (NFSHASPNFS(VFSTONFS(bp->b_vp->v_mount))) { - /* - * Invalidate the attribute cache, since writes to a DS - * won't update the size attribute. - */ - np->n_attrstamp = 0; - } - np->n_directio_asyncwr--; - if (np->n_directio_asyncwr == 0) { - np->n_flag &= ~NMODIFIED; - if ((np->n_flag & NFSYNCWAIT)) { - np->n_flag &= ~NFSYNCWAIT; - wakeup((caddr_t)&np->n_directio_asyncwr); - } - } - NFSUNLOCKNODE(np); - } - bp->b_vp = NULL; - uma_zfree(ncl_pbuf_zone, bp); -} - /* * Do an I/O operation to/from a cache block. This may be called * synchronously or from an nfsiod. diff --git a/sys/fs/nfsclient/nfs_clnfsiod.c b/sys/fs/nfsclient/nfs_clnfsiod.c index be3a89a1f159..5e3c5ca0066c 100644 --- a/sys/fs/nfsclient/nfs_clnfsiod.c +++ b/sys/fs/nfsclient/nfs_clnfsiod.c @@ -291,17 +291,14 @@ nfssvc_iod(void *instance) wakeup(&nmp->nm_bufq); } NFSUNLOCKIOD(); - if (bp->b_flags & B_DIRECT) { - KASSERT((bp->b_iocmd == BIO_WRITE), ("nfscvs_iod: BIO_WRITE not set")); - (void)ncl_doio_directwrite(bp); - } else { - if (bp->b_iocmd == BIO_READ) - (void) ncl_doio(bp->b_vp, bp, bp->b_rcred, - NULL, 0); - else - (void) ncl_doio(bp->b_vp, bp, bp->b_wcred, - NULL, 0); - } + KASSERT((bp->b_flags & B_DIRECT) == 0, + ("nfssvc_iod: B_DIRECT set")); + if (bp->b_iocmd == BIO_READ) + (void) ncl_doio(bp->b_vp, bp, bp->b_rcred, + NULL, 0); + else + (void) ncl_doio(bp->b_vp, bp, bp->b_wcred, + NULL, 0); NFSLOCKIOD(); /* * Make sure the nmp hasn't been dismounted as soon as diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 85c0ebd7a10f..76a3cdf9281e 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -961,10 +961,6 @@ nfs_close(struct vop_close_args *ap) error = nfscl_maperr(ap->a_td, error, (uid_t)0, (gid_t)0); } - if (newnfs_directio_enable) - KASSERT((np->n_directio_asyncwr == 0), - ("nfs_close: dirty unflushed (%d) directio buffers\n", - np->n_directio_asyncwr)); if (newnfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) { NFSLOCKNODE(np); KASSERT((np->n_directio_opens > 0), @@ -3188,21 +3184,6 @@ loop: * Wait for all the async IO requests to drain */ BO_UNLOCK(bo); - NFSLOCKNODE(np); - while (np->n_directio_asyncwr > 0) { - np->n_flag |= NFSYNCWAIT; - error = newnfs_msleep(td, &np->n_directio_asyncwr, - &np->n_mtx, slpflag | (PRIBIO + 1), - "nfsfsync", 0); - if (error) { - if (newnfs_sigintr(nmp, td)) { - NFSUNLOCKNODE(np); - error = EINTR; - goto done; - } - } - } - NFSUNLOCKNODE(np); } else BO_UNLOCK(bo); if (NFSHASPNFS(nmp)) { @@ -3220,15 +3201,14 @@ loop: np->n_flag &= ~NWRITEERR; } if (commit && bo->bo_dirty.bv_cnt == 0 && - bo->bo_numoutput == 0 && np->n_directio_asyncwr == 0) + bo->bo_numoutput == 0) np->n_flag &= ~NMODIFIED; NFSUNLOCKNODE(np); done: if (bvec != NULL && bvec != bvec_on_stack) free(bvec, M_TEMP); if (error == 0 && commit != 0 && waitfor == MNT_WAIT && - (bo->bo_dirty.bv_cnt != 0 || bo->bo_numoutput != 0 || - np->n_directio_asyncwr != 0)) { + (bo->bo_dirty.bv_cnt != 0 || bo->bo_numoutput != 0)) { if (trycnt++ < 5) { /* try, try again... */ passone = 1; diff --git a/sys/fs/nfsclient/nfsnode.h b/sys/fs/nfsclient/nfsnode.h index 99b6ae57b1fd..cc1959b7bf79 100644 --- a/sys/fs/nfsclient/nfsnode.h +++ b/sys/fs/nfsclient/nfsnode.h @@ -122,7 +122,6 @@ struct nfsnode { short n_fhsize; /* size in bytes, of fh */ u_int32_t n_flag; /* Flag for locking.. */ int n_directio_opens; - int n_directio_asyncwr; u_int64_t n_change; /* old Change attribute */ struct nfsv4node *n_v4; /* extra V4 stuff */ struct ucred *n_writecred; /* Cred. for putpages */ @@ -142,8 +141,6 @@ struct nfsnode { * Flags for n_flag */ #define NDIRCOOKIELK 0x00000001 /* Lock to serialize access to directory cookies */ -#define NFSYNCWAIT 0x00000002 /* fsync waiting for all directio async - writes to drain */ #define NMODIFIED 0x00000004 /* Might have a modified buffer in bio */ #define NWRITEERR 0x00000008 /* Flag write errors so close will know */ #define NCREATED 0x00000010 /* Opened by nfs_create() */ From nobody Sun Apr 28 00:22: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 4VRnGS4qLqz5K9K6; Sun, 28 Apr 2024 00:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VRnGS4HTHz4Q1N; Sun, 28 Apr 2024 00:22:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714263744; 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=HKwT01NpraHMvYqMi0CeMUYh6SG5eEGi0cqVflTDb58=; b=RFkFK3t/KWPWZrIJ+pYXZRgbl8qFF123VeLeU0zroafpjYssCbdpYf/TVdLrXxw72EfjlO eA+MLmKb4k/3Y37AuRFRHE4HE8LWhh5msIvzpC0xA2MCRBzmDMdWKfKNTbaQF1bDEd2bMn 2j8RbFXkMEA+Tb7Vvev644Xu6EflYsM7x90c6zJppTi0+mr0bGDxpWt29lOoINohIuflyC tksdbEM5GEY/0XspcMeFJB7oAsZbI2uq3P9SNPtnPkvAwhc6G9/V6hyL/BrKZOIZgt+Zp9 /xFVLkMwsDHC02td4rFrKZg8YeI1hkY8fngcVcUv2T05fx9jOtW0GwSG8WFmAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714263744; a=rsa-sha256; cv=none; b=ZFBqH6AuBbKWf/syR3EY2DIJryVpM1uWuXN8KjShLG8LaHLH9S7YPs6TdwrouImJhS5vHB 0yZhNW2cjJI2LJ+3giz8smbKweWZJZpdfrX5+P7vjKmI4YUYZdLqTAmi33ep10/O910hfM 6tEa6x/1lC6puUAp/6SPuTp9yOB4BfSjGeyoMl2crHpqucA7/zjN0GU1MlFbVYXngYFqeU 1V6hIm9ZFaeciyfoyVAwfIvcPgBeibfYLfHJzlF+MZP/iIUfMMvc1wQ7pT6Yy0mDlNF9oI SLPSEXPQPakp1UotIbeKVcPwW1YNI/r3rBCJR1qWR/UCLU3f4OyGZkEN4SK/vw== 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=1714263744; 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=HKwT01NpraHMvYqMi0CeMUYh6SG5eEGi0cqVflTDb58=; b=VxtbV+PJpQNflBpZJnb0WOCY5aHATzjT0MNGCGPcULJ+BavOss3dZ9gcKlHsndxeRhuxIS HerRa1/NG+m3CHEhMGgRAsXI1fwlOtyxKgeFkBX7yFG4kxlqucqoSftarIJDbpYdsTocm3 B7QRmb5cpYOthIVNnUbNx8Yi5JuPGhXvBvK6JSBHukPFMJ12pmHONdQthgYCJwZJpCcrsL o27XSnqmsWpvmgRBeJhOBUJosDMZjGd6KFJjj+C1C2PM7oJlZUAM+IkFygpGgu6mkoKaU4 Sq1rXn+kJLieyCrBmQDPAC1v4vIE+Yo0MXRohalwjWeZrglB4ktiLE8moH9Zxw== 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 4VRnGS3tsWz131b; Sun, 28 Apr 2024 00:22:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43S0MOB5095624; Sun, 28 Apr 2024 00:22:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43S0MOvf095621; Sun, 28 Apr 2024 00:22:24 GMT (envelope-from git) Date: Sun, 28 Apr 2024 00:22:24 GMT Message-Id: <202404280022.43S0MOvf095621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jake Freeland Subject: git: cd4bd9750c1b - main - bitset: Add ORNOT 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: jfree X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd4bd9750c1b194ba22fbbc333d6166556a26577 Auto-Submitted: auto-generated The branch main has been updated by jfree: URL: https://cgit.FreeBSD.org/src/commit/?id=cd4bd9750c1b194ba22fbbc333d6166556a26577 commit cd4bd9750c1b194ba22fbbc333d6166556a26577 Author: Jake Freeland AuthorDate: 2024-04-28 00:20:34 +0000 Commit: Jake Freeland CommitDate: 2024-04-28 00:20:34 +0000 bitset: Add ORNOT macros Macros to ANDNOT a bitset currently exist, but there are no ORNOT equivalents. Introduce ORNOT macros for bitset(9), cpuset(9), and domainset(9). Approved by: markj (mentor) Reviewed by: markj MFC after: 1 week Sponsored by: NIKSUN, Inc. Differential Revision: https://reviews.freebsd.org/D44976 --- share/man/man9/Makefile | 3 +++ share/man/man9/bitset.9 | 39 +++++++++++++++++++++++++++++++++++++++ share/man/man9/cpuset.9 | 15 +++++++++++++++ sys/sys/bitset.h | 14 ++++++++++++++ sys/sys/cpuset.h | 1 + sys/sys/domainset.h | 1 + 6 files changed, 73 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index a5fa777d037c..dfc9bd996504 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -635,6 +635,8 @@ MLINKS+=bitset.9 BITSET_DEFINE.9 \ bitset.9 BIT_CMP.9 \ bitset.9 BIT_OR.9 \ bitset.9 BIT_OR2.9 \ + bitset.9 BIT_ORNOT.9 \ + bitset.9 BIT_ORNOT2.9 \ bitset.9 BIT_AND.9 \ bitset.9 BIT_AND2.9 \ bitset.9 BIT_ANDNOT.9 \ @@ -924,6 +926,7 @@ MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \ cpuset.9 CPU_OVERLAP.9 \ cpuset.9 CPU_CMP.9 \ cpuset.9 CPU_OR.9 \ + cpuset.9 CPU_ORNOT.9 \ cpuset.9 CPU_AND.9 \ cpuset.9 CPU_ANDNOT.9 \ cpuset.9 CPU_CLR_ATOMIC.9 \ diff --git a/share/man/man9/bitset.9 b/share/man/man9/bitset.9 index 1bdfdeb7484c..a4e360a678d7 100644 --- a/share/man/man9/bitset.9 +++ b/share/man/man9/bitset.9 @@ -51,6 +51,8 @@ .Nm BIT_CMP , .Nm BIT_OR , .Nm BIT_OR2 , +.Nm BIT_ORNOT , +.Nm BIT_ORNOT2 , .Nm BIT_AND , .Nm BIT_AND2 , .Nm BIT_ANDNOT , @@ -123,6 +125,13 @@ .Fa "struct STRUCTNAME *src1" .Fa "struct STRUCTNAME *src2" .Fc +.Fn BIT_ORNOT "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_ORNOT2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc .Fn BIT_AND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" .Fo BIT_AND2 .Fa "const SETSIZE" @@ -459,6 +468,36 @@ equivalent of the scalar: .Fa src2 . ) .Pp The +.Fn BIT_ORNOT +macro sets bits not in +.Fa src +in +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +|= +.Fa ~ src . ) +.Pp +The +.Fn BIT_ORNOT2 +macro computes +.Fa src1 +bitwise or not +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +| ~ +.Fa src2 . ) +.Pp +The .Fn BIT_AND macro clears bits absent from .Fa src diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9 index 974dc55b2c65..20485059a4c8 100644 --- a/share/man/man9/cpuset.9 +++ b/share/man/man9/cpuset.9 @@ -45,6 +45,7 @@ .Nm CPU_OVERLAP , .Nm CPU_CMP , .Nm CPU_OR , +.Nm CPU_ORNOT , .Nm CPU_AND , .Nm CPU_ANDNOT , .Nm CPU_XOR , @@ -86,6 +87,7 @@ .Ft bool .Fn CPU_CMP "cpuset_t *cpuset1" "cpuset_t *cpuset2" .Fn CPU_OR "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" +.Fn CPU_ORNOT "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" .Fn CPU_AND "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" .Fn CPU_ANDNOT "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" .Fn CPU_XOR "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" @@ -296,6 +298,19 @@ is composed of multiple machine words, performs multiple individually atomic operations.) .Pp The +.Fn CPU_ORNOT +macro add CPUs not in +.Fa src +to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +|= +.Fa ~ src . ) +.Pp +The .Fn CPU_AND macro removes CPUs absent from .Fa src diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h index 5ff2bb76a4ab..4afac9b172e8 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -135,6 +135,18 @@ (d)->__bits[__i] = (s1)->__bits[__i] | (s2)->__bits[__i];\ } while (0) +#define __BIT_ORNOT(_s, d, s) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] |= ~(s)->__bits[__i]; \ +} while (0) + +#define __BIT_ORNOT2(_s, d, s1, s2) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + (d)->__bits[__i] = (s1)->__bits[__i] | ~(s2)->__bits[__i];\ +} while (0) + #define __BIT_AND(_s, d, s) do { \ __size_t __i; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ @@ -330,6 +342,8 @@ #define BIT_ISSET(_s, n, p) __BIT_ISSET(_s, n, p) #define BIT_OR(_s, d, s) __BIT_OR(_s, d, s) #define BIT_OR2(_s, d, s1, s2) __BIT_OR2(_s, d, s1, s2) +#define BIT_ORNOT(_s, d, s) __BIT_ORNOT(_s, d, s) +#define BIT_ORNOT2(_s, d, s1, s2) __BIT_ORNOT2(_s, d, s1, s2) #define BIT_OR_ATOMIC(_s, d, s) __BIT_OR_ATOMIC(_s, d, s) #define BIT_OVERLAP(_s, p, c) __BIT_OVERLAP(_s, p, c) #define BIT_SET(_s, n, p) __BIT_SET(_s, n, p) diff --git a/sys/sys/cpuset.h b/sys/sys/cpuset.h index 219e190f0b37..b036b45da283 100644 --- a/sys/sys/cpuset.h +++ b/sys/sys/cpuset.h @@ -56,6 +56,7 @@ #define CPU_OVERLAP(p, c) __BIT_OVERLAP(CPU_SETSIZE, p, c) #define CPU_CMP(p, c) __BIT_CMP(CPU_SETSIZE, p, c) #define CPU_OR(d, s1, s2) __BIT_OR2(CPU_SETSIZE, d, s1, s2) +#define CPU_ORNOT(d, s1, s2) __BIT_ORNOT2(CPU_SETSIZE, d, s1, s2) #define CPU_AND(d, s1, s2) __BIT_AND2(CPU_SETSIZE, d, s1, s2) #define CPU_ANDNOT(d, s1, s2) __BIT_ANDNOT2(CPU_SETSIZE, d, s1, s2) #define CPU_XOR(d, s1, s2) __BIT_XOR2(CPU_SETSIZE, d, s1, s2) diff --git a/sys/sys/domainset.h b/sys/sys/domainset.h index 42891263b81b..f98b175e9bc8 100644 --- a/sys/sys/domainset.h +++ b/sys/sys/domainset.h @@ -54,6 +54,7 @@ #define DOMAINSET_OVERLAP(p, c) __BIT_OVERLAP(DOMAINSET_SETSIZE, p, c) #define DOMAINSET_CMP(p, c) __BIT_CMP(DOMAINSET_SETSIZE, p, c) #define DOMAINSET_OR(d, s) __BIT_OR(DOMAINSET_SETSIZE, d, s) +#define DOMAINSET_ORNOT(d, s) __BIT_ORNOT(DOMAINSET_SETSIZE, d, s) #define DOMAINSET_AND(d, s) __BIT_AND(DOMAINSET_SETSIZE, d, s) #define DOMAINSET_ANDNOT(d, s) __BIT_ANDNOT(DOMAINSET_SETSIZE, d, s) #define DOMAINSET_CLR_ATOMIC(n, p) __BIT_CLR_ATOMIC(DOMAINSET_SETSIZE, n, p) From nobody Sun Apr 28 03:19: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 4VRsBV24Vvz5Hl4H; Sun, 28 Apr 2024 03:19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VRsBV1N2vz4jfW; Sun, 28 Apr 2024 03:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714274354; 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=+E13tMakp1hrQpgGtkjZ3/3RE9J/SqXRF/rIoyoUR30=; b=Td0gRGeQ/uXWp33Zjet0nEpTYEX395XRjlQKbqwvW6AuhhaGBUu4Agbk+/nv4GJF6jakb4 JkyuyI9919YoZS4PYpE+iK52JyfE8dzb/79KmgEFryu7VOX5GEw9U+u7Y3uAhLgpHCUNpD E+O4+buqP57qu/FJtMcQMc0YKjaIcJXvjhN8xAw8ihDVvf6nhohWmu3ylmxIfYKFXCjEhq 83+zuArcNdQfkqSzkpXGoeumXxKnlLOCThB53qMZ+BNOlk9fiE9xzMXlUB1f4uSRNWi4Eg V/Go+9zByvbJULANtn4J+enmAdFZM1iXVFD2HABUaltZgrsy7X04f1c7+2gmOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714274354; a=rsa-sha256; cv=none; b=i5vm8EpvvdZKuASL+xQyh3/nRNEuHoEheqHLx0SKYpmPMhKGje8JMm4mA/yBZpDQWUWiIQ LpgWq1fTbvxxxL63+YyAisL4ZWLHsgg9uWY5H4mtXpXnXzenrS+DvXZK/s+w5nvOzzALTK v/yTO0HWk9gSM+GKIXHNvRBZBWaJOvxEfL5gx82r0snr3rebh3fujzL/mGQIFi8zriI9hQ atrmbEJOpjahVYi3j2b9iIdYGlBdhzAhpIqU4E8PNpge+2WWf8j1mIKRAvttdFnMqjb7br gLYG2d3jpBtY9ns/QENLTrda+qu2hpxfvDLyJ5NawAqKk/8Z4Y23SiMoZv1kYg== 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=1714274354; 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=+E13tMakp1hrQpgGtkjZ3/3RE9J/SqXRF/rIoyoUR30=; b=dg0cPbsdTRpr8IQOkoiNqDofv80iFpm2sibsrbBNcPI2ZJ3ZvP9uR4aUkuuIoe90I8zZTJ hISVhiTDTbys/wq9og64lKuQsgDc7Bmmr0LjAybKGdJWjbnQln0RE8wR6AiIj3ggJPvJqN TZFAKNfiYgeiz/fdRl/Tamy50OjUXHHO7QYdpTRIf7GMKVzFnZB3c5dyVm8o8uMvnXUGi6 dpwpZViSkept3KCdOhJUoPxFX1ymQPBXZkwESX3MMKeAMQcb9IhA1KbM0YFge0dbWuBzD+ MirfMWHy7pcnGVatoPRQhRGIYmnIgWfhQsccEM8wvLgYh1zoyqHtSVaeMjUiqQ== 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 4VRsBV0v1Vz17Kg; Sun, 28 Apr 2024 03:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43S3JEYN084958; Sun, 28 Apr 2024 03:19:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43S3JExs084955; Sun, 28 Apr 2024 03:19:14 GMT (envelope-from git) Date: Sun, 28 Apr 2024 03:19:14 GMT Message-Id: <202404280319.43S3JExs084955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: b30a7e5418be - main - bhyve.8: Update and rearrange to improve readability 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b30a7e5418be5c5d27ac967f5ce99461ab79c37c Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=b30a7e5418be5c5d27ac967f5ce99461ab79c37c commit b30a7e5418be5c5d27ac967f5ce99461ab79c37c Author: Chris Moerz AuthorDate: 2024-04-26 18:23:13 +0000 Commit: Joseph Mingrone CommitDate: 2024-04-28 03:18:35 +0000 bhyve.8: Update and rearrange to improve readability bhyve's man page is a very long block of text that has grown to proportions that make it hard to read. In particular, the level of nesting of various content means man can no longer render the text in a user-friendly way. To remedy this: - move the -s argument documentation into a separate section and reformat the various arguments so they are consistent - add documentation on how to use the -o config.dump feature - make the listing of various arguments more consistent - consolidated duplicate listings of TPM backends - add an example for the config.dump feature - fix various formatting inconsistencies. Reviewed by: emaste, imp, jrm, Pau Amma , rgrimes Differential Revision: https://reviews.freebsd.org/D43940 --- usr.sbin/bhyve/bhyve.8 | 249 ++++++++++++++++++++++++++++++------------------- 1 file changed, 151 insertions(+), 98 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 42ba328451a9..527ccf720540 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 10, 2024 +.Dd April 26, 2024 .Dt BHYVE 8 .Os .Sh NAME @@ -356,10 +356,45 @@ If not specified, the .Ar bus value defaults to 0. .Pp -The +See +.Sx "PCI EMULATION" +for available options for the +.Ar emulation +argument. +.It Fl U Ar uuid +Set the universally unique identifier +.Pq UUID +in the guest's System Management BIOS System Information structure. +By default a UUID is generated from the host's hostname and +.Ar vmname . +.It Fl u +RTC keeps UTC time. +.It Fl W +Force virtio PCI device emulations to use MSI interrupts instead of MSI-X +interrupts. +.It Fl w +Ignore accesses to unimplemented Model Specific Registers (MSRs). +This is intended for debug purposes. +.It Fl x +The guest's local APIC is configured in x2APIC mode. +This option applies only to the amd64 platform. +.It Fl Y +Disable MPtable generation. +This option applies only to the amd64 platform. +.It Ar vmname +Alphanumeric name of the guest. +This should be the same as that created by +.Xr bhyveload 8 . +.El +.Sh PCI EMULATION +.Nm +provides emulation for various PCI devices. +They are specified by the +.Fl s +.Ar slot,emulation,conf +configuration's .Ar emulation -argument -can be one of the following: +argument, which can be one of the following: .Bl -tag -width "amd_hostbridge" .It Cm hostbridge A simple host bridge. @@ -400,7 +435,7 @@ PCI 16550 serial device. .It Cm lpc LPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports, a boot ROM, and, -optionally, a fwcfg type and the debug/test device. +optionally, a fwcfg type, and the debug/test device. The LPC bridge emulation can only be configured on bus 0. .It Cm fbuf Raw framebuffer device attached to VNC server. @@ -419,8 +454,7 @@ If .Ar conf is not specified, the device emulation has no backend and can be considered unconnected. -.Pp -Network device backends: +.Ss Network device backends .Sm off .Bl -bullet .It @@ -452,7 +486,7 @@ Network device backends: .Pp If .Cm mac -is not specified, the MAC address is derived from a fixed OUI and the +is not specified, the MAC address is derived from a fixed OUI, and the remaining bytes from an MD5 hash of the slot and function numbers and the device name. .Pp @@ -503,16 +537,15 @@ forwarded to the guest. Multiple rules can be specified, separated by semicolons. Note that semicolons must be escaped or quoted to prevent the shell from interpreting them. -.Pp -Block storage device backends: -.Sm off +.Ss Block storage device backends: .Bl -bullet +.Sm off .It .Ar /filename Op Cm \&, Ar block-device-options .It .Ar /dev/xxx Op Cm \&, Ar block-device-options -.El .Sm on +.El .Pp The .Ar block-device-options @@ -541,14 +574,13 @@ A fwcfg file is used to specify the bootorder. The guest firmware may ignore or doesn't support this fwcfg file. In that case, this feature doesn't work as expected. .El -.Pp -SCSI device backends: -.Sm off +.Ss SCSI device backends .Bl -bullet +.Sm off .It .Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc -.El .Sm on +.El .Pp The .Ar scsi-device-options @@ -564,14 +596,13 @@ A fwcfg file is used to specify the bootorder. The guest firmware may ignore or doesn't support this fwcfg file. In that case, this feature doesn't work as expected. .El -.Pp -9P device backends: -.Sm off +.Ss 9P device backends .Bl -bullet +.Sm off .It .Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options -.El .Sm on +.El .Pp The .Ar 9p-device-options @@ -580,8 +611,7 @@ are: .It Cm ro Expose the share in read-only mode. .El -.Pp -TTY device backends: +.Ss TTY device backends .Bl -tag -width 10n .It Cm stdio Connect the serial port to the standard input and output of @@ -591,11 +621,25 @@ process. .It Ar /dev/xxx Use the host TTY device for serial port I/O. .El +.Ss TPM device backends +.Bl -bullet +.Sm off +.It +.Ar type Ns \&, Ns Ar path Ns Op Cm \&, Ns Ar tpm-device-options +.Sm on +.El +.Pp +Emulate a TPM device. The argument +.Ar path +needs to point to a valid TPM device path, i.e. +.Pa /dev/tpm0 . +.El .Pp -TPM device backends: +Supported options for +.Ar type : .Bl -tag -width 10n -.It Ar type Ns \&, Ns Ar path Ns Op Cm \&, Ns Ar tpm-device-options -Emulate a TPM device. +.It Cm passthru +pass a physical TPM device through to the guest .El .Pp The @@ -607,19 +651,23 @@ Version of the TPM device according to the TCG specification. Defaults to .Cm 2.0 .El +.Ss Boot ROM device backends +.Sm off +.Bl -bullet +.It +.Ar romfile Ns Op Cm \&, Ns Ar varfile +.El +.Sm on .Pp -Boot ROM device backends: -.Bl -tag -width 10n -.It Ar romfile Ns Op Cm \&, Ns Ar varfile Map .Ar romfile in the guest address space reserved for boot firmware. +.Pp If .Ar varfile is provided, that file is also mapped in the boot firmware guest address space, and any modifications the guest makes will be saved to that file. -.El .Pp Fwcfg types: .Bl -tag -width 10n @@ -647,8 +695,7 @@ many other things to the guest. Some operating systems such as Fedora CoreOS can be configured by qemu's fwcfg interface as well. .El -.Pp -Pass-through device backends: +.Ss Pass-through device backends .Sm off .Bl -bullet .It @@ -697,28 +744,7 @@ The host device must have been reserved at boot-time using the .Va pptdevs loader variable as described in .Xr vmm 4 . -.Pp -TPM devices: -.Bl -tag -width 10n -.It Ns Ar type -Specifies the type of the TPM device. -.Pp -Supported types: -.Bl -tag -width 10n -.It Cm passthru -.El -.It Cm version= Ns Ar version -The -.Ar version -of the emulated TPM device according to the TCG specification. -.Pp -Supported versions: -.Bl -tag -width 10n -.It Cm 2.0 -.El -.El -.Pp -Virtio console device backends: +.Ss Virtio console device backends .Bl -bullet .Sm off .It @@ -735,7 +761,7 @@ accepts at most one connection per port at a time. Limitations: .Bl -bullet .It -Due to lack of destructors in +Due to the lack of destructors in .Nm , sockets on the filesystem must be cleaned up manually after .Nm @@ -748,16 +774,18 @@ resize at present. .It Emergency write is advertised, but no-op at present. .El +.Ss Virtio input device backends: +.Bl -bullet +.Sm off +.It +.Ar /dev/input/eventX +.Sm on +.El .Pp -Virtio input device backends: -.Bl -tag -width 10n -.It Ar /dev/input/eventX Send input events of .Ar /dev/input/eventX to guest by VirtIO Input Interface. -.El -.Pp -Framebuffer devices backends: +.Ss Framebuffer device backends .Bl -bullet .Sm off .It @@ -800,8 +828,8 @@ and maximum is 3840x2160 pixels. Possible values for this option are .Cm io (default), -.Cm on -, and +.Cm on , +and .Cm off . PCI graphics cards have a dual personality in that they are standard PCI devices with BAR addressing, but may also @@ -846,15 +874,17 @@ intended for use on untrusted networks. Many implementations will want to use stronger security, such as running the session over an encrypted channel provided by IPsec or SSH. .El -.Pp -xHCI USB device backends: -.Bl -tag -width 10n -.It Cm tablet -A USB tablet device which provides precise cursor synchronization -when using VNC. +.Ss xHCI USB device backends +.Bl -bullet +.Sm off +.It +.Ar tablet +.Sm on .El .Pp -NVMe device backends: +A USB tablet device that provides precise cursor synchronization +when using VNC. +.Ss NVMe device backends .Bl -bullet .Sm off .It @@ -897,8 +927,7 @@ Supported values are: and .Cm disable . .El -.Pp -AHCI device backends: +.Ss AHCI device backends .Bl -bullet .It .Sm off @@ -923,8 +952,7 @@ Revision Number with maximum 8 characters. .It Cm model Model Number with maximum 40 characters. .El -.Pp -HD Audio device backends: +.Ss HD Audio device backends .Bl -bullet .It .Sm off @@ -942,31 +970,6 @@ Playback device, typically Recording device, typically .Ar /dev/dsp0 . .El -.It Fl U Ar uuid -Set the universally unique identifier -.Pq UUID -in the guest's System Management BIOS System Information structure. -By default a UUID is generated from the host's hostname and -.Ar vmname . -.It Fl u -RTC keeps UTC time. -.It Fl W -Force virtio PCI device emulations to use MSI interrupts instead of MSI-X -interrupts. -.It Fl w -Ignore accesses to unimplemented Model Specific Registers (MSRs). -This is intended for debug purposes. -.It Fl x -The guest's local APIC is configured in x2APIC mode. -This option applies only to the amd64 platform. -.It Fl Y -Disable MPtable generation. -This option applies only to the amd64 platform. -.It Ar vmname -Alphanumeric name of the guest. -This should be the same as that created by -.Xr bhyveload 8 . -.El .Sh CONFIGURATION VARIABLES .Nm uses an internal tree of configuration variables to describe global and @@ -993,6 +996,31 @@ and global settings. .Pp More details on configuration variables can be found in .Xr bhyve_config 5 . +.Sh CONFIGURATION FILE CREATION +The +.Fl k +flag allows one to provide a path to a configuration file holding all +settings, which otherwise would need to be defined by providing a long +list of program arguments to +.Nm . +.Pp +There is a very simple way to translate a complex set of program +arguments to an equivalent configuration file in +.Xr bhyve_config 5 +format. +.Pp +Use +.Fl o +.Ar config.dump=1 +to make +.Nm +dump a configuration file representing the used flags and arguments to +stdout. You can pipe the output into a file to persist the generated settings. +.Pp +Make sure to remove the +.Ar config.dump +line from the resulting configuration file before using it to start +.Nm . .Sh DEBUG SERVER The current debug server provides limited support for debuggers. .Ss Registers @@ -1131,6 +1159,31 @@ bhyve -c 2 -m 4g -w -H \\ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,BHYVE_UEFI_VARS.fd uefivm .Ed +.Pp +To create a configuration file +.Pa configfile +for a virtual machine, use +.Fl o +.Ar config.dump=1 : +.Bd -literal -offset indent +/usr/sbin/bhyve -c 2 -m 256 -A -H -P \\ + -s 0:0,hostbridge -s 1:0,virtio-net,tap0 \\ + -s 2:0,ahci-hd,./vm0.img \\ + -s 31,lpc -l com1,stdio \\ + -o config.dump=1 vm0 > configfile +.Ed +.Pp +Then use an editor of your choice to remove the line "config.dump=1" +from the newly generated +.Pa configfile . +.Pp +To start +.Nm +using this configuration file, use flag +.Fl k : +.Bd -literal -offset indent +/usr/sbin/bhyve -k configfile vm0 +.Ed .Sh SEE ALSO .Xr bhyve 4 , .Xr netgraph 4 , From nobody Sun Apr 28 12:37: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 4VS5bJ3FZzz5J9Yb; Sun, 28 Apr 2024 12:38:04 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VS5bG5FQ9z4d30; Sun, 28 Apr 2024 12:38:02 +0000 (UTC) (envelope-from mpp302@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 mpp302@gmail.com designates 209.85.208.178 as permitted sender) smtp.mailfrom=mpp302@gmail.com Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2db239711ebso8922031fa.1; Sun, 28 Apr 2024 05:38:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714307880; x=1714912680; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MkYB5BkpAd+CUHu3Ol2C/vZiMFQtnWUGP/w49DfCSBo=; b=PYjDwJEEYm+w97UEXS8t/8xNupZTq7ACwFY5eGIBi5io6Jwmt7Eg5aiCtj8XpvtoFG PExVPXFDzugd4o/rkSJnHlPNxPuPVwlc9NN1hdahXJz6/8qEZpdpXBfDGedOeL0lC+eC 4tQ1DG/GQH+nWmVt5Fc8EUToPe99llCg17003PCs0pMw5YINv/klX9L2Of+Go/mYE15T uoI1tKDNxqyy8PlvjtwFSsVbEwCJcl20e3x5xWnDpLNIv0EvbS2nuVf/aWqNW1D9C6mr A41KY8Ea/vo9FZRpeM8n/mIzdCAxyEg7GnrjbeP2gA73wsL0sTFu/sZi3rFWrlXPKsuI 5jEQ== X-Forwarded-Encrypted: i=1; AJvYcCUdOm8ocZN9wXCnJVa4JAshsRJH0hLRaXrb8EzUsP+1/GPcFoKaUQidZq27P7K8a4rzdTByvOFqImgpQFIulx2njyA9i0IL/LBf6mQNyMTG7f8kxVo8fJ6ktUL/qlac+ValDlnPRValU/atieOjd80ktg== X-Gm-Message-State: AOJu0YwGQXkAa4SqL1xKrqxMYvXex8aAG+rUonVEQn9nIrs3t7pJIqoR gnRWsXstMOVYJNSvOypJ9RlVL16jXGvF9KUrU/G6zO01WGgos/FSzKT/6RDE X-Google-Smtp-Source: AGHT+IHmprmZES6UCHpPJoXBQ6RMlJa4+NMsjkFUnffe0snTk/PzJ5Q2CbOr/p8dfnmFWZPPIBcGyQ== X-Received: by 2002:a2e:97d4:0:b0:2df:1e3e:27e8 with SMTP id m20-20020a2e97d4000000b002df1e3e27e8mr4320120ljj.0.1714307879831; Sun, 28 Apr 2024 05:37:59 -0700 (PDT) Received: from smtpclient.apple (ip5f5af551.dynamic.kabel-deutschland.de. [95.90.245.81]) by smtp.gmail.com with ESMTPSA id t16-20020a056402241000b005701eaa2023sm12260146eda.72.2024.04.28.05.37.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2024 05:37:59 -0700 (PDT) From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-Id: <026867C8-33DC-4555-8B6B-03E0E848510D@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_9FB49A63-E48C-4927-8AF2-0542D31DC5BD" 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.500.171.1.1\)) Subject: Re: git: 5626f9e79090 - main - style.9: Document the existence of tools/build/checkstyle9.pl Date: Sun, 28 Apr 2024 14:37:48 +0200 In-Reply-To: Cc: src-committers , "" , "" To: Warner Losh References: <202404260938.43Q9cSwG055237@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Spamd-Bar: - X-Spamd-Result: default: False [-1.28 / 15.00]; URI_COUNT_ODD(1.00)[9]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.88)[-0.878]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.178:from]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.178:from] X-Rspamd-Queue-Id: 4VS5bG5FQ9z4d30 --Apple-Mail=_9FB49A63-E48C-4927-8AF2-0542D31DC5BD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hey Warner, Thanks for taking a look at the patch! > On 26. Apr 2024, at 15:30, Warner Losh wrote: > On Fri, Apr 26, 2024, 3:38=E2=80=AFAM Mateusz Piotrowski = <0mp@freebsd.org > wrote: >> The branch main has been updated by 0mp: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5626f9e790901999def12040a60746b0= ceeb9b95 = [...] >>=20 >> style.9: Document the existence of tools/build/checkstyle9.pl = [...] >> share/man/man9/style.9 | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) [...] >> @@ -904,6 +904,10 @@ instead of the older >> .Fn CTASSERT . >> .Sh FILES >> .Bl -tag -width indent >> +.It Pa /usr/src/tools/build/checkstyle9.pl >> +A script to check for violations of >=20 >=20 > Egregious violations and there are some false positives still. checkstyle9 is already warning against those imperfections. I assumed = that there is no need to warn against those in the manual page as well. = I can add additional disclaimers if you think they are desired :) Best, Mateusz Piotrowski --Apple-Mail=_9FB49A63-E48C-4927-8AF2-0542D31DC5BD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hey = Warner,

Thanks for taking a look at the patch!

On 26. Apr 2024, at 15:30, Warner Losh = <imp@bsdimp.com> wrote:
On Fri, Apr = 26, 2024, 3:38=E2=80=AFAM Mateusz Piotrowski <0mp@freebsd.org> = wrote:
The branch = main has been updated by 0mp:

URL: https://cgit.FreeBSD.org/src/commit/?id=3D5626f9e7909019= 99def12040a60746b0ceeb9b95
[...]

  =   style.9: = Document the existence of tools/build/checkstyle9.pl
[...]
 share/man/man9/style.9 | 6 +++++-
 1 file changed, 5 = insertions(+), 1 = deletion(-)
[...]
=
@@ -904,6 +904,10 @@ instead of = the older
 .Fn CTASSERT .
 .Sh FILES
 .Bl -tag = -width indent
+.It Pa /usr/src/tools/build/checkstyle9.pl
+A script to check for = violations of

Egregious violations and there are some false positives = still.

checkstyle9 is = already warning against those imperfections. I assumed that there is no = need to warn against those in the manual page as well. I can add = additional disclaimers if you think they are desired = :)

Best,
Mateusz = Piotrowski

= --Apple-Mail=_9FB49A63-E48C-4927-8AF2-0542D31DC5BD-- From nobody Sun Apr 28 17:13: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 4VSChm4r4lz5JbmB; Sun, 28 Apr 2024 17:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSChm22Ymz4yk4; Sun, 28 Apr 2024 17:13:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714324392; 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=TL1o4H+OIar3hYrZHTgZWcqkPinJ04h+Fs5BhUspC4k=; b=Pf/aQeUW8PZx/4YjSDPeC+C8W/PXW8sLaWTl0HsIjd2s8RMQIEiXFktACz4oa9h4K36tuZ ID7x0Fz7sJxNX8X571BmKD6xelw2jJeKq6444BmkM9M7LinJHUAYp5J/cYPf/8UtCGtiep OjimxDRdlXiHtSTlA6Dxc5LP2kNDpCKdSI9iifG7kqXWDcLnIcU1tj+HN3+xGA/jRJgwHu 8pgn91dXaY7lm1vjW3vWuGDXGaXvwz2XHWEvl3qBpiRShZE1jRTNi9CA/WCk75s4tv9jmn 6xCx5rztEznSxuUJs4Gtb2AVE/tAdYghe9mCnk2FcYf0QhXieCUPcmMLfg6WVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714324392; a=rsa-sha256; cv=none; b=nqCNrj21fgocJFDtf6qaDUi90lBTpwHBMRq7bptxiCER/bbgubdebC55+zK2Y2cLDJ9rWz 1UY/DeShIqCy8B09zHw3Mcuc6NmotL1HX7xx/tFZAp1YPU1xOyeHsJR4QHZ82g7yz7Hxhx VBoTSchBKwDEeBNYjv5gGBP+SJOGKyCTNRxOh16EHoXPZW201LtfREsvgHMsALQJL3Sox5 To5cv/sLUOucEqx/bThHCJ5nI76LhnGS39JJHFS4x3Xsx+s2RyOolRQqNemllYMOg79uxR p+uIEVdbO2TV+f/GgEfHt78yFeHO3H7dvtW+m+8Ht0XLWCZNL/tYToy13F6gkA== 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=1714324392; 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=TL1o4H+OIar3hYrZHTgZWcqkPinJ04h+Fs5BhUspC4k=; b=dqP5N8lWfzsrta8iWOx2BD9Ve27+i2+Puw0y3MUCWkfunncF5VxclwsBuYHiMG7nhnLwVs pR2ZAszmNieAJJtEVP69ESHk53lKtr0edi29+r1lP7GAft5kKXNq1deyHSOWrEWADeeOpd 864DKXMbOCgmuaqNvyikYF5vYtqFvVtpstatf7rBSaFmBwcUMres60xPra1sKIKKtUnPG5 TVsqXK1L2eJeWYelw0qy9kyx6A3Kmib+S81j5k5e6LliZXe6VDJF571XPfuJLKf07JqdXd jDcWdhce4Ah65NNAL96FgPFI/FEMyAlOPPAeomCsoShs0/sO+tii21uXBh7MrQ== 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 4VSChm1dySzYwy; Sun, 28 Apr 2024 17:13:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SHDCAs006962; Sun, 28 Apr 2024 17:13:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SHDCea006959; Sun, 28 Apr 2024 17:13:12 GMT (envelope-from git) Date: Sun, 28 Apr 2024 17:13:12 GMT Message-Id: <202404281713.43SHDCea006959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: dafb424b8d44 - main - date: Correctly check outcome of mktime(). 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dafb424b8d44c7fdc9cfe876a79aad05c438def0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dafb424b8d44c7fdc9cfe876a79aad05c438def0 commit dafb424b8d44c7fdc9cfe876a79aad05c438def0 Author: Dag-Erling Smørgrav AuthorDate: 2024-04-28 17:12:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-04-28 17:12:58 +0000 date: Correctly check outcome of mktime(). X-MFC-With: 7b390cb63689 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44982 --- bin/date/date.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/date/date.c b/bin/date/date.c index 718c94601dd6..3ce9ee3235fb 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -334,7 +334,9 @@ setthetime(const char *fmt, const char *p, int jflag, struct timespec *ts) } /* convert broken-down time to GMT clock time */ - if ((ts->tv_sec = mktime(lt)) == -1) + lt->tm_yday = -1; + ts->tv_sec = mktime(lt); + if (lt->tm_yday == -1) errx(1, "nonexistent time"); ts->tv_nsec = 0; From nobody Sun Apr 28 18:12: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 4VSF0q6RsHz5Jh5r; Sun, 28 Apr 2024 18:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSF0q5q5pz53vn; Sun, 28 Apr 2024 18:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714327931; 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=CKpqgLjNDnTCYugTxM6f2L91N2DdFF54djbqxPxNUuE=; b=Tlij/B2ZM3aLS39ewkq9DSzcJj1s9e0mfKfRGZiukPCVx4JO/ejOSzEktkDxI3czftLD6v KzmPQ3i+36H/JGHr8lkpZ6s74urKpYQQIGFM20Zo2ImI9HQfHcXYXDt0DYDNiPXthmy6aF ldA0tvqKXkqq0XhbU9TJ2KHXhRE5cQ9CwahWg+EKV5kC85YdYYgDGq33vIAIVQHyMOqcCS VFLRpHtMVRF6WkmY7ZiGwWFVCGLjL+Ep9qHneeTOB68IjGU2IJ2DV9e6aZoSt657A4NiHz n6xA5A28mmRIKg1xfNY1JO9rSKiB4TQaY5muOZXKPdXb1Uv0w+9WP2q4dhrlbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714327931; a=rsa-sha256; cv=none; b=yp51+V3K5z5K2ftjLHHKdmvDt/Q282OfPfm6yW5emHa3bWpp7bW3VhyHN1vpClNBmRwoe3 1NqtNK8+3tM/aF03U/uW6gNAf8z/YIKzP7hvlM6MnFMt4N2ARcFFEH7khfftMXY5AmyRi6 5QGFfhbBloHuZUvXthdeM/lc1LbkqML8YVs3pTiPlOz+8rC6Npmy9n52YLaNFwqXAR/lyb D3mdIMod68FcK1AUYoBQ3TlGzE9VvJlt8G4wpRolvc6Fkaaow6y8KBBKPcfiqd+mxXUN6q hIKkEfelm3DxXQ537nFGFdBVLdyfr6hGLzDunpnJU9facK2UT2FrGZSoSpElww== 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=1714327931; 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=CKpqgLjNDnTCYugTxM6f2L91N2DdFF54djbqxPxNUuE=; b=hpf7PdxvDfKFOc+RpIWkyDO7MBCGAuC11y/+tihmSZR8+/aZUdm0GnQudhqOS+TM4OLbci Qq8Hx01yHTOx54Swq+zIyjC/4mWVpdQzW7rhuHiQFC0VnXdphp3adHLXIwJk+XgmFTpw4S Ea8HlXMPaldIw2LqMa8zkGB5M3XHG9wRTJYM3Tf9HOL4MF7L7QKqL7Xa1dWQSpTJqexvVZ ME4bjzsVx5qr9UfEKMRrESecmcatLyi9d9ZAVu836pxZJrh3SQH8VCqIgVAmpzPmmwBl88 k6hn3NqaNHHqbn4roCBmG68MSkJK2i3WjviucGxkxud8TMln1pKJTpfkeWk6ag== 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 4VSF0q5QCqzbnP; Sun, 28 Apr 2024 18:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SICBKA008154; Sun, 28 Apr 2024 18:12:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SICBSW008151; Sun, 28 Apr 2024 18:12:11 GMT (envelope-from git) Date: Sun, 28 Apr 2024 18:12:11 GMT Message-Id: <202404281812.43SICBSW008151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6662c2312e95 - main - gettimeofday.2: Do mention improbable future removal 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6662c2312e956439652ce2d06b42753b6a78fc61 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=6662c2312e956439652ce2d06b42753b6a78fc61 commit 6662c2312e956439652ce2d06b42753b6a78fc61 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-28 18:06:05 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-04-28 18:11:22 +0000 gettimeofday.2: Do mention improbable future removal As kib@ noted: > Obviously gettimeofday(2) is not going to be removed > even in the far future. Reported by: kib Fixes: 4395d3ced5cf Document that gettimeofday() is obsolescent MFC after: 3 days --- lib/libsys/gettimeofday.2 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/libsys/gettimeofday.2 b/lib/libsys/gettimeofday.2 index cfba97149199..4fcd4b52312b 100644 --- a/lib/libsys/gettimeofday.2 +++ b/lib/libsys/gettimeofday.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 24, 2024 +.Dd April 28, 2024 .Dt GETTIMEOFDAY 2 .Os .Sh NAME @@ -139,11 +139,9 @@ function is considered obsolescent and its usage discouraged by .\" XXX: This should be replaced in the future when an appropriate argument to .\" the St macro is available: -p1003.1-2017 .No IEEE Std 1003.1-2008, 2017 Edition (\\(LqPOSIX.1\\(Rq) . -Application should use the +Applications should use the .Xr clock_gettime 2 -function instead as -.Nm gettimeofday -might be removed in the future. +function instead. .Sh HISTORY The .Fn gettimeofday From nobody Sun Apr 28 18:16: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 4VSF5c6kC7z5Jhk0 for ; Sun, 28 Apr 2024 18:16:20 +0000 (UTC) (envelope-from wlosh@bsdimp.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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSF5c2zZwz54Pj for ; Sun, 28 Apr 2024 18:16:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-572229f196cso3832278a12.2 for ; Sun, 28 Apr 2024 11:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1714328176; x=1714932976; 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=YB+QBDP748La5hcuu3drequV5zieljIJrFAOqM/2SVc=; b=LQW426hshnRqTeonH8Z4E4Qjd3xxM0X/uIPPUxo6E3jKYCB4FaEnym9Gxlq80fj17z 1QZfZJRBAkpVKdtHvbb7wzfqJzP0MBPqRkNgFufoZJT0sQrkT8SUi68N13p+rgMOrzr0 gk7El+zmLFBmrVUhXrolwZ1Ucye5SP6Ki3u5bX4yRLkFfh0ZD5ohI4UnLaEUSF/4FwSA bilUlWHc/qC9zCoZvimmn7XgI4MuvGPaJiO+TpEvP5Cu9JbgAGmwTN2Vy/hnykxCfiUP VckyGAsBJAeAmPYSUcYBnjZZJTtRRcR6gxwgufzCpZ+G0SihSiG1EWVnIauxSDiiAeWT kJ3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714328176; x=1714932976; 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=YB+QBDP748La5hcuu3drequV5zieljIJrFAOqM/2SVc=; b=WYkfd5dVIp/ClqWFz4Rc+oSD+tEG7QvNGYWe6hYm3U/5/9QwNTofOtderlvAcg3OJw VNVrokWNIaaBiFF2MUAYnP/oiKTbIeA5GLf/q/nOnZWPLrQuOLeop3XZ0sIhJa3n4Ris 978s1yQ6+PeHQl0zgKfHyoWKNI5205CSoRs5KGS8O9K3lOPa3IOqIMndYcGwa8cNhAbn BZxAKabut+mGMdfL+NK7Fu3TGXxv6mfOjV6b9Gas7LDaJr5qzd5FqYVaMoS72SQ+MEVl tIkroWr3vcyHEyMgT8MNC7IAXbpalxC9/OLJtAOLxwaBinDCeSnxy5SQlyr1age+swWk RVAg== X-Forwarded-Encrypted: i=1; AJvYcCWSLyu3liqlXIeZAgycIk8sxYj1X3YhXbRqJgrYPRrNyj/ar8L7e4B87JXM2EejEnmJMOW1uIfBk4ybZVeB4BAXG/QlxWVUHmDg+syn9+Igeg== X-Gm-Message-State: AOJu0Yx8j93ud2adrrEIDkhCa0N7WWSWPOu6GqW0rvUGgUTXPq62yAw7 5MVM5Y7I8BiUnTALGky07DthXVwba6fIjLtMZ1YTAutKXcq9KlmEpVapbDsaUJmQmbrYgvgkbCz rHVMNbCRJxhXtKZUskcKI/DU0uFbEim3cG8XCEQ== X-Google-Smtp-Source: AGHT+IFlPV/Ral8eEGzf5kIdiCQzjBWKEcRGwoWcmYTaen489DcecZMndMYvNLNHr0l7mtXzxqAQK0QFe4PrRrxHVng= X-Received: by 2002:a17:906:445:b0:a52:6721:f276 with SMTP id e5-20020a170906044500b00a526721f276mr4281931eja.19.1714328176530; Sun, 28 Apr 2024 11:16: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: <202404281812.43SICBSW008151@gitrepo.freebsd.org> In-Reply-To: <202404281812.43SICBSW008151@gitrepo.freebsd.org> From: Warner Losh Date: Sun, 28 Apr 2024 12:16:05 -0600 Message-ID: Subject: Re: git: 6662c2312e95 - main - gettimeofday.2: Do mention improbable future removal To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000fdb05b06172c2149" 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: 4VSF5c2zZwz54Pj --000000000000fdb05b06172c2149 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Apr 28, 2024 at 12:12=E2=80=AFPM Mateusz Piotrowski <0mp@freebsd.or= g> wrote: > The branch main has been updated by 0mp: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D6662c2312e956439652ce2d06b42753= b6a78fc61 > > commit 6662c2312e956439652ce2d06b42753b6a78fc61 > Author: Mateusz Piotrowski <0mp@FreeBSD.org> > AuthorDate: 2024-04-28 18:06:05 +0000 > Commit: Mateusz Piotrowski <0mp@FreeBSD.org> > CommitDate: 2024-04-28 18:11:22 +0000 > > gettimeofday.2: Do mention improbable future removal > > As kib@ noted: > > > Obviously gettimeofday(2) is not going to be removed > > even in the far future. > > Reported by: kib > Fixes: 4395d3ced5cf Document that gettimeofday() is > obsolescent > MFC after: 3 days > --- > lib/libsys/gettimeofday.2 | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/lib/libsys/gettimeofday.2 b/lib/libsys/gettimeofday.2 > index cfba97149199..4fcd4b52312b 100644 > --- a/lib/libsys/gettimeofday.2 > +++ b/lib/libsys/gettimeofday.2 > @@ -25,7 +25,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY = OF > .\" SUCH DAMAGE. > .\" > -.Dd April 24, 2024 > +.Dd April 28, 2024 > .Dt GETTIMEOFDAY 2 > .Os > .Sh NAME > @@ -139,11 +139,9 @@ function is considered obsolescent and its usage > discouraged by > .\" XXX: This should be replaced in the future when an appropriate > argument to > .\" the St macro is available: -p1003.1-2017 > .No IEEE Std 1003.1-2008, 2017 Edition (\\(LqPOSIX.1\\(Rq) . > No, this should be .St -p1003.1-2008 since the 2017 edition was only typographical and technical changes. The mdoc folks are never going to have a -p1003.1-2017 because it's not a full new standard. Warner > -Application should use the > +Applications should use the > .Xr clock_gettime 2 > -function instead as > -.Nm gettimeofday > -might be removed in the future. > +function instead. > .Sh HISTORY > The > .Fn gettimeofday > --000000000000fdb05b06172c2149 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Apr 28, 2024 at 12:12=E2=80= =AFPM Mateusz Piotrowski <0mp@freebsd= .org> wrote:
The branch main has been updated by 0mp:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D6662c2312e956439652ce2d06b42753b6a78fc61
commit 6662c2312e956439652ce2d06b42753b6a78fc61
Author:=C2=A0 =C2=A0 =C2=A0Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2024-04-28 18:06:05 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2024-04-28 18:11:22 +0000

=C2=A0 =C2=A0 gettimeofday.2: Do mention improbable future removal

=C2=A0 =C2=A0 As kib@ noted:

=C2=A0 =C2=A0 > Obviously gettimeofday(2) is not going to be removed
=C2=A0 =C2=A0 > even in the far future.

=C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 kib
=C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4395d3ced5cf Documen= t that gettimeofday() is obsolescent
=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 3 days
---
=C2=A0lib/libsys/gettimeofday.2 | 8 +++-----
=C2=A01 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/libsys/gettimeofday.2 b/lib/libsys/gettimeofday.2
index cfba97149199..4fcd4b52312b 100644
--- a/lib/libsys/gettimeofday.2
+++ b/lib/libsys/gettimeofday.2
@@ -25,7 +25,7 @@
=C2=A0.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSS= IBILITY OF
=C2=A0.\" SUCH DAMAGE.
=C2=A0.\"
-.Dd April 24, 2024
+.Dd April 28, 2024
=C2=A0.Dt GETTIMEOFDAY 2
=C2=A0.Os
=C2=A0.Sh NAME
@@ -139,11 +139,9 @@ function is considered obsolescent and its usage disco= uraged by
=C2=A0.\" XXX: This should be replaced in the future when an appropria= te argument to
=C2=A0.\" the St macro is available: -p1003.1-2017
=C2=A0.No IEEE Std 1003.1-2008, 2017 Edition (\\(LqPOSIX.1\\(Rq) .

No, this should be .St -p1003.1-2008 since the = 2017 edition was only typographical
and technical changes. The md= oc folks are never going to have a -p1003.1-2017
because it's= not a full new standard.

Warner
=C2=A0
-Application should use the
+Applications should use the
=C2=A0.Xr clock_gettime 2
-function instead as
-.Nm gettimeofday
-might be removed in the future.
+function instead.
=C2=A0.Sh HISTORY
=C2=A0The
=C2=A0.Fn gettimeofday
--000000000000fdb05b06172c2149-- From nobody Sun Apr 28 19:43: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 4VSH1j54Jnz5JqVX; Sun, 28 Apr 2024 19:43: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH1j4MVwz41Sp; Sun, 28 Apr 2024 19:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333385; 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=8dS/I+Epmm498Cv1ttUMWC/pBo3q6kuTPmO6iZWD8Qw=; b=Kx/qlyUdombEKMXS92scDm6Gr05N9YSd42YnwK1he2GufLCLAndx1Y8PBp3nVzokPAc8Jf 3M1w1GTXVS+cSQ8sF7S8DRTVtF9/azyuFxuOQfGKD5HehW9aAZHcvATqECb6Oir901hBIY j/ZY63troRu51bUtcVLgkLsfVHGFw/z/6B8qHYSS8r/95PxAweqb9tevL7cdi8CgFsvg05 vWerH/f6hgz5Vhw0FHsYWpeW06jRsddHJPTajM9QiGDj4rV3ijPqOI/AQ57s1y84DEifcw wf9uybbQC+DLPMfm6BemftCjE7zK2QHxuTIHMm9gl7C5lE0gne6PLG4+mj313w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333385; a=rsa-sha256; cv=none; b=wGIQre7QYkbwXSxZeOpm/baAqQ8APLSGETy7WP/7a3ERHyRWPvghbsNa+RA0c59JnrjYzG PDgbdXqilNWxrQtpHyVQxSPiOF3+WB03jl24+TJ9TOMc6yF9LbIkLW7kUNtAuMHQreRNj/ mhKvoCzjJ8lO3oR2DMSnU7vnnals+Xq6cr+kQiV5V3FzsPdjn334vN5r3Ajrxa42zyoE+X qSe/2f91rX9YUCk8avUfUIamzv43aFI/i/cmaWU/IiIq28falLYf9CZXZ2J11Awc7BUuhZ XbpZ37ILOfn2UDskWDp2xUD52A8EQVtz5aqm7QJfKUK6zZ4r7t96YExVwDFA7A== 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=1714333385; 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=8dS/I+Epmm498Cv1ttUMWC/pBo3q6kuTPmO6iZWD8Qw=; b=jtg9XnLLBp1OiMNfCe2ffFUXcWQP7161aq0xtkQf3scKNXyXBMkT3qjImKNi+4NOnqmOzA fXdn/E7Xs+AfrHGVHPgukSe2Wwjk7BuL5KnhkwnZUNCO3sFNHAvy1BmV0exqKo7fvWYcy2 gB6Wz/ZlAlcMV1s2JEyVUSKZZkdnYK8xT+wIcLG+Q2J1fVayT4YqjLvqAsXU2qYS0SxZrW h871GaHfF4MFpj3kIwLFbGUElFKppQHavk3/zlWVpDAoEFXI7RaTy4MapGoRoaXP7dK7qr hQOOIC3AeAJJKeZHvpDAbgjiXJlbivahSSsOcygKvfOKdTSlGOzRByxtsku11Q== 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 4VSH1j3z8zzfKs; Sun, 28 Apr 2024 19:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJh5BP061930; Sun, 28 Apr 2024 19:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJh5Ip061927; Sun, 28 Apr 2024 19:43:05 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:43:05 GMT Message-Id: <202404281943.43SJh5Ip061927@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: 56ee5fc43c40 - main - rtld snprintf: do not erronously skip a char at the buffer boundary 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: 56ee5fc43c40479e2651b21862e299bcf73017ae Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=56ee5fc43c40479e2651b21862e299bcf73017ae commit 56ee5fc43c40479e2651b21862e299bcf73017ae Author: Konstantin Belousov AuthorDate: 2024-04-28 06:37:24 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-28 19:42:12 +0000 rtld snprintf: do not erronously skip a char at the buffer boundary Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44987 --- libexec/rtld-elf/rtld_printf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libexec/rtld-elf/rtld_printf.c b/libexec/rtld-elf/rtld_printf.c index 07598c73c6d4..befac1c547b7 100644 --- a/libexec/rtld-elf/rtld_printf.c +++ b/libexec/rtld-elf/rtld_printf.c @@ -81,11 +81,10 @@ snprintf_func(int ch, struct snprintf_arg *const info) } break; case PRINT_METHOD_WRITE: - if (info->remain > 0) { - *info->str++ = ch; - info->remain--; - } else + if (info->remain == 0) printf_out(info); + *info->str++ = ch; + info->remain--; break; } } From nobody Sun Apr 28 19:48:59 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 4VSH8W2PFSz5Jr7M; Sun, 28 Apr 2024 19:48: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8W1kzrz429h; Sun, 28 Apr 2024 19:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333739; 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=oDvFfLEzy2gmbzqBh9k1UV/K+vsI2gg0ZKepjulkkCw=; b=DaRZtC0VvmnGtrxOHrS3LP39m0HYIPF1pyF1PXsun0hMMVIV0hEL70OX3b1xB55Xy7SU5T 8YuwsirtEHqe7gLOA8flnE70oOcFcxfQ9NMsZyfUXhrVWy6zZtruXXDhZz9VzcQGyWO5xV Dplc5lcAhW9vLnXG31yGCSXy7vX0zurW5DrQUrDuKvO+m6GEXou2BhWvRMnkJtMxruG3pW MupKR6RMYurzCz4BxE8436WrXXk+JBmdI3bCx5gFIqWPm2IJYIlKIIM+VgptHNKa3DQsl6 F2NQqYaLTnJ+G0/iKJ8MEBxbWxIeEGz6q7WwujYrJzaxa+pieK8JZrBWqjxUgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333739; a=rsa-sha256; cv=none; b=kQLsKQlsifEzbeCq0lHtdiKMapKWuhOJYfS7+zqHWiJpRh93z/UvCmP7C/zx9cj/XTsB5w aArxtKUaqnqRQxq79Kzbs97x0ZqQExuCq9xKtU4B5rRXlGSvMsXFfU5os59IReImxv8IBe d7Urrb2A2oJgOfZyVttY5vPY+UuWR5Bl4vJMt4cJH6xFCc12JQs8rYB6KroEXCJVkU0otU 12HNIKnUZwSLw5+GZFoCP/PXP2k2OA+ic0C/YbtDUgKRBkh+/zcgP/CRgXHvvu8qun7U/e NePdcHl+ZMPrpPq+1pCoqfbuZSDKhQlYwH/dICrMyE9h5wNCwcsdUbe39LXlnw== 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=1714333739; 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=oDvFfLEzy2gmbzqBh9k1UV/K+vsI2gg0ZKepjulkkCw=; b=IvSSWMj8DqkRA0TUUVnPEnOCU1foqd3fSYlfHYk3Cu2RsPw+eTYsg37KJLEp7JUlhsX99V tfFtC7CFXVhb+x1wahiofKVxKGsjHN9uaQB29VbaHJRuYeFx8cU2xxC+eR+pxHCmGDbu4N 37dsvacwRkEQL2ikwJK3v+jYhRNm0co6BitffHeoDKmSz2076he8LLU93XOBDRiQ0OD6L9 SagAVYbmpzPOghjvWBHhRvaTv4Q6L2tXOEt2QQcei6E6aHQRR3yDWuhTyhPB2VMKLm2s1p X/428IuHU78uRO2JtC7T8JE9ov0J/pCD01JGhHzmauSBjoS0FymKc/ihevua7g== 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 4VSH8W1KmszfKw; Sun, 28 Apr 2024 19:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJmxSN063123; Sun, 28 Apr 2024 19:48:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJmxt6063120; Sun, 28 Apr 2024 19:48:59 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:48:59 GMT Message-Id: <202404281948.43SJmxt6063120@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 074d6fbebc16 - main - sound: Fix NULL dereference in dsp_clone() and mixer_clone() 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 074d6fbebc160222cde6b726adcc7350881d7824 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=074d6fbebc160222cde6b726adcc7350881d7824 commit 074d6fbebc160222cde6b726adcc7350881d7824 Author: Christos Margiolis AuthorDate: 2024-04-28 19:40:14 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:24 +0000 sound: Fix NULL dereference in dsp_clone() and mixer_clone() If we only have a single soundcard attached and we detach it right before entering [dsp|mixer]_clone(), there is a chance pcm_unregister() will have returned already, meaning it will have set snd_unit to -1, and thus devclass_get_softc() will return NULL here. While here, 1) move the calls to dsp_destroy_dev() and mixer_uninit() below the point where we unset SD_F_REGISTERED, and 2) follow what mixer_clone() does and make sure we don't use a NULL d->dsp_dev in dsp_clone(). Reported by: KASAN Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44924 --- sys/dev/sound/pcm/dsp.c | 14 ++++++++++---- sys/dev/sound/pcm/mixer.c | 3 ++- sys/dev/sound/pcm/sound.c | 7 +++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 1c020ba22611..c5bb27530d2b 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2086,10 +2086,16 @@ dsp_clone(void *arg, struct ucred *cred, char *name, int namelen, return; found: d = devclass_get_softc(pcm_devclass, snd_unit); - if (!PCM_REGISTERED(d)) - return; - *dev = d->dsp_dev; - dev_ref(*dev); + /* + * If we only have a single soundcard attached and we detach it right + * before entering dsp_clone(), there is a chance pcm_unregister() will + * have returned already, meaning it will have set snd_unit to -1, and + * thus devclass_get_softc() will return NULL here. + */ + if (d != NULL && PCM_REGISTERED(d) && d->dsp_dev != NULL) { + *dev = d->dsp_dev; + dev_ref(*dev); + } } static void diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 0178e1ae8c3e..33a7eb26606d 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1378,7 +1378,8 @@ mixer_clone(void *arg, return; if (strcmp(name, "mixer") == 0) { d = devclass_get_softc(pcm_devclass, snd_unit); - if (PCM_REGISTERED(d) && d->mixer_dev != NULL) { + /* See related comment in dsp_clone(). */ + if (d != NULL && PCM_REGISTERED(d) && d->mixer_dev != NULL) { *dev = d->mixer_dev; dev_ref(*dev); } diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index e88ccb1f25a6..faf4bd1c7dce 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -1013,10 +1013,6 @@ pcm_unregister(device_t dev) CHN_UNLOCK(ch); } - dsp_destroy_dev(dev); - - (void)mixer_uninit(dev); - /* remove /dev/sndstat entry first */ sndstat_unregister(dev); @@ -1034,6 +1030,9 @@ pcm_unregister(device_t dev) d->rec_sysctl_tree = NULL; } + dsp_destroy_dev(dev); + (void)mixer_uninit(dev); + while (!CHN_EMPTY(d, channels.pcm)) pcm_killchan(dev); From nobody Sun Apr 28 19:49: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 4VSH8X58YBz5Jr2Y; Sun, 28 Apr 2024 19:49:00 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8X319Yz426s; Sun, 28 Apr 2024 19:49:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333740; 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=dsa9ctrVmBYHj892MQalvDe3xKrPN3PkV7q/MAVt2kY=; b=DlT0B8kkj+Em+s4WEpNODSuD2Jtx1KBWQnQ7ltToISFpsnqptSn8FAuB5MY//vkIFm7o8m 3kPh24/KjKbc0VqJ9CDmRzfOws47gqJsfCoVlh1SE1mMXe3jWiW36LiTm1PQS4/CdBPyvH V1dqNFhJ3q5YmytjrxgVveaB8HwyQy29zx3WPqapltsNszOH4peJGjTWd+MCyS8NSq92u3 IH3YIgFxQUjd6YPv6G9G8Gy168tcrJ4XAF2crqRdQDZ5vEPugljH2SxqGok63Cg63POxsu j4IH1R/JIjWTS7pyX991aauvVELMYvWeVgxTtYKMp43duUxcpiiWjV4sLPRcHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333740; a=rsa-sha256; cv=none; b=FuQyQpiwZl763SJwzYW1s2hEMHPJYAajh5j/sst2ImCpMiRcEqS+Y5tz2u988pWQLNJuEv 15AzcyvIk4q+oAvSm17pjL2GoEI/eP00l7qPE5u+NpYBY5X+HOk4GPRyxlOtSgCmxZ4SZY gF05LjEAlWiYoT86MQZN5eZ3+GL3o6snGPNs1jZh2lnPvDXuzJHVtfRY5r39bdT6pKNV0L yeF59UT14XwBy40b2bu1iZDXJfhCCNnjzYosim/J/CqhkLRV0WOr8PIo9+1C+hxj9l0Na+ R39VJz58sfdlx9goTKyI3czp8LVXL8GLakxGlZFntAvwHijgTXTtDXceQwKYVQ== 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=1714333740; 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=dsa9ctrVmBYHj892MQalvDe3xKrPN3PkV7q/MAVt2kY=; b=HRS+WuYHeism9S6QJTe0j+fqsKl4atTi+UYu/lzGWqx5M5btxBHkgQELR1tl+Nq2Mj2t9O qXlKuxIzFjYMpM7Jtyt8jiWncXuUrLRE/F2GWhtYcKZZqzUbwLsauWL206LsfB35gPPRo0 la6yIfyZFe8VmvVgk0aL9EiruIMgB/UR7bkb+6K3G6eG2C21Ainbt98eYeZ1skiXgT4Tvw e+iaNOdnINpJ97ZAMBaAltPz8TEGSw3EDnpa50K9/Va8eWWVotY+6rwNniqbEobEqp8s2D KgKV3K8WAs5N6bXjaemhAewfgsI57Wv3fb20rv0QHj24Pxx1948P8foU5R1Ggw== 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 4VSH8X2d4SzfJr; Sun, 28 Apr 2024 19:49:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJn02v063179; Sun, 28 Apr 2024 19:49:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJn0bF063176; Sun, 28 Apr 2024 19:49:00 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:49:00 GMT Message-Id: <202404281949.43SJn0bF063176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: b18b990d8e7b - main - sound: Wrap dsp_clone() and mixer_clone() with bus_topo_lock() 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b18b990d8e7b15d25243d85ea22374dfdde8a18b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b18b990d8e7b15d25243d85ea22374dfdde8a18b commit b18b990d8e7b15d25243d85ea22374dfdde8a18b Author: Christos Margiolis AuthorDate: 2024-04-28 19:40:29 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:24 +0000 sound: Wrap dsp_clone() and mixer_clone() with bus_topo_lock() Make sure that the softc isn't freed in between the checks. Sponsored by: The FreeBSD Foundation MFC after; 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44991 --- sys/dev/sound/pcm/dsp.c | 2 ++ sys/dev/sound/pcm/mixer.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index c5bb27530d2b..df1482d6a97a 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2085,6 +2085,7 @@ dsp_clone(void *arg, struct ucred *cred, char *name, int namelen, } return; found: + bus_topo_lock(); d = devclass_get_softc(pcm_devclass, snd_unit); /* * If we only have a single soundcard attached and we detach it right @@ -2096,6 +2097,7 @@ found: *dev = d->dsp_dev; dev_ref(*dev); } + bus_topo_unlock(); } static void diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 33a7eb26606d..2f4a6f4d6395 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1377,12 +1377,14 @@ mixer_clone(void *arg, if (*dev != NULL) return; if (strcmp(name, "mixer") == 0) { + bus_topo_lock(); d = devclass_get_softc(pcm_devclass, snd_unit); /* See related comment in dsp_clone(). */ if (d != NULL && PCM_REGISTERED(d) && d->mixer_dev != NULL) { *dev = d->mixer_dev; dev_ref(*dev); } + bus_topo_unlock(); } } From nobody Sun Apr 28 19:49: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 4VSH8Y6sgVz5JqcN; Sun, 28 Apr 2024 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8Y4nhLz42NH; Sun, 28 Apr 2024 19:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333741; 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=vvEY0UmoMmefBr2/v8gLpsJlZrhyZUxhJdF/YHVCTa8=; b=UQzBWtEGZMgEwR+mB5SVjBomzpYMt50aQ4d8l2uCkSL7FKlp/L1NXSl4qdAL2Kmh5lg38O M9Jg0srg88YywODSEI6blxFztOEnrJr9A29Hv6TeZakLvhd8xUQjzxdFxFiJEuiJxnakKc E2tQ6A6iNEhoISkeW7UrnwXMF8NwLOLEK4xB08PatwjWMGEwiAbkR4FK8/HSaKKDgCBJqO RYorix8v8bekQIXesGWbs7no3GTTKxfLX6XZTkJbr7Ux9St+br2LpJSazgpWCLu200mODE HV6rTRKBpqAP59aJlgoRLycxcHEztDO2Ue4PsihHeSJqnrGTZMEeVzPf/aIDXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333741; a=rsa-sha256; cv=none; b=sKmKTc9NKilwgG/5RHCqpSo50wjysJ0KymNIiKUvMJsLnqN+wi00vODswakkLCrjLVZtI4 CfvHmkSGAhLZ0fe8m/PgawTIgK3jAM6Jk5GetHxfgTfqiYpy+bGG3jHn4qMX6fOMbCq9KV iLI9CRlYUVCNWxKYHv0dqu0cZfAhFkzYS1qTkCauYeguXpygedxUpgrTH4+D3uxYuAyA6O +gPbOsAla/rPm+c9M9K5DQdh4WhWVYCUHLUJNhqkxZRSLB433Mcio/kilmM3OSN8wrH5j1 NRSacD/Q/OsTjqtyOX5QOBElMYoULGNqO9NmVTDHla8aakFQ2WGMMppH5q4dEQ== 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=1714333741; 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=vvEY0UmoMmefBr2/v8gLpsJlZrhyZUxhJdF/YHVCTa8=; b=VWzfMHs038HSaVskd70NQoyknaR9c+lY5dcfvyVqeeWAhTvDNlmHWY7KrMlsklwkP93FAi WOlc1s8HWo/U8q0lZ3lYZLori8xbhbaAdQAhUsO1e7f/t1lhIYRpL9BQr4bKYJEtONUtJb SLKTlwlSpXjiuZJEd530ikOUjXGS8rrK1FO1Hh25pKmZk0BwPgzAIKvLJRKtMrvMFuJYo5 G88ZBnLE0hdz61bkGBNfV45reFIvKtlq6/xa8yxro41tYDQa+3EnOXGSkHd+p1q34GuyIh Ug/ieAxLA1q6kJa2BwT0J39mAzqHb3+E/94hCMs9HkTL6srO2kD6pS0NbXohzA== 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 4VSH8Y3s0nzf6C; Sun, 28 Apr 2024 19:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJn1uj063240; Sun, 28 Apr 2024 19:49:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJn1Nq063237; Sun, 28 Apr 2024 19:49:01 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:49:01 GMT Message-Id: <202404281949.43SJn1Nq063237@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 03614fcba25b - main - sound: Fix panic caused by sleeping-channel destruction during asynchronous detach 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03614fcba25b9de99e69819bc4690f66a3d24438 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=03614fcba25b9de99e69819bc4690f66a3d24438 commit 03614fcba25b9de99e69819bc4690f66a3d24438 Author: Christos Margiolis AuthorDate: 2024-04-28 19:40:40 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:24 +0000 sound: Fix panic caused by sleeping-channel destruction during asynchronous detach Currently we are force-destroying all channels unconditionally in pcm_killchan(). However, since asynchronous audio device detach is possible as of 44e128fe9d92, if we do not check whether the channel is sleeping or not and forcefully kill it, we will get a panic from cv_timedwait_sig() (called from chn_sleep()), because it will try to use a freed lock/cv. Modify pcm_killchan() (renamed to pcm_killchans() since that's a more appropriate name now) to loop through the channel list and destroy only the channels that are awake, otherwise wake up the sleeping thread and try again. This loop is repeated until all channels are awakened and destroyed. To reduce code duplication, implement chn_shutdown() which wakes up the channel and sets CHN_F_DEAD, and use it in pcm_unregister() and pcm_killchans(). Reported by: KASAN Fixes: 44e128fe9d92 ("sound: Implement asynchronous device detach") Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44923 --- sys/dev/sound/pcm/channel.c | 9 +++++++ sys/dev/sound/pcm/channel.h | 1 + sys/dev/sound/pcm/sound.c | 64 ++++++++++++++++++++++++++++++--------------- 3 files changed, 53 insertions(+), 21 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index b4872fdb8037..cf9239839aca 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1301,6 +1301,15 @@ chn_kill(struct pcm_channel *c) return (0); } +void +chn_shutdown(struct pcm_channel *c) +{ + CHN_LOCKASSERT(c); + + chn_wakeup(c); + c->flags |= CHN_F_DEAD; +} + int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right, int center) diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 21007454584e..c8d33c583188 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -264,6 +264,7 @@ int chn_poll(struct pcm_channel *c, int ev, struct thread *td); int chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction); int chn_kill(struct pcm_channel *c); +void chn_shutdown(struct pcm_channel *c); int chn_reset(struct pcm_channel *c, u_int32_t fmt, u_int32_t spd); int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right, int center); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index faf4bd1c7dce..0a88d732def7 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -674,23 +674,50 @@ pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo) return (err); } -static int -pcm_killchan(device_t dev) +static void +pcm_killchans(struct snddev_info *d) { - struct snddev_info *d = device_get_softc(dev); struct pcm_channel *ch; int error; + bool found; PCM_BUSYASSERT(d); + do { + found = false; + CHN_FOREACH(ch, d, channels.pcm) { + CHN_LOCK(ch); + /* + * Make sure no channel has went to sleep in the + * meantime. + */ + chn_shutdown(ch); + /* + * We have to give a thread sleeping in chn_sleep() a + * chance to observe that the channel is dead. + */ + if ((ch->flags & CHN_F_SLEEPING) == 0) { + found = true; + CHN_UNLOCK(ch); + break; + } + CHN_UNLOCK(ch); + } - ch = CHN_FIRST(d, channels.pcm); + /* + * All channels are still sleeping. Sleep for a bit and try + * again to see if any of them is awake now. + */ + if (!found) { + pause_sbt("pcmkillchans", SBT_1MS * 5, 0, 0); + continue; + } - PCM_LOCK(d); - error = pcm_chn_remove(d, ch); - PCM_UNLOCK(d); - if (error) - return (error); - return (pcm_chn_destroy(ch)); + PCM_LOCK(d); + error = pcm_chn_remove(d, ch); + PCM_UNLOCK(d); + if (error == 0) + pcm_chn_destroy(ch); + } while (!CHN_EMPTY(d, channels.pcm)); } static int @@ -1000,15 +1027,11 @@ pcm_unregister(device_t dev) CHN_FOREACH(ch, d, channels.pcm) { CHN_LOCK(ch); - if (ch->flags & CHN_F_SLEEPING) { - /* - * We are detaching, so do not wait for the timeout in - * chn_read()/chn_write(). Wake up the thread and kill - * the channel immediately. - */ - CHN_BROADCAST(&ch->intr_cv); - ch->flags |= CHN_F_DEAD; - } + /* + * Do not wait for the timeout in chn_read()/chn_write(). Wake + * up the sleeping thread and kill the channel. + */ + chn_shutdown(ch); chn_abort(ch); CHN_UNLOCK(ch); } @@ -1033,8 +1056,7 @@ pcm_unregister(device_t dev) dsp_destroy_dev(dev); (void)mixer_uninit(dev); - while (!CHN_EMPTY(d, channels.pcm)) - pcm_killchan(dev); + pcm_killchans(d); PCM_LOCK(d); PCM_RELEASE(d); From nobody Sun Apr 28 19:49: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 4VSH8b0Sg2z5Jr9r; Sun, 28 Apr 2024 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8Z56hpz429v; Sun, 28 Apr 2024 19:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333742; 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=8HxLDV8iEGr8AtnjG6DQjnd3GVpPLw8UifVdS4W9bGc=; b=KfmD1uSNCP4DblMo53GSltwZxsD438NhDiyvnCwgpsf8JRCvvxyoJT5aWrAAvbExk+x93o wE/qdeeZda7ceA+mu7VE8EP8GgTFtV7BPBk+t8kaM00w9QZ+jSQav9iG0QJSAryGJf+7I3 AeV3GdE5YUsYfoxfDnGZOJR9UUB4ErKEfch3ehfVw/5hDrvoEC0xC0EnrTWeBETbljReZD jpym5UYwDT4OpCL61xwTIaLv0ztjU5SuT7YeWDuRAHnYBnA4aWAFJBHc/5WxZO323Srrbm E46gW35eK07Ofunr51uhXJDo6pw1YNisNaqXrwXxVchsMSOtC3LxmwpF4+DuSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333742; a=rsa-sha256; cv=none; b=KWkE/v7LZFlXNzRmZlzV0IA3oq343Ex3vYtW/a95LxWU8CECcHrrTqi5JPkZplCtfbqqvT eXYjKhV4yY5lrb7QNGZKuVRGR73dsqpse1AM4TLUmeU3X55d5w1fGoNjJ3U/+VIRxCYmU+ mP16Wz/AUunermvU7kTbrZ/TVJqe25S/KCv85VBLJ3wIgk6TS+YBma/jTxfh3jbD2RogFa E+DJGLBgDLWp2jqVEaGt5mEBqyh7t5xF7EWFsalzEGvz4SB72/MnJ/6Qc6ZEHsl5iHZaW0 qPyOSgVV18C+7J8Y7muValiTxHrCD4iz5FUz8honNBsDDkeghmq5fvNpJazpfw== 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=1714333742; 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=8HxLDV8iEGr8AtnjG6DQjnd3GVpPLw8UifVdS4W9bGc=; b=R3lM8dc67VH997Et69QeUu6e2v+IKYQfBBhfIVTq7Bktj/EdBhZlbjZ1VQTZHPg0RP/8AC azztwxwcIAGPtnjCtZs16Op+7gCDEcPf9lWid4wGom/JfQkIZBV/WucayRE3RT7dUIAafx KrIFUa3tNlmFgs6zqJ8v/0pkx2WmvB0+SGctLypWXf9FMsVrwrmM2J5bRvl9IzJnNgTYO0 U6clrps7XHebvDgoX7ZWI15uliTqwA66wYV/9ZbH3HOtC958zSPlJrPVfz60Mad9wYiVX8 Yr1bFr84LH/smiBKCo78Q7ytx0e4hP5fuKERuCW51eOEaQqnLruhiqQZvWCbKg== 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 4VSH8Z4kwZzdpW; Sun, 28 Apr 2024 19:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJn239063300; Sun, 28 Apr 2024 19:49:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJn2uR063297; Sun, 28 Apr 2024 19:49:02 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:49:02 GMT Message-Id: <202404281949.43SJn2uR063297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: fa284525499d - main - sound: Assert that we do not enter chn_sleep() with CHN_F_SLEEPING 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa284525499d75955525839074bf5968d0923e6b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=fa284525499d75955525839074bf5968d0923e6b commit fa284525499d75955525839074bf5968d0923e6b Author: Christos Margiolis AuthorDate: 2024-04-28 19:40:52 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:24 +0000 sound: Assert that we do not enter chn_sleep() with CHN_F_SLEEPING Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D44959 --- sys/dev/sound/pcm/channel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index cf9239839aca..1527d5ea3d2c 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -332,6 +332,8 @@ chn_sleep(struct pcm_channel *c, int timeout) int ret; CHN_LOCKASSERT(c); + KASSERT((c->flags & CHN_F_SLEEPING) == 0, + ("%s(): entered with CHN_F_SLEEPING", __func__)); if (c->flags & CHN_F_DEAD) return (EINVAL); From nobody Sun Apr 28 19:49: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 4VSH8c1bpHz5Jr1Z; Sun, 28 Apr 2024 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8b6dBPz42JF; Sun, 28 Apr 2024 19:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333743; 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=Vo7S9QDLowMJL2n3ufnYjhY2AoscE+nHR9jR/PeeANE=; b=Rqk2JJlH+VmJVUC0uByYH+o8R0J6jOjspdnvgcJ/UhiuwBSqvbXgADZFbjcbJo1LIT3rcC LhzEiXqNtkYNDYCZSZ1m0zYnRkr1bKnthbCuLPVsbP7Dw7LqM3pF+60TbtVgo+JbCtwmV0 BWkHNR6bc9tasxf1weMCxw5scGJMGv5PpyP+hcxwopXzBYQGy958u1jhNlDuCp/xxSjqqm fKFigrs6df+uJ5AeHmJwTmKmWZfVhPHSoij9PNU49FZmrZWA4SKDJeXzHy6U5A5JfNfWfC QxTi3TIhxg8dBB8kRipsdMq2Gceq7EYTOohtJqXgmiDcJmNBhA63eGN47P1Avw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333743; a=rsa-sha256; cv=none; b=wldQZQ8f/DnGznIdAbA9o7kExaZdY7038uNA1MbY1yWD7E1Evf94fviqdXaURAxFFMReZ/ fJ/X6XBb/ic/ftsrBF8hJnthuIoHcHe1Ph3rVMZzB36/Y6xgs41vsx8+yzDAc/E3kTCtz6 YdiADfuWriibECohMxj3dgvPXzpFodfT64MwSeZ1oyE+xh1cGAyZy58hxzfL23xdRPEn9h 1fKUrAcgoUKfOmfZKsfT1XqbBGZRS69MCV2aUbWlrjGcrCIkbU4t8rVzRnMcYsvLZbgDbi 3QUCr0ZquBsytQebklr/VrebUqBx9sGDhmP1NmF2fnFxVeXws5gLk25OVSq4TA== 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=1714333743; 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=Vo7S9QDLowMJL2n3ufnYjhY2AoscE+nHR9jR/PeeANE=; b=SCcyvkm0334ioPe0NWuXuhZ5tLWNQzQBA4EbTplGJQSOdeCMgkTnWpe7vv08eem2pOtHFx Y61OqcE2n72Ulji7x3T5LwA90xB32fa9yzTZshyXhS3LduP0hiQPMgIlTRIbbPqxGjfND+ QGMywCymzIcF6efzgHYso8mD8HiM7w1a42oo1QDzHvhaNEFZu2VZRxX4JZ2grRCHslagpm FA9LTYFDA4uH1QvLH8Am3p6fP8CYCbKI0B/G30dyr1qteRCAU+HW3gN4DSIfJi5M7/6f9D BvcBs4h7QChWmVxQ57RuoGxyCoIFDVjMPlv7A+vU7c4LaWVJFHGxY7Hcheflww== 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 4VSH8b5FyZzdrh; Sun, 28 Apr 2024 19:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJn3QY063447; Sun, 28 Apr 2024 19:49:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJn3PV063444; Sun, 28 Apr 2024 19:49:03 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:49:03 GMT Message-Id: <202404281949.43SJn3PV063444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 25723d66369f - main - sound: Retire unit.* 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25723d66369fe6786e9e4f5f77381b944755f267 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=25723d66369fe6786e9e4f5f77381b944755f267 commit 25723d66369fe6786e9e4f5f77381b944755f267 Author: Christos Margiolis AuthorDate: 2024-04-28 19:44:35 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:24 +0000 sound: Retire unit.* The unit.* code is largely obsolete and imposes limits that are no longer needed nowadays. - Capping the maximum allowed soundcards in a given machine. By default, the limit is 512 (snd_max_u() in unit.c), and the maximum possible is 2048 (SND_UNIT_UMAX in unit.h). It can also be tuned through the hw.snd.maxunit loader(8) tunable. Even though these limits are large enough that they should never cause problems, there is no need for this limit to exist in the first place. - Capping the available device/channel types. By default, this is 32 (snd_max_d() in unit.c). However, these types are pre-defined in pcm/sound.h (see SND_DEV_*), so the cap is unnecessary when we know that their number is constant. - Capping the number of channels per-device. By default, the limit 1024 (snd_max_c() in unit.c). This is probably the most problematic of the limits mentioned, because this limit can never be reached, as the maximum is hard-capped at either hw.snd.maxautovchans (16 by default), or SND_MAXHWCHAN and SND_MAXVCHANS. These limtits are encoded in masks (see SND_U_MASK, SND_D_MASK, SND_C_MASK in unit.h) and are used to construct a bitfield of the form [dsp_unit, type, channel_unit] in snd_mkunit() which is assigned to pcm_channel->unit. This patch gets rid of everything unit.*-related and makes a slightly different use of the "unit" field to only contain the channel unit number. The channel type is stored in a new pcm_channel->type field, and the DSP unit number need not be stored at all, since we can fetch it from device_get_unit(pcm_channel->dev). This change has the effect that we no longer need to impose caps on the number of soundcards, device/channel types and per-device channels. As a result the code is noticeably simplified and more readable. Apart from the fact that the hw.snd.maxunit loader(8) tunable is also retired as a side-effect of this patch, sound(4)'s behavior remains the same. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D44912 --- RELNOTES | 3 + sys/conf/files | 1 - sys/dev/sound/pcm/channel.h | 9 +- sys/dev/sound/pcm/dsp.c | 98 +++----------------- sys/dev/sound/pcm/dsp.h | 2 +- sys/dev/sound/pcm/feeder.c | 4 +- sys/dev/sound/pcm/mixer.c | 5 +- sys/dev/sound/pcm/sound.c | 144 ++++++++++-------------------- sys/dev/sound/pcm/sound.h | 18 +--- sys/dev/sound/pcm/vchan.c | 2 +- sys/dev/sound/unit.c | 188 --------------------------------------- sys/dev/sound/unit.h | 52 ----------- sys/modules/sound/sound/Makefile | 2 +- 13 files changed, 74 insertions(+), 454 deletions(-) diff --git a/RELNOTES b/RELNOTES index 91d6d74a38fc..658a82a9e1b0 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +8fef193e14e2: + As a side-effect of retiring the unit.* code in sound(4), the + hw.snd.maxunit loader(8) tunable is also retired. 6d5ce2bb6344: The default value of the nfs_reserved_port_only rc.conf(5) setting has changed. The FreeBSD NFS server now requires the source port of diff --git a/sys/conf/files b/sys/conf/files index 29c02a503027..ef0a56eb8b45 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3072,7 +3072,6 @@ dev/smc/if_smc.c optional smc dev/smc/if_smc_acpi.c optional smc acpi dev/smc/if_smc_fdt.c optional smc fdt dev/snp/snp.c optional snp -dev/sound/unit.c optional sound dev/sound/pci/als4000.c optional snd_als4000 pci dev/sound/pci/atiixp.c optional snd_atiixp pci dev/sound/pci/cmi.c optional snd_cmi pci diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index c8d33c583188..d4f73275ed39 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -104,6 +104,7 @@ struct pcm_channel { void *devinfo; device_t dev; int unit; + int type; char name[CHN_NAMELEN]; char comm[MAXCOMLEN + 1]; struct mtx *lock; @@ -224,7 +225,7 @@ struct pcm_channel { #define CHN_INSERT_SORT(w, x, y, z) do { \ struct pcm_channel *t, *a = NULL; \ CHN_FOREACH(t, x, z) { \ - if ((y)->unit w t->unit) \ + if ((y)->type w t->type) \ a = t; \ else \ break; \ @@ -235,13 +236,9 @@ struct pcm_channel { CHN_INSERT_HEAD(x, y, z); \ } while (0) -#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>, x, y, z) +#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>=, x, y, z) #define CHN_INSERT_SORT_DESCEND(x, y, z) CHN_INSERT_SORT(<, x, y, z) -#define CHN_UNIT(x) (snd_unit2u((x)->unit)) -#define CHN_DEV(x) (snd_unit2d((x)->unit)) -#define CHN_CHAN(x) (snd_unit2c((x)->unit)) - #define CHN_BUF_PARENT(x, y) \ (((x) != NULL && (x)->parentchannel != NULL && \ (x)->parentchannel->bufhard != NULL) ? \ diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index df1482d6a97a..448ecb183298 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -444,7 +444,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) if (DSP_F_READ(flags)) { /* open for read */ rderror = pcm_chnalloc(d, &rdch, PCMDIR_REC, - td->td_proc->p_pid, td->td_proc->p_comm, -1); + td->td_proc->p_pid, td->td_proc->p_comm); if (rderror == 0 && chn_reset(rdch, fmt, spd) != 0) rderror = ENXIO; @@ -472,7 +472,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) if (DSP_F_WRITE(flags)) { /* open for write */ wrerror = pcm_chnalloc(d, &wrch, PCMDIR_PLAY, - td->td_proc->p_pid, td->td_proc->p_comm, -1); + td->td_proc->p_pid, td->td_proc->p_comm); if (wrerror == 0 && chn_reset(wrch, fmt, spd) != 0) wrerror = ENXIO; @@ -629,69 +629,13 @@ dsp_write(struct cdev *i_dev, struct uio *buf, int flag) return (dsp_io_ops(priv, buf)); } -static int -dsp_get_volume_channel(struct dsp_cdevpriv *priv, struct pcm_channel **volch) -{ - struct snddev_info *d; - struct pcm_channel *c; - int unit; - - KASSERT(volch != NULL, - ("%s(): NULL query priv=%p volch=%p", __func__, priv, volch)); - - d = priv->sc; - if (!PCM_REGISTERED(d)) { - *volch = NULL; - return (EINVAL); - } - - PCM_UNLOCKASSERT(d); - - *volch = NULL; - - c = priv->volch; - if (c != NULL) { - if (!(c->feederflags & (1 << FEEDER_VOLUME))) - return (-1); - *volch = c; - return (0); - } - - PCM_LOCK(d); - PCM_WAIT(d); - PCM_ACQUIRE(d); - - unit = dev2unit(d->dsp_dev); - - CHN_FOREACH(c, d, channels.pcm) { - CHN_LOCK(c); - if (c->unit != unit) { - CHN_UNLOCK(c); - continue; - } - *volch = c; - pcm_chnref(c, 1); - priv->volch = c; - CHN_UNLOCK(c); - PCM_RELEASE(d); - PCM_UNLOCK(d); - return ((c->feederflags & (1 << FEEDER_VOLUME)) ? 0 : -1); - } - - PCM_RELEASE(d); - PCM_UNLOCK(d); - - return (EINVAL); -} - static int dsp_ioctl_channel(struct dsp_cdevpriv *priv, struct pcm_channel *volch, u_long cmd, caddr_t arg) { struct snddev_info *d; struct pcm_channel *rdch, *wrch; - int j, devtype, ret; - int left, right, center, mute; + int j, left, right, center, mute; d = priv->sc; if (!PCM_REGISTERED(d) || !(pcm_getflags(d->dev) & SD_F_VPC)) @@ -716,19 +660,6 @@ dsp_ioctl_channel(struct dsp_cdevpriv *priv, struct pcm_channel *volch, volch = wrch; } - devtype = PCMDEV(d->dsp_dev); - - /* Look super harder */ - if (volch == NULL && - (devtype == SND_DEV_DSPHW_PLAY || devtype == SND_DEV_DSPHW_VPLAY || - devtype == SND_DEV_DSPHW_REC || devtype == SND_DEV_DSPHW_VREC)) { - ret = dsp_get_volume_channel(priv, &volch); - if (ret != 0) - return (ret); - if (volch == NULL) - return (EINVAL); - } - /* Final validation */ if (volch == NULL) return (EINVAL); @@ -2105,8 +2036,6 @@ dsp_sysinit(void *p) { if (dsp_ehtag != NULL) return; - /* initialize unit numbering */ - snd_unit_init(); dsp_ehtag = EVENTHANDLER_REGISTER(dev_clone, dsp_clone, 0, 1000); } @@ -2123,20 +2052,19 @@ SYSINIT(dsp_sysinit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, dsp_sysinit, NULL); SYSUNINIT(dsp_sysuninit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, dsp_sysuninit, NULL); char * -dsp_unit2name(char *buf, size_t len, int unit) +dsp_unit2name(char *buf, size_t len, struct pcm_channel *ch) { - int i, dtype; + int i; KASSERT(buf != NULL && len != 0, ("bogus buf=%p len=%ju", buf, (uintmax_t)len)); - dtype = snd_unit2d(unit); - for (i = 0; i < nitems(dsp_cdevs); i++) { - if (dtype != dsp_cdevs[i].type || dsp_cdevs[i].alias != NULL) + if (ch->type != dsp_cdevs[i].type || dsp_cdevs[i].alias != NULL) continue; - snprintf(buf, len, "%s%d%s%d", dsp_cdevs[i].name, - snd_unit2u(unit), dsp_cdevs[i].sep, snd_unit2c(unit)); + snprintf(buf, len, "%s%d%s%d", + dsp_cdevs[i].name, device_get_unit(ch->dev), + dsp_cdevs[i].sep, ch->unit); return (buf); } @@ -2224,12 +2152,10 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) if (devfs_foreach_cdevpriv(i_dev, dsp_oss_audioinfo_cb, ch) != 0) { devname = dsp_unit2name(buf, - sizeof(buf), ch->unit); + sizeof(buf), ch); } - } else if (ai->dev == nchan) { - devname = dsp_unit2name(buf, sizeof(buf), - ch->unit); - } + } else if (ai->dev == nchan) + devname = dsp_unit2name(buf, sizeof(buf), ch); if (devname != NULL) break; CHN_UNLOCK(ch); diff --git a/sys/dev/sound/pcm/dsp.h b/sys/dev/sound/pcm/dsp.h index 6098c0641eb5..b81e60dc19b5 100644 --- a/sys/dev/sound/pcm/dsp.h +++ b/sys/dev/sound/pcm/dsp.h @@ -35,7 +35,7 @@ extern struct cdevsw dsp_cdevsw; int dsp_make_dev(device_t); void dsp_destroy_dev(device_t); -char *dsp_unit2name(char *, size_t, int); +char *dsp_unit2name(char *, size_t, struct pcm_channel *); int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *); #endif /* !_PCMDSP_H_ */ diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 8278a85948a8..78443ad76140 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -82,9 +82,7 @@ feeder_register(void *p) if (snd_verbose < 0 || snd_verbose > 4) snd_verbose = 1; - /* initialize unit numbering */ - snd_unit_init(); - if (snd_unit < 0 || snd_unit > PCMMAXUNIT) + if (snd_unit < 0) snd_unit = -1; if (snd_maxautovchans < 0 || diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 2f4a6f4d6395..3e197b120c9d 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -727,7 +727,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) u_int16_t v; struct cdev *pdev; const char *name; - int i, unit, devunit, val; + int i, unit, val; snddev = device_get_softc(dev); if (snddev == NULL) @@ -764,8 +764,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) mixer_setrecsrc(m, 0); /* Set default input. */ - devunit = snd_mkunit(unit, SND_DEV_CTL, 0); - pdev = make_dev(&mixer_cdevsw, devunit, UID_ROOT, GID_WHEEL, 0666, + pdev = make_dev(&mixer_cdevsw, SND_DEV_CTL, UID_ROOT, GID_WHEEL, 0666, "mixer%d", unit); pdev->si_drv1 = m; snddev->mixer_dev = pdev; diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 0a88d732def7..c32536a55960 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -244,98 +244,63 @@ pcm_setvchans(struct snddev_info *d, int direction, int newcnt, int num) /* return error status and a locked channel */ int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, - pid_t pid, char *comm, int devunit) + pid_t pid, char *comm) { struct pcm_channel *c; int err, vchancount, vchan_num; + bool retry; - KASSERT(d != NULL && ch != NULL && (devunit == -1 || - !(devunit & ~(SND_U_MASK | SND_D_MASK | SND_C_MASK))) && + KASSERT(d != NULL && ch != NULL && (direction == PCMDIR_PLAY || direction == PCMDIR_REC), - ("%s(): invalid d=%p ch=%p direction=%d pid=%d devunit=%d", - __func__, d, ch, direction, pid, devunit)); + ("%s(): invalid d=%p ch=%p direction=%d pid=%d", + __func__, d, ch, direction, pid)); PCM_BUSYASSERT(d); - /* Double check again. */ - if (devunit != -1) { - switch (snd_unit2d(devunit)) { - case SND_DEV_DSPHW_PLAY: - case SND_DEV_DSPHW_VPLAY: - if (direction != PCMDIR_PLAY) - return (ENOTSUP); - break; - case SND_DEV_DSPHW_REC: - case SND_DEV_DSPHW_VREC: - if (direction != PCMDIR_REC) - return (ENOTSUP); - break; - default: - if (!(direction == PCMDIR_PLAY || - direction == PCMDIR_REC)) - return (ENOTSUP); - break; - } - } - *ch = NULL; vchan_num = 0; vchancount = (direction == PCMDIR_PLAY) ? d->pvchancount : d->rvchancount; + retry = false; retry_chnalloc: err = ENOTSUP; /* scan for a free channel */ CHN_FOREACH(c, d, channels.pcm) { CHN_LOCK(c); - if (devunit == -1 && c->direction == direction && - (c->flags & CHN_F_VIRTUAL)) { + if (c->direction == direction && (c->flags & CHN_F_VIRTUAL)) { if (vchancount < snd_maxautovchans && - vchan_num < CHN_CHAN(c)) { + vchan_num < c->unit) { CHN_UNLOCK(c); goto vchan_alloc; } vchan_num++; } - if (c->direction == direction && !(c->flags & CHN_F_BUSY) && - (devunit == -1 || devunit == -2 || c->unit == devunit)) { + if (c->direction == direction && !(c->flags & CHN_F_BUSY)) { c->flags |= CHN_F_BUSY; c->pid = pid; strlcpy(c->comm, (comm != NULL) ? comm : CHN_COMM_UNKNOWN, sizeof(c->comm)); *ch = c; return (0); - } else if (c->unit == devunit) { - if (c->direction != direction) - err = ENOTSUP; - else if (c->flags & CHN_F_BUSY) - err = EBUSY; - else - err = EINVAL; - CHN_UNLOCK(c); - return (err); - } else if ((devunit == -1 || devunit == -2) && - c->direction == direction && (c->flags & CHN_F_BUSY)) + } else if (c->direction == direction && (c->flags & CHN_F_BUSY)) err = EBUSY; CHN_UNLOCK(c); } - if (devunit == -2) + /* + * We came from retry_chnalloc and still didn't find a free channel. + */ + if (retry) return (err); vchan_alloc: /* no channel available */ - if (devunit == -1 || snd_unit2d(devunit) == SND_DEV_DSPHW_VPLAY || - snd_unit2d(devunit) == SND_DEV_DSPHW_VREC) { - if (!(vchancount > 0 && vchancount < snd_maxautovchans) && - (devunit == -1 || snd_unit2c(devunit) < snd_maxautovchans)) - return (err); - err = pcm_setvchans(d, direction, vchancount + 1, - (devunit == -1) ? -1 : snd_unit2c(devunit)); - if (err == 0) { - if (devunit == -1) - devunit = -2; - goto retry_chnalloc; - } + if (!(vchancount > 0 && vchancount < snd_maxautovchans)) + return (err); + err = pcm_setvchans(d, direction, vchancount + 1, -1); + if (err == 0) { + retry = true; + goto retry_chnalloc; } return (err); @@ -445,7 +410,7 @@ pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t c { struct pcm_channel *ch; int direction, err, rpnum, *pnum, max; - int udc, device, chan; + int type, unit; char *dirs, *devname, buf[CHN_NAMELEN]; PCM_BUSYASSERT(d); @@ -457,56 +422,54 @@ pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t c dirs = "play"; direction = PCMDIR_PLAY; pnum = &d->playcount; - device = SND_DEV_DSPHW_PLAY; + type = SND_DEV_DSPHW_PLAY; max = SND_MAXHWCHAN; break; case PCMDIR_PLAY_VIRTUAL: dirs = "virtual_play"; direction = PCMDIR_PLAY; pnum = &d->pvchancount; - device = SND_DEV_DSPHW_VPLAY; + type = SND_DEV_DSPHW_VPLAY; max = SND_MAXVCHANS; break; case PCMDIR_REC: dirs = "record"; direction = PCMDIR_REC; pnum = &d->reccount; - device = SND_DEV_DSPHW_REC; + type = SND_DEV_DSPHW_REC; max = SND_MAXHWCHAN; break; case PCMDIR_REC_VIRTUAL: dirs = "virtual_record"; direction = PCMDIR_REC; pnum = &d->rvchancount; - device = SND_DEV_DSPHW_VREC; + type = SND_DEV_DSPHW_VREC; max = SND_MAXVCHANS; break; default: return (NULL); } - chan = (num == -1) ? 0 : num; + unit = (num == -1) ? 0 : num; - if (*pnum >= max || chan >= max) + if (*pnum >= max || unit >= max) return (NULL); rpnum = 0; CHN_FOREACH(ch, d, channels.pcm) { - if (CHN_DEV(ch) != device) + if (ch->type != type) continue; - if (chan == CHN_CHAN(ch)) { - if (num != -1) { - device_printf(d->dev, - "channel num=%d allocated!\n", chan); - return (NULL); - } - chan++; - if (chan >= max) { - device_printf(d->dev, - "chan=%d > %d\n", chan, max); - return (NULL); - } + if (unit == ch->unit && num != -1) { + device_printf(d->dev, + "channel num=%d allocated!\n", unit); + return (NULL); + } + unit++; + if (unit >= max) { + device_printf(d->dev, + "chan=%d > %d\n", unit, max); + return (NULL); } rpnum++; } @@ -518,25 +481,24 @@ pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t c return (NULL); } - udc = snd_mkunit(device_get_unit(d->dev), device, chan); - devname = dsp_unit2name(buf, sizeof(buf), udc); - - if (devname == NULL) { - device_printf(d->dev, - "Failed to query device name udc=0x%08x\n", udc); - return (NULL); - } - PCM_UNLOCK(d); ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO); ch->methods = kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO); - ch->unit = udc; + ch->type = type; + ch->unit = unit; ch->pid = -1; strlcpy(ch->comm, CHN_COMM_UNUSED, sizeof(ch->comm)); ch->parentsnddev = d; ch->parentchannel = parent; ch->dev = d->dev; ch->trigger = PCMTRIG_STOP; + devname = dsp_unit2name(buf, sizeof(buf), ch); + if (devname == NULL) { + device_printf(d->dev, "Failed to query device name"); + kobj_delete(ch->methods, M_DEVBUF); + free(ch, M_DEVBUF); + return (NULL); + } snprintf(ch->name, sizeof(ch->name), "%s:%s:%s", device_get_nameunit(ch->dev), dirs, devname); @@ -585,7 +547,7 @@ pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch) CHN_INSERT_SORT_ASCEND(d, ch, channels.pcm); - switch (CHN_DEV(ch)) { + switch (ch->type) { case SND_DEV_DSPHW_PLAY: d->playcount++; break; @@ -625,7 +587,7 @@ pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch) CHN_REMOVE(d, ch, channels.pcm); - switch (CHN_DEV(ch)) { + switch (ch->type) { case SND_DEV_DSPHW_PLAY: d->playcount--; break; @@ -939,14 +901,6 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec) return EINVAL; } - if (device_get_unit(dev) > PCMMAXUNIT) { - device_printf(dev, "PCMMAXUNIT reached : unit=%d > %d\n", - device_get_unit(dev), PCMMAXUNIT); - device_printf(dev, - "Use 'hw.snd.maxunit' tunable to raise the limit.\n"); - return ENODEV; - } - d = device_get_softc(dev); d->dev = dev; d->lock = snd_mtxcreate(device_get_nameunit(dev), "sound cdev"); diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index fe310a3be3d6..1f2dda880742 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -88,7 +88,6 @@ struct snd_mixer; #include #include #include -#include #define PCM_SOFTC_SIZE (sizeof(struct snddev_info)) @@ -100,21 +99,6 @@ struct snd_mixer; #define SOUND_PREFVER SOUND_MODVER #define SOUND_MAXVER SOUND_MODVER -/* - * We're abusing the fact that MAXMINOR still have enough room - * for our bit twiddling and nobody ever need 512 unique soundcards, - * 32 unique device types and 1024 unique cloneable devices for the - * next 100 years... - */ - -#define PCMMAXUNIT (snd_max_u()) -#define PCMMAXDEV (snd_max_d()) -#define PCMMAXCHAN (snd_max_c()) - -#define PCMUNIT(x) (snd_unit2u(dev2unit(x))) -#define PCMDEV(x) (snd_unit2d(dev2unit(x))) -#define PCMCHAN(x) (snd_unit2c(dev2unit(x))) - /* * By design, limit possible channels for each direction. */ @@ -311,7 +295,7 @@ SYSCTL_DECL(_hw_snd); int pcm_setvchans(struct snddev_info *d, int direction, int newcnt, int num); int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, - pid_t pid, char *comm, int devunit); + pid_t pid, char *comm); int pcm_chnrelease(struct pcm_channel *c); int pcm_chnref(struct pcm_channel *c, int ref); diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index d10c3ff4aabb..ac5a0535ddce 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -923,7 +923,7 @@ vchan_sync(struct pcm_channel *c) if (snd_passthrough_verbose != 0) { char *devname, buf[CHN_NAMELEN]; - devname = dsp_unit2name(buf, sizeof(buf), c->unit); + devname = dsp_unit2name(buf, sizeof(buf), c); device_printf(c->dev, "%s(%s/%s) %s() -> re-sync err=%d\n", __func__, (devname != NULL) ? devname : "dspX", c->comm, diff --git a/sys/dev/sound/unit.c b/sys/dev/sound/unit.c deleted file mode 100644 index 28ffbde1f7ec..000000000000 --- a/sys/dev/sound/unit.c +++ /dev/null @@ -1,188 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2007 Ariff Abdullah - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include - -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - -#include - -/* - * Unit magic allocator for sound driver. - * - * 'u' = Unit of attached soundcards - * 'd' = Device type - * 'c' = Channel number - * - * eg: dsp0.p1 - u=0, d=p, c=1 - * dsp1.vp0 - u=1, d=vp, c=0 - * - * Maximum unit of soundcards can be tuned through "hw.snd.maxunit", which is - * between SND_UNIT_UMIN (16) and SND_UNIT_UMAX (2048). By design, the maximum - * allowable allocated channel is 256. - */ - -/* Default width */ -static int snd_u_shift = 9; /* 0 - 0x1ff : 512 distinct soundcards */ -static int snd_d_shift = 5; /* 0 - 0x1f : 32 distinct device types */ -static int snd_c_shift = 10; /* 0 - 0x3ff : 1024 distinct channels - (256 limit "by design") */ - -static int snd_unit_initialized = 0; - -#ifdef SND_DIAGNOSTIC -#define SND_UNIT_ASSERT() do { \ - if (snd_unit_initialized == 0) \ - panic("%s(): Uninitialized sound unit!", __func__); \ -} while (0) -#else -#define SND_UNIT_ASSERT() KASSERT(snd_unit_initialized != 0, \ - ("%s(): Uninitialized sound unit!", \ - __func__)) -#endif - -#define MKMASK(x) ((1 << snd_##x##_shift) - 1) - -int -snd_max_u(void) -{ - SND_UNIT_ASSERT(); - - return (MKMASK(u)); -} - -int -snd_max_d(void) -{ - SND_UNIT_ASSERT(); - - return (MKMASK(d)); -} - -int -snd_max_c(void) -{ - SND_UNIT_ASSERT(); - - return (MKMASK(c)); -} - -int -snd_unit2u(int unit) -{ - SND_UNIT_ASSERT(); - - return ((unit >> (snd_c_shift + snd_d_shift)) & MKMASK(u)); -} - -int -snd_unit2d(int unit) -{ - SND_UNIT_ASSERT(); - - return ((unit >> snd_c_shift) & MKMASK(d)); -} - -int -snd_unit2c(int unit) -{ - SND_UNIT_ASSERT(); - - return (unit & MKMASK(c)); -} - -int -snd_u2unit(int u) -{ - SND_UNIT_ASSERT(); - - return ((u & MKMASK(u)) << (snd_c_shift + snd_d_shift)); -} - -int -snd_d2unit(int d) -{ - SND_UNIT_ASSERT(); - - return ((d & MKMASK(d)) << snd_c_shift); -} - -int -snd_c2unit(int c) -{ - SND_UNIT_ASSERT(); - - return (c & MKMASK(c)); -} - -int -snd_mkunit(int u, int d, int c) -{ - SND_UNIT_ASSERT(); - - return ((c & MKMASK(c)) | ((d & MKMASK(d)) << snd_c_shift) | - ((u & MKMASK(u)) << (snd_c_shift + snd_d_shift))); -} - -/* - * This *must* be called first before any of the functions above!!! - */ -void -snd_unit_init(void) -{ - int i; - - if (snd_unit_initialized != 0) - return; - - snd_unit_initialized = 1; - - if (getenv_int("hw.snd.maxunit", &i) != 0) { - if (i < SND_UNIT_UMIN) - i = SND_UNIT_UMIN; - else if (i > SND_UNIT_UMAX) - i = SND_UNIT_UMAX; - else - i = roundup2(i, 2); - - for (snd_u_shift = 0; (i >> (snd_u_shift + 1)) != 0; - snd_u_shift++) - ; - - /* Make room for channels to fit within 24bit MAXMINOR limit. */ - snd_c_shift = 24 - snd_u_shift - snd_d_shift; - } - - if (bootverbose != 0) - printf("%s() u=0x%08x [%d] d=0x%08x [%d] c=0x%08x [%d]\n", - __func__, SND_U_MASK, snd_max_u() + 1, - SND_D_MASK, snd_max_d() + 1, SND_C_MASK, snd_max_c() + 1); -} diff --git a/sys/dev/sound/unit.h b/sys/dev/sound/unit.h deleted file mode 100644 index 9ddd68a2fe04..000000000000 --- a/sys/dev/sound/unit.h +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2007 Ariff Abdullah - * 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. - */ - -#ifndef _SND_UNIT_H_ -#define _SND_UNIT_H_ - -#define SND_UNIT_UMIN 16 -#define SND_UNIT_UMAX 2048 - -int snd_max_u(void); -int snd_max_d(void); -int snd_max_c(void); -int snd_unit2u(int); -int snd_unit2d(int); -int snd_unit2c(int); -int snd_u2unit(int); -int snd_d2unit(int); -int snd_c2unit(int); -int snd_mkunit(int, int, int); - -void snd_unit_init(void); - -#define SND_U_MASK (snd_u2unit(snd_max_u())) -#define SND_D_MASK (snd_d2unit(snd_max_d())) -#define SND_C_MASK (snd_c2unit(snd_max_c())) - -#endif /* !_SND_UNIT_H_ */ diff --git a/sys/modules/sound/sound/Makefile b/sys/modules/sound/sound/Makefile index 833330ef9b26..1c3685715503 100644 --- a/sys/modules/sound/sound/Makefile +++ b/sys/modules/sound/sound/Makefile @@ -17,7 +17,7 @@ SRCS+= feeder_eq_gen.h feeder_rate_gen.h snd_fxdiv_gen.h SRCS+= mpu_if.h mpufoi_if.h synth_if.h SRCS+= mpu_if.c mpufoi_if.c synth_if.c SRCS+= ac97.c ac97_patch.c buffer.c channel.c dsp.c -SRCS+= mixer.c sndstat.c sound.c unit.c vchan.c +SRCS+= mixer.c sndstat.c sound.c vchan.c SRCS+= midi.c mpu401.c sequencer.c feeder_eq_gen.h: ${SYSDIR}/tools/sound/feeder_eq_mkfilter.awk From nobody Sun Apr 28 19:49: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 4VSH8f2RLjz5Jr2f; Sun, 28 Apr 2024 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8f0szpz42Wq; Sun, 28 Apr 2024 19:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333746; 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=r8zxLuuECWxpqmyn6jZp2kufxf53CTMfgdM8kAU3xWU=; b=ncI+00blLPgfi86fNrFv9PTGsW9I7/VYkRQ6wlq0/HuT9vmbQtWL5emf8ePq3ZfNjbsvSk SugEb+jWP+50EqDwCRlimOwdR+zhYZ0No1xqQZk3K4t+/UGsNsPr7An7768ho4IY8EzAyb MvvouJckX2s808IbpkserkU4ppsH74oibrwJMyMpwhuBQQjROXJrYjyppPZkbNTi2Frzbr UxIhdb8TigsXN6N6b15t1iHI0E4LuIxVBf9pNIur85j5sDvZatGeDhNpyL+OeF1A+kajTN 2H+ZuzwbT/s6wlfjNoTx+jXCBYtyN8VZOgeH9UAWa1ouxjmhHALaxED4z1wZ5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333746; a=rsa-sha256; cv=none; b=CSr6Rwxg8d8h5lpA8uONQu2GJHhpHCF6wiu3SYq/qptJD+JgAOLgt0ksib4JtEUV67Z/zN 967oOjY9QL35sHgC06JtdeqGu6UGWGmr/cHDzuV5BQYnmPq+dFAfe+dQwxaPMq6sE3HqJW HJfe9f7sfsL/RqFa1j3P7VNOVaCR9dQmmdsca8NdFl3tt7x+UBmRTtPNZoFAMrG5gm8NLC 1d3ea/5X1KeRwc2q0h1nYUi2iF8nibS/S2ooP3NodFDZDIpQPAujmoBMRdXTi7GxkbKFyC f7Ocw8OYLQ8nVjyV4W0+ZDmIzJOtZ7igPee4tLeufEOI/vLgO6ae9QbuiAXHhQ== 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=1714333746; 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=r8zxLuuECWxpqmyn6jZp2kufxf53CTMfgdM8kAU3xWU=; b=ZxZHOImbR+Of9KT9PTs5sIYc1wFKnLTfSvcOHb4TOhg9iqxD/Yx5INNxLNxClIxK7IsEm2 53XzuikBZblJQ7jG01cDZMsNJ+QmRvH4Ew8A0hmBE/FIxDNTRUAuAK9wkFaVDi3mPvLk74 ngYtznslr0500fDVssJPk8fwRLwzRdd3ogUOSPGVQX1XgWg5rtRuw5/VmtH2zdp/KF/dOV 7Bb/cpNnEQJEXQ/TLz68szTubk4qmv0mldrwV+t5J0u84Tg2zxz7RVT+QmBACgJ+yYa/fH rgHTFGOCiVtzITMBSKejKiqINC7fq933JRE7CAJbK6/3wqOFks9FSpfHUlGYEQ== 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 4VSH8f0V44zf8M; Sun, 28 Apr 2024 19:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJn5mY063568; Sun, 28 Apr 2024 19:49:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJn5dF063565; Sun, 28 Apr 2024 19:49:05 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:49:05 GMT Message-Id: <202404281949.43SJn5dF063565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: a24050e2b784 - main - sound: Move pcm_chnref() and pcm_chnrelease() to pcm/channel.c 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a24050e2b784e13561da3ab731a1db92f2e3366c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a24050e2b784e13561da3ab731a1db92f2e3366c commit a24050e2b784e13561da3ab731a1db92f2e3366c Author: Christos Margiolis AuthorDate: 2024-04-28 19:46:55 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:24 +0000 sound: Move pcm_chnref() and pcm_chnrelease() to pcm/channel.c Improve code layering. These are channel functions, and so they do not belong in pcm/sound.c. While here, assert in chn_ref() that new refcount won't be negative. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44985 --- sys/dev/sound/pcm/channel.c | 28 ++++++++++++++++++++++++++++ sys/dev/sound/pcm/channel.h | 2 ++ sys/dev/sound/pcm/dsp.c | 26 +++++++++++++------------- sys/dev/sound/pcm/sound.c | 26 -------------------------- sys/dev/sound/pcm/sound.h | 2 -- 5 files changed, 43 insertions(+), 41 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 21a91ff13186..0fea169e3eb7 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1314,6 +1314,34 @@ chn_shutdown(struct pcm_channel *c) c->flags |= CHN_F_DEAD; } +/* release a locked channel and unlock it */ +int +chn_release(struct pcm_channel *c) +{ + PCM_BUSYASSERT(c->parentsnddev); + CHN_LOCKASSERT(c); + + c->flags &= ~CHN_F_BUSY; + c->pid = -1; + strlcpy(c->comm, CHN_COMM_UNUSED, sizeof(c->comm)); + CHN_UNLOCK(c); + + return (0); +} + +int +chn_ref(struct pcm_channel *c, int ref) +{ + PCM_BUSYASSERT(c->parentsnddev); + CHN_LOCKASSERT(c); + KASSERT((c->refcount + ref) >= 0, + ("%s(): new refcount will be negative", __func__)); + + c->refcount += ref; + + return (c->refcount); +} + int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right, int center) diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 45381b907fa2..698a1186924f 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -262,6 +262,8 @@ int chn_poll(struct pcm_channel *c, int ev, struct thread *td); int chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction); void chn_kill(struct pcm_channel *c); void chn_shutdown(struct pcm_channel *c); +int chn_release(struct pcm_channel *c); +int chn_ref(struct pcm_channel *c, int ref); int chn_reset(struct pcm_channel *c, u_int32_t fmt, u_int32_t spd); int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right, int center); diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 448ecb183298..9c31fff7e8cd 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -181,8 +181,8 @@ getchns(struct dsp_cdevpriv *priv, uint32_t prio) pcm_setflags(d->dev, flags); if (ch != NULL) { CHN_LOCK(ch); - pcm_chnref(ch, -1); - pcm_chnrelease(ch); + chn_ref(ch, -1); + chn_release(ch); } PCM_RELEASE(d); PCM_UNLOCK(d); @@ -301,7 +301,7 @@ dsp_close(void *data) wdref--; else { CHN_LOCK(volch); - pcm_chnref(volch, -1); + chn_ref(volch, -1); CHN_UNLOCK(volch); } } @@ -332,12 +332,12 @@ dsp_close(void *data) free_unr(pcmsg_unrhdr, sg_ids); CHN_LOCK(rdch); - pcm_chnref(rdch, rdref); + chn_ref(rdch, rdref); chn_abort(rdch); /* won't sleep */ rdch->flags &= ~(CHN_F_RUNNING | CHN_F_MMAP | CHN_F_DEAD | CHN_F_EXCLUSIVE); chn_reset(rdch, 0, 0); - pcm_chnrelease(rdch); + chn_release(rdch); } if (wrch != NULL) { /* @@ -350,12 +350,12 @@ dsp_close(void *data) free_unr(pcmsg_unrhdr, sg_ids); CHN_LOCK(wrch); - pcm_chnref(wrch, wdref); + chn_ref(wrch, wdref); chn_flush(wrch); /* may sleep */ wrch->flags &= ~(CHN_F_RUNNING | CHN_F_MMAP | CHN_F_DEAD | CHN_F_EXCLUSIVE); chn_reset(wrch, 0, 0); - pcm_chnrelease(wrch); + chn_release(wrch); } PCM_LOCK(d); } @@ -451,7 +451,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) if (rderror != 0) { if (rdch != NULL) - pcm_chnrelease(rdch); + chn_release(rdch); if (!DSP_F_DUPLEX(flags)) { PCM_RELEASE_QUICK(d); PCM_GIANT_EXIT(d); @@ -463,7 +463,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) rdch->flags |= CHN_F_NBIO; if (flags & O_EXCL) rdch->flags |= CHN_F_EXCLUSIVE; - pcm_chnref(rdch, 1); + chn_ref(rdch, 1); chn_vpc_reset(rdch, SND_VOL_C_PCM, 0); CHN_UNLOCK(rdch); } @@ -479,7 +479,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) if (wrerror != 0) { if (wrch != NULL) - pcm_chnrelease(wrch); + chn_release(wrch); if (!DSP_F_DUPLEX(flags)) { if (rdch != NULL) { /* @@ -487,8 +487,8 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) * created record channel */ CHN_LOCK(rdch); - pcm_chnref(rdch, -1); - pcm_chnrelease(rdch); + chn_ref(rdch, -1); + chn_release(rdch); } PCM_RELEASE_QUICK(d); PCM_GIANT_EXIT(d); @@ -500,7 +500,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) wrch->flags |= CHN_F_NBIO; if (flags & O_EXCL) wrch->flags |= CHN_F_EXCLUSIVE; - pcm_chnref(wrch, 1); + chn_ref(wrch, 1); chn_vpc_reset(wrch, SND_VOL_C_PCM, 0); CHN_UNLOCK(wrch); } diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index b44a7344121c..029326dfc05a 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -306,32 +306,6 @@ vchan_alloc: return (err); } -/* release a locked channel and unlock it */ -int -pcm_chnrelease(struct pcm_channel *c) -{ - PCM_BUSYASSERT(c->parentsnddev); - CHN_LOCKASSERT(c); - - c->flags &= ~CHN_F_BUSY; - c->pid = -1; - strlcpy(c->comm, CHN_COMM_UNUSED, sizeof(c->comm)); - CHN_UNLOCK(c); - - return (0); -} - -int -pcm_chnref(struct pcm_channel *c, int ref) -{ - PCM_BUSYASSERT(c->parentsnddev); - CHN_LOCKASSERT(c); - - c->refcount += ref; - - return (c->refcount); -} - static void pcm_setmaxautovchans(struct snddev_info *d, int num) { diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 70addf32bddd..08aa56cc96f7 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -296,8 +296,6 @@ SYSCTL_DECL(_hw_snd); int pcm_setvchans(struct snddev_info *d, int direction, int newcnt, int num); int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, pid_t pid, char *comm); -int pcm_chnrelease(struct pcm_channel *c); -int pcm_chnref(struct pcm_channel *c, int ref); struct pcm_channel *pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, int num, void *devinfo); int pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch); From nobody Sun Apr 28 19:49: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 4VSH8d4MS9z5JrDL; Sun, 28 Apr 2024 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8c6xVHz42ML; Sun, 28 Apr 2024 19:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333745; 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=czRFE5cxOKsI9xCga5Ky/F4v1RekTvnZnCdADPTSYjE=; b=N9GIsjIJHcy5dKj4V7Y0rMyAY8nFcPTxqpq+a/YzRtsgONVGtv9LWXOsIeUyJRYijbRohr /REdsVTMpF+XEdQUg5ExV6d4HJ6SOhaywb/qm6Up4Xp6SvoTT5qdhJvMeQiildgqn4z6G1 8U3+vdPQNTC8T78h01PsCSNkVG2L16kLS94pQrwEfuXUQFssFnhmtsgoxZDKLYVv2E9kPD 7iOEyDtVvHJ/lJlok01hiceLPTDdfyw5R7kMdKNitMdQ3bHmAgzJiT+StLaYZMgyPh88Hl vi9fXIYKiD3w/mImHSpCqaj52O35yMXkZq5UexJS+FtwWrzgc8OGzXGfY+C2/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333745; a=rsa-sha256; cv=none; b=ChX805RzZmuwmR+HOzeVEhCgFMC4meoTd651Q5wxMtmVvf6T2OjRHnV7WglwJNrv4/aWgc GCYuBYsOM7nya7xUOF0nhVsVIUc997smGIOuFgwEs+co9wsMPHItuCNjAzGHuChXzKVItW aSx9UlR//9KW2ObX1XBCLpPfAO08IVM1yhugeIppvCSMJZ6DcE6zPuW67/OWWKUg9Lj3kg UEYYINiQw6qIHZmM9Yk16HqO2kaBBeZUCJqkTnCSFVTbCyXs5tjOsFHgVWMRSxq4BNI0lZ O3uBvcEr5qV6i4+Z9DmGaZ6VTJxSMoqpOSJAdzTMsKQ55AzzOK5Vd/2tlCXxaA== 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=1714333745; 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=czRFE5cxOKsI9xCga5Ky/F4v1RekTvnZnCdADPTSYjE=; b=e9X6O8orAfrCb68w2vjMLW1f8sCCsrlwOyybzw9urSrVWbr0NaH0/pXcY+JL3vHo0LmN9m Su+y7mEcPQKmH0DerUGT+Wp0rHELfqTzP+sio3RIjYXcNFzW5ZYB6QCEucuiiYohPeHSJk uk2cUcT+J6Kf68B90ehNQmGlJLLiACN+SlDMY0FVbH8JFsEQMoNY5j0L721Ui6qr9oegjY VVf+Ou3D3/jamuCCXEnMhS1zNaJ5uXx73yqeFdOEgi/oaYZ0CymxD0FBSjaxpAEQi8r5Vi LZYEoQK6Q74wXTNKwAFaVtuexSAwkjUBN2OmfA4n2ElK8gyQwXcN+rmnH8NBHA== 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 4VSH8c6Yjxzf6F; Sun, 28 Apr 2024 19:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJn4bk063519; Sun, 28 Apr 2024 19:49:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJn4Ln063516; Sun, 28 Apr 2024 19:49:04 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:49:04 GMT Message-Id: <202404281949.43SJn4Ln063516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: b3ea087c05d8 - main - sound: Merge pcm_chn_destroy() and chn_kill() 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3ea087c05d8c75978a302cbb3fa92ce1afa3e49 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b3ea087c05d8c75978a302cbb3fa92ce1afa3e49 commit b3ea087c05d8c75978a302cbb3fa92ce1afa3e49 Author: Christos Margiolis AuthorDate: 2024-04-28 19:46:08 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:24 +0000 sound: Merge pcm_chn_destroy() and chn_kill() pcm_chn_destroy() acts like a wrapper around chn_kill(), and additionally calls a few more functions that should in fact be part of chn_kill()'s logic. Merge pcm_chn_destroy()'s functionality in chn_kill() to improve readability, as well as code layering. While here, convert chn_kill() to void as it currently always returns 0. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44984 --- sys/dev/sound/pcm/channel.c | 12 +++++++----- sys/dev/sound/pcm/channel.h | 2 +- sys/dev/sound/pcm/sound.c | 26 ++------------------------ sys/dev/sound/pcm/sound.h | 1 - sys/dev/sound/pcm/vchan.c | 6 +++--- 5 files changed, 13 insertions(+), 34 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 1527d5ea3d2c..21a91ff13186 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1279,11 +1279,13 @@ out: return 0; } -int +void chn_kill(struct pcm_channel *c) { - struct snd_dbuf *b = c->bufhard; - struct snd_dbuf *bs = c->bufsoft; + struct snd_dbuf *b = c->bufhard; + struct snd_dbuf *bs = c->bufsoft; + + PCM_BUSYASSERT(c->parentsnddev); if (CHN_STARTED(c)) { CHN_LOCK(c); @@ -1299,8 +1301,8 @@ chn_kill(struct pcm_channel *c) CHN_LOCK(c); c->flags |= CHN_F_DEAD; chn_lockdestroy(c); - - return (0); + kobj_delete(c->methods, M_DEVBUF); + free(c, M_DEVBUF); } void diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index d4f73275ed39..45381b907fa2 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -260,7 +260,7 @@ int chn_flush(struct pcm_channel *c); int chn_poll(struct pcm_channel *c, int ev, struct thread *td); int chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction); -int chn_kill(struct pcm_channel *c); +void chn_kill(struct pcm_channel *c); void chn_shutdown(struct pcm_channel *c); int chn_reset(struct pcm_channel *c, u_int32_t fmt, u_int32_t spd); int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right, diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index c32536a55960..b44a7344121c 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -515,28 +515,6 @@ pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t c return (ch); } -int -pcm_chn_destroy(struct pcm_channel *ch) -{ - struct snddev_info *d __diagused; - int err; - - d = ch->parentsnddev; - PCM_BUSYASSERT(d); - - err = chn_kill(ch); - if (err) { - device_printf(ch->dev, "chn_kill(%s) failed, err = %d\n", - ch->name, err); - return (err); - } - - kobj_delete(ch->methods, M_DEVBUF); - free(ch, M_DEVBUF); - - return (0); -} - int pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch) { @@ -630,7 +608,7 @@ pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo) if (err) { device_printf(d->dev, "pcm_chn_add(%s) failed, err=%d\n", ch->name, err); - pcm_chn_destroy(ch); + chn_kill(ch); } return (err); @@ -678,7 +656,7 @@ pcm_killchans(struct snddev_info *d) error = pcm_chn_remove(d, ch); PCM_UNLOCK(d); if (error == 0) - pcm_chn_destroy(ch); + chn_kill(ch); } while (!CHN_EMPTY(d, channels.pcm)); } diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 1f2dda880742..70addf32bddd 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -300,7 +300,6 @@ int pcm_chnrelease(struct pcm_channel *c); int pcm_chnref(struct pcm_channel *c, int ref); struct pcm_channel *pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, int num, void *devinfo); -int pcm_chn_destroy(struct pcm_channel *ch); int pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch); int pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch); diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index ac5a0535ddce..c3bc36d924bd 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -709,7 +709,7 @@ vchan_create(struct pcm_channel *parent, int num) ret = pcm_chn_add(d, ch); PCM_UNLOCK(d); if (ret != 0) { - pcm_chn_destroy(ch); + chn_kill(ch); CHN_LOCK(parent); return (ret); } @@ -837,7 +837,7 @@ vchan_create(struct pcm_channel *parent, int num) PCM_LOCK(d); if (pcm_chn_remove(d, ch) == 0) { PCM_UNLOCK(d); - pcm_chn_destroy(ch); + chn_kill(ch); } else PCM_UNLOCK(d); CHN_LOCK(parent); @@ -890,7 +890,7 @@ vchan_destroy(struct pcm_channel *c) /* destroy ourselves */ if (ret == 0) - ret = pcm_chn_destroy(c); + chn_kill(c); CHN_LOCK(parent); From nobody Sun Apr 28 19:49: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 4VSH8g5gBwz5Jr1h; Sun, 28 Apr 2024 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8g1V2Pz42cg; Sun, 28 Apr 2024 19:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333747; 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=NtFVjBwkY13RrhTDgBPvualpLpsOYBlpFuA3wQflni0=; b=apuhxeSRJ0xTenlRMcc5YAS0jHCmuGuZBc6F81hhv44TXPizyhZvEus/cyYZVdQXZaZR0d GPizOqsClK9DapW9O6MvRTuhM4tlmqk4cdfJBf9u41JwRv0NCiwi6+PmXBs+uw7Sof8Dkr EeOWCQCW1X073O+tn9mZdpXOOzIZLWbFFQg8e5QCo1R7KAyucRZ3RgLrrhnRQHxRJtNEk4 xyYB5jVPvUrFNqzIuAF28OOYdz5CSYVHapwP0ep+PqIMJdvc9d+YAz3kfEq4hw8RLTGC70 yXBCOZAjouODcRa6HOtjqjytAtgcaVzV8XZJX5BU54f+oxr7ZXzYWsm6os4zqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333747; a=rsa-sha256; cv=none; b=vnpWK7KGm1JR6IzyPtjk+S7Ohkx7CcSqow1SN/Q+lokehilxtrhMl8X3xUxPjiMaBVU0OF vgJMOrsClTkkGA0yrINUzqcGEr7ZrmfmliqpaI5cEPnhiaGatCEABsVRvlSRIDAwW3hkfc 4qjDVFg1TUSJ4EeSaFt2FN5VFGAaUYoIKKSy+zASm+9bqIK2yBzqIcQLsbtKqrj/qdPcJ5 KrP2ASamhX4oQh9OWbkk5vI17QsI3ow9heceDp1PAJJoQ15fy8YC1Na8pI6pV17CGzh+Zc CR/0PGkfTFQx4B/eLXe4k1OwxNbWMA3tvKSwV+jB6XRVrKJYKP1n1wtMH24/Vw== 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=1714333747; 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=NtFVjBwkY13RrhTDgBPvualpLpsOYBlpFuA3wQflni0=; b=GFGFwFKxQBaRNHPx3+F038DT125sXXXNQBIx7N4x/I05AI1lvbvdwrIUKIxVvDLJyH4vXL 5nkU5o4w+hf77fe1eTotLsKqUcPx4loooq3JwGld5wHtmK/wgglduilNRNpoBA5skjcDTM pRR95LcRFdrqRHfw031fSVIdEAYdslnVytqudG7vhIuIdRu6H10f4KrGWDt639lMZA+Fj/ o83JWaKBL9qS7lVUJ6ca+xh+JyVCujqjXb43k6YAhTIyl+Tpq/L6X084OgpYIYZOMTS/PR L2Uyaw8sDh/sWMg7GXqaMXtla7h9GawmC+9andmBB4wmxHIzXLoSJybr1tVIaw== 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 4VSH8g15pXzdpX; Sun, 28 Apr 2024 19:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJn7Wa063616; Sun, 28 Apr 2024 19:49:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJn7U2063613; Sun, 28 Apr 2024 19:49:07 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:49:07 GMT Message-Id: <202404281949.43SJn7U2063613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: e56c8996fc43 - main - sound: Add missing space in dev.pcm.X.mode description 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e56c8996fc437488686e7cdef18258f16c5ea74e Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e56c8996fc437488686e7cdef18258f16c5ea74e commit e56c8996fc437488686e7cdef18258f16c5ea74e Author: Christos Margiolis AuthorDate: 2024-04-28 19:47:11 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:24 +0000 sound: Add missing space in dev.pcm.X.mode description Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D44990 --- sys/dev/sound/pcm/sound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 029326dfc05a..9d5eaf3f5ad7 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -833,8 +833,8 @@ pcm_sysinit(device_t dev) SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "mode", CTLFLAG_RD, NULL, mode, - "mode (1=mixer, 2=play, 4=rec. The values are OR'ed if more than one" - "mode is supported)"); + "mode (1=mixer, 2=play, 4=rec. The values are OR'ed if more than " + "one mode is supported)"); if (d->flags & SD_F_AUTOVCHAN) vchan_initsys(dev); if (d->flags & SD_F_EQ) From nobody Sun Apr 28 19:49: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 4VSH8h6Lgvz5JqyQ; Sun, 28 Apr 2024 19:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSH8h29Wdz42XH; Sun, 28 Apr 2024 19:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714333748; 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=cA9+9Ce8R9GzB23u0P79z+h4xiJp2Nu0wtxS2UWmo58=; b=sstKEFSoU5ywlladund/Wkw6lQ7PdNbdezHB6VBL1Tyg6q+FhYEzLo9v9GZxaaYa3sNsSF /hmtPxGY9CE8FViHVrmjmB3xrwxEcuPcezNPyeM+EpfDZFb3o2os2BYQl1dYgbVABZPdcO 62mVl+DsDHcubp1A0bkP1FMnBhX9aOX7klLO7mTEwKeVoLzK7cn0fX62eKI21IAekkij9h 9rnfQQqfqmkYIsKT0A3rRM++wqpjaMm6OnLsyWxLPboccoQgPA5YTrvkmBGC9DTIYjXcBj VBsbjjP76PXjZJIdYE+xCmXABEbi9C4l7W3aP8s0GE84zCRrPhZzi25Num4/IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714333748; a=rsa-sha256; cv=none; b=no/U1731cXHNd25ipsG6VMvNMVJdGLBSFRN8TjOfZ1CJioRRb1Rfc4vzp/ZzrO0wvt1BcR QUMkYTCPBj8NcaMKBJVHvvdr0H0AEIRNDcFujMrQdJ0yRdEgWzZ0qer4wFo5JSMfC7zUXE zHYhPs/0GpFQMQTj+/3FmoqTJ1LegJrKEz005iEfjOv8pBDHF3TQsxvFuG/2TO+o1XsyjH hPbaM/zfNq/GxVZFTMtGT/90iBtoEtJHqOkM2fM1+9mOqjweGxsAIMYwF/BVutqKJvvQqS GT+BvBJt8YmIPopLfDxl0HV5i0AN0lPvm4HXmeDDpvhbpoQo9JPD7bz1WJ96HQ== 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=1714333748; 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=cA9+9Ce8R9GzB23u0P79z+h4xiJp2Nu0wtxS2UWmo58=; b=D7p/8a9/LSAsVPdIACuL+8VhqwLR71cgBbnbDVZoBqWluVk8a37wuEJu1A+3NHIzvoz3xN zVktXVAeXAi9veSIQm/pkrax5R6qb7ImdamXwliDoWNR8em01kPRdenjVinKxcU6hwDdUg YAAMy1NQm7YtRYY3p66MgSWQp5/qme30bnGzALraVrxOPB6kcd2IxrTGY9QI2n9iolff8o mZdVZNistwU6T4EsBJ23vTG8sI+7+CziXdiLDKyOHQKkO8/8Bxvxdigv5M3gpi1qf5E21B ap6XhNA8CIS1Cu9BT2bV4N6aPygjjEgaF9n+AHqDFltu5MOGaAq7CF9PjlalpA== 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 4VSH8h1hYdzdpY; Sun, 28 Apr 2024 19:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SJn8FJ063661; Sun, 28 Apr 2024 19:49:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SJn8o2063658; Sun, 28 Apr 2024 19:49:08 GMT (envelope-from git) Date: Sun, 28 Apr 2024 19:49:08 GMT Message-Id: <202404281949.43SJn8o2063658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 7cc1afc55890 - main - sound: Remove chn_timeout check from chn_init() 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7cc1afc5589000ac6ad7a908b07fad3401367bd1 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7cc1afc5589000ac6ad7a908b07fad3401367bd1 commit 7cc1afc5589000ac6ad7a908b07fad3401367bd1 Author: Christos Margiolis AuthorDate: 2024-04-28 19:47:33 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:48:25 +0000 sound: Remove chn_timeout check from chn_init() This check is not related to channel initializion, but is also unnecessary, since sysctl_hw_snd_timeout() takes care of checking if chn_timeout is within bounds. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44992 --- sys/dev/sound/pcm/channel.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 0fea169e3eb7..859476f212ae 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1164,9 +1164,6 @@ chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction) struct snd_dbuf *b, *bs; int i, ret; - if (chn_timeout < CHN_TIMEOUT_MIN || chn_timeout > CHN_TIMEOUT_MAX) - chn_timeout = CHN_TIMEOUT; - chn_lockinit(c, dir); b = NULL; From nobody Sun Apr 28 20:00: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 4VSHPX67CRz5JrnR; Sun, 28 Apr 2024 20:00:16 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSHPX535Jz467P; Sun, 28 Apr 2024 20:00:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714334416; 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=3R4T9J8Jn+El1TDeGYI2uT4L2ZVt64CMt6XBlTAGNe0=; b=tGMR0oeII30LXI3tOPGQTi3Ptnpt3I9vZZVraa/ykG2qNaAw/aqZXD99CXfKND4vsxLnay nzNjI85ortCHkkE623/xO2rSUa+49zafKCI+9UCNBNEv6M+NCYs8fsO2urGJWWiaKrIT6v 3jtsH6s9pAMamb9tBLL/2DolwQyxxTi5tUf8VO6gtZ/C540mdiFJBq58AZtAgtT/NmTY+t 5NAfyGbeywAGjhGl9UhuoB958Hkj9X+SJZktSiHRMLyFJIyAOFXWA9FaxShK5smzuztGzx wncn8zwVTsSwZSNJ3P6CE01yWcrryknXPqZ6+lxGLzSFCqgMHjfHAwqIuaYczg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714334416; a=rsa-sha256; cv=none; b=MMw+nCkWl0GgTCv/u0BaI7eGOnEeWTwOUvkDHeIT5CO0FWdH6ewA/utd5gkuFTkGO2y9NL ft+g07Y+60DRpxfVGrqKWNbk89ca7WF2L9qZ378RAOuoW7RlSix7JSLuGIyOruhdGmmuPP UV4Euf3w7sG0UrcDhUJKy9tSRY1rq9T7VwytpGuW6G6giO3hJ59KXz3mGA45BrYz5eZKzY 8eT7hEDrC3gOCAnANSnkhcBx2yTOGjopx2ck0qZ6ZLzLiy1Xs67REq0ScpcALwSIffTZzG n3N7s1KuVz0X/MQLqNU/zlC7vPVewerSPS2BybDkAHJ3dsVQ+DjsSjQWfnEkRw== 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=1714334416; 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=3R4T9J8Jn+El1TDeGYI2uT4L2ZVt64CMt6XBlTAGNe0=; b=d97JMdCcSmjFdHxlEJw9LXsZ3ZZ1YVNb+9m/BWCAWWTXDBkdgfwYqzAhISoXgLW/UvhL8g xzTF9KHclNLTTqAuO8wOtCTT7Zi64Ief2lpxkn+fF5Lw2KdapagsLYl1Dg5SyeE2yRIetn kUj2bRZBnLVreXkZmPnUk8yh0BjswBbh1cekCED3NljippaarwMGTeyU6ihU6ZJTQHBaf/ 9Wk3Mhqi7bwSqIZXjWeCe5FmPgp4zX0sI3kQgvnUxNsJ0cw7H5mwGOJNvMTbBvlhHc8Cmy WhMO7ZV5qDHn2aONYTYR+b5uyqgRgAzm+d9nCuDXO75Sr63eE6VTeo8pPiCNGA== 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 4VSHPX4frlzdqS; Sun, 28 Apr 2024 20:00:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43SK0GIR089185; Sun, 28 Apr 2024 20:00:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43SK0G3B089180; Sun, 28 Apr 2024 20:00:16 GMT (envelope-from git) Date: Sun, 28 Apr 2024 20:00:16 GMT Message-Id: <202404282000.43SK0G3B089180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 993d1fad5bd8 - main - RELNOTES: Fix wrong commit hash 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 993d1fad5bd805dbd1820975e58839ff4276e7b0 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=993d1fad5bd805dbd1820975e58839ff4276e7b0 commit 993d1fad5bd805dbd1820975e58839ff4276e7b0 Author: Christos Margiolis AuthorDate: 2024-04-28 19:59:17 +0000 Commit: Christos Margiolis CommitDate: 2024-04-28 19:59:17 +0000 RELNOTES: Fix wrong commit hash Fixes: 25723d66369f ("sound: Retire unit.*") Sponsored by: The FreeBSD Foundation MFC after: 1 week --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 658a82a9e1b0..6994e0792186 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,7 +10,7 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. -8fef193e14e2: +25723d66369f: As a side-effect of retiring the unit.* code in sound(4), the hw.snd.maxunit loader(8) tunable is also retired. 6d5ce2bb6344: From nobody Sun Apr 28 20:34:20 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 4VSJ8z69swz5JvfC; Sun, 28 Apr 2024 20:34:27 +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 4VSJ8z4Fbrz4BHL; Sun, 28 Apr 2024 20:34:27 +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 43SKYKtR002509; Sun, 28 Apr 2024 23:34:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 43SKYKtR002509 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 43SKYKho002508; Sun, 28 Apr 2024 23:34:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 28 Apr 2024 23:34:20 +0300 From: Konstantin Belousov To: Mateusz Piotrowski <0mp@freebsd.org>, \@kib.kiev.ua@tom.home Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6662c2312e95 - main - gettimeofday.2: Do mention improbable future removal Message-ID: References: <202404281812.43SICBSW008151@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: <202404281812.43SICBSW008151@gitrepo.freebsd.org> 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.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) 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: 4VSJ8z4Fbrz4BHL On Sun, Apr 28, 2024 at 06:12:11PM +0000, Mateusz Piotrowski wrote: > The branch main has been updated by 0mp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6662c2312e956439652ce2d06b42753b6a78fc61 > > commit 6662c2312e956439652ce2d06b42753b6a78fc61 > Author: Mateusz Piotrowski <0mp@FreeBSD.org> > AuthorDate: 2024-04-28 18:06:05 +0000 > Commit: Mateusz Piotrowski <0mp@FreeBSD.org> > CommitDate: 2024-04-28 18:11:22 +0000 > > gettimeofday.2: Do mention improbable future removal > > As kib@ noted: > > > Obviously gettimeofday(2) is not going to be removed > > even in the far future. > > Reported by: kib > Fixes: 4395d3ced5cf Document that gettimeofday() is obsolescent > MFC after: 3 days Thank you. From nobody Sun Apr 28 20:34: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 4VSJ9V49cvz5JvRF; Sun, 28 Apr 2024 20:34:54 +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 4VSJ9V2QwMz4CXK; Sun, 28 Apr 2024 20:34:54 +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 43SKYlwg002546; Sun, 28 Apr 2024 23:34:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 43SKYlwg002546 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 43SKYlaT002545; Sun, 28 Apr 2024 23:34:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 28 Apr 2024 23:34:47 +0300 From: Konstantin Belousov To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6662c2312e95 - main - gettimeofday.2: Do mention improbable future removal Message-ID: References: <202404281812.43SICBSW008151@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: <202404281812.43SICBSW008151@gitrepo.freebsd.org> 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.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) 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: 4VSJ9V2QwMz4CXK On Sun, Apr 28, 2024 at 06:12:11PM +0000, Mateusz Piotrowski wrote: > The branch main has been updated by 0mp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6662c2312e956439652ce2d06b42753b6a78fc61 > > commit 6662c2312e956439652ce2d06b42753b6a78fc61 > Author: Mateusz Piotrowski <0mp@FreeBSD.org> > AuthorDate: 2024-04-28 18:06:05 +0000 > Commit: Mateusz Piotrowski <0mp@FreeBSD.org> > CommitDate: 2024-04-28 18:11:22 +0000 > > gettimeofday.2: Do mention improbable future removal > > As kib@ noted: > > > Obviously gettimeofday(2) is not going to be removed > > even in the far future. > > Reported by: kib > Fixes: 4395d3ced5cf Document that gettimeofday() is obsolescent > MFC after: 3 days Thank you.