From nobody Mon Jul 29 01:49:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLrx06X4z5S7DK; Mon, 29 Jul 2024 01:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLrw6b5vz4nT3; Mon, 29 Jul 2024 01: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=1722217792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MqDJhLjJ0pzHHRQi0Kt52b9PuzmEtjizkqZor1LNcl0=; b=VzL5mxSGY5mHwE10mZdTmwG+iqO4gThfSfZ0GXkIkzCP0VfwTyJwEwcX4NfUo2INWOVA14 HymCPiVcP4aJFirU0TW7LlGPxQOT4lDRNxvAzisLiO3JYdgCepCqcRc238YB8Fnq1KQWPQ ZYw0t7xNH3QPuWg3vHrJa7pEHSLxZ+gtN8pLWfp7TwR1OSSAv/D/EQi+Yw+VDwmMhfRg7H wd3HjujmYePPhtG4T8MPAk8wCuQM4R4PB7GvttknSn1kmR8YDQsC8CfRvxFtQzkqcn13o1 7weEHayqGXwwc80V/odZ7uGEy+oyKUx0SpwQkkhhCalAfmdsCqzxWn7FL63ZaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217792; a=rsa-sha256; cv=none; b=D32WjW0HASVEdOcREYLET+e7iWn7oEhzsW/ZFA5L4/2l37QgdQ1CpZTEpzWvkpMOd77cgX b8ipTCmNOH6bXObBc38b3g+e7dZHVVHUoiNbhipm20d+vBB5Hh2Y9ZrAoxOC81khQEdpC2 YRJzqXH3tlIAXAy/l3NjyyWqNIBDhpPs5GukMMJzuoQaSNGIjrXab9Kfu4mFupZfYJwSXk E8emRhb85ANZxzdhDMMERb4CgHIipDksBkgITiISKRPSDEIQCymoftRdfJHugmwyho9JX0 nOOgwI583DS41H7cTlMu1bYIE14nyVgaKFhC4oqKDkigxS+o/pledx562LPocg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MqDJhLjJ0pzHHRQi0Kt52b9PuzmEtjizkqZor1LNcl0=; b=WIoWYKXY/ScwxJIkFN72IzIlpT3mLauzV1ouB+lenPCLXjIT2yIrzf0WoKe2Sij2UcDeD8 Xq3XSsMnSJzHlsDbSrNoyBcldUd5ccxO/B/lrPFJe7IaUglOmZm0JhMfN7rPPRJzbM+Pti Im9mc4eOWcR5S1bH8CU+jlkEn59LbVbSqoYbp0bfAIs00MxdcFSvIhGMIL94Kw7Bo6xNO9 vC5Aba2x1Z4IYVXm5vWyW2zH1AUx2L4e2iIGxAlnNGfG5iMLwEIA3UJsh6AArH0J2AgnaM TM7K13hSl/azLfFqhYedkt+QHSeyq/2itIxuUMUkef41uWu5ebTskEWUV/n/xw== 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 4WXLrw65bczFLV; Mon, 29 Jul 2024 01:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1nqgN091618; Mon, 29 Jul 2024 01:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1nqvV091615; Mon, 29 Jul 2024 01:49:52 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:49:52 GMT Message-Id: <202407290149.46T1nqvV091615@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: 13a1129d700c - main - vm: Remove kernel stack swapping support, part 1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 13a1129d700cee67107c1a146f9c6e8bea372644 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=13a1129d700cee67107c1a146f9c6e8bea372644 commit 13a1129d700cee67107c1a146f9c6e8bea372644 Author: Mark Johnston AuthorDate: 2024-07-29 01:38:21 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:38:21 +0000 vm: Remove kernel stack swapping support, part 1 - Disconnect the swapout daemon from the page daemon. - Remove swapout() and swapout_procs(). Tested by: pho Reviewed by: alc, imp, kib Differential Revision: https://reviews.freebsd.org/D46112 --- sys/vm/vm_pageout.c | 12 --- sys/vm/vm_pageout.h | 3 - sys/vm/vm_swapout.c | 239 +--------------------------------------------- sys/vm/vm_swapout_dummy.c | 10 -- 4 files changed, 1 insertion(+), 263 deletions(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 61f02eeb2f11..cdc97637bbef 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1764,24 +1764,12 @@ vm_pageout_inactive(struct vm_domain *vmd, int shortage, int *addl_shortage) vm_pagequeue_unlock(pq); } - /* - * Wakeup the swapout daemon if we didn't free the targeted number of - * pages. - */ - if (page_shortage > 0) - vm_swapout_run(); - /* * If the inactive queue scan fails repeatedly to meet its * target, kill the largest process. */ vm_pageout_mightbe_oom(vmd, page_shortage, starting_page_shortage); - /* - * Reclaim pages by swapping out idle processes, if configured to do so. - */ - vm_swapout_run_idle(); - /* * See the description of addl_page_shortage above. */ diff --git a/sys/vm/vm_pageout.h b/sys/vm/vm_pageout.h index cc6c718affb1..a6cdfafe743b 100644 --- a/sys/vm/vm_pageout.h +++ b/sys/vm/vm_pageout.h @@ -103,8 +103,5 @@ void vm_wait_severe(void); int vm_pageout_flush(vm_page_t *, int, int, int, int *, boolean_t *); void vm_pageout_oom(int shortage); -void vm_swapout_run(void); -void vm_swapout_run_idle(void); - #endif /* _KERNEL */ #endif /* _VM_VM_PAGEOUT_H_ */ diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c index 20b975f252e9..85708d61d849 100644 --- a/sys/vm/vm_swapout.c +++ b/sys/vm/vm_swapout.c @@ -154,7 +154,6 @@ SYSCTL_INT(_vm, OID_AUTO, vmdaemon_timeout, CTLFLAG_RW, &vm_daemon_timeout, 0, "Time between vmdaemon runs"); -static int vm_pageout_req_swapout; /* XXX */ static int vm_daemon_needed; static struct mtx vm_daemon_mtx; /* Allow for use by vm_pageout before vm_daemon is initialized. */ @@ -165,12 +164,8 @@ static int swap_inprogress; /* Pending swap-ins done outside swapper. */ static int last_swapin; static void swapclear(struct proc *); -static int swapout(struct proc *); static void vm_swapout_map_deactivate_pages(vm_map_t, long); static void vm_swapout_object_deactivate(pmap_t, vm_object_t, long); -static void swapout_procs(int action); -static void vm_req_vmdaemon(int req); -static void vm_thread_swapout(struct thread *td); static void vm_swapout_object_deactivate_page(pmap_t pmap, vm_page_t m, bool unmap) @@ -322,49 +317,6 @@ vm_swapout_map_deactivate_pages(vm_map_t map, long desired) vm_map_unlock_read(map); } -/* - * Swap out requests - */ -#define VM_SWAP_NORMAL 1 -#define VM_SWAP_IDLE 2 - -void -vm_swapout_run(void) -{ - - if (vm_swap_enabled) - vm_req_vmdaemon(VM_SWAP_NORMAL); -} - -/* - * Idle process swapout -- run once per second when pagedaemons are - * reclaiming pages. - */ -void -vm_swapout_run_idle(void) -{ - static long lsec; - - if (!vm_swap_idle_enabled || time_second == lsec) - return; - vm_req_vmdaemon(VM_SWAP_IDLE); - lsec = time_second; -} - -static void -vm_req_vmdaemon(int req) -{ - static int lastrun = 0; - - mtx_lock(&vm_daemon_mtx); - vm_pageout_req_swapout |= req; - if ((ticks > (lastrun + hz)) || (ticks < lastrun)) { - wakeup(&vm_daemon_needed); - lastrun = ticks; - } - mtx_unlock(&vm_daemon_mtx); -} - static void vm_daemon(void) { @@ -372,7 +324,7 @@ vm_daemon(void) struct proc *p; struct thread *td; struct vmspace *vm; - int breakout, swapout_flags, tryagain, attempts; + int breakout, tryagain, attempts; #ifdef RACCT uint64_t rsize, ravailable; @@ -384,18 +336,7 @@ vm_daemon(void) mtx_lock(&vm_daemon_mtx); msleep(&vm_daemon_needed, &vm_daemon_mtx, PPAUSE, "psleep", vm_daemon_timeout); - swapout_flags = vm_pageout_req_swapout; - vm_pageout_req_swapout = 0; mtx_unlock(&vm_daemon_mtx); - if (swapout_flags != 0) { - /* - * Drain the per-CPU page queue batches as a deadlock - * avoidance measure. - */ - if ((swapout_flags & VM_SWAP_NORMAL) != 0) - vm_page_pqbatch_drain(); - swapout_procs(swapout_flags); - } /* * scan the processes for exceeding their rlimits or if @@ -520,36 +461,6 @@ again: } } -/* - * Allow a thread's kernel stack to be paged out. - */ -static void -vm_thread_swapout(struct thread *td) -{ - vm_page_t m; - vm_offset_t kaddr; - vm_pindex_t pindex; - int i, pages; - vm_object_t obj; - - cpu_thread_swapout(td); - kaddr = td->td_kstack; - pages = td->td_kstack_pages; - obj = vm_thread_kstack_size_to_obj(pages); - pindex = vm_kstack_pindex(kaddr, pages); - pmap_qremove(kaddr, pages); - VM_OBJECT_WLOCK(obj); - for (i = 0; i < pages; i++) { - m = vm_page_lookup(obj, pindex + i); - if (m == NULL) - panic("vm_thread_swapout: kstack already missing?"); - vm_page_dirty(m); - vm_page_xunbusy_unchecked(m); - vm_page_unwire(m, PQ_LAUNDRY); - } - VM_OBJECT_WUNLOCK(obj); -} - /* * Bring the kernel stack for a specified thread back in. */ @@ -773,100 +684,6 @@ swapper(void) } } -/* - * First, if any processes have been sleeping or stopped for at least - * "swap_idle_threshold1" seconds, they are swapped out. If, however, - * no such processes exist, then the longest-sleeping or stopped - * process is swapped out. Finally, and only as a last resort, if - * there are no sleeping or stopped processes, the longest-resident - * process is swapped out. - */ -static void -swapout_procs(int action) -{ - struct proc *p; - struct thread *td; - int slptime; - bool didswap, doswap; - - MPASS((action & (VM_SWAP_NORMAL | VM_SWAP_IDLE)) != 0); - - didswap = false; - sx_slock(&allproc_lock); - FOREACH_PROC_IN_SYSTEM(p) { - /* - * Filter out not yet fully constructed processes. Do - * not swap out held processes. Avoid processes which - * are system, exiting, execing, traced, already swapped - * out or are in the process of being swapped in or out. - */ - PROC_LOCK(p); - if (p->p_state != PRS_NORMAL || p->p_lock != 0 || (p->p_flag & - (P_SYSTEM | P_WEXIT | P_INEXEC | P_STOPPED_SINGLE | - P_TRACED | P_SWAPPINGOUT | P_SWAPPINGIN | P_INMEM)) != - P_INMEM) { - PROC_UNLOCK(p); - continue; - } - - /* - * Further consideration of this process for swap out - * requires iterating over its threads. We release - * allproc_lock here so that process creation and - * destruction are not blocked while we iterate. - * - * To later reacquire allproc_lock and resume - * iteration over the allproc list, we will first have - * to release the lock on the process. We place a - * hold on the process so that it remains in the - * allproc list while it is unlocked. - */ - _PHOLD_LITE(p); - sx_sunlock(&allproc_lock); - - /* - * Do not swapout a realtime process. - * Guarantee swap_idle_threshold1 time in memory. - * If the system is under memory stress, or if we are - * swapping idle processes >= swap_idle_threshold2, - * then swap the process out. - */ - doswap = true; - FOREACH_THREAD_IN_PROC(p, td) { - thread_lock(td); - slptime = (ticks - td->td_slptick) / hz; - if (PRI_IS_REALTIME(td->td_pri_class) || - slptime < swap_idle_threshold1 || - !thread_safetoswapout(td) || - ((action & VM_SWAP_NORMAL) == 0 && - slptime < swap_idle_threshold2)) - doswap = false; - thread_unlock(td); - if (!doswap) - break; - } - if (doswap && swapout(p) == 0) - didswap = true; - - PROC_UNLOCK(p); - if (didswap) { - sx_xlock(&allproc_lock); - swapped_cnt++; - sx_downgrade(&allproc_lock); - } else - sx_slock(&allproc_lock); - PRELE(p); - } - sx_sunlock(&allproc_lock); - - /* - * If we swapped something out, and another process needed memory, - * then wakeup the sched process. - */ - if (didswap) - wakeup(&proc0); -} - static void swapclear(struct proc *p) { @@ -896,57 +713,3 @@ swapclear(struct proc *p) p->p_flag &= ~(P_SWAPPINGIN | P_SWAPPINGOUT); p->p_flag |= P_INMEM; } - -static int -swapout(struct proc *p) -{ - struct thread *td; - - PROC_LOCK_ASSERT(p, MA_OWNED); - - /* - * The states of this process and its threads may have changed - * by now. Assuming that there is only one pageout daemon thread, - * this process should still be in memory. - */ - KASSERT((p->p_flag & (P_INMEM | P_SWAPPINGOUT | P_SWAPPINGIN)) == - P_INMEM, ("swapout: lost a swapout race?")); - - /* - * Remember the resident count. - */ - p->p_vmspace->vm_swrss = vmspace_resident_count(p->p_vmspace); - - /* - * Check and mark all threads before we proceed. - */ - p->p_flag &= ~P_INMEM; - p->p_flag |= P_SWAPPINGOUT; - FOREACH_THREAD_IN_PROC(p, td) { - thread_lock(td); - if (!thread_safetoswapout(td)) { - thread_unlock(td); - swapclear(p); - return (EBUSY); - } - td->td_flags &= ~TDF_INMEM; - TD_SET_SWAPPED(td); - thread_unlock(td); - } - td = FIRST_THREAD_IN_PROC(p); - ++td->td_ru.ru_nswap; - PROC_UNLOCK(p); - - /* - * This list is stable because all threads are now prevented from - * running. The list is only modified in the context of a running - * thread in this process. - */ - FOREACH_THREAD_IN_PROC(p, td) - vm_thread_swapout(td); - - PROC_LOCK(p); - p->p_flag &= ~P_SWAPPINGOUT; - p->p_swtick = ticks; - return (0); -} diff --git a/sys/vm/vm_swapout_dummy.c b/sys/vm/vm_swapout_dummy.c index bf0fd7b5aa5d..0e0a268c8c46 100644 --- a/sys/vm/vm_swapout_dummy.c +++ b/sys/vm/vm_swapout_dummy.c @@ -91,16 +91,6 @@ SYSCTL_INT(_vm, OID_AUTO, swap_idle_enabled, CTLFLAG_RD, &vm_swap_idle_enabled, 0, "Allow swapout on idle criteria"); -void -vm_swapout_run(void) -{ -} - -void -vm_swapout_run_idle(void) -{ -} - void faultin(struct proc *p) { From nobody Mon Jul 29 01:49:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLry3Sptz5S7DN; Mon, 29 Jul 2024 01:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLry2QZkz4nbk; Mon, 29 Jul 2024 01:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XYrNv9/qpqPeTQSiuriwYtL15TDbXk9tBTPhchm1dA=; b=birQhZtmCnEFfGYMx7hS0qU8bYq6x2zcBrEUi3vMxLGitvt/1VctFQcuYAjlTeaooVRiy8 IFKhhyHhphnCWPCSG3G/Hs0ZaYYCZXcRYnWX1fAIivDX7+btYaMo+I40p3mGYUcGO1epsL 5BAEjL6T9GobQI0kzyE26aThO1q7Rgn4aAvi5NHTVl7w0VWARNHhoTn+2QBx1I2weOwKmB zRYGvkHz3OxyEd4zu5Wszaz7jcuuZImoe3qvU9flOfU9qh8g1zo7N8lkwWfSBvDdp8ilNZ l0ISlCO+x4FCIt+H6uvnhLNo5mSr+Zl/Z+i2vHHHfTJ40qqUvezLyoZ0ri3FHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217794; a=rsa-sha256; cv=none; b=vU3TbfJfRUXKY8eEUtw/Q9CwvWLrV6yFyp+WJ1jXmOLaEuHQr2yaxW8DOKoEPNeHrl1H+K I9Pb72qw36IR5rsEQ/xuUxVTYenSNKwiG0aMpHLbzraygFw1OoaSKFzlri8ZBO4uYUecxF uqUbFLhLqzkbtIh97brBxDwUUcx10YqNMNJyHQhiVMPX6fqs4+AqlDTAKObDEhrryQHBhL KfbeAAtF/H0xJWs2ArpgVqWsU1AFK1D0H2lj89ejdKtgXPGl7epDf3C8Gn7l/C4v2ticvG GIOtPg+s01f6vmDE+tsqQ0d+z4YM9OPJa07NGQJ8m8iVjnfxLfBfW7w6nH5xFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XYrNv9/qpqPeTQSiuriwYtL15TDbXk9tBTPhchm1dA=; b=u+Bw2pLwCx1lPrQaCsfmKfDdSdJb4KbWrkO3ykMFPP4RoKmxCNPGt4M1Wezma9oAMfmC6e uP4RjqeIaBjkyx+Dv9z/Rz9NUmPqEzI3bAf0hUYrdcTFLFwB8AVOr4M99gmTeDqTcn2ieY I4FsWBRFYyG+Bod+s6Y1dJ4ipiMnLhXaTqJcP5sKuPY1EYxt8HJm6CTU8Mzpp08xbLzAcV V06z06yfnZAR5SgZ8DDDJsq62UoydpjawbFTzCMfsT/DJWlgpGestewb1Xd2Fhf+ohHnRv /szK5ll8CqPMQWZywBCvNBCT8tdzAS+K7+92RUV8hK5qgE5rtmA3zDwJjw0Rsg== 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 4WXLry0GCVzFJ6; Mon, 29 Jul 2024 01:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1nr4J091669; Mon, 29 Jul 2024 01:49:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1nrRg091666; Mon, 29 Jul 2024 01:49:53 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:49:53 GMT Message-Id: <202407290149.46T1nrRg091666@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: 0dd7789512a1 - main - vm: Remove kernel stack swapping support, part 2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0dd7789512a11019bc958efaaedfeada434dea8f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0dd7789512a11019bc958efaaedfeada434dea8f commit 0dd7789512a11019bc958efaaedfeada434dea8f Author: Mark Johnston AuthorDate: 2024-07-29 01:38:39 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:38:39 +0000 vm: Remove kernel stack swapping support, part 2 After mi_startup() finishes, thread0 becomes the "swapper", whose responsibility is to swap threads back in on demand. Now that threads can't be swapped out, there is no use for this thread. Just sleep forever once sysinits are finished; thread_exit() doesn't work because thread0 is allocated statically. The thread could be repurposed if that would be useful. Tested by: pho Reviewed by: alc, imp, kib Differential Revision: https://reviews.freebsd.org/D46113 --- sys/kern/init_main.c | 9 ++-- sys/vm/vm.h | 1 - sys/vm/vm_glue.c | 5 +- sys/vm/vm_swapout.c | 120 ---------------------------------------------- sys/vm/vm_swapout_dummy.c | 8 ---- 5 files changed, 8 insertions(+), 135 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 3e4f19d655e6..7386a0729835 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -256,7 +256,6 @@ symbol_name(vm_offset_t va, db_strategy_t strategy) void mi_startup(void) { - struct sysinit *sip; int last; #if defined(VERBOSE_SYSINIT) @@ -339,10 +338,12 @@ mi_startup(void) mtx_unlock(&Giant); /* - * Now hand over this thread to swapper. + * We can't free our thread structure since it is statically allocated. + * Just sleep forever. This thread could be repurposed for something if + * the need arises. */ - swapper(); - /* NOTREACHED*/ + for (;;) + tsleep(__builtin_frame_address(0), PNOLOCK, "parked", 0); } static void diff --git a/sys/vm/vm.h b/sys/vm/vm.h index b7d149a2fca2..d28c84dd1c95 100644 --- a/sys/vm/vm.h +++ b/sys/vm/vm.h @@ -170,7 +170,6 @@ bool swap_reserve_by_cred(vm_ooffset_t incr, struct ucred *cred); void swap_reserve_force(vm_ooffset_t incr); void swap_release(vm_ooffset_t decr); void swap_release_by_cred(vm_ooffset_t decr, struct ucred *cred); -void swapper(void); extern struct kva_md_info kmi; #define VA_IS_CLEANMAP(va) \ diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 4f8121fa1064..63417687a1a5 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -834,9 +834,10 @@ vm_waitproc(struct proc *p) vmspace_exitfree(p); /* and clean-out the vmspace */ } +/* + * This used to kick the thread which faults in threads. + */ void kick_proc0(void) { - - wakeup(&proc0); } diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c index 85708d61d849..b97f6904ab5a 100644 --- a/sys/vm/vm_swapout.c +++ b/sys/vm/vm_swapout.c @@ -564,126 +564,6 @@ faultin(struct proc *p) } } -/* - * This swapin algorithm attempts to swap-in processes only if there - * is enough space for them. Of course, if a process waits for a long - * time, it will be swapped in anyway. - */ - -static struct proc * -swapper_selector(bool wkilled_only) -{ - struct proc *p, *res; - struct thread *td; - int ppri, pri, slptime, swtime; - - sx_assert(&allproc_lock, SA_SLOCKED); - if (swapped_cnt == 0) - return (NULL); - res = NULL; - ppri = INT_MIN; - FOREACH_PROC_IN_SYSTEM(p) { - PROC_LOCK(p); - if (p->p_state == PRS_NEW || (p->p_flag & (P_SWAPPINGOUT | - P_SWAPPINGIN | P_INMEM)) != 0) { - PROC_UNLOCK(p); - continue; - } - if (p->p_state == PRS_NORMAL && (p->p_flag & P_WKILLED) != 0) { - /* - * A swapped-out process might have mapped a - * large portion of the system's pages as - * anonymous memory. There is no other way to - * release the memory other than to kill the - * process, for which we need to swap it in. - */ - return (p); - } - if (wkilled_only) { - PROC_UNLOCK(p); - continue; - } - swtime = (ticks - p->p_swtick) / hz; - FOREACH_THREAD_IN_PROC(p, td) { - /* - * An otherwise runnable thread of a process - * swapped out has only the TDI_SWAPPED bit set. - */ - thread_lock(td); - if (td->td_inhibitors == TDI_SWAPPED) { - slptime = (ticks - td->td_slptick) / hz; - pri = swtime + slptime; - if ((td->td_flags & TDF_SWAPINREQ) == 0) - pri -= p->p_nice * 8; - /* - * if this thread is higher priority - * and there is enough space, then select - * this process instead of the previous - * selection. - */ - if (pri > ppri) { - res = p; - ppri = pri; - } - } - thread_unlock(td); - } - PROC_UNLOCK(p); - } - - if (res != NULL) - PROC_LOCK(res); - return (res); -} - -#define SWAPIN_INTERVAL (MAXSLP * hz / 2) - -/* - * Limit swapper to swap in one non-WKILLED process in MAXSLP/2 - * interval, assuming that there is: - * - at least one domain that is not suffering from a shortage of free memory; - * - no parallel swap-ins; - * - no other swap-ins in the current SWAPIN_INTERVAL. - */ -static bool -swapper_wkilled_only(void) -{ - - return (vm_page_count_min_set(&all_domains) || swap_inprogress > 0 || - (u_int)(ticks - last_swapin) < SWAPIN_INTERVAL); -} - -void -swapper(void) -{ - struct proc *p; - - for (;;) { - sx_slock(&allproc_lock); - p = swapper_selector(swapper_wkilled_only()); - sx_sunlock(&allproc_lock); - - if (p == NULL) { - tsleep(&proc0, PVM, "swapin", SWAPIN_INTERVAL); - } else { - PROC_LOCK_ASSERT(p, MA_OWNED); - - /* - * Another process may be bringing or may have - * already brought this process in while we - * traverse all threads. Or, this process may - * have exited or even being swapped out - * again. - */ - if (p->p_state == PRS_NORMAL && (p->p_flag & (P_INMEM | - P_SWAPPINGOUT | P_SWAPPINGIN)) == 0) { - faultin(p); - } - PROC_UNLOCK(p); - } - } -} - static void swapclear(struct proc *p) { diff --git a/sys/vm/vm_swapout_dummy.c b/sys/vm/vm_swapout_dummy.c index 0e0a268c8c46..7697a86f9d0b 100644 --- a/sys/vm/vm_swapout_dummy.c +++ b/sys/vm/vm_swapout_dummy.c @@ -99,11 +99,3 @@ faultin(struct proc *p) if ((p->p_flag & P_INMEM) == 0) panic("faultin: proc %p swapped out with NO_SWAPPING", p); } - -void -swapper(void) -{ - - for (;;) - tsleep(&proc0, PVM, "swapin", MAXSLP * hz); -} From nobody Mon Jul 29 01:49:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLrz4xwQz5S7DP; Mon, 29 Jul 2024 01:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLrz2G0qz4nfD; Mon, 29 Jul 2024 01:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jdfH5ekC43K5S9z1hfRw+2O6wHbi8mmEk6xE7KvVVEs=; b=F0jhdPTmZuP2KVhq6A7wyaBpVt3IXuQ/X402pTR5p9yujg3KaV6TccqGVGIP0emXRW7HZX 7d1QGTp1Vmr57LSltXrnAOobml7R/IX7mzDc5PDLctw2f0CPppOghbQHSqtGcMloBF2xAQ xe7+24IX55sBufDbWkMD6QVDGu//VXgoGvtzcuER7r2tDLfw4rVlTuF6l6NlD3Jl6mKLVP oUn2OWHFcUluLsyxGrzijbEh8NizcnxpTRu5tlnnfXnoddGXI4h2I4vurBD+OnBNjkCmtC i79dfiLJbKHc8fiAMEgQR5twmCxEhKoeS9rynXoqhAerJxiBCDMb/Li5KChvLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217795; a=rsa-sha256; cv=none; b=R//BhOkiyEydHRORK4IMZ7/8v6yY7XyittrOggdLV+yrXydF5mrCBryI22y/sBdgHooWIV IP7716hFYshjSNdoVoEpHuCmFVQPvHBBjj9G8U1cOJQYpq0z5vB1uMbNRVYwkiR8cVFOoA jZ8oot6jMsRqRShlxs2zWmBo+n4fFnuH5yLWrs+Zrz8VZN9NDYAFscqvRgQnm/yjyEyU4B JbAwMmXw3JetAQscfbDcksytgr4dTcD7fy4Lzt3EUtfa45tL+N3KVLc4BxJOXeT2CCRNAC KWbMw2rNPTooWoqCSOVjFkZj1GAfddK7hylB2xdwvMYJRi2zvFg0YL/KhJY23w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jdfH5ekC43K5S9z1hfRw+2O6wHbi8mmEk6xE7KvVVEs=; b=DFEtBxToL5zs/cp9Sp7fxQxYVp8yf4xZHSbO34+91wXyzvI4P6pJazfw34p+hbmsccm4Br 93qc5oRj9Tt6QCjnB69v+Q3ZQtbnVSpcbwygW9gy2VaZ859XH/0MfmU+H8/2kF+8Pyr8uP 7E96ezdNCUIBlt5jjlSErhCtnVUWqKuyzahE7AnSANWlAnzanBehaFUEaL2V6YagM4kMph zHWT1OQYUzqq8wHzdNG7D9nGdvi1o2zjKCds6DIRDkjXYnQYh2MDwYWjQgYbxSAAhbpKF7 aZRIdzLLnXU9y5UwSpmridJ+GufSOo8gEzVRjyFqOFPaFgZIadPdAhDLeAwKVQ== 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 4WXLrz1FjDzFLW; Mon, 29 Jul 2024 01:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1nt0F091732; Mon, 29 Jul 2024 01:49:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1ntqw091729; Mon, 29 Jul 2024 01:49:55 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:49:55 GMT Message-Id: <202407290149.46T1ntqw091729@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: 8370e9dfa188 - main - vm: Remove kernel stack swapping support, part 3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8370e9dfa188da4716c209a475e360d2b1a842f7 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8370e9dfa188da4716c209a475e360d2b1a842f7 commit 8370e9dfa188da4716c209a475e360d2b1a842f7 Author: Mark Johnston AuthorDate: 2024-07-29 01:39:49 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:39:49 +0000 vm: Remove kernel stack swapping support, part 3 - Modify PHOLD() to no longer fault in the process. - Remove _PHOLD_LITE(), which is now the same as _PHOLD(), fix up consumers. - Remove faultin() and its callees. Tested by: pho Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D46114 --- .../opensolaris/uts/intel/dtrace/fasttrap_isa.c | 2 +- sys/fs/tmpfs/tmpfs_vfsops.c | 2 +- sys/kern/kern_procctl.c | 4 +- sys/sys/proc.h | 23 +--- sys/vm/vm_pageout.c | 2 +- sys/vm/vm_swapout.c | 140 +-------------------- sys/vm/vm_swapout_dummy.c | 9 -- 7 files changed, 10 insertions(+), 172 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c index 43766f52bfe7..a65f6720bd0e 100644 --- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c +++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c @@ -981,7 +981,7 @@ fasttrap_pid_probe(struct trapframe *tf) sx_sunlock(&proctree_lock); return (-1); } - _PHOLD_LITE(pp); + _PHOLD(pp); PROC_UNLOCK(pp); } sx_sunlock(&proctree_lock); diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 32eb9c958df1..dd48a24dab2f 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -208,7 +208,7 @@ again: continue; } vm = vmspace_acquire_ref(p); - _PHOLD_LITE(p); + _PHOLD(p); PROC_UNLOCK(p); if (vm == NULL) { PRELE(p); diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 2c8c638a2956..888feb94bb8d 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -337,7 +337,7 @@ reap_kill_sched(struct reap_kill_tracker_head *tracker, struct proc *p2) PROC_UNLOCK(p2); return; } - _PHOLD_LITE(p2); + _PHOLD(p2); PROC_UNLOCK(p2); t = malloc(sizeof(struct reap_kill_tracker), M_TEMP, M_WAITOK); t->parent = p2; @@ -463,7 +463,7 @@ reap_kill_subtree_once(struct thread *td, struct proc *p, struct proc *reaper, } else { PROC_LOCK(p2); if ((p2->p_flag2 & P2_WEXIT) == 0) { - _PHOLD_LITE(p2); + _PHOLD(p2); p2->p_flag2 |= P2_REAPKILLED; PROC_UNLOCK(p2); w->target = p2; diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 1b542d1374b4..c492cd10e712 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -704,7 +704,7 @@ struct proc { struct vnode *p_textvp; /* (b) Vnode of executable. */ struct vnode *p_textdvp; /* (b) Dir containing textvp. */ char *p_binname; /* (b) Binary hardlink name. */ - u_int p_lock; /* (c) Proclock (prevent swap) count. */ + u_int p_lock; /* (c) Prevent exit. */ struct sigiolst p_sigiolst; /* (c) List of sigio sources. */ int p_sigparent; /* (c) Signal to parent on exit. */ int p_sig; /* (n) For core dump/debugger XXX. */ @@ -986,18 +986,12 @@ extern pid_t pid_max; #define SESS_LOCK_ASSERT(s, type) mtx_assert(&(s)->s_mtx, (type)) /* - * Non-zero p_lock ensures that: - * - exit1() is not performed until p_lock reaches zero; - * - the process' threads stack are not swapped out if they are currently - * not (P_INMEM). + * A non-zero p_lock prevents the process from exiting; it will sleep in exit1() + * until the count reaches zero. * * PHOLD() asserts that the process (except the current process) is - * not exiting, increments p_lock and swaps threads stacks into memory, - * if needed. + * not exiting and increments p_lock. * _PHOLD() is same as PHOLD(), it takes the process locked. - * _PHOLD_LITE() also takes the process locked, but comparing with - * _PHOLD(), it only guarantees that exit1() is not executed, - * faultin() is not called. */ #define PHOLD(p) do { \ PROC_LOCK(p); \ @@ -1009,14 +1003,6 @@ extern pid_t pid_max; KASSERT(!((p)->p_flag & P_WEXIT) || (p) == curproc, \ ("PHOLD of exiting process %p", p)); \ (p)->p_lock++; \ - if (((p)->p_flag & P_INMEM) == 0) \ - faultin((p)); \ -} while (0) -#define _PHOLD_LITE(p) do { \ - PROC_LOCK_ASSERT((p), MA_OWNED); \ - KASSERT(!((p)->p_flag & P_WEXIT) || (p) == curproc, \ - ("PHOLD of exiting process %p", p)); \ - (p)->p_lock++; \ } while (0) #define PROC_ASSERT_HELD(p) do { \ KASSERT((p)->p_lock > 0, ("process %p not held", p)); \ @@ -1174,7 +1160,6 @@ int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess); int enterthispgrp(struct proc *p, struct pgrp *pgrp); -void faultin(struct proc *p); int fork1(struct thread *, struct fork_req *); void fork_exit(void (*)(void *, struct trapframe *), void *, struct trapframe *); diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index cdc97637bbef..e32d27f2300a 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1980,7 +1980,7 @@ vm_pageout_oom(int shortage) PROC_UNLOCK(p); continue; } - _PHOLD_LITE(p); + _PHOLD(p); PROC_UNLOCK(p); sx_sunlock(&allproc_lock); if (!vm_map_trylock_read(&vm->vm_map)) { diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c index b97f6904ab5a..1f3b3a8532f1 100644 --- a/sys/vm/vm_swapout.c +++ b/sys/vm/vm_swapout.c @@ -159,11 +159,6 @@ static struct mtx vm_daemon_mtx; /* Allow for use by vm_pageout before vm_daemon is initialized. */ MTX_SYSINIT(vm_daemon, &vm_daemon_mtx, "vm daemon", MTX_DEF); -static int swapped_cnt; -static int swap_inprogress; /* Pending swap-ins done outside swapper. */ -static int last_swapin; - -static void swapclear(struct proc *); static void vm_swapout_map_deactivate_pages(vm_map_t, long); static void vm_swapout_object_deactivate(pmap_t, vm_object_t, long); @@ -396,7 +391,7 @@ again: if ((p->p_flag & P_INMEM) == 0) limit = 0; /* XXX */ vm = vmspace_acquire_ref(p); - _PHOLD_LITE(p); + _PHOLD(p); PROC_UNLOCK(p); if (vm == NULL) { PRELE(p); @@ -460,136 +455,3 @@ again: } } } - -/* - * Bring the kernel stack for a specified thread back in. - */ -static void -vm_thread_swapin(struct thread *td, int oom_alloc) -{ - vm_page_t ma[KSTACK_MAX_PAGES]; - vm_offset_t kaddr; - vm_object_t obj; - int a, count, i, j, pages, rv __diagused; - - kaddr = td->td_kstack; - pages = td->td_kstack_pages; - obj = vm_thread_kstack_size_to_obj(pages); - while (vm_thread_stack_back(kaddr, ma, pages, oom_alloc, - td->td_kstack_domain) == ENOMEM) - ; - for (i = 0; i < pages;) { - vm_page_assert_xbusied(ma[i]); - if (vm_page_all_valid(ma[i])) { - i++; - continue; - } - vm_object_pip_add(obj, 1); - for (j = i + 1; j < pages; j++) - if (vm_page_all_valid(ma[j])) - break; - VM_OBJECT_WLOCK(obj); - rv = vm_pager_has_page(obj, ma[i]->pindex, NULL, &a); - VM_OBJECT_WUNLOCK(obj); - KASSERT(rv == 1, ("%s: missing page %p", __func__, ma[i])); - count = min(a + 1, j - i); - rv = vm_pager_get_pages(obj, ma + i, count, NULL, NULL); - KASSERT(rv == VM_PAGER_OK, ("%s: cannot get kstack for proc %d", - __func__, td->td_proc->p_pid)); - vm_object_pip_wakeup(obj); - i += count; - } - pmap_qenter(kaddr, ma, pages); - cpu_thread_swapin(td); -} - -void -faultin(struct proc *p) -{ - struct thread *td; - int oom_alloc; - - PROC_LOCK_ASSERT(p, MA_OWNED); - - /* - * If another process is swapping in this process, - * just wait until it finishes. - */ - if (p->p_flag & P_SWAPPINGIN) { - while (p->p_flag & P_SWAPPINGIN) - msleep(&p->p_flag, &p->p_mtx, PVM, "faultin", 0); - return; - } - - if ((p->p_flag & P_INMEM) == 0) { - oom_alloc = (p->p_flag & P_WKILLED) != 0 ? VM_ALLOC_SYSTEM : - VM_ALLOC_NORMAL; - - /* - * Don't let another thread swap process p out while we are - * busy swapping it in. - */ - ++p->p_lock; - p->p_flag |= P_SWAPPINGIN; - PROC_UNLOCK(p); - sx_xlock(&allproc_lock); - MPASS(swapped_cnt > 0); - swapped_cnt--; - if (curthread != &thread0) - swap_inprogress++; - sx_xunlock(&allproc_lock); - - /* - * We hold no lock here because the list of threads - * can not change while all threads in the process are - * swapped out. - */ - FOREACH_THREAD_IN_PROC(p, td) - vm_thread_swapin(td, oom_alloc); - - if (curthread != &thread0) { - sx_xlock(&allproc_lock); - MPASS(swap_inprogress > 0); - swap_inprogress--; - last_swapin = ticks; - sx_xunlock(&allproc_lock); - } - PROC_LOCK(p); - swapclear(p); - p->p_swtick = ticks; - - /* Allow other threads to swap p out now. */ - wakeup(&p->p_flag); - --p->p_lock; - } -} - -static void -swapclear(struct proc *p) -{ - struct thread *td; - - PROC_LOCK_ASSERT(p, MA_OWNED); - - FOREACH_THREAD_IN_PROC(p, td) { - thread_lock(td); - td->td_flags |= TDF_INMEM; - td->td_flags &= ~TDF_SWAPINREQ; - TD_CLR_SWAPPED(td); - if (TD_CAN_RUN(td)) { - if (setrunnable(td, 0)) { -#ifdef INVARIANTS - /* - * XXX: We just cleared TDI_SWAPPED - * above and set TDF_INMEM, so this - * should never happen. - */ - panic("not waking up swapper"); -#endif - } - } else - thread_unlock(td); - } - p->p_flag &= ~(P_SWAPPINGIN | P_SWAPPINGOUT); - p->p_flag |= P_INMEM; -} diff --git a/sys/vm/vm_swapout_dummy.c b/sys/vm/vm_swapout_dummy.c index 7697a86f9d0b..6fe15ad44f11 100644 --- a/sys/vm/vm_swapout_dummy.c +++ b/sys/vm/vm_swapout_dummy.c @@ -90,12 +90,3 @@ static int vm_swap_idle_enabled = 0; SYSCTL_INT(_vm, OID_AUTO, swap_idle_enabled, CTLFLAG_RD, &vm_swap_idle_enabled, 0, "Allow swapout on idle criteria"); - -void -faultin(struct proc *p) -{ - - PROC_LOCK_ASSERT(p, MA_OWNED); - if ((p->p_flag & P_INMEM) == 0) - panic("faultin: proc %p swapped out with NO_SWAPPING", p); -} From nobody Mon Jul 29 01:49:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs05JCRz5S7Qk; Mon, 29 Jul 2024 01:49: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs02W0rz4nX1; Mon, 29 Jul 2024 01:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeGlTYtXUI7Oz1eW3jSqgC5KJQ/oA4h66Pz4ATQFfZk=; b=uENe1V9k5LkAyP04E9lknIrgQ2JvBIYgF/GZ5aAtK7tD628CsaNTHFjdHOMuX24pRHxR0+ RpWCtKWJxrV+B0SuPu1nwrfaHGBmaM0rzF8DjeND63yypobTXMZ6pRwHpkB1Q9zAYsQ8St BVi5QTobeOPXu+0Ghk6ZGPeHAURM4chI3DmeCQDWO60/CDKe64DlcbRxYOujLR2y/Z2ZyN WN2zL/Wne6vsvb/En3Z/2hWX98wirXaHBMQOUuDfHQT7+jbgus0vTpDjxDgAj8LC++ca1W Ueb1/IGXycUYRXUeXy788P9daWX41Hgb4sEOgPWAlBJyj6oiqpiZSPKk0PDPpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217796; a=rsa-sha256; cv=none; b=tw6QJLhMBIzLHsdKkM3XQ7JgUnGGGlNbkfTcA9UI6dV4VMhBL6BdVQuKiRDBvvcbY+KueA FrmaI9yubMXNg6YfSyeUQ6qp5sPnppJquHJVVm1FpBNe2JLCyQ4XwS9e9n+pBn3yH9PUMR eC/fuWNc3vAivYOL9a1YfKKIEI4B8BxP/ikqTTG0YjM+Wt3CVwLAAmzaqRsTOrAjmTrjVU aEl24FIUUKaQe8dYM5yRU4vD8lvi5CtU8Cav+Px/lVtqdivuUQ3Vg+cseIMSSq9dbY6VHb BAgkYWkLuhwjO6DVdFTPVx02IgQiVCX+jSPXs4Ko6wmenN3bKvkGVkdyigHnaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeGlTYtXUI7Oz1eW3jSqgC5KJQ/oA4h66Pz4ATQFfZk=; b=JvrcWWPt0iSV0M4XXGBYO23ojZrq30oS++5H/o1upJOxhgubdCgqHeL/7q0x+Pn6YmyKhe Al03C2Sv40+du1TJwXGq9l5sm8SE9/h+cGKDkD/TRD+kXiKh12GLgZHlGH73lSnnc439Ae aiBZVLoyH0gq4Bwe85pdvrpgKFRESiETVGGoF2yA/Plr1E0YFKLuRSh5OJZ088rE06FiUX 8oqwlZDSYuLj6EoGGUx1Q5XLKgp3NT2Iejrs1oYZO/LHLF+L8dG/dF+ijuAwa0PLH+bNsM lnzKBo4/KTz0UabOoZsH5tAWQt00SqNiPe+G+FIbPFScahW3HruRdtt2MCpKLA== 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 4WXLs0244kzF33; Mon, 29 Jul 2024 01:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1nuSU091783; Mon, 29 Jul 2024 01:49:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1nuhb091780; Mon, 29 Jul 2024 01:49:56 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:49:56 GMT Message-Id: <202407290149.46T1nuhb091780@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: e24a65528388 - main - thread: Remove kernel stack swapping support, part 4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e24a65528388f4debfb12e936f314f85ba6ac407 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e24a65528388f4debfb12e936f314f85ba6ac407 commit e24a65528388f4debfb12e936f314f85ba6ac407 Author: Mark Johnston AuthorDate: 2024-07-29 01:40:22 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:40:22 +0000 thread: Remove kernel stack swapping support, part 4 - Remove the IS_SWAPPED thread inhibitor state. - Remove all uses of TD_IS_SWAPPED() in the kernel. - Remove the TDF_CANSWAP flag. - Remove the P_SWAPPINGOUT and P_SWAPPINGIN flags. Tested by: pho Reviewed by: alc, imp, kib Differential Revision: https://reviews.freebsd.org/D46115 --- sys/arm/arm/stack_machdep.c | 2 -- sys/arm64/arm64/stack_machdep.c | 2 -- sys/ddb/db_ps.c | 8 -------- sys/gdb/gdb_main.c | 2 -- sys/kern/kern_proc.c | 10 +++------- sys/kern/kern_sig.c | 13 ++----------- sys/kern/kern_synch.c | 25 +++++-------------------- sys/kern/sched_4bsd.c | 3 --- sys/kern/sched_ule.c | 3 --- sys/kern/tty_info.c | 8 ++------ sys/powerpc/powerpc/stack_machdep.c | 2 -- sys/riscv/riscv/stack_machdep.c | 2 -- sys/sys/proc.h | 19 +++++-------------- sys/sys/user.h | 2 +- sys/vm/vm_meter.c | 4 +--- sys/vm/vm_pageout.c | 3 +-- sys/x86/x86/stack_machdep.c | 2 -- 17 files changed, 20 insertions(+), 90 deletions(-) diff --git a/sys/arm/arm/stack_machdep.c b/sys/arm/arm/stack_machdep.c index 3fc42d4524ae..7dcf5583d866 100644 --- a/sys/arm/arm/stack_machdep.c +++ b/sys/arm/arm/stack_machdep.c @@ -69,8 +69,6 @@ stack_save_td(struct stack *st, struct thread *td) struct unwind_state state; THREAD_LOCK_ASSERT(td, MA_OWNED); - KASSERT(!TD_IS_SWAPPED(td), - ("stack_save_td: thread %p is swapped", td)); if (TD_IS_RUNNING(td)) return (EOPNOTSUPP); diff --git a/sys/arm64/arm64/stack_machdep.c b/sys/arm64/arm64/stack_machdep.c index e5e105aeb955..fde975ffc7d2 100644 --- a/sys/arm64/arm64/stack_machdep.c +++ b/sys/arm64/arm64/stack_machdep.c @@ -59,8 +59,6 @@ stack_save_td(struct stack *st, struct thread *td) struct unwind_state frame; THREAD_LOCK_ASSERT(td, MA_OWNED); - KASSERT(!TD_IS_SWAPPED(td), - ("stack_save_td: thread %p is swapped", td)); if (TD_IS_RUNNING(td)) return (EOPNOTSUPP); diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index cc2eded87c77..9bccb46f989c 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -290,8 +290,6 @@ dumpthread(volatile struct proc *p, volatile struct thread *td, int all) else strlcat(state, "D", sizeof(state)); } - if (TD_IS_SWAPPED(td)) - strlcat(state, "W", sizeof(state)); if (TD_AWAITING_INTR(td)) strlcat(state, "I", sizeof(state)); if (TD_IS_SUSPENDED(td)) @@ -393,12 +391,6 @@ DB_SHOW_COMMAND(thread, db_show_thread) db_printf("SUSPENDED"); comma = true; } - if (TD_IS_SWAPPED(td)) { - if (comma) - db_printf(", "); - db_printf("SWAPPED"); - comma = true; - } if (TD_ON_LOCK(td)) { if (comma) db_printf(", "); diff --git a/sys/gdb/gdb_main.c b/sys/gdb/gdb_main.c index 3e8ada42adac..8ba8b14fd4b1 100644 --- a/sys/gdb/gdb_main.c +++ b/sys/gdb/gdb_main.c @@ -522,8 +522,6 @@ do_qXfer_threads_read(void) sbuf_cat(&ctx.qXfer.sb, "Blocked"); else if (TD_IS_SLEEPING(ctx.iter)) sbuf_cat(&ctx.qXfer.sb, "Sleeping"); - else if (TD_IS_SWAPPED(ctx.iter)) - sbuf_cat(&ctx.qXfer.sb, "Swapped"); else if (TD_AWAITING_INTR(ctx.iter)) sbuf_cat(&ctx.qXfer.sb, "IthreadWait"); else if (TD_IS_SUSPENDED(ctx.iter)) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 52b361832218..280ad3facd3a 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1140,10 +1140,8 @@ fill_kinfo_proc_only(struct proc *p, struct kinfo_proc *kp) kp->ki_size = vm->vm_map.size; kp->ki_rssize = vmspace_resident_count(vm); /*XXX*/ - FOREACH_THREAD_IN_PROC(p, td0) { - if (!TD_IS_SWAPPED(td0)) - kp->ki_rssize += td0->td_kstack_pages; - } + FOREACH_THREAD_IN_PROC(p, td0) + kp->ki_rssize += td0->td_kstack_pages; kp->ki_swrss = vm->vm_swrss; kp->ki_tsize = vm->vm_tsize; kp->ki_dsize = vm->vm_dsize; @@ -2869,9 +2867,7 @@ sysctl_kern_proc_kstack(SYSCTL_HANDLER_ARGS) sizeof(kkstp->kkst_trace), SBUF_FIXEDLEN); thread_lock(td); kkstp->kkst_tid = td->td_tid; - if (TD_IS_SWAPPED(td)) - kkstp->kkst_state = KKST_STATE_SWAPPED; - else if (stack_save_td(st, td) == 0) + if (stack_save_td(st, td) == 0) kkstp->kkst_state = KKST_STATE_STACKOK; else kkstp->kkst_state = KKST_STATE_RUNNING; diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 7ac9dcb8cb40..46f7b29837e4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2791,8 +2791,7 @@ sig_suspend_threads(struct thread *td, struct proc *p) FOREACH_THREAD_IN_PROC(p, td2) { thread_lock(td2); ast_sched_locked(td2, TDA_SUSPEND); - if ((TD_IS_SLEEPING(td2) || TD_IS_SWAPPED(td2)) && - (td2->td_flags & TDF_SINTR)) { + if (TD_IS_SLEEPING(td2) && (td2->td_flags & TDF_SINTR) != 0) { if (td2->td_flags & TDF_SBDRY) { /* * Once a thread is asleep with @@ -3579,16 +3578,8 @@ proc_wkilled(struct proc *p) { PROC_LOCK_ASSERT(p, MA_OWNED); - if ((p->p_flag & P_WKILLED) == 0) { + if ((p->p_flag & P_WKILLED) == 0) p->p_flag |= P_WKILLED; - /* - * Notify swapper that there is a process to swap in. - * The notification is racy, at worst it would take 10 - * seconds for the swapper process to notice. - */ - if ((p->p_flag & (P_INMEM | P_SWAPPINGIN)) == 0) - wakeup(&proc0); - } } /* diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index c7258b3cffa5..25bca094b400 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -558,25 +558,23 @@ mi_switch(int flags) } /* - * Change thread state to be runnable, placing it on the run queue if - * it is in memory. If it is swapped out, return true so our caller - * will know to awaken the swapper. + * Change thread state to be runnable, placing it on the run queue. * * Requires the thread lock on entry, drops on exit. */ int setrunnable(struct thread *td, int srqflags) { - int swapin; - THREAD_LOCK_ASSERT(td, MA_OWNED); KASSERT(td->td_proc->p_state != PRS_ZOMBIE, ("setrunnable: pid %d is a zombie", td->td_proc->p_pid)); - swapin = 0; switch (TD_GET_STATE(td)) { case TDS_RUNNING: case TDS_RUNQ: + case TDS_INHIBITED: + if ((srqflags & (SRQ_HOLD | SRQ_HOLDTD)) == 0) + thread_unlock(td); break; case TDS_CAN_RUN: KASSERT((td->td_flags & TDF_INMEM) != 0, @@ -584,25 +582,12 @@ setrunnable(struct thread *td, int srqflags) td, td->td_flags, td->td_inhibitors)); /* unlocks thread lock according to flags */ sched_wakeup(td, srqflags); - return (0); - case TDS_INHIBITED: - /* - * If we are only inhibited because we are swapped out - * arrange to swap in this process. - */ - if (td->td_inhibitors == TDI_SWAPPED && - (td->td_flags & TDF_SWAPINREQ) == 0) { - td->td_flags |= TDF_SWAPINREQ; - swapin = 1; - } break; default: panic("setrunnable: state 0x%x", TD_GET_STATE(td)); } - if ((srqflags & (SRQ_HOLD | SRQ_HOLDTD)) == 0) - thread_unlock(td); - return (swapin); + return (0); } /* diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index ff1e57746404..6d94cc7f8ed1 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -998,8 +998,6 @@ sched_sleep(struct thread *td, int pri) td_get_sched(td)->ts_slptime = 0; if (pri != 0 && PRI_BASE(td->td_pri_class) == PRI_TIMESHARE) sched_prio(td, pri); - if (TD_IS_SUSPENDED(td) || pri >= PSOCK) - td->td_flags |= TDF_CANSWAP; } void @@ -1137,7 +1135,6 @@ sched_wakeup(struct thread *td, int srqflags) THREAD_LOCK_ASSERT(td, MA_OWNED); ts = td_get_sched(td); - td->td_flags &= ~TDF_CANSWAP; if (ts->ts_slptime > 1) { updatepri(td); resetpriority(td); diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 502802047cd4..39cb648c2216 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -2334,8 +2334,6 @@ sched_sleep(struct thread *td, int prio) THREAD_LOCK_ASSERT(td, MA_OWNED); td->td_slptick = ticks; - if (TD_IS_SUSPENDED(td) || prio >= PSOCK) - td->td_flags |= TDF_CANSWAP; if (PRI_BASE(td->td_pri_class) != PRI_TIMESHARE) return; if (static_boost == 1 && prio) @@ -2358,7 +2356,6 @@ sched_wakeup(struct thread *td, int srqflags) THREAD_LOCK_ASSERT(td, MA_OWNED); ts = td_get_sched(td); - td->td_flags &= ~TDF_CANSWAP; /* * If we slept for more than a tick update our interactivity and diff --git a/sys/kern/tty_info.c b/sys/kern/tty_info.c index f54fc3a30f5e..638180292f67 100644 --- a/sys/kern/tty_info.c +++ b/sys/kern/tty_info.c @@ -369,12 +369,8 @@ tty_info(struct tty *tp) kstacks_val = atomic_load_int(&tty_info_kstacks); print_kstacks = (kstacks_val != STACK_SBUF_FMT_NONE); - if (print_kstacks) { - if (TD_IS_SWAPPED(td)) - sterr = ENOENT; - else - sterr = stack_save_td(&stack, td); - } + if (print_kstacks) + sterr = stack_save_td(&stack, td); #endif thread_unlock(td); if (p->p_state == PRS_NEW || p->p_state == PRS_ZOMBIE) diff --git a/sys/powerpc/powerpc/stack_machdep.c b/sys/powerpc/powerpc/stack_machdep.c index 2d1a45c71c5a..b34d97958cd9 100644 --- a/sys/powerpc/powerpc/stack_machdep.c +++ b/sys/powerpc/powerpc/stack_machdep.c @@ -91,8 +91,6 @@ stack_save_td(struct stack *st, struct thread *td) vm_offset_t frame; THREAD_LOCK_ASSERT(td, MA_OWNED); - KASSERT(!TD_IS_SWAPPED(td), - ("stack_save_td: thread %p is swapped", td)); if (TD_IS_RUNNING(td)) return (EOPNOTSUPP); diff --git a/sys/riscv/riscv/stack_machdep.c b/sys/riscv/riscv/stack_machdep.c index 25ddf6ddfa0b..92d82220a9be 100644 --- a/sys/riscv/riscv/stack_machdep.c +++ b/sys/riscv/riscv/stack_machdep.c @@ -65,8 +65,6 @@ stack_save_td(struct stack *st, struct thread *td) struct unwind_state frame; THREAD_LOCK_ASSERT(td, MA_OWNED); - KASSERT(!TD_IS_SWAPPED(td), - ("stack_save_td: thread %p is swapped", td)); if (TD_IS_RUNNING(td)) return (EOPNOTSUPP); diff --git a/sys/sys/proc.h b/sys/sys/proc.h index c492cd10e712..167ac275c920 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -452,7 +452,7 @@ do { \ #define TDF_SINTR 0x00000008 /* Sleep is interruptible. */ #define TDF_TIMEOUT 0x00000010 /* Timing out during sleep. */ #define TDF_IDLETD 0x00000020 /* This is a per-CPU idle thread. */ -#define TDF_CANSWAP 0x00000040 /* Thread can be swapped. */ +#define TDF_UNUSED11 0x00000040 /* Available */ #define TDF_SIGWAIT 0x00000080 /* Ignore ignored signals */ #define TDF_KTH_SUSP 0x00000100 /* kthread is suspended */ #define TDF_ALLPROCSUSP 0x00000200 /* suspended by SINGLE_ALLPROC */ @@ -468,7 +468,7 @@ do { \ #define TDF_SERESTART 0x00080000 /* ERESTART on stop attempts. */ #define TDF_THRWAKEUP 0x00100000 /* Libthr thread must not suspend itself. */ #define TDF_SEINTR 0x00200000 /* EINTR on stop attempts. */ -#define TDF_SWAPINREQ 0x00400000 /* Swapin request due to wakeup. */ +#define TDF_UNUSED12 0x00400000 /* Available */ #define TDF_UNUSED6 0x00800000 /* Available */ #define TDF_SCHED0 0x01000000 /* Reserved for scheduler private use */ #define TDF_SCHED1 0x02000000 /* Reserved for scheduler private use */ @@ -574,14 +574,12 @@ enum { */ #define TDI_SUSPENDED 0x0001 /* On suspension queue. */ #define TDI_SLEEPING 0x0002 /* Actually asleep! (tricky). */ -#define TDI_SWAPPED 0x0004 /* Stack not in mem. Bad juju if run. */ #define TDI_LOCK 0x0008 /* Stopped on a lock. */ #define TDI_IWAIT 0x0010 /* Awaiting interrupt. */ #define TD_IS_SLEEPING(td) ((td)->td_inhibitors & TDI_SLEEPING) #define TD_ON_SLEEPQ(td) ((td)->td_wchan != NULL) #define TD_IS_SUSPENDED(td) ((td)->td_inhibitors & TDI_SUSPENDED) -#define TD_IS_SWAPPED(td) ((td)->td_inhibitors & TDI_SWAPPED) #define TD_ON_LOCK(td) ((td)->td_inhibitors & TDI_LOCK) #define TD_AWAITING_INTR(td) ((td)->td_inhibitors & TDI_IWAIT) #ifdef _KERNEL @@ -602,7 +600,6 @@ enum { #define KTDSTATE(td) \ (((td)->td_inhibitors & TDI_SLEEPING) != 0 ? "sleep" : \ ((td)->td_inhibitors & TDI_SUSPENDED) != 0 ? "suspended" : \ - ((td)->td_inhibitors & TDI_SWAPPED) != 0 ? "swapped" : \ ((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \ ((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding") @@ -618,14 +615,12 @@ enum { } while (0) #define TD_SET_SLEEPING(td) TD_SET_INHIB((td), TDI_SLEEPING) -#define TD_SET_SWAPPED(td) TD_SET_INHIB((td), TDI_SWAPPED) #define TD_SET_LOCK(td) TD_SET_INHIB((td), TDI_LOCK) #define TD_SET_SUSPENDED(td) TD_SET_INHIB((td), TDI_SUSPENDED) #define TD_SET_IWAIT(td) TD_SET_INHIB((td), TDI_IWAIT) #define TD_SET_EXITING(td) TD_SET_INHIB((td), TDI_EXITING) #define TD_CLR_SLEEPING(td) TD_CLR_INHIB((td), TDI_SLEEPING) -#define TD_CLR_SWAPPED(td) TD_CLR_INHIB((td), TDI_SWAPPED) #define TD_CLR_LOCK(td) TD_CLR_INHIB((td), TDI_LOCK) #define TD_CLR_SUSPENDED(td) TD_CLR_INHIB((td), TDI_SUSPENDED) #define TD_CLR_IWAIT(td) TD_CLR_INHIB((td), TDI_IWAIT) @@ -816,8 +811,7 @@ struct proc { shortcuts) */ #define P_SUGID 0x00000100 /* Had set id privileges since last exec. */ -#define P_SYSTEM 0x00000200 /* System proc: no sigs, stats or - swapping. */ +#define P_SYSTEM 0x00000200 /* System proc: no sigs or stats. */ #define P_SINGLE_EXIT 0x00000400 /* Threads suspending should exit, not wait. */ #define P_TRACED 0x00000800 /* Debugged process being traced. */ @@ -842,8 +836,8 @@ struct proc { #define P_INEXEC 0x04000000 /* Process is in execve(). */ #define P_STATCHILD 0x08000000 /* Child process stopped or exited. */ #define P_INMEM 0x10000000 /* Loaded into memory. */ -#define P_SWAPPINGOUT 0x20000000 /* Process is being swapped out. */ -#define P_SWAPPINGIN 0x40000000 /* Process is being swapped in. */ +#define P_UNUSED1 0x20000000 /* --available-- */ +#define P_UNUSED2 0x40000000 /* --available-- */ #define P_PPTRACE 0x80000000 /* PT_TRACEME by vforked child. */ #define P_STOPPED (P_STOPPED_SIG|P_STOPPED_SINGLE|P_STOPPED_TRACE) @@ -1038,9 +1032,6 @@ extern pid_t pid_max; _p->p_cowgen - _td->td_cowgen; \ }) -/* Check whether a thread is safe to be swapped out. */ -#define thread_safetoswapout(td) ((td)->td_flags & TDF_CANSWAP) - /* Control whether or not it is safe for curthread to sleep. */ #define THREAD_NO_SLEEPING() do { \ curthread->td_no_sleeping++; \ diff --git a/sys/sys/user.h b/sys/sys/user.h index e76b2a66ae94..96f17bffff8c 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -613,7 +613,7 @@ struct kinfo_vmobject { #define KKST_MAXLEN 1024 #define KKST_STATE_STACKOK 0 /* Stack is valid. */ -#define KKST_STATE_SWAPPED 1 /* Stack swapped out. */ +#define KKST_STATE_SWAPPED 1 /* Stack swapped out, obsolete. */ #define KKST_STATE_RUNNING 2 /* Stack ephemeral. */ #if defined(__amd64__) || defined(__i386__) diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index d255f8e8f358..7348577fc3cb 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -189,9 +189,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) thread_lock(td); switch (TD_GET_STATE(td)) { case TDS_INHIBITED: - if (TD_IS_SWAPPED(td)) - total.t_sw++; - else if (TD_IS_SLEEPING(td)) { + if (TD_IS_SLEEPING(td)) { if (td->td_priority <= PZERO) total.t_dw++; else diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index e32d27f2300a..e848d68739ca 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1960,8 +1960,7 @@ vm_pageout_oom(int shortage) if (!TD_ON_RUNQ(td) && !TD_IS_RUNNING(td) && !TD_IS_SLEEPING(td) && - !TD_IS_SUSPENDED(td) && - !TD_IS_SWAPPED(td)) { + !TD_IS_SUSPENDED(td)) { thread_unlock(td); breakout = true; break; diff --git a/sys/x86/x86/stack_machdep.c b/sys/x86/x86/stack_machdep.c index 746c560a094b..f1084a1d3b0c 100644 --- a/sys/x86/x86/stack_machdep.c +++ b/sys/x86/x86/stack_machdep.c @@ -109,8 +109,6 @@ stack_save_td(struct stack *st, struct thread *td) bool done; THREAD_LOCK_ASSERT(td, MA_OWNED); - KASSERT(!TD_IS_SWAPPED(td), - ("stack_save_td: thread %p is swapped", td)); if (TD_IS_RUNNING(td) && td != curthread) PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); From nobody Mon Jul 29 01:49:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs15q33z5S7LS; Mon, 29 Jul 2024 01:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs14gydz4nZR; Mon, 29 Jul 2024 01:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okPOkxkU3kMZGoQdVvLNfchmkehIZ2OefE+2a35L7cw=; b=KM0TJ4TXxKWgJ+i21UOW7mDhzbtCCx3tTUQCzxQBHPWU5Aa7igNLAhGUfEFwueEXr+tQoU uhyW/MMQPbfvMQ8S+55nSfdOfrUXc6Qutxk3+w+75FlBLG4lWOnpZ1m7LTbqtAVcMq1P/4 be3v4ftnxiAFVoC0i+JknHNBT5xw4yi71icPzj522ZfiyXoDZrf2CvM0nR7WarmcG8ZVwJ qhU/gAnohCv0ejdq/wj/Agj5xcwXD6PzJMej+Pe1Za5kkMCpjisiDMigheD7EaGMt8RsQd PpSnUEh7NsPPr0wWLFuxjLOPj6NygWbriOXb+jlgK1SNz63nfuGJtKv9jgtDVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217797; a=rsa-sha256; cv=none; b=evJebliTRiNZKZXXuajjWZI2RwWxGSDancOP2NN2Jf0EuXlrKXknm7BcnRmb9hs63lEoVu brejD4gBmwNw7DaH3GY6zlQM5nc1bOEKgs2DOUgQan95+AAGv2cBqRRBXoWR6w9xT8hHFE CMLlmb5orMHeyPYdQ+0xg336euZaFaNVDIHQulDhO47P6IkqoO2dBnzSQGycnPhm18rN8M NrEuax/4e7uZbKMBWRlV03MGS8xydTbrLXY1qicG3DSLVSuaw96FPoiyWJ3Xcv6wF+nQJG VLCfeBHyoow+yQsa/N2kqm+gAvMlr0XIdhlWhEXqOBe9lMPhaM7toWintw4X1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okPOkxkU3kMZGoQdVvLNfchmkehIZ2OefE+2a35L7cw=; b=ZQVSeU3CG+RT3SAaK/QeClJEynDrhOB3I9QSNesdMiXaqsZSFgGFUazysc8AmpDiX1uGEg fjHAVZoe1VGy7EuMnj3J8ukOw4pbjJzqWlQW9FT/gn9UbxVT/qyGVQ5ZyVwaX33zsjfV+O ehegOnUGJ47372DuxKK20FQbYZZv6UeWLescQ7vIPYXshuxmKf2thqbMBSAyUbG0fFJQzb 5spQWU6kPYYYg4WW7jKa8/TqYD9Z+b5DmLw6HSr2yiwnXmGPfyHJJActHfJUwcbuKxUS2A OCJcHVrqYuzplkk1XZK0Z2F+dPzrG4i/VOrDTgyEldJem4dgFmaRW5t9Ifdzyw== 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 4WXLs134cLzF1G; Mon, 29 Jul 2024 01:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1nvvZ091841; Mon, 29 Jul 2024 01:49:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1nvLV091838; Mon, 29 Jul 2024 01:49:57 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:49:57 GMT Message-Id: <202407290149.46T1nvLV091838@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: ba682f8b9b58 - main - vm: Remove kernel stack swapping support, part 5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ba682f8b9b58f6b497a5015ef70b2120b8d96663 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ba682f8b9b58f6b497a5015ef70b2120b8d96663 commit ba682f8b9b58f6b497a5015ef70b2120b8d96663 Author: Mark Johnston AuthorDate: 2024-07-29 01:40:39 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:40:39 +0000 vm: Remove kernel stack swapping support, part 5 - Remove cpu_thread_swapin() and cpu_thread_swapout(). Tested by: pho Reviewed by: alc, imp, kib Differential Revision: https://reviews.freebsd.org/D46116 --- sys/amd64/amd64/vm_machdep.c | 10 ---------- sys/arm/arm/vm_machdep.c | 10 ---------- sys/arm64/arm64/vm_machdep.c | 10 ---------- sys/i386/i386/vm_machdep.c | 10 ---------- sys/powerpc/powerpc/vm_machdep.c | 12 ------------ sys/riscv/riscv/vm_machdep.c | 10 ---------- sys/sys/proc.h | 2 -- 7 files changed, 64 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index c6b78824d730..f6d52fa4c02b 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -374,16 +374,6 @@ cpu_thread_clean(struct thread *td) } } -void -cpu_thread_swapin(struct thread *td) -{ -} - -void -cpu_thread_swapout(struct thread *td) -{ -} - void cpu_thread_alloc(struct thread *td) { diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 1dd01f6700aa..377373388478 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -146,16 +146,6 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) td2->td_md.md_saved_cspr = PSR_SVC32_MODE; } -void -cpu_thread_swapin(struct thread *td) -{ -} - -void -cpu_thread_swapout(struct thread *td) -{ -} - void cpu_set_syscall_retval(struct thread *td, int error) { diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 457157e34a6f..924628001103 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -137,16 +137,6 @@ cpu_reset(void) __asm volatile("wfi" ::: "memory"); } -void -cpu_thread_swapin(struct thread *td) -{ -} - -void -cpu_thread_swapout(struct thread *td) -{ -} - void cpu_set_syscall_retval(struct thread *td, int error) { diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 2c2fb9dc9821..0e0cebe98e5f 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -374,16 +374,6 @@ cpu_thread_clean(struct thread *td) } } -void -cpu_thread_swapin(struct thread *td) -{ -} - -void -cpu_thread_swapout(struct thread *td) -{ -} - void cpu_thread_alloc(struct thread *td) { diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index 74a61e1b7016..12c64f9e38bf 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -211,18 +211,6 @@ cpu_exit(struct thread *td) * fixed-size KVA. */ -void -cpu_thread_swapin(struct thread *td) -{ - -} - -void -cpu_thread_swapout(struct thread *td) -{ - -} - bool cpu_exec_vmspace_reuse(struct proc *p __unused, vm_map_t map __unused) { diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index f6d6f61bdc84..726f95213c91 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -113,16 +113,6 @@ cpu_reset(void) while(1); } -void -cpu_thread_swapin(struct thread *td) -{ -} - -void -cpu_thread_swapout(struct thread *td) -{ -} - void cpu_set_syscall_retval(struct thread *td, int error) { diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 167ac275c920..2c8b0dc041c4 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1235,8 +1235,6 @@ void cpu_thread_alloc(struct thread *); void cpu_thread_clean(struct thread *); void cpu_thread_exit(struct thread *); 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_check_susp(struct thread *td, bool sleep); void thread_cow_get_proc(struct thread *newtd, struct proc *p); From nobody Mon Jul 29 01:49:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs26kjZz5S7Qq; Mon, 29 Jul 2024 01:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs24l4wz4nZq; Mon, 29 Jul 2024 01:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sb50mD3n2E59ao6WTz7L3OWGu4lGztPJRFXncfO4lbY=; b=ghexooaty20uYrJJSIQK+RyfUNeXapfNGjotcrhjjGGe6tArGQ8QOW2ytjTY6nsCMhc1C8 U55kRK3o2l/2/rN2Wlx4cbdtKM7Wkkd+PSFF+l6anq/1FH5Tt2fvJ5tZzVp8OvrbBVMi8Z aVOuq4I4gh3Y6jh8gNSAmBtUo9+rATG+hbQM/wR+xXiXRsHLiqaLf0mtvhtCj8kSCHjGrY BG02gGgQIEFxZOr++JA4KAzJHtqn+ZrslV1ajXY4u+4fACg2Fu1bMgRiJcvm/tPVouLLuQ l3DguShQpF4RduCmS+/OuOcIuBuCpR1guUW2PtakIVgeUgHwGORQkf3gJ/ppdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217798; a=rsa-sha256; cv=none; b=SAPpSW2ZYhLZlQ/9jT+eA7/vOiXbCuBNYOKsDIlSxlwFQGsc8yYPV0dcZUC/YZlC2EMdV3 icL3Dn6qxqJv0WGK/VB3dhE76v0j7w211GTO2E5eqxmqYKTSM9Z6siqpWRV8zWi0aiZ6Ii ydCsxO9CFi/Wj78V8EwQ8pyS0GEkZ89AkJ1Yfc1638OHoD3WMQuO7lOXJwp8ru9XzjuflE q16gp9MnPKBXREyipODI/VAqA+5/TOd01cUiTqqMmZ8qXtlR+vDXDqSGil+Oi0VHNowhKO ec91qpnMQthpcBDqFc6RdqGJhCWnX3QuqwqhXeCn1zY1tIsbHg6wXrZLstlRqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sb50mD3n2E59ao6WTz7L3OWGu4lGztPJRFXncfO4lbY=; b=K/9lbCKYbS0zomramzxF9/l9SCnOGFchkznEJNmybV7JF84CsOmwjElx2sJcyEJjG/n/ei vW2+4oQ1sMfyUqKZ9mAFc8yhaIWAJJXStuH0IpUzjv0t6sjwSmd3kYcELHH16sRaNKd2HW 79uhzfB2KoyBdURlw/5NhZNjoaqYEMOY1p+ezh5CX8ZeGlLt2jnKVQyPU3NiapJ0F67oIo xeHASdI/P7jn8PJcLkBtg5OZehj1YFSbTmK8QCH9v/udG5WJSTNkD5MkRHBKDzBxyZiJeA PoNGxfotFw0AFTt114fSzb8kxxOpEoTkc0H41ZHykdegVlFb4wtvA6Bs9fhNAw== 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 4WXLs23q8kzFWW; Mon, 29 Jul 2024 01:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1nwfP091892; Mon, 29 Jul 2024 01:49:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1nwXm091889; Mon, 29 Jul 2024 01:49:58 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:49:58 GMT Message-Id: <202407290149.46T1nwXm091889@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: 472888018ce1 - main - proc: Remove kernel stack swapping support, part 6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 472888018ce141227f8b019b6663739c36bc608c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=472888018ce141227f8b019b6663739c36bc608c commit 472888018ce141227f8b019b6663739c36bc608c Author: Mark Johnston AuthorDate: 2024-07-29 01:40:48 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:43:18 +0000 proc: Remove kernel stack swapping support, part 6 - Remove most checks of the P_INMEM flag. - Some uses remain since a few userspace tools, e.g., ps(1) and top(1) expect the flag to be set. These can be cleaned up but the code has most likely been copy-pasted elsewhere and while linger for a long time. Tested by: pho Reviewed by: alc, imp, kib Differential Revision: https://reviews.freebsd.org/D46117 --- sys/ddb/db_command.c | 10 ++---- sys/ddb/db_ps.c | 2 -- sys/ddb/db_thread.c | 7 ++-- sys/fs/procfs/procfs_status.c | 26 ++++++-------- sys/i386/linux/linux_ptrace_machdep.c | 4 +-- sys/kern/kern_proc.c | 5 +-- sys/kern/kern_racct.c | 6 ---- sys/kern/sys_process.c | 65 +++++++++++++++-------------------- sys/sys/proc.h | 2 +- sys/sys/user.h | 2 +- sys/vm/vm_swapout.c | 7 ---- 11 files changed, 47 insertions(+), 89 deletions(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 1043f7091085..bdc8a707970c 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -871,10 +871,7 @@ db_stack_trace(db_expr_t tid, bool hastid, db_expr_t count, char *modif) else pid = -1; db_printf("Tracing pid %d tid %ld td %p\n", pid, (long)td->td_tid, td); - if (td->td_proc != NULL && (td->td_proc->p_flag & P_INMEM) == 0) - db_printf("--- swapped out\n"); - else - db_trace_thread(td, count); + db_trace_thread(td, count); } static void @@ -898,10 +895,7 @@ _db_stack_trace_all(bool active_only) db_printf("\nTracing command %s pid %d" " tid %ld td %p\n", td->td_proc->p_comm, td->td_proc->p_pid, (long)td->td_tid, td); - if (td->td_proc->p_flag & P_INMEM) - db_trace_thread(td, -1); - else - db_printf("--- swapped out\n"); + db_trace_thread(td, -1); if (db_pager_quit) { kdb_jmpbuf(prev_jb); return; diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index 9bccb46f989c..733c440f5ee3 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -215,8 +215,6 @@ db_ps_proc(struct proc *p) state[1] = '\0'; /* Additional process state flags. */ - if (!(p->p_flag & P_INMEM)) - strlcat(state, "W", sizeof(state)); if (p->p_flag & P_TRACED) strlcat(state, "X", sizeof(state)); if (p->p_flag & P_WEXIT && p->p_state != PRS_ZOMBIE) diff --git a/sys/ddb/db_thread.c b/sys/ddb/db_thread.c index e34d7356eb30..38ca9fa84f64 100644 --- a/sys/ddb/db_thread.c +++ b/sys/ddb/db_thread.c @@ -87,11 +87,8 @@ db_show_threads(db_expr_t addr, bool hasaddr, db_expr_t cnt, char *mod) (void *)thr->td_kstack); prev_jb = kdb_jmpbuf(jb); if (setjmp(jb) == 0) { - if (thr->td_proc->p_flag & P_INMEM) { - if (db_trace_thread(thr, 1) != 0) - db_printf("***\n"); - } else - db_printf("*** swapped out\n"); + if (db_trace_thread(thr, 1) != 0) + db_printf("***\n"); } kdb_jmpbuf(prev_jb); thr = kdb_thr_next(thr); diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c index 9c2f42a45102..38070e0946bb 100644 --- a/sys/fs/procfs/procfs_status.c +++ b/sys/fs/procfs/procfs_status.c @@ -61,6 +61,7 @@ int procfs_doprocstatus(PFS_FILL_ARGS) { + struct timeval start, ut, st; struct session *sess; struct thread *tdfirst; struct tty *tp; @@ -121,21 +122,16 @@ procfs_doprocstatus(PFS_FILL_ARGS) wmesg = "nochan"; thread_unlock(tdfirst); - if (p->p_flag & P_INMEM) { - struct timeval start, ut, st; - - PROC_STATLOCK(p); - calcru(p, &ut, &st); - PROC_STATUNLOCK(p); - start = p->p_stats->p_start; - getboottime(&boottime); - timevaladd(&start, &boottime); - sbuf_printf(sb, " %jd,%ld %jd,%ld %jd,%ld", - (intmax_t)start.tv_sec, start.tv_usec, - (intmax_t)ut.tv_sec, ut.tv_usec, - (intmax_t)st.tv_sec, st.tv_usec); - } else - sbuf_printf(sb, " -1,-1 -1,-1 -1,-1"); + PROC_STATLOCK(p); + calcru(p, &ut, &st); + PROC_STATUNLOCK(p); + start = p->p_stats->p_start; + getboottime(&boottime); + timevaladd(&start, &boottime); + sbuf_printf(sb, " %jd,%ld %jd,%ld %jd,%ld", + (intmax_t)start.tv_sec, start.tv_usec, + (intmax_t)ut.tv_sec, ut.tv_usec, + (intmax_t)st.tv_sec, st.tv_usec); sbuf_printf(sb, " %s", wmesg); diff --git a/sys/i386/linux/linux_ptrace_machdep.c b/sys/i386/linux/linux_ptrace_machdep.c index a815b42ca024..8d88f8540fd5 100644 --- a/sys/i386/linux/linux_ptrace_machdep.c +++ b/sys/i386/linux/linux_ptrace_machdep.c @@ -213,7 +213,7 @@ linux_proc_read_fpxregs(struct thread *td, struct linux_pt_fpxreg *fpxregs) { PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); - if (cpu_fxsr == 0 || (td->td_proc->p_flag & P_INMEM) == 0) + if (cpu_fxsr == 0) return (EIO); bcopy(&get_pcb_user_save_td(td)->sv_xmm, fpxregs, sizeof(*fpxregs)); return (0); @@ -224,7 +224,7 @@ linux_proc_write_fpxregs(struct thread *td, struct linux_pt_fpxreg *fpxregs) { PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); - if (cpu_fxsr == 0 || (td->td_proc->p_flag & P_INMEM) == 0) + if (cpu_fxsr == 0) return (EIO); bcopy(fpxregs, &get_pcb_user_save_td(td)->sv_xmm, sizeof(*fpxregs)); return (0); diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 280ad3facd3a..c47f5a15f252 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1148,10 +1148,7 @@ fill_kinfo_proc_only(struct proc *p, struct kinfo_proc *kp) kp->ki_ssize = vm->vm_ssize; } else if (p->p_state == PRS_ZOMBIE) kp->ki_stat = SZOMB; - if (kp->ki_flag & P_INMEM) - kp->ki_sflag = PS_INMEM; - else - kp->ki_sflag = 0; + kp->ki_sflag = PS_INMEM; /* Calculate legacy swtime as seconds since 'swtick'. */ kp->ki_swtime = (ticks - p->p_swtick) / hz; kp->ki_pid = p->p_pid; diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 43c3da0c2320..d900078fe5e2 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -332,12 +332,6 @@ racct_getpcpu(struct proc *p, u_int pcpu) ASSERT_RACCT_ENABLED(); - /* - * If the process is swapped out, we count its %cpu usage as zero. - * This behaviour is consistent with the userland ps(1) tool. - */ - if ((p->p_flag & P_INMEM) == 0) - return (0); swtime = (ticks - p->p_swtick) / hz; /* diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 6df8e694e91a..8ce4ea01fe6f 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -71,7 +71,7 @@ #define PROC_ASSERT_TRACEREQ(p) MPASS(((p)->p_flag2 & P2_PTRACEREQ) != 0) /* - * Functions implemented using PROC_ACTION(): + * Functions implemented below: * * proc_read_regs(proc, regs) * Get the current user-visible register set from the process @@ -96,43 +96,32 @@ * Arrange for the process to trap after executing a single instruction. */ -#define PROC_ACTION(action) do { \ - int error; \ - \ - PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); \ - if ((td->td_proc->p_flag & P_INMEM) == 0) \ - error = EIO; \ - else \ - error = (action); \ - return (error); \ -} while (0) - int proc_read_regs(struct thread *td, struct reg *regs) { - - PROC_ACTION(fill_regs(td, regs)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (fill_regs(td, regs)); } int proc_write_regs(struct thread *td, struct reg *regs) { - - PROC_ACTION(set_regs(td, regs)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (set_regs(td, regs)); } int proc_read_dbregs(struct thread *td, struct dbreg *dbregs) { - - PROC_ACTION(fill_dbregs(td, dbregs)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (fill_dbregs(td, dbregs)); } int proc_write_dbregs(struct thread *td, struct dbreg *dbregs) { - - PROC_ACTION(set_dbregs(td, dbregs)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (set_dbregs(td, dbregs)); } /* @@ -142,15 +131,15 @@ proc_write_dbregs(struct thread *td, struct dbreg *dbregs) int proc_read_fpregs(struct thread *td, struct fpreg *fpregs) { - - PROC_ACTION(fill_fpregs(td, fpregs)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (fill_fpregs(td, fpregs)); } int proc_write_fpregs(struct thread *td, struct fpreg *fpregs) { - - PROC_ACTION(set_fpregs(td, fpregs)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (set_fpregs(td, fpregs)); } static struct regset * @@ -295,51 +284,51 @@ proc_write_regset(struct thread *td, int note, struct iovec *iov) int proc_read_regs32(struct thread *td, struct reg32 *regs32) { - - PROC_ACTION(fill_regs32(td, regs32)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (fill_regs32(td, regs32)); } int proc_write_regs32(struct thread *td, struct reg32 *regs32) { - - PROC_ACTION(set_regs32(td, regs32)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (set_regs32(td, regs32)); } int proc_read_dbregs32(struct thread *td, struct dbreg32 *dbregs32) { - - PROC_ACTION(fill_dbregs32(td, dbregs32)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (fill_dbregs32(td, dbregs32)); } int proc_write_dbregs32(struct thread *td, struct dbreg32 *dbregs32) { - - PROC_ACTION(set_dbregs32(td, dbregs32)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (set_dbregs32(td, dbregs32)); } int proc_read_fpregs32(struct thread *td, struct fpreg32 *fpregs32) { - - PROC_ACTION(fill_fpregs32(td, fpregs32)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (fill_fpregs32(td, fpregs32)); } int proc_write_fpregs32(struct thread *td, struct fpreg32 *fpregs32) { - - PROC_ACTION(set_fpregs32(td, fpregs32)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (set_fpregs32(td, fpregs32)); } #endif int proc_sstep(struct thread *td) { - - PROC_ACTION(ptrace_single_step(td)); + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + return (ptrace_single_step(td)); } int diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 2c8b0dc041c4..d7d4b4c7450e 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -835,7 +835,7 @@ struct proc { #define P_TOTAL_STOP 0x02000000 /* Stopped in stop_all_proc. */ #define P_INEXEC 0x04000000 /* Process is in execve(). */ #define P_STATCHILD 0x08000000 /* Child process stopped or exited. */ -#define P_INMEM 0x10000000 /* Loaded into memory. */ +#define P_INMEM 0x10000000 /* Loaded into memory, always set. */ #define P_UNUSED1 0x20000000 /* --available-- */ #define P_UNUSED2 0x40000000 /* --available-- */ #define P_PPTRACE 0x80000000 /* PT_TRACEME by vforked child. */ diff --git a/sys/sys/user.h b/sys/sys/user.h index 96f17bffff8c..cd0535f0d765 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -225,7 +225,7 @@ void fill_kinfo_proc(struct proc *, struct kinfo_proc *); * Legacy PS_ flag. This moved to p_flag but is maintained for * compatibility. */ -#define PS_INMEM 0x00001 /* Loaded into memory. */ +#define PS_INMEM 0x00001 /* Loaded into memory, always true. */ /* ki_sessflag values */ #define KI_CTTY 0x00000001 /* controlling tty vnode active */ diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c index 1f3b3a8532f1..cb5dab7cacdd 100644 --- a/sys/vm/vm_swapout.c +++ b/sys/vm/vm_swapout.c @@ -383,13 +383,6 @@ again: limit = OFF_TO_IDX( qmin(rsslim.rlim_cur, rsslim.rlim_max)); - /* - * let processes that are swapped out really be - * swapped out set the limit to nothing (will force a - * swap-out.) - */ - if ((p->p_flag & P_INMEM) == 0) - limit = 0; /* XXX */ vm = vmspace_acquire_ref(p); _PHOLD(p); PROC_UNLOCK(p); From nobody Mon Jul 29 01:49:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs36dX4z5S7GY; Mon, 29 Jul 2024 01:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs35Kj1z4nXQ; Mon, 29 Jul 2024 01:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkPgPkeui2pDkq0ZKyEqw2w0+07R0WLMVsAewCfm/DY=; b=FyKM+2q6VA2ptgbcDZxpYZdZ8OHqxtyZetM9KnlK/7wATqPWPhmHgZ6ZItTIKXcosRp46M 53XXs6V+0j3SHAIld1beNJR3aR4xdqqNQjqElgC0bxMBLohvAHDl3MR43F+vmzYemr/5NG bbXQ/ZbE95x2iHSGG2Cvs0o5jRXr+WASnTBKEV+rVlihwLXIa50NwgsOR+RwH+tzq88YxG r9suj9nE2vQrK2H7Eudr5xWlmJCSwDbaXIP+5yomO2EYYqWh6iQK43XCeah/wXsPkPLKCF I/MCzoMtmqv8sAWP8Emp/g8UyiWOrScd0IZVuxHK+VCMO13ofk/vnOGw1pC+Ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217799; a=rsa-sha256; cv=none; b=vCWWmel0ag6sSfv7tQW5brXPYD3uw0eEDzYa6Vlc1CaaZFeBiPik6ALT/9MdVn6NfZVz/Q 6IEkZQp8Z+5tHfAuWzE2KCPxG2qZD8UPPzTzyXBzTa50HLyerV5+LB//vur3UhxCNMn6QN OCoxfutvaSniAi7GGXSLWDUvlgR/w9Ej1EnJhAS+NBpg5EuojoHxxFVNYhwRsXyf9ANZaP xpLXG/xDKal3JbOWrG7RconR9OmWz9En2r6pihETOaS4VB/GGARgsBUgToKN9SMs74STQb OMxzw3p+a2Nh55M/ch6Hfr/y4tKwNQWBhlYhq9TjVGsNbtf3zDQHhD5gzQ4ZDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkPgPkeui2pDkq0ZKyEqw2w0+07R0WLMVsAewCfm/DY=; b=m6qllEoZtD/CZMnp5osJSraUWAP6SjhPFw3QYvvIdmf6xsGPa6VgMo4HiPkB4363ea5p+K dJR7Tt9Am9t0h0+imjkGZ8bu/uD2kfDK5VGfAU8KAX655nX/bGKl6Tb7aG28d9AbjT7Wf7 peZIdUrQEIrEIfQZtaf1j1/ygvLC8OIbEwGvXBxGcVsaPFUTtICURGz2qLYPINXQYquzE8 /oheadH7j2aGxfnIY/0XwiFDvG0lVEO7IedhpXQTmCIRHrCwlni8W5BQHpRWnwC3nd2vxT JC18tOSxyqDvscbC90poher/zM/THWdtxd4+/SHcWHvdIeDOGfUWuXtoBAWSeQ== 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 4WXLs34wt0zFJ7; Mon, 29 Jul 2024 01:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1nxOF091945; Mon, 29 Jul 2024 01:49:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1nx1P091942; Mon, 29 Jul 2024 01:49:59 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:49:59 GMT Message-Id: <202407290149.46T1nx1P091942@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: d37286b9bf92 - main - proc: Remove kernel stack swapping support, part 7 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d37286b9bf92ec923ab6823bbedef9e39e7e1ebb Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d37286b9bf92ec923ab6823bbedef9e39e7e1ebb commit d37286b9bf92ec923ab6823bbedef9e39e7e1ebb Author: Mark Johnston AuthorDate: 2024-07-29 01:41:06 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:43:49 +0000 proc: Remove kernel stack swapping support, part 7 Remove some uses of PHOLD which were there only to prevent the process' threads from being swapped out. Tested by: pho Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D46118 --- sys/cam/cam_periph.c | 14 -------------- sys/compat/linuxkpi/common/src/linux_schedule.c | 6 ------ sys/dev/nvme/nvme_ctrlr.c | 12 ------------ sys/kern/kern_physio.c | 7 ------- sys/kern/kern_procctl.c | 10 ---------- sys/kern/subr_firmware.c | 2 -- sys/ufs/ffs/ffs_rawread.c | 6 ------ sys/ufs/ffs/ffs_softdep.c | 4 ---- 8 files changed, 61 deletions(-) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index e957edee67f1..4052ec2e1570 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -928,16 +928,6 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo, } } - /* - * This keeps the kernel stack of current thread from getting - * swapped. In low-memory situations where the kernel stack might - * otherwise get swapped out, this holds it and allows the thread - * to make progress and release the kernel mapped pages sooner. - * - * XXX KDM should I use P_NOSWAP instead? - */ - PHOLD(curproc); - for (i = 0; i < numbufs; i++) { /* Save the user's data address. */ mapinfo->orig[i] = *data_ptrs[i]; @@ -1005,7 +995,6 @@ fail: free(*data_ptrs[i], M_CAMPERIPH); *data_ptrs[i] = mapinfo->orig[i]; } - PRELE(curproc); return(EACCES); } @@ -1116,9 +1105,6 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) *data_ptrs[i] = mapinfo->orig[i]; } - /* allow ourselves to be swapped once again */ - PRELE(curproc); - return (error); } diff --git a/sys/compat/linuxkpi/common/src/linux_schedule.c b/sys/compat/linuxkpi/common/src/linux_schedule.c index 66b339bfbdbd..3349a4aa8d72 100644 --- a/sys/compat/linuxkpi/common/src/linux_schedule.c +++ b/sys/compat/linuxkpi/common/src/linux_schedule.c @@ -268,11 +268,6 @@ linux_wait_event_common(wait_queue_head_t *wqh, wait_queue_t *wq, int timeout, task = current; - /* - * Our wait queue entry is on the stack - make sure it doesn't - * get swapped out while we sleep. - */ - PHOLD(task->task_thread->td_proc); sleepq_lock(task); if (atomic_read(&task->state) != TASK_WAKING) { ret = linux_add_to_sleepqueue(task, task, "wevent", timeout, @@ -281,7 +276,6 @@ linux_wait_event_common(wait_queue_head_t *wqh, wait_queue_t *wq, int timeout, sleepq_release(task); ret = 0; } - PRELE(task->task_thread->td_proc); if (lock != NULL) spin_lock_irq(lock); diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index e07ac737ffc8..52834cb26b8e 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1259,11 +1259,6 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, return EIO; } if (is_user_buffer) { - /* - * Ensure the user buffer is wired for the duration of - * this pass-through command. - */ - PHOLD(curproc); buf = uma_zalloc(pbuf_zone, M_WAITOK); buf->b_iocmd = pt->is_read ? BIO_READ : BIO_WRITE; if (vmapbuf(buf, pt->buf, pt->len, 1) < 0) { @@ -1309,7 +1304,6 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, vunmapbuf(buf); err: uma_zfree(pbuf_zone, buf); - PRELE(curproc); } return (ret); @@ -1356,11 +1350,6 @@ nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr, if ((npc->opcode & 0x3) == 0 || (npc->opcode & 0x3) == 3) return (EINVAL); if (is_user) { - /* - * Ensure the user buffer is wired for the duration of - * this pass-through command. - */ - PHOLD(curproc); buf = uma_zalloc(pbuf_zone, M_WAITOK); buf->b_iocmd = npc->opcode & 1 ? BIO_WRITE : BIO_READ; if (vmapbuf(buf, (void *)(uintptr_t)npc->addr, @@ -1408,7 +1397,6 @@ nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr, vunmapbuf(buf); err: uma_zfree(pbuf_zone, buf); - PRELE(curproc); } return (ret); diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 79b7694192e4..787505c1096f 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -87,12 +87,6 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) return (EFBIG); } - /* - * Keep the process UPAGES from being swapped. Processes swapped - * out while holding pbufs, used by swapper, may lead to deadlock. - */ - PHOLD(curproc); - bp = g_alloc_bio(); if (uio->uio_segflg != UIO_USERSPACE) { pbuf = NULL; @@ -209,6 +203,5 @@ doerror: else if (pages) free(pages, M_DEVBUF); g_destroy_bio(bp); - PRELE(curproc); return (error); } diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 888feb94bb8d..e7519f1b0de4 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -573,17 +573,7 @@ reap_kill(struct thread *td, struct proc *p, void *data) w.rk = rk; w.error = &error; TASK_INIT(&w.t, 0, reap_kill_proc_work, &w); - - /* - * Prevent swapout, since w, ksi, and possibly rk, are - * allocated on the stack. We sleep in - * reap_kill_subtree_once() waiting for task to - * complete single-threading. - */ - PHOLD(td->td_proc); - reap_kill_subtree(td, p, reaper, &w); - PRELE(td->td_proc); crfree(w.cr); } PROC_LOCK(p); diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 99f7ef6ff8b9..d616339f2c07 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -419,9 +419,7 @@ firmware_get_flags(const char *imagename, uint32_t flags) fwli.flags = flags; TASK_INIT(&fwload_task, 0, loadimage, (void *)&fwli); taskqueue_enqueue(firmware_tq, &fwload_task); - PHOLD(curproc); msleep((void *)&fwli, &firmware_mtx, 0, "fwload", 0); - PRELE(curproc); } /* * After attempting to load the module, see if the image is registered. diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index 3a415d766303..9db0bee0d66d 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -265,11 +265,6 @@ ffs_rawread_main(struct vnode *vp, resid = uio->uio_resid; offset = uio->uio_offset; - /* - * keep the process from being swapped - */ - PHOLD(td->td_proc); - error = 0; nerror = 0; @@ -389,7 +384,6 @@ ffs_rawread_main(struct vnode *vp, if (error == 0) error = nerror; - PRELE(td->td_proc); uio->uio_iov->iov_base = udata; uio->uio_resid = resid; uio->uio_offset = offset; diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 5c8e2b6cde81..86c90000e8d2 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1904,7 +1904,6 @@ process_worklist_item(struct mount *mp, */ if (curthread->td_pflags & TDP_COWINPROGRESS) return (-1); - PHOLD(curproc); /* Don't let the stack go away. */ ump = VFSTOUFS(mp); LOCK_OWNED(ump); matchcnt = 0; @@ -1977,7 +1976,6 @@ process_worklist_item(struct mount *mp, ump->softdep_worklist_tail = (struct worklist *)sentinel.wk_list.le_prev; LIST_REMOVE(&sentinel, wk_list); - PRELE(curproc); return (matchcnt); } @@ -10230,7 +10228,6 @@ softdep_disk_io_initiation( return; marker.wk_type = D_LAST + 1; /* Not a normal workitem */ - PHOLD(curproc); /* Don't swap out kernel stack */ ACQUIRE_LOCK(ump); /* * Do any necessary pre-I/O processing. @@ -10315,7 +10312,6 @@ softdep_disk_io_initiation( } } FREE_LOCK(ump); - PRELE(curproc); /* Allow swapout of kernel stack */ } /* From nobody Mon Jul 29 01:50:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs52FxWz5S7R1; Mon, 29 Jul 2024 01:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs45xlYz4ng9; Mon, 29 Jul 2024 01:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xiXFhu0J5fO+FSEiSh4CwvtvvN8nrk8brD3GyqodI+k=; b=fk/5azIvwzvVafRQZRfhjtxGpX/oVJayy4EHVtXLevqldPU7o/TeDrcWdl/9+nkjwt/Bfx AU6UtyUJlXFUjgSy+/5lVY1kQr3soVXrNnZoyCfOFQ4CA4pMDzqSQtNeUJPAH6mx+T7kJV UfMZLtb8xboKtl44l+dI4UUNQwfyMija/Ro6Uw6Eddvs8vnhF85OeDzUFKIquG1f8ZwJWW UqPhRK1zKKdCK5LOISy9oZwYxxkHvkWz6ZYvXYMwxk85WqkwOojkmGNkb02EMnmcG+Z7FZ qB94MoJaqmCvCDXxvxMxAcvdLyHFjdWbJu9Gj/taZG4DFNfEddv5ZhZKPbJ6eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217800; a=rsa-sha256; cv=none; b=ETeADLVigWbvBNc0WH+MHfBTr0quPs21iemj6/HjJwfN034CFW0/Ae5pfON2rYB/VH2B+u WaiDAt1+HkkVw2Wh+5MNxHHb1/bsazUj1RAJUwWqBOrPBz/5J96SITuCm5znKSusx4BwNU F3cfkQhkwVybXn001iJznFx3Urco/GYmdT6d8uQCMxfwrV+8sf0wKcaP9c3859TMTja6LF MJtufaetp8VvWT48v5QK7lVSP3NzQ2ne6/uwOlbwuNvsUbgcYzCxRQSdvphayQtQwqWdxv 1Mq1S/QxgOcZ3Qy7xeT5B5AvBmp++2AhSOu5SobFVbuPa3mAg6J+mGUPfdIVUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xiXFhu0J5fO+FSEiSh4CwvtvvN8nrk8brD3GyqodI+k=; b=R2OKmZ0JY7NnKaVGiqY6FvKYrx4Cdkm6BGEHpjwuhlLGltCQKvR6dW7fmRRN0IOMxIdpKz eq5a2/nsL6E0GVKo3i4gLnuPBoNZVWuwVl2THLFWv69PErGsRQ924Zi3xezHkV5lpHhb4o fbo5He9o5OUEczvwgfdt5S25Bm16u3v0Ru+C2lf5XlKiJ2nXmtzl2Wl3DwrwE3kk7FeSiZ TXmBPfZPy1w0/CUxX5u74PTNpZf81Yhv5LBhZEVzAZf+n06G3BFQ62937oBNxUSYiID1Jt rjDWBjYL3CCFtxeDFqp6CetqnehQZyDgd9A/IR/eJ14ezfxvAmMQlMd8o/7KIg== 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 4WXLs45ScfzF8M; Mon, 29 Jul 2024 01:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1o018093495; Mon, 29 Jul 2024 01:50:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1o000093473; Mon, 29 Jul 2024 01:50:00 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:50:00 GMT Message-Id: <202407290150.46T1o000093473@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: 235750ee5130 - main - vm: Remove kernel stack swapping support, part 8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 235750ee5130aa71cf4151457435e806dd58f2ec Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=235750ee5130aa71cf4151457435e806dd58f2ec commit 235750ee5130aa71cf4151457435e806dd58f2ec Author: Mark Johnston AuthorDate: 2024-07-29 01:41:26 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:43:59 +0000 vm: Remove kernel stack swapping support, part 8 - The kernel stack objects do not need to be pageable, so use OBJT_PHYS objects instead. The main difference is that mappings do not require PV entries. - Make some externally visible functions, relating to kernel thread stack internals, private to vm_glue.c, as their external consumers are now gone. Tested by: pho Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D46119 --- sys/vm/vm_extern.h | 4 ---- sys/vm/vm_glue.c | 17 ++++++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index 8c9addda1196..93ec6014c27d 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -127,10 +127,6 @@ struct sf_buf *vm_imgact_map_page(vm_object_t object, vm_ooffset_t offset); void vm_imgact_unmap_page(struct sf_buf *sf); void vm_thread_dispose(struct thread *td); int vm_thread_new(struct thread *td, int pages); -vm_pindex_t vm_kstack_pindex(vm_offset_t ks, int npages); -vm_object_t vm_thread_kstack_size_to_obj(int npages); -int vm_thread_stack_back(vm_offset_t kaddr, vm_page_t ma[], int npages, - int req_class, int domain); u_int vm_active_count(void); u_int vm_inactive_count(void); u_int vm_laundry_count(void); diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 63417687a1a5..2627ee75dbff 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -56,7 +56,6 @@ * rights to redistribute these changes. */ -#include #include "opt_vm.h" #include "opt_kstack_pages.h" #include "opt_kstack_max_pages.h" @@ -101,7 +100,6 @@ #include #include #include -#include #include #include @@ -280,6 +278,11 @@ static uma_zone_t kstack_cache; static int kstack_cache_size; static vmem_t *vmd_kstack_arena[MAXMEMDOM]; +static vm_pindex_t vm_kstack_pindex(vm_offset_t ks, int npages); +static vm_object_t vm_thread_kstack_size_to_obj(int npages); +static int vm_thread_stack_back(vm_offset_t kaddr, vm_page_t ma[], int npages, + int req_class, int domain); + static int sysctl_kstack_cache_size(SYSCTL_HANDLER_ARGS) { @@ -577,7 +580,7 @@ vm_thread_dispose(struct thread *td) * Uses a non-identity mapping if guard pages are * active to avoid pindex holes in the kstack object. */ -vm_pindex_t +static vm_pindex_t vm_kstack_pindex(vm_offset_t ks, int kpages) { vm_pindex_t pindex = atop(ks - VM_MIN_KERNEL_ADDRESS); @@ -604,7 +607,7 @@ vm_kstack_pindex(vm_offset_t ks, int kpages) * Allocate physical pages, following the specified NUMA policy, to back a * kernel stack. */ -int +static int vm_thread_stack_back(vm_offset_t ks, vm_page_t ma[], int npages, int req_class, int domain) { @@ -643,7 +646,7 @@ cleanup: return (ENOMEM); } -vm_object_t +static vm_object_t vm_thread_kstack_size_to_obj(int npages) { return (npages == kstack_pages ? kstack_object : kstack_alt_object); @@ -686,7 +689,7 @@ kstack_cache_init(void *null) vm_size_t kstack_quantum; int domain; - kstack_object = vm_object_allocate(OBJT_SWAP, + kstack_object = vm_object_allocate(OBJT_PHYS, atop(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS)); kstack_cache = uma_zcache_create("kstack_cache", kstack_pages * PAGE_SIZE, NULL, NULL, NULL, NULL, @@ -695,7 +698,7 @@ kstack_cache_init(void *null) kstack_cache_size = imax(128, mp_ncpus * 4); uma_zone_set_maxcache(kstack_cache, kstack_cache_size); - kstack_alt_object = vm_object_allocate(OBJT_SWAP, + kstack_alt_object = vm_object_allocate(OBJT_PHYS, atop(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS)); kstack_quantum = vm_thread_kstack_import_quantum(); From nobody Mon Jul 29 01:50:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs63cTsz5S7Lm; Mon, 29 Jul 2024 01:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs60Jmfz4npD; Mon, 29 Jul 2024 01:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeBrK7VbPFsYG93gyf/0gs/ukRNVElb12datnWnZaGA=; b=RogMjRfAKj4VNLwU+TkTWtrCrcL1B4TSgi4F1SMkLL2Vk70uqkJtzbn+R8/mbfms267VE3 6ouhp/vP2gvrsAk2A1lsfYlk9MwSYEIJC3tYJBHevULuJlUXgCQdT1ao5uH7hiMcsWAkWt lvy4VZW/v7gpZmt79DH86NcSWW4mM2XIJ+Ot2JTykHCenGZKtpfS63tuQqexWUUsRkZjAF ulNm6+0gCPcwooUCUvtE23qe3zu+p5QcOCHbsQxC3kuKE2Vn2Yn2afN7Pt9HwXNTifUQIS ughxr2B0rUsOBQzsOwY0eEN5AiZkHlVwJ/cibBYtZQISj/0R3+MeL61/cWvGrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217802; a=rsa-sha256; cv=none; b=g/oTYXSm/KP9ouO04keeHgaeLHtxtWvG3dRLkPWOqjKkW5eypbgdUHuzz6IeKkJuY0K2aZ 97uRH1SBspRfxvACPVQQdocNyfOVJ2bHNgFAJg2bd/ShgjBt1QY2B5ZIqzKWwMPKxYjLvv BekaCthrpLpnqNoeG3uvWspU7QwxcL/yIXtl/k+6F2RCwLc6/Ub6wac7gi87diq7ZXUBp9 aFfKLx3jFl21pZWOWvHLMH8rMRxpA8LZS81uKk5jN5dEvqxvgboTaf0Gslq05hD/vszgcG 1CveLeMaAEwf4h6FGYI6FbVisTg3jZyfmHTjHg8o3t46umJpmx4z1puaK0rrQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeBrK7VbPFsYG93gyf/0gs/ukRNVElb12datnWnZaGA=; b=immsXdxNqDDfFE99L6yWUtkvqW9oxbViBeNFQ9sbE7xhtxmc0mVHhSQELzpZvrGIjLOF+J 3RS/RVshG1HNuJd+OvKwQ3WKKGcwU8AkYBWt139ZB+9+/qxQAPZfSyyx6snxYksw78YD5n Lx9F6BjamUanpagyUvtlaG4Ih+7SDzlcVpHf7iIU4TukVKwcfook9DIvFvmTnbcmNntBl+ TqgTbE9HWNCVeDDiPJogqE/QfcCAY+BP0Ler0Q1kH729kuQAY2OuLvuah+7aazlIUbIgh/ JSzHbJPCFZVh+ZA1kl5FugwZQZKR4lkntMn99oV83t+5kxbfw7z4FS/unHCt3g== 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 4WXLs55qZqzFLY; Mon, 29 Jul 2024 01:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1o1DL094030; Mon, 29 Jul 2024 01:50:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1o1qH094024; Mon, 29 Jul 2024 01:50:01 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:50:01 GMT Message-Id: <202407290150.46T1o1qH094024@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: d4c4ca856b26 - main - proc: Remove kernel stack swapping support, part 9 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d4c4ca856b267669b9da18a8ea676f5e556ee5c8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d4c4ca856b267669b9da18a8ea676f5e556ee5c8 commit d4c4ca856b267669b9da18a8ea676f5e556ee5c8 Author: Mark Johnston AuthorDate: 2024-07-29 01:42:01 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:43:59 +0000 proc: Remove kernel stack swapping support, part 9 setrunnable() no longer needs to return a value. Make its return type void and fix up callers. Now a number of other interfaces no longer need to return a value, they will be fixed up subsequently. Tested by: pho Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46127 --- sys/kern/kern_sig.c | 69 ++++++++++++++++------------------------- sys/kern/kern_synch.c | 4 +-- sys/kern/kern_thread.c | 77 ++++++++++++++++------------------------------ sys/kern/subr_sleepqueue.c | 53 +++++++++++-------------------- sys/sys/proc.h | 2 +- 5 files changed, 72 insertions(+), 133 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 46f7b29837e4..cded24450ca1 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -108,7 +108,7 @@ static int issignal(struct thread *td); static void reschedule_signals(struct proc *p, sigset_t block, int flags); static int sigprop(int sig); static void tdsigwakeup(struct thread *, int, sig_t, int); -static int sig_suspend_threads(struct thread *, struct proc *); +static void sig_suspend_threads(struct thread *, struct proc *); static int filt_sigattach(struct knote *kn); static void filt_sigdetach(struct knote *kn); static int filt_signal(struct knote *kn, long hint); @@ -2260,16 +2260,15 @@ tdksignal(struct thread *td, int sig, ksiginfo_t *ksi) (void) tdsendsignal(td->td_proc, td, sig, ksi); } -static int +static void sig_sleepq_abort(struct thread *td, int intrval) { THREAD_LOCK_ASSERT(td, MA_OWNED); - if (intrval == 0 && (td->td_flags & TDF_SIGWAIT) == 0) { + if (intrval == 0 && (td->td_flags & TDF_SIGWAIT) == 0) thread_unlock(td); - return (0); - } - return (sleepq_abort(td, intrval)); + else + sleepq_abort(td, intrval); } int @@ -2277,11 +2276,8 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) { sig_t action; sigqueue_t *sigqueue; - int prop; struct sigacts *ps; - int intrval; - int ret = 0; - int wakeup_swapper; + int intrval, prop, ret; MPASS(td == NULL || p == td->td_proc); PROC_LOCK_ASSERT(p, MA_OWNED); @@ -2297,7 +2293,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) if (p->p_state == PRS_ZOMBIE) { if (ksi != NULL && (ksi->ksi_flags & KSI_INS) != 0) ksiginfo_tryfree(ksi); - return (ret); + return (0); } ps = p->p_sigacts; @@ -2327,7 +2323,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) mtx_unlock(&ps->ps_mtx); if (ksi != NULL && (ksi->ksi_flags & KSI_INS) != 0) ksiginfo_tryfree(ksi); - return (ret); + return (0); } else { action = SIG_CATCH; intrval = 0; @@ -2360,7 +2356,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) action == SIG_DFL) { if (ksi != NULL && (ksi->ksi_flags & KSI_INS) != 0) ksiginfo_tryfree(ksi); - return (ret); + return (0); } sigqueue_delete_proc(p, SIGCONT); if (p->p_flag & P_CONTINUED) { @@ -2381,9 +2377,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) */ if (action == SIG_HOLD && !((prop & SIGPROP_CONT) && (p->p_flag & P_STOPPED_SIG))) - return (ret); - - wakeup_swapper = 0; + return (0); /* * Some signals have a process-wide effect and a per-thread @@ -2402,7 +2396,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) * then no further action is necessary. */ if (p->p_flag & P_TRACED) - goto out; + return (0); /* * SIGKILL sets process running. * It will die elsewhere. @@ -2418,7 +2412,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) * then no further action is necessary. */ if (p->p_flag & P_TRACED) - goto out; + return (0); /* * If SIGCONT is default (or ignored), we continue the * process but don't leave the signal in sigqueue as @@ -2468,7 +2462,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) * then no further action is necessary. */ if (p->p_flag & P_TRACED) - goto out; + return (0); /* * Already stopped, don't need to stop again * (If we did the shell could get confused). @@ -2476,7 +2470,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) */ p->p_flag |= P_STOPPED_SIG; sigqueue_delete(sigqueue, sig); - goto out; + return (0); } /* @@ -2490,11 +2484,11 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) PROC_SLOCK(p); thread_lock(td); if (TD_CAN_ABORT(td)) - wakeup_swapper = sig_sleepq_abort(td, intrval); + sig_sleepq_abort(td, intrval); else thread_unlock(td); PROC_SUNLOCK(p); - goto out; + return (0); /* * Mutexes are short lived. Threads waiting on them will * hit thread_suspend_check() soon. @@ -2502,18 +2496,18 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) } else if (p->p_state == PRS_NORMAL) { if (p->p_flag & P_TRACED || action == SIG_CATCH) { tdsigwakeup(td, sig, action, intrval); - goto out; + return (0); } MPASS(action == SIG_DFL); if (prop & SIGPROP_STOP) { if (p->p_flag & (P_PPWAIT|P_WEXIT)) - goto out; + return (0); p->p_flag |= P_STOPPED_SIG; p->p_xsig = sig; PROC_SLOCK(p); - wakeup_swapper = sig_suspend_threads(td, p); + sig_suspend_threads(td, p); if (p->p_numthreads == p->p_suspcount) { /* * only thread sending signal to another @@ -2527,12 +2521,12 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) sigqueue_delete_proc(p, p->p_xsig); } else PROC_SUNLOCK(p); - goto out; + return (0); } } else { /* Not in "NORMAL" state. discard the signal. */ sigqueue_delete(sigqueue, sig); - goto out; + return (0); } /* @@ -2547,13 +2541,8 @@ runfast: out_cont: itimer_proc_continue(p); kqtimer_proc_continue(p); -out: - /* If we jump here, proc slock should not be owned. */ - PROC_SLOCK_ASSERT(p, MA_NOTOWNED); - if (wakeup_swapper) - kick_proc0(); - return (ret); + return (0); } /* @@ -2565,7 +2554,7 @@ static void tdsigwakeup(struct thread *td, int sig, sig_t action, int intrval) { struct proc *p = td->td_proc; - int prop, wakeup_swapper; + int prop; PROC_LOCK_ASSERT(p, MA_OWNED); prop = sigprop(sig); @@ -2621,10 +2610,8 @@ tdsigwakeup(struct thread *td, int sig, sig_t action, int intrval) if (td->td_priority > PUSER && !TD_IS_IDLETHREAD(td)) sched_prio(td, PUSER); - wakeup_swapper = sig_sleepq_abort(td, intrval); + sig_sleepq_abort(td, intrval); PROC_SUNLOCK(p); - if (wakeup_swapper) - kick_proc0(); return; } @@ -2778,16 +2765,14 @@ ptrace_remotereq(struct thread *td, int flag) wakeup(p); } -static int +static void sig_suspend_threads(struct thread *td, struct proc *p) { struct thread *td2; - int wakeup_swapper; PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); - wakeup_swapper = 0; FOREACH_THREAD_IN_PROC(p, td2) { thread_lock(td2); ast_sched_locked(td2, TDA_SUSPEND); @@ -2802,8 +2787,7 @@ sig_suspend_threads(struct thread *td, struct proc *p) KASSERT(!TD_IS_SUSPENDED(td2), ("thread with deferred stops suspended")); if (TD_SBDRY_INTR(td2)) { - wakeup_swapper |= sleepq_abort(td2, - TD_SBDRY_ERRNO(td2)); + sleepq_abort(td2, TD_SBDRY_ERRNO(td2)); continue; } } else if (!TD_IS_SUSPENDED(td2)) @@ -2816,7 +2800,6 @@ sig_suspend_threads(struct thread *td, struct proc *p) } thread_unlock(td2); } - return (wakeup_swapper); } /* diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 25bca094b400..9bb6079c0c20 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -562,7 +562,7 @@ mi_switch(int flags) * * Requires the thread lock on entry, drops on exit. */ -int +void setrunnable(struct thread *td, int srqflags) { THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -586,8 +586,6 @@ setrunnable(struct thread *td, int srqflags) default: panic("setrunnable: state 0x%x", TD_GET_STATE(td)); } - - return (0); } /* diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 179ced38b715..00f99516773c 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -145,7 +145,7 @@ static void thread_reap(void); static void thread_reap_all(void); static void thread_reap_task_cb(void *, int); static void thread_reap_callout_cb(void *); -static int thread_unsuspend_one(struct thread *td, struct proc *p, +static void thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary); static void thread_free_batched(struct thread *td); @@ -935,7 +935,6 @@ thread_exit(void) struct thread *td; struct thread *td2; struct proc *p; - int wakeup_swapper; td = curthread; p = td->td_proc; @@ -981,10 +980,8 @@ thread_exit(void) if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { if (p->p_numthreads == p->p_suspcount) { thread_lock(p->p_singlethread); - wakeup_swapper = thread_unsuspend_one( - p->p_singlethread, p, false); - if (wakeup_swapper) - kick_proc0(); + thread_unsuspend_one(p->p_singlethread, + p, false); } } @@ -1137,17 +1134,13 @@ remain_for_mode(int mode) return (mode == SINGLE_ALLPROC ? 0 : 1); } -static int +static void weed_inhib(int mode, struct thread *td2, struct proc *p) { - int wakeup_swapper; - PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); THREAD_LOCK_ASSERT(td2, MA_OWNED); - wakeup_swapper = 0; - /* * Since the thread lock is dropped by the scheduler we have * to retry to check for races. @@ -1156,26 +1149,26 @@ restart: switch (mode) { case SINGLE_EXIT: if (TD_IS_SUSPENDED(td2)) { - wakeup_swapper |= thread_unsuspend_one(td2, p, true); + thread_unsuspend_one(td2, p, true); thread_lock(td2); goto restart; } if (TD_CAN_ABORT(td2)) { - wakeup_swapper |= sleepq_abort(td2, EINTR); - return (wakeup_swapper); + sleepq_abort(td2, EINTR); + return; } break; case SINGLE_BOUNDARY: case SINGLE_NO_EXIT: if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) { - wakeup_swapper |= thread_unsuspend_one(td2, p, false); + thread_unsuspend_one(td2, p, false); thread_lock(td2); goto restart; } if (TD_CAN_ABORT(td2)) { - wakeup_swapper |= sleepq_abort(td2, ERESTART); - return (wakeup_swapper); + sleepq_abort(td2, ERESTART); + return; } break; case SINGLE_ALLPROC: @@ -1189,21 +1182,20 @@ restart: */ if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_ALLPROCSUSP) == 0) { - wakeup_swapper |= thread_unsuspend_one(td2, p, false); + thread_unsuspend_one(td2, p, false); thread_lock(td2); goto restart; } if (TD_CAN_ABORT(td2)) { td2->td_flags |= TDF_ALLPROCSUSP; - wakeup_swapper |= sleepq_abort(td2, ERESTART); - return (wakeup_swapper); + sleepq_abort(td2, ERESTART); + return; } break; default: break; } thread_unlock(td2); - return (wakeup_swapper); } /* @@ -1224,7 +1216,7 @@ thread_single(struct proc *p, int mode) { struct thread *td; struct thread *td2; - int remaining, wakeup_swapper; + int remaining; td = curthread; KASSERT(mode == SINGLE_EXIT || mode == SINGLE_BOUNDARY || @@ -1279,14 +1271,13 @@ thread_single(struct proc *p, int mode) while (remaining != remain_for_mode(mode)) { if (P_SHOULDSTOP(p) != P_STOPPED_SINGLE) goto stopme; - wakeup_swapper = 0; FOREACH_THREAD_IN_PROC(p, td2) { if (td2 == td) continue; thread_lock(td2); ast_sched_locked(td2, TDA_SUSPEND); if (TD_IS_INHIBITED(td2)) { - wakeup_swapper |= weed_inhib(mode, td2, p); + weed_inhib(mode, td2, p); #ifdef SMP } else if (TD_IS_RUNNING(td2)) { forward_signal(td2); @@ -1295,8 +1286,6 @@ thread_single(struct proc *p, int mode) } else thread_unlock(td2); } - if (wakeup_swapper) - kick_proc0(); remaining = calc_remaining(p, mode); /* @@ -1412,7 +1401,6 @@ thread_suspend_check(int return_instead) { struct thread *td; struct proc *p; - int wakeup_swapper; td = curthread; p = td->td_proc; @@ -1475,10 +1463,8 @@ thread_suspend_check(int return_instead) if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { if (p->p_numthreads == p->p_suspcount + 1) { thread_lock(p->p_singlethread); - wakeup_swapper = thread_unsuspend_one( - p->p_singlethread, p, false); - if (wakeup_swapper) - kick_proc0(); + thread_unsuspend_one(p->p_singlethread, p, + false); } } PROC_UNLOCK(p); @@ -1585,7 +1571,7 @@ thread_suspend_one(struct thread *td) sched_sleep(td, 0); } -static int +static void thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary) { @@ -1601,7 +1587,7 @@ thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary) p->p_boundary_count--; } } - return (setrunnable(td, 0)); + setrunnable(td, 0); } void @@ -1625,8 +1611,7 @@ thread_run_flash(struct thread *td) MPASS(p->p_suspcount > 0); p->p_suspcount--; PROC_SUNLOCK(p); - if (setrunnable(td, 0)) - kick_proc0(); + setrunnable(td, 0); } /* @@ -1636,17 +1621,14 @@ void thread_unsuspend(struct proc *p) { struct thread *td; - int wakeup_swapper; PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); - wakeup_swapper = 0; if (!P_SHOULDSTOP(p)) { FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (TD_IS_SUSPENDED(td)) - wakeup_swapper |= thread_unsuspend_one(td, p, - true); + thread_unsuspend_one(td, p, true); else thread_unlock(td); } @@ -1659,12 +1641,9 @@ thread_unsuspend(struct proc *p) */ if (p->p_singlethread->td_proc == p) { thread_lock(p->p_singlethread); - wakeup_swapper = thread_unsuspend_one( - p->p_singlethread, p, false); + thread_unsuspend_one(p->p_singlethread, p, false); } } - if (wakeup_swapper) - kick_proc0(); } /* @@ -1674,7 +1653,6 @@ void thread_single_end(struct proc *p, int mode) { struct thread *td; - int wakeup_swapper; KASSERT(mode == SINGLE_EXIT || mode == SINGLE_BOUNDARY || mode == SINGLE_ALLPROC || mode == SINGLE_NO_EXIT, @@ -1693,7 +1671,7 @@ thread_single_end(struct proc *p, int mode) P_TOTAL_STOP); PROC_SLOCK(p); p->p_singlethread = NULL; - wakeup_swapper = 0; + /* * If there are other threads they may now run, * unless of course there is a blanket 'stop order' @@ -1703,18 +1681,15 @@ thread_single_end(struct proc *p, int mode) if (p->p_numthreads != remain_for_mode(mode) && !P_SHOULDSTOP(p)) { FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); - if (TD_IS_SUSPENDED(td)) { - wakeup_swapper |= thread_unsuspend_one(td, p, - true); - } else + if (TD_IS_SUSPENDED(td)) + thread_unsuspend_one(td, p, true); + else thread_unlock(td); } } KASSERT(mode != SINGLE_BOUNDARY || p->p_boundary_count == 0, ("inconsistent boundary count %d", p->p_boundary_count)); PROC_SUNLOCK(p); - if (wakeup_swapper) - kick_proc0(); wakeup(&p->p_flag); } diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index 15dbf396c557..0b792d752e94 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -169,7 +169,7 @@ static inline int sleepq_check_timeout(void); static void sleepq_dtor(void *mem, int size, void *arg); #endif static int sleepq_init(void *mem, int size, int flags); -static int sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, +static void sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri, int srqflags); static void sleepq_remove_thread(struct sleepqueue *sq, struct thread *td); static void sleepq_switch(const void *wchan, int pri); @@ -731,13 +731,12 @@ sleepq_type(const void *wchan) } /* - * Removes a thread from a sleep queue and makes it - * runnable. + * Removes a thread from a sleep queue and makes it runnable. * * Requires the sc chain locked on entry. If SRQ_HOLD is specified it will * be locked on return. Returns without the thread lock held. */ -static int +static void sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri, int srqflags) { @@ -788,12 +787,11 @@ sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri, if (TD_IS_SLEEPING(td)) { MPASS(!drop); TD_CLR_SLEEPING(td); - return (setrunnable(td, srqflags)); + setrunnable(td, srqflags); + } else { + MPASS(drop); + thread_unlock(td); } - MPASS(drop); - thread_unlock(td); - - return (0); } static void @@ -929,7 +927,6 @@ sleepq_signal(const void *wchan, int flags, int pri, int queue) struct sleepqueue *sq; struct threadqueue *head; struct thread *td, *besttd; - int wakeup_swapper; CTR2(KTR_PROC, "sleepq_signal(%p, %d)", wchan, flags); KASSERT(wchan != NULL, ("%s: invalid NULL wait channel", __func__)); @@ -972,9 +969,9 @@ sleepq_signal(const void *wchan, int flags, int pri, int queue) } } MPASS(besttd != NULL); - wakeup_swapper = sleepq_resume_thread(sq, besttd, pri, + sleepq_resume_thread(sq, besttd, pri, (flags & SLEEPQ_DROP) ? 0 : SRQ_HOLD); - return (wakeup_swapper); + return (0); } static bool @@ -1012,7 +1009,6 @@ sleepq_remove_matching(struct sleepqueue *sq, int queue, bool (*matches)(struct thread *), int pri) { struct thread *td, *tdn; - int wakeup_swapper; /* * The last thread will be given ownership of sq and may @@ -1020,14 +1016,12 @@ sleepq_remove_matching(struct sleepqueue *sq, int queue, * so we must cache the "next" queue item at the beginning * of the final iteration. */ - wakeup_swapper = 0; TAILQ_FOREACH_SAFE(td, &sq->sq_blocked[queue], td_slpq, tdn) { if (matches(td)) - wakeup_swapper |= sleepq_resume_thread(sq, td, pri, - SRQ_HOLD); + sleepq_resume_thread(sq, td, pri, SRQ_HOLD); } - return (wakeup_swapper); + return (0); } /* @@ -1041,7 +1035,6 @@ sleepq_timeout(void *arg) struct sleepqueue *sq; struct thread *td; const void *wchan; - int wakeup_swapper; td = arg; CTR3(KTR_PROC, "sleepq_timeout: thread %p (pid %ld, %s)", @@ -1064,9 +1057,7 @@ sleepq_timeout(void *arg) sq = sleepq_lookup(wchan); MPASS(sq != NULL); td->td_flags |= TDF_TIMEOUT; - wakeup_swapper = sleepq_resume_thread(sq, td, 0, 0); - if (wakeup_swapper) - kick_proc0(); + sleepq_resume_thread(sq, td, 0, 0); return; } else if (TD_ON_SLEEPQ(td)) { /* @@ -1089,7 +1080,6 @@ sleepq_remove(struct thread *td, const void *wchan) { struct sleepqueue_chain *sc; struct sleepqueue *sq; - int wakeup_swapper; /* * Look up the sleep queue for this wait channel, then re-check @@ -1114,9 +1104,7 @@ sleepq_remove(struct thread *td, const void *wchan) sq = sleepq_lookup(wchan); MPASS(sq != NULL); MPASS(td->td_wchan == wchan); - wakeup_swapper = sleepq_resume_thread(sq, td, 0, 0); - if (wakeup_swapper) - kick_proc0(); + sleepq_resume_thread(sq, td, 0, 0); } /* @@ -1165,7 +1153,8 @@ sleepq_abort(struct thread *td, int intrval) MPASS(sq != NULL); /* Thread is asleep on sleep queue sq, so wake it up. */ - return (sleepq_resume_thread(sq, td, 0, 0)); + sleepq_resume_thread(sq, td, 0, 0); + return (0); } void @@ -1173,25 +1162,19 @@ sleepq_chains_remove_matching(bool (*matches)(struct thread *)) { struct sleepqueue_chain *sc; struct sleepqueue *sq, *sq1; - int i, wakeup_swapper; + int i; - wakeup_swapper = 0; for (sc = &sleepq_chains[0]; sc < sleepq_chains + SC_TABLESIZE; ++sc) { if (LIST_EMPTY(&sc->sc_queues)) { continue; } mtx_lock_spin(&sc->sc_lock); LIST_FOREACH_SAFE(sq, &sc->sc_queues, sq_hash, sq1) { - for (i = 0; i < NR_SLEEPQS; ++i) { - wakeup_swapper |= sleepq_remove_matching(sq, i, - matches, 0); - } + for (i = 0; i < NR_SLEEPQS; ++i) + sleepq_remove_matching(sq, i, matches, 0); } mtx_unlock_spin(&sc->sc_lock); } - if (wakeup_swapper) { - kick_proc0(); - } } /* diff --git a/sys/sys/proc.h b/sys/sys/proc.h index d7d4b4c7450e..5e3f0e2e117d 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1200,7 +1200,7 @@ int securelevel_ge(struct ucred *cr, int level); int securelevel_gt(struct ucred *cr, int level); void sess_hold(struct session *); void sess_release(struct session *); -int setrunnable(struct thread *, int); +void setrunnable(struct thread *, int); void setsugid(struct proc *p); bool should_yield(void); int sigonstack(size_t sp); From nobody Mon Jul 29 01:50:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs81pMLz5S7Ln; Mon, 29 Jul 2024 01:50:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs80Y25z4npb; Mon, 29 Jul 2024 01:50:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AoZPn7AYergNW8AqA4pyvip6CBLCXarT3KvS/IiiDSQ=; b=L0QHzwcojDPC1wUw5Xw/fwk1jahyYDXQEhaNJq8a0RawRsLjOzGb4577n3IAZU4z7WHO7X wFaR7fjh5kTBZDwbZWGsVhD/sKGknpBEa743TorEjDpLwKtGubNCAt7vntfqb+QDJ76vkm A6SFy6vgEHPoRuJM/ZD9rL+mSd2wFgk6urlki7nVKjh4ukKxn9yBv2wRpLGDGeXbmJWuC3 Oirf8gHMXifJAZXcxiRqMbgkKxK1sCAu6ljeqOi5bVO//AdXveLlOgqLg1EvQFCuALAag9 y1Dty617gQ4EZzPGsfnP1drEmOqSx/I+Ky3/7ePY51wYCqtzmWj/s06i2lFvUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217804; a=rsa-sha256; cv=none; b=Ix3jSI4MvZZ3nJ0vS+qJRADojgItvNtA6PsWjSKj23VdPzw3RviG8tzpuuKa8sxEB/3GPR 56/R3Aa5rkcl3BT8/NGXyli46gz0sSW9wUgE5Z/TZMPUT7dPtjfX+z9KCdD01F+hWXvI0g brcIVGRdKkVFq9ZVt0IFXYkgAbyiAu/TgWI5yUcQnDp5I6WlP+xQzNU+IB9FvCDktcwUUb VL7UIY5Z1OpF5h5eVVHCKXc/HOzEkW5jsTgZV92Lp18LrJa5wsDP8Qo1ekr9QxHjw+4Hqw pTlgEaiSyxHpfNTPf+ILvPXBx2Pz0bRQjVszt43sQYVAtJyvIUBjJwd9U/zj2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AoZPn7AYergNW8AqA4pyvip6CBLCXarT3KvS/IiiDSQ=; b=Iu1B+k2zvAee9cqj8CYLyrQPsMm2g2mf1qFy2E9So7G3uTsxxaU2ZylC5LhNTXFkptpE8E zjYM8e3s39xH09JO7UoMEBG1jqb3+2HW5qczmJER0oAlWEop1uWuvbprIotyn7m2rZXjFw GfYf5ke0lTD3YvUuzs2a5lQrJO5MkIUoHhxex2ekvcDfqK8kmNcIzH8W/2W74gGVMfQhuS gNJgP0Z4nc+TWF/K+/WIJKJbSeI8vAGX/AA9/dnsxsYe3rPbw4I17YBtONw9cDhgISjdOq 0snpf6J64aPGAFMVJgnsrK9aquZgXqWlyXQ/VMuJvupRB6i5NchCxoqZaaDj/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 4WXLs76p55zF1J; Mon, 29 Jul 2024 01:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1o3n5094595; Mon, 29 Jul 2024 01:50:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1o3KF094589; Mon, 29 Jul 2024 01:50:03 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:50:03 GMT Message-Id: <202407290150.46T1o3KF094589@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: ec84a986baf1 - main - vm: Remove kernel stack swapping support, part 11 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ec84a986baf18c9c2c5799ac8f77a57ec85652b9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ec84a986baf18c9c2c5799ac8f77a57ec85652b9 commit ec84a986baf18c9c2c5799ac8f77a57ec85652b9 Author: Mark Johnston AuthorDate: 2024-07-29 01:42:40 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:43:59 +0000 vm: Remove kernel stack swapping support, part 11 - Remove sysctls that control stack swapping, update documentation. - Remove vm_swapout_dummy.c, which serves no purpose now. Tested by: pho Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46129 --- lib/libsys/getrlimit.2 | 8 +---- share/man/man7/tuning.7 | 25 +------------ sys/conf/files | 1 - sys/vm/vm_swapout.c | 27 -------------- sys/vm/vm_swapout_dummy.c | 92 ----------------------------------------------- 5 files changed, 2 insertions(+), 151 deletions(-) diff --git a/lib/libsys/getrlimit.2 b/lib/libsys/getrlimit.2 index 00f25cff85cd..670da91a4484 100644 --- a/lib/libsys/getrlimit.2 +++ b/lib/libsys/getrlimit.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2016 +.Dd July 25, 2024 .Dt GETRLIMIT 2 .Os .Sh NAME @@ -88,12 +88,6 @@ The maximum number of pseudo-terminals this user id is allowed to create. When there is memory pressure and swap is available, prioritize eviction of a process' resident pages beyond this amount (in bytes). When memory is not under pressure, this rlimit is effectively ignored. -Even when there is memory pressure, the amount of available swap space and some -sysctl settings like -.Xr vm.swap_enabled -and -.Xr vm.swap_idle_enabled -can affect what happens to processes that have exceeded this size. .Pp Processes that exceed their set .Dv RLIMIT_RSS diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7 index caa1efb7d450..8cebfe62bb64 100644 --- a/share/man/man7/tuning.7 +++ b/share/man/man7/tuning.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 17, 2023 +.Dd July 25, 2024 .Dt TUNING 7 .Os .Sh NAME @@ -504,29 +504,6 @@ The read-only .Va kern.openfiles sysctl may be interrogated to determine the current number of open files on the system. -.Pp -The -.Va vm.swap_idle_enabled -sysctl is useful in large multi-user systems where you have lots of users -entering and leaving the system and lots of idle processes. -Such systems -tend to generate a great deal of continuous pressure on free memory reserves. -Turning this feature on and adjusting the swapout hysteresis (in idle -seconds) via -.Va vm.swap_idle_threshold1 -and -.Va vm.swap_idle_threshold2 -allows you to depress the priority of pages associated with idle processes -more quickly then the normal pageout algorithm. -This gives a helping hand -to the pageout daemon. -Do not turn this option on unless you need it, -because the tradeoff you are making is to essentially pre-page memory sooner -rather than later, eating more swap and disk bandwidth. -In a small system -this option will have a detrimental effect but in a large system that is -already doing moderate paging this option allows the VM system to stage -whole processes into and out of memory more easily. .Sh LOADER TUNABLES Some aspects of the system behavior may not be tunable at runtime because memory allocations they perform must occur early in the boot process. diff --git a/sys/conf/files b/sys/conf/files index 1f99c3586b86..08b8dbed43b0 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -5267,7 +5267,6 @@ vm/vm_phys.c standard vm/vm_radix.c standard vm/vm_reserv.c standard vm/vm_swapout.c optional !NO_SWAPPING -vm/vm_swapout_dummy.c optional NO_SWAPPING vm/vm_unix.c standard vm/vnode_pager.c standard xen/features.c optional xenhvm diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c index cb5dab7cacdd..016cdf2a2cc8 100644 --- a/sys/vm/vm_swapout.c +++ b/sys/vm/vm_swapout.c @@ -122,33 +122,6 @@ static struct kproc_desc vm_kp = { }; SYSINIT(vmdaemon, SI_SUB_KTHREAD_VM, SI_ORDER_FIRST, kproc_start, &vm_kp); -static int vm_swap_enabled = 1; -static int vm_swap_idle_enabled = 0; - -SYSCTL_INT(_vm, VM_SWAPPING_ENABLED, swap_enabled, CTLFLAG_RW, - &vm_swap_enabled, 0, - "Enable entire process swapout"); -SYSCTL_INT(_vm, OID_AUTO, swap_idle_enabled, CTLFLAG_RW, - &vm_swap_idle_enabled, 0, - "Allow swapout on idle criteria"); - -/* - * Swap_idle_threshold1 is the guaranteed swapped in time for a process - */ -static int swap_idle_threshold1 = 2; -SYSCTL_INT(_vm, OID_AUTO, swap_idle_threshold1, CTLFLAG_RW, - &swap_idle_threshold1, 0, - "Guaranteed swapped in time for a process"); - -/* - * Swap_idle_threshold2 is the time that a process can be idle before - * it will be swapped out, if idle swapping is enabled. - */ -static int swap_idle_threshold2 = 10; -SYSCTL_INT(_vm, OID_AUTO, swap_idle_threshold2, CTLFLAG_RW, - &swap_idle_threshold2, 0, - "Time before a process will be swapped out"); - static int vm_daemon_timeout = 0; SYSCTL_INT(_vm, OID_AUTO, vmdaemon_timeout, CTLFLAG_RW, &vm_daemon_timeout, 0, diff --git a/sys/vm/vm_swapout_dummy.c b/sys/vm/vm_swapout_dummy.c deleted file mode 100644 index 6fe15ad44f11..000000000000 --- a/sys/vm/vm_swapout_dummy.c +++ /dev/null @@ -1,92 +0,0 @@ -/*- - * SPDX-License-Identifier: (BSD-4-Clause AND MIT-CMU) - * - * Copyright (c) 1991 Regents of the University of California. - * All rights reserved. - * Copyright (c) 1994 John S. Dyson - * All rights reserved. - * Copyright (c) 1994 David Greenman - * All rights reserved. - * Copyright (c) 2005 Yahoo! Technologies Norway AS - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * The Mach Operating System project at Carnegie-Mellon University. - * - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. 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. - * - * - * Copyright (c) 1987, 1990 Carnegie-Mellon University. - * All rights reserved. - * - * Authors: Avadis Tevanian, Jr., Michael Wayne Young - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -static int vm_swap_enabled = 0; -SYSCTL_INT(_vm, VM_SWAPPING_ENABLED, swap_enabled, CTLFLAG_RD, - &vm_swap_enabled, 0, - "Enable entire process swapout"); - -static int vm_swap_idle_enabled = 0; -SYSCTL_INT(_vm, OID_AUTO, swap_idle_enabled, CTLFLAG_RD, - &vm_swap_idle_enabled, 0, - "Allow swapout on idle criteria"); From nobody Mon Jul 29 01:50:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs71bSsz5S752; Mon, 29 Jul 2024 01:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs70CGBz4nx3; Mon, 29 Jul 2024 01:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=00cbWKI2j9E9nsO0u42Us50zbsfIjC/nxT/z98PzhIQ=; b=OYIob/c/lVtuKcOM7NukGS/LonGJQnyLqfRfNMCMpUh3YwjPqCh51TguBHWjFuD5SL6lQQ IPYN1s6NkPukW/05ulvtYJBnf5KoU76vvLtzniG2J+R9muecP2ELlja52hW5y4C+kT6bmX v/EqfpNyD2aD/pYcJVY7++WZ3Tz2iF9uEUREG+wRJAaoUMHz1S2iEf6geM3MhJhND3ZjTZ rNrdqPQu/KoWOz/LRSGA0ixVeOtpHV6dzfNvtJM87HVhWe2h1cEURWAKGVC0sXczTKPcZm qesdmZoNT9Y7OEiYYeup1l4G6diVA1M6nz6C/2UMjCYIorsQndL7EjFbBDAv8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217803; a=rsa-sha256; cv=none; b=iUfQw/lgrTg62tExctC3INsNIJdpdR/0k6Nl1p6xCQ4vRsnM2JP2YTOA0+7qimXWmdY1Zd 3CTBodRMm7wdMqnqjYw/EesxDFxBXHKYJ12AU6ywzD56dIKXeSGnoyZw9OohF5wkhEtrA2 78u/3sJN7SSpYHXlKhUN3dqBNj1MmkKXeL5v7g793sbroaIKfVLbEoG05PdiRZKDsZ28Hv wmS/qjkl3ZNYEqLOKGROiHRQkS7rly3uDJi6EEiKkRdA4JncZuEmTqiKQkU2UpnGWP5+RW 1u8ocJ2bdNG4c5jcg5SHzMU1KJeZ0Ahu478sZ+7Ws6gSWxoAI+p4gNDVMaS1BA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=00cbWKI2j9E9nsO0u42Us50zbsfIjC/nxT/z98PzhIQ=; b=OdSHpNxD+NddhHuI+1XvUiKZ4qXB5w8jLb6CIyQn9gVNEYEhPnuZSvXoe5gT1XBZUPvovg +26gAf1Bn1lFHvXTdYkLKwPtumr7JvHD/DD/5u6pRuM3RWFs+ZXsyitc7u607N1WqZA2CD MvaMy+Bg7caIXT7+lMUKLbwuuCQ4YTMRWkq7KvcveGybrXpwW60JvY0NOIvRWfxjtpyDrI vU5ZMW5QyoEByJIyMgvggF0DcYUGji1AsX7MB6+ShxwgS10t/lGZn+zlbFA2ZLjdNVc49D IpH0KJs5vv9luop1d1y23PocwbM1i7z+Jyug7nJjpu4J7vCVNRMOPVJB1wXKfA== 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 4WXLs66Bq5zFWX; Mon, 29 Jul 2024 01:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1o2DP094313; Mon, 29 Jul 2024 01:50:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1o2vk094306; Mon, 29 Jul 2024 01:50:02 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:50:02 GMT Message-Id: <202407290150.46T1o2vk094306@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: 01518f5eede7 - main - sleepqueue: Remove kernel stack swapping support, part 10 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 01518f5eede79cf65319d455eb50e78c9efa2b51 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=01518f5eede79cf65319d455eb50e78c9efa2b51 commit 01518f5eede79cf65319d455eb50e78c9efa2b51 Author: Mark Johnston AuthorDate: 2024-07-29 01:42:19 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:43:59 +0000 sleepqueue: Remove kernel stack swapping support, part 10 - Remove kick_proc0(). - Make the return type of sleepq_broadcast(), sleepq_signal(), etc., void. - Fix up callers. Tested by: pho Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46128 --- sys/compat/linuxkpi/common/src/linux_compat.c | 8 +--- sys/compat/linuxkpi/common/src/linux_schedule.c | 14 ++---- sys/dev/qat/qat_common/adf_aer.c | 8 +--- sys/kern/kern_condvar.c | 19 +++----- sys/kern/kern_lock.c | 59 +++++++++---------------- sys/kern/kern_sx.c | 22 +++------ sys/kern/kern_synch.c | 22 ++------- sys/kern/subr_sleepqueue.c | 28 +++++------- sys/sys/proc.h | 1 - sys/sys/sleepqueue.h | 8 ++-- sys/vm/vm_glue.c | 8 ---- 11 files changed, 57 insertions(+), 140 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 9962154cffd9..ebc1dbabd567 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2068,20 +2068,16 @@ SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); void linux_complete_common(struct completion *c, int all) { - int wakeup_swapper; - sleepq_lock(c); if (all) { c->done = UINT_MAX; - wakeup_swapper = sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); + sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); } else { if (c->done != UINT_MAX) c->done++; - wakeup_swapper = sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); + sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); } sleepq_release(c); - if (wakeup_swapper) - kick_proc0(); } /* diff --git a/sys/compat/linuxkpi/common/src/linux_schedule.c b/sys/compat/linuxkpi/common/src/linux_schedule.c index 3349a4aa8d72..fa20a11f5ec7 100644 --- a/sys/compat/linuxkpi/common/src/linux_schedule.c +++ b/sys/compat/linuxkpi/common/src/linux_schedule.c @@ -98,18 +98,16 @@ linux_msleep_interruptible(unsigned int ms) static int wake_up_task(struct task_struct *task, unsigned int state) { - int ret, wakeup_swapper; + int ret; - ret = wakeup_swapper = 0; + ret = 0; sleepq_lock(task); if ((atomic_read(&task->state) & state) != 0) { set_task_state(task, TASK_WAKING); - wakeup_swapper = sleepq_signal(task, SLEEPQ_SLEEP, 0, 0); + sleepq_signal(task, SLEEPQ_SLEEP, 0, 0); ret = 1; } sleepq_release(task); - if (wakeup_swapper) - kick_proc0(); return (ret); } @@ -330,13 +328,9 @@ linux_schedule_timeout(int timeout) static void wake_up_sleepers(void *wchan) { - int wakeup_swapper; - sleepq_lock(wchan); - wakeup_swapper = sleepq_signal(wchan, SLEEPQ_SLEEP, 0, 0); + sleepq_signal(wchan, SLEEPQ_SLEEP, 0, 0); sleepq_release(wchan); - if (wakeup_swapper) - kick_proc0(); } #define bit_to_wchan(word, bit) ((void *)(((uintptr_t)(word) << 6) | (bit))) diff --git a/sys/dev/qat/qat_common/adf_aer.c b/sys/dev/qat/qat_common/adf_aer.c index 7fdeba873420..6be8ab04bbd7 100644 --- a/sys/dev/qat/qat_common/adf_aer.c +++ b/sys/dev/qat/qat_common/adf_aer.c @@ -28,17 +28,13 @@ static struct workqueue_struct *device_reset_wq; void linux_complete_common(struct completion *c, int all) { - int wakeup_swapper; - sleepq_lock(c); c->done++; if (all) - wakeup_swapper = sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); + sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); else - wakeup_swapper = sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); + sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); sleepq_release(c); - if (wakeup_swapper) - kick_proc0(); } /* reset dev data */ diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c index a55863595ce2..517b83d90243 100644 --- a/sys/kern/kern_condvar.c +++ b/sys/kern/kern_condvar.c @@ -427,16 +427,13 @@ _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock, } /* - * Signal a condition variable, wakes up one waiting thread. Will also wakeup - * the swapper if the process is not in memory, so that it can bring the - * sleeping process in. Note that this may also result in additional threads - * being made runnable. Should be called with the same mutex as was passed to - * cv_wait held. + * Signal a condition variable, wakes up one waiting thread. Note that this may + * also result in additional threads being made runnable. Should be called with + * the same mutex as was passed to cv_wait held. */ void cv_signal(struct cv *cvp) { - if (cvp->cv_waiters == 0) return; sleepq_lock(cvp); @@ -450,8 +447,7 @@ cv_signal(struct cv *cvp) } else { if (cvp->cv_waiters < CV_WAITERS_BOUND) cvp->cv_waiters--; - if (sleepq_signal(cvp, SLEEPQ_CONDVAR | SLEEPQ_DROP, 0, 0)) - kick_proc0(); + sleepq_signal(cvp, SLEEPQ_CONDVAR | SLEEPQ_DROP, 0, 0); } } @@ -462,23 +458,18 @@ cv_signal(struct cv *cvp) void cv_broadcastpri(struct cv *cvp, int pri) { - int wakeup_swapper; - if (cvp->cv_waiters == 0) return; /* * XXX sleepq_broadcast pri argument changed from -1 meaning * no pri to 0 meaning no pri. */ - wakeup_swapper = 0; if (pri == -1) pri = 0; sleepq_lock(cvp); if (cvp->cv_waiters > 0) { cvp->cv_waiters = 0; - wakeup_swapper = sleepq_broadcast(cvp, SLEEPQ_CONDVAR, pri, 0); + sleepq_broadcast(cvp, SLEEPQ_CONDVAR, pri, 0); } sleepq_release(cvp); - if (wakeup_swapper) - kick_proc0(); } diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 4700ee0f8f98..4771496f950a 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -186,7 +186,7 @@ static __always_inline bool lockmgr_sunlock_try(struct lock *lk, uintptr_t *xp); static void -lockmgr_exit(u_int flags, struct lock_object *ilk, int wakeup_swapper) +lockmgr_exit(u_int flags, struct lock_object *ilk) { struct lock_class *class; @@ -194,9 +194,6 @@ lockmgr_exit(u_int flags, struct lock_object *ilk, int wakeup_swapper) class = LOCK_CLASS(ilk); class->lc_unlock(ilk); } - - if (__predict_false(wakeup_swapper)) - kick_proc0(); } static void @@ -310,14 +307,13 @@ sleeplk(struct lock *lk, u_int flags, struct lock_object *ilk, return (error); } -static __inline int +static __inline void wakeupshlk(struct lock *lk, const char *file, int line) { uintptr_t v, x, orig_x; u_int realexslp; - int queue, wakeup_swapper; + int queue; - wakeup_swapper = 0; for (;;) { x = lockmgr_read_value(lk); if (lockmgr_sunlock_try(lk, &x)) @@ -361,9 +357,8 @@ retry_sleepq: LOCK_LOG2(lk, "%s: %p waking up threads on the exclusive queue", __func__, lk); - wakeup_swapper = - sleepq_broadcast(&lk->lock_object, - SLEEPQ_LK, 0, SQ_EXCLUSIVE_QUEUE); + sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, + SQ_EXCLUSIVE_QUEUE); queue = SQ_SHARED_QUEUE; } } else { @@ -390,14 +385,12 @@ retry_sleepq: LOCK_LOG3(lk, "%s: %p waking up threads on the %s queue", __func__, lk, queue == SQ_SHARED_QUEUE ? "shared" : "exclusive"); - wakeup_swapper |= sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, - 0, queue); + sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, queue); sleepq_release(&lk->lock_object); break; } LOCKSTAT_PROFILE_RELEASE_RWLOCK(lockmgr__release, lk, LOCKSTAT_READER); - return (wakeup_swapper); } static void @@ -730,7 +723,7 @@ retry_sleepq: } out: - lockmgr_exit(flags, ilk, 0); + lockmgr_exit(flags, ilk); return (error); } @@ -968,7 +961,7 @@ retry_sleepq: } out: - lockmgr_exit(flags, ilk, 0); + lockmgr_exit(flags, ilk); return (error); } @@ -1028,7 +1021,7 @@ out_xlock: error = lockmgr_xlock_hard(lk, flags, ilk, file, line, lwa); flags &= ~LK_INTERLOCK; out: - lockmgr_exit(flags, ilk, 0); + lockmgr_exit(flags, ilk); return (error); } @@ -1100,17 +1093,10 @@ lockmgr_lock_flags(struct lock *lk, u_int flags, struct lock_object *ilk, static __noinline int lockmgr_sunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_object *ilk, const char *file, int line) - { - int wakeup_swapper = 0; - - if (SCHEDULER_STOPPED()) - goto out; - - wakeup_swapper = wakeupshlk(lk, file, line); - -out: - lockmgr_exit(flags, ilk, wakeup_swapper); + if (!SCHEDULER_STOPPED()) + wakeupshlk(lk, file, line); + lockmgr_exit(flags, ilk); return (0); } @@ -1119,7 +1105,6 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_obje const char *file, int line) { uintptr_t tid, v; - int wakeup_swapper = 0; u_int realexslp; int queue; @@ -1188,8 +1173,8 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_obje LOCK_LOG2(lk, "%s: %p waking up threads on the exclusive queue", __func__, lk); - wakeup_swapper = sleepq_broadcast(&lk->lock_object, - SLEEPQ_LK, 0, SQ_EXCLUSIVE_QUEUE); + sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, + SQ_EXCLUSIVE_QUEUE); queue = SQ_SHARED_QUEUE; } } else { @@ -1207,11 +1192,11 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_obje __func__, lk, queue == SQ_SHARED_QUEUE ? "shared" : "exclusive"); atomic_store_rel_ptr(&lk->lk_lock, v); - wakeup_swapper |= sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, queue); + sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, queue); sleepq_release(&lk->lock_object); out: - lockmgr_exit(flags, ilk, wakeup_swapper); + lockmgr_exit(flags, ilk); return (0); } @@ -1309,7 +1294,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, const char *iwmesg; uintptr_t tid, v, x; u_int op, realexslp; - int error, ipri, itimo, queue, wakeup_swapper; + int error, ipri, itimo, queue; #ifdef LOCK_PROFILING uint64_t waittime = 0; int contested = 0; @@ -1361,7 +1346,6 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, } } - wakeup_swapper = 0; switch (op) { case LK_SHARED: return (lockmgr_slock_hard(lk, flags, ilk, file, line, &lwa)); @@ -1519,8 +1503,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, LOCK_LOG2(lk, "%s: %p waking up threads on the exclusive queue", __func__, lk); - wakeup_swapper = - sleepq_broadcast( + sleepq_broadcast( &lk->lock_object, SLEEPQ_LK, 0, SQ_EXCLUSIVE_QUEUE); @@ -1536,8 +1519,8 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, "%s: %p waking up all threads on the %s queue", __func__, lk, queue == SQ_SHARED_QUEUE ? "shared" : "exclusive"); - wakeup_swapper |= sleepq_broadcast( - &lk->lock_object, SLEEPQ_LK, 0, queue); + sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, + queue); /* * If shared waiters have been woken up we need @@ -1604,8 +1587,6 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, if (flags & LK_INTERLOCK) class->lc_unlock(ilk); - if (wakeup_swapper) - kick_proc0(); return (error); } diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c index 18e6ba232c4a..4cc8ac8ce106 100644 --- a/sys/kern/kern_sx.c +++ b/sys/kern/kern_sx.c @@ -474,7 +474,6 @@ void sx_downgrade_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF) { uintptr_t x; - int wakeup_swapper; if (SCHEDULER_STOPPED()) return; @@ -516,18 +515,14 @@ sx_downgrade_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF) * Preserve SX_LOCK_EXCLUSIVE_WAITERS while downgraded to a single * shared lock. If there are any shared waiters, wake them up. */ - wakeup_swapper = 0; x = sx->sx_lock; atomic_store_rel_ptr(&sx->sx_lock, SX_SHARERS_LOCK(1) | (x & SX_LOCK_EXCLUSIVE_WAITERS)); if (x & SX_LOCK_SHARED_WAITERS) - wakeup_swapper = sleepq_broadcast(&sx->lock_object, SLEEPQ_SX, - 0, SQ_SHARED_QUEUE); + sleepq_broadcast(&sx->lock_object, SLEEPQ_SX, 0, + SQ_SHARED_QUEUE); sleepq_release(&sx->lock_object); - if (wakeup_swapper) - kick_proc0(); - out: curthread->td_sx_slocks++; LOCK_LOG_LOCK("XDOWNGRADE", &sx->lock_object, 0, 0, file, line); @@ -920,7 +915,7 @@ void _sx_xunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_LINE_ARG_DEF) { uintptr_t tid, setx; - int queue, wakeup_swapper; + int queue; if (SCHEDULER_STOPPED()) return; @@ -977,11 +972,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_LINE_ARG_DEF) __func__, sx, queue == SQ_SHARED_QUEUE ? "shared" : "exclusive"); - wakeup_swapper = sleepq_broadcast(&sx->lock_object, SLEEPQ_SX, 0, - queue); + sleepq_broadcast(&sx->lock_object, SLEEPQ_SX, 0, queue); sleepq_release(&sx->lock_object); - if (wakeup_swapper) - kick_proc0(); } static __always_inline bool @@ -1333,7 +1325,6 @@ static void __noinline _sx_sunlock_hard(struct sx *sx, struct thread *td, uintptr_t x LOCK_FILE_LINE_ARG_DEF) { - int wakeup_swapper = 0; uintptr_t setx, queue; if (SCHEDULER_STOPPED()) @@ -1366,14 +1357,11 @@ _sx_sunlock_hard(struct sx *sx, struct thread *td, uintptr_t x if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p waking up all thread on" "exclusive queue", __func__, sx); - wakeup_swapper = sleepq_broadcast(&sx->lock_object, SLEEPQ_SX, - 0, queue); + sleepq_broadcast(&sx->lock_object, SLEEPQ_SX, 0, queue); td->td_sx_slocks--; break; } sleepq_release(&sx->lock_object); - if (wakeup_swapper) - kick_proc0(); out_lockstat: LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); } diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 9bb6079c0c20..8e956324ee23 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -344,16 +344,9 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) void wakeup(const void *ident) { - int wakeup_swapper; - sleepq_lock(ident); - wakeup_swapper = sleepq_broadcast(ident, SLEEPQ_SLEEP, 0, 0); + sleepq_broadcast(ident, SLEEPQ_SLEEP, 0, 0); sleepq_release(ident); - if (wakeup_swapper) { - KASSERT(ident != &proc0, - ("wakeup and wakeup_swapper and proc0")); - kick_proc0(); - } } /* @@ -364,24 +357,15 @@ wakeup(const void *ident) void wakeup_one(const void *ident) { - int wakeup_swapper; - sleepq_lock(ident); - wakeup_swapper = sleepq_signal(ident, SLEEPQ_SLEEP | SLEEPQ_DROP, 0, 0); - if (wakeup_swapper) - kick_proc0(); + sleepq_signal(ident, SLEEPQ_SLEEP | SLEEPQ_DROP, 0, 0); } void wakeup_any(const void *ident) { - int wakeup_swapper; - sleepq_lock(ident); - wakeup_swapper = sleepq_signal(ident, SLEEPQ_SLEEP | SLEEPQ_UNFAIR | - SLEEPQ_DROP, 0, 0); - if (wakeup_swapper) - kick_proc0(); + sleepq_signal(ident, SLEEPQ_SLEEP | SLEEPQ_UNFAIR | SLEEPQ_DROP, 0, 0); } /* diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index 0b792d752e94..0af666653352 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -920,7 +920,7 @@ sleepq_init(void *mem, int size, int flags) /* * Find thread sleeping on a wait channel and resume it. */ -int +void sleepq_signal(const void *wchan, int flags, int pri, int queue) { struct sleepqueue_chain *sc; @@ -935,7 +935,7 @@ sleepq_signal(const void *wchan, int flags, int pri, int queue) if (sq == NULL) { if (flags & SLEEPQ_DROP) sleepq_release(wchan); - return (0); + return; } KASSERT(sq->sq_type == (flags & SLEEPQ_TYPE), ("%s: mismatch between sleep/wakeup and cv_*", __func__)); @@ -971,7 +971,6 @@ sleepq_signal(const void *wchan, int flags, int pri, int queue) MPASS(besttd != NULL); sleepq_resume_thread(sq, besttd, pri, (flags & SLEEPQ_DROP) ? 0 : SRQ_HOLD); - return (0); } static bool @@ -984,7 +983,7 @@ match_any(struct thread *td __unused) /* * Resume all threads sleeping on a specified wait channel. */ -int +void sleepq_broadcast(const void *wchan, int flags, int pri, int queue) { struct sleepqueue *sq; @@ -993,18 +992,18 @@ sleepq_broadcast(const void *wchan, int flags, int pri, int queue) KASSERT(wchan != NULL, ("%s: invalid NULL wait channel", __func__)); MPASS((queue >= 0) && (queue < NR_SLEEPQS)); sq = sleepq_lookup(wchan); - if (sq == NULL) - return (0); - KASSERT(sq->sq_type == (flags & SLEEPQ_TYPE), - ("%s: mismatch between sleep/wakeup and cv_*", __func__)); + if (sq != NULL) { + KASSERT(sq->sq_type == (flags & SLEEPQ_TYPE), + ("%s: mismatch between sleep/wakeup and cv_*", __func__)); - return (sleepq_remove_matching(sq, queue, match_any, pri)); + sleepq_remove_matching(sq, queue, match_any, pri); + } } /* * Resume threads on the sleep queue that match the given predicate. */ -int +void sleepq_remove_matching(struct sleepqueue *sq, int queue, bool (*matches)(struct thread *), int pri) { @@ -1020,8 +1019,6 @@ sleepq_remove_matching(struct sleepqueue *sq, int queue, if (matches(td)) sleepq_resume_thread(sq, td, pri, SRQ_HOLD); } - - return (0); } /* @@ -1113,7 +1110,7 @@ sleepq_remove(struct thread *td, const void *wchan) * * Requires thread lock on entry, releases on return. */ -int +void sleepq_abort(struct thread *td, int intrval) { struct sleepqueue *sq; @@ -1131,7 +1128,7 @@ sleepq_abort(struct thread *td, int intrval) */ if (td->td_flags & TDF_TIMEOUT) { thread_unlock(td); - return (0); + return; } CTR3(KTR_PROC, "sleepq_abort: thread %p (pid %ld, %s)", @@ -1145,7 +1142,7 @@ sleepq_abort(struct thread *td, int intrval) */ if (!TD_IS_SLEEPING(td)) { thread_unlock(td); - return (0); + return; } wchan = td->td_wchan; MPASS(wchan != NULL); @@ -1154,7 +1151,6 @@ sleepq_abort(struct thread *td, int intrval) /* Thread is asleep on sleep queue sq, so wake it up. */ sleepq_resume_thread(sq, td, 0, 0); - return (0); } void diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 5e3f0e2e117d..57c910d8fce0 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1161,7 +1161,6 @@ void kqtimer_proc_continue(struct proc *p); void kern_proc_vmmap_resident(struct vm_map *map, struct vm_map_entry *entry, int *resident_count, bool *super); void kern_yield(int); -void kick_proc0(void); void killjobc(void); int leavepgrp(struct proc *p); int maybe_preempt(struct thread *td); diff --git a/sys/sys/sleepqueue.h b/sys/sys/sleepqueue.h index 9e456141393b..f28a7f75a50c 100644 --- a/sys/sys/sleepqueue.h +++ b/sys/sys/sleepqueue.h @@ -86,21 +86,21 @@ struct thread; #define SLEEPQ_DROP 0x400 /* Return without lock held. */ void init_sleepqueues(void); -int sleepq_abort(struct thread *td, int intrval); +void sleepq_abort(struct thread *td, int intrval); void sleepq_add(const void *wchan, struct lock_object *lock, const char *wmesg, int flags, int queue); struct sleepqueue *sleepq_alloc(void); -int sleepq_broadcast(const void *wchan, int flags, int pri, int queue); +void sleepq_broadcast(const void *wchan, int flags, int pri, int queue); void sleepq_chains_remove_matching(bool (*matches)(struct thread *)); void sleepq_free(struct sleepqueue *sq); void sleepq_lock(const void *wchan); struct sleepqueue *sleepq_lookup(const void *wchan); void sleepq_release(const void *wchan); void sleepq_remove(struct thread *td, const void *wchan); -int sleepq_remove_matching(struct sleepqueue *sq, int queue, +void sleepq_remove_matching(struct sleepqueue *sq, int queue, bool (*matches)(struct thread *), int pri); void sleepq_remove_nested(struct thread *td); -int sleepq_signal(const void *wchan, int flags, int pri, int queue); +void sleepq_signal(const void *wchan, int flags, int pri, int queue); void sleepq_set_timeout_sbt(const void *wchan, sbintime_t sbt, sbintime_t pr, int flags); #define sleepq_set_timeout(wchan, timo) \ diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 2627ee75dbff..5128c46a1d9f 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -836,11 +836,3 @@ vm_waitproc(struct proc *p) vmspace_exitfree(p); /* and clean-out the vmspace */ } - -/* - * This used to kick the thread which faults in threads. - */ -void -kick_proc0(void) -{ -} From nobody Mon Jul 29 01:50:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLs93CbHz5S7PG; Mon, 29 Jul 2024 01:50:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLs91B3Hz4nkZ; Mon, 29 Jul 2024 01:50:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=56BoOxuvRUmgKrCbHw15j3kkWpWdHXjV8XTv7mKIvbA=; b=CR6/D9iLBEAJ+2DMOXU+z9Sris+s/g2U/PQB6UITx/QQPZFDEKMYOR2N2qZadaRhY+rjrD Yy7/c67VRzAexbI9byHY+9eE+E/doLX3ucGX231wGjGcf9qnCKv8UIPwAJlp+xubqOHKsq JdkpUpHLgV1dUKndwhngbc1zAUztj+7DpMvPny8L7ZOluTTebrPG9Xzf7B3iKQgAcRBQC8 ls1+dmGBRuTWSGu5PtzdSSnFZZUgvQopN1h3TqR2TF8xN4/3+jWhTXtbLwQL/y0SqjqveM yZI5gy+StLk/3f+QIuxpRrh/r05wiurRKoCH6F/FRs8MVO8r9L68paz4ZfS+wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217805; a=rsa-sha256; cv=none; b=ZTGvM5yiNsvbXCszjQj0aPe1YX6ZElwyDPb5sp6W9qC9Nby1aQdZXJg6Ev3M8y51E07B7k 1tEKkSEDI1gdKY3AquG7iwfilsFc62UL/Hptfy2wwyWH13WtqCskVFuEDTjGbkiClawTES ApfpGoCSCz4Ihity8xh0s6NRwoBFTxcJPh8ACMc/sclfm3SSmo6vvgv0Kb8dcua6u0Cq55 fI1Svv7GE1DYq8hrG8FE58Ob9QfK+yaR6YIMD0k0AGZXN36Zr4W0Ax4c2aFyCkw8E1Mm+Z CW2J5MWKt3I2J7XfXp30x+ovGTxIf+Ihkz63+b0flsnsPBKN/bLFXo7cdtJVZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=56BoOxuvRUmgKrCbHw15j3kkWpWdHXjV8XTv7mKIvbA=; b=Hwj7IYa7tRcqmJS91HxkINdDH/t7c/ZvcyOqACJFkZ1Dr24oChqVG3kRIYGrkLZUv/fEV6 9cnEzQ3fboYIHHQCm9GItYEYq+ayjzKX5Lw4L5XXgRfKCtn0x++rZvTSSIFxWQn7mXmDPe uUGjGtnPTX+akioV4QaqHw92uKZWMAACovMTBp7yarqU7deonxwDihColkk+pbVKGAO6J5 CQuHfXuOE4E5+xoWFwxkX1zrwu57cy+OVMtAkjErcOoJc/NW7k5PexnKuRgKIGBlQZ4EXW xRIWQGeMCVNYQ9+jaXu6DBrRP8rN+1upqHw56yZJZzqdJXu4v4IpU1eV6P5RMA== 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 4WXLs90KYpzF8N; Mon, 29 Jul 2024 01:50:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1o4HQ094903; Mon, 29 Jul 2024 01:50:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1o4fH094897; Mon, 29 Jul 2024 01:50:04 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:50:04 GMT Message-Id: <202407290150.46T1o4fH094897@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: 6aa98f78cc6e - main - conf: Remove kernel stack swapping support, part 12 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6aa98f78cc6e527b801cabddf6881ab5c9256934 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6aa98f78cc6e527b801cabddf6881ab5c9256934 commit 6aa98f78cc6e527b801cabddf6881ab5c9256934 Author: Mark Johnston AuthorDate: 2024-07-29 01:42:54 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:43:59 +0000 conf: Remove kernel stack swapping support, part 12 Remove the NO_SWAPPING option. There is still some code in vm_swapout.c, but it relates to RACCT handling. Remove the option and make compilation of vm_swapout.c conditional on RACCT. Tested by: pho Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46130 --- sys/arm/conf/ARMADAXP | 1 - sys/conf/NOTES | 10 ---------- sys/conf/files | 2 +- sys/conf/options | 1 - sys/powerpc/conf/dpaa/DPAA | 1 - sys/vm/vm_swapout.c | 5 ----- 6 files changed, 1 insertion(+), 19 deletions(-) diff --git a/sys/arm/conf/ARMADAXP b/sys/arm/conf/ARMADAXP index e198651e69b3..9c045e65e752 100644 --- a/sys/arm/conf/ARMADAXP +++ b/sys/arm/conf/ARMADAXP @@ -40,7 +40,6 @@ options ROOTDEVNAME=\"ufs:/dev/da0p1\" options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT -options NO_SWAPPING # Pseudo devices device pty diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 685125b782ca..555bae187271 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2390,16 +2390,6 @@ options SW_WATCHDOG # options DEADLKRES -# -# Disable swapping of stack pages. This option removes all -# code which actually performs swapping, so it's not possible to turn -# it back on at run-time. -# -# This is sometimes usable for systems which don't have any swap space -# (see also sysctl "vm.disable_swapspace_pageouts") -# -#options NO_SWAPPING - # Set the number of sf_bufs to allocate. sf_bufs are virtual buffers # for sendfile(2) that are used to map file VM pages, and normally # default to a quantity that is roughly 16*MAXUSERS+512. You would diff --git a/sys/conf/files b/sys/conf/files index 08b8dbed43b0..5250b65135e6 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -5266,7 +5266,7 @@ vm/vm_pager.c standard vm/vm_phys.c standard vm/vm_radix.c standard vm/vm_reserv.c standard -vm/vm_swapout.c optional !NO_SWAPPING +vm/vm_swapout.c optional racct vm/vm_unix.c standard vm/vnode_pager.c standard xen/features.c optional xenhvm diff --git a/sys/conf/options b/sys/conf/options index 8464fd919ff0..899fd7869a5e 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -630,7 +630,6 @@ VM_KMEM_SIZE_SCALE opt_vm.h VM_KMEM_SIZE_MAX opt_vm.h VM_NRESERVLEVEL opt_vm.h VM_LEVEL_0_ORDER opt_vm.h -NO_SWAPPING opt_vm.h MALLOC_MAKE_FAILURES opt_vm.h MALLOC_PROFILE opt_vm.h MALLOC_DEBUG_MAXZONES opt_vm.h diff --git a/sys/powerpc/conf/dpaa/DPAA b/sys/powerpc/conf/dpaa/DPAA index 742fdc9da325..323c71048c12 100644 --- a/sys/powerpc/conf/dpaa/DPAA +++ b/sys/powerpc/conf/dpaa/DPAA @@ -34,7 +34,6 @@ options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -options NO_SWAPPING options KDB #Enable the kernel debugger options DDB #Support DDB diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c index 016cdf2a2cc8..6f7f584ac25f 100644 --- a/sys/vm/vm_swapout.c +++ b/sys/vm/vm_swapout.c @@ -68,7 +68,6 @@ * rights to redistribute these changes. */ -#include #include "opt_kstack_pages.h" #include "opt_kstack_max_pages.h" #include "opt_vm.h" @@ -293,12 +292,10 @@ vm_daemon(void) struct thread *td; struct vmspace *vm; int breakout, tryagain, attempts; -#ifdef RACCT uint64_t rsize, ravailable; if (racct_enable && vm_daemon_timeout == 0) vm_daemon_timeout = hz; -#endif while (TRUE) { mtx_lock(&vm_daemon_mtx); @@ -371,7 +368,6 @@ again: &vm->vm_map, limit); size = vmspace_resident_count(vm); } -#ifdef RACCT if (racct_enable) { rsize = IDX_TO_OFF(size); PROC_LOCK(p); @@ -409,7 +405,6 @@ again: tryagain = 1; } } -#endif vmspace_free(vm); sx_slock(&allproc_lock); PRELE(p); From nobody Mon Jul 29 01:50:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXLsB596Vz5S7R7; Mon, 29 Jul 2024 01:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXLsB1DSGz4nmj; Mon, 29 Jul 2024 01:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KN7pG9fmPEEVQugDvFgERttCHiefZV7pDuO3p7YVfas=; b=u9ZV7zhFraZlvXJkuxnIS8YB7Ld4KmfdtbO/LUow2MVI/v3RU/v5ZqwGvbi0SwatgCNA14 P1IHDQWEOHyAVkGno9cBCDk+Fer9+Bs9S5DvRi8zUgHjKEcWewuqYyBCV3JtIPh0DZG5pE DuO9anXrfiTNQTSE/cnWwvK4dsBVZuGcyegcCnPIcCty+d3lh40r6tun7fz2EVwrYXjssZ mRIr75pIq1oQqSC4JQ2hUOLQAKsfoLqwKInc4dZN1KDy7WdQdXD9pBf/4dzi6G5Xuw496q Cve8povuBgnSqsQxuBFy3FNNEaUwc0fhLhQWTTx0ocApHHq4CD20q7OFqIBKbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722217806; a=rsa-sha256; cv=none; b=SURoXcbK3+JW5GIgozj/kISOq2AL6Uemv0Jr+FNBYtAxv97bBIuwJp21RHOfbKTjq+3/tD ibL9e9Q/LazOxcfCezwk0GiFiZND93SbBIjXKnXgz9z3BDvTNzHNA+pT1IK7JYFduteuhg vnANG6FV+fhGFQre/GwI01vNRw16ZEsS6+K0RVfxToxQLHJX/2kXCcOIbq21lL6irejwWC 2Z/gsHUsuoxuxkFpWUtSnWUzKtwMF5PZMNlUPXjChm3e+UFq3MbRZLHHxtYhR69K6N0PA5 dDBjINNJThw14r03TNbhs+N5GwanXwGGH0vjMsAokwv3IikwAlybLof+JUyEiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722217806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KN7pG9fmPEEVQugDvFgERttCHiefZV7pDuO3p7YVfas=; b=AS9iaD7vne7m+wTLSKEAaM5jOK5h6Lm+6wTUt9rvheZ9KAOoi/sC140sKRTFHPe0XmiiEy bd1VrmXWKkOKArwVQszVEbOvNFPf6LFhJUYXDzHw971i6JkVcBFKvrzYpHr9aVACz1pA1w PWblN+z9Eq9Ytuw8pAS7H3ngfOnK9n7zqmNBH+0qKuqNgwsUlNCjtOBstGC+y2Wcemunay bJB73DiEPsRCIRbMjBAxa5VSZ7XOuqa2kyY8MqHPX4O361VWzA9TCX3qcVFjQHISArEeth /OdQC0ufLSc0EOAiwz6N2mJAElHpBCvDA6wYEoPnKLmqUkVlQk4Q7SZYywpnkw== 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 4WXLsB0rprzFJ8; Mon, 29 Jul 2024 01:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T1o6io095190; Mon, 29 Jul 2024 01:50:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T1o6IN095185; Mon, 29 Jul 2024 01:50:06 GMT (envelope-from git) Date: Mon, 29 Jul 2024 01:50:06 GMT Message-Id: <202407290150.46T1o6IN095185@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: a1740cb93639 - main - sys: Bump __FreeBSD_version to mark stack swapout removal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a1740cb93639648b41055958ad8c7f6083efdc96 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a1740cb93639648b41055958ad8c7f6083efdc96 commit a1740cb93639648b41055958ad8c7f6083efdc96 Author: Mark Johnston AuthorDate: 2024-07-29 01:43:06 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 01:43:59 +0000 sys: Bump __FreeBSD_version to mark stack swapout removal This is meant to cover the corresponding changes to various proc/thread flags and sleepqueue/scheduler KPIs. --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 1ec875a0046e..7461f7dec403 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500021 +#define __FreeBSD_version 1500022 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Mon Jul 29 06:20:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXSrm11ryz5RKFx; Mon, 29 Jul 2024 06:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXSrm0ZgKz40Mf; Mon, 29 Jul 2024 06:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722234008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J8q+f6Z9zWMy8GqKQCBi7PxHX/XRhBF9K80gHjXDZL0=; b=M7aMw/EsZVru1iMyrrjTMB8QQJlaDNqv/Ng/kFjBXTxUvpyTrLypwRP9uPmoUL5Sn+/acD EluNEXJRWLK/vANaB0mc32qSL0IV99XdSx2/Hxqze3KwR7105j0sV5XNq42OOV9ZGRojTB zl4ubCOahtpWmA3yIsxdWZGHQ0N/s4oAtxtWmiCdtToqw3b5S7dwpj1eaT2BFWNMsEu+Db j9RjlslPt+LVX0hEcpm34ZrzdzbB7fwSuHwq2xGGafY+gmASHA0hIwEiyrnAr3PSew1TOn 97S0uhQjK11nAuJa9suM0lZeB0o83GJnBrIA08JhU/UV8hx8pmrMabgxKlK8Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722234008; a=rsa-sha256; cv=none; b=RIbGbJVde189Ghwv7CX35Eh4OzfkbwWFKndnoSLgP3tsTDnHbAxttrJ7Rw1zqBcGu6YQJ1 YMa47lSRK86uijjdCnwic2JvhN/pAdMTMfi5W//SxaI7Ae9CWXCkQQQSvcAvZ9wgUbAZFh 1NVCWwT4GdQi4Z81f7OzJEGuIe9B8196jVbOCmt80nyvdNK3cQD4rW+dtRvHxqB7mo1lYi Rb32jz4O9cs7GNHQUI0JQ+P2++Zv34lCkgN+xG9GhvMmqsB8Pj/oFtRA7ii65PXYzfHNNj Q0MCqYcdR+QySc39X/u0NklTR3wAmaBNONCZVI5nPd3zSYwN5khpnMlFCvHCfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722234008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J8q+f6Z9zWMy8GqKQCBi7PxHX/XRhBF9K80gHjXDZL0=; b=fX7Ph7f0g3Ntf38ArLqFVBHABvoojpxKFo0lboCzfQ+vhQxb5s48r2olwy0Yb4mc0jDpii AvJfWRjjvrLeODzM+TxUGcCY6FaoKHklAhSlVIu39zZaEW87m4FCQCiIQAxIwxxa82JqLO LKmNfMJJ7Vo1OcJAKdhNbqhSwonel7o64/kRdV8TiSgHdVDruMFwyaQWVVuOOk1uBhzFxW p8E/XjQy+G2BqjJkWLt32/uOqHerMJabncCS1mONw8L126JXQUG8Q9lYtSPaQdJrq+XAkB wgaJ7rA8b55CPBpmRpSUvm4kOdGjPD1y1nI3fUEJ1yd1nN5zgM/AQWE9cLeoaw== 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 4WXSrm09lQzN0l; Mon, 29 Jul 2024 06:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T6K7hr053676; Mon, 29 Jul 2024 06:20:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T6K7Fn053671; Mon, 29 Jul 2024 06:20:07 GMT (envelope-from git) Date: Mon, 29 Jul 2024 06:20:07 GMT Message-Id: <202407290620.46T6K7Fn053671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 954692a14402 - stable/14 - dhclient: Ignore SIP servers DHCP option defined in RFC 3361 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 954692a144026860579cc525b5aa824b75719d6a Auto-Submitted: auto-generated The branch stable/14 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=954692a144026860579cc525b5aa824b75719d6a commit 954692a144026860579cc525b5aa824b75719d6a Author: Yuichiro NAITO AuthorDate: 2024-07-04 07:57:02 +0000 Commit: Michael Osipov CommitDate: 2024-07-29 06:19:41 +0000 dhclient: Ignore SIP servers DHCP option defined in RFC 3361 Ignore SIP servers dhcp option to shut up the warning message. This option is defined in the RFC 3361 and sent from NSD-G1000T router. PR: 280119 Reviewed by: jrm (mentor), brooks MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45873 (cherry picked from commit ac6dc5cde729a602252a0b80f82424861d2eb7b5) --- sbin/dhclient/dhclient.c | 1 + sbin/dhclient/dhcp.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 8179a5c34209..62e55eb4d01f 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2618,6 +2618,7 @@ check_option(struct client_lease *l, int option) case DHO_BOOTFILE_NAME: case DHO_DHCP_USER_CLASS_ID: case DHO_URL: + case DHO_SIP_SERVERS: case DHO_END: return (1); case DHO_CLASSLESS_ROUTES: diff --git a/sbin/dhclient/dhcp.h b/sbin/dhclient/dhcp.h index 300deb464238..99b69613934f 100644 --- a/sbin/dhclient/dhcp.h +++ b/sbin/dhclient/dhcp.h @@ -172,6 +172,7 @@ struct dhcp_packet { #define DHO_DHCP_USER_CLASS_ID 77 #define DHO_URL 114 #define DHO_DOMAIN_SEARCH 119 +#define DHO_SIP_SERVERS 120 #define DHO_CLASSLESS_ROUTES 121 #define DHO_END 255 From nobody Mon Jul 29 06:21:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXStt3v69z5RKCt; Mon, 29 Jul 2024 06:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXStt31mcz40X4; Mon, 29 Jul 2024 06:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722234118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUyTpmU3XyGgw3lOxAaR3ezrxnuLf14WgbE+IVom5ss=; b=BZy0a34ncqjQapzum4483lff2HFXjg+vz4JReGvTRx83CA5+ocQ5RNaPpdUgiLOqpaPUqC 6UGX9ADAPlp+ZLf0I+hNhlKB4SjHja+PDH23VYXN15ISAwGVN3uxpuwgINQ7VJ8QypxV98 /M6ustTFkft84Z3OUI3Aa9ErEBgYmktzSmqJMblvw6X+OURjHmJb4JGq7ff7DPqUpn8a7R v+eLgXBVBOagwMfBSL09iCV9W6yUlMU6P+Rpmg9Qck3Yk7ezh7deZiY8puId885G8k0Cbv 0c0KRpFTyX19Shk10QhNzXA8fjdiuRJPQyY1nrL8c0iYtbKzR665SuYqx0YJ/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722234118; a=rsa-sha256; cv=none; b=Jxmgpk5bnFXNCzesVGX6ezTgH3PcqskQwz0RF0D3ix+tJEBAkzrTcOrgg6pZKWoMgF7V16 VySAbDVhzOKLhW9hMLy/Z+FTcOrOZuva3tsBEtBH2tZekHkTQFgKKEcElRcFn0zX4tFHOw bjKkmlQQxXAPu9ZW9+9899jH1X6Q+m4sktdljWEIWB5ah2olaCuajQdMXSef1WpQog3qd5 HIVRGrWaIFx2l47JriiamIEmJmMuYaY7TkncppRXHelo8pIAYRYILxDaaZt7AIpxyxqDEw n7jZC1ar6tOciS54Dxh0RF8d7t0bA+a1pXwZgvU/LHp7y+LUIh2bVniho5BM8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722234118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUyTpmU3XyGgw3lOxAaR3ezrxnuLf14WgbE+IVom5ss=; b=DWelx8409A5ldQQGYgfDzh9rMJo8GyPfeIoE5DQAB8vB0CNhxSvVjAt41ubxQIjFGLVZ3+ HAAWqSY3X3Hyyl+SbvfZ4b7J/beaRyThrRhCrdks49sXy0j9rw7zhkOdEwUNlkGBie81cC gD8Heobx0/SmtpfcYrf5LIwPxls7IOOXSu9mkTyv5ynmhi7Hlpg9S2K1Q0Gcz3yF78IeeS y/H/J7Kez/0MCkb94QN8MB7loVdsl6kmqSlNPFA8Muc1CUClT2VQWuXHeWmRV+Q4mvEk9T ImIExkXCxHGayHHN8VDnNcN90AInNYrgMDMhaNnxAH4UMrwkb6XUe1d8yXrmZQ== 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 4WXStt2dL0zNhf; Mon, 29 Jul 2024 06:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46T6LwWI065751; Mon, 29 Jul 2024 06:21:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46T6Lw7M065748; Mon, 29 Jul 2024 06:21:58 GMT (envelope-from git) Date: Mon, 29 Jul 2024 06:21:58 GMT Message-Id: <202407290621.46T6Lw7M065748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: e5236f640510 - stable/13 - dhclient: Ignore SIP servers DHCP option defined in RFC 3361 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e5236f64051056eb933c6a53f6f6c2bab62f308a Auto-Submitted: auto-generated The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=e5236f64051056eb933c6a53f6f6c2bab62f308a commit e5236f64051056eb933c6a53f6f6c2bab62f308a Author: Yuichiro NAITO AuthorDate: 2024-07-04 07:57:02 +0000 Commit: Michael Osipov CommitDate: 2024-07-29 06:21:34 +0000 dhclient: Ignore SIP servers DHCP option defined in RFC 3361 Ignore SIP servers dhcp option to shut up the warning message. This option is defined in the RFC 3361 and sent from NSD-G1000T router. PR: 280119 Reviewed by: jrm (mentor), brooks MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45873 (cherry picked from commit ac6dc5cde729a602252a0b80f82424861d2eb7b5) --- sbin/dhclient/dhclient.c | 1 + sbin/dhclient/dhcp.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index e7557c4b0bf7..1bdd0eb68f8f 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2609,6 +2609,7 @@ check_option(struct client_lease *l, int option) case DHO_BOOTFILE_NAME: case DHO_DHCP_USER_CLASS_ID: case DHO_URL: + case DHO_SIP_SERVERS: case DHO_END: return (1); case DHO_CLASSLESS_ROUTES: diff --git a/sbin/dhclient/dhcp.h b/sbin/dhclient/dhcp.h index 300deb464238..99b69613934f 100644 --- a/sbin/dhclient/dhcp.h +++ b/sbin/dhclient/dhcp.h @@ -172,6 +172,7 @@ struct dhcp_packet { #define DHO_DHCP_USER_CLASS_ID 77 #define DHO_URL 114 #define DHO_DOMAIN_SEARCH 119 +#define DHO_SIP_SERVERS 120 #define DHO_CLASSLESS_ROUTES 121 #define DHO_END 255 From nobody Mon Jul 29 13:48:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXfnm6XpXz5S2jv; Mon, 29 Jul 2024 13:48:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXfnm5s5yz4n4N; Mon, 29 Jul 2024 13:48:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722260892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92Rwhn/jQ+t3ZdwnLJFaZpVW5M74N88b9vEhqLDq4NU=; b=hUGQND/93JHvB5ahuPcO+Abte7gS//a+8KUQH4P3HZC1DrTJ8siq3Ib3AIBU7z1W/9tcE1 gz8+qYUcKiYLYNh0RewoP5vcmdkqNT8SGdBOMtOKQAF0YkOl+uKdI+jNleo6piq+81wWQN Wy7lkitmI0qRt5b3hByoTYl5uSF+V3mJPP40HElNbtZdhalojnyvN5VI2ivwmGPaPSoW9P wxIWaOuBv6nPCDYEWE8GV4pFGbSZCl0OPmD73iwGOopYnUpeVKkgbG7MGVvvY85LqeoXb5 LKa+DKTYZeU5SnfmmlGW+yYWUhaU0Rr7uCkPkuBf2N+gQ9KdZj2QxbDatfLP5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722260892; a=rsa-sha256; cv=none; b=DbTX6OAGovVBab8k7ndaVTdVqMFZUy6L3bxkYVjK6hW0u4D+mGlVk4E7VaFhCwmEw5//xJ y9auMSmBjXrFbwE5ETKFiMXMq8FNyUtGiS84TyrADus5x/3ou3lVX5/LBygVra6YStehm0 BgAv/CcPNg7VLgloO5x1EgPBSmqTg7bJTkNeZxyqlkT4aB5yDBonnUSM/2tQ9QyzJ/XuB9 igmFPx+MKUCqFLEg6gKH+K+WBokItL0l2WQpA2dz5qJFmAqgB35xtlk5GkLyLv4BwumHkl z/K4yG0xKTtVjRDMF0JtuA3jCFqo4jdydUmpfTKckyyMbT58habScYroq325fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722260892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92Rwhn/jQ+t3ZdwnLJFaZpVW5M74N88b9vEhqLDq4NU=; b=r5KW+SSpJDrfkb/NhdYr/eWYee3OQ0PCRqOGvgP7UtrjVcBuWpHrlkPRxGc3VQlFdqUVlb ewJmWcDrypJ6JdE/P/JHXbc2tnX4qHauo4unz1YBL4SYQZjWt9NHxnNN27pDuLWUSEEd9E cm2MoHbQHe60mW1GfmrvTGRc4z7249wwLsc9TipHbqJj2Ca5z3ml88qT/nN7ankfafGfci E3hYFNKnzKvVWsKnquE1aKMT7axzdgf4P4nL0al5SYhR9DO3q/SBlRaa13074j11Acpt6V Bqen1GAworiCk86vcJ+Z9HbEb9DKoFQ9Juh/Gt/xtOowFUi+6bCQfgZ+g3XmwA== 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 4WXfnm5LVQzcj0; Mon, 29 Jul 2024 13:48:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TDmCcj015935; Mon, 29 Jul 2024 13:48:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TDmCQf015932; Mon, 29 Jul 2024 13:48:12 GMT (envelope-from git) Date: Mon, 29 Jul 2024 13:48:12 GMT Message-Id: <202407291348.46TDmCQf015932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "George V. Neville-Neil" Subject: git: 46b0db2dbe9f - main - Remove unnecessary and now inaccurate kernel side manual page. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46b0db2dbe9fb327afba631e9300ecaf6072c065 Auto-Submitted: auto-generated The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=46b0db2dbe9fb327afba631e9300ecaf6072c065 commit 46b0db2dbe9fb327afba631e9300ecaf6072c065 Author: George V. Neville-Neil AuthorDate: 2024-07-29 13:47:24 +0000 Commit: George V. Neville-Neil CommitDate: 2024-07-29 13:47:24 +0000 Remove unnecessary and now inaccurate kernel side manual page. --- share/man/man9/MD5.9 | 76 ---------------------------------------------------- 1 file changed, 76 deletions(-) diff --git a/share/man/man9/MD5.9 b/share/man/man9/MD5.9 deleted file mode 100644 index 4418cc40b976..000000000000 --- a/share/man/man9/MD5.9 +++ /dev/null @@ -1,76 +0,0 @@ -.\" $OpenBSD: md5.9,v 1.1 1996/04/17 21:40:14 mickey Exp $ -.\" -.\" Copyright (c) 1996 Michael Shalayeff -.\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by Michael Shalayeff -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd April 17, 1996 -.Dt MD5 9 -.Os -.Sh NAME -.Nm MD5 , -.Nm MD5Init , -.Nm MD5Transform -.Nd message digest routines -.Sh SYNOPSIS -.In sys/types.h -.In sys/md5.h -.Ft void -.Fn MD5Init "MD5_CTX *buf" -.Ft void -.Fn MD5Transform "uint32_t buf[4]" "const unsigned char block[64]" -.Sh DESCRIPTION -The -.Nm -module implements the RSA Data Security, Inc.\& MD5 Message-Digest Algorithm -(MD5). -It produces 128-bit MD5 Digest of data. -.Bl -hang -width MD5Transformxxx -.It Pa MD5Init -must be called just before -.Fn MD5Transform -will be used to produce a digest. -The -.Fa buf -argument is the storage for the digest being produced on subsequent -calls to the -.Fn MD5Transform -routine. -.It Pa MD5Transform -is the core of the MD5 algorithm, this alters an existing MD5 hash -kept in -.Fa buf -to reflect the addition of 64 characters -of new data passed in -.Fa block -argument. -.El -.Sh COPYRIGHTS -The code for MD5 transform was taken from Colin Plumb's -implementation, which has been placed in the public domain. -The MD5 cryptographic checksum was devised by Ronald Rivest, and is -documented in RFC 1321, "The MD5 Message Digest Algorithm". From nobody Mon Jul 29 13:52:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXftZ3lGxz5S36N; Mon, 29 Jul 2024 13:52:22 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXftY1q8Xz4nZL; Mon, 29 Jul 2024 13:52:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-79f19f19059so200691685a.0; Mon, 29 Jul 2024 06:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722261140; x=1722865940; 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=tj4LHj4wwYe9QDGiL1KD1snYLUPvQsA+Wv0hT9reVSc=; b=celwMET6gUJBAnsfOlfMUrWJ24phVKB1uDXLrQvtjh2tjs1hsE731/l3yZgeDYqEGW 05JuVIz+Im2WTqxENol8QmLesOdUIFJ9HPm5Bp96q1xDlgY9uqrmkov70J6qsRdzTqnV GDtkg86hU9ZnECPUT6EAwJOXOrWnDYZMR/X8bSQzrcpNS/hbBZCVAyRYggIggR7wELc3 PcZk3LIkw+uxQHZfNb6a5QVIhon1LdYgDychSmEsbrCG3/XlctY6jrh/GVtp+uVahzPM WAnYF9uArtnV9hE2vHs8hAAVMDfq6sDzCvHEzU1y21sZFbjM44L8gj3s/4UkuKk+ozSV /UTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722261140; x=1722865940; 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=tj4LHj4wwYe9QDGiL1KD1snYLUPvQsA+Wv0hT9reVSc=; b=q8vhqkHINQmw6ywFrU/9QceiJ+cLJndXgT0kzki1yc35YjokUwUuChOsuzUB2n+DTV lhvW0IrdeVxR8TkcKBVuNPORaEYVhrAswtm+444EC5oNtsk/FPa6MgGMSeJT77B/VrzW aZxN+1hmgdDtkt2AT6PmuHWl/zJ/1vPN3yDquGKmQvqhc0MuVQdX5ptNj6GTXvbVaWPh g1iz8gsqDtiBotQP7AxBHv4+rKXwl+fjkaR5IgSAPczxMB2wXeL4R0ayQJS3M20z5T7z RaPtZYcq8EEaAVrm3PGE++18PJPncO+soyaI1JTOb2fO5eErbEd1U8qD8eoyHEStP1Mo fIXw== X-Forwarded-Encrypted: i=1; AJvYcCVhuKOs8RqKPS62HU9bp5JMoDLJY3GMkmN2qawe/eLMtiWQFiuu9+XJHKyx0gpcPt0Na/UmlsPgdIf1uChX/aSWXoIdNQMF7tNDPmbylCTv2mOyPfUXYGCRSOL7g2H1q/FmhpOUmDVK31tmIRaFwUlytA== X-Gm-Message-State: AOJu0YwtVxhOiEEFW48DAJtWuxUsGf6xVszz1OtQkDEOQaCYuvMF+KnI dQPpd/CLiqCG4EvQneK6veWds7jP3UBC1m/HQV1B3SLgBUuzj/y2DX7ghNrE X-Google-Smtp-Source: AGHT+IHwKQ1gIB0PgBK6SAhpEqfFV6dT8nU/RPke01+JTL8SEbn0njUxCv17iUXqu/LsAJpzL8U02A== X-Received: by 2002:a05:620a:190c:b0:7a1:d306:4ba7 with SMTP id af79cd13be357-7a1e52583ddmr945643985a.31.1722261139811; Mon, 29 Jul 2024 06:52:19 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a1fc0a04a3sm7847185a.18.2024.07.29.06.52.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 06:52:19 -0700 (PDT) Date: Mon, 29 Jul 2024 09:52:16 -0400 From: Mark Johnston To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 46b0db2dbe9f - main - Remove unnecessary and now inaccurate kernel side manual page. Message-ID: References: <202407291348.46TDmCQf015932@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202407291348.46TDmCQf015932@gitrepo.freebsd.org> 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: 4WXftY1q8Xz4nZL On Mon, Jul 29, 2024 at 01:48:12PM +0000, George V. Neville-Neil wrote: > The branch main has been updated by gnn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=46b0db2dbe9fb327afba631e9300ecaf6072c065 > > commit 46b0db2dbe9fb327afba631e9300ecaf6072c065 > Author: George V. Neville-Neil > AuthorDate: 2024-07-29 13:47:24 +0000 > Commit: George V. Neville-Neil > CommitDate: 2024-07-29 13:47:24 +0000 > > Remove unnecessary and now inaccurate kernel side manual page. > --- > share/man/man9/MD5.9 | 76 ---------------------------------------------------- > 1 file changed, 76 deletions(-) share/man/man9/Makefile needs to be updated as well (and note the MLINKS which refer to MD5.9). From nobody Mon Jul 29 13:56:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXfyv5LJSz5S3SH; Mon, 29 Jul 2024 13:56:07 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXfyv3pxtz4nwt; Mon, 29 Jul 2024 13:56:07 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261367; 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:autocrypt:autocrypt; bh=nIPFzbAzXcRK6JsebGtjBvdXkqUaZzQKJAicavsgNX4=; b=gT34TfKZeWrY8Ih2k5tmCSLUhYcHI6HsnKwUerOmDO+zPnaQCtWlHlTNgK2jgv+c2lsuTy /V0OWSJd5/KHJO8EUHOAmpoqXZ8cIg35ZxEGGh6uS95ur9XgR8raH8Nnk8+hqmDnlWtcdN wCQBB8sGV8997k6Mzx1kzpyc9ye9SGQ2PMKnJgTV4Jb0JZin/vbKIdlSHlypu3i0bQdrFd yjTQ/QatjdX63ulL6y/LXSArPrdO/Kat607EFSc8Cc4JNMBbqsIylOAYdtyfIRkWjelWTr RWMLgDjjPUCnmyo6IJMVFLOSDOdrkjOdWWnbrivxDtHlRbCpQzHEDBs/bo9A0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722261367; a=rsa-sha256; cv=none; b=mziVDQUcLI9ppf1WkDpg2lDonYx1pYcTPZbdfczoWFxHnGuMA5AuqLnMLY/oU8q9FF6MD9 j7XCaCA+ocxVscBoB4wWr6Xs9ETD4sL91RnbjYpgLw0+Gmr+jCqmsWLHY+JZq+5zV3Z/Ae aLJiny8/IjP9xSKOyGS8G9pJLXE3KIOgEisY8/SEV+tuNhqRpRDXcocVfUbjE77BvM7PeD w69zKxMRIDGagTQeWX7pIBJOCploEpK4pADMYmJljwDnygRuy/ux3QyNYteZE6Byqs1+LL ZkzpNyDF1e+DSt2BJuQH3zBnu3qnf/C4GdRdGeIb/R9qAAQ5Tnvbu1cqwtxfIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261367; 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:autocrypt:autocrypt; bh=nIPFzbAzXcRK6JsebGtjBvdXkqUaZzQKJAicavsgNX4=; b=pOpZFetI6/F3MGeAPCZm4FybkdWbfoxsuiAFn1wD4qHo75uyEmjyXsCSEG/TG1W7DDOVMK uxfQZvW2AzoSv+03VlfKnzSt6vvqyiSbFD1GW0eA960Zm1uRT2Y3t7Wn2IKcx/IckSFzSx NaG6jb3uF5cuukECp/57FgbHtgocdhY9XPnC4W5eSa2xD7Ztqpzon6HbcM6zyerRW75glF vSSKctSeaWYy6A7S29q81izGmq4EDUfVNqNnEQpqEQpGVTsso8ZW43k/1wgY+IioNpyolu RuGww3KiojMamPJOerSB2QjJn2qlyO09BkioEGilXJSvawK9utlbQs7XOQjN7g== Received: from [172.21.4.172] (dynamic-177-53-82-16.telecominternet.net.br [177.53.82.16]) (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: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WXfyt5Dzrz1NmM; Mon, 29 Jul 2024 13:56:06 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: <7f61bdd0-7327-485e-bb26-4bf5de8c279b@FreeBSD.org> Date: Mon, 29 Jul 2024 10:56:02 -0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 46b0db2dbe9f - main - Remove unnecessary and now inaccurate kernel side manual page. To: Mark Johnston , "George V. Neville-Neil" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202407291348.46TDmCQf015932@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h ljy3yfrMsgfS5wx5Uzgfih1xYZUFC6jiI63CetqBqJpp3g1klRS1UWYKx2NeXphDMYZEdPm/ a6sXh4bKZbk6IE8Yn0/YiRT57d9DtbvswC7Gn7Igj/MSbhl49TvTGyvuB6juaffVoYZViomx 5zMoee8Ml2o2qj3MrCJ+/K8GU54RlpOGqGRsqdwVdr9XEWub6fF2YFwR46cjmbiU3P5urFHH nkJlBGPIwKxHimTW0lZsdx9aCKRDd/D80/WOEzXmk3k8B9lv/GsvOluHmveLhJG1R1tIJ31I f2q8dfTvqsQXnu8CcWRcgc7ATQRkrWr8AQgA1DufoxScA+CWQbUR6zExIu8wXQKrhuRt4DG2 BgynT7EMUvEBadcbQRZXsBpemNfncc9Axyut/+rWiyKJf9BLQuo/9QYmSRvW1U6+0LJUYmdg kMyBeYaPk+vnssv/u9jLuvV7FVgyE0yk1iaWIKOVDD+XrQCOvGw9uSceBrQyCyo3A/eRM/+p vnDCaywR63PKE+3axk6lfNdGK3TnaWmS30/ZDCZlNsXuqprqR4JdT5wXids5o36dsuJ5EZ20 s5hNMD34s4Yr1Y1R9elH6qBsFCpozs0+jwrArxq+UJJCR6hH5W8ZEwJtRC8tzR8mRE1WywzX BXYj0YhfGztQIxZckQARAQABwsB8BBgBCgAmFiEERL7Dxegbnh7xTiQ5Ob6PxxJcZXoFAmSt avwCGwwFCQWjmoAACgkQOb6PxxJcZXr1vgf/SKXhoZcUU5I7TqcbHg0lJz9tICTupCGHWr/s SQgjh9oEM5j1wqW7FlCGP90Tl9K0g3ow9YdbhU7VK470o6pymX9V9eLHzGgkZO/KMEtGBeK1 u+5ePjCJ/MK5B21KODLSU7WrIL1VN5ceXfQPLYt02LMLtPri+oduHD6RNBeA7US1DUzleq5F 9NHGbvV2U7BdDUezpiO8NaFjFZVB11I5d99FxUM5XGVstI3VhsRKZxjY0KnqJzaQgTFsPGmv AUfZVIN1pXgXiedhPXpr8+Y64jP+pHVwpVmh1zYWL6+q3kqFOUVP6c5iiMeoEXZvgJz7x/AC ek3X5gvu8Hpcv+MZIg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 29/07/24 10:52, Mark Johnston wrote: > On Mon, Jul 29, 2024 at 01:48:12PM +0000, George V. Neville-Neil wrote: >> The branch main has been updated by gnn: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=46b0db2dbe9fb327afba631e9300ecaf6072c065 >> >> commit 46b0db2dbe9fb327afba631e9300ecaf6072c065 >> Author: George V. Neville-Neil >> AuthorDate: 2024-07-29 13:47:24 +0000 >> Commit: George V. Neville-Neil >> CommitDate: 2024-07-29 13:47:24 +0000 >> >> Remove unnecessary and now inaccurate kernel side manual page. >> --- >> share/man/man9/MD5.9 | 76 ---------------------------------------------------- >> 1 file changed, 76 deletions(-) > > share/man/man9/Makefile needs to be updated as well (and note the MLINKS > which refer to MD5.9). It also needs to be added to ObsoleteFiles.inc -- Renato Botelho From nobody Mon Jul 29 14:02:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXg6j2fgVz5S40D; Mon, 29 Jul 2024 14:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXg6j1w6Mz4q7R; Mon, 29 Jul 2024 14:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tp8jQRmy9B1Yy9yrEIxA8DAIfyr9jYbLpznu2i1UWSw=; b=UigKpP+yub3Ts6558TZKv1W1syz4LmVkuFNvZIc4J8ZOj7IBpmKhW3rxmyhQYSw/3fQgZQ V2nWEkU+O5w2innQcQqROt8sd3ZArLJ/yCjFdnzCoZxnxxgwY2xL/W1k5G5+bzPd9PT8rs z0Itm2mRXYbX7QTcenIXmE8WuiDnGNCrPZnbLrmJD+AUNp6djKRISYk3La03/sOVtkWxt+ yWhqbeyYueEr44dD2iaQBPsd/JDAfCIS2EeI4LyyKA/qb4jY8tV9QSX4drx8DwNDIKJteg fJpS7x/ToECCS8Lhdbkud7P5Y0pUtdnH720tnPGKqdtkeOALfHz6Eg5H4nPJEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722261773; a=rsa-sha256; cv=none; b=rDV/dSBibxafH4g2d93ldDfulwROMSjihNC+Y7tMBGPMMd91TvK1n8oyoKdM+QVrUWJkuX z6vrUa/EoLvjoNJummNs6F8rv38P+t27yAT2mbV+yF2pnSoRD9ab74XL7JZ0lMNI8YNzCQ jJZNBzSvCZyPFCZFAhR6hxLzg3smgtjXkv1EcHb2encE+pkr35+UzuMpzV6JXcSMrE7cam rcLFWab5/NDD8LJr3PqQygW86dFgQTJF8Okkqya04Q4DTgpYW6PTzrIfRIsI0126sITEtv yIDDgIddo6RyAoWvOqJOtZU0WORs+7dslxnamxVNHlZAQo9wbs51nPziiFDzoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tp8jQRmy9B1Yy9yrEIxA8DAIfyr9jYbLpznu2i1UWSw=; b=V08f0i4+PhdDchdBMzxbhD9xCOgMFPRT+M7SxwbMv3HJ6whe4/Xd67CxOBQDimyKeAvSZR 6nTLPnfintwZjp4X5d3DdnGEybdDBKLaG+oOADqDdZZQ4e9JrD+c2vBJzYn1xEErDE9RIc QdMK+0lVnZB7DjLP9Etujk2o3rYvvf+v1v6W8ylxyFnHKsNnCDq7MFHtfzuhJWeyimm0cZ 1gzLRBYwn4JekMtOgvZ+SBvV7+pMwcvnrE5hhjtnOlTGendGnAJCctBKFLSY9t4prGn6dR g6Yvd1K5flLMZ6wtlI+pKMxSdniyUevbcUfF7p7lhG6G6QVF6w3G/gUFjaytog== 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 4WXg6j1WLDzcmb; Mon, 29 Jul 2024 14:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TE2rNN049411; Mon, 29 Jul 2024 14:02:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TE2rdn049408; Mon, 29 Jul 2024 14:02:53 GMT (envelope-from git) Date: Mon, 29 Jul 2024 14:02:53 GMT Message-Id: <202407291402.46TE2rdn049408@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: ab830de9f58c - main - diff: Fix usage message and documentation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ab830de9f58c1b257e42b4fbdd46b3ca6a837ee6 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ab830de9f58c1b257e42b4fbdd46b3ca6a837ee6 commit ab830de9f58c1b257e42b4fbdd46b3ca6a837ee6 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-07-29 14:02:21 +0000 diff: Fix usage message and documentation. The `--ignore-all-space` option was incorrectly documented as `--ignore-all-blanks` in some (but not all) places. MFC after: 3 days PR: 280434 Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D46160 --- usr.bin/diff/diff.1 | 6 +++--- usr.bin/diff/diff.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index 5f211372e15f..559434d8e4fb 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 29, 2024 +.Dd July 26, 2024 .Dt DIFF 1 .Os .Sh NAME @@ -202,7 +202,7 @@ .Op Fl aBbditwW .Op Fl -color Ns = Ns Ar when .Op Fl -expand-tabs -.Op Fl -ignore-all-blanks +.Op Fl -ignore-all-space .Op Fl -ignore-blank-lines .Op Fl -ignore-case .Op Fl -minimal @@ -469,7 +469,7 @@ output adds character(s) to the front of each line which may screw up the indentation of the original source lines and make the output listing difficult to interpret. This option will preserve the original source's indentation. -.It Fl w -ignore-all-blanks +.It Fl w -ignore-all-space Is similar to .Fl b -ignore-space-change but causes whitespace (blanks and tabs) to be totally ignored. diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index 5ca9a36505ce..83aa20c52cf3 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -629,7 +629,7 @@ usage(void) " diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--tabsize] [-I pattern] [-L label]\n" " [-F pattern] [-S name] [-X file] [-x pattern] dir1 dir2\n" - " diff [-aBbditwW] [--expand-tabs] [--ignore-all-blanks]\n" + " diff [-aBbditwW] [--expand-tabs] [--ignore-all-space]\n" " [--ignore-blank-lines] [--ignore-case] [--minimal]\n" " [--no-ignore-file-name-case] [--strip-trailing-cr]\n" " [--suppress-common-lines] [--tabsize] [--text] [--width]\n" From nobody Mon Jul 29 14:02:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXg6k4FKyz5S3v5; Mon, 29 Jul 2024 14:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXg6k2vVyz4q2d; Mon, 29 Jul 2024 14:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fi0tUsTTUhaC+0md2TAhCLbThvEha5oZH+DtEDXu+U0=; b=ooVfyjh+8XNm88vvyTxUU6+HvmqFw8S1sLrXStKhUL04EkCNLOcOkR5bYPKh9fB1+owKFi U9M1M/HIpoqqO3Ji913GPcMzDDIxDxVuTGXS/zjv4XdPj2a0yHvRmlFoU2SNpU7k50XnNw ykw5xRww4wu3PRxo2sJ0eh+vYGbQ8Ti5CNgPyZuquIea945fErwHOw2vLHx7qCUE4nvhK8 ivcE6TrUw08LEl2xASiTgVfCADNGYWai8thh5CKXXVIC+XXImHIwNPAFpYJwomRb/wST7K x/NgpclE7LMIYM5GlHLgJYZZfKvHYOyx1NQEW/5/Jy8Lw64zLMOKaTmJ+L4bhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722261774; a=rsa-sha256; cv=none; b=ntb8x9zspQZ/2YcVNThTjEbW7IvIBJtTt7Ptd0Lbzjb4p9qTKFH0r0NcTUUbEF5Z/iJx9Z k0wEYYIb4isx07yLWBaBieQYDQ9pHNchqho1ljJw32OJc7OCMbE2m0f2J3cGLe6HHLuuZe Ht9+ln2bWlsdW+Sd+J4RhcfoRYivG/R5e2bIqvkHHLAHUmDGEC7cxsKpl1wQdJjBaEJRho vy1fkAhA7+kXo6Sl0zKIZ4Gi/MBXYzfEUmsjLcLrQJsnfTjgaMOkY29AujHqbSyHAQaeop yOPwcMKOuEZBJhyO6EI0l9SRQ8aPmbReHKLaqZOxwnncxNGpVsSwZx14Hs+Z2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fi0tUsTTUhaC+0md2TAhCLbThvEha5oZH+DtEDXu+U0=; b=NkmLzDCquoZc9EuTkxeO9tSfVttoeJmveS0nWuM6D7csZbFcjE2q8aThmvgXGEIdyOyvTD 1c0diOK5s5+w84koZlXXjM4pdSWyJAU6GjLj59BNJTUlBgNkpVaQWw28TKttJSF8FLjsj9 2ZgXlTxsBKW4L3Zja3f/uLJEa4UQRSztz8+LKQnTCL+G4c9zulre11Fyb6EEZSKwFnZxpQ ZxacTqFtIVICWqsJIEEFvCPJXsYnNgZzxH8T1+KLq8eDVTO6padEjH5LEXHye51TfeVPd1 Vqwq/LLXm1WVm7bHFiNTRMQXy+qRHwHFLoE/Sx5t7wCzQNqob7keSAUNLie9cg== 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 4WXg6k2W19zcmc; Mon, 29 Jul 2024 14:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TE2sM0049456; Mon, 29 Jul 2024 14:02:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TE2sds049453; Mon, 29 Jul 2024 14:02:54 GMT (envelope-from git) Date: Mon, 29 Jul 2024 14:02:54 GMT Message-Id: <202407291402.46TE2sds049453@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: ca75b7dac886 - main - sdiff: Fix usage message. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ca75b7dac886de66fc06fd31facfa2c561f7567e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ca75b7dac886de66fc06fd31facfa2c561f7567e commit ca75b7dac886de66fc06fd31facfa2c561f7567e Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:25 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-07-29 14:02:25 +0000 sdiff: Fix usage message. The `--ignore-all-space` option was incorrectly documented as `--ignore-all-spaces`. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D46161 --- usr.bin/sdiff/sdiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index 05e3ee82212c..b796bb4224a8 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -129,7 +129,7 @@ static const char *help_msg[] = { "\t-I RE, --ignore-matching-lines=RE: ignore changes whose line matches RE.", "\t-i, --ignore-case: do a case-insensitive comparison.", "\t-t, --expand-tabs: expand tabs to spaces.", - "\t-W, --ignore-all-spaces: ignore all spaces.", + "\t-W, --ignore-all-space: ignore all whitespace.", "\t--speed-large-files: assume large file with scattered changes.", "\t--strip-trailing-cr: strip trailing carriage return.", "\t--ignore-file-name-case: ignore case of file names.", From nobody Mon Jul 29 14:02:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXg6l4qy0z5S3rw; Mon, 29 Jul 2024 14:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXg6l3f0wz4pjj; Mon, 29 Jul 2024 14:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+fj6bZx1eLT2qj6aYP8mxF0nIKGwJZHpVPxhZrycts8=; b=Nuf95bdZ4AVv822tYJmjeef+mfl2OjhvoSgC7cyJa4XdllgzDuq6oWBgWbU5wGEfk1fRep nJwRdPDROF613u9icCUbBsOslUaZlQYWE0mqpW54bu8nJo7yTYaDXJs1kfbFESOT3M6KvH v6dJlN+Yg6iYN40K/6djfk3dunFSP2r+ykpE6QXN1zUPxGF8S+sxdRYK2jfy+P9SFEqMwo yQQOKMnUzgvhM2Xwvz+1oBDhLXIry+zBSSkZD65UKEqf0WgNRzib5nclzPs9uRVQYkPSRM cKZZeaoD9cAbMZRD1hX8bDs2q++D4BycGdXexqyj7qzunxdcS+0MCDEoq3v13w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722261775; a=rsa-sha256; cv=none; b=XInj017g4roR6oO/QASXWEN9Lb/BrzrTZjBiM2UL4yMwQ05LPpjWWaioHLka0OATG/pXS3 0SYxfLqfBaEbFy4aahitfYlryVz7EPLUsBM98lHykBtNxUgSLQnJnQ5VhQDmjRrAWKz9Pb PInfw3ox12nHl+PKeLLd/aOGe622PozfioDrXOt4zZLwS31ugTN5Z3OXztRwWm7uv2TT/Z OamIHNYsAqql7Oo40OUbCgMVybZqJlajpP4X2gyRoYaF0Gi11XZ2OFTc7d4GxHf8M53pkP /GpIlkik0ccYFKjZHtNXzCqow+eVfT5p23IwiIN7VXCKKPBUOu4Hd1k1l2u4qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+fj6bZx1eLT2qj6aYP8mxF0nIKGwJZHpVPxhZrycts8=; b=lF2AtW2C6C/pMn0zxlvKshcDlY6BN3uU67dGXPV2JZFPyIc8EGPtYC/9lTJsuWMmJ+JhGt Yltv7kRJgLCNKAweeO2Tns+dO0TJ+/X2qiSITRFxiNDNNNV8ketpGatzsgjpY10YR4Ipka N1e8obpO/M/Um9XNUBZ/09LfsOc6NVBMcSiykH5xMIoFHIsWL24MIbDXauNNRYR4+wjgri Y9G85TUjchfYXp4U3CVjCdHtO83xIMk8dzFIEoHjEXdeB1GZ+rjC0kr+Wb9Wmlx5xDCwrS tg76P5xVntqqVYTLqD9dWIZJm54vLZCXyA4CxRaHE1UxlJeLNFRjOnKgLCVSJw== 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 4WXg6l3G9Szd4d; Mon, 29 Jul 2024 14:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TE2tMZ049500; Mon, 29 Jul 2024 14:02:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TE2tOC049497; Mon, 29 Jul 2024 14:02:55 GMT (envelope-from git) Date: Mon, 29 Jul 2024 14:02:55 GMT Message-Id: <202407291402.46TE2tOC049497@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: 9317242469f1 - main - diff: Fix integer overflow. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9317242469f1ca682626d9806f8caf65d143c09a Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9317242469f1ca682626d9806f8caf65d143c09a commit 9317242469f1ca682626d9806f8caf65d143c09a Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-07-29 14:02:29 +0000 diff: Fix integer overflow. The legacy Stone algorithm uses `int` to represent line numbers, array indices, and array lengths. If given inputs approaching `INT_MAX` lines, it would overflow and attempt to allocate ridiculously large amounts of memory. To avoid this without penalizing non-pathological inputs, switch a few variables to `size_t` and add checks while and immediately after reading both inputs. MFC after: 3 days PR: 280371 Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D46169 --- usr.bin/diff/diffreg.c | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 6073feebf5fb..ffa5568bf442 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -203,9 +203,9 @@ static int *klist; /* will be overlaid on file[0] after class */ static int *member; /* will be overlaid on file[1] */ static int clen; static int inifdef; /* whether or not we are in a #ifdef block */ -static int len[2]; -static int pref, suff; /* length of prefix and suffix */ -static int slen[2]; +static size_t len[2]; /* lengths of files in lines */ +static size_t pref, suff; /* lengths of prefix and suffix */ +static size_t slen[2]; /* lengths of files minus pref / suff */ static int anychange; static int hw, lpad,rpad; /* half width and padding */ static int edoffset; @@ -425,6 +425,10 @@ diffreg_stone(char *file1, char *file2, int flags, int capsicum) status |= 1; goto closem; } + if (len[0] > INT_MAX - 2) + errc(1, EFBIG, "%s", file1); + if (len[1] > INT_MAX - 2) + errc(1, EFBIG, "%s", file2); prune(); sort(sfile[0], slen[0]); @@ -550,18 +554,17 @@ prepare(int i, FILE *fd, size_t filesize, int flags) sz = 100; p = xcalloc(sz + 3, sizeof(*p)); - while ((r = readhash(fd, flags, &h)) != RH_EOF) - switch (r) { - case RH_EOF: /* otherwise clang complains */ - case RH_BINARY: + while ((r = readhash(fd, flags, &h)) != RH_EOF) { + if (r == RH_BINARY) return (false); - case RH_OK: - if (j == sz) { - sz = sz * 3 / 2; - p = xreallocarray(p, sz + 3, sizeof(*p)); - } - p[++j].value = h; + if (j == SIZE_MAX) + break; + if (j == sz) { + sz = sz * 3 / 2; + p = xreallocarray(p, sz + 3, sizeof(*p)); } + p[++j].value = h; + } len[i] = j; file[i] = p; @@ -572,7 +575,7 @@ prepare(int i, FILE *fd, size_t filesize, int flags) static void prune(void) { - int i, j; + size_t i, j; for (pref = 0; pref < len[0] && pref < len[1] && file[0][pref + 1].value == file[1][pref + 1].value; @@ -710,7 +713,7 @@ static void unravel(int p) { struct cand *q; - int i; + size_t i; for (i = 0; i <= len[0]; i++) J[i] = i <= pref ? i : @@ -737,7 +740,7 @@ check(FILE *f1, FILE *f2, int flags) ixold[0] = ixnew[0] = 0; /* jackpot = 0; */ ctold = ctnew = 0; - for (i = 1; i <= len[0]; i++) { + for (i = 1; i <= (int)len[0]; i++) { if (J[i] == 0) { ixold[i] = ctold += skipline(f1); continue; @@ -837,7 +840,7 @@ check(FILE *f1, FILE *f2, int flags) ixnew[j] = ctnew; j++; } - for (; j <= len[1]; j++) { + for (; j <= (int)len[1]; j++) { ixnew[j] = ctnew += skipline(f2); } /* @@ -1504,9 +1507,9 @@ dump_context_vec(FILE *f1, FILE *f2, int flags) b = d = 0; /* gcc */ lowa = MAX(1, cvp->a - diff_context); - upb = MIN(len[0], context_vec_ptr->b + diff_context); + upb = MIN((int)len[0], context_vec_ptr->b + diff_context); lowc = MAX(1, cvp->c - diff_context); - upd = MIN(len[1], context_vec_ptr->d + diff_context); + upd = MIN((int)len[1], context_vec_ptr->d + diff_context); printf("***************"); if (flags & (D_PROTOTYPE | D_MATCHLAST)) { @@ -1607,9 +1610,9 @@ dump_unified_vec(FILE *f1, FILE *f2, int flags) b = d = 0; /* gcc */ lowa = MAX(1, cvp->a - diff_context); - upb = MIN(len[0], context_vec_ptr->b + diff_context); + upb = MIN((int)len[0], context_vec_ptr->b + diff_context); lowc = MAX(1, cvp->c - diff_context); - upd = MIN(len[1], context_vec_ptr->d + diff_context); + upd = MIN((int)len[1], context_vec_ptr->d + diff_context); printf("@@ -"); uni_range(lowa, upb); From nobody Mon Jul 29 14:02:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXg6m6LHwz5S3pR; Mon, 29 Jul 2024 14:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXg6m4zZFz4pry; Mon, 29 Jul 2024 14:02:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722261776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FySY9zP4AxHs3zV1hPIR29i8IYBi++8K3wTBdnDV1Dk=; b=O5uQhVjGwdNbUG5IFNB/JtGHxZgSWUAlm6MUpexsI4ijQ2rCitgNq7gea1wAh1Qz65tlM+ KEXYkjzpkcsnPpDos4IiFo4/s9t6StUshFlyY9sqhlK9JYyhZv7mXoDqi/0Jsg/yk26XMN Zb7uQ8EysPt+BwzOgl7H2nxD4c7ANvf/jMOC2tBaUP9A86omWin07bQ9G9ESSK5CzBMU+p Gp8U4klb+onT6LOQT16arInuULd3rTUOKukqLv61e9bNwuagdYDOF5kSnzu3Jn1yYQs2if oHgyIoxSBO2GbytXYIWch3VaTvjnlttsIH67bd06lMIauAoyZsWc5FVf0BLYJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722261776; a=rsa-sha256; cv=none; b=elnBkhQF7w2GPDuoxRmXvzljtViHBqDiDtBWuUMeZ3uSbzNyXPt9fmxOt9/6gKqSN8zGzH KHuuzufKg4J8jFr0Y8pnz9m4+GiaCZzwPcB07t3SMcf8oaLi+OCKMo2UlJl45NqDlHmysW firlPEpDtkMjJI+5qA2nzbTJ6Gc57Jc2hGDp0rjK2gnnSOolNpoWnEsOjKcHk4krjuJKZy W6YwVNsTwYexC+Qt44o3/09v6REgEfJM6VzC5ydWGnJxP0hFpFqOCZtlpA6SJJUcu5lGB5 /OeF7F63hg6CJGQkTDAidkeU4RshEJrOU1yzlQDRBNQsr+ydreBsS7yy++Q3+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=1722261776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FySY9zP4AxHs3zV1hPIR29i8IYBi++8K3wTBdnDV1Dk=; b=fYKBiP2jhi4pIIFG/Z9FC0tRGauMOUOIjSLXXWyk9fYC3jltaYT+RO+RoRxK/6/8YTQ7Sl CXjcv+x4FkigHvNTYRnQWOCxn6SGH9KRoiyQDZvpxFuPyO9QRgGfGmEI7iIgSULiWJpbHt FSznDgJInnECmyFfdCRaM8teniNncaiX6tilRPfNa3GdvWYndNcHulkZfim3dn+cjIuuzS vTJDiipUwrkKq8QmYj+azgk7jJom8pfi3XS52r/FQ7Ldl14eso+AZgrUhSJe1DrbkIT4qw A/rzI4DDoLzSnr8ZaK9BRXbFNrcumHD9sPstyKQ/e77DhPT1XW2fQwcxDxN0uw== 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 4WXg6m4M8tzd8t; Mon, 29 Jul 2024 14:02:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TE2uwe049548; Mon, 29 Jul 2024 14:02:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TE2u9p049545; Mon, 29 Jul 2024 14:02:56 GMT (envelope-from git) Date: Mon, 29 Jul 2024 14:02:56 GMT Message-Id: <202407291402.46TE2u9p049545@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: 9f080f17a6a7 - main - ifnet(9): Remove mention of defunct ifaddr_byindex(9). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9f080f17a6a740ce9c1fa45862fb689263908c90 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9f080f17a6a740ce9c1fa45862fb689263908c90 commit 9f080f17a6a740ce9c1fa45862fb689263908c90 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-07-29 14:02:33 +0000 ifnet(9): Remove mention of defunct ifaddr_byindex(9). Fixes: 964b8f8b993d MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46174 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 1 - share/man/man9/ifnet.9 | 12 +----------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 088dd23ebb4d..1a347f5e8dbd 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240729: retire ifaddr_byindex +OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz + # 20240726: deprecate contigfree(9) OLD_FILES+=usr/share/man/man9/contigfree.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 0b315d64ed35..7b50921b955f 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1335,7 +1335,6 @@ MLINKS+=ifnet.9 if_addmulti.9 \ ifnet.9 ifa_ifwithnet.9 \ ifnet.9 ifa_ref.9 \ ifnet.9 ifaddr.9 \ - ifnet.9 ifaddr_byindex.9 \ ifnet.9 ifaof_ifpforaddr.9 \ ifnet.9 ifioctl.9 \ ifnet.9 ifpromisc.9 \ diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index b835c51c546f..41cbfd8dad42 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -75,8 +75,6 @@ .\" .Ss "Interface Address Functions" .Ft "struct ifaddr *" -.Fn ifaddr_byindex "u_short idx" -.Ft "struct ifaddr *" .Fn ifa_ifwithaddr "struct sockaddr *addr" .Ft "struct ifaddr *" .Fn ifa_ifwithdstaddr "struct sockaddr *addr" "int fib" @@ -196,8 +194,6 @@ address .Xr link_addr 3 ) describing the link layer implemented by the interface (if any) is accessed by the -.Fn ifaddr_byindex -function or .Va if_addr structure. (Some trivial interfaces do not provide any link layer addresses; @@ -1183,9 +1179,7 @@ structure to be the first element in that list. (A pointer to this address structure is saved in the .Vt ifnet -structure and is accessed by the -.Fn ifaddr_byindex -function.) +structure.) The .Fa ifp must have been allocated by @@ -1502,10 +1496,6 @@ precisely .Fa addr will be returned. .Pp -.Fn ifaddr_byindex -returns the link-level address of the interface with the given index -.Fa idx . -.Pp All of these functions return a null pointer if no such address can be found. .Ss "Interface Multicast Address Functions" From nobody Mon Jul 29 14:15:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXgNt04mfz5S4pT; Mon, 29 Jul 2024 14:15:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXgNs6b6wz4s6y; Mon, 29 Jul 2024 14:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722262509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RpFN/wPzJLM3CERiBz+d/A8gXwfRzV1a1d1moWRHup0=; b=HlSlUPYiZaGaW6AcI9CoPKwWlM0obMh3UdIJztMJ65FzpKATRm5h44JdimhwYpprbRPZAs BhWDspKHbtQX91CDhahBgJLKTSV3dlXcfm4fcIxIwCbYS06aTwxN1DttSW+pqecB8rQdNt AzrCd7hLqH0Xe/V+hdudZ3AFL4Qs5YEnocN8Ox5r0R8u6THG86sIt2SYxfQMIx8XyF22VW XJbSKtzOTslMx5ebg/5PzKhBQdr6dMELFDKBV67qUHCL1wzAruBD1dWXD2Js9jClBLLnNF 6X7e4V0HhjC7YH62i+At0laGDT/r1GjhOIHxtg6gAjegJX64xFH/rUwdC9M1BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722262509; a=rsa-sha256; cv=none; b=A6wVVFrpxImFQW2BvFJukZr18dnrnVyvU5OK13YV09ZdB4llcKHFTXNbG2YQoE2dBbPppZ CiKksboTQoesATYndkTAN3/bqnfSBWc98ZlBU07a92LwStOvHFAXHw6JcsnQEQNZnfuTEH h68MLyWaw5L3pxW2GVl9AsyHOILrRaS5/o6JMxN36/ntHvXWpLSnD0ZiUR/AGZ3wDwsd5/ goqMT2dILSUXS5DHlCuxGHbpOoFeAYtvhSfuMPH/qanfJv0iHSUYR1B9jbfj10w+VjwqKm J8tsLWSGj2/mpOPp+B2jdPJRBH8FnpROXsdCFiDb3m2zBe77hH6NIXnauBG6ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722262509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RpFN/wPzJLM3CERiBz+d/A8gXwfRzV1a1d1moWRHup0=; b=GMdfwktTvziQ8qRQqvDwybeBAseoNWPlcCxJ86ORPOICu3AE1vWPG73DFLa1OJItym1tiA MJFHMYk3uSD9M8yYaIRtoqIZSrYXSFh77YL7JTO8cmDOQJu8K9NUffV54o06j+34zohzIj 2OU1+fCcBOuN4DS3jrCZ4S3UwNtG6Uz7aZwZ/OvzZUNUO/MkNNfXD8GypoLyQRJ7li+j2O ZC6BnlkW+sgOBkM6pTmF+aFMW43a+QzDhD1L5sLaUSU1gNHm6J2Gm1KvfBN78EPt7t12Qr QTa8W8aPPNeMCG11ykBGjAJEWccE55a2Bp1nw+coL2DAmq3nl5WyjffMPwQUbg== 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 4WXgNs6CYTzdWQ; Mon, 29 Jul 2024 14:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TEF9N2066761; Mon, 29 Jul 2024 14:15:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TEF9gJ066758; Mon, 29 Jul 2024 14:15:09 GMT (envelope-from git) Date: Mon, 29 Jul 2024 14:15:09 GMT Message-Id: <202407291415.46TEF9gJ066758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "George V. Neville-Neil" Subject: git: 36d68cb2ddd2 - main - Complete the removal of the MD5 manual page from section 9. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36d68cb2ddd22fa6fd1d0b38ce38fe9da17fe76a Auto-Submitted: auto-generated The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=36d68cb2ddd22fa6fd1d0b38ce38fe9da17fe76a commit 36d68cb2ddd22fa6fd1d0b38ce38fe9da17fe76a Author: George V. Neville-Neil AuthorDate: 2024-07-29 14:11:24 +0000 Commit: George V. Neville-Neil CommitDate: 2024-07-29 14:14:40 +0000 Complete the removal of the MD5 manual page from section 9. --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1a347f5e8dbd..b21778466800 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -54,6 +54,9 @@ # 20240729: retire ifaddr_byindex OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz +# 20240729: remove MD5(9) +OLD_FILES+=usr/share/man/man9/MD5.9.gz + # 20240726: deprecate contigfree(9) OLD_FILES+=usr/share/man/man9/contigfree.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 7b50921b955f..593bbd068790 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -218,7 +218,6 @@ MAN= accept_filter.9 \ mbchain.9 \ mbuf.9 \ mbuf_tags.9 \ - MD5.9 \ mdchain.9 \ memcchr.9 \ memguard.9 \ From nobody Mon Jul 29 14:31:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXglf34Ryz5S62B; Mon, 29 Jul 2024 14:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXglf2blDz4t9Z; Mon, 29 Jul 2024 14:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722263486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XEDki1+GqG9q4EQSPfffCD+faOPzPmIIHmmuzCrW5MM=; b=F5b3KurnQQUA+v8SpaQHQ6HmA8eUpzhbRuubqvl8fAs0gTYqRfSVVc8FoPvtGHuQtHIVLp AWgcD7fFYk2a8Dk/O61VgHV7oG1BsK0hDf/siaY7qGDDuMHZE/Q22XXHxULSJxv53iicte zbCwend22RWnTkjdsw7CSQR2FsfEC8No42oRQ7MRjCeS947Q3TzRHpMcIKtYh6Owcl6ScE +099S2QyxPXNCCS0g4Ix2ayuDBhbPC5gWYVRc4kWDsWrlGq5XisR9Uy2eYAQhlvJrV90yw ahELirXvJqLV60cjygrRaJpXtuYncSTykmS1ml+kx2oHuk6Tn6EnCwsagMk0wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722263486; a=rsa-sha256; cv=none; b=rJXPrP4fgOUNqljaewYA86dpuzf24djd6vn2DVp+jKXDgIrTut6DzweHLFR12YWV9ZXwso OIJ8fhn6YHvfsYtdlvOuW6Odhg4p3lqlOp+Set4CuYgvItjy+NBR/O1eY7Z9a2p8DdPigw ZWLDdBi7VpyxBxAi5REfxAORkDC5xlwJ45C/NXmttcOEBX5R7qub5uRwLX2fRaJx+Zq10s 58xkEkeG+RxYeZxtVeK18ERZ1LeNNPXYOFrFi9/p4R516NzXEWrT5vBbgtZijlFKo3zq9i R/4rJngwzBmkBaIIMWvFM9nvwm2bOTzWuv0ijhnIBkaQjYJ8mx6ZrWHTN49W8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722263486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XEDki1+GqG9q4EQSPfffCD+faOPzPmIIHmmuzCrW5MM=; b=E1CHDLds/NxA0JVPaloKR7Kr4VokePFB5E0KNseRnD63fagUijvERLnOL7wXV9htxExINc dFQPiwFGd83zOD+v0Houa6jZaP2IteRbdmZyWKVd1stPg29WspXkfq5yBabdfEfCnb5pes rrW+shSFpgV8Dz3clxcbVcYZ/Wzf3LRnVwGEwsw6n9wIL/55POqNxCAli7tc2XX25J7CSY PX6xLB+NGdiGid5JedQZ+1zlcLy9nn3B/CghH2WGbZ97yLHt8OyIUovCRbRh3veNoeIIle t9J4/EqTss9JRpMcpOVcwmZ3Rya6wbxp1on0FEJyXWAQsReiCJXukxutlI2B5w== 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 4WXglf2BzSzdC0; Mon, 29 Jul 2024 14:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TEVQaL094083; Mon, 29 Jul 2024 14:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TEVQow094080; Mon, 29 Jul 2024 14:31:26 GMT (envelope-from git) Date: Mon, 29 Jul 2024 14:31:26 GMT Message-Id: <202407291431.46TEVQow094080@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: 801c452795ac - main - man9: Really complete the removal of MD5.9 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 801c452795ac441523655eb3277051b7b034becf Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=801c452795ac441523655eb3277051b7b034becf commit 801c452795ac441523655eb3277051b7b034becf Author: Mark Johnston AuthorDate: 2024-07-29 14:12:40 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 14:17:04 +0000 man9: Really complete the removal of MD5.9 Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate kernel side manual page.") Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual page from section 9.") --- ObsoleteFiles.inc | 2 ++ share/man/man9/Makefile | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index b21778466800..01b4824e8692 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -56,6 +56,8 @@ OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz # 20240729: remove MD5(9) OLD_FILES+=usr/share/man/man9/MD5.9.gz +OLD_FILES+=usr/share/man/man9/MD5Init.9 +OLD_FILES+=usr/share/man/man9/MD5Transform.9 # 20240726: deprecate contigfree(9) OLD_FILES+=usr/share/man/man9/contigfree.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 593bbd068790..60f994edfd9f 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1544,8 +1544,6 @@ MLINKS+=\ mbuf_tags.9 m_tag_next.9 \ mbuf_tags.9 m_tag_prepend.9 \ mbuf_tags.9 m_tag_unlink.9 -MLINKS+=MD5.9 MD5Init.9 \ - MD5.9 MD5Transform.9 MLINKS+=mdchain.9 md_append_record.9 \ mdchain.9 md_done.9 \ mdchain.9 md_get_int64.9 \ From nobody Mon Jul 29 15:35:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9D0Q2Wz5RSgP; Mon, 29 Jul 2024 15:35:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9C71RVz41q0; Mon, 29 Jul 2024 15:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NiuSmhtM32+5ximDjCoK9x3CKoUHPbpM+tzfedIMNgg=; b=BV4SaV1J57Xlz9k48H60Kn6/6/S+nRq3vb2+U5gKkcySupRt6sx5aSt4yRo3MD3sZ/9c3n PCl0n2QDed0Ia4vyZVTakvxepwdS9QGixBbcln74+dX6QBqSHb5wrsxYm8IftPQDmfCH/G bfjnnMEJH9u80ELrk2x0eclvrOpXAUDOeL6qsDY+O/+extYZJeRH53IGLzenUV3OhoLBFn vwGpnnOehXmYfDUD5C5S6b6V+XhEHM+AI5+cmEulMSrfGc1X2xEfB3KAHiNPr/bdyQeVX1 kMSm2mzJArrZkEnws0egHoPFAfTaY6QB8R6x2sf0nMJ6NLinFdIRBLSUegpJAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267312; a=rsa-sha256; cv=none; b=xwH99zB38sEFP5f0J6dmMwx7WpOn9PPNjF+NLZhUn2GTj2ULrEcg4v8ON4OfxioST/rZ3O zUe/Q1ExZrVT33ibdk28hnm9Dq7GjHj3wzj9oycJ3iKcc6h4IO93yXKaAjP8NAbW7YBDsa qWh7qYH/+ubbtBryJpxmf6kabGgrm/N6i/cD/qt1FsRXnwdlo/DU5AMGmfvbj2rRVc041O 7Xj3PACjRXEs5R++9qZjUBIWQ2GsqCSAKXYXNTtPcEc41SK/IqgQGBvXEsbaftff32vTfb wV3sBh1DqmtnrHLn3NUNowq6urnnEASTrXtweOJy+SR72Pdr4R70vClaUMNmpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NiuSmhtM32+5ximDjCoK9x3CKoUHPbpM+tzfedIMNgg=; b=H7sEUw7s0JqIQkCsJIadCN1MdBDz6TptbsNGMS86VmTYecEPZNDkVPXJv7XQU4yoP1c/F1 a30P51PbCBjSfeaEhOAX79xqQgnI0ax7EDXiRoFKE5Njoug2ckTTtIBhMwCN3cnNie4Wbl 8YN4Fup+ic1nprrCbxFlBTt6A/Z3SPyhn9QY6Ud5KaG145yvMGoDNmfESnh/RZJpHMAsGk 8iLSpK4d01ptx3k61M6ix/WqqH8IJcWfYl6pZB5DBB9RqDM0g1+GjKE+kBy+44XO1IGRrC FtJqlLIfW20QJ19N4aDw6DmmIk1yC59HWaNEDjYiIFbFY+7aG5bwchXIvm3fLQ== 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 4WXj9C6cmTzgSt; Mon, 29 Jul 2024 15:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZBR2002051; Mon, 29 Jul 2024 15:35:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZBVC002048; Mon, 29 Jul 2024 15:35:11 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:11 GMT Message-Id: <202407291535.46TFZBVC002048@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 894edb7cb133 - stable/14 - sound: Add device status string to sndstat nvlist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 894edb7cb133e07c45639b5d478a7d4803748385 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=894edb7cb133e07c45639b5d478a7d4803748385 commit 894edb7cb133e07c45639b5d478a7d4803748385 Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:14 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:53 +0000 sound: Add device status string to sndstat nvlist Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46163 (cherry picked from commit 810530aa2648812860e84d951d9cf96dfd24e595) --- share/man/man4/sndstat.4 | 6 +++++- sys/dev/sound/pcm/sndstat.c | 1 + sys/sys/sndstat.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index f638fc6834fe..66c1b6e8402d 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -29,7 +29,7 @@ .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd June 5, 2024 +.Dd July 26, 2024 .Dt SNDSTAT 4 .Os .Sh NAME @@ -74,6 +74,7 @@ dsps (NVLIST ARRAY): 1 max_chn (NUMBER): 2 provider_info (NVLIST): unit (NUMBER): 0 + status (STRING): on hdaa0 bitperfect (BOOL): FALSE pvchan (NUMBER): 1 rvchan (NUMBER): 0 @@ -169,6 +170,9 @@ provider, there are a number of name/value pairs inside this field: .Bl -tag -width ".Dv channel_info" .It Dv unit Sound card unit. +.It Dv status +Status string. +Usually reports the driver the device is attached on. .It Dv bitperfect Whether the sound card has bit-perfect mode enabled. .It Dv pvchan diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 753531f3694e..fda7a2ad6d48 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -440,6 +440,7 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_UNIT, device_get_unit(d->dev)); // XXX: I want signed integer here + nvlist_add_string(sound4di, SNDST_DSPS_SOUND4_STATUS, d->status); nvlist_add_bool( sound4di, SNDST_DSPS_SOUND4_BITPERFECT, d->flags & SD_F_BITPERFECT); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHAN, d->pvchancount); diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index 6fef6502ec89..2f2965bb3d05 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -70,6 +70,7 @@ struct sndstioc_nv_arg { */ #define SNDST_DSPS_SOUND4_PROVIDER "sound(4)" #define SNDST_DSPS_SOUND4_UNIT "unit" +#define SNDST_DSPS_SOUND4_STATUS "status" #define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect" #define SNDST_DSPS_SOUND4_PVCHAN "pvchan" #define SNDST_DSPS_SOUND4_RVCHAN "rvchan" From nobody Mon Jul 29 15:35:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9F1YWQz5RScn; Mon, 29 Jul 2024 15:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9F0wBtz41q1; Mon, 29 Jul 2024 15:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ff+NYUF3s2YZEzK5hpluM70ntq/WxTAJuftthxmkAR0=; b=luGl9WtVYGUwGEvTU2QbGsQaLvsN5Sp9Gx6wOnA+Hij2ldCITvfF1Rq7t4y1gF3MjyVPo7 TWbbcOBAHuHWXUWix1M45hM8fiRj6vQfmuxdvJyBXyI65xal7Hcar68xvhydVh3xXZI5Pw pwHs4etHqcEXtWkABV1INK0tbX8O5KFpuvZacmGBhJ+JB57A0S/v8JT56iNbfosc8EvWuk b+lFty4+6uOvhhZZ7mcQs6US2mEx0wzVnz/stEMjtx+ylPdFLqXZ84u4cHGBzePsTG4WCj FlR8E1528mcfL8P8FnC3BfrNr/CPU7yIcRcB+eAXOaqxz2LyJ8YfvC0NQi++Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267313; a=rsa-sha256; cv=none; b=jjbmSYG8k1P3BhvHnfAdawB7FnrMrfs8EmY8LhCr1UcAIZ96NilWxuflfYzhOTky/sm6vz HAhYasGHKnqH76fSec/cJ2MKuumSL2+DJPhwyXU6urKvVsDyi3PlL8ly+uKJhNIOroyr4Q n1HNf/jroE6uQX7AXraz1xol9erQyc47mxc07Djl6yO/FxdQuQYHOHtjFEm4eMQkvPdZDy UOsbT/qHdKe1aTi97tN+6ZcMUayArJ7j8o2rj3lROwA5k+0kf9pq/a1AcvKu1PRI23E/7/ IdEDs54RsXTABcvsUOtDGu9QS/mhLlYBDuEmgpclAT55gwAGIA2955hI40kpqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ff+NYUF3s2YZEzK5hpluM70ntq/WxTAJuftthxmkAR0=; b=V4AUckIzRd47qRs94nW1oBqTgzLulCWzDD6A9ZxHPWWieL2FoKLjpKEe2roG1bYXPv7WQc YVOZTV2sbxy1Y7ImAZw1G+OqcBEKKpvPNS4Iej+9xAc9HMJoz8hW/8RQy0LscHJNo5E9Q6 EhOZ7lN98CtfqtgL5CD1sN1QVZYQ3PJaCNDDZzc96FiAkaVbpRwMgLOQw6Qi8huii8Rjjh 9I9is7qCzbAktXgSeuNj6h1Yhpunwb58vlVJwQMuCHPnobqhqNcsAh2iMLsupweV1pYd3h dOmqwNFU/cpRAgHh9aa6LzlBWmkm5l96zvTfmISAr9cEfDv4VGUoTDfaW2hQiA== 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 4WXj9F0WXnzgDF; Mon, 29 Jul 2024 15:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZCWN002108; Mon, 29 Jul 2024 15:35:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZCip002105; Mon, 29 Jul 2024 15:35:12 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:12 GMT Message-Id: <202407291535.46TFZCip002105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 08c1cf0b5221 - stable/14 - sound: Add *vchanrate and *vchanformat to sndstat nvlist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 08c1cf0b5221a4d7581f7c3e0319c5e36300b49b Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=08c1cf0b5221a4d7581f7c3e0319c5e36300b49b commit 08c1cf0b5221a4d7581f7c3e0319c5e36300b49b Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:21 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 sound: Add *vchanrate and *vchanformat to sndstat nvlist Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46164 (cherry picked from commit a6283717577066b0ff6c62053145470ff4134051) --- share/man/man4/sndstat.4 | 12 ++++++++++++ sys/dev/sound/pcm/sndstat.c | 8 ++++++++ sys/sys/sndstat.h | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index 66c1b6e8402d..7c2813356dae 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -77,7 +77,11 @@ dsps (NVLIST ARRAY): 1 status (STRING): on hdaa0 bitperfect (BOOL): FALSE pvchan (NUMBER): 1 + pvchanrate (NUMBER): 48000 + pvchanformat (NUMBER): 0x00000010 rvchan (NUMBER): 0 + rvchanrate (NUMBER): 48000 + rvchanformat (NUMBER): 0x00000010 channel_info (NVLIST_ARRAY): 1 name (STRING): pcm0:virtual_play:dsp0.vp0 parentchan (STRING): pcm0:play:dsp0.p0 @@ -177,8 +181,16 @@ Usually reports the driver the device is attached on. Whether the sound card has bit-perfect mode enabled. .It Dv pvchan Number of playback virtual channels. +.It Dv pvchanrate +Playback virtual channel sample rate. +.It Dv pvchanformat +Playback virtual channel format. .It Dv rvchan Number of recording virtual channels. +.It Dv rvchanrate +Recording virtual channel sample rate. +.It Dv rvchanformat +Recording virtual channel format. .It Dv channel_info Channel information. There are a number of name/value pairs inside this field: diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index fda7a2ad6d48..b0d2c5b6ca21 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -444,7 +444,15 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) nvlist_add_bool( sound4di, SNDST_DSPS_SOUND4_BITPERFECT, d->flags & SD_F_BITPERFECT); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHAN, d->pvchancount); + nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHANRATE, + d->pvchanrate); + nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHANFORMAT, + d->pvchanformat); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHAN, d->rvchancount); + nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHANRATE, + d->rvchanrate); + nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHANFORMAT, + d->rvchanformat); nchan = 0; CHN_FOREACH(c, d, channels.pcm) { diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index 2f2965bb3d05..f7d0b2f29bd5 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -73,7 +73,11 @@ struct sndstioc_nv_arg { #define SNDST_DSPS_SOUND4_STATUS "status" #define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect" #define SNDST_DSPS_SOUND4_PVCHAN "pvchan" +#define SNDST_DSPS_SOUND4_PVCHANRATE "pvchanrate" +#define SNDST_DSPS_SOUND4_PVCHANFORMAT "pvchanformat" #define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +#define SNDST_DSPS_SOUND4_RVCHANRATE "rvchanrate" +#define SNDST_DSPS_SOUND4_RVCHANFORMAT "rvchanformat" #define SNDST_DSPS_SOUND4_CHAN_INFO "channel_info" #define SNDST_DSPS_SOUND4_CHAN_NAME "name" #define SNDST_DSPS_SOUND4_CHAN_PARENTCHAN "parentchan" From nobody Mon Jul 29 15:35:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9G3LNGz5RSV0; Mon, 29 Jul 2024 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9G1j5lz41qC; Mon, 29 Jul 2024 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53Eim3fp0j37lM/GVAndkJIB7nPfoXFApCpq+XjSd6g=; b=QQ4NmqcEI5uAZ0UE5LVgkoPInEPDcs+aOjP/y1JzdNCkgJPkUk+oGnPoOOLFIpYaOfS0Rv IOZSjYkw/rdWcKhT0g72pb09SUfMcpkjXMKVHo32WQSnctoyuxcbGL+D3XoiT9uss1sV7y +2cTD21pZdOfm3NsaSSp8eTQcudzAqgFon9Fn2Clwp2XQgwmmrdFLVVnx7WAGI1gJlrWOD KbJzuifvYTIsTm2/oJrghf2WfJLJxhI8vAw2hypj/h4wXguhiLduoM+J3y0pO0Ayp+8YIK +ZGB5mGDe7ek9ZSf9+rdhXIcj6zYETjTqz6rhRhIddrc8jbJor1Zh+/BAFRr1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267314; a=rsa-sha256; cv=none; b=skHeqfF1I/uRGnQjwgmn53X/54bkIWRbil/I+SXW49AV7P1ZoSJZs8HQSX59zvhGgm5Z47 voN2QNmS0uJ0TXBl4m5asWMlC9fuW1WsFnNI/ykWJjkehVuO1tVJCaJghGDDx1OH9OJKxw LrRIpQtxKT3e+Qv1jkeFqrSCYM5KCYDU1R9uAHMfrFXzNSq5ESVbKvUqUGoIpiPlcAZmay znLezuOzxoPzYWgDT1vYm4+VW5NGO9LveHdBTnF85gx8cEPO1alTEY5P3WEh3m5KkTOFR/ htTwhwfDeEpmk2mRYVqtR7lQIMarQUt62OIuk0xg59FoJX0mQxflVnaFtQJAow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53Eim3fp0j37lM/GVAndkJIB7nPfoXFApCpq+XjSd6g=; b=HXKGuiAo0rilkQqcfhvJZOsi/SO5VqaIZ7fHQS8T3mkzxeGWD7BcxhytmaudE9VfZFjllK XUxGQr6B+p7l8hCP4BtYyuGiMob14Rn9+fS00T23MqJBWwiB1HLTkIVupRI6Dq4pD5Sm/A TqdHFA3qN9drHw7EyC0O4iY3T8bDESkurPIEm9PDu72p02nR7QV0n4KpF7JI+oo+sMC4RZ kh91/sBOMuVWIRzkJ3aXxzoDb4BhJ0niaR3VXAkM90ZEUlth3EaMRolwZNzFang5avWH/j Cu1ecjqPJClXVEoqRV8elynBStZOjm754JSlzE3hNd6hO5kXOSP+Q2y223iccQ== 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 4WXj9G1GnhzgQN; Mon, 29 Jul 2024 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZEhg002159; Mon, 29 Jul 2024 15:35:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZEKt002156; Mon, 29 Jul 2024 15:35:14 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:14 GMT Message-Id: <202407291535.46TFZEKt002156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 188d619e4569 - stable/14 - sound: Add OSS channel capabilities to sndstat nvlist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 188d619e45692c491158c63cdb468a8ad6912224 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=188d619e45692c491158c63cdb468a8ad6912224 commit 188d619e45692c491158c63cdb468a8ad6912224 Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:27 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 sound: Add OSS channel capabilities to sndstat nvlist Assignment taken from dsp_oss_engineinfo(). Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46166 (cherry picked from commit bd5bcc848c5764229926ad27a4bd77af4f87d189) --- share/man/man4/sndstat.4 | 3 +++ sys/dev/sound/pcm/sndstat.c | 7 ++++++- sys/sys/sndstat.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index 7c2813356dae..bef444529e5f 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -86,6 +86,7 @@ dsps (NVLIST ARRAY): 1 name (STRING): pcm0:virtual_play:dsp0.vp0 parentchan (STRING): pcm0:play:dsp0.p0 unit (NUMBER): 1 + caps (NUMBER): 0x073200 latency (NUMBER): 2 rate (NUMBER): 48000 format (NUMBER): 0x201000 @@ -201,6 +202,8 @@ Channel name. Parent channel name (e.g., in the case of virtual channels). .It Dv unit Channel unit. +.It Dv caps +OSS capabilities. .It Dv latency Latency. .It Dv rate diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index b0d2c5b6ca21..f09fa7139884 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -385,7 +385,7 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) struct pcm_channel *c; struct pcm_feeder *f; struct sbuf sb; - uint32_t maxrate, minrate, fmts, minchn, maxchn; + uint32_t maxrate, minrate, fmts, minchn, maxchn, caps; nvlist_t *di = NULL, *sound4di = NULL, *diinfo = NULL, *cdi = NULL; int err, nchan; @@ -467,10 +467,15 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) CHN_LOCK(c); + caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER | + ((c->flags & CHN_F_VIRTUAL) ? PCM_CAP_VIRTUAL : 0) | + ((c->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : PCM_CAP_INPUT); + nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_NAME, c->name); nvlist_add_string(cdi, SNDST_DSPS_SOUND4_CHAN_PARENTCHAN, c->parentchannel != NULL ? c->parentchannel->name : ""); nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_UNIT, nchan++); + nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_CAPS, caps); nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_LATENCY, c->latency); nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_RATE, c->speed); diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index f7d0b2f29bd5..6fd2e06ac483 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -82,6 +82,7 @@ struct sndstioc_nv_arg { #define SNDST_DSPS_SOUND4_CHAN_NAME "name" #define SNDST_DSPS_SOUND4_CHAN_PARENTCHAN "parentchan" #define SNDST_DSPS_SOUND4_CHAN_UNIT "unit" +#define SNDST_DSPS_SOUND4_CHAN_CAPS "caps" #define SNDST_DSPS_SOUND4_CHAN_LATENCY "latency" #define SNDST_DSPS_SOUND4_CHAN_RATE "rate" #define SNDST_DSPS_SOUND4_CHAN_FORMAT "format" From nobody Mon Jul 29 15:35:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9H5tYSz5RSZV; Mon, 29 Jul 2024 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9H2gYTz428F; Mon, 29 Jul 2024 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KYqiLDzuMPr+MLddVb1WTD7nWY3yUPp8eTtIWP069es=; b=bhg22PMcG1c4JK2RHSe9qanLG/WyB4vHrnknGLEai8PyQECzhtvV6n9ZKUzqdPv+69J5Ba /a3rYc2+Jzn75fBTtj3wIsZroBgepHV7juEHlt0NtBu/+RreY2tl/Xpmnyug2x2U0nIrEt tOwoT38XO1Wc5ItMaIfGLNnoO60DEi6bh1gwFwehc4fp9fASE5Kp4tBL2O1ynhzAr1m3ns gyVakgD2ZT/3357YY8LsiJrzyYl1PrzCfNUz+KK5wGIwzW1roOlZwcPcT5+Cbla1vgwd1I F4gzI9YMZDwhiGhhP7HE7s+k9v5sl78f4LETJ7BMvpoWoAufBDm26C2nMY+1uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267315; a=rsa-sha256; cv=none; b=E6f4jYmHw5F8kRF8MY7hEsfN2h9YtV8vold8VFzvcp1jDrkrwgG6jDUWI/2u290/wzYSjO EZ9V+5+IN5qMhGEsXznwbIvYd38ZuOtj7HJQQI9DaL07vLsX4xvJw2F0mNGufQVKUKQedA f/MNo6tfZxlS8MfpmlfxRfpp+HHHYndDmEEu1i967n5nNVgeE1Vr+gTbKrWox0h5Wj0bmd IoaLSzxHuLFg/E71pUurKzYqVsafAT40vernafberup8Fi+XzM3VSMMnum10OtWMVJS5eM 7SsGhRKKzc90H/UngX6Jm86aNKLuL45SCqhYucNy/fwtVyUrBATE/OTmWffa8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KYqiLDzuMPr+MLddVb1WTD7nWY3yUPp8eTtIWP069es=; b=TVObrC2Rd47LdWJLewXdIoCPBRy/zQs0u1KKYzohwzIDKevWgcU6m24ItmSrT1N3me4CGO h5VOEAhD3ccbCNp0BcVXi0Q8+b/37MP1sI9kqcm7NHlrnkE92DpuPkminxxbtxMnADn/zr wyztfofd9/DGn5gpNKZeBxKzWqgq2UU35/EPuSaX9BbCejuSQLluXLtFYktw7XcduCQN6v UGB3Oqfl0ey5B4apm2CArDhOUZj4T+JQf5d2EE3h2Leo6uXiiEK8Upw0y2rG9Y1H4Ym0de duMUj4alqkcWttIev1bLOTnxxcA5hb3vy3w5H+W1KROEpCdBo5/JChcucGW24g== 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 4WXj9H29GzzgSv; Mon, 29 Jul 2024 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZFn2002206; Mon, 29 Jul 2024 15:35:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZFeA002203; Mon, 29 Jul 2024 15:35:15 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:15 GMT Message-Id: <202407291535.46TFZFeA002203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: d8c42c34176a - stable/14 - sound examples: Organize files in directories List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d8c42c34176ad9a34ffc343acaa093bbd840e523 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=d8c42c34176ad9a34ffc343acaa093bbd840e523 commit d8c42c34176ad9a34ffc343acaa093bbd840e523 Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:35 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 sound examples: Organize files in directories More examples will be added, so it's better to be organized. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45968 (cherry picked from commit cb00491fbc51751fe166056cc69e23beeb26fee4) --- share/examples/Makefile | 11 +++++++---- share/examples/sound/{ => oss}/README | 0 share/examples/sound/{ => oss}/basic.c | 0 share/examples/sound/{ => oss}/midi.c | 0 share/examples/sound/{ => oss}/ossinit.h | 0 share/examples/sound/{ => oss}/ossmidi.h | 0 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/share/examples/Makefile b/share/examples/Makefile index 06d10a0bc149..9cd64cc2a3bd 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -310,12 +310,15 @@ SE_SCSI_TARGET= \ scsi_cmds.c SE_DIRS+= sound -SE_SOUND= \ +SE_SOUND= + +SE_DIRS+= sound/oss +SE_SOUND_OSS= \ + README \ basic.c \ - ossinit.h \ - ossmidi.h \ midi.c \ - README + ossinit.h \ + ossmidi.h SE_DIRS+= sunrpc SE_SUNRPC= Makefile diff --git a/share/examples/sound/README b/share/examples/sound/oss/README similarity index 100% rename from share/examples/sound/README rename to share/examples/sound/oss/README diff --git a/share/examples/sound/basic.c b/share/examples/sound/oss/basic.c similarity index 100% rename from share/examples/sound/basic.c rename to share/examples/sound/oss/basic.c diff --git a/share/examples/sound/midi.c b/share/examples/sound/oss/midi.c similarity index 100% rename from share/examples/sound/midi.c rename to share/examples/sound/oss/midi.c diff --git a/share/examples/sound/ossinit.h b/share/examples/sound/oss/ossinit.h similarity index 100% rename from share/examples/sound/ossinit.h rename to share/examples/sound/oss/ossinit.h diff --git a/share/examples/sound/ossmidi.h b/share/examples/sound/oss/ossmidi.h similarity index 100% rename from share/examples/sound/ossmidi.h rename to share/examples/sound/oss/ossmidi.h From nobody Mon Jul 29 15:35:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9J5Q9Nz5RSgV; Mon, 29 Jul 2024 15:35: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9J3dzHz424Z; Mon, 29 Jul 2024 15:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YckXuzm0og7mekEoNJvDEGUCYj5XSKrcwhyYmkYVlJg=; b=NmdV8t74yM48kX42tsLUIRYBHmAnSEY7GgNQajAnOosskeoJ2eVS2VVeTuFyXrhoFTCxXR mFvh30Fa0hTUqTZVB+P30ku0klwvQ78VTBM9fBohbFGK3f3Z7iHz0kTn3RW450rTN9OTM0 6hzu+/ABoxNpI7Pdjn+gGjRve9+UBgp4rFvGiUAalEk6BpzcK6ErOSPIftCehvcjsLIqvF /QGkX8Yv7mplSU/joR25GHh4L3bWrlk4pDF3vrqJ2cAF6+2YvZ470032OodQ3sUPQZD9zr bKW/EQiNSvmRiEyq+ySjG/qyaxQVIxRhnDMK1YEQ25nYeohSPgtfCqnAY9J8kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267316; a=rsa-sha256; cv=none; b=ieMVcibZAmkpIkrq5EeKuPLmgpgO9wSqZpXnwZzg5GtV6xz0GZDRt/bL+QwCrfIOFUHLpX LqzFPnBc0NIWYl/nPTn0ygyw/2RUtqUFOSwrVs2xSyXcytxmvp3Nt5kjp1zII+mW0HhF7H ooniQ9cudxubu0LcrprDt28nUp8R0IkZ8xQxBA8FvnwkeuEqYtgEiVA/JlKcQbvhYYH5aT 2hkyZZynopnmqBqWNHnXgP0mmj1Y0efxKrscOjShFP8MB/3vHeGPZmPxJ4JnGvu/6Q/LIx E+ZL7rF5rdbfVEf+AjCEOKO0mhwvxKmrGVEgGVXxfEpnCkS687OVUAMxgYtpEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YckXuzm0og7mekEoNJvDEGUCYj5XSKrcwhyYmkYVlJg=; b=HTbQtr9Nnl+iFU7aBlxcXBz1hGrvCJ7vF2YKYIX2gnKvp8G18S9Y6PwTc58ktQX+0R2Y2u wlgfwGa/rCfozelDX0HU1FC+mxRAeGvqyk69TMnuP6sZ68HflU7Yq8jjLSm0sLHJpT3XkR IW9/n0I4akmT6bvLsiHMBMX6Q2/UTKIH97LODnjadApQ1wQiDjGKxJu/IdF7d+7/Q81uYr a0uRVs1LgWQzpYGiTjcniyofMrlyxWocKosNjtAgzG8v79IAJJDUcDdzdF1+RWBMgrnzkX D2FmkVEUj6AyqOBma5s8QCH3PSQmsDeXqe7rE2CuLAybrbvx4Vgbn6DWUYmr2g== 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 4WXj9J3CqXzg0w; Mon, 29 Jul 2024 15:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZGeo002254; Mon, 29 Jul 2024 15:35:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZG7o002251; Mon, 29 Jul 2024 15:35:16 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:16 GMT Message-Id: <202407291535.46TFZG7o002251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: b4a9d6c8faf5 - stable/14 - sound examples: Add sndstat nvlist example List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b4a9d6c8faf5eb5c769476f06c05134a9d3eff89 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b4a9d6c8faf5eb5c769476f06c05134a9d3eff89 commit b4a9d6c8faf5eb5c769476f06c05134a9d3eff89 Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:40 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 sound examples: Add sndstat nvlist example Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45969 (cherry picked from commit f08ecd24a19ba772701fc35caaad92b9fe91fa9c) --- share/examples/Makefile | 3 +- share/examples/sound/sndstat_nv.c | 206 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 208 insertions(+), 1 deletion(-) diff --git a/share/examples/Makefile b/share/examples/Makefile index 9cd64cc2a3bd..1fbc74f51083 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -310,7 +310,8 @@ SE_SCSI_TARGET= \ scsi_cmds.c SE_DIRS+= sound -SE_SOUND= +SE_SOUND= \ + sndstat_nv.c SE_DIRS+= sound/oss SE_SOUND_OSS= \ diff --git a/share/examples/sound/sndstat_nv.c b/share/examples/sound/sndstat_nv.c new file mode 100644 index 000000000000..1056c1f4a08f --- /dev/null +++ b/share/examples/sound/sndstat_nv.c @@ -0,0 +1,206 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Christos Margiolis + * 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 + +/* + * Example program showcasing how to use sndstat(4)'s nvlist interface, and how + * to fetch all currently supported fields, with the appropriate error checks. + * + * For more detailed information on what each nvlist field represents, please + * read sndstat(4)'s man page. + */ + +int +main(int argc, char *argv[]) +{ + nvlist_t *nvl; + const nvlist_t * const *di; + const nvlist_t * const *cdi; + struct sndstioc_nv_arg arg; + size_t nitems, nchans, i, j; + int fd, pchan, rchan; + + if ((fd = open("/dev/sndstat", O_RDONLY)) < 0) + err(1, "open(/dev/sndstat)"); + + if (ioctl(fd, SNDSTIOC_REFRESH_DEVS, NULL) < 0) + err(1, "ioctl(SNDSTIOC_REFRESH_DEVS)"); + + arg.nbytes = 0; + arg.buf = NULL; + if (ioctl(fd, SNDSTIOC_GET_DEVS, &arg) < 0) + err(1, "ioctl(SNDSTIOC_GET_DEVS#1)"); + + if ((arg.buf = malloc(arg.nbytes)) == NULL) + err(1, "malloc"); + + if (ioctl(fd, SNDSTIOC_GET_DEVS, &arg) < 0) + err(1, "ioctl(SNDSTIOC_GET_DEVS#2)"); + + if ((nvl = nvlist_unpack(arg.buf, arg.nbytes, 0)) == NULL) + err(1, "nvlist_unpack"); + + if (nvlist_empty(nvl) || !nvlist_exists(nvl, SNDST_DSPS)) + errx(1, "no soundcards attached"); + + di = nvlist_get_nvlist_array(nvl, SNDST_DSPS, &nitems); + for (i = 0; i < nitems; i++) { +#define NV(type, item) \ + nvlist_get_ ## type (di[i], SNDST_DSPS_ ## item) + printf("nameunit=%s\n", NV(string, NAMEUNIT)); + printf("\tfrom_user=%d\n", NV(bool, FROM_USER)); + printf("\tdevnode=%s\n", NV(string, DEVNODE)); + printf("\tdesc=%s\n", NV(string, DESC)); + printf("\tprovider=%s\n", NV(string, PROVIDER)); + printf("\tpchan=%d\n", (int)NV(number, PCHAN)); + printf("\trchan=%d\n", (int)NV(number, RCHAN)); + pchan = NV(number, PCHAN); + rchan = NV(number, RCHAN); +#undef NV + + if (pchan && !nvlist_exists(di[i], SNDST_DSPS_INFO_PLAY)) + errx(1, "playback channel list empty"); + if (rchan && !nvlist_exists(di[i], SNDST_DSPS_INFO_REC)) + errx(1, "recording channel list empty"); + +#define NV(type, mode, item) \ + nvlist_get_ ## type (nvlist_get_nvlist(di[i], \ + SNDST_DSPS_INFO_ ## mode), SNDST_DSPS_INFO_ ## item) + if (pchan) { + printf("\tplay_min_rate=%d\n", + (int)NV(number, PLAY, MIN_RATE)); + printf("\tplay_max_rate=%d\n", + (int)NV(number, PLAY, MAX_RATE)); + printf("\tplay_formats=%#08x\n", + (int)NV(number, PLAY, FORMATS)); + printf("\tplay_min_chn=%d\n", + (int)NV(number, PLAY, MIN_CHN)); + printf("\tplay_max_chn=%d\n", + (int)NV(number, PLAY, MAX_CHN)); + } + if (rchan) { + printf("\trec_min_rate=%d\n", + (int)NV(number, REC, MIN_RATE)); + printf("\trec_max_rate=%d\n", + (int)NV(number, REC, MAX_RATE)); + printf("\trec_formats=%#08x\n", + (int)NV(number, REC, FORMATS)); + printf("\trec_min_chn=%d\n", + (int)NV(number, REC, MIN_CHN)); + printf("\trec_max_chn=%d\n", + (int)NV(number, REC, MAX_CHN)); + } +#undef NV + + if (!nvlist_exists(di[i], SNDST_DSPS_PROVIDER_INFO)) + continue; + +#define NV(type, item) \ + nvlist_get_ ## type (nvlist_get_nvlist(di[i], \ + SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_ ## item) + printf("\tunit=%d\n", (int)NV(number, UNIT)); + printf("\tstatus=%s\n", NV(string, STATUS)); + printf("\tbitperfect=%d\n", NV(bool, BITPERFECT)); + printf("\tpvchan=%d\n", (int)NV(number, PVCHAN)); + printf("\tpvchanrate=%d\n", (int)NV(number, PVCHANRATE)); + printf("\tpvchanformat=%#08x\n", (int)NV(number, PVCHANFORMAT)); + printf("\trvchan=%d\n", (int)NV(number, RVCHAN)); + printf("\trvchanrate=%d\n", (int)NV(number, RVCHANRATE)); + printf("\trvchanformat=%#08x\n", (int)NV(number, RVCHANFORMAT)); +#undef NV + + if (!nvlist_exists(nvlist_get_nvlist(di[i], + SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_CHAN_INFO)) + errx(1, "channel info list empty"); + + cdi = nvlist_get_nvlist_array( + nvlist_get_nvlist(di[i], SNDST_DSPS_PROVIDER_INFO), + SNDST_DSPS_SOUND4_CHAN_INFO, &nchans); + for (j = 0; j < nchans; j++) { +#define NV(type, item) \ + nvlist_get_ ## type (cdi[j], SNDST_DSPS_SOUND4_CHAN_ ## item) + printf("\tchan=%s\n", NV(string, NAME)); + printf("\t\tparentchan=%s\n", NV(string, PARENTCHAN)); + printf("\t\tunit=%d\n", (int)NV(number, UNIT)); + printf("\t\tcaps=%#08x\n", (int)NV(number, CAPS)); + printf("\t\tlatency=%d\n", (int)NV(number, LATENCY)); + printf("\t\trate=%d\n", (int)NV(number, RATE)); + printf("\t\tformat=%#08x\n", (int)NV(number, FORMAT)); + printf("\t\tpid=%d\n", (int)NV(number, PID)); + printf("\t\tcomm=%s\n", NV(string, COMM)); + printf("\t\tintr=%d\n", (int)NV(number, INTR)); + printf("\t\txruns=%d\n", (int)NV(number, XRUNS)); + printf("\t\tfeedcnt=%d\n", (int)NV(number, FEEDCNT)); + printf("\t\tleftvol=%d\n", (int)NV(number, LEFTVOL)); + printf("\t\trightvol=%d\n", (int)NV(number, RIGHTVOL)); + printf("\t\thwbuf_format=%#08x\n", + (int)NV(number, HWBUF_FORMAT)); + printf("\t\thwbuf_size=%d\n", + (int)NV(number, HWBUF_SIZE)); + printf("\t\thwbuf_blksz=%d\n", + (int)NV(number, HWBUF_BLKSZ)); + printf("\t\thwbuf_blkcnt=%d\n", + (int)NV(number, HWBUF_BLKCNT)); + printf("\t\thwbuf_free=%d\n", + (int)NV(number, HWBUF_FREE)); + printf("\t\thwbuf_ready=%d\n", + (int)NV(number, HWBUF_READY)); + printf("\t\tswbuf_format=%#08x\n", + (int)NV(number, SWBUF_FORMAT)); + printf("\t\tswbuf_size=%d\n", + (int)NV(number, SWBUF_SIZE)); + printf("\t\tswbuf_blksz=%d\n", + (int)NV(number, SWBUF_BLKSZ)); + printf("\t\tswbuf_blkcnt=%d\n", + (int)NV(number, SWBUF_BLKCNT)); + printf("\t\tswbuf_free=%d\n", + (int)NV(number, SWBUF_FREE)); + printf("\t\tswbuf_ready=%d\n", + (int)NV(number, SWBUF_READY)); + printf("\t\tswbuf_feederchain=%s\n", + NV(string, FEEDERCHAIN)); +#undef NV + } + } + + free(arg.buf); + nvlist_destroy(nvl); + close(fd); + + return (0); +} From nobody Mon Jul 29 15:35:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9L75CRz5RSQB; Mon, 29 Jul 2024 15:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9L5KzXz42L8; Mon, 29 Jul 2024 15:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/YYd+DGWi4UShlF4K0Tntd9PZgqEFcKVBXsHV6HgLQ=; b=VB+KPlKltW0wcWnxhApSGdKFrV2S7aallZVuoR6pN5Qnp3m8xUF/aPxcAXGp+o3ycfx5uK bNl2dJATLDQeWJHt1CV++j00lfljq3dyeRVk3CzUSOA0+n2lbZ6+9yZWDoUZLjSzbiiyWL DykGZY11B52sw/goqEmIkcIVc/JahhwygwVSi9NHUy5wPEj6nn0l7IdOemv0bgO4gfok9r mJqF5FEtoawNG7Tjsw2vAn1witVgA5Z2ynZnKqo6J9dP/coEpraNiOopSSXScyCrVCjeY3 aLeoJrdWcUMsOtVnvqcFJVDGhlg5o2hf3QNsChyz/ZKeySsOHPvfVyThKuaUxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267318; a=rsa-sha256; cv=none; b=ZL07Pv2JoP+HijaI/Y8PxeT6bfmil7r5m39mJHrLYygmPX6Ad5tDavpdJSV/6mH5H/8NUw MpeGLx6v0qIk7qnySEAwucTU1/JLzKNNMzkh9/uCk7EZQtTJ8I/bWv9u++5FV0xRCc3F2U IHeX1SBYPo4tnY0IlFDrV5aucqvCA1fDZf2I2WIPJzhjKDQqjJY9+JBhCGLymPBTURfCTk LjOvI49dgso4r2PMVbUUg0xVwmyOp2rgbSMMnjf2rDmYJvmHLXJZiae/FWhOwaGXQkwxOt MKNDtzBjPOjYTssyT0cNXwgUo0xVGK5feNdh5DHyb0uCW5xeWElMjQDn0i9yKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/YYd+DGWi4UShlF4K0Tntd9PZgqEFcKVBXsHV6HgLQ=; b=eE9YnEfx7IwqY4gmCU728LVxD8ugamoa8Ki0ploNkFD/theKkMSLCCe8Sa+GQtyoYAS+UE WnEQk/3kMDfbYrJ8N/5LPE6P+nQ4cEVEfXZVyB2OqVIoWcoaqAEdtABGfyPBqj7Tym4ViI HPg9YJa7BTRtsUF9FXO8Ku4ydsdkl/vAtEYCvs3T5XpGn3aOvAkQcgTd6sF2TDhpr0B5Je YCLu3q66uaUzjNgkIlZXB0BSYxcSqUJvxi6bPqRATYX9jyO1dZ8pcJw9DKkAj2d6wRPbQ3 EoKwDe4t2FiIfCvY+yWd0UuOIAtvkKzsCk/8M0DXIJIIj4n4aBK5OsSfIbtAPQ== 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 4WXj9L4xc6zfsQ; Mon, 29 Jul 2024 15:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZI09002350; Mon, 29 Jul 2024 15:35:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZIKX002347; Mon, 29 Jul 2024 15:35:18 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:18 GMT Message-Id: <202407291535.46TFZIKX002347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 22be802cf84b - stable/14 - sound tests: Add sndstat nvlist ATF test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 22be802cf84bb9b623ab62e347bf8fc3110916fc Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=22be802cf84bb9b623ab62e347bf8fc3110916fc commit 22be802cf84bb9b623ab62e347bf8fc3110916fc Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:03 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 sound tests: Add sndstat nvlist ATF test Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45901 (cherry picked from commit 95eb4b873b6a8b527c5bd78d7191975dfca38998) --- tests/sys/Makefile | 1 + tests/sys/sound/Makefile | 9 ++ tests/sys/sound/sndstat.c | 214 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 224 insertions(+) diff --git a/tests/sys/Makefile b/tests/sys/Makefile index 20ea4f181c7c..a2a133e19803 100644 --- a/tests/sys/Makefile +++ b/tests/sys/Makefile @@ -31,6 +31,7 @@ TESTS_SUBDIRS+= netpfil TESTS_SUBDIRS+= opencrypto TESTS_SUBDIRS+= posixshm TESTS_SUBDIRS+= ses +TESTS_SUBDIRS+= sound TESTS_SUBDIRS+= sys TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm diff --git a/tests/sys/sound/Makefile b/tests/sys/sound/Makefile new file mode 100644 index 000000000000..fb731fb8ab61 --- /dev/null +++ b/tests/sys/sound/Makefile @@ -0,0 +1,9 @@ +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/sound + +ATF_TESTS_C+= sndstat + +LDFLAGS+= -lnv + +.include diff --git a/tests/sys/sound/sndstat.c b/tests/sys/sound/sndstat.c new file mode 100644 index 000000000000..7c030dfa8b58 --- /dev/null +++ b/tests/sys/sound/sndstat.c @@ -0,0 +1,214 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Christos Margiolis + * 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 +#include + +static void +load_dummy(void) +{ + if (kldload("snd_dummy.ko") < 0 && errno != EEXIST) + atf_tc_skip("snd_dummy.ko not found"); +} + +ATF_TC(sndstat_nv); +ATF_TC_HEAD(sndstat_nv, tc) +{ + atf_tc_set_md_var(tc, "descr", "/dev/sndstat nvlist test"); +} + +ATF_TC_BODY(sndstat_nv, tc) +{ + nvlist_t *nvl; + const nvlist_t * const *di; + const nvlist_t * const *cdi; + struct sndstioc_nv_arg arg; + size_t nitems, nchans, i, j; + int fd, rc; + int pchan, rchan; + + load_dummy(); + + if ((fd = open("/dev/sndstat", O_RDONLY)) < 0) + atf_tc_skip("/dev/sndstat not found, load sound(4)"); + + rc = ioctl(fd, SNDSTIOC_REFRESH_DEVS, NULL); + ATF_REQUIRE_EQ(rc, 0); + + arg.nbytes = 0; + arg.buf = NULL; + rc = ioctl(fd, SNDSTIOC_GET_DEVS, &arg); + ATF_REQUIRE_EQ_MSG(rc, 0, "ioctl(SNDSTIOC_GET_DEVS#1) failed"); + + arg.buf = malloc(arg.nbytes); + ATF_REQUIRE(arg.buf != NULL); + + rc = ioctl(fd, SNDSTIOC_GET_DEVS, &arg); + ATF_REQUIRE_EQ_MSG(rc, 0, "ioctl(SNDSTIOC_GET_DEVS#2) failed"); + + nvl = nvlist_unpack(arg.buf, arg.nbytes, 0); + ATF_REQUIRE(nvl != NULL); + + if (nvlist_empty(nvl) || !nvlist_exists(nvl, SNDST_DSPS)) + atf_tc_skip("no soundcards attached"); + + di = nvlist_get_nvlist_array(nvl, SNDST_DSPS, &nitems); + for (i = 0; i < nitems; i++) { +#define NV(type, item) do { \ + ATF_REQUIRE_MSG(nvlist_exists(di[i], SNDST_DSPS_ ## item), \ + "SNDST_DSPS_" #item " does not exist"); \ + nvlist_get_ ## type (di[i], SNDST_DSPS_ ## item); \ +} while (0) + NV(string, NAMEUNIT); + NV(bool, FROM_USER); + NV(string, DEVNODE); + NV(string, DESC); + NV(string, PROVIDER); + NV(number, PCHAN); + NV(number, RCHAN); +#undef NV + + /* Cannot asign using the macro. */ + pchan = nvlist_get_number(di[i], SNDST_DSPS_PCHAN); + rchan = nvlist_get_number(di[i], SNDST_DSPS_RCHAN); + + if (pchan && !nvlist_exists(di[i], SNDST_DSPS_INFO_PLAY)) + atf_tc_fail("playback channel list empty"); + if (rchan && !nvlist_exists(di[i], SNDST_DSPS_INFO_REC)) + atf_tc_fail("recording channel list empty"); + +#define NV(type, mode, item) do { \ + ATF_REQUIRE_MSG(nvlist_exists(nvlist_get_nvlist(di[i], \ + SNDST_DSPS_INFO_ ## mode), SNDST_DSPS_INFO_ ## item), \ + "SNDST_DSPS_INFO_" #item " does not exist"); \ + nvlist_get_ ## type (nvlist_get_nvlist(di[i], \ + SNDST_DSPS_INFO_ ## mode), SNDST_DSPS_INFO_ ## item); \ +} while (0) + if (pchan) { + NV(number, PLAY, MIN_RATE); + NV(number, PLAY, MAX_RATE); + NV(number, PLAY, FORMATS); + NV(number, PLAY, MIN_CHN); + NV(number, PLAY, MAX_CHN); + } + if (rchan) { + NV(number, REC, MIN_RATE); + NV(number, REC, MAX_RATE); + NV(number, REC, FORMATS); + NV(number, REC, MIN_CHN); + NV(number, REC, MAX_CHN); + } +#undef NV + + /* XXX Do we need to skip the TC? userdevs won't have this list */ + if (!nvlist_exists(di[i], SNDST_DSPS_PROVIDER_INFO)) + continue; + +#define NV(type, item) do { \ + ATF_REQUIRE_MSG(nvlist_exists(nvlist_get_nvlist(di[i], \ + SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_ ## item), \ + "SNDST_DSPS_SOUND4_" #item " does not exist"); \ + nvlist_get_ ## type (nvlist_get_nvlist(di[i], \ + SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_ ## item); \ +} while (0) + NV(number, UNIT); + NV(string, STATUS); + NV(bool, BITPERFECT); + NV(number, PVCHAN); + NV(number, PVCHANRATE); + NV(number, PVCHANFORMAT); + NV(number, RVCHAN); + NV(number, PVCHANRATE); + NV(number, PVCHANFORMAT); +#undef NV + + if (!nvlist_exists(nvlist_get_nvlist(di[i], + SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_CHAN_INFO)) + atf_tc_fail("channel info list empty"); + + cdi = nvlist_get_nvlist_array( + nvlist_get_nvlist(di[i], SNDST_DSPS_PROVIDER_INFO), + SNDST_DSPS_SOUND4_CHAN_INFO, &nchans); + for (j = 0; j < nchans; j++) { +#define NV(type, item) do { \ + ATF_REQUIRE_MSG(nvlist_exists(cdi[j], SNDST_DSPS_SOUND4_CHAN_ ## item), \ + "SNDST_DSPS_SOUND4_CHAN_" #item " does not exist"); \ + nvlist_get_ ## type (cdi[j], SNDST_DSPS_SOUND4_CHAN_ ## item); \ +} while (0) + NV(string, NAME); + NV(string, PARENTCHAN); + NV(number, UNIT); + NV(number, CAPS); + NV(number, LATENCY); + NV(number, RATE); + NV(number, FORMAT); + NV(number, PID); + NV(string, COMM); + NV(number, INTR); + NV(number, XRUNS); + NV(number, FEEDCNT); + NV(number, LEFTVOL); + NV(number, RIGHTVOL); + NV(number, HWBUF_FORMAT); + NV(number, HWBUF_SIZE); + NV(number, HWBUF_BLKSZ); + NV(number, HWBUF_BLKCNT); + NV(number, HWBUF_FREE); + NV(number, HWBUF_READY); + NV(number, SWBUF_FORMAT); + NV(number, SWBUF_SIZE); + NV(number, SWBUF_BLKSZ); + NV(number, SWBUF_BLKCNT); + NV(number, SWBUF_FREE); + NV(number, SWBUF_READY); + NV(string, FEEDERCHAIN); +#undef NV + } + } + + free(arg.buf); + nvlist_destroy(nvl); + close(fd); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, sndstat_nv); + + return (atf_no_error()); +} From nobody Mon Jul 29 15:35:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9K5yl4z5RS74; Mon, 29 Jul 2024 15:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9K4wfLz42Hm; Mon, 29 Jul 2024 15:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZHkNReff61lVAy+RLX8BcVdyjFEnQGkgV3tO/0vgD3w=; b=u5VJz/m/UvMdR8pzlPjooOdXK92qt+12Txpg9SIdUHTYdCSVOo8ZJF/+el+j1d1uM5/Mmj XAQjN45QtT6M9RzB2or+G9u3dsdmY0XKiklMyMBFzBRvFklzQ6neLv/mnLtWK1aLW13aiP qFBzaMu/bBBVqn6TMHHVuA01fvvqdx4mbTNeu48kE/l5Occg4wXVDiENuU5kukyoZuXdgn 7tfBgT65g2SU6wb4IHssSFCj37zBi7MHiSg7ClcThCAco6wDKsPQsl2sk+b8M8SnFUkdD2 ziaWXzv2v+Y/eGtEBSHNWQaxarXYBfXXBWIClF7f0Hz318fOqkDp6omL80tHWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267317; a=rsa-sha256; cv=none; b=PhT5uipLG4G4xcwwLYYDKn4j3FO2EZQcIskNF+BXKWkZ2bZx5j3Ag50kTx3JvIQsSIEBIe unkPvJ4pUJhPOlCaViy0X5i1KHLq9G1O5/8iTABZk4BC2gBMzJw2s+f9IxyZFIKJWaA1t2 B6BjiWGzpKOx4m0tN8rghNLNoyNlDyDGBxGqTymY3iOjDvkkV40k+FcNQYZUPqxkrx7qcl Am5Z5pRWvOL88gBRVDu4KFbWSnhceug/rYLB5N4iwOotnGESzPAVV+Qi6B5eq2TNZ1IQJ/ 8SWPApG9Q+tS7nRhi6e0egOTKKnILH8UUnUc5tInCItiFbW4+67CJYM9Bb0kbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZHkNReff61lVAy+RLX8BcVdyjFEnQGkgV3tO/0vgD3w=; b=DFibYkGfMGZo3evVkeMU9L+mcksdPRogGcIUFKMBExxCRLSDDahnYfVdP54ZOLzD+nT9QE cxq9b3WYsOgNJf8InYH3vTqYj57VJM502hA8s0JAU5IbNFFxrFW/jZOztq8W6QVNtthrhE JjbI6ilsMvz6fpRVOhCdzBa/S8G6UAAnp/ZqncuTDqkX2hd6OXjv2wSEjZcQYP1ejyqDCZ CesWuOr5udlw211t/eYE/rF0m7GC415Mt89f978XZRG/0mEPbhVVYiY9bGgW1DARz6tQaS 4aA1Zt0HFdkposncYGkOE5b4/rtP3T74+esWbjJF0olzg+GblM5Zdx7PANLOQw== 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 4WXj9K4Cl9zgW7; Mon, 29 Jul 2024 15:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZHgM002295; Mon, 29 Jul 2024 15:35:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZH2k002292; Mon, 29 Jul 2024 15:35:17 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:17 GMT Message-Id: <202407291535.46TFZH2k002292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 1ff260a6e166 - stable/14 - sound: Implement dummy driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1ff260a6e1663a7f3468313d0b6d8d54b07af4c0 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1ff260a6e1663a7f3468313d0b6d8d54b07af4c0 commit 1ff260a6e1663a7f3468313d0b6d8d54b07af4c0 Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:45 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 sound: Implement dummy driver Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45967 (cherry picked from commit c15c9315b2cb7601cc337f7d5a8e124f4b2d5861) --- share/man/man4/Makefile | 1 + share/man/man4/snd_dummy.4 | 69 +++++++ sys/dev/sound/dummy.c | 353 ++++++++++++++++++++++++++++++++ sys/modules/sound/driver/Makefile | 1 + sys/modules/sound/driver/dummy/Makefile | 7 + 5 files changed, 431 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 612b063de3de..efe0625cc620 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -513,6 +513,7 @@ MAN= aac.4 \ snd_cmi.4 \ snd_cs4281.4 \ snd_csa.4 \ + snd_dummy.4 \ snd_emu10k1.4 \ snd_emu10kx.4 \ snd_envy24.4 \ diff --git a/share/man/man4/snd_dummy.4 b/share/man/man4/snd_dummy.4 new file mode 100644 index 000000000000..2b9d26d318ef --- /dev/null +++ b/share/man/man4/snd_dummy.4 @@ -0,0 +1,69 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this software were developed by Christos Margiolis +.\" 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. +.\" +.Dd July 15, 2024 +.Dt SND_DUMMY 4 +.Os +.Sh NAME +.Nm snd_dummy +.Nd Dummy audio driver +.Sh SYNOPSIS +To load the driver at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +snd_dummy_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver implements a virtual testing device, meaning it does not correspond to a +physical sound card. +It is intended for testing, so that test programs do not need to rely on +hardware being present in the machine in order to run. +.Pp +The driver attaches as a regular PCM device, with two channels (one playback +and one recording), as well as a mixer. +.Pp +Playback works by discarding all input, and recording by returning silence +(zeros). +.Sh SEE ALSO +.Xr sound 4 , +.Xr loader.conf 5 , +.Xr loader 8 +.Sh AUTHORS +The +.Nm +driver was implemented by +.An Christos Margiolis Aq Mt christos@FreeBSD.org +under sponsorship from the +.Fx +Foundation. +.Sh CAVEATS +Because the driver automatically attaches once the module is loaded, it can +only be attached once. diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c new file mode 100644 index 000000000000..f8193a73fcc8 --- /dev/null +++ b/sys/dev/sound/dummy.c @@ -0,0 +1,353 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Christos Margiolis + * 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 + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_snd.h" +#endif + +#include +#include + +#define DUMMY_NPCHAN 1 +#define DUMMY_NRCHAN 1 +#define DUMMY_NCHAN (DUMMY_NPCHAN + DUMMY_NRCHAN) + +struct dummy_chan { + struct dummy_softc *sc; + struct pcm_channel *chan; + struct snd_dbuf *buf; + struct pcmchan_caps *caps; + uint32_t ptr; + int dir; + int run; +}; + +struct dummy_softc { + struct snddev_info info; + device_t dev; + uint32_t cap_fmts[4]; + struct pcmchan_caps caps; + int chnum; + struct dummy_chan chans[DUMMY_NCHAN]; + struct callout callout; + struct mtx *lock; +}; + +static void +dummy_chan_io(void *arg) +{ + struct dummy_softc *sc = arg; + struct dummy_chan *ch; + int i = 0; + + snd_mtxlock(sc->lock); + + for (i = 0; i < sc->chnum; i++) { + ch = &sc->chans[i]; + if (!ch->run) + continue; + if (ch->dir == PCMDIR_PLAY) + ch->ptr += sndbuf_getblksz(ch->buf); + else + sndbuf_fillsilence(ch->buf); + snd_mtxunlock(sc->lock); + chn_intr(ch->chan); + snd_mtxlock(sc->lock); + } + callout_schedule(&sc->callout, 1); + + snd_mtxunlock(sc->lock); +} + +static int +dummy_chan_free(kobj_t obj, void *data) +{ + struct dummy_chan *ch =data; + uint8_t *buf; + + buf = sndbuf_getbuf(ch->buf); + if (buf != NULL) + free(buf, M_DEVBUF); + + return (0); +} + +static void * +dummy_chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, + struct pcm_channel *c, int dir) +{ + struct dummy_softc *sc; + struct dummy_chan *ch; + uint8_t *buf; + size_t bufsz; + + sc = devinfo; + + snd_mtxlock(sc->lock); + + ch = &sc->chans[sc->chnum++]; + ch->sc = sc; + ch->dir = dir; + ch->chan = c; + ch->buf = b; + ch->caps = &sc->caps; + + snd_mtxunlock(sc->lock); + + bufsz = pcm_getbuffersize(sc->dev, 2048, 2048, 65536); + buf = malloc(bufsz, M_DEVBUF, M_WAITOK | M_ZERO); + if (sndbuf_setup(ch->buf, buf, bufsz) != 0) { + dummy_chan_free(obj, ch); + return (NULL); + } + + return (ch); +} + +static int +dummy_chan_setformat(kobj_t obj, void *data, uint32_t format) +{ + struct dummy_chan *ch = data; + int i; + + for (i = 0; ch->caps->fmtlist[i]; i++) + if (format == ch->caps->fmtlist[i]) + return (0); + + return (EINVAL); +} + +static uint32_t +dummy_chan_setspeed(kobj_t obj, void *data, uint32_t speed) +{ + struct dummy_chan *ch = data; + + RANGE(speed, ch->caps->minspeed, ch->caps->maxspeed); + + return (speed); +} + +static uint32_t +dummy_chan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) +{ + struct dummy_chan *ch = data; + + return (sndbuf_getblksz(ch->buf)); +} + +static int +dummy_chan_trigger(kobj_t obj, void *data, int go) +{ + struct dummy_chan *ch = data; + struct dummy_softc *sc = ch->sc; + + snd_mtxlock(sc->lock); + + switch (go) { + case PCMTRIG_START: + if (!callout_active(&sc->callout)) + callout_reset(&sc->callout, 1, dummy_chan_io, sc); + ch->ptr = 0; + ch->run = 1; + break; + case PCMTRIG_STOP: + case PCMTRIG_ABORT: + ch->run = 0; + if (callout_active(&sc->callout)) + callout_stop(&sc->callout); + default: + break; + } + + snd_mtxunlock(sc->lock); + + return (0); +} + +static uint32_t +dummy_chan_getptr(kobj_t obj, void *data) +{ + struct dummy_chan *ch = data; + + return (ch->run ? ch->ptr : 0); +} + +static struct pcmchan_caps * +dummy_chan_getcaps(kobj_t obj, void *data) +{ + struct dummy_chan *ch = data; + + return (ch->caps); +} + +static kobj_method_t dummy_chan_methods[] = { + KOBJMETHOD(channel_init, dummy_chan_init), + KOBJMETHOD(channel_free, dummy_chan_free), + KOBJMETHOD(channel_setformat, dummy_chan_setformat), + KOBJMETHOD(channel_setspeed, dummy_chan_setspeed), + KOBJMETHOD(channel_setblocksize,dummy_chan_setblocksize), + KOBJMETHOD(channel_trigger, dummy_chan_trigger), + KOBJMETHOD(channel_getptr, dummy_chan_getptr), + KOBJMETHOD(channel_getcaps, dummy_chan_getcaps), + KOBJMETHOD_END +}; + +CHANNEL_DECLARE(dummy_chan); + +static int +dummy_mixer_init(struct snd_mixer *m) +{ + struct dummy_softc *sc; + + sc = mix_getdevinfo(m); + if (sc == NULL) + return (-1); + + pcm_setflags(sc->dev, pcm_getflags(sc->dev) | SD_F_SOFTPCMVOL); + mix_setdevs(m, SOUND_MASK_PCM | SOUND_MASK_VOLUME | SOUND_MASK_RECLEV); + mix_setrecdevs(m, SOUND_MASK_RECLEV); + + return (0); +} + +static int +dummy_mixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) +{ + return (0); +} + +static uint32_t +dummy_mixer_setrecsrc(struct snd_mixer *m, uint32_t src) +{ + return (src == SOUND_MASK_RECLEV ? src : 0); +} + +static kobj_method_t dummy_mixer_methods[] = { + KOBJMETHOD(mixer_init, dummy_mixer_init), + KOBJMETHOD(mixer_set, dummy_mixer_set), + KOBJMETHOD(mixer_setrecsrc, dummy_mixer_setrecsrc), + KOBJMETHOD_END +}; + +MIXER_DECLARE(dummy_mixer); + +static void +dummy_identify(driver_t *driver, device_t parent) +{ + if (device_find_child(parent, driver->name, -1) != NULL) + return; + if (BUS_ADD_CHILD(parent, 0, driver->name, -1) == NULL) + device_printf(parent, "add child failed\n"); +} + +static int +dummy_probe(device_t dev) +{ + device_set_desc(dev, "Dummy Audio Device"); + + return (0); +} + +static int +dummy_attach(device_t dev) +{ + struct dummy_softc *sc; + char status[SND_STATUSLEN]; + int i = 0; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_dummy softc"); + + sc->cap_fmts[0] = SND_FORMAT(AFMT_S32_LE, 2, 0); + sc->cap_fmts[1] = SND_FORMAT(AFMT_S24_LE, 2, 0); + sc->cap_fmts[2] = SND_FORMAT(AFMT_S16_LE, 2, 0); + sc->cap_fmts[3] = 0; + sc->caps = (struct pcmchan_caps){ + 8000, /* minspeed */ + 96000, /* maxspeed */ + sc->cap_fmts, /* fmtlist */ + 0, /* caps */ + }; + + pcm_setflags(dev, pcm_getflags(dev) | SD_F_MPSAFE); + if (pcm_register(dev, sc, DUMMY_NPCHAN, DUMMY_NRCHAN)) + return (ENXIO); + for (i = 0; i < DUMMY_NPCHAN; i++) + pcm_addchan(dev, PCMDIR_PLAY, &dummy_chan_class, sc); + for (i = 0; i < DUMMY_NRCHAN; i++) + pcm_addchan(dev, PCMDIR_REC, &dummy_chan_class, sc); + + snprintf(status, SND_STATUSLEN, "on %s", + device_get_nameunit(device_get_parent(dev))); + pcm_setstatus(dev, status); + mixer_init(dev, &dummy_mixer_class, sc); + callout_init(&sc->callout, 1); + + return (0); +} + +static int +dummy_detach(device_t dev) +{ + struct dummy_softc *sc = device_get_softc(dev); + int err; + + err = pcm_unregister(dev); + snd_mtxfree(sc->lock); + + return (err); +} + +static device_method_t dummy_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, dummy_identify), + DEVMETHOD(device_probe, dummy_probe), + DEVMETHOD(device_attach, dummy_attach), + DEVMETHOD(device_detach, dummy_detach), + DEVMETHOD_END +}; + +static driver_t dummy_driver = { + "pcm", + dummy_methods, + sizeof(struct dummy_softc), +}; + +DRIVER_MODULE(snd_dummy, nexus, dummy_driver, 0, 0); +MODULE_DEPEND(snd_dummy, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); +MODULE_VERSION(snd_dummy, 1); diff --git a/sys/modules/sound/driver/Makefile b/sys/modules/sound/driver/Makefile index af5e3259aa00..7d5dd3587ce9 100644 --- a/sys/modules/sound/driver/Makefile +++ b/sys/modules/sound/driver/Makefile @@ -9,6 +9,7 @@ SUBDIR= als4000 atiixp cs4281 ${_csa} emu10k1 emu10kx SUBDIR+= envy24 envy24ht es137x fm801 hda hdspe ich SUBDIR+= ${_maestro3} neomagic solo spicds t4dwave via8233 SUBDIR+= via82c686 vibes driver uaudio +SUBDIR+= dummy .if ${MK_SOURCELESS_UCODE} != "no" _csa= csa diff --git a/sys/modules/sound/driver/dummy/Makefile b/sys/modules/sound/driver/dummy/Makefile new file mode 100644 index 000000000000..fb4127d35073 --- /dev/null +++ b/sys/modules/sound/driver/dummy/Makefile @@ -0,0 +1,7 @@ +.PATH: ${SRCTOP}/sys/dev/sound + +KMOD= snd_dummy +SRCS= bus_if.h device_if.h +SRCS+= dummy.c + +.include From nobody Mon Jul 29 15:35:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9N2Xf0z5RSgj; Mon, 29 Jul 2024 15:35:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9M6lYyz42Nk; Mon, 29 Jul 2024 15:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nimJA6y82932+3GupznmYEOEpb5cVGWCxvMV0s0wkyc=; b=TTRURGTdSAkOo+trJuImaaPN58IJF9n9FDUvJp4hNW/1/d09aaA8uIWI0Nz+AGji+U/HhQ SYWlQJtOEHb2c8W2Oooe9pUbNYu3bz5VIlQyokykkpc9sUIA8LoyLiPntx/ZEeszaNPIID +2vfl9/iRwZD653GhTx0fzZelBhHYs/izzUVRFJvjKgpgznnoT77aKnavH6pNs6slwCSag MF6ySMfuafq1egixHbHoN4gEp5OG3DLiLuDCwG2hMGEd8Ut7VVe2YiDqULBiTpK8hgCWAM f6bIFYg4ATV59zbJOgnqjOFTxmTu2JkEnbLWP30Ci+swhJRanFkbz5k516feUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267320; a=rsa-sha256; cv=none; b=c3nNfRPzGsumDAhEBLruaAoA6vLIwbzSGgI8hW745WM+rw3QND7JF9c/zYT+3zyOSksLs9 TpSVJeAMIGbByeROhzv3ZxM4yQGUbsmw5ByjcPh/Rhxd1NKeO7sFBCwJ7BbaKhPWDZuve+ UpL8zwPcyJYJ/4FsQnA62xVHW/+IfA/vLqVj0smSwpcOV+YxsE8laokbEpTKM+Thp3m4II yNIVXvoyUEnlYuGn+4hKpghhXVFXGy7gDZxoeFwvPG1J3dU5kP5nqyjlZ9Lv23KbfT/maM toTOtPBAvksmNoKJTD3YjUiwwWDQ79cRLJlTzxw+AgcBzepFFLib0JS13v6jUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nimJA6y82932+3GupznmYEOEpb5cVGWCxvMV0s0wkyc=; b=ro1favtHmc66ElcwdddHLZI5lj3rzrgBEmbrBOJjy0P0hq2gyBCnEpLIjhCV4dfwXOrup+ vcNUugwzlUmFFepQ81E7vNG8G0Y7M6bQz27pF1vRTLNOLDbI/ooIdG9EAjRBazPq4hE6qb a4XhqcVHjyoY5G3zaSoE+BJtWnUs3Ze4M9CFm8xDCIB3imsWsxm1eKtG/rsNj/MSF0DkQ2 2vrJOVSIPjc2S+iBGT2FsmICc3E+6MCl3U8TvZrm/RQePvh7qJzak7bc1crnpZ9GwgZPfh mhspuDMvbRveG9+bXGOqgqTexY3/k8vMgQb5zn4PLhpmQZSgXy2QgStT9k1KXA== 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 4WXj9M624JzgDG; Mon, 29 Jul 2024 15:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZJ6x002406; Mon, 29 Jul 2024 15:35:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZJUY002402; Mon, 29 Jul 2024 15:35:19 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:19 GMT Message-Id: <202407291535.46TFZJUY002402@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: bf3d523408d4 - stable/14 - mixer(8): Make mute and recsrc argument parsing more robust List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bf3d523408d48126e83a097978e2db469954d238 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=bf3d523408d48126e83a097978e2db469954d238 commit bf3d523408d48126e83a097978e2db469954d238 Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:09 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 mixer(8): Make mute and recsrc argument parsing more robust For the deprecated argument interfaces of the mute (1, 0, ^) and recsrc (+, -, =, ^) controls, we only check the first character of the argument, which means that an argument such as "vol.mute=10" would be valid. Fix this by checking the whole argument string. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45973 (cherry picked from commit 8ca73331ef810cd0e0b9e3c37cddc1d89fbe8c6b) --- usr.sbin/mixer/mixer.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 07dd16536495..109d3ad09bc5 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -426,11 +426,14 @@ mod_mute(struct mix_dev *d, void *p) m = d->parent_mixer; cp = mixer_get_ctl(m->dev, C_MUT); val = p; - if (strncmp(val, "off", strlen(val)) == 0 || *val == '0') + if (strncmp(val, "off", strlen(val)) == 0 || + strncmp(val, "0", strlen(val)) == 0) opt = MIX_UNMUTE; - else if (strncmp(val, "on", strlen(val)) == 0 || *val == '1') + else if (strncmp(val, "on", strlen(val)) == 0 || + strncmp(val, "1", strlen(val)) == 0) opt = MIX_MUTE; - else if (strncmp(val, "toggle", strlen(val)) == 0 || *val == '^') + else if (strncmp(val, "toggle", strlen(val)) == 0 || + strncmp(val, "^", strlen(val)) == 0) opt = MIX_TOGGLEMUTE; else { warnx("%s: no such modifier", val); @@ -459,13 +462,17 @@ mod_recsrc(struct mix_dev *d, void *p) m = d->parent_mixer; cp = mixer_get_ctl(m->dev, C_SRC); val = p; - if (strncmp(val, "add", strlen(val)) == 0 || *val == '+') + if (strncmp(val, "add", strlen(val)) == 0 || + strncmp(val, "+", strlen(val)) == 0) opt = MIX_ADDRECSRC; - else if (strncmp(val, "remove", strlen(val)) == 0 || *val == '-') + else if (strncmp(val, "remove", strlen(val)) == 0 || + strncmp(val, "-", strlen(val)) == 0) opt = MIX_REMOVERECSRC; - else if (strncmp(val, "set", strlen(val)) == 0 || *val == '=') + else if (strncmp(val, "set", strlen(val)) == 0 || + strncmp(val, "=", strlen(val)) == 0) opt = MIX_SETRECSRC; - else if (strncmp(val, "toggle", strlen(val)) == 0 || *val == '^') + else if (strncmp(val, "toggle", strlen(val)) == 0 || + strncmp(val, "^", strlen(val)) == 0) opt = MIX_TOGGLERECSRC; else { warnx("%s: no such modifier", val); From nobody Mon Jul 29 15:35:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9P2gxGz5RSQH; Mon, 29 Jul 2024 15:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9P03dBz42R0; Mon, 29 Jul 2024 15:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R5XW2Q72Ikmuov4B82jKyIycD/bXeCTLS6mwVNfCXss=; b=FKo6TcF1hAgUy9ze56/kEe3jet1iI2EAZx3b5+/P+1oZ7awiieRYtQ8aM6/UC9wHzKYjW/ iZn3TK1kzCFvznMXNQqYr+SovbmdjmrjXYbCP12pT/UgXn0qYi6huYXAEFUf9bEkmt1eCk bLh+q/OOi2/1QDpiv62cUcIr+hzRHwGgeWcyXlvZFfD8ozjGvzzUpbqNyX9HfreNbzuwrO +VhuVqYuy9QpJP+1w+IDyNNsaBfmW2bPxnwom5L9hSDuuIi1JgyQIP/r+ASKoYeazr+Sf6 2H1SpphdjDSjAj5BERiPm6kD6qcsaaN5YmvPgfPwssRGTRNDbvV69iiBJ0P9aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267321; a=rsa-sha256; cv=none; b=jSJd5OUoeWMo+KzD5mBsCLtKQnA3kV6PZ0VJM1NpZ6IA/0PeHaIU3RtkTFzRn9H5owSmZb RinJmYjz0pfDroEsZgnHqNAEs1CU813LEfJCgRyLF/UVNHRuqrg1ngwn2C6iPX5IgIX7Jl 6sOoz0KgMRpXL+5IRxR8JC3BpqiO8mlbkxojTnxFW7UO7SB9fmte+EzWzOz8R0BvUI3988 ro+3b+RP1Tvm+aOANgUcJcMTuuYNymGkEta3OjdW24VWXozOhr+I1uSFFQDuUh25RdcOGA dk7my/8nj/0P/LZM7Dte8J80XkBdcs+Wz6kHo7D7AjIzruoJObCi43vsRhbG/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=1722267321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R5XW2Q72Ikmuov4B82jKyIycD/bXeCTLS6mwVNfCXss=; b=kk7BmSORm6oQu1rH3qlWpRRE0UsIb7AHmH8hNnUONntTDDaGWUQUE6r0vnnJXylE3s89FM UbOCxMvV/mkL65r/j9IliN3jT/QJMzLUQTZHAlpQTbFHKPVrXsW+gyT1y3XG9yKPi3Eest VuMwplNQNvbPEBskFG89hqC1uOYUaz42BX+U+PWIpzCMZ6gsNTQDjiMUtJ+nZxVfA8hoj3 ZavFV7dBVumFa8EPbeYUG1sksKM23OwWMbPxK87fWZM3ey1jUAfIVke7T126iHRP6KEsK4 koJyWsHgw3mcx8+PdrPAk5eizzfoiQ5xlljsoiiWleupCy/DTSmg0FAlRzHftQ== 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 4WXj9N6mKSzgDH; Mon, 29 Jul 2024 15:35:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZKWV002449; Mon, 29 Jul 2024 15:35:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZKrB002445; Mon, 29 Jul 2024 15:35:20 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:20 GMT Message-Id: <202407291535.46TFZKrB002445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f55b8bba6092 - stable/14 - mixer(8): Add tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f55b8bba60922af0381894fdfc801bb0b04dc5c4 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f55b8bba60922af0381894fdfc801bb0b04dc5c4 commit f55b8bba60922af0381894fdfc801bb0b04dc5c4 Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:14 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 mixer(8): Add tests Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45974 (cherry picked from commit 94a86f3f69205a6de3c07ae60daf4f5f920e9b82) --- usr.sbin/mixer/Makefile | 3 + usr.sbin/mixer/tests/Makefile | 3 + usr.sbin/mixer/tests/mixer_test.sh | 285 +++++++++++++++++++++++++++++++++++++ 3 files changed, 291 insertions(+) diff --git a/usr.sbin/mixer/Makefile b/usr.sbin/mixer/Makefile index 0dab386e0873..213166e952dc 100644 --- a/usr.sbin/mixer/Makefile +++ b/usr.sbin/mixer/Makefile @@ -6,4 +6,7 @@ SRCS= ${PROG}.c MAN= ${PROG}.8 LDFLAGS+= -lmixer +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/usr.sbin/mixer/tests/Makefile b/usr.sbin/mixer/tests/Makefile new file mode 100644 index 000000000000..9a5bb3a183ab --- /dev/null +++ b/usr.sbin/mixer/tests/Makefile @@ -0,0 +1,3 @@ +ATF_TESTS_SH+= mixer_test + +.include diff --git a/usr.sbin/mixer/tests/mixer_test.sh b/usr.sbin/mixer/tests/mixer_test.sh new file mode 100755 index 000000000000..e1321ad9ee13 --- /dev/null +++ b/usr.sbin/mixer/tests/mixer_test.sh @@ -0,0 +1,285 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Christos Margiolis +# 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. + +mixer_exists() +{ + if ! mixer >/dev/null 2>&1; then + atf_skip "no mixer available" + fi +} + +save_conf() +{ + atf_check -o save:test_mixer_conf mixer -o +} + +restore_conf() +{ + mixer_exists + test -r "test_mixer_conf" && mixer $(cat test_mixer_conf) +} + +load_dummy() +{ + if ! kldload -n snd_dummy; then + atf_skip "cannot load snd_dummy.ko" + fi +} + +set_default() +{ + deflt_unit="$(mixer | grep ^pcm | cut -f1 -d:)" + dummy_unit="$(mixer -a | grep "Dummy Audio Device" | cut -f1 -d:)" + + atf_check -o save:test_mixer_deflt_unit echo ${deflt_unit} + atf_check -o save:test_mixer_dummy_unit echo ${dummy_unit} + + # Set the dummy as the default + mixer -d ${dummy_unit} +} + +restore_default() +{ + test -r "test_mixer_deflt_unit" && mixer -d $(cat test_mixer_deflt_unit) +} + +atf_test_case o_flag cleanup +o_flag_head() +{ + atf_set "descr" "Verify that the output of the -o flag can be used " \ + "as valid input" +} +o_flag_body() +{ + load_dummy + mixer_exists + set_default + + atf_check -o ignore -e empty mixer $(mixer -o) +} +o_flag_cleanup() +{ + restore_default +} + +atf_test_case d_flag cleanup +d_flag_head() +{ + atf_set "descr" "Test default unit setting" +} +d_flag_body() +{ + load_dummy + mixer_exists + set_default + + dev="${dummy_unit}" + unit=$(echo ${dev} | sed 's/pcm//') + + atf_check -o ignore -e empty mixer -d ${dev} + atf_check -o ignore -e empty mixer -d ${unit} +} +d_flag_cleanup() +{ + restore_default +} + +atf_test_case volume cleanup +volume_head() +{ + atf_set "descr" "Test volume setting" +} +volume_body() +{ + load_dummy + mixer_exists + set_default + save_conf + + # Test lower bound + mixer vol.volume=0 + atf_check -o match:"0.00:0.00" mixer vol.volume + + mixer vol.volume=-2 + atf_check -o match:"0.00:0.00" mixer vol.volume + + mixer vol.volume=-1:-2 + atf_check -o match:"0.00:0.00" mixer vol.volume + + mixer vol.volume=-110% + atf_check -o match:"0.00:0.00" mixer vol.volume + + # Test higher bound + mixer vol.volume=1 + atf_check -o match:"1.00:1.00" mixer vol.volume + + mixer vol.volume=+1.01 + atf_check -o match:"1.00:1.00" mixer vol.volume + + mixer vol.volume=2 + atf_check -o match:"1.00:1.00" mixer vol.volume + + mixer vol.volume=+1:+1 + atf_check -o match:"1.00:1.00" mixer vol.volume + + mixer vol.volume=2:2 + atf_check -o match:"1.00:1.00" mixer vol.volume + + mixer vol.volume=100% + atf_check -o match:"1.00:1.00" mixer vol.volume + + mixer vol.volume=110% + atf_check -o match:"1.00:1.00" mixer vol.volume + + mixer vol.volume=+110% + atf_check -o match:"1.00:1.00" mixer vol.volume + + # Test percentages + mixer vol.volume=1 + + mixer vol.volume=-10% + atf_check -o match:"0.90:0.90" mixer vol.volume + + mixer vol.volume=+5% + atf_check -o match:"0.95:0.95" mixer vol.volume + + mixer vol.volume=80% + atf_check -o match:"0.80:0.80" mixer vol.volume + + # Test left:right assignment + mixer vol.volume=0.80:0.70 + atf_check -o match:"0.80:0.70" mixer vol.volume + + mixer vol.volume=+5%:+10% + atf_check -o match:"0.85:0.80" mixer vol.volume + + mixer vol.volume=-5%:-10% + atf_check -o match:"0.80:0.70" mixer vol.volume + + mixer vol.volume=+10%:-15% + atf_check -o match:"0.90:0.55" mixer vol.volume + + # Test wrong values + atf_check -o ignore -e not-empty mixer vol.volume=foobar + atf_check -o ignore -e not-empty mixer vol.volume=2oo:b4r + atf_check -o ignore -e not-empty mixer vol.volume=+f0o:1 +} +volume_cleanup() +{ + restore_conf + restore_default +} + +atf_test_case mute cleanup +mute_head() +{ + atf_set "descr" "Test muting" +} +mute_body() +{ + load_dummy + mixer_exists + set_default + save_conf + + # Check that the mute control exists + atf_check -o not-empty mixer vol.mute + + atf_check -o ignore -e empty mixer vol.mute=off + atf_check -o match:"=off" mixer vol.mute + + atf_check -o ignore -e empty mixer vol.mute=on + atf_check -o match:"=on" mixer vol.mute + + atf_check -o ignore -e empty mixer vol.mute=toggle + atf_check -o match:"=off" mixer vol.mute + + # Test deprecated interface + atf_check -o ignore -e empty mixer vol.mute=0 + atf_check -o match:"=off" mixer vol.mute + + atf_check -o ignore -e empty mixer vol.mute=1 + atf_check -o match:"=on" mixer vol.mute + + atf_check -o ignore -e empty mixer vol.mute=^ + atf_check -o match:"=off" mixer vol.mute + + # Test wrong values + atf_check -o ignore -e not-empty mixer vol.mute=foobar + atf_check -o ignore -e not-empty mixer vol.mute=10 +} +mute_cleanup() +{ + restore_conf + restore_default +} + +atf_test_case recsrc cleanup +recsrc_head() +{ + atf_set "descr" "Test recording source handling" +} +recsrc_body() +{ + load_dummy + mixer_exists + set_default + save_conf + test -n "$(mixer -s)" || atf_skip "no recording source found" + + recsrc=$(mixer -s | awk '{print $2}') + atf_check -o ignore -e empty mixer ${recsrc}.recsrc=add + atf_check -o ignore -e empty mixer ${recsrc}.recsrc=remove + atf_check -o ignore -e empty mixer ${recsrc}.recsrc=set + atf_check -o ignore -e empty mixer ${recsrc}.recsrc=toggle + + # Test deprecated interface + atf_check -o ignore -e empty mixer ${recsrc}.recsrc=+ + atf_check -o ignore -e empty mixer ${recsrc}.recsrc=- + atf_check -o ignore -e empty mixer ${recsrc}.recsrc== + atf_check -o ignore -e empty mixer ${recsrc}.recsrc=^ + + # Test wrong values + atf_check -o ignore -e not-empty mixer ${recsrc}.recsrc=foobar + atf_check -o ignore -e not-empty mixer ${recsrc}.recsrc=10 +} +recsrc_cleanup() +{ + restore_conf + restore_default +} + +atf_init_test_cases() +{ + atf_add_test_case o_flag + atf_add_test_case d_flag + atf_add_test_case volume + atf_add_test_case mute + atf_add_test_case recsrc +} From nobody Mon Jul 29 15:35:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9Q30VNz5RSZk; Mon, 29 Jul 2024 15:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9Q19xbz42RH; Mon, 29 Jul 2024 15:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=61pkL3vGSqVcsJ7bwTTrOazXQxrM2GPKZwTCPORcknk=; b=oCPnIKAESRT0Io9Qu6IY+Z5tTegRzxBYDGDbIntCPV3+zgrawAci/ujTzRTFGncg9/vjCE 6U7Za7mJ2cvGzrUo5lvSq7q2wwVwuBnq38QMuDMuEVcUngpiKpwMaVeLJX3kYUmntxAI3Y WhnbS+2Rod3+L9h1mcYwEJryyjMA6c2yrjR6fGaetcHY6nty6p8olh2qKBk+ydfqcLl6di psX2rJrdSxG6sPwlQ0DM+fjNc87s+bw/SyDaEV8whue9wKd1fj917n341lyZg4lmYzzNz8 8xYO7uowPcQZ0I+/Uq8pPwGQ117t99OLMTSUQBsKeYYSkOM6uUz+leoz+DVCiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267322; a=rsa-sha256; cv=none; b=dOqMmxFkMslPLznxmSfKr9peUcpnESnTLKmSHAbvVnnI7LT3VgLWi0lt5JfbVQFgTpF4v6 Ap6sJGdnjD3YexIXS6G4DM/Hiiq5yYAnARvyyzqbYx0HjW4MfXqg0RfFFVvHvpbMpH3ajn uDHJoWiaYAglsGwvIsSRYM5c4M6/Jl5bBzvq2ymlfDm6ppt+vq7odSx9h/NstyMzbIwkGR oFdWIYzNt2uuI61SR2MqwKQ2tbK3MYBHJUW4QiPnmFaDphymaRK5hcXnFahvCF+Icf4BVa 6eubd76FWiEvoST7igPAaLglSkhmOleDN95ofXwDBCeY3Jt2D3UGYeHMsvdH4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=61pkL3vGSqVcsJ7bwTTrOazXQxrM2GPKZwTCPORcknk=; b=gchmrfQWrVQNfDOyGKHwEOZuNtrMEuV09uFeqGQ7Z4Nbn8asOgM8ZcO85ewJYmAlb66NHn zC3nRmpE5RddvYq60O+V0WSwibPPP79+nmUT+/MuZ8HYOYZvFlCmxdtHX1RlPQxk8R8DqV AyWM5n0HMwYpK9pdULuEgvZWced1dYKmqBemaTE+mS7gxHJj8AZMoqrU8VgUusrZw6RKRq FpFJvNfqCelmXIAKtYVReUt9JRfI2vjFbXLvfPHjLSL46HXEzqe4CEMoI6iHRrC81LjToY WX30IPqYDBDRU9slQZlCTqsZ3gAofOs95coazevtQg/hDvYQJIEi3epv+6GnEA== 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 4WXj9Q0n0tzgDJ; Mon, 29 Jul 2024 15:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZMNB002494; Mon, 29 Jul 2024 15:35:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZM42002491; Mon, 29 Jul 2024 15:35:22 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:22 GMT Message-Id: <202407291535.46TFZM42002491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 6716cc7e2768 - stable/14 - sound: Fix memory leak in chn_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6716cc7e276816c693647dbfa643fcd110a42f81 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6716cc7e276816c693647dbfa643fcd110a42f81 commit 6716cc7e276816c693647dbfa643fcd110a42f81 Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:19 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 sound: Fix memory leak in chn_init() In case chn_init() fails, we are leaking memory by not freeing the feeder. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45979 (cherry picked from commit 16329b7b3276f09dc70bdd1ca8bc605546fe71e0) --- 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 a18ef1cf4234..19808a43631a 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1365,6 +1365,8 @@ out2: if (CHN_LOCKOWNED(c)) CHN_UNLOCK(c); if (ret) { + while (chn_removefeeder(c) == 0) + ; if (c->devinfo) { if (CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); From nobody Mon Jul 29 15:35:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9R562sz5RSXJ; Mon, 29 Jul 2024 15:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9R2ql2z42KD; Mon, 29 Jul 2024 15:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LUMDPUAapBHFhZur8K7neZpi8cq588Js633vZ3VdcJA=; b=awcfDckpjJr1/oupCR1cqxd0wxjYhbXp9SFBWaoeNsoGPZMAd0lrDETXXoYbW0M5mauwOB HvK0ksRZg20ctHQ2m2yoqIdy6GVlVTTYZLLk+BZFWS2pprgxAM3VXwdA3f0hVP3YYhKEWc bf5PQ+4+BiKD82IgXkwTXTtA90IUBH1al42Ba4LXgGwoiSlxTsK3b71llZ3ZaRCT1wwdks pzULS/GiGcynCz2DNKjkLQ8LftuIPRTjhCuiLlviXSdcWKwOvazHqOLlH4+Y7jicy1Y+QA EAGI9VAlCDMsjIXoIzip+aHB7BSfaIbKacGaXBmxCFC23fxLFasCwO4qze3GiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267323; a=rsa-sha256; cv=none; b=wv2gl/qRbqlia/PEMDNI2546sMeJDYYKxHU+Qyr8C+0dzvVAfjlgwichDxL8O9VeGLpssT bLqh/ucMPczGrWnf+anw3W05Ifj5zstcbpu6YlJ3xASupW3lDyQxSFYR6VpeOmYfVa6oLt LOWHfaD/uVF98Pp2oVrj0VYzIO6v3TvfK6KbZtgStZ5KzdiK4G3xpW8Q+k7eozXq0en0vD nxzKV/nO6CYmk6ycqxkO1fAzdBGAxYX48uwE0npxDoXirp7sAcsJmQaCha9EthEygPZ5Hi diCFqUOpYKcz6jrJsBuS/JvYhCLAXStyzyiiHv3dFgoqM1Bcp8io0Kr0FQ3vVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LUMDPUAapBHFhZur8K7neZpi8cq588Js633vZ3VdcJA=; b=a664HZjH/HWTA4/TMFp/TfTjODQsGBTb/W4pzGg0grpSBYTnJMWSU8cvN8t4LeAGfdm6GD V1xd64usmfvKpDjhtBiWySuSRIwFY6MAxu3OU0/Myn9tLT19itBWVozPiE5DgLGd7sW77J Xmg/x9178BNzlt9PURa0Cv9TYhgICQp/IvKWePoBOGqr5eSAf1YRT1X22nmLxVZmEMyS+w zXyNAD5nkglNJdzv1zr3xBEm3rIxbcicwps25XBxcPli59YIsCV0O1HnopfyJ/oIUdMhTj CW5a+5jLja64NDXlOk1edXxa8MNuiW7YawzK5zVumqJmaX+oiuZIAYzLBLpRhA== 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 4WXj9R2N6czgSw; Mon, 29 Jul 2024 15:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZN4R002544; Mon, 29 Jul 2024 15:35:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZNPk002541; Mon, 29 Jul 2024 15:35:23 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:23 GMT Message-Id: <202407291535.46TFZNPk002541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 8f685b1f1ffa - stable/14 - sound: Rename chn_* feeder functions to feeder_* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8f685b1f1ffa91f5eb024b2b2fc88a0f56fec2d7 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8f685b1f1ffa91f5eb024b2b2fc88a0f56fec2d7 commit 8f685b1f1ffa91f5eb024b2b2fc88a0f56fec2d7 Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:37 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:55 +0000 sound: Rename chn_* feeder functions to feeder_* Avoid layering violation. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45983 (cherry picked from commit 29ff7b08be363f0d4345794bb951d5c0c8406a0a) --- sys/dev/sound/pcm/channel.c | 8 ++++---- sys/dev/sound/pcm/feeder.c | 6 +++--- sys/dev/sound/pcm/feeder.h | 6 +++--- sys/dev/sound/pcm/feeder_chain.c | 16 ++++++++-------- sys/dev/sound/pcm/feeder_eq.c | 4 ++-- sys/dev/sound/pcm/feeder_rate.c | 2 +- sys/dev/sound/pcm/mixer.c | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 19808a43631a..511d5256c06b 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1287,7 +1287,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, __func__); goto out2; } - if (chn_addfeeder(c, fc, NULL)) { + if (feeder_add(c, fc, NULL)) { device_printf(d->dev, "%s(): failed to add feeder\n", __func__); goto out2; } @@ -1365,7 +1365,7 @@ out2: if (CHN_LOCKOWNED(c)) CHN_UNLOCK(c); if (ret) { - while (chn_removefeeder(c) == 0) + while (feeder_remove(c) == 0) ; if (c->devinfo) { if (CHANNEL_FREE(c->methods, c->devinfo)) @@ -1407,7 +1407,7 @@ chn_kill(struct pcm_channel *c) chn_trigger(c, PCMTRIG_ABORT); CHN_UNLOCK(c); } - while (chn_removefeeder(c) == 0) + while (feeder_remove(c) == 0) ; if (CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); @@ -2300,7 +2300,7 @@ chn_syncstate(struct pcm_channel *c) else bass = ((bass & 0x7f) + ((bass >> 8) & 0x7f)) >> 1; - f = chn_findfeeder(c, FEEDER_EQ); + f = feeder_find(c, FEEDER_EQ); if (f != NULL) { if (FEEDER_SET(f, FEEDEQ_TREBLE, treble) != 0) device_printf(c->dev, diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 0113299bd0d4..fdbf2a8353e0 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -232,7 +232,7 @@ feeder_getclass(struct pcm_feederdesc *desc) } int -chn_addfeeder(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc) +feeder_add(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc) { struct pcm_feeder *nf; @@ -250,7 +250,7 @@ chn_addfeeder(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederd } int -chn_removefeeder(struct pcm_channel *c) +feeder_remove(struct pcm_channel *c) { struct pcm_feeder *f; @@ -264,7 +264,7 @@ chn_removefeeder(struct pcm_channel *c) } struct pcm_feeder * -chn_findfeeder(struct pcm_channel *c, u_int32_t type) +feeder_find(struct pcm_channel *c, u_int32_t type) { struct pcm_feeder *f; diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index c3d6f89d102e..f2a865d3d2f9 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -58,10 +58,10 @@ u_int32_t snd_fmtbestbit(u_int32_t fmt, u_int32_t *fmts); u_int32_t snd_fmtbestchannel(u_int32_t fmt, u_int32_t *fmts); u_int32_t snd_fmtbest(u_int32_t fmt, u_int32_t *fmts); -int chn_addfeeder(struct pcm_channel *c, struct feeder_class *fc, +int feeder_add(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc); -int chn_removefeeder(struct pcm_channel *c); -struct pcm_feeder *chn_findfeeder(struct pcm_channel *c, u_int32_t type); +int feeder_remove(struct pcm_channel *c); +struct pcm_feeder *feeder_find(struct pcm_channel *c, u_int32_t type); void feeder_printchain(struct pcm_feeder *head); int feeder_chain(struct pcm_channel *); diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 52351ef58510..555cd86d60e5 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -157,7 +157,7 @@ feeder_build_format(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = cdesc->current.afmt; desc->out = cdesc->target.afmt; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_format\n", __func__); @@ -230,7 +230,7 @@ feeder_build_rate(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = cdesc->current.afmt; desc->out = desc->in; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_rate\n", __func__); @@ -309,7 +309,7 @@ feeder_build_matrix(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->out = SND_FORMAT(cdesc->current.afmt, cdesc->target.matrix->channels, cdesc->target.matrix->ext); - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_matrix\n", __func__); @@ -365,7 +365,7 @@ feeder_build_volume(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = cdesc->current.afmt; desc->out = desc->in; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_volume\n", __func__); @@ -433,7 +433,7 @@ feeder_build_eq(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = cdesc->current.afmt; desc->out = desc->in; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_eq\n", __func__); @@ -472,7 +472,7 @@ feeder_build_root(struct pcm_channel *c, struct feeder_chain_desc *cdesc) return (ENOTSUP); } - ret = chn_addfeeder(c, fc, NULL); + ret = feeder_add(c, fc, NULL); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_root\n", __func__); @@ -513,7 +513,7 @@ feeder_build_mixer(struct pcm_channel *c, struct feeder_chain_desc *cdesc) desc->in = cdesc->current.afmt; desc->out = desc->in; - ret = chn_addfeeder(c, fc, desc); + ret = feeder_add(c, fc, desc); if (ret != 0) { device_printf(c->dev, "%s(): can't add feeder_mixer\n", __func__); @@ -588,7 +588,7 @@ feeder_chain(struct pcm_channel *c) CHN_LOCKASSERT(c); /* Remove everything first. */ - while (chn_removefeeder(c) == 0) + while (feeder_remove(c) == 0) ; KASSERT(c->feeder == NULL, ("feeder chain not empty")); diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index a097b13cd986..3c9d9cda9d62 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -584,7 +584,7 @@ sysctl_dev_pcm_eq(SYSCTL_HANDLER_ARGS) CHN_FOREACH(c, d, channels.pcm.busy) { CHN_LOCK(c); - f = chn_findfeeder(c, FEEDER_EQ); + f = feeder_find(c, FEEDER_EQ); if (f != NULL) (void)FEEDER_SET(f, FEEDEQ_STATE, val); CHN_UNLOCK(c); @@ -643,7 +643,7 @@ sysctl_dev_pcm_eq_preamp(SYSCTL_HANDLER_ARGS) CHN_FOREACH(c, d, channels.pcm.busy) { CHN_LOCK(c); - f = chn_findfeeder(c, FEEDER_EQ); + f = feeder_find(c, FEEDER_EQ); if (f != NULL) (void)FEEDER_SET(f, FEEDEQ_PREAMP, val); CHN_UNLOCK(c); diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index c8cc67e8fa80..77de21e7a31a 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -268,7 +268,7 @@ sysctl_hw_snd_feeder_rate_quality(SYSCTL_HANDLER_ARGS) PCM_ACQUIRE(d); CHN_FOREACH(c, d, channels.pcm) { CHN_LOCK(c); - f = chn_findfeeder(c, FEEDER_RATE); + f = feeder_find(c, FEEDER_RATE); if (f == NULL || f->data == NULL || CHN_STARTED(c)) { CHN_UNLOCK(c); continue; diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 0cf6a9f42f8f..6d74fa975f03 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -224,7 +224,7 @@ mixer_set_eq(struct snd_mixer *m, struct snddev_info *d, CHN_FOREACH(c, d, channels.pcm.busy) { CHN_LOCK(c); - f = chn_findfeeder(c, FEEDER_EQ); + f = feeder_find(c, FEEDER_EQ); if (f != NULL) (void)FEEDER_SET(f, tone, level); CHN_UNLOCK(c); From nobody Mon Jul 29 15:35:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9S5ztYz5RSjT; Mon, 29 Jul 2024 15:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9S3w4vz42MZ; Mon, 29 Jul 2024 15:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rExbApDwTxGSHi3bBOxGjKx9yuATdykss7BNvfiMzLk=; b=teikf3NFxxk7BY91uamGimZEUgyokOl6nvxIfHIvRnH33PKMhnXw/Ui8s2chirl5rhIvB8 WCfDBC7KDI36BeiSWK69bq7yGzh3O0OkSJ0ahqVeAZII4g89CZYtbmJUUCE2V8vQYBFvjV 3OSSEqXDORlj/q6MzxoRMVC/hvRZhd2NsL2szUfWRPHRjYKeImwSw+r2FyH7kBlWeCiF5i Ni7TEF5ltBrLpyPbAIJzfuLYGIlHp3TtS+UuNE46zISmMjbFm2gUQSmV2fqe5OnR6hrqPu avT/uGBPzny6OwjkF4vulaM/7GV3sWg/FDhYtuzqmjbuAqLxY+B7ckWJtNts/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267324; a=rsa-sha256; cv=none; b=U6jxCsPERzgh05SkYY7l5/bs2nQuQGTdq26HMBlAEa++rgjV5fDb8Hi4JRMupUKiy2YOfa Bsq7eTTaXqD/hir/owPEXAV36m1D2AkGmbS80Gz9g/187BbkyWEAyNIGmbIc3PpLB7tC2S TMhzYpY6SlFiqVh6brXQQ9GT5cZhiCxGRtPfSIGC7rMP4wl+faMWaW14Taq3gVe3tD8aqS IXFSUANefzrnJHHy7fWuuDX2HsbzEu3az/gjSn/lFewldhAA7u5LsACWK5RAqhzLOK63kT i5zWSNNnPj25A7xrO/Yrt5seeIUmzKKfR93xcL0O/3nHJqV7dLi7Y4YMJpdB2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rExbApDwTxGSHi3bBOxGjKx9yuATdykss7BNvfiMzLk=; b=VURI43PT292mujS9BxhnvN71xWQQGqqFzYDo/LAkQGawTR05lEj30WjTDEx83CLpsQXztr hwi41aUBZ0BW3QXf/aoKadAuy49++rPzdWQUbAc/tQm9IO5E+SUhAZ1ZQtIhgg/0B8RXk5 P3FDiMpOCA5cdcQFePXoLi6Twk8NuvI+9PYAGVQk/GFt8vEWnWDRAv4a2LW72D7Yz698zc g2nl1NRL/A1XtSZ/MEkxOBmVJBBXb9Uh9jhTg6p5xRjwH8bOY7VpV3oc7Zg8ZMcFHidq7z pQSreoS6YYXW8HaXsYnzToFUwi/aUxB/0R22ExsyglAfNOFOdPJS1PwnvXtlnw== 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 4WXj9S3Wtvzg3g; Mon, 29 Jul 2024 15:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZOpG002587; Mon, 29 Jul 2024 15:35:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZOIj002584; Mon, 29 Jul 2024 15:35:24 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:24 GMT Message-Id: <202407291535.46TFZOIj002584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: cbbc1f5db1d9 - stable/14 - sound: Remove unused FEEDER_DEBUG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: cbbc1f5db1d9628ab6586a5072effb33629ee279 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=cbbc1f5db1d9628ab6586a5072effb33629ee279 commit cbbc1f5db1d9628ab6586a5072effb33629ee279 Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:42 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:55 +0000 sound: Remove unused FEEDER_DEBUG No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45984 (cherry picked from commit c55f995502cbaa2d38b7a7003bc27805b28a6a29) --- sys/dev/sound/pcm/feeder.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index fdbf2a8353e0..ad6966331f02 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -39,7 +39,6 @@ static MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); #define MAXFEEDERS 256 -#undef FEEDER_DEBUG struct feedertab_entry { SLIST_ENTRY(feedertab_entry) link; From nobody Mon Jul 29 15:35:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9V05Jkz5RSSR; Mon, 29 Jul 2024 15:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9T4skDz42Mt; Mon, 29 Jul 2024 15:35:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JbXda1LX+za3VjJV0uupNlZHSOEGUUimoOb8SgQ0yCU=; b=a3PCELQwUXEAc376/5fsdU18qVTXOxU41wezXvTAmhZTpIwDy9f55BaBQKF3Wytrq7L90K ZXelcHHlxLJlTWP9azkIOEOP3aI/W7vpx1O9Vz7YDqAYCVoue7bJwAuta5T60voyvP5yFL sA1TUvjC/G318dgfmAGFkhee+8RBavMNNVxwP/6Cwb3Wrd2+A1BY/2MbKtLmdIXfHPXps1 wXPKQziVK4LCfFufx20CpEdSPMb7YBzcyusAxHUUUMCu6H/SMZPxT00iT+Vyv0Tdwn7QV+ Y/2AwNoMlfxD5GhzDXKze2ZmvyWnJi/khtRZnajMDnLCYgl8bN4YTEd4kFMi+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267325; a=rsa-sha256; cv=none; b=vrO+HYMY6zz0HQsl11+9Z4/3ICT30R2SfNjTJGtF7oeaOHLFZLVnIWbLRsy6U5Wh+Hy6N1 JKqGVCyxyb2ypI436qK/xnRjNG8S8M3G+vRVkZ2OMS63DNZImJ++45FJl/+Uo3WeWAKVNQ HyOVOPzsxuZHG1a7exrSy90zmtuQ/DfCSlP7i0JzUvI57Z0Lgly8EaxKCX5sFLfV1ixglT NyYg6xpECHajY96jI8VJiX0awRnktuK1SBkK9ec/lpITQeeyIa62XDzZRHdqVI8xRnR7T9 nzgI6ou2+snqscKOZHpJplG9Et3w7xGJgVQkmJalIEvWL0fo7DorSfJFKyRf4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JbXda1LX+za3VjJV0uupNlZHSOEGUUimoOb8SgQ0yCU=; b=QszogF7V9qGRn4XsRJKqS7ow7ml58xoqTnMZyOJ2Y87EEpNjSBzW3MNrMRl92MMQJ4KHQT 93VYXfs2cYNleOKOStqrS7dpyDbHxXpoXgGS/6Rd9lm7xqHbNIuuyoPTr84GaUBl6MGI71 OYYLZzsxg+cqYCcpj7XC4BszmI3VpHqBRaq3Lsnka/5hsCoDXkR1X5XNVqvDbVftXIivnI D+kj5UWB/Oj1OAMyY5znIa+SbWEIEepd4vGxyWwK4VbKsBKAQOjHpv03VpxQkeU70exaZn kPtbRlAosWGWH/IbB9FdyfVfWmYDqJlXhAABFp2ZW66uMS/pN29u+TO9SsplEg== 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 4WXj9T4V9YzgDK; Mon, 29 Jul 2024 15:35:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZPxW002627; Mon, 29 Jul 2024 15:35:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZPTT002624; Mon, 29 Jul 2024 15:35:25 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:25 GMT Message-Id: <202407291535.46TFZPTT002624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: a619d8c76c63 - stable/14 - sound: Simplify chn_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a619d8c76c635ab7b3d851b2630700ab46b534db Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a619d8c76c635ab7b3d851b2630700ab46b534db commit a619d8c76c635ab7b3d851b2630700ab46b534db Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:47 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:55 +0000 sound: Simplify chn_init() - Remove unnecessary CHN_[UN]LOCKs. - Improve device_printf() messages. - Remove redundant checks. - Remove 0 assignments, since the channel is allocated with M_ZERO. - Re-organize sections in a more coherent way. - Remove "out1" label, just return NULL directly. - Rename "out2" to "fail" and simplify logic. - Do not check the return value of dsp_unit2name(), as it is guaranteed not to fail (we pass a valid channel type). Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45985 (cherry picked from commit 5b209e153b58515c0315f5902e18ecd7d75ecd2a) --- sys/dev/sound/pcm/channel.c | 177 ++++++++++++++++---------------------------- 1 file changed, 63 insertions(+), 114 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 511d5256c06b..ce4fb7222ddb 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1164,8 +1164,8 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, struct pcm_channel *c; struct feeder_class *fc; struct snd_dbuf *b, *bs; - char *dirs, *devname, buf[CHN_NAMELEN]; - int i, ret, direction, rpnum, *pnum, max, type, unit; + char *dirs, buf[CHN_NAMELEN]; + int i, direction, *pnum, max, type, unit; PCM_BUSYASSERT(d); PCM_LOCKASSERT(d); @@ -1203,148 +1203,106 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, device_printf(d->dev, "%s(): invalid channel direction: %d\n", __func__, dir); - goto out1; + return (NULL); } - unit = 0; - - if (*pnum >= max || unit >= max) { - device_printf(d->dev, "%s(): unit=%d or pnum=%d >= than " - "max=%d\n", __func__, unit, *pnum, max); - goto out1; + if (*pnum >= max) { + device_printf(d->dev, "%s(): cannot allocate more channels " + "(max=%d)\n", __func__, max); + return (NULL); } - rpnum = 0; - + unit = 0; CHN_FOREACH(c, d, channels.pcm) { if (c->type != type) continue; unit++; if (unit >= max) { - device_printf(d->dev, - "%s(): chan=%d >= max=%d\n", __func__, unit, max); - goto out1; + device_printf(d->dev, "%s(): cannot allocate more " + "channels for type=%d (max=%d)\n", + __func__, type, max); + return (NULL); } - rpnum++; - } - - if (*pnum != rpnum) { - device_printf(d->dev, - "%s(): pnum screwed: dirs=%s pnum=%d rpnum=%d\n", - __func__, dirs, *pnum, rpnum); - goto out1; } PCM_UNLOCK(d); b = NULL; bs = NULL; + c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK | M_ZERO); c->methods = kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO); + chn_lockinit(c, dir); + CHN_INIT(c, children); + CHN_INIT(c, children.busy); + c->direction = direction; c->type = type; c->unit = unit; + c->format = SND_FORMAT(AFMT_U8, 1, 0); + c->speed = DSP_DEFAULT_SPEED; c->pid = -1; + c->latency = -1; + c->timeout = 1; strlcpy(c->comm, CHN_COMM_UNUSED, sizeof(c->comm)); c->parentsnddev = d; c->parentchannel = parent; c->dev = d->dev; c->trigger = PCMTRIG_STOP; - chn_lockinit(c, dir); - devname = dsp_unit2name(buf, sizeof(buf), c); - if (devname == NULL) { - ret = EINVAL; - device_printf(d->dev, "%s(): failed to create channel name", - __func__); - goto out2; - } + snprintf(c->name, sizeof(c->name), "%s:%s:%s", - device_get_nameunit(c->dev), dirs, devname); + device_get_nameunit(c->dev), dirs, + dsp_unit2name(buf, sizeof(buf), c)); - CHN_INIT(c, children); - CHN_INIT(c, children.busy); - c->latency = -1; - c->timeout = 1; + c->matrix = *feeder_matrix_id_map(SND_CHN_MATRIX_1_0); + c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL; - ret = ENOMEM; - b = sndbuf_create(c->dev, c->name, "primary", c); - if (b == NULL) { - device_printf(d->dev, "%s(): failed to create hardware buffer\n", - __func__); - goto out2; - } - bs = sndbuf_create(c->dev, c->name, "secondary", c); - if (bs == NULL) { - device_printf(d->dev, "%s(): failed to create software buffer\n", - __func__); - goto out2; - } + for (i = 0; i < SND_CHN_T_MAX; i++) + c->volume[SND_VOL_C_MASTER][i] = SND_VOL_0DB_MASTER; + + c->volume[SND_VOL_C_MASTER][SND_CHN_T_VOL_0DB] = SND_VOL_0DB_MASTER; + c->volume[SND_VOL_C_PCM][SND_CHN_T_VOL_0DB] = chn_vol_0db_pcm; CHN_LOCK(c); + chn_vpc_reset(c, SND_VOL_C_PCM, 1); + CHN_UNLOCK(c); - ret = EINVAL; fc = feeder_getclass(NULL); if (fc == NULL) { device_printf(d->dev, "%s(): failed to get feeder class\n", __func__); - goto out2; + goto fail; } if (feeder_add(c, fc, NULL)) { device_printf(d->dev, "%s(): failed to add feeder\n", __func__); - goto out2; + goto fail; } - /* - * XXX - sndbuf_setup() & sndbuf_resize() expect to be called - * with the channel unlocked because they are also called - * from driver methods that don't know about locking - */ - CHN_UNLOCK(c); - sndbuf_setup(bs, NULL, 0); - CHN_LOCK(c); + b = sndbuf_create(c->dev, c->name, "primary", c); + bs = sndbuf_create(c->dev, c->name, "secondary", c); + if (b == NULL || bs == NULL) { + device_printf(d->dev, "%s(): failed to create %s buffer\n", + __func__, b == NULL ? "hardware" : "software"); + goto fail; + } c->bufhard = b; c->bufsoft = bs; - c->flags = 0; - c->feederflags = 0; - c->sm = NULL; - c->format = SND_FORMAT(AFMT_U8, 1, 0); - c->speed = DSP_DEFAULT_SPEED; - c->matrix = *feeder_matrix_id_map(SND_CHN_MATRIX_1_0); - c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL; - - for (i = 0; i < SND_CHN_T_MAX; i++) { - c->volume[SND_VOL_C_MASTER][i] = SND_VOL_0DB_MASTER; - } - - c->volume[SND_VOL_C_MASTER][SND_CHN_T_VOL_0DB] = SND_VOL_0DB_MASTER; - c->volume[SND_VOL_C_PCM][SND_CHN_T_VOL_0DB] = chn_vol_0db_pcm; - - memset(c->muted, 0, sizeof(c->muted)); - - chn_vpc_reset(c, SND_VOL_C_PCM, 1); - - ret = ENODEV; - CHN_UNLOCK(c); /* XXX - Unlock for CHANNEL_INIT() malloc() call */ c->devinfo = CHANNEL_INIT(c->methods, devinfo, b, c, direction); - CHN_LOCK(c); if (c->devinfo == NULL) { - device_printf(d->dev, "%s(): NULL devinfo\n", __func__); - goto out2; + device_printf(d->dev, "%s(): CHANNEL_INIT() failed\n", __func__); + goto fail; } - ret = ENOMEM; if ((sndbuf_getsize(b) == 0) && ((c->flags & CHN_F_VIRTUAL) == 0)) { device_printf(d->dev, "%s(): hardware buffer's size is 0\n", __func__); - goto out2; + goto fail; } - ret = 0; - c->direction = direction; - sndbuf_setfmt(b, c->format); sndbuf_setspd(b, c->speed); sndbuf_setfmt(bs, c->format); sndbuf_setspd(bs, c->speed); + sndbuf_setup(bs, NULL, 0); /** * @todo Should this be moved somewhere else? The primary buffer @@ -1355,42 +1313,33 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, bs->sl = sndbuf_getmaxsize(bs); bs->shadbuf = malloc(bs->sl, M_DEVBUF, M_NOWAIT); if (bs->shadbuf == NULL) { - ret = ENOMEM; device_printf(d->dev, "%s(): failed to create shadow " "buffer\n", __func__); - goto out2; + goto fail; } } -out2: - if (CHN_LOCKOWNED(c)) - CHN_UNLOCK(c); - if (ret) { - while (feeder_remove(c) == 0) - ; - if (c->devinfo) { - if (CHANNEL_FREE(c->methods, c->devinfo)) - sndbuf_free(b); - } - if (bs) - sndbuf_destroy(bs); - if (b) - sndbuf_destroy(b); - CHN_LOCK(c); - c->flags |= CHN_F_DEAD; - chn_lockdestroy(c); - PCM_LOCK(d); + PCM_LOCK(d); - kobj_delete(c->methods, M_DEVBUF); - free(c, M_DEVBUF); + return (c); - return (NULL); - } +fail: + while (feeder_remove(c) == 0) + ; + if (c->devinfo && CHANNEL_FREE(c->methods, c->devinfo)) + sndbuf_free(b); + if (bs) + sndbuf_destroy(bs); + if (b) + sndbuf_destroy(b); + CHN_LOCK(c); + chn_lockdestroy(c); + + kobj_delete(c->methods, M_DEVBUF); + free(c, M_DEVBUF); PCM_LOCK(d); - return (c); -out1: return (NULL); } From nobody Mon Jul 29 15:35:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9W23kkz5RSh6; Mon, 29 Jul 2024 15:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9V6Fh1z42QF; Mon, 29 Jul 2024 15:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TZzfdBzzRhTiB9Q6jPiD/d9LxfB56TrUlyLvH8+ngUE=; b=FybOTikz3SsLOYG8SdzWSJe3qxHD3CfqlWIdCq+IDPAXpyH5f6a6yO/Op9pf8xWcb1aJ36 U/9V2rYJMX57njaZVAjljWEVvr6rIdqsN9g6i7i0YhYMVvwbC5v537bDZv+8BB7vE4KKNp tjkadPgCOPzWNHn+7dNHbkFKMFBDrUMNkrvUAeCFHqOkDlodo22wVBDH+HtJWa397TRlxy 8vjF7pYIC9NgahmqFdw7tgGXw9h5wGCKgNMZwzFxfJS/Sk9YgXA6nRVrhn+qaS+OhnZFpn K3n3+nkv3YGAT2+Bk8nfrzICLPzov9AVglFPJ9cr3McvWQ3E9VfCYkB7jjC+vA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267326; a=rsa-sha256; cv=none; b=e1FfVF7KnNKHbPQXr6MLWl/7dg6fxNIaaynuOkTPXANLWZrMC8Zk0XkIKtRPjyuTT9TvBl pfxM/ySzqUgvzqlJDPHKDPFqJ+GWJd2GnD5eUDvs1x+ecIYM3DJx2ada2EMbbuVoX2HxiH 9dai2RzK+CQLLv+F6+v0TQXO8onHwK6hDOIxfVx19cgo3He71yaYG9Jo0iEL2kEcj8VdvB FrMLSJVzJxo+fg3IC94UrLz8BYhxQFBvje8EgoA1PHnQqMJh4RfE6aK2v9AQWOcnvYi88h zT5AOvcTHNlzR62yiaZcHr4Et90Mmru9pOskgKxSeUkdbpaVqSXJ1EvLSABVrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TZzfdBzzRhTiB9Q6jPiD/d9LxfB56TrUlyLvH8+ngUE=; b=t1dia+BvDcpjBzyo9yH9gNudu7Jdxa4qn811bT9aaFXKP/QLdrFhgP2DSONeEFcAde5uyH MKB0fuKIWmWh/yGbJ8RJqhCcTT4oIEDUR/sYkM4O4ojJZtPuzLj2wJEGQ01VNnWtRUPHaJ v7Cy927HfzJbpkgNNZKqByBsQd3VYB2uHxHVL35okR7xuNx2BE/0eHd4mITUXC9Mmmsw4o BSuAsQY24uiF0bEuDKYhCOEwW4jJjZnDr+nLOhUqLFFRZaK2HFnlK5IWDueeMfvq61iloL byAO4YqCa0Y8EuiG7uSgpO61uVzL8nPUK2ao4mMjyBkjSzBECyx/2BQ3UtZqRg== 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 4WXj9V5h79zgDL; Mon, 29 Jul 2024 15:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZQNa002674; Mon, 29 Jul 2024 15:35:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZQHr002671; Mon, 29 Jul 2024 15:35:26 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:26 GMT Message-Id: <202407291535.46TFZQHr002671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 9b5e6dfe18a2 - stable/14 - sound: Remove unused defines from pcm/sound.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b5e6dfe18a2f39761f16abc7a08c2c88a753c34 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9b5e6dfe18a2f39761f16abc7a08c2c88a753c34 commit 9b5e6dfe18a2f39761f16abc7a08c2c88a753c34 Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:52 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:55 +0000 sound: Remove unused defines from pcm/sound.h Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D45986 (cherry picked from commit f477d412530a8cb9d8e058d00189ce127584f6f6) --- sys/dev/sound/pcm/sound.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index e4a3ba41ee7f..5f32dd767fe8 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -126,9 +126,6 @@ struct snd_mixer; #define SD_F_PRIO_RD 0x10000000 #define SD_F_PRIO_WR 0x20000000 -#define SD_F_PRIO_SET (SD_F_PRIO_RD | SD_F_PRIO_WR) -#define SD_F_DIR_SET 0x40000000 -#define SD_F_TRANSIENT 0xf0000000 #define SD_F_BITS "\020" \ "\001SIMPLEX" \ @@ -146,8 +143,7 @@ struct snd_mixer; "\015EQ_BYPASSED" \ "\016EQ_PC" \ "\035PRIO_RD" \ - "\036PRIO_WR" \ - "\037DIR_SET" + "\036PRIO_WR" #define PCM_ALIVE(x) ((x) != NULL && (x)->lock != NULL && \ !((x)->flags & SD_F_DYING)) @@ -162,7 +158,6 @@ struct snd_mixer; /* many variables should be reduced to a range. Here define a macro */ #define RANGE(var, low, high) (var) = \ (((var)<(low))? (low) : ((var)>(high))? (high) : (var)) -#define DSP_BUFFSIZE (8192) /* make figuring out what a format is easier. got AFMT_STEREO already */ #define AFMT_32BIT (AFMT_S32_LE | AFMT_S32_BE | AFMT_U32_LE | AFMT_U32_BE) @@ -242,22 +237,12 @@ enum { #define DSP_DEFAULT_SPEED 8000 -#define ON 1 -#define OFF 0 - extern int pcm_veto_load; extern int snd_unit; extern int snd_verbose; extern devclass_t pcm_devclass; extern struct unrhdr *pcmsg_unrhdr; -/* - * some macros for debugging purposes - * DDB/DEB to enable/disable debugging stuff - * BVDDB to enable debugging when bootverbose - */ -#define BVDDB(x) if (bootverbose) x - #ifndef DEB #define DEB(x) #endif From nobody Mon Jul 29 15:35:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9X1dZMz5RSVJ; Mon, 29 Jul 2024 15:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9W6qYmz42SV; Mon, 29 Jul 2024 15:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGRJ6aRTsSjZ6KLwdM9LUlWj1kYGnzebEAjrwirOqk4=; b=sInxLJzd3i0w49mxp5JbRE9psBjh9t9UQpZrP8+/HvMUA3zdSJjuiuoodFLzF0JHW1UyNk BO3mKxXIZmTNu23XRLBD1lhs4eTmPcVXPUwsNyIoLt5lNWjVmPMBCLJy5HRVRbp+nrfFoO HmoLnYSlHNPQfRsT3mX9M4mAoDckoWVN60WCmk2k8oxKR0/cU2+K9o9zUJdkizwqD19HV5 T57/xP8xFfuxtSeUDjXpGjBH5ruE0vhyxpckk72w3mb+/PiUOGmjAovXyf+hehXoOETy5i 2thoWjyYutADzS4NJhB4vIc49qjmdbVQYDBvrCOItC0dbaSw2A2H0iYfapSeyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267328; a=rsa-sha256; cv=none; b=mKCxAtdaY8MtwNIAdAaoBK5sy2dXYk5Ze/E4M1dAXNk9e22CZkQrf3Fb4GoLN0jx7S5XSn j/MZaDrblKi7IMUJWjgJMR1TDPx+D5ZqxKpNXZ5oPsZlUGoULqMTmU0duxrlGGoIFolXJZ OTgDpBUdl8CecAWf3bgBl2YpMq+BXxUKgBwi6Ga71N5GdANh4ud9ET1fXTMRALC/5C9pNe +l6OIbrVdGKpmM4pPlAI5SKmndpIk6mtDLK9ikEWl0Nu+EzOUBllLIjuVH0es3VOHAuYfy 4zdzACXEYkmhd9jBbmSxurlgS4ZTJFH1cjoNna1gZhb29XObQSEIrbQiJ4TLHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGRJ6aRTsSjZ6KLwdM9LUlWj1kYGnzebEAjrwirOqk4=; b=crVnKsGLWDgLcSpNsw/amM0pwINr6RAh4wYsLFPS8JgtOaqBOxwktrNrhHbHsCNGmmG0/e OJcnwHSafnS4NMkT9Ww4Ye3EGBl8FVkSEVzGyNgUKT3a2oGIPo3RP1jCv7rlLEgKHyz5iA MMU0JJnXxZofwpjG8NbLLvdbHAwzFEQ16Nj3O+DOdMcTSm99dSvMX/zR0rw7WMMgLvz3zz 240sfVVe5QvX1NOHmQfEQPfI85peBRuRZGjjDZ1WN4scyVDGpEh+YmQRE9wOSeuHRWykTW hl0CFidb8inuwV5GQWBbjqBmDhPgIqYyRsuxg+ymacWD5HNjzHFMrXz5xycBow== 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 4WXj9W6Rqpzg3h; Mon, 29 Jul 2024 15:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZRWg002713; Mon, 29 Jul 2024 15:35:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZRNK002710; Mon, 29 Jul 2024 15:35:27 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:27 GMT Message-Id: <202407291535.46TFZRNK002710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: a9e27006db60 - stable/14 - sound: Simplify feeder_remove() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a9e27006db60edc60ffbe650b077abf64a42c025 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a9e27006db60edc60ffbe650b077abf64a42c025 commit a9e27006db60edc60ffbe650b077abf64a42c025 Author: Christos Margiolis AuthorDate: 2024-07-27 11:55:57 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:55 +0000 sound: Simplify feeder_remove() Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D46100 (cherry picked from commit 00172d20070a544e0514cce9f94475c5525fd15e) --- sys/dev/sound/pcm/channel.c | 6 ++---- sys/dev/sound/pcm/feeder.c | 14 ++++++-------- sys/dev/sound/pcm/feeder.h | 2 +- sys/dev/sound/pcm/feeder_chain.c | 3 +-- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index ce4fb7222ddb..e0fd24805a21 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1324,8 +1324,7 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, return (c); fail: - while (feeder_remove(c) == 0) - ; + feeder_remove(c); if (c->devinfo && CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); if (bs) @@ -1356,8 +1355,7 @@ chn_kill(struct pcm_channel *c) chn_trigger(c, PCMTRIG_ABORT); CHN_UNLOCK(c); } - while (feeder_remove(c) == 0) - ; + feeder_remove(c); if (CHANNEL_FREE(c->methods, c->devinfo)) sndbuf_free(b); sndbuf_destroy(bs); diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index ad6966331f02..716eb07feaae 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -248,18 +248,16 @@ feeder_add(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc return 0; } -int +void feeder_remove(struct pcm_channel *c) { struct pcm_feeder *f; - if (c->feeder == NULL) - return -1; - f = c->feeder; - c->feeder = c->feeder->source; - feeder_destroy(f); - - return 0; + while (c->feeder != NULL) { + f = c->feeder; + c->feeder = c->feeder->source; + feeder_destroy(f); + } } struct pcm_feeder * diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index f2a865d3d2f9..1e240d934e94 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -60,7 +60,7 @@ u_int32_t snd_fmtbest(u_int32_t fmt, u_int32_t *fmts); int feeder_add(struct pcm_channel *c, struct feeder_class *fc, struct pcm_feederdesc *desc); -int feeder_remove(struct pcm_channel *c); +void feeder_remove(struct pcm_channel *c); struct pcm_feeder *feeder_find(struct pcm_channel *c, u_int32_t type); void feeder_printchain(struct pcm_feeder *head); int feeder_chain(struct pcm_channel *); diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 555cd86d60e5..588bae2ff281 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -588,8 +588,7 @@ feeder_chain(struct pcm_channel *c) CHN_LOCKASSERT(c); /* Remove everything first. */ - while (feeder_remove(c) == 0) - ; + feeder_remove(c); KASSERT(c->feeder == NULL, ("feeder chain not empty")); From nobody Mon Jul 29 15:35:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9Y2j76z5RSSZ; Mon, 29 Jul 2024 15:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9Y0y8Dz42gj; Mon, 29 Jul 2024 15:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fb81eUkoaZmdnBWxexy8S+FmYC6zJwtDCMQWDSv+fP4=; b=wVEqM/wnzc8+YBD6HKONmy6xWEJogJ+CH6sj43dpp4pqI/lW/pTKrnJHNfc9lRTY7fHgoB cJpFF5vrdgaRu55lkOrtO4zcOzi017LTJ0dTVQV4mCTod5p/tpoKlYIMPxUHLvxI5iJ6Hd gTTwkoCsdMEyKRjAwQE7QAsurorXUdkVBiMPE1AFpok3XPFSi+IdUNga+1AozhlPzQ3Ci2 /l5uxC8lGZ4SCEqjUAuYtDOXw9zqZkKOEAxBicOcMo1Vo9ES1vlaRCOAxP4jRubQqhR678 3Hr6XZi6r2ld9U8JpUhLcj8TFgGFKJ+865u5YAiXem/u5Iieo/s7cy4l1W9LAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267329; a=rsa-sha256; cv=none; b=at8vVtANrO9feqHHov2y2tyllq17ntKU9b/RVeC+F3JRirNQrUSBsg5zFLR7rE2usNU5s+ OWZe/vRELCx+EQfOuSjJopQ6k7SqVHbmfaJXUkKt6jKq1MdeWcA8/51ezkPyAPLWYcc2+j XVyZACqYfiWCJci5H0S4FIvmcqCezJtIgom2MFBQX+LHFHBvNAhb3ne8onROYtszbmHg8I Ucux7GlzF2OUP24+kAXeoBs1sXdyy83QQwbg0qR4HVBaLxkRoT8cB35dsCrywI/gZ4PdPa zHMAbNcViRDbdHHgY07vejvQbMSglleoMZDacbYinhNIkxcfybLk4RUZ2UOAog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fb81eUkoaZmdnBWxexy8S+FmYC6zJwtDCMQWDSv+fP4=; b=HZo1U/r474MaQt/vO2OxCKs1rDB9T6rqDHYCZkLoZE8C+R+I8cH1M4sx4IBmZKLKhSEl4I FBIjN3yXImoh6G2BDSuOPuoHFCmukmQJrUubpvuLe7yi5I4HHK4ojAdlvSJ4V6novolEYw ex9FiMDHwCiJGaja7LXP75VZwp8PpByP3EYz1O76Dwvtbr60CMnHgmnR5h5nwsedtihUsh IZElgzlPpoH+MAfN2WOYYrItGkFzg1+0mi8kAqP4yc9xmR7A1dYVf026v0EmX0LZ2NtjOI N+v+50BUVs12Tihevs5wEMHzM46uLqEp9hI6U2MV9d7iHIfvEoa4fQDWy4zYOw== 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 4WXj9Y0TBGzg3j; Mon, 29 Jul 2024 15:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZSFG002752; Mon, 29 Jul 2024 15:35:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZSAo002748; Mon, 29 Jul 2024 15:35:28 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:28 GMT Message-Id: <202407291535.46TFZSAo002748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 695313daa341 - stable/14 - sndstat.4: Fix typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 695313daa341ddc8a5bd5cde041532f9bd944928 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=695313daa341ddc8a5bd5cde041532f9bd944928 commit 695313daa341ddc8a5bd5cde041532f9bd944928 Author: Christos Margiolis AuthorDate: 2024-07-27 11:56:02 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:55 +0000 sndstat.4: Fix typo Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46165 (cherry picked from commit f0eceecf5ab51a68d713f9a5a7f360964d0a49ce) --- share/man/man4/sndstat.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index bef444529e5f..266bfcf304fe 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -198,7 +198,7 @@ There are a number of name/value pairs inside this field: .Bl -tag -width ".Dv hwbuf_blkcnt" .It Dv name Channel name. -.It Dv parenchan +.It Dv parentchan Parent channel name (e.g., in the case of virtual channels). .It Dv unit Channel unit. From nobody Mon Jul 29 15:35:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXj9Z4HzPz5RSm2; Mon, 29 Jul 2024 15:35: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9Z1fYTz42WK; Mon, 29 Jul 2024 15:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=16XC50NovwxkglACj+xZwVhfgR1dRTEKGk2Wrd817hw=; b=yxOSXtl8dOxPU3zFJ9GmK9fDse1vQZA/lQaqy2CxgZwLAB/GdXyPbExrOdCUkKN1lp3/sV k2caUChGTZHY5Ncj0kGrFL2ayWW6THKpdr3i/45lJuGW4su1lc0TYupja/RlS78cE96P8K lnkGLiLsvDQIqdkSECixG/KQF68Yx6hAp1Yc2hFEdRvmWJ6c5apG6Tg+px/bwIsmY1ldFn crbFWAE0GXFcX/+2aIP+sMsiYjGqDdTmT3xMlemmCQMwFSaNA53YzfQVzB9+5ASIPgJ4GE UeLLrd3ShoaMglpY1wqmWgVfh+bC9nsUrJlC+/pmH+l9TfARGBW04pRTbi8OGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267330; a=rsa-sha256; cv=none; b=RCxk8YmSYTokb/ScfzgsfIEGLbZzOqqXGtIjJRsGalE4y2FFIOTi4uINlkCSL3VjHC/4NY cZorpRLaaspcb2lyHJ2MjENK6TjuSGE0SeZmUls0mzSNFqce4fKdL09tPCRvdooDO/0ZBw 6WhHF9MjTWSGR0iH5xTQrinMK2FMcoWhIWBuT3D7ejvXtWb8Cax2gVRomAdWAyK0JkPkbw W7qa0OwXgpjjNgl6tWWz937nhPafEx+mAQkX39cH6hSl/vKkuRDhbvgwfDIzAzBn5+yI7d DsSfLQjrUXRaulfPhdTAPrm7az81cYJYY/umnWZhusRCtqVzdECPmm/hWLHnMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=16XC50NovwxkglACj+xZwVhfgR1dRTEKGk2Wrd817hw=; b=DvD2XpeXEuAVKCTN/vGu1rAvtF9wkE8f3W23iyVnes0yj/As84Trk6UNmK9v08Dqz+NSt7 JCEZIhH1IcIGI84caHWJ8QxbS35lf1TRTNhRDmGV+84lCWNyJMZ7WRubUP5WLM/6sxKpiP 7EBYXavrcae4SnsfRbW/rIg6NjH+6zQtnnjWfVgIMisLGz9P2Gj+BhsjsWMi5RjLC39VFE yRzn3HEp+Ut6JF35kX245dgLwLfXvNQxiP7Xa1lyMex8hVr4BK/cqw3dSU6KRbDma5R8E3 J7ppR+e05inY7qF70MB2hPaVihUaYVRbOI9VR3gw6LUGVwRMk655MJencqfXdg== 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 4WXj9Z1HKHzgYd; Mon, 29 Jul 2024 15:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZUAH002800; Mon, 29 Jul 2024 15:35:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZUtd002797; Mon, 29 Jul 2024 15:35:30 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:30 GMT Message-Id: <202407291535.46TFZUtd002797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 2684490714ac - stable/14 - BSD.tests.dist: Add entry for mixer tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2684490714aceb29f59201910f515eabf6b6b37e Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2684490714aceb29f59201910f515eabf6b6b37e commit 2684490714aceb29f59201910f515eabf6b6b37e Author: Li-Wen Hsu AuthorDate: 2024-07-27 18:44:28 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:55 +0000 BSD.tests.dist: Add entry for mixer tests Fixes: 94a86f3f6920 mixer(8): Add tests Sponsored by: The FreeBSD Foundation (cherry picked from commit 21e98f6d195a5db63b17025f339684048834e1aa) --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 1b37720363f1..c75e2eabab69 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1183,6 +1183,8 @@ .. makefs .. + mixer + .. newsyslog .. nmtree From nobody Mon Jul 29 16:12:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXk0p3mp5z5RWZq; Mon, 29 Jul 2024 16:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXk0p35JBz49S1; Mon, 29 Jul 2024 16:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722269578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JfKO5Y6XiX6Ks5cLc0QsBO2LDLcZCgdgJfVnvQ1U84=; b=W60wlHnpP1c8EvWSUJOkgW7ORW0iqXjQyUgBwOvK51W/Xfl98OAh7NjmRsaL3WiX/rg7AM 3F7jgVNelC6MPLWoNe57cEEHZNCJ5M5Xk7peS+5sSPEpFw/D8a9ujoE5A3ae2C/wBppajY UDVfCVOYMbEsv1QTqtwxzKUFBfn10ARdzG6lwsAsYtqe3EidN4if2JFJSpDc2NI88vLip4 y2sSX+QyJzUgWxauGz7ODgUr26sPAfZCQP10mqZu7h5Gkh/6+2A4BwpsqChJomHov9g/aM ny//Hq2nSt9iz8TNAfSvKF+uXIx/RcQTHxaZKETPkFlcIkyqM4upF0qoKTYmZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722269578; a=rsa-sha256; cv=none; b=AOK6RrMYdE1ARyfCgThLQBj3VG3uVso1xtJc0wWfcxQttdA3otw+aH1olbpN0jMJiDjvrt +T2POW3/zFsJBis7HhEOpX9Px9zlK0gl19aJhuu0LAvfPOfX2BwuGmbU+4MsMfWK9J+hN5 6mHr5Re4+xk//Ei9Xg3Chh1eQzZWpy0SnryYOoeVeJOlCLgqCHGCCAXS7yU+DbvY4Dvdyw yITp9eIkZdM/Fmts6f8o1FkKjoocxGnl0xl5FYXclRkx8KiLDS89DgyRQjWSs4xbMMp0fc t2G+YQmqWPl+DVR6DII0W+M6DAgvjtwsUJvv1YwBjGGIcTR3fYsMVT+p9aKvUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722269578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JfKO5Y6XiX6Ks5cLc0QsBO2LDLcZCgdgJfVnvQ1U84=; b=sgc6esPNIJtLsXV8A6ohYW4FL26BqD747ATRw5to4gE9nh4dmcddTCOkUC3GINVuIFgqPi bkE2Ly/C0QbWPzRXe433Qfw05DFYdbrZoHF5vDQImoYfFK7ZW09aEUpmDwBnaOx+XXaKcz GlG6vcrDeifLnVn5VTdA7Vh16DkDT1dFhzzi+XQefsKF5CgeapVDZ7msDD9ybeZx2Na85p 8bji0LwSB3CTvqCsJd8NP9OxvTyYd0uDiUxLOIoxOnq1+EBaFiWDTBFLWsRn735uwU2qUB XcuOz5FKcZVIg5jfWPfQgewSHQ55oMS7x84hdtgJllrfeagg8KbI3EEDNPmnHA== 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 4WXk0p2hqmzhQn; Mon, 29 Jul 2024 16:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGCwxD070157; Mon, 29 Jul 2024 16:12:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGCwnR070154; Mon, 29 Jul 2024 16:12:58 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:12:58 GMT Message-Id: <202407291612.46TGCwnR070154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c8701777c0e8 - stable/13 - Fix the KCSAN_ENABLED check when building modules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c8701777c0e8654f060e46b067dd86452f48c364 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c8701777c0e8654f060e46b067dd86452f48c364 commit c8701777c0e8654f060e46b067dd86452f48c364 Author: Andrew Turner AuthorDate: 2021-06-02 10:07:55 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 16:10:50 +0000 Fix the KCSAN_ENABLED check when building modules The KCSAN_ENABLED variable is non-empty when the kernel is being built with KCSAN. This allows us to disable modules that are known to be broken. There was a bug where we would check if it was defined. As this is always the case the KCSAN_ENABLED variable would be set when building modules so we would never build such a module. Fix this by checking if the value is empty before passing it on to the module stage. This doesn't affect how modules are built as the CFLAGS passed to modules has the correct check. PR: 280212 Reported by: rstone Sponsored by: Innovate UK (cherry picked from commit 2422138952d86dd8b02ff33c55f747ca8e381afe) --- sys/conf/kern.post.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 4e22c07ef8d8..6664afc2bf16 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -37,7 +37,7 @@ MKMODULESENV+= WITH_CTF="${WITH_CTF}" MKMODULESENV+= WITH_EXTRA_TCP_STACKS="${WITH_EXTRA_TCP_STACKS}" .endif -.if defined(KCSAN_ENABLED) +.if !empty(KCSAN_ENABLED) MKMODULESENV+= KCSAN_ENABLED="yes" .endif From nobody Mon Jul 29 16:31:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkTt077nz5RYVB; Mon, 29 Jul 2024 16:34:42 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.3 with cipher TLS_AES_256_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 4WXkTs4t9Qz4DGN; Mon, 29 Jul 2024 16:34:41 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; none Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 213611140091; Mon, 29 Jul 2024 12:31:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 29 Jul 2024 12:31:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1722270687; x=1722357087; bh=+1E+DUWcjEVDLKGJULV0JQjC+TAWYZLR2dzPI9TEJSc=; b= QjBMwoPytjxbLYz3Nt03sj48XKA35jhycqS5i9pe+fhlYMKv1ctxJ2eK0N0mAiwa 9T7/K6cUZnE947b4zurI7mEHQaFaN5cf1Kq4ZPV0jNXr+LoCXFNUW9r3+AQOI/UQ Qpk5afB5BZoLXjghtmyOl3i58b6VCjLWEReImfIZL+VW6EBhPI7rBdDfL6Vu9Onr PQW0FS0/+MZiA/4OJ5KhUQldmhMN9KnvK8nCeN5Xc/L9fQbm5tMBGXfuPriRYn4p tTKvnvQ6NKE9jfVGbG2y9CA1qAWllhbhGTmdJP3is4WkY2ZNy+qtoOSCS5EZH+C/ rDhXsqeoj5oqM1gFV5LD8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722270687; x= 1722357087; bh=+1E+DUWcjEVDLKGJULV0JQjC+TAWYZLR2dzPI9TEJSc=; b=c xrATd3vw2WcMJuGdZXnP37OvgpcVTQhGOmJY46N8JHtROLelgmYqzEqePb+5xzQx t8LfxVs2dIQWHzDnWI4CNgqBXWURpss74dVqT+4joEILIKZkEVwoSP/it3FcneSt 4/MdFwj/Q0Ic6czajcBtpY8YlPMzXeLB7SXqTF0o1Tm5+zUqOvZX7rDdrbcd8dzp 4DP8WREBSo2WfE6RVNTyi0aFvLUmWjoLFTgkRK+ONVNv4eYv5lxgA65g3RZI6I6T SNaOWqp6d0XeVDljcB8uPV2AvZZWlWX5fgxNFyQLAtwRQwbogGTxm2NApCRPrh4p UFLS4ZxdgGhLfyAUAEcGg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjedvgddutdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomhepjghurhhi ucfrrghnkhhovhcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeenucggtffrrghtthgvrh hnpeejfeeuvdfhfeehtdetieffueefgfdvveevhefhheeiudeludegjeejieeltdelteen ucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihesrggvthgvrhhnrdhorhhgpdhnsggp rhgtphhtthhopedt X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Jul 2024 12:31:24 -0400 (EDT) Message-ID: <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> Date: Mon, 29 Jul 2024 23:31:19 +0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> Content-Language: en-US From: Yuri Pankov In-Reply-To: <202407291431.46TEVQow094080@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 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:209242, ipnet:103.168.172.0/24, country:US] X-Rspamd-Queue-Id: 4WXkTs4t9Qz4DGN Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=801c452795ac441523655eb3277051b7b034becf > > commit 801c452795ac441523655eb3277051b7b034becf > Author: Mark Johnston > AuthorDate: 2024-07-29 14:12:40 +0000 > Commit: Mark Johnston > CommitDate: 2024-07-29 14:17:04 +0000 > > man9: Really complete the removal of MD5.9 > > Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate kernel side manual page.") > Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual page from section 9.") > --- > ObsoleteFiles.inc | 2 ++ > share/man/man9/Makefile | 2 -- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > index b21778466800..01b4824e8692 100644 > --- a/ObsoleteFiles.inc > +++ b/ObsoleteFiles.inc > @@ -56,6 +56,8 @@ OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz > > # 20240729: remove MD5(9) > OLD_FILES+=usr/share/man/man9/MD5.9.gz > +OLD_FILES+=usr/share/man/man9/MD5Init.9 > +OLD_FILES+=usr/share/man/man9/MD5Transform.9 This really needs to be smarter, but you have to specify .gz suffix for man entries as we have compression enabled by default. > # 20240726: deprecate contigfree(9) > OLD_FILES+=usr/share/man/man9/contigfree.9.gz > diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile > index 593bbd068790..60f994edfd9f 100644 > --- a/share/man/man9/Makefile > +++ b/share/man/man9/Makefile > @@ -1544,8 +1544,6 @@ MLINKS+=\ > mbuf_tags.9 m_tag_next.9 \ > mbuf_tags.9 m_tag_prepend.9 \ > mbuf_tags.9 m_tag_unlink.9 > -MLINKS+=MD5.9 MD5Init.9 \ > - MD5.9 MD5Transform.9 > MLINKS+=mdchain.9 md_append_record.9 \ > mdchain.9 md_done.9 \ > mdchain.9 md_get_int64.9 \ > From nobody Mon Jul 29 16:37:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkXl4k9gz5RYX2; Mon, 29 Jul 2024 16:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkXl3TyVz4DqL; Mon, 29 Jul 2024 16:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3XVJk2OeE9ov93czJiTIOEwW4Rwu1w1ohxCUjJY27fU=; b=bTutL9Zcnkx8JEP7yK65Gng/EW7vpCwESCMyziVLoj7raxYqplHr9o412sqoQuzJaexZ9o bw7whPBGIivbfphfqWPfVTvmcdkKJ8U/MDwebNT2/81pXyKv5w54j43kyYkhfl7MDUcIHy DTHzFdSoxH6u/yoMdwyrYw5Ql0rbknZWNh9PCqh+qZ/9Py2zH5OmzY0U+V8TiBXUWUxRZi SWW9Q2OwhT2xAUFOI1lZ2ZRt2mE3lDZ/Hc5CxTR2ykPa17IyouVjV6J1WDFlFgjPnFPC7F DYr0oNl6f3krBINtCMYM+Qi/oVLLeISng7KGlPhpi8iWbrl/NMISi5kaec41Ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722271031; a=rsa-sha256; cv=none; b=sTr3VtPqgrDSdV+TXqym1qq5kg1X+DmEGdGvLeKAqUliOSfNDWIdQ3f9JnvhP8Sh5Y4gdi 3U6FLbCs7Yr0g90rq3BE2SKU16TAKOJykjpSLCxf97hjxnYw7O9RrV07HpygqW/bk9N5XC X0Qqknvjb9uG7DtCToLtt2Tn8UxrfuAsqtqWWCkKlcE0G15HgUwUkJkdIuDmOzcOKGvowL eglJqU3QOYf0mkmjCeGvMWZu9ZxOnF0JDhmUpjkbfo5N4RRh3DTPCQVOXCwQPgzUGV8l/8 byfxp20rUU1CO04aWnsWTAufTuuMqy5OIzgadKwXUHk1Ch7StqpOgo33GdhVlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3XVJk2OeE9ov93czJiTIOEwW4Rwu1w1ohxCUjJY27fU=; b=BIPucAR4sLOURmN22lBhIhhhSpiRL4/Amd+bfcsFMfnbpCvpMkIodCiAmCCe4+ppVyxuIw po+QRco+j6phHf7GBPwZV3BVDjZ9QPpf+ntR9KYUM4ZKrZixi8NJA9IlAINQodcACOl7Ch E6+7eG5r9qIAjWiBjEbNu5hLWnnhBIbWDroiuWQbYoRGr4so+URSb/WRws6uKN14Vn+iNn 7uHcEwQlDWdx8uZSJBcXCsOZfehEgbmR55bDHkgnXLuEXN4rAjaPvZUdr+uau0sSrK+4dw Qli9xEFQxLR72RhvO8PpTAXS9ghHOCMqpkgVe+yihJUwiHfPz1fOsB6/QRImRw== 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 4WXkXl35MDzh8d; Mon, 29 Jul 2024 16:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGbBTK004462; Mon, 29 Jul 2024 16:37:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGbBeW004459; Mon, 29 Jul 2024 16:37:11 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:37:11 GMT Message-Id: <202407291637.46TGbBeW004459@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: f933363a81d6 - main - ObsoleteFiles.inc: Include the default compression suffix for man pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f933363a81d6d40f77237f009ea97385736f1148 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f933363a81d6d40f77237f009ea97385736f1148 commit f933363a81d6d40f77237f009ea97385736f1148 Author: Mark Johnston AuthorDate: 2024-07-29 16:36:17 +0000 Commit: Mark Johnston CommitDate: 2024-07-29 16:36:17 +0000 ObsoleteFiles.inc: Include the default compression suffix for man pages Reported by: yuripv Fixes: 801c452795ac ("man9: Really complete the removal of MD5.9") --- ObsoleteFiles.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 01b4824e8692..3ca9d410cb29 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -56,8 +56,8 @@ OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz # 20240729: remove MD5(9) OLD_FILES+=usr/share/man/man9/MD5.9.gz -OLD_FILES+=usr/share/man/man9/MD5Init.9 -OLD_FILES+=usr/share/man/man9/MD5Transform.9 +OLD_FILES+=usr/share/man/man9/MD5Init.9.gz +OLD_FILES+=usr/share/man/man9/MD5Transform.9.gz # 20240726: deprecate contigfree(9) OLD_FILES+=usr/share/man/man9/contigfree.9.gz From nobody Mon Jul 29 16:37:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkYF5hRdz5RYjx; Mon, 29 Jul 2024 16:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkYF20b0z4FGD; Mon, 29 Jul 2024 16:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0FrfqxmZIelys3x9/1ZgwWbkHl4SYDKjH5DJVKpSXCA=; b=oIVvtKJkHcQSs8D4dnTmIe4ryAJq+Xmk6rj/uowSbdrxhTNSV9C1Iz55ktQmtnpRTG5428 6GhMhIzSOPzPwt1Iy2ew2jU6fklni7oiW2HKLnuM7D086XMKG9VoUtkVRBs+MoCAInwvtS vbqa228/kKvCuXvzlnYcnRBGPOnYtU3/wjpBJZbWdsjsIiXaSPlhoXLCHgggz8k/uPAlxp ToJ5tD8KbVLcftyt0/i1E+R0OGcToiQjSYC7E8rTcPxLmivvkUycygF7oQGW4zArnmIZVI Q/aYMk/pfVO4Dg0fblTdl/PCEbqL7d5yi9Njg2nAjPsYFiDlyDlx3MwMzsqABw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722271057; a=rsa-sha256; cv=none; b=uiTYCn9guufWfk+b4DNwb2HB3kAeKuAOwiw9GulQZowwQBbNklxvn4e7bBxOAfJbbuwL9H i8xz2mq7oKed5kGBHJTeK2NoZlASHk0X+BRTh1fdE9wSXgKyul1ydYfRwvCV26mPx8MKdR CaeYsnlD6qVM7Vy5K8UPjzbJca5KPxqx83MZrURdyxzETlEfOAxk3SYm/DbUDDPr5MUaa4 pUI4e30lRQ55Fh9ipvkHPfpdkIolQuxG4T6QLH95QYfnRExHh2bVlkdCzk8qef94qiBloN VDAhD6COAelyjextCoN1HbgvfjFTyqgi5/pU3w8oS4lD8Uw08FxYphA1yII3jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0FrfqxmZIelys3x9/1ZgwWbkHl4SYDKjH5DJVKpSXCA=; b=hJR/z21xpV7Iz64y5fGY6l9zTaXCGvHmtWq26YwuN8mLH6rFuKUyC1E21AVGDUcjegeR/g O4sIJskZeDwaSuJNnnboUDERQAe8JiADCgpwM2BUHXSLGOFJdMarZLiO6gSk6sol1f+TSx Jidbpztp9S3/0NyM7X5+YtysvL9xzdcY5H1w9Y4PokAcKrd+kcK2DY3bvZWHA0ac/ZeVnA dWAlYcmpXZUAjBJ1XjWkXuDzqwZsoE6GSrmrcoSFCErUOsIkrQ/Sr+VKQJ1C2UpuMHe9dj pBBrrczterLgc0Ri+nzhJX1Wz0bGDLvbnecIBxyGDKl0IzzU6kyW9CONJAYoPA== 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 4WXkYF1byrzh8f; Mon, 29 Jul 2024 16:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGbbVr004670; Mon, 29 Jul 2024 16:37:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGbblZ004667; Mon, 29 Jul 2024 16:37:37 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:37:37 GMT Message-Id: <202407291637.46TGbblZ004667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 8e908fab6c5b - stable/14 - conf: Add usbhid and hidbus to GENERIC* kernel configs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8e908fab6c5ba76bfe9bc26be00051cc733fc82e Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8e908fab6c5ba76bfe9bc26be00051cc733fc82e commit 8e908fab6c5ba76bfe9bc26be00051cc733fc82e Author: Emmanuel Vadot AuthorDate: 2024-06-20 07:30:07 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-29 16:36:42 +0000 conf: Add usbhid and hidbus to GENERIC* kernel configs Include the new unified HID stack by default in generic. This will allow us to migrate to the multi-stack hkbd and hms instead of relying on the older ukbd and ums which only work with USB. To test those drivers just add hw.usb.usbhid.enable=1 in loader.conf Differential Revision: https://reviews.freebsd.org/D45658 Reviewed by: emaste, imp, wulf (all older version) Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 13d00a43cba4c35fcc9e0ab567baf530126a6348) conf: hidmap is always needed for hms So bring it in when hms is in the kernel config Fixes: 13d00a43cba4 ("conf: Add usbhid and hidbus to GENERIC* kernel configs") Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 5ed91e788f0b97c9e6c544671ffef71fad7cad27) conf: powerpc: Add evdev to some kernel configs Fixes: 13d00a43cba4 ("conf: Add usbhid and hidbus to GENERIC* kernel configs") Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 43a62df0b464e60895084c7f9d9eddf70906fda3) --- sys/amd64/conf/GENERIC | 5 ++++- sys/arm/conf/GENERIC | 4 ++++ sys/arm/conf/RPI-B | 1 + sys/arm/conf/TEGRA124 | 4 ++++ sys/arm64/conf/std.dev | 5 ++++- sys/conf/files | 2 +- sys/i386/conf/GENERIC | 5 ++++- sys/powerpc/conf/GENERIC | 8 ++++++-- sys/powerpc/conf/GENERIC64 | 8 ++++++-- sys/powerpc/conf/GENERIC64LE | 8 ++++++-- sys/powerpc/conf/MPC85XX | 9 +++++++++ sys/powerpc/conf/MPC85XXSPE | 9 +++++++++ sys/powerpc/conf/QORIQ64 | 9 +++++++++ sys/riscv/conf/GENERIC | 3 +++ 14 files changed, 70 insertions(+), 10 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index ab1c3856051b..8ad3a3ccd425 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -328,7 +328,9 @@ device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface (USB 2.0) device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) -device ukbd # Keyboard +device usbhid # USB HID Transport +device hkbd # HID Keyboard +device ukbd # USB Keyboard device umass # Disks/Mass storage - Requires scbus and da # Sound support @@ -379,4 +381,5 @@ device uinput # install /dev/uinput cdev # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID Bus options IICHID_SAMPLING # Workaround missing GPIO INTR support diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index f8a39cb370d5..05bbf6526b34 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -192,7 +192,9 @@ device musb device axe # USB-Ethernet device umass # Disks/Mass storage - Requires scbus and da +device usbhid # USB HID Transport device uhid # "Human Interface Devices" +device hkbd # Allow keyboard like HIDs to control console device ukbd # Allow keyboard like HIDs to control console # Device mode support @@ -226,6 +228,7 @@ device sound # Framebuffer support device vt device kbdmux +device hms device ums device videomode device vchiq @@ -263,6 +266,7 @@ device aw_thermal # Allwinner Thermal Sensor Controller # HID support device hid # Generic HID support +device hidbus # Generic HID Bus # Flattened Device Tree options FDT # Configure using FDT/DTB data diff --git a/sys/arm/conf/RPI-B b/sys/arm/conf/RPI-B index 844b31686d5a..d0a3ee13c367 100644 --- a/sys/arm/conf/RPI-B +++ b/sys/arm/conf/RPI-B @@ -57,6 +57,7 @@ device usb_template # Control of the gadget # Comment following lines for boot console on serial port device vt device kbdmux +device hkbd device ukbd device sdhci diff --git a/sys/arm/conf/TEGRA124 b/sys/arm/conf/TEGRA124 index 9b75bf2e94f8..16cb5f95d26f 100644 --- a/sys/arm/conf/TEGRA124 +++ b/sys/arm/conf/TEGRA124 @@ -85,6 +85,7 @@ device ehci # EHCI USB interface device xhci # XHCI USB interface device tegra124_xusb_fw # Tegra XUSB firmware device usb # USB Bus (required) +device usbhid # USB HID Transport device umass # Disks/Mass storage - Requires scbus and da device uhid # "Human Interface Devices" #device u3g # USB modems @@ -130,6 +131,9 @@ device drm2 # HID support device hid # Generic HID support +device hidbus # Generic HID Bus +device hkbd # Allow keyboard like HIDs to control console +device hms # HID mouse # Flattened Device Tree options FDT # Configure using FDT/DTB data diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev index 0c0ede38ed2b..d07ab6c22b7b 100644 --- a/sys/arm64/conf/std.dev +++ b/sys/arm64/conf/std.dev @@ -98,7 +98,9 @@ device uhci # UHCI USB interface device ehci # EHCI USB interface (USB 2.0) device xhci # XHCI USB interface (USB 3.0) device usb # USB Bus (required) -device ukbd # Keyboard +device usbhid # USB HID Transport +device hkbd # HID Keyboard +device ukbd # USB Keyboard device umass # Disks/Mass storage - Requires scbus and da # Sound support @@ -111,6 +113,7 @@ device mmcsd # mmc/sd flash cards # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID Bus # Firmware device mmio_sram # Generic on-chip SRAM diff --git a/sys/conf/files b/sys/conf/files index 47601d3c7cff..5325e010d970 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1770,7 +1770,7 @@ dev/hid/hgame.c optional hgame dev/hid/hid.c optional hid dev/hid/hid_if.m optional hid dev/hid/hidbus.c optional hidbus -dev/hid/hidmap.c optional hidmap +dev/hid/hidmap.c optional hidmap | hms dev/hid/hidquirk.c optional hid dev/hid/hidraw.c optional hidraw dev/hid/hkbd.c optional hkbd diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index c5ad0a613eaa..79a26583b1b1 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -286,7 +286,9 @@ device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface (USB 2.0) device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) -device ukbd # Keyboard +device usbhid # USB HID Transport +device hkbd # HID Keyboard +device ukbd # USB Keyboard device umass # Disks/Mass storage - Requires scbus and da # Sound support @@ -333,4 +335,5 @@ device uinput # install /dev/uinput cdev # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID Bus options IICHID_SAMPLING # Workaround missing GPIO INTR support diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index c839e2d63b9e..c2a68dba326a 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -172,12 +172,15 @@ device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface device usb # USB Bus (required) +device usbhid # USB HID Transport device uhid # "Human Interface Devices" -device ukbd # Keyboard +device hkbd # HID Keyboard +device ukbd # USB Keyboard options KBD_INSTALL_CDEV # install a CDEV entry in /dev device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da0 -device ums # Mouse +device hms # HID Mouse +device ums # USB Mouse device atp # Apple USB touchpad device urio # Diamond Rio 500 MP3 player # USB Ethernet @@ -233,3 +236,4 @@ device virtio_balloon # VirtIO Memory Balloon device # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID Bus diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 1e91a4cc9455..34e6d1bcf027 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -211,11 +211,14 @@ device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface device xhci # XHCI PCI->USB interface device usb # USB Bus (required) +device usbhid # USB HID Transport device uhid # "Human Interface Devices" -device ukbd # Keyboard +device hkbd # HID Keyboard +device ukbd # USB Keyboard options KBD_INSTALL_CDEV # install a CDEV entry in /dev device umass # Disks/Mass storage - Requires scbus and da0 -device ums # Mouse +device hms # HID Mouse +device ums # USB Mouse # USB Ethernet device aue # ADMtek USB Ethernet device axe # ASIX Electronics USB Ethernet @@ -285,3 +288,4 @@ device virtio_balloon # VirtIO Memory Balloon device # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID Bus diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index d05308b9f0b9..1d4ac62abd81 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -207,11 +207,14 @@ device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface device xhci # XHCI PCI->USB interface device usb # USB Bus (required) +device usbhid # USB HID Transport device uhid # "Human Interface Devices" -device ukbd # Keyboard +device hkbd # HID Keyboard +device ukbd # USB Keyboard options KBD_INSTALL_CDEV # install a CDEV entry in /dev device umass # Disks/Mass storage - Requires scbus and da0 -device ums # Mouse +device hms # HID Mouse +device ums # USB Mouse # USB Ethernet device aue # ADMtek USB Ethernet device axe # ASIX Electronics USB Ethernet @@ -266,3 +269,4 @@ device virtio_balloon # VirtIO Memory Balloon device # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID Bus diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX index e44a35377355..e13fc75089f4 100644 --- a/sys/powerpc/conf/MPC85XX +++ b/sys/powerpc/conf/MPC85XX @@ -108,10 +108,13 @@ device uart options USB_DEBUG # enable debug msgs #device uhci device ehci +device hkbd device ukbd +device hms device ums device umass device usb +device usbhid device vlan # P1022 DIU @@ -120,6 +123,12 @@ device videomode device vt device fbd +# evdev interface +options EVDEV_SUPPORT # evdev support in legacy drivers +device evdev # input event device support +device uinput # install /dev/uinput cdev + # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID bus diff --git a/sys/powerpc/conf/MPC85XXSPE b/sys/powerpc/conf/MPC85XXSPE index 3665da656ed1..2410170f9672 100644 --- a/sys/powerpc/conf/MPC85XXSPE +++ b/sys/powerpc/conf/MPC85XXSPE @@ -115,10 +115,13 @@ device uart options USB_DEBUG # enable debug msgs #device uhci device ehci +device hkbd device ukbd +device hms device ums device umass device usb +device usbhid device vlan # VirtIO support @@ -135,6 +138,12 @@ device videomode device vt device fbd +# evdev interface +options EVDEV_SUPPORT # evdev support in legacy drivers +device evdev # input event device support +device uinput # install /dev/uinput cdev + # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID bus diff --git a/sys/powerpc/conf/QORIQ64 b/sys/powerpc/conf/QORIQ64 index 369e83179c59..e72d967dd895 100644 --- a/sys/powerpc/conf/QORIQ64 +++ b/sys/powerpc/conf/QORIQ64 @@ -112,15 +112,24 @@ options USB_DEBUG # enable debug msgs device ehci device umass device usb +device usbhid device vlan # Desktop related device vt device fbd options KBD_INSTALL_CDEV +device hkbd device ukbd +device hms device ums +# evdev interface +options EVDEV_SUPPORT # evdev support in legacy drivers +device evdev # input event device support +device uinput # install /dev/uinput cdev + # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID bus diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 5b02f1694fa3..7ecd496d6aab 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -115,12 +115,15 @@ device uhci # UHCI USB interface device ehci # EHCI USB interface (USB 2.0) device xhci # XHCI USB interface (USB 3.0) device usb # USB Bus (required) +device usbhid # USB HID Transport +device hkbd # Keyboard device ukbd # Keyboard device umass # Disks/Mass storage - Requires scbus and da # HID support options HID_DEBUG # enable debug msgs device hid # Generic HID support +device hidbus # Generic HID Bus # DTrace support # device dtrace From nobody Mon Jul 29 16:38:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkZJ0z78z5RYnq; Mon, 29 Jul 2024 16:38: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkZJ0MMZz4FSx; Mon, 29 Jul 2024 16:38:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iWooaqmKD/UFEuc2C8IJkdDxdhXlNCfAGN/6Cvgx88Q=; b=dHgw/8REYUvWpBZyTHdsgab4kIuEhl0chGF+tTPNNQuEposlOX5rbylwUGOvaR0y+g68H6 xSvraZCSTyG36u4vQXUTd+Wc5KdY0eZioa8pup5KzFu6jNMVvv7oIEQT/wTKv/LokKwXQ8 yIHwNLr87qusm/lOA5hkilF0PRdgmfldA87oYx7lePb8q+kESHaXsSNv3TpIKy7xPIphdg kXGL7/USdCjQ+3RUKa8HTY42ncwXrfdh/VMyDLsjIzfI0nrbW52QftcvGnUaWInAjuBP/U W+VnmZ2gjSNq9Mspzi635wfT0mag8KsxEmTxcGjfepCXbBtoaw2XTxATa3wIGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722271112; a=rsa-sha256; cv=none; b=etltlct4zeTcIyctT1UdP6SnIcaAtCFR7GJu+aUVop7Qn2xA/Wjs2ddpg7d81MImDG/poH Yd2jFXrQt1xN0Td1B6Wf5pZbQpkvf9PVvbDd4YkgiivLVJdTlvve+WO41ysucC5jxZjT8O XmpvwsEEoPmxrQe4m6Hh/Q+yR+S//4JeN3RRLq3ZQZuyadcooWTjI4S8dy00gERqqB6sBn w2lSUK1xOHj2kdw1iqrtfund8/uPh0XCmUy/VVzHbLeU8ka52YuTiAtuMGvWB2iSvXlhuv DRJ02L7NpCgsPTCo3MVorJdDO6rOLo7W80+ntPAtOfz4QmNBcv1eVIc/mbjYuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iWooaqmKD/UFEuc2C8IJkdDxdhXlNCfAGN/6Cvgx88Q=; b=YChMael7P61wga2+1KO1LUPUAFZ8xI0bPnyDWeKWlnUBQWT+b3OeyItVrjJoBbzpDaKnxU JFOKxjREEOcN0jwim9DMnukZWz64y6EBiHxHHovqprPFnQEm7B9SSv4omYk9LJxehljkgd z44CaL0EkhQwCUq7Q4TtMyUMwxj/cSKEM1Px/mA4vl2/M6In465xXhIjuvMiaZ2Kg/Jolk 4p7pMj40C/RX6Bvzh3jCxJ3YHcZa9g5j8DQyBFzeE3/d8UxlUdtDlRSYt6WDx4iUPEVxHs KKZ6kASzI+PaQoFZQlWnFe/deVmAZ2nCjQ2rSxCB60CsuC55HHNBMzyl8hJ88g== 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 4WXkZH73sDzhSM; Mon, 29 Jul 2024 16:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGcVt0004948; Mon, 29 Jul 2024 16:38:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGcVJR004945; Mon, 29 Jul 2024 16:38:31 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:38:31 GMT Message-Id: <202407291638.46TGcVJR004945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: ed956d5fcb26 - stable/14 - stand: Fix logo alpha List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ed956d5fcb26c614ede8be229dd1f659f6481907 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ed956d5fcb26c614ede8be229dd1f659f6481907 commit ed956d5fcb26c614ede8be229dd1f659f6481907 Author: Emmanuel Vadot AuthorDate: 2024-07-09 12:53:08 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-29 16:37:09 +0000 stand: Fix logo alpha The alpha wasn't done properly and some white stripes could be seen. Differential Revision: https://reviews.freebsd.org/D45933 Reviewed by: imp. tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 887062c1da4a4c04a2b3987ec9a4e2a5902122d5) --- stand/images/freebsd-logo-rev.png | Bin 43898 -> 39052 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/stand/images/freebsd-logo-rev.png b/stand/images/freebsd-logo-rev.png index 5279b718218c..6e2088df4654 100644 Binary files a/stand/images/freebsd-logo-rev.png and b/stand/images/freebsd-logo-rev.png differ From nobody Mon Jul 29 16:38:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkZK2nXDz5RYmR; Mon, 29 Jul 2024 16:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkZK0xznz4FNG; Mon, 29 Jul 2024 16:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9urPkRT4DNPUdxMZNV9Ur6LsLKdWeqv0qXzRPZArf0=; b=hfLpqr14+kvgi9VGtiOj8FsH7O9e436vism1YKauJxRUF/LX/3sukSVvlAPYlOiZLEKuQJ M1tfPIe28nI6ksNxkJ/4HZb6ApngZahcIrpPZkLXcoCFv8Y7/cY3ezMOTQw8tvmxSudaRS t+ui9s88Z+B4EQYnJ8th0UhLWTb4h8mTqi34vNft1rh4nacrU5T53MUijMUKlJ+lZK2gzg lc8EagCN2ashQteg221H834Q08IoZOddDpWxpDpbKMW4IkpzTw2cS/LieyPvkzvdKQNDBe L65+3IreUFpIDCdJVwDOsvKqfvAmFik7HqMMNmCtboCy6G7fryuyJv5gfH1j9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722271113; a=rsa-sha256; cv=none; b=hpq/2desadHgkEyKvjKFlBVCwHQ7HZW0SijoD5AIMVPMhvOIueHiILbh+A2u2Z5Ss55gmI R5Gz1o4uQ+UnpyYkInw+UYlA/bgkeWYaR7AQukPtmOnBwgzADmZW1OBtUl5vsBiDsfCEA4 T8VOjnQOjQlWPQB+WC4MoL0Y/wwUA3KIgRqCoaze9ZeQbgpI8eZZmF+SCnLK1NiNdohNaM 56lla2/ROhwDvSrKZYBSVsnN/QMQBCSBR59kJNK5NKrc0n05IbtWQqUdGSmayBXL/EuRsR hq5oZg0AYJiFb1/8uRLdZqRq8y8zhHMoBSV10trqtArlaxwtusHlV7dfjjignQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9urPkRT4DNPUdxMZNV9Ur6LsLKdWeqv0qXzRPZArf0=; b=WLXeE/QAe9XopVvEA3g8iYQcfcsHS8XArX2Sf96RSWFoijs+zjauEHG3j4V3PebDWRWoX1 mheYwTmvCobKog0Gb89flpTQAeRltZ2PKjH/FjXY/2cKOSvzV6GrizBO6+o1QC2CDXCilv 7VaxhwwGsJf4TIikfjtZFwYer5USIcy0MPM51sTlu7X4Qp5DTxynMJVltDKd7X1gkrj5K/ OGliI9fXD5fSuMcCa938NFu6EQ091Ns9We86yGtbY4+rKmnGCDpTaOl5hiIXOsutxGf0JK PmcQpR20sgzRpXDG4k0LwzunFydujriAEAJ18ZIuZCZs1DGawQF8OVdjVjwJow== 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 4WXkZK0Yyvzhlr; Mon, 29 Jul 2024 16:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGcWnd004984; Mon, 29 Jul 2024 16:38:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGcWAb004981; Mon, 29 Jul 2024 16:38:32 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:38:32 GMT Message-Id: <202407291638.46TGcWAb004981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 01215ffec65a - stable/14 - vt: Add vd_bitblt_argb List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 01215ffec65ae607a0583c564158097b5d56e531 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=01215ffec65ae607a0583c564158097b5d56e531 commit 01215ffec65ae607a0583c564158097b5d56e531 Author: Emmanuel Vadot AuthorDate: 2024-07-09 12:35:12 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-29 16:37:12 +0000 vt: Add vd_bitblt_argb This blit an ARGB image on the dedicated vd. This also adds vt_fb_bitblt_argb which will works for most of the vt backends Differential Revision: https://reviews.freebsd.org/D45929 Reviewed by: tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit b93028d8cd3aafc883b5f0ecec65a8a2a30af7f3) --- sys/dev/virtio/gpu/virtio_gpu.c | 12 ++++++++++ sys/dev/vt/hw/efifb/efifb.c | 1 + sys/dev/vt/hw/fb/vt_early_fb.c | 1 + sys/dev/vt/hw/fb/vt_fb.c | 47 +++++++++++++++++++++++++++++++++++++++ sys/dev/vt/hw/fb/vt_fb.h | 1 + sys/dev/vt/hw/ofwfb/ofwfb.c | 12 ++++++++++ sys/dev/vt/hw/simplefb/simplefb.c | 12 ++++++++++ sys/dev/vt/hw/vbefb/vbefb.c | 1 + sys/dev/vt/hw/vga/vt_vga.c | 12 ++++++++++ sys/dev/vt/vt.h | 5 +++++ 10 files changed, 104 insertions(+) diff --git a/sys/dev/virtio/gpu/virtio_gpu.c b/sys/dev/virtio/gpu/virtio_gpu.c index 6209fe4beae1..ccb49a6b7695 100644 --- a/sys/dev/virtio/gpu/virtio_gpu.c +++ b/sys/dev/virtio/gpu/virtio_gpu.c @@ -102,6 +102,7 @@ static vd_bitblt_text_t vtgpu_fb_bitblt_text; static vd_bitblt_bmp_t vtgpu_fb_bitblt_bitmap; static vd_drawrect_t vtgpu_fb_drawrect; static vd_setpixel_t vtgpu_fb_setpixel; +static vd_bitblt_argb_t vtgpu_fb_bitblt_argb; static struct vt_driver vtgpu_fb_driver = { .vd_name = "virtio_gpu", @@ -111,6 +112,7 @@ static struct vt_driver vtgpu_fb_driver = { .vd_bitblt_text = vtgpu_fb_bitblt_text, .vd_invalidate_text = vt_fb_invalidate_text, .vd_bitblt_bmp = vtgpu_fb_bitblt_bitmap, + .vd_bitblt_argb = vtgpu_fb_bitblt_argb, .vd_drawrect = vtgpu_fb_drawrect, .vd_setpixel = vtgpu_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -180,6 +182,16 @@ vtgpu_fb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, vtgpu_resource_flush(sc, x, y, width, height); } +static int +vtgpu_fb_bitblt_argb(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *argb, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y) +{ + + return (EOPNOTSUPP); +} + static void vtgpu_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, term_color_t color) diff --git a/sys/dev/vt/hw/efifb/efifb.c b/sys/dev/vt/hw/efifb/efifb.c index 12909d836a24..3ba501c000cb 100644 --- a/sys/dev/vt/hw/efifb/efifb.c +++ b/sys/dev/vt/hw/efifb/efifb.c @@ -59,6 +59,7 @@ static struct vt_driver vt_efifb_driver = { .vd_bitblt_text = vt_fb_bitblt_text, .vd_invalidate_text = vt_fb_invalidate_text, .vd_bitblt_bmp = vt_fb_bitblt_bitmap, + .vd_bitblt_argb = vt_fb_bitblt_argb, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_fb_ioctl = vt_fb_ioctl, diff --git a/sys/dev/vt/hw/fb/vt_early_fb.c b/sys/dev/vt/hw/fb/vt_early_fb.c index 265a148ae556..920bfa05fd63 100644 --- a/sys/dev/vt/hw/fb/vt_early_fb.c +++ b/sys/dev/vt/hw/fb/vt_early_fb.c @@ -59,6 +59,7 @@ static struct vt_driver vt_fb_early_driver = { .vd_bitblt_text = vt_fb_bitblt_text, .vd_invalidate_text = vt_fb_invalidate_text, .vd_bitblt_bmp = vt_fb_bitblt_bitmap, + .vd_bitblt_argb = vt_fb_bitblt_argb, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_priority = VD_PRIORITY_GENERIC, diff --git a/sys/dev/vt/hw/fb/vt_fb.c b/sys/dev/vt/hw/fb/vt_fb.c index 5f4173ab144f..87d0595a66f1 100644 --- a/sys/dev/vt/hw/fb/vt_fb.c +++ b/sys/dev/vt/hw/fb/vt_fb.c @@ -50,6 +50,7 @@ static struct vt_driver vt_fb_driver = { .vd_bitblt_text = vt_fb_bitblt_text, .vd_invalidate_text = vt_fb_invalidate_text, .vd_bitblt_bmp = vt_fb_bitblt_bitmap, + .vd_bitblt_argb = vt_fb_bitblt_argb, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -333,6 +334,52 @@ vt_fb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, } } +int +vt_fb_bitblt_argb(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *argb, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y) +{ + struct fb_info *info; + uint32_t o, cc; + int bpp, xi, yi; + + info = vd->vd_softc; + bpp = FBTYPE_GET_BYTESPP(info); + if (bpp != 4) + return (EOPNOTSUPP); + + if (info->fb_flags & FB_FLAG_NOWRITE) + return (0); + + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + + /* Bound by right and bottom edges. */ + if (y + height > vw->vw_draw_area.tr_end.tp_row) { + if (y >= vw->vw_draw_area.tr_end.tp_row) + return (EINVAL); + height = vw->vw_draw_area.tr_end.tp_row - y; + } + if (x + width > vw->vw_draw_area.tr_end.tp_col) { + if (x >= vw->vw_draw_area.tr_end.tp_col) + return (EINVAL); + width = vw->vw_draw_area.tr_end.tp_col - x; + } + for (yi = 0; yi < height; yi++) { + for (xi = 0; xi < (width * 4); xi += 4) { + o = (y + yi) * info->fb_stride + (x + (xi / 4)) * bpp; + o += vd->vd_transpose; + cc = (argb[yi * width * 4 + xi] << 16) | + (argb[yi * width * 4 + xi + 1] << 8) | + (argb[yi * width * 4 + xi + 2]) | + (argb[yi * width * 4 + xi + 3] << 24); + vt_fb_mem_wr4(info, o, cc); + } + } + + return (0); +} + void vt_fb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, const term_rect_t *area) diff --git a/sys/dev/vt/hw/fb/vt_fb.h b/sys/dev/vt/hw/fb/vt_fb.h index 54f7ba667eb1..fc3db42b2a15 100644 --- a/sys/dev/vt/hw/fb/vt_fb.h +++ b/sys/dev/vt/hw/fb/vt_fb.h @@ -42,6 +42,7 @@ vd_blank_t vt_fb_blank; vd_bitblt_text_t vt_fb_bitblt_text; vd_invalidate_text_t vt_fb_invalidate_text; vd_bitblt_bmp_t vt_fb_bitblt_bitmap; +vd_bitblt_argb_t vt_fb_bitblt_argb; vd_drawrect_t vt_fb_drawrect; vd_setpixel_t vt_fb_setpixel; vd_postswitch_t vt_fb_postswitch; diff --git a/sys/dev/vt/hw/ofwfb/ofwfb.c b/sys/dev/vt/hw/ofwfb/ofwfb.c index 0dc0c39f92cb..aca6b6faeae1 100644 --- a/sys/dev/vt/hw/ofwfb/ofwfb.c +++ b/sys/dev/vt/hw/ofwfb/ofwfb.c @@ -67,6 +67,7 @@ static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; static vd_bitblt_text_t ofwfb_bitblt_text; static vd_bitblt_bmp_t ofwfb_bitblt_bitmap; +static vd_bitblt_argb_t ofwfb_bitblt_argb; static const struct vt_driver vt_ofwfb_driver = { .vd_name = "ofwfb", @@ -75,6 +76,7 @@ static const struct vt_driver vt_ofwfb_driver = { .vd_blank = vt_fb_blank, .vd_bitblt_text = ofwfb_bitblt_text, .vd_bitblt_bmp = ofwfb_bitblt_bitmap, + .vd_bitblt_argb = ofwfb_bitblt_argb, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, @@ -243,6 +245,16 @@ ofwfb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, } } +static int +ofwfb_bitblt_argb(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *argb, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y) +{ + + return (EOPNOTSUPP); +} + void ofwfb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, const term_rect_t *area) diff --git a/sys/dev/vt/hw/simplefb/simplefb.c b/sys/dev/vt/hw/simplefb/simplefb.c index c5f17e1b3d16..2f8fd6036ae3 100644 --- a/sys/dev/vt/hw/simplefb/simplefb.c +++ b/sys/dev/vt/hw/simplefb/simplefb.c @@ -50,6 +50,7 @@ static vd_init_t vt_simplefb_init; static vd_fini_t vt_simplefb_fini; static vd_probe_t vt_simplefb_probe; +static vd_bitblt_argb_t vt_simplefb_bitblt_argb; static struct vt_driver vt_simplefb_driver = { .vd_name = "simplefb", @@ -60,6 +61,7 @@ static struct vt_driver vt_simplefb_driver = { .vd_bitblt_text = vt_fb_bitblt_text, .vd_invalidate_text = vt_fb_invalidate_text, .vd_bitblt_bmp = vt_fb_bitblt_bitmap, + .vd_bitblt_argb = vt_simplefb_bitblt_argb, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_fb_ioctl = vt_fb_ioctl, @@ -222,3 +224,13 @@ vt_simplefb_fini(struct vt_device *vd, void *softc) vt_fb_fini(vd, softc); pmap_unmapdev((void *)sc->fb_vbase, sc->fb_size); } + +static int +vt_simplefb_bitblt_argb(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *argb, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y) +{ + + return (EOPNOTSUPP); +} diff --git a/sys/dev/vt/hw/vbefb/vbefb.c b/sys/dev/vt/hw/vbefb/vbefb.c index f7dce1be0832..4e65657639b4 100644 --- a/sys/dev/vt/hw/vbefb/vbefb.c +++ b/sys/dev/vt/hw/vbefb/vbefb.c @@ -59,6 +59,7 @@ static struct vt_driver vt_vbefb_driver = { .vd_bitblt_text = vt_fb_bitblt_text, .vd_invalidate_text = vt_fb_invalidate_text, .vd_bitblt_bmp = vt_fb_bitblt_bitmap, + .vd_bitblt_argb = vt_fb_bitblt_argb, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_fb_ioctl = vt_fb_ioctl, diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c index fdfbaebc0e79..51880ebb62e2 100644 --- a/sys/dev/vt/hw/vga/vt_vga.c +++ b/sys/dev/vt/hw/vga/vt_vga.c @@ -97,6 +97,7 @@ static vd_blank_t vga_blank; static vd_bitblt_text_t vga_bitblt_text; static vd_invalidate_text_t vga_invalidate_text; static vd_bitblt_bmp_t vga_bitblt_bitmap; +static vd_bitblt_argb_t vga_bitblt_argb; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; static vd_postswitch_t vga_postswitch; @@ -109,6 +110,7 @@ static const struct vt_driver vt_vga_driver = { .vd_bitblt_text = vga_bitblt_text, .vd_invalidate_text = vga_invalidate_text, .vd_bitblt_bmp = vga_bitblt_bitmap, + .vd_bitblt_argb = vga_bitblt_argb, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, .vd_postswitch = vga_postswitch, @@ -999,6 +1001,16 @@ vga_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, } } +static int +vga_bitblt_argb(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *argb, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y) +{ + + return (EOPNOTSUPP); +} + static void vga_initialize_graphics(struct vt_device *vd) { diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h index 56a28c0420c7..8e35a81bc101 100644 --- a/sys/dev/vt/vt.h +++ b/sys/dev/vt/vt.h @@ -345,6 +345,10 @@ typedef void vd_bitblt_bmp_t(struct vt_device *vd, const struct vt_window *vw, const uint8_t *pattern, const uint8_t *mask, unsigned int width, unsigned int height, unsigned int x, unsigned int y, term_color_t fg, term_color_t bg); +typedef int vd_bitblt_argb_t(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *argb, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, vm_memattr_t *); @@ -368,6 +372,7 @@ struct vt_driver { vd_bitblt_text_t *vd_bitblt_text; vd_invalidate_text_t *vd_invalidate_text; vd_bitblt_bmp_t *vd_bitblt_bmp; + vd_bitblt_argb_t *vd_bitblt_argb; /* Framebuffer ioctls, if present. */ vd_fb_ioctl_t *vd_fb_ioctl; From nobody Mon Jul 29 16:38:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkZL5bZvz5RYXD; Mon, 29 Jul 2024 16:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkZL1yl1z4FbM; Mon, 29 Jul 2024 16:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j14PA3h1WO3jpmyD8QcVi00XocECzyFaoT5hBKRJUeE=; b=uOZ2Ub8sTsXFAEMuhl1n2S/Ry6QkuALLurH0PEJ1u2jTnMIAsNSTCkrUt10p+TS12HCXal WkrJHkhfRTCZTq87BaMl5sn7cYtFDs4s4pmGqDM5JeIFE9aIH4TBrdcXLgZqT3mxgJonZV eS5zCG6D2Bvkl6pDECflFv1cJwhl58gXNTYPircrV5ylT4aVZb+HhwADJzMGKX+M1aOcuY BJkxKYvO/YKfHRBI0TbWpjsYoHesdMGXO1eFX/9lR3m/knvIKxuC43KVPbtFMcbAAg4ddy Hc7Ba4qbXLgznulqRsRdu81SLdRFp+Wna+Awke0ZWtz7QIgOsu9UY9ZGB8eQ9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722271114; a=rsa-sha256; cv=none; b=Wm8rBOY0UJ4ZaOlcLj5SwvqIfmTxWb8wFiIo+KB4YY/ny0QSiq72e171PFB12xMX73uqwT wtSQDxvpASy5rRgav1cVyVEFGqZqf2KB42GNrSTl7LxBDXR39sKQtuFVDshR3C/zuKpFpC T9IB3JbY3nrzxzptl3aCvckST0rKADL3faBe6RKvL0Tg3GK52olTD1FC8Co1XO+Qv2fZQw BOVcHQh17pe+rZllMfvYE/W00dcz6GiUnbWpYpk7ti7LScy8PpPpbOHH5ganSfyIDcIp/6 fCOoBUHvbSMBEDiAXsPipYqv74dstEAmGyjThNVvVb+6SXzTYuCG9jss6ci4Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j14PA3h1WO3jpmyD8QcVi00XocECzyFaoT5hBKRJUeE=; b=jPkfYaF3EVphV9Z3F7IwTQDrzB1bcQ1pLSSYFbx6rrVU12wVXXOBq7rAf85lW+nydzUDzM ydZbhHjZeiD9l57Q0kfeXcrMuucRBApicBcx5LfqyPXpVyZkAsn4/tp8x1GFubkt6AKAd9 YReuSdPyfvnOXUFG1IccVgvksPlj+qyt1/u6mHDILuTFCE27Kv7GlGyGlKB/JARxbYG9Pq IWDxlovGTAyvdBsrzkq0uboFm61YEppYk1EEhcc3WcmScIN4EtAzMdttIT/ufFM2taUJIM pMI2391eJzV0cUNLUOoGxEhd7Ez31+XQwrjv3SYyfN6lXYn9YyY7oC764cGtTA== 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 4WXkZL1JfKzj2w; Mon, 29 Jul 2024 16:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGcYwu005023; Mon, 29 Jul 2024 16:38:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGcYDU005020; Mon, 29 Jul 2024 16:38:34 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:38:34 GMT Message-Id: <202407291638.46TGcYDU005020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 014edaa360ce - stable/14 - linker: Add MODINFOMD_SPLASH type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 014edaa360ce7c4f28371e167b2ec33a9f2773b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=014edaa360ce7c4f28371e167b2ec33a9f2773b2 commit 014edaa360ce7c4f28371e167b2ec33a9f2773b2 Author: Emmanuel Vadot AuthorDate: 2024-07-09 12:37:08 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-29 16:37:42 +0000 linker: Add MODINFOMD_SPLASH type This mod type and structure holds the splash screen data and metadata. Differential Revision: https://reviews.freebsd.org/D45930 Reviewed by: tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 966e53a4e563da36d62edf57c2b0007921fec8dd) splash: Add sys/types.h To fix make test-includes Fixes: 966e53a4e563 ("linker: Add MODINFOMD_SPLASH type") Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit e4fc2fd62a5e4afebfc466868eb3b17f9ba0ad57) --- sys/kern/subr_module.c | 9 +++++++++ sys/sys/linker.h | 1 + sys/sys/splash.h | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/sys/kern/subr_module.c b/sys/kern/subr_module.c index 5ab41809aa89..66bf3334b771 100644 --- a/sys/kern/subr_module.c +++ b/sys/kern/subr_module.c @@ -294,6 +294,7 @@ preload_bootstrap_relocate(vm_offset_t offset) switch (hdr[0]) { case MODINFO_ADDR: case MODINFO_METADATA|MODINFOMD_FONT: + case MODINFO_METADATA|MODINFOMD_SPLASH: case MODINFO_METADATA|MODINFOMD_SSYM: case MODINFO_METADATA|MODINFOMD_ESYM: ptr = (vm_offset_t *)(curp + (sizeof(uint32_t) * 2)); @@ -424,6 +425,11 @@ preload_modinfo_type(struct sbuf *sbp, int type) case MODINFOMD_FONT: sbuf_cat(sbp, "MODINFOMD_FONT"); break; +#endif +#ifdef MODINFOMD_SPLASH + case MODINFOMD_SPLASH: + sbuf_cat(sbp, "MODINFOMD_SPLASH"); + break; #endif default: sbuf_cat(sbp, "unrecognized metadata type"); @@ -476,6 +482,9 @@ preload_modinfo_value(struct sbuf *sbp, uint32_t *bptr, int type, int len) #endif #ifdef MODINFOMD_FONT case MODINFO_METADATA | MODINFOMD_FONT: +#endif +#ifdef MODINFOMD_SPLASH + case MODINFO_METADATA | MODINFOMD_SPLASH: #endif sbuf_print_vmoffset(sbp, *(vm_offset_t *)bptr); break; diff --git a/sys/sys/linker.h b/sys/sys/linker.h index 461a32d5529b..be127e6ded48 100644 --- a/sys/sys/linker.h +++ b/sys/sys/linker.h @@ -242,6 +242,7 @@ void linker_kldload_unbusy(int flags); #define MODINFOMD_FW_HANDLE 0x000c /* Firmware dependent handle */ #define MODINFOMD_KEYBUF 0x000d /* Crypto key intake buffer */ #define MODINFOMD_FONT 0x000e /* Console font */ +#define MODINFOMD_SPLASH 0x000f /* Console splash screen */ #define MODINFOMD_NOCOPY 0x8000 /* don't copy this metadata to the kernel */ #define MODINFOMD_DEPLIST (0x4001 | MODINFOMD_NOCOPY) /* depends on */ diff --git a/sys/sys/splash.h b/sys/sys/splash.h new file mode 100644 index 000000000000..0bbc5a2bd574 --- /dev/null +++ b/sys/sys/splash.h @@ -0,0 +1,19 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Beckhoff Automation GmbH & Co. KG + * + */ + +#ifndef _SYS_SPLASH_H_ +#define _SYS_SPLASH_H_ + +#include + +struct splash_info { + uint32_t si_width; + uint32_t si_height; + uint32_t si_depth; +}; + +#endif /* _SYS_SPLASH_H_ */ From nobody Mon Jul 29 16:38:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkZM4M2Zz5RYv7; Mon, 29 Jul 2024 16:38: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkZM2czmz4FLN; Mon, 29 Jul 2024 16:38:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=224s56vQiJu0JlOQ8amzkK8d76s+6TXlm9ZdoYRHCk0=; b=H6rekOrpafAFLF2yFQ7k6SVhO+Ap5OqbqlRxQsbtuhy/9CZ4oHpTUJ/XE/zlpQ5Wdk0NrF yI2s1NIXx7tf+zH8pVeHSwJuz3uAwPLmyGKN2GOUuhDQcdycDI6aVtOzZwBaUMzN1vBkUT Nl2kdHNBTB6J//ptVU3JAibGczo/uKImKRGgNPzgl1zFzoQCTYD0n+6QokUBi4WMDHasU2 OHh36tKrJgsW9HTBDoLy+vjgcun2EO7xihCyUArRMEV8zJzXuIh6MrLHsydHVWLzOhhh3X zWUKPZicu3aSU2z405LWDVwv7On1fzJXG64WIrOT0sL/swqeVNsZtGLilbDPUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722271115; a=rsa-sha256; cv=none; b=MI2xAdtsDVMK+FKQgpKkiZeFksrBQsMK4iqYdlnt86Bt7SC2E0IC3JcBskLFlhMuJ+LkKy R/7uBCSOcbpt2iMefXEfQPrNtzlV7R7HgHaZibrrBHST0GxocwKe1cwVXAJsBb/BVXLNgl 8i7LgmbJ3Nbsob6cZP2TuDPPmsyuk3s0zc0hrXFIGFzUJdipssSBM+/STMUc1R/JEvJEvg aeZWeYMZS52x5DySL5Vl7OfhUN8k06Uz5VkagZd/YQy1BRLLjQ77791z9hEVxCpBk5fDpi JUg8WNWZ6hzYEmOAVnpaoucKdqnq5t9JH/UorC52D67DGL4G0Z52OsVWGpjPTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=224s56vQiJu0JlOQ8amzkK8d76s+6TXlm9ZdoYRHCk0=; b=ZZSa37Ny+yPW1/gCleZy9kE7u7ta9ZnmtlLf528OmYFiRY6d7M2RTnm7gmO+Heeul1knGA VyWcFuk0Zp5XcR15ZFfE734EeC8fIpicS4tQjv9qu26lsBuvHqPswhxp5h5V97tWTJ0chc xskBP98KcEKH1t7YsUc6flSzkY2fsZAcYphoG0qWhDRtZu9utYH8Opit/uZruyVXIjtgrw v/cmkpQb+SaF1AAdItyE1sqXkv0O60kEcB5lD2c7fCEDM/vkln7bYBvQ+dvKz7jqGSPxqx llDHugdlccFrSKj8AZeO3YWtcOQ22U8wAKxTGHqJi56oozSz9X48wqYaGAk8SQ== 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 4WXkZM21zWzhjG; Mon, 29 Jul 2024 16:38:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGcZDF005074; Mon, 29 Jul 2024 16:38:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGcZjn005071; Mon, 29 Jul 2024 16:38:35 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:38:35 GMT Message-Id: <202407291638.46TGcZjn005071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 82829e49e627 - stable/14 - vt: splash: Use splash screen passed from loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 82829e49e627c17041c7c0dddde58f1f3481e982 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=82829e49e627c17041c7c0dddde58f1f3481e982 commit 82829e49e627c17041c7c0dddde58f1f3481e982 Author: Emmanuel Vadot AuthorDate: 2024-07-09 12:38:41 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-29 16:37:44 +0000 vt: splash: Use splash screen passed from loader If loader(8) gives use a splash screen to use using the MODINFOMD_SPLASH type, use it if RB_MUTE is set to "YES". By design only argb data will be displayed. Differential Revision: https://reviews.freebsd.org/D45931 Reviewed by: imp, tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit f6e8b0e85081681100bf9cd74423be02233204bc) --- sys/dev/vt/vt_core.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 797af56e5e1d..e27f74b03a0f 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -1658,18 +1659,33 @@ vtterm_done(struct terminal *tm) static void vtterm_splash(struct vt_device *vd) { + caddr_t kmdp; + struct splash_info *si; + uintptr_t image; vt_axis_t top, left; - /* Display a nice boot splash. */ + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + si = MD_FETCH(kmdp, MODINFOMD_SPLASH, struct splash_info *); if (!(vd->vd_flags & VDF_TEXTMODE) && (boothowto & RB_MUTE)) { - top = (vd->vd_height - vt_logo_height) / 2; - left = (vd->vd_width - vt_logo_width) / 2; - switch (vt_logo_depth) { - case 1: - /* XXX: Unhardcode colors! */ + if (si == NULL) { + top = (vd->vd_height - vt_logo_height) / 2; + left = (vd->vd_width - vt_logo_width) / 2; vd->vd_driver->vd_bitblt_bmp(vd, vd->vd_curwindow, vt_logo_image, NULL, vt_logo_width, vt_logo_height, left, top, TC_WHITE, TC_BLACK); + } else { + if (si->si_depth != 4) + return; + printf("SPLASH: width: %d height: %d depth: %d\n", si->si_width, si->si_height, si->si_depth); + image = (uintptr_t)si + sizeof(struct splash_info); + image = roundup2(image, 8); + top = (vd->vd_height - si->si_height) / 2; + left = (vd->vd_width - si->si_width) / 2; + vd->vd_driver->vd_bitblt_argb(vd, vd->vd_curwindow, + (unsigned char *)image, si->si_width, si->si_height, + left, top); } vd->vd_flags |= VDF_SPLASH; } From nobody Mon Jul 29 16:38:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkZN52KBz5RYmY; Mon, 29 Jul 2024 16:38: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkZN3FJhz4FRD; Mon, 29 Jul 2024 16:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLDatU2oljNUWkm4/Ob4upCQXG3jF05NqE4HtJ/1i9g=; b=GQEi1iPb11TeZU02U/130MAPzd41g/32/TCdvbv2aBgWO/JQyEh5aVGkx7BUHuQNy47tLH Bg63RU4IBdkWbAUEb48FeBSkMad4jZmqIG/PDwYRlDoDXKEsWYEI0XZrcYg8PbbSlecTk/ 1/RQ1/Sy+X67ULzEdUqNxuqeelrCW37+1Df2TeAarYN84hWFEgNx6HSrb6i5x41GcpKMq9 GjsZbTwyae/vU1VtavBJPOt73guzJY9QHdsA9VXPDaK8+kRTSZB2FA01qKu3OvF2AJfqq8 xT09v9ZdMTPMI/mMiTqOgVLHNvrtv1giMz3R3u71EQpV8Om7+YfAblDF3/mA2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722271116; a=rsa-sha256; cv=none; b=mKl4S+G+pZ5+W1nThKB+2A6V4zwdMUy00c9XWyllxT3QKScM5aSjxTV2eUzpagSme6ksDw iXmq73CUZGcNWFzRnqtDL8BemSqybxQeAWZhsM6QzcF1Z4BR+KpX53+s3GzRD/tbAo0b5s jipVqghJ1T5B5Zlw30ry8hIXl/CnH6EY+Ox4coSJ/JDnmxwRyhEyUseHIyEaNCrJPuO4Zu PPuuF+7b3sphHVnfsb2QAffl1+JJWXFnsrIvWui2g2HqbBc69faWPUQ2ZmoeD/68DydFMg gzvEnodwSzJLusr6ZxweIcnKFWkHKGRkFMf3DWMXX22XLIf9IBK7IwBQo6KiWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLDatU2oljNUWkm4/Ob4upCQXG3jF05NqE4HtJ/1i9g=; b=gR5yXQ18jlj69Ux17XSIsm6mhUDP6rb/b1CXre9PRuytGfkgZ/SBCH+D2xPOaeVEQ6p/Rv WruJivQhcUc/SjIFikVIZAeA0mGnvq9zzF9pYcGymDXJeYLyQFfqe4Bk3SRYKmtToV0RpH q3L+/6f8w/jw4+KxFKRXJm4Mk/tPAdl+r34gvia+4LNZzQqDTrlt32vgAPw0C2tuk8OY8q F/ZXTD82Qegr6aoB+ICKsiFnStTYt3MnfLeIWrB8A50w9Ci0ER7XFCH0UY68J+pQjXGVrq JHw5JPPxNdo0KtwN2OblzTL4D6T/lk34sFoLWcQ8OsLKiPEyBL5zcm1RxKZUnw== 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 4WXkZN2sj3zj2x; Mon, 29 Jul 2024 16:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGcaXL005141; Mon, 29 Jul 2024 16:38:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGcaMM005138; Mon, 29 Jul 2024 16:38:36 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:38:36 GMT Message-Id: <202407291638.46TGcaMM005138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 619caaa1b552 - stable/14 - loader: Load a splash screen if "splash" variable is defined List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 619caaa1b5524772ea5e93dec0f558a243503acc Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=619caaa1b5524772ea5e93dec0f558a243503acc commit 619caaa1b5524772ea5e93dec0f558a243503acc Author: Emmanuel Vadot AuthorDate: 2024-07-09 12:41:11 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-29 16:37:44 +0000 loader: Load a splash screen if "splash" variable is defined Load a splash screen that vt(4) can use if the "splash" env variable is defined. For now only png is supported and decoding is done in loader and not in kernel compared to splash screen support in sc(4). For using this add: boot_mute="YES" splash="/boot/images/freebsd-logo-rev.png" in loader.conf Differential Revision: https://reviews.freebsd.org/D45932 Reviewed by: imp, tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 00460cc8c5ad02b628e81eec9e493a1df8393d36) --- stand/common/bootstrap.h | 1 + stand/common/gfx_fb.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ stand/efi/loader/bootinfo.c | 5 +++++ 3 files changed, 54 insertions(+) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index b7d6e538f9be..2dcc6eda47ba 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -281,6 +281,7 @@ int tslog_init(void); int tslog_publish(void); vm_offset_t build_font_module(vm_offset_t); +vm_offset_t build_splash_module(vm_offset_t); /* MI module loaders */ #ifdef __elfN diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 0a88a166089b..9942c629d124 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -87,6 +87,7 @@ #include #include #include +#include #include #include #include @@ -3007,3 +3008,50 @@ build_font_module(vm_offset_t addr) file_addmetadata(fp, MODINFOMD_FONT, sizeof(fontp), &fontp); return (addr); } + +vm_offset_t +build_splash_module(vm_offset_t addr) +{ + struct preloaded_file *fp; + struct splash_info si; + const char *splash; + png_t png; + uint64_t splashp; + int error; + + /* We can't load first */ + if ((file_findfile(NULL, NULL)) == NULL) { + printf("Can not load splash module: %s\n", + "the kernel is not loaded"); + return (addr); + } + + fp = file_findfile(NULL, "elf kernel"); + if (fp == NULL) + fp = file_findfile(NULL, "elf64 kernel"); + if (fp == NULL) + panic("can't find kernel file"); + + splash = getenv("splash"); + if (splash == NULL) + return (addr); + + /* Parse png */ + if ((error = png_open(&png, splash)) != PNG_NO_ERROR) { + return (addr); + } + + si.si_width = png.width; + si.si_height = png.height; + si.si_depth = png.bpp; + splashp = addr; + addr += archsw.arch_copyin(&si, addr, sizeof (struct splash_info)); + addr = roundup2(addr, 8); + + /* Copy the bitmap. */ + addr += archsw.arch_copyin(png.image, addr, png.png_datalen); + + printf("Loading splash ok\n"); + file_addmetadata(fp, MODINFOMD_SPLASH, sizeof(splashp), &splashp); + return (addr); +} diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index b55c2184d9fe..0a53422142e2 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -390,6 +390,11 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) /* Pad to a page boundary. */ addr = roundup(addr, PAGE_SIZE); + + addr = build_splash_module(addr); + + /* Pad to a page boundary. */ + addr = roundup(addr, PAGE_SIZE); #endif /* Copy our environment. */ From nobody Mon Jul 29 16:38:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkZQ25J4z5RYmb; Mon, 29 Jul 2024 16:38:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkZP4mQwz4FPC; Mon, 29 Jul 2024 16:38:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6VOta1yX7aTxiuk65UqlgokYneCHe9KQvIfOdxcoAD0=; b=Pa1IX+sQrCCnsgcQHkuVpY1XBNpc7JqeUqM+2RJV2rULf1vWbOPa2zzMc2JwLs56c4HGwD tl60YnzIcztJrC/xD1qFDpHU//vzi96b8JXmT3ZBQmWB1QG+fiingbTFD4WtMBUpwyMEWX HKCKBgB/iAhSEQEXq61Vl3Dh3y/VOcg+yhUptw4S605RCz544TLtVbXhXSRNm2kJkggoit fQ3E2Euyow3p7QlIbKRYXFhTJb2V0RrSGM+R1yQ+MLp5UqYoDmcvVEZVTfDpJ2lg+dvipQ hBjgqYw5iJVOQV9scicfi7sbQ8VHBOKOVe9fNH9qplv40WRvYlr1OV1jOUUqzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722271117; a=rsa-sha256; cv=none; b=m6LamoKV8KMOjFAX8U7swECFV3TzZ1Prn9GKzg4ZoLYIl/AYg+cSTZVB61zeTpze8YjFsE hZMHTPfMj4vu41bpB1/qkuUS27HJF+iIGD6ZiaokRsCE1tMMfSzvGrJVHtCsOTIOZuUW6y RpvDHEmVfB6KdwcFBlYpg8M/o9jvAiPS5KPSx4bR52Lc4UkYxo4fKU3hWf0En89oMcBrHW pzoQWInVE/KtXdr8Jb9xxlWZPVfbSf3jPozSjpsKUf7fWlf3zMiEL3dq/Zv9OYVaXO0rdE uFJGR5oRWMknUzB1rXH/sMAxz9DYkSjGShTiK8tY4VDxSqwQ5YfVsF52DJL/vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722271117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6VOta1yX7aTxiuk65UqlgokYneCHe9KQvIfOdxcoAD0=; b=xYIDsSSTSVecKQXdkLHsT+lDux+D3S2tKtL5+s4bTKxYsnQrx1dBEXUuL7fojxMzpQIZbv ibJ/LJ/1qstuYnJ0NRargN0i5vdOht4e2gZcPQchfl384I22kOK9Ets1S59LouQTTyiDMw 7mbeeXESaXND/rQvQqvXkOx0pC2v+CvNRqtN3fP3A5SRLyy6ljgjJk1IxOdsxRqZ6O1QaQ zVIFNWj8y2DTMdp6TCA9/GsnagG+V8j0JmNudf4O2qxbwVKzwM1pqZokcPUL4NfuprlISE DLK3f1LZUrxCSsb0A756FqTZ4G4cykYQVxkeweNYOtYGr4QuoD+fF5ma++H0Ng== 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 4WXkZP4BsRzj2y; Mon, 29 Jul 2024 16:38:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TGcbXo005196; Mon, 29 Jul 2024 16:38:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TGcb4c005193; Mon, 29 Jul 2024 16:38:37 GMT (envelope-from git) Date: Mon, 29 Jul 2024 16:38:37 GMT Message-Id: <202407291638.46TGcb4c005193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: b0d27132b2dc - stable/14 - splash(4): Document how to use splash screen with vt(4) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b0d27132b2dcdff4695303e0a534af8a7ed9f265 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=b0d27132b2dcdff4695303e0a534af8a7ed9f265 commit b0d27132b2dcdff4695303e0a534af8a7ed9f265 Author: Emmanuel Vadot AuthorDate: 2024-07-09 14:43:36 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-29 16:37:44 +0000 splash(4): Document how to use splash screen with vt(4) Differential Revision: https://reviews.freebsd.org/D45935 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 7504e0e3e517fe9f0c775b802f0eb30481b4c01d) --- share/man/man4/splash.4 | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index b6d93287286c..736703317a7f 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -24,7 +24,7 @@ .\" (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 December 31, 2015 +.Dd July 09, 2024 .Dt SPLASH 4 .Os .Sh NAME @@ -203,7 +203,9 @@ have the following line in the kernel configuration file. .Pp .Dl device splash .Pp -Next, edit +Next for +.Xr syscons 4 +, edit .Pa /boot/loader.conf (see .Xr loader.conf 5 ) @@ -240,6 +242,17 @@ splash_txt_load="YES" bitmap_load="YES" bitmap_name="/boot/splash.bin" .Ed +.Pp +For +.Xr vt 4 +, edit +.Pa /boot/loader.conf +(see +.Xr loader.conf 5 ) +and include the following lines: +.Bd -literal -offset indent +splash="/boot/images/freebsd-logo-rev.png" +boot_mute="YES" .\".Sh DIAGNOSTICS .Sh SEE ALSO .Xr vidcontrol 1 , @@ -291,7 +304,7 @@ and modules were written by .An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . .Sh CAVEATS -Both the splash screen and the screen saver work with +The screen saver work with .Xr syscons 4 only. .Sh BUGS From nobody Mon Jul 29 16:39:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXkZx2QlXz5RYXN; Mon, 29 Jul 2024 16:39:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXkZx0nSrz4Grh; Mon, 29 Jul 2024 16:39:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-6b796667348so27725426d6.0; Mon, 29 Jul 2024 09:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722271144; x=1722875944; 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=a6OI9DNb1u8gQryqCcUTNQ1+7pGkVHVgtoLwut1BstA=; b=Ln5C0ZVe3f1/OQ0nfJKFfNCRCi23ez8VhPbX+h14U8ij685mz7b/pMy+HzaDGWa7xz XmrtBEaJXKosynmD2/z1gaouqJw9402zAvRytWJsV7NPrUn99R5ZcwqjhCe4IInUcUfz P0dfgMS1Dsdr9s4v/8PmfB21Oe0ffZeJk9lsHMyNZEcNiZNak6dqV+fhkkfiHDlXqO1h mIYzUD6gwZP3DDauVbOJLzOfdrq5boha8P469utcnfDCOcdQyL5MDpSZBN1RuSYw5s33 j3+zJS+oZPkEtEB4D1/EiOJIBxc3k21YpkCzSNmSBnqfSTciagRfX7KC2wLpaF938YqF 3GyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722271144; x=1722875944; 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=a6OI9DNb1u8gQryqCcUTNQ1+7pGkVHVgtoLwut1BstA=; b=C3csRvuNJNl4btZnJuy/qGuI+690JBv+V97ZrEOIxI6Q2VkNrbu+DiRrAElhhN0tr0 6knKxC7xt/esuktCy5akxL0dCAiWowlkuJNETTBGMZF7sUcFpAJlFqFwsF+kl/LsnPs5 UGiVSRzChGuIE+VXkGOEeUxgKAXEPU5RFEwMnORC04vCCRZ5lTbo7CRhRXNc2jjJPTno ETEGzntQYPLHw3c0dJRBGf8pzc/kdzToaLl/ieZr1vJVRPlXPf9y9DhZzy4tGXXohWwi J3jJ+S0fbQbJi2MCMxkPWgregpS5CMc3chBsxqOqR0QOyp3JILLmWx2DVzvVanP/JXOs RVdA== X-Forwarded-Encrypted: i=1; AJvYcCXwphTTwrIwHsNvc/EpGQZMwpGrjqAwvxR38b46iFA82P+mZlKCrxOEd8LaTR0g9apwgR8qINwWeTZDxxbBxVdsAzM8C5WX8flh3AhGJczYuDKesQ+WfrHhKMLPL5GSUKGkeQDF9Gl+oump2m0eCm4jBQ== X-Gm-Message-State: AOJu0Ywac+fd0hbkyzZ01I7aH4BNlmpC36Oe0ZAHi5NYJRjHlV5slPf7 sGZ99knpwixwBDK+tbGepRH3gGA6/954j0Ul7mLEVsjATPet0aVTCq96p7ESquw= X-Google-Smtp-Source: AGHT+IGwnRjfbyImZrH+vzWQ0ji2LeRFZ+C74a0Wvoq+FdBqJyWL88PyM2hV6leaDqD4yPFeMBiYcw== X-Received: by 2002:a05:6214:1a47:b0:6b5:e0d3:31b3 with SMTP id 6a1803df08f44-6bb562f970bmr133661546d6.9.1722271143858; Mon, 29 Jul 2024 09:39:03 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bb3f90e7b9sm54910526d6.52.2024.07.29.09.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 09:39:03 -0700 (PDT) Date: Mon, 29 Jul 2024 12:39:00 -0400 From: Mark Johnston To: Yuri Pankov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 Message-ID: References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> 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: 4WXkZx0nSrz4Grh On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote: > Mark Johnston wrote: > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=801c452795ac441523655eb3277051b7b034becf > > > > commit 801c452795ac441523655eb3277051b7b034becf > > Author: Mark Johnston > > AuthorDate: 2024-07-29 14:12:40 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-07-29 14:17:04 +0000 > > > > man9: Really complete the removal of MD5.9 > > > > Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate kernel side manual page.") > > Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual page from section 9.") > > --- > > ObsoleteFiles.inc | 2 ++ > > share/man/man9/Makefile | 2 -- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > > index b21778466800..01b4824e8692 100644 > > --- a/ObsoleteFiles.inc > > +++ b/ObsoleteFiles.inc > > @@ -56,6 +56,8 @@ OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz > > > > # 20240729: remove MD5(9) > > OLD_FILES+=usr/share/man/man9/MD5.9.gz > > +OLD_FILES+=usr/share/man/man9/MD5Init.9 > > +OLD_FILES+=usr/share/man/man9/MD5Transform.9 > > This really needs to be smarter, but you have to specify .gz suffix for > man entries as we have compression enabled by default. Sigh, who knew it was so difficult to remove a man page. Thanks, this is fixed now. > > # 20240726: deprecate contigfree(9) > > OLD_FILES+=usr/share/man/man9/contigfree.9.gz > > diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile > > index 593bbd068790..60f994edfd9f 100644 > > --- a/share/man/man9/Makefile > > +++ b/share/man/man9/Makefile > > @@ -1544,8 +1544,6 @@ MLINKS+=\ > > mbuf_tags.9 m_tag_next.9 \ > > mbuf_tags.9 m_tag_prepend.9 \ > > mbuf_tags.9 m_tag_unlink.9 > > -MLINKS+=MD5.9 MD5Init.9 \ > > - MD5.9 MD5Transform.9 > > MLINKS+=mdchain.9 md_append_record.9 \ > > mdchain.9 md_done.9 \ > > mdchain.9 md_get_int64.9 \ > > > From nobody Mon Jul 29 17:17:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXlRQ1ngVz5RckL; Mon, 29 Jul 2024 17:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXlRQ1HFGz4KGb; Mon, 29 Jul 2024 17:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722273458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdPdzlGGQ8S025xqei7wY0OYHYp0putdeMlnTQNu8LE=; b=DFXpO41niNuLPH3DzwP/FAf2yMgSvjW2a4EENDmQrsFEZ7Rr7pn2W2oSN7vVKLsZlX+TJO 7j+istm4Xtnzm6+w87Azp5PumNpIyiDHDxcl3RFB8MnzKaC+y0RBMwa+JbAHx6e3jChhJe jFniJSqoqdPtbXTLMmm2bmdaiW3Lkl9zH1gkb8ijUtcVY46pAwRtwCBSITSqk5Usf1kb/k b8s6d1Vgx0cgPit0V8/Ei93Oki5uCjzjDeYKYwogUS9gnXO390G4IAamMzSGL64VJsbZox gyH7af2hIEK2jQWm/N5GQboufKtEi8fHhoqIY8lIjYo55ZH1J7o98CSTSI8akQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722273458; a=rsa-sha256; cv=none; b=OJnk9qgwlNLElBjFK5aPbJaAwwqVjzYLNrzufGIEauL8gZBN7YzI/Acg6nEI1UYpFwQil8 kpqo3Fe23DAt813LrIUkuSZB0mAiiIKps6oS2NLE6gQpGRV/ar72qREE8/CMMQDOQs+mdK qx6MfBZS0+/lQ1V1K2dkE/YNRwdhHjfSLdsmCEnLnecnXqhZjZoqwdN43vnNAcnQDd/30L gYyHf8NmlHcKrqjbPSiRE/ehToHglGCa593Z3qPsu3aYTiB3AS+lJ5Ig+3jJVo4EeRTSTY pN/NclNJUTWmrsk0gD48BCSzwz29q/55obxCVZ7clp39t82qK1TxSFjQ7RhciQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722273458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdPdzlGGQ8S025xqei7wY0OYHYp0putdeMlnTQNu8LE=; b=kNiQT0GxaT+rlr8pTVpOyWBCQZhot0UuNltVHhy7LibOpqVyVZoUdIeoI0XNbjOBn30qPs wyMpHL5Iqlx8DkHfdpt+2o6XU3QW61V7wzJglmbgNHiCOQNqpk8kpDP0wjMNJ/FOM3BRnZ 20ppZQzkeUQS5AoZfKR8TWMum+ZDLvLystvEs0FTgI2FqFxNbuU7HUapqO9Obf8AZLAdxf jIUbkrXh3bSk69yUqBRisnk0CDYPGzKoOod37+vw3q2vVd/NCV6nDtm9awwJAvFyePDY9+ ZNC+N7+EQVX9W1ls4HG7Pu56dvGm1is0umAei3HSCbTLWGf+dsf4QRaQ9KCTEQ== 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 4WXlRQ0Zfjzk24; Mon, 29 Jul 2024 17:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46THHbF0073223; Mon, 29 Jul 2024 17:17:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46THHbAc073220; Mon, 29 Jul 2024 17:17:37 GMT (envelope-from git) Date: Mon, 29 Jul 2024 17:17:37 GMT Message-Id: <202407291717.46THHbAc073220@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: ba373fca78a1 - main - Do not clean (in buildworld/buildkernel) by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ba373fca78a114768244d6a8c27983da870c1169 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ba373fca78a114768244d6a8c27983da870c1169 commit ba373fca78a114768244d6a8c27983da870c1169 Author: Ed Maste AuthorDate: 2024-07-29 00:00:00 +0000 Commit: Ed Maste CommitDate: 2024-07-29 17:16:52 +0000 Do not clean (in buildworld/buildkernel) by default As discussed on the freebsd-arch mailing list[1]. For historical reasons FreeBSD's buildworld and buildkernel targets started by cleaning the object tree, for traditional (non-metamode) builds. Cleaning is not necessary when dependencies are properly tracked, and we have a somewhat kludgey script[2] to handle some known cases where deps were mishandled by traditional builds. Be consistent with the vast majority of open source build systems by default, and do not clean at the beginning of buildworld or buildkernel. Users may set WITH_CLEAN in src.conf(5) to restore the previous behaviour, or run `make cleanworld` and/or `make cleankernel` before starting a build. [1] https://lists.freebsd.org/archives/freebsd-arch/2024-July/000727.html [2] tools/build/depend-cleanup.sh Reviewed by: jhb, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46172 --- UPDATING | 10 ++++++++++ share/man/man5/src.conf.5 | 6 +++--- share/mk/src.opts.mk | 2 +- tools/build/options/WITH_CLEAN | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/UPDATING b/UPDATING index fc3abb285039..cffafdb5d247 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20240729: + The build now defaults to WITHOUT_CLEAN - i.e., no automatic clean + is performed at the beginning of buildworld or buildkernel. The + WITH_CLEAN src.conf(5) knob can be used to restore the previous + behaviour. + + If you encounter incremental build issues, please report them to the + freebsd-current mailing list so that a special-case dependency can be + added, if necessary. + 20240712: Support for armv6 has been disconnected and is being removed. diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 1d35823fc9c4..a12a2a8cb9f4 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 May 22, 2024 +.Dd July 29, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -383,8 +383,8 @@ Build clang-format. .It Va WITHOUT_CLANG_FULL Avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. -.It Va WITHOUT_CLEAN -Do not clean before building world and/or kernel. +.It Va WITH_CLEAN +Clean before building world and/or kernel. .It Va WITHOUT_CPP Do not build .Xr cpp 1 . diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 501df88cd776..d7e246d10396 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -80,7 +80,6 @@ __DEFAULT_YES_OPTIONS = \ CDDL \ CLANG \ CLANG_BOOTSTRAP \ - CLEAN \ CPP \ CROSS_COMPILER \ CRYPT \ @@ -195,6 +194,7 @@ __DEFAULT_NO_OPTIONS = \ BHYVE_SNAPSHOT \ CLANG_EXTRAS \ CLANG_FORMAT \ + CLEAN \ DIALOG \ DETECT_TZ_CHANGES \ DISK_IMAGE_TOOLS_BOOTSTRAP \ diff --git a/tools/build/options/WITH_CLEAN b/tools/build/options/WITH_CLEAN new file mode 100644 index 000000000000..d5962258bcc0 --- /dev/null +++ b/tools/build/options/WITH_CLEAN @@ -0,0 +1 @@ +Clean before building world and/or kernel. From nobody Mon Jul 29 17:40:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXlyR4Mbnz5RfcY for ; Mon, 29 Jul 2024 17:41:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXlyQ6vBFz4MG1 for ; Mon, 29 Jul 2024 17:41:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-2cb7cd6f5f2so2727724a91.2 for ; Mon, 29 Jul 2024 10:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722274861; x=1722879661; 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=pGpasTAirCDQ20/4u03T+9IZ6IyC1pkFiwF5vWHmorg=; b=pRRm6OACvHUSNijnSYwcIMxDpw4lXKhbMLvf2cbO2vwD1sc0XBtC9gjK5ShWe8C3H2 ayY/ZbsZ/34dpkaFuh6utPM9wyvI//mlVdBuj6PFiCYoy8gqXiOWd8fptukc+B0H0frD hoTbtS1G7h1RzgjhTTMpX7dQJZLQ9Fj4QNqVHkTtqBhu4fkwQy/X3yEz1yTDQmkn4YHk eArAKu+jK/O1F+Os0G6o7YBzj3PhjyuiEN31zZcZMkzOHJIO6QwKCEr/OC70BVHHQAAB 3cGxUwy6AtE+0UV4iFwp5u6UI8o00KYPcVj7y4NzFkOohugU4qpmPbU7xfguGdrYUxuM afsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722274861; x=1722879661; 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=pGpasTAirCDQ20/4u03T+9IZ6IyC1pkFiwF5vWHmorg=; b=HUbAfUEZTPjPkS3IOihZcpJiW0usdxMsAOtK7Yj0pEx78ATEe8MGnAoxrNTL3DC9Yw Tr7lXVdi07Ujd4Jfl81vhQzPK1xUQ89TPLxY2GdiyuWKNuRMIzo2q2Dg1mFv3O1hTWpu Io+mhdHlVjAIFix14b9hKc6msIokzuNBphtc4qK0h5vbbE5UIj+KCcP4UzywKFGOnzY/ ZZKS9QVDnfD31tdbTQSVHDbDGQNDV/d2e5V4UNIU77glH9hJzQBki8lYuAEX0SyGDxYG MB8SRHsI8ZKbznjMsMAuP+gjnNGXgWLVVUiHHIu5fbay69UQZ3V5qmrYo/07hEvSCMcq kzNw== X-Forwarded-Encrypted: i=1; AJvYcCXN4t8NeEnYdgkOLNs/QGHaX+nN+3agDEZODZ3tfB5EWLWevbeOvHLDBmjEyzVy1pStiVyb2WMhHYOfTNs3zIYmgCQHZm4Qdk8+fv2gytzw X-Gm-Message-State: AOJu0YzIWTndhn1IPUS8ucnqF0kZRA0DxmOgKqoEHcKZRWGKvxvxwXuG qX1op8qOuhJ/j9A+MgeHIaacLpBw8aq7zXL1lqjA1Pl67+ykIJeaQbHnyOZQ08QXft7hyzVh3iT JXCmXaGZKDCKQr89OinptKRq+nHp3sOj6PL0V+A== X-Google-Smtp-Source: AGHT+IF/bn32TuSiyiCdkb7peCoMpubLb0S3rvh8CUkmNv0d4YquKdJTYyTsR8WumJAjvSOz1xTIexdwBPIOmd3f70g= X-Received: by 2002:a17:90b:8c1:b0:2cd:40ef:4764 with SMTP id 98e67ed59e1d1-2cf7e1e1d5emr9864277a91.17.1722274860829; Mon, 29 Jul 2024 10:41:00 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> In-Reply-To: From: Warner Losh Date: Mon, 29 Jul 2024 11:40:49 -0600 Message-ID: Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 To: Mark Johnston Cc: Yuri Pankov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000492a89061e665daf" 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: 4WXlyQ6vBFz4MG1 --000000000000492a89061e665daf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 29, 2024 at 10:39=E2=80=AFAM Mark Johnston = wrote: > On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote: > > Mark Johnston wrote: > > > The branch main has been updated by markj: > > > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D801c452795ac441523655eb3277051b= 7b034becf > > > > > > commit 801c452795ac441523655eb3277051b7b034becf > > > Author: Mark Johnston > > > AuthorDate: 2024-07-29 14:12:40 +0000 > > > Commit: Mark Johnston > > > CommitDate: 2024-07-29 14:17:04 +0000 > > > > > > man9: Really complete the removal of MD5.9 > > > > > > Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate > kernel side manual page.") > > > Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual pag= e > from section 9.") > > > --- > > > ObsoleteFiles.inc | 2 ++ > > > share/man/man9/Makefile | 2 -- > > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > > > index b21778466800..01b4824e8692 100644 > > > --- a/ObsoleteFiles.inc > > > +++ b/ObsoleteFiles.inc > > > @@ -56,6 +56,8 @@ OLD_FILES+=3Dusr/share/man/man9/ifaddr_byindex.9.gz > > > > > > # 20240729: remove MD5(9) > > > OLD_FILES+=3Dusr/share/man/man9/MD5.9.gz > > > +OLD_FILES+=3Dusr/share/man/man9/MD5Init.9 > > > +OLD_FILES+=3Dusr/share/man/man9/MD5Transform.9 > > > > This really needs to be smarter, but you have to specify .gz suffix for > > man entries as we have compression enabled by default. > > Sigh, who knew it was so difficult to remove a man page. > There is a pull request being worked on that will be smarter about what's removed since we have compress (UFS) and uncompress (ZFS) setups now. Warner > Thanks, this is fixed now. > > > > # 20240726: deprecate contigfree(9) > > > OLD_FILES+=3Dusr/share/man/man9/contigfree.9.gz > > > diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile > > > index 593bbd068790..60f994edfd9f 100644 > > > --- a/share/man/man9/Makefile > > > +++ b/share/man/man9/Makefile > > > @@ -1544,8 +1544,6 @@ MLINKS+=3D\ > > > mbuf_tags.9 m_tag_next.9 \ > > > mbuf_tags.9 m_tag_prepend.9 \ > > > mbuf_tags.9 m_tag_unlink.9 > > > -MLINKS+=3DMD5.9 MD5Init.9 \ > > > - MD5.9 MD5Transform.9 > > > MLINKS+=3Dmdchain.9 md_append_record.9 \ > > > mdchain.9 md_done.9 \ > > > mdchain.9 md_get_int64.9 \ > > > > > > --000000000000492a89061e665daf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jul 29, 2024 at 10:39=E2=80= =AFAM Mark Johnston <markj@freebsd.= org> wrote:
On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote:
> Mark Johnston wrote:
> > The branch main has been updated by markj:
> >
> > URL: htt= ps://cgit.FreeBSD.org/src/commit/?id=3D801c452795ac441523655eb3277051b7b034= becf
> >
> > commit 801c452795ac441523655eb3277051b7b034becf
> > Author:=C2=A0 =C2=A0 =C2=A0Mark Johnston <markj@FreeBSD.org>= ;
> > AuthorDate: 2024-07-29 14:12:40 +0000
> > Commit:=C2=A0 =C2=A0 =C2=A0Mark Johnston <markj@FreeBSD.org>= ;
> > CommitDate: 2024-07-29 14:17:04 +0000
> >
> >=C2=A0 =C2=A0 =C2=A0man9: Really complete the removal of MD5.9
> >=C2=A0 =C2=A0 =C2=A0
> >=C2=A0 =C2=A0 =C2=A0Fixes:=C2=A0 46b0db2dbe9f ("Remove unnece= ssary and now inaccurate kernel side manual page.")
> >=C2=A0 =C2=A0 =C2=A0Fixes:=C2=A0 36d68cb2ddd2 ("Complete the = removal of the MD5 manual page from section 9.")
> > ---
> >=C2=A0 ObsoleteFiles.inc=C2=A0 =C2=A0 =C2=A0 =C2=A0| 2 ++
> >=C2=A0 share/man/man9/Makefile | 2 --
> >=C2=A0 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
> > index b21778466800..01b4824e8692 100644
> > --- a/ObsoleteFiles.inc
> > +++ b/ObsoleteFiles.inc
> > @@ -56,6 +56,8 @@ OLD_FILES+=3Dusr/share/man/man9/ifaddr_byindex.= 9.gz
> >=C2=A0
> >=C2=A0 # 20240729: remove MD5(9)
> >=C2=A0 OLD_FILES+=3Dusr/share/man/man9/MD5.9.gz
> > +OLD_FILES+=3Dusr/share/man/man9/MD5Init.9
> > +OLD_FILES+=3Dusr/share/man/man9/MD5Transform.9
>
> This really needs to be smarter, but you have to specify .gz suffix fo= r
> man entries as we have compression enabled by default.

Sigh, who knew it was so difficult to remove a man page.

There is a pull request being worked on that will be smar= ter about what's
removed since we have compress (UFS) and unc= ompress (ZFS) setups
now.

Warner
=C2=A0
Thanks, this is fixed now.

> >=C2=A0 # 20240726: deprecate contigfree(9)
> >=C2=A0 OLD_FILES+=3Dusr/share/man/man9/contigfree.9.gz
> > diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile > > index 593bbd068790..60f994edfd9f 100644
> > --- a/share/man/man9/Makefile
> > +++ b/share/man/man9/Makefile
> > @@ -1544,8 +1544,6 @@ MLINKS+=3D\
> >=C2=A0 =C2=A0 =C2=A0mbuf_tags.9 m_tag_next.9 \
> >=C2=A0 =C2=A0 =C2=A0mbuf_tags.9 m_tag_prepend.9 \
> >=C2=A0 =C2=A0 =C2=A0mbuf_tags.9 m_tag_unlink.9
> > -MLINKS+=3DMD5.9 MD5Init.9 \
> > -=C2=A0 =C2=A0MD5.9 MD5Transform.9
> >=C2=A0 MLINKS+=3Dmdchain.9 md_append_record.9 \
> >=C2=A0 =C2=A0 =C2=A0mdchain.9 md_done.9 \
> >=C2=A0 =C2=A0 =C2=A0mdchain.9 md_get_int64.9 \
> >
>
--000000000000492a89061e665daf-- From nobody Mon Jul 29 17:42:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXm0W4gDtz5Rfk5; Mon, 29 Jul 2024 17:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXm0W4C9lz4MZ7; Mon, 29 Jul 2024 17:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9FayKHIhjwYtOxJ+qfoACQ31hKjuuB2Uia/g9XAaEps=; b=xu2CBemrfZw52/sJJK5giuwYvv3noeDQCUdgcFpzG0IGkapuvlY5fd5Oa3f/94fhakMxJE Ms5Yl7r/BpWA8eDknBFQ6MAMEpZYjY1pRKlt3p/WrVdnBOGaoiVDlxcmWzRQndKkrotwSn fa4+VtcdiNQY3JIF+JTc0jhdIYyEJVd3X4ExrnN+5UcslQJd2KhgpDGBtj0OhIEe72VcZj AEBdlor1sVsEWRbcm/Xz33FfpcSEhC1uQMNlYfB0BS78Di2DOvh0pX3PKUyWU0mSJhrXX6 pj/j0MULheaD0oEoNER01r74Q8SBHLNaXSl894CMGdg3wXDMKdPmsfZYfotOXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722274971; a=rsa-sha256; cv=none; b=oKid2sD1M6Gol1rDexrbi/lBrf/fKMOfeyLOJzrbeBMhSNMoIV5Y7OeEGFkMguqZmn0C/5 8pZuR3TYk1Kwr86F6sQWjBDKud29molI8nHXT6gnOeGAoJobU/K4NjOiDzBkUPYf+zIsuv Q00GSFbbGvcmp/g8OnYD5hlwpg0/cGZ6sEPdqsGm5DplY5im7CEWXfRPFsE9ddrqg3QZ3C XXfKmivq6ufAqehpkHBkyyot+4xmoqilhyZYZX0agllk8mtTC6V+Q7XZxKfhpCQ5BuyH9o f3Sg26dp4EA3Ty359VRMbocKTQUEk3OJZ3FM5RRhPxny1beqdCIGUp1Y10ELwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9FayKHIhjwYtOxJ+qfoACQ31hKjuuB2Uia/g9XAaEps=; b=HZmTY+P4VjKIcWMF9v/7pu4cX1kBafqMEEmZOPymCcEyQw/2j25g/ru69bKU4TDdxrCQhA Ovhu22xnNS1jK7c3qMXNJFRb1DC7xdmhOokPhl03ZRNU8U3t/VdWWrocoXtPMBQmshGqZ0 wayHrpks1BAu1M9jggM2SZ93Xim4efm3zeAdvwNsX/jvhkadsxcxYwLyQfe4Vhy8DGTSi/ 9E9K+Vxwr5LV785cSiiu81xjHkyN9R+mSMnBG2+c2o4RPciYwzYj1KnE6z4Flq7p9cg9sF rVdgUAE2aQ5ua9q0yW95+EwCFd5KV16Lqy/CfpnJBnZCT+cZrJ0JFr510uDxpQ== 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 4WXm0W3pZ7zkTR; Mon, 29 Jul 2024 17:42:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46THgpT2023049; Mon, 29 Jul 2024 17:42:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46THgpbd023046; Mon, 29 Jul 2024 17:42:51 GMT (envelope-from git) Date: Mon, 29 Jul 2024 17:42:51 GMT Message-Id: <202407291742.46THgpbd023046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 375aaa299f85 - main - pfctl: improve error reporting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 375aaa299f85a66cee808490c31809db9e890a68 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=375aaa299f85a66cee808490c31809db9e890a68 commit 375aaa299f85a66cee808490c31809db9e890a68 Author: Kristof Provost AuthorDate: 2024-07-26 19:03:54 +0000 Commit: Kristof Provost CommitDate: 2024-07-29 17:42:25 +0000 pfctl: improve error reporting libpfctl doesn't set errno, instead it returns error codes. Take that into account when handling errors so that we report the actual error. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.c | 140 +++++++++++++++++++++++++++++------------------------ 1 file changed, 77 insertions(+), 63 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 39c6d684a317..b60e64fba338 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -319,7 +319,7 @@ pfctl_enable(int dev, int opts) else if (ret == ESRCH) errx(1, "pfil registeration failed"); else - err(1, "DIOCSTART"); + errc(1, ret, "DIOCSTART"); } if ((opts & PF_OPT_QUIET) == 0) fprintf(stderr, "pf enabled\n"); @@ -340,7 +340,7 @@ pfctl_disable(int dev, int opts) if (ret == ENOENT) errx(1, "pf not enabled"); else - err(1, "DIOCSTOP"); + errc(1, ret, "DIOCSTOP"); } if ((opts & PF_OPT_QUIET) == 0) fprintf(stderr, "pf disabled\n"); @@ -355,8 +355,9 @@ pfctl_disable(int dev, int opts) int pfctl_clear_stats(struct pfctl_handle *h, int opts) { - if (pfctl_clear_status(h)) - err(1, "DIOCCLRSTATUS"); + int ret; + if ((ret = pfctl_clear_status(h)) != 0) + errc(1, ret, "DIOCCLRSTATUS"); if ((opts & PF_OPT_QUIET) == 0) fprintf(stderr, "pf: statistics cleared\n"); return (0); @@ -536,6 +537,7 @@ pfctl_clear_iface_states(int dev, const char *iface, int opts) { struct pfctl_kill kill; unsigned int killed; + int ret; memset(&kill, 0, sizeof(kill)); if (iface != NULL && strlcpy(kill.ifname, iface, @@ -545,8 +547,8 @@ pfctl_clear_iface_states(int dev, const char *iface, int opts) if (opts & PF_OPT_KILLMATCH) kill.kill_match = true; - if (pfctl_clear_states_h(pfh, &kill, &killed)) - err(1, "DIOCCLRSTATES"); + if ((ret = pfctl_clear_states_h(pfh, &kill, &killed)) != 0) + errc(1, ret, "DIOCCLRSTATES"); if ((opts & PF_OPT_QUIET) == 0) fprintf(stderr, "%d states cleared\n", killed); return (0); @@ -713,7 +715,7 @@ pfctl_net_kill_states(int dev, const char *iface, int opts) struct sockaddr last_src, last_dst; unsigned int newkilled; int killed, sources, dests; - int ret_ga; + int ret_ga, ret; killed = sources = dests = 0; @@ -801,14 +803,14 @@ pfctl_net_kill_states(int dev, const char *iface, int opts) errx(1, "Unknown address family %d", kill.af); - if (pfctl_kill_states_h(pfh, &kill, &newkilled)) - err(1, "DIOCKILLSTATES"); + if ((ret = pfctl_kill_states_h(pfh, &kill, &newkilled)) != 0) + errc(1, ret, "DIOCKILLSTATES"); killed += newkilled; } freeaddrinfo(res[1]); } else { - if (pfctl_kill_states_h(pfh, &kill, &newkilled)) - err(1, "DIOCKILLSTATES"); + if ((ret = pfctl_kill_states_h(pfh, &kill, &newkilled)) != 0) + errc(1, ret, "DIOCKILLSTATES"); killed += newkilled; } } @@ -890,6 +892,7 @@ pfctl_label_kill_states(int dev, const char *iface, int opts) { struct pfctl_kill kill; unsigned int killed; + int ret; if (state_killers != 2 || (strlen(state_kill[1]) == 0)) { warnx("no label specified"); @@ -907,8 +910,8 @@ pfctl_label_kill_states(int dev, const char *iface, int opts) sizeof(kill.label)) errx(1, "label too long: %s", state_kill[1]); - if (pfctl_kill_states_h(pfh, &kill, &killed)) - err(1, "DIOCKILLSTATES"); + if ((ret = pfctl_kill_states_h(pfh, &kill, &killed)) != 0) + errc(1, ret, "DIOCKILLSTATES"); if ((opts & PF_OPT_QUIET) == 0) fprintf(stderr, "killed %d states\n", killed); @@ -921,6 +924,7 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) { struct pfctl_kill kill; unsigned int killed; + int ret; if (state_killers != 2 || (strlen(state_kill[1]) == 0)) { warnx("no id specified"); @@ -946,8 +950,8 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) usage(); } - if (pfctl_kill_states_h(pfh, &kill, &killed)) - err(1, "DIOCKILLSTATES"); + if ((ret = pfctl_kill_states_h(pfh, &kill, &killed)) != 0) + errc(1, ret, "DIOCKILLSTATES"); if ((opts & PF_OPT_QUIET) == 0) fprintf(stderr, "killed %d states\n", killed); @@ -962,17 +966,18 @@ pfctl_get_pool(int dev, struct pfctl_pool *pool, u_int32_t nr, struct pfioc_pooladdr pp; struct pf_pooladdr *pa; u_int32_t pnr, mpnr; + int ret; memset(&pp, 0, sizeof(pp)); - if (pfctl_get_addrs(pfh, ticket, nr, r_action, anchorname, &mpnr) != 0) { - warn("DIOCGETADDRS"); + if ((ret = pfctl_get_addrs(pfh, ticket, nr, r_action, anchorname, &mpnr)) != 0) { + warnc(ret, "DIOCGETADDRS"); return (-1); } TAILQ_INIT(&pool->list); for (pnr = 0; pnr < mpnr; ++pnr) { - if (pfctl_get_addr(pfh, ticket, nr, r_action, anchorname, pnr, &pp) != 0) { - warn("DIOCGETADDR"); + if ((ret = pfctl_get_addr(pfh, ticket, nr, r_action, anchorname, pnr, &pp)) != 0) { + warnc(ret, "DIOCGETADDR"); return (-1); } pa = calloc(1, sizeof(struct pf_pooladdr)); @@ -1102,6 +1107,7 @@ pfctl_show_eth_rules(int dev, char *path, int opts, enum pfctl_show format, int brace; int dotitle = opts & PF_OPT_SHOWALL; int len = strlen(path); + int ret; char *npath, *p; /* @@ -1134,12 +1140,12 @@ pfctl_show_eth_rules(int dev, char *path, int opts, enum pfctl_show format, struct pfctl_eth_rulesets_info ri; u_int32_t mnr, nr; - if (pfctl_get_eth_rulesets_info(dev, &ri, npath)) { - if (errno == EINVAL) { + if ((ret = pfctl_get_eth_rulesets_info(dev, &ri, npath)) != 0) { + if (ret == EINVAL) { fprintf(stderr, "Anchor '%s' " "not found.\n", anchorname); } else { - warn("DIOCGETETHRULESETS"); + warnc(ret, "DIOCGETETHRULESETS"); return (-1); } } @@ -1149,8 +1155,8 @@ pfctl_show_eth_rules(int dev, char *path, int opts, enum pfctl_show format, for (nr = 0; nr < mnr; ++nr) { struct pfctl_eth_ruleset_info rs; - if (pfctl_get_eth_ruleset(dev, npath, nr, &rs)) - err(1, "DIOCGETETHRULESET"); + if ((ret = pfctl_get_eth_ruleset(dev, npath, nr, &rs)) != 0) + errc(1, ret, "DIOCGETETHRULESET"); INDENT(depth, !(opts & PF_OPT_VERBOSE)); printf("anchor \"%s\" all {\n", rs.name); pfctl_show_eth_rules(dev, npath, opts, @@ -1162,16 +1168,16 @@ pfctl_show_eth_rules(int dev, char *path, int opts, enum pfctl_show format, return (0); } - if (pfctl_get_eth_rules_info(dev, &info, path)) { - warn("DIOCGETETHRULES"); + if ((ret = pfctl_get_eth_rules_info(dev, &info, path)) != 0) { + warnc(ret, "DIOCGETETHRULES"); return (-1); } for (int nr = 0; nr < info.nr; nr++) { brace = 0; INDENT(depth, !(opts & PF_OPT_VERBOSE)); - if (pfctl_get_eth_rule(dev, nr, info.ticket, path, &rule, - opts & PF_OPT_CLRRULECTRS, anchor_call) != 0) { - warn("DIOCGETETHRULE"); + if ((ret = pfctl_get_eth_rule(dev, nr, info.ticket, path, &rule, + opts & PF_OPT_CLRRULECTRS, anchor_call)) != 0) { + warnc(ret, "DIOCGETETHRULE"); return (-1); } if (anchor_call[0] && @@ -1280,14 +1286,14 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, if (opts & PF_OPT_SHOWALL) { ret = pfctl_get_rules_info_h(pfh, &ri, PF_PASS, path); if (ret != 0) { - warn("DIOCGETRULES"); + warnc(ret, "DIOCGETRULES"); goto error; } header++; } ret = pfctl_get_rules_info_h(pfh, &ri, PF_SCRUB, path); if (ret != 0) { - warn("DIOCGETRULES"); + warnc(ret, "DIOCGETRULES"); goto error; } if (opts & PF_OPT_SHOWALL) { @@ -1298,9 +1304,9 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, } for (nr = 0; nr < ri.nr; ++nr) { - if (pfctl_get_clear_rule_h(pfh, nr, ri.ticket, path, PF_SCRUB, - &rule, anchor_call, opts & PF_OPT_CLRRULECTRS)) { - warn("DIOCGETRULENV"); + if ((ret = pfctl_get_clear_rule_h(pfh, nr, ri.ticket, path, PF_SCRUB, + &rule, anchor_call, opts & PF_OPT_CLRRULECTRS)) != 0) { + warnc(ret, "DIOCGETRULENV"); goto error; } @@ -1325,13 +1331,13 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, } ret = pfctl_get_rules_info_h(pfh, &ri, PF_PASS, path); if (ret != 0) { - warn("DIOCGETRULES"); + warnc(ret, "DIOCGETRULES"); goto error; } for (nr = 0; nr < ri.nr; ++nr) { - if (pfctl_get_clear_rule_h(pfh, nr, ri.ticket, path, PF_PASS, - &rule, anchor_call, opts & PF_OPT_CLRRULECTRS)) { - warn("DIOCGETRULE"); + if ((ret = pfctl_get_clear_rule_h(pfh, nr, ri.ticket, path, PF_PASS, + &rule, anchor_call, opts & PF_OPT_CLRRULECTRS)) != 0) { + warnc(ret, "DIOCGETRULE"); goto error; } @@ -1484,15 +1490,15 @@ pfctl_show_nat(int dev, char *path, int opts, char *anchorname, int depth, for (i = 0; i < 3; i++) { ret = pfctl_get_rules_info_h(pfh, &ri, nattype[i], path); if (ret != 0) { - warn("DIOCGETRULES"); + warnc(ret, "DIOCGETRULES"); return (-1); } for (nr = 0; nr < ri.nr; ++nr) { INDENT(depth, !(opts & PF_OPT_VERBOSE)); - if (pfctl_get_rule_h(pfh, nr, ri.ticket, path, - nattype[i], &rule, anchor_call)) { - warn("DIOCGETRULE"); + if ((ret = pfctl_get_rule_h(pfh, nr, ri.ticket, path, + nattype[i], &rule, anchor_call)) != 0) { + warnc(ret, "DIOCGETRULE"); return (-1); } if (pfctl_get_pool(dev, &rule.rpool, nr, @@ -1613,14 +1619,15 @@ pfctl_show_status(int dev, int opts) { struct pfctl_status *status; struct pfctl_syncookies cookies; + int ret; if ((status = pfctl_get_status_h(pfh)) == NULL) { warn("DIOCGETSTATUS"); return (-1); } - if (pfctl_get_syncookies(dev, &cookies)) { + if ((ret = pfctl_get_syncookies(dev, &cookies)) != 0) { pfctl_free_status(status); - warn("DIOCGETSYNCOOKIES"); + warnc(ret, "DIOCGETSYNCOOKIES"); return (-1); } if (opts & PF_OPT_SHOWALL) @@ -1653,12 +1660,13 @@ pfctl_show_timeouts(int dev, int opts) { uint32_t seconds; int i; + int ret; if (opts & PF_OPT_SHOWALL) pfctl_print_title("TIMEOUTS:"); for (i = 0; pf_timeouts[i].name; i++) { - if (pfctl_get_timeout(pfh, pf_timeouts[i].timeout, &seconds)) - err(1, "DIOCGETTIMEOUT"); + if ((ret = pfctl_get_timeout(pfh, pf_timeouts[i].timeout, &seconds)) != 0) + errc(1, ret, "DIOCGETTIMEOUT"); printf("%-20s %10d", pf_timeouts[i].name, seconds); if (pf_timeouts[i].timeout >= PFTM_ADAPTIVE_START && pf_timeouts[i].timeout <= PFTM_ADAPTIVE_END) @@ -1676,12 +1684,13 @@ pfctl_show_limits(int dev, int opts) { unsigned int limit; int i; + int ret; if (opts & PF_OPT_SHOWALL) pfctl_print_title("LIMITS:"); for (i = 0; pf_limits[i].name; i++) { - if (pfctl_get_limit(pfh, pf_limits[i].index, &limit)) - err(1, "DIOCGETLIMIT"); + if ((ret = pfctl_get_limit(pfh, pf_limits[i].index, &limit)) != 0) + errc(1, ret, "DIOCGETLIMIT"); printf("%-13s ", pf_limits[i].name); if (limit == UINT_MAX) printf("unlimited\n"); @@ -1712,18 +1721,19 @@ int pfctl_add_pool(struct pfctl *pf, struct pfctl_pool *p, sa_family_t af) { struct pf_pooladdr *pa; + int ret; if ((pf->opts & PF_OPT_NOACTION) == 0) { - if (pfctl_begin_addrs(pf->h, &pf->paddr.ticket)) - err(1, "DIOCBEGINADDRS"); + if ((ret = pfctl_begin_addrs(pf->h, &pf->paddr.ticket)) != 0) + errc(1, ret, "DIOCBEGINADDRS"); } pf->paddr.af = af; TAILQ_FOREACH(pa, &p->list, entries) { memcpy(&pf->paddr.addr, pa, sizeof(struct pf_pooladdr)); if ((pf->opts & PF_OPT_NOACTION) == 0) { - if (pfctl_add_addr(pf->h, &pf->paddr) != 0) - err(1, "DIOCADDADDR"); + if ((ret = pfctl_add_addr(pf->h, &pf->paddr)) != 0) + errc(1, ret, "DIOCADDADDR"); } } return (0); @@ -1932,6 +1942,7 @@ pfctl_load_eth_rule(struct pfctl *pf, char *path, struct pfctl_eth_rule *r, char *name; char anchor[PF_ANCHOR_NAME_SIZE]; int len = strlen(path); + int ret; if (strlcpy(anchor, path, sizeof(anchor)) >= sizeof(anchor)) errx(1, "pfctl_load_eth_rule: strlcpy"); @@ -1951,9 +1962,9 @@ pfctl_load_eth_rule(struct pfctl *pf, char *path, struct pfctl_eth_rule *r, name = ""; if ((pf->opts & PF_OPT_NOACTION) == 0) - if (pfctl_add_eth_rule(pf->dev, r, anchor, name, - pf->eth_ticket)) - err(1, "DIOCADDETHRULENV"); + if ((ret = pfctl_add_eth_rule(pf->dev, r, anchor, name, + pf->eth_ticket)) != 0) + errc(1, ret, "DIOCADDETHRULENV"); if (pf->opts & PF_OPT_VERBOSE) { INDENT(depth, !(pf->opts & PF_OPT_VERBOSE2)); @@ -2078,7 +2089,7 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth) was_present = true; break; default: - err(1, "DIOCADDRULENV"); + errc(1, error, "DIOCADDRULE"); } } @@ -2679,6 +2690,7 @@ int pfctl_do_set_debug(struct pfctl *pf, char *d) { u_int32_t level; + int ret; if ((loadopt & PFCTL_FLAG_OPTION) == 0) return (0); @@ -2700,8 +2712,8 @@ pfctl_do_set_debug(struct pfctl *pf, char *d) level = pf->debug; if ((pf->opts & PF_OPT_NOACTION) == 0) - if (pfctl_set_debug(pfh, level)) - err(1, "DIOCSETDEBUG"); + if ((ret = pfctl_set_debug(pfh, level)) != 0) + errc(1, ret, "DIOCSETDEBUG"); if (pf->opts & PF_OPT_VERBOSE) printf("set debug %s\n", d); @@ -2758,8 +2770,10 @@ pfctl_set_interface_flags(struct pfctl *pf, char *ifname, int flags, int how) void pfctl_debug(int dev, u_int32_t level, int opts) { - if (pfctl_set_debug(pfh, level)) - err(1, "DIOCSETDEBUG"); + int ret; + + if ((ret = pfctl_set_debug(pfh, level)) != 0) + errc(1, ret, "DIOCSETDEBUG"); if ((opts & PF_OPT_QUIET) == 0) { fprintf(stderr, "debug level set to '"); switch (level) { @@ -2852,15 +2866,15 @@ pfctl_show_eth_anchors(int dev, int opts, char *anchorname) fprintf(stderr, "Anchor '%s' not found.\n", anchorname); else - err(1, "DIOCGETETHRULESETS"); + errc(1, ret, "DIOCGETETHRULESETS"); return (-1); } for (int nr = 0; nr < ri.nr; nr++) { char sub[MAXPATHLEN]; - if (pfctl_get_eth_ruleset(dev, anchorname, nr, &rs) != 0) - err(1, "DIOCGETETHRULESET"); + if ((ret = pfctl_get_eth_ruleset(dev, anchorname, nr, &rs)) != 0) + errc(1, ret, "DIOCGETETHRULESET"); if (!strcmp(rs.name, PF_RESERVED_ANCHOR)) continue; From nobody Mon Jul 29 17:42:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXm0X6NDzz5Rfrt; Mon, 29 Jul 2024 17: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXm0X50fGz4Mg5; Mon, 29 Jul 2024 17: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=1722274972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C3KhgRSTCQVQxkAW/Gw2lxsO5zzVCIKB9pmAWDJp220=; b=KrnKQQ0WASp4idDvr8464UM1jmzi7iwVhFGtaSfYHYcfButYvEkaWcaDr/AuP/v1vDATEA l6CY8Kk0iesajEfZ9VADHbMYNdSvmeKJLilhtbw/GHwLMKDUK+zXq47lEUlkJ53Wedkb6+ 0Hsq44l5ZZ0Ko8ZHLWHRQkyxwyUiQBVDuYK0rc2I06YFh3/1e6DBid5kfX0Qure6f5WNwH LjzcXcxgt+6y/6mloH5SX/WFT0isBFGpzthH3P5TOutNvnSthgDo1o6IObkbtvkGu4ul8h C/r9XVzhoajt13I7hhfHH1QGF+nRiWr9sNkscmPJitOrG5nK85n5q0rxPrWyCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722274972; a=rsa-sha256; cv=none; b=bzPTnEMUG2Vcg+luPX4AAS6Svmefskeg4E/umPWvDOsj2DSlqlmXpn2rZkwWG/x2BatT8i BHkGSTI4d6P4ijvUomJYbZ43Oy/P/Ar0YZbOOOCspTOcIAbkf3CfYAvtm496rpTQTZFCjg BUBTNMOP7LWPg9+YbiXOaEiJipJuKGDDqNud1JRV3WOx5v4Rp/2hFPAZ12vlrG9VFhcPBy AUdPAiQsNxLZA5Hy7Bc2tJpNSvOX9wEtcoF0sCpN7HYnZeYnaA4wcgqhPPO3Kcd0W58uOV ptbOi0+WKDUvPXVbOypgBRw7G1M3FCE9HUpkjl9mNI6C+Lobrbx04xkKtslvgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C3KhgRSTCQVQxkAW/Gw2lxsO5zzVCIKB9pmAWDJp220=; b=Ii/K+AMZxcTwwtsfv2nLfiXMkWW7cq1KA+bMzsoaHh0acDwp/J8GJ4Y7N0aLb+a03cihdk W7dbDsAa7udEFDHuZmvHU8xgSLpDvaJwZbIzxbJEpTWwNso6k8Njn/GNPqEcwsUAfzEFZN X/WV6dKLV8KptCy+rFAZE/XnyG+scWlqZSkhC5vWGBhyPfJ7Z2QsIfqKJZ80r6l0zWdaIp 1984LIEwBu/WbBKO1LZDIAxkZboMtWl+9rk+sfTZNw9ZYnYd4NuKjyVD3SUCVi1w6tKKuO pkI6reo3qPvN3MK6+EkJP7+ZhQVYaaZn7L23NYUt5W23xIgmnkuc2DGllOUczw== 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 4WXm0X4cpSzkCX; Mon, 29 Jul 2024 17:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46THgqEh023105; Mon, 29 Jul 2024 17:42:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46THgqTo023102; Mon, 29 Jul 2024 17:42:52 GMT (envelope-from git) Date: Mon, 29 Jul 2024 17:42:52 GMT Message-Id: <202407291742.46THgqTo023102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 534ee17e61ee - main - pf: stricter state checking for ICMP and ICMPv6 packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 534ee17e61ee094ec175703bc50e88ff6587703e Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=534ee17e61ee094ec175703bc50e88ff6587703e commit 534ee17e61ee094ec175703bc50e88ff6587703e Author: Kristof Provost AuthorDate: 2024-07-09 13:59:33 +0000 Commit: Kristof Provost CommitDate: 2024-07-29 17:42:26 +0000 pf: stricter state checking for ICMP and ICMPv6 packets Include the ICMP type in one port of the state key, using the type to determine which side should be the id, and which should be the type. Also: - Handle ICMP6 messages which are typically sent to multicast addresses but recieve unicast replies, by doing fallthrough lookups against the correct multicast address. - Clear up some mistaken assumptions in the PF code: - Not all ICMP packets have an icmp_id, so simulate one based on other data if we can, otherwise set it to 0. - Don't modify the icmp id field in NAT unless it's echo - Use the full range of possible id's when NATing icmp6 echoy ok henning marco testing matthieu todd MFC after: 1 day Obtained From: OpenBSD, mcbride 70bf7555ef4c Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 381 ++++++++++++++++++++++++++++++++++++++----------- sys/netpfil/pf/pf_lb.c | 19 ++- 2 files changed, 317 insertions(+), 83 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index dfa87b515cd1..0ea68834ac63 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -297,6 +297,8 @@ static void pf_change_ap(struct mbuf *, struct pf_addr *, u_int16_t *, u_int16_t, u_int8_t, sa_family_t); static int pf_modulate_sack(struct mbuf *, int, struct pf_pdesc *, struct tcphdr *, struct pf_state_peer *); +int pf_icmp_mapping(struct pf_pdesc *, u_int8_t, int *, + int *, u_int16_t *, u_int16_t *); static void pf_change_icmp(struct pf_addr *, u_int16_t *, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t *, u_int16_t *, u_int16_t *, @@ -343,6 +345,10 @@ static int pf_test_state_tcp(struct pf_kstate **, static int pf_test_state_udp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *); +int pf_icmp_state_lookup(struct pf_state_key_cmp *, + struct pf_pdesc *, struct pf_kstate **, struct mbuf *, + int, struct pfi_kkif *, u_int16_t, u_int16_t, + int, int *, int); static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -395,6 +401,8 @@ extern struct proc *pf_purge_proc; VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); +enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI_SOLICITED, PF_ICMP_MULTI_LINK }; + #define PACKET_UNDO_NAT(_m, _pd, _off, _s) \ do { \ struct pf_state_key *nk; \ @@ -1776,6 +1784,142 @@ pf_isforlocal(struct mbuf *m, int af) return (false); } +int +pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, + int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) +{ + /* + * ICMP types marked with PF_OUT are typically responses to + * PF_IN, and will match states in the opposite direction. + * PF_IN ICMP types need to match a state with that type. + */ + *icmp_dir = PF_OUT; + *multi = PF_ICMP_MULTI_LINK; + /* Queries (and responses) */ + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *icmptype = ICMP_ECHO; + *icmpid = pd->hdr.icmp.icmp_id; + break; + + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *icmptype = ICMP_TSTAMP; + *icmpid = 0; /* Time is not a secret. */ + break; + + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *icmptype = ICMP_IREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *icmptype = ICMP_MASKREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *icmptype = ICMP_IPV6_WHEREAREYOU; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *icmptype = ICMP_MOBILE_REGREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *icmptype = ICMP_ROUTERSOLICIT; + *icmpid = 0; /* Nothing sane to match on! */ + break; + +#ifdef INET6 + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *icmptype = ICMP6_ECHO_REQUEST; + *icmpid = pd->hdr.icmp6.icmp6_id; + break; + + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *icmptype = MLD_LISTENER_QUERY; + *icmpid = 0; + break; + } + + /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ + case ICMP6_WRUREQUEST: + *icmp_dir = PF_IN; + case ICMP6_WRUREPLY: + *icmptype = ICMP6_WRUREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *icmptype = MLD_MTRACE; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *icmptype = ND_NEIGHBOR_SOLICIT; + *multi = PF_ICMP_MULTI_SOLICITED; + *icmpid = 0; + break; + } + +#endif /* INET6 */ + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: +#ifdef INET6 + /* + * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH + * ND_REDIRECT can't be in this list because the triggering packet + * header is optional. + */ + case ICMP6_PACKET_TOO_BIG: +#endif /* INET6 */ + /* These will not be used, but set them anyways */ + *icmp_dir = PF_IN; + *icmptype = htons(type); + *icmpid = 0; + return (1); /* These types are matched to other state */ + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *icmptype = type; + *icmpid = 0; + break; + } + HTONS(*icmptype); + return (0); +} + void pf_intr(void *v) { @@ -4436,8 +4580,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, int tag = -1; int asd = 0; int match = 0; - int state_icmp = 0; - u_int16_t sport = 0, dport = 0; + int state_icmp = 0, icmp_dir, multi; + u_int16_t sport = 0, dport = 0, virtual_type, virtual_id; u_int16_t bproto_sum = 0, bip_sum = 0; u_int8_t icmptype = 0, icmpcode = 0; struct pf_kanchor_stackframe anchor_stack[PF_ANCHOR_STACKSIZE]; @@ -4471,33 +4615,37 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, case IPPROTO_ICMP: if (pd->af != AF_INET) break; - sport = dport = pd->hdr.icmp.icmp_id; hdrlen = sizeof(pd->hdr.icmp); icmptype = pd->hdr.icmp.icmp_type; icmpcode = pd->hdr.icmp.icmp_code; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: if (af != AF_INET6) break; - sport = dport = pd->hdr.icmp6.icmp6_id; hdrlen = sizeof(pd->hdr.icmp6); icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ default: @@ -4591,7 +4739,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, } #ifdef INET case IPPROTO_ICMP: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET)) pf_change_a(&saddr->v4.s_addr, pd->ip_sum, nk->addr[pd->sidx].v4.s_addr, 0); @@ -4600,11 +4747,12 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[1] != pd->hdr.icmp.icmp_id) { + if (virtual_type == ICMP_ECHO && + nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, - nk->port[1], 0); - pd->hdr.icmp.icmp_id = nk->port[1]; + nk->port[pd->sidx], 0); + pd->hdr.icmp.icmp_id = nk->port[pd->sidx]; pd->sport = &pd->hdr.icmp.icmp_id; } m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); @@ -4612,7 +4760,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET6)) pf_change_a6(saddr, &pd->hdr.icmp6.icmp6_cksum, &nk->addr[pd->sidx], 0); @@ -6450,15 +6597,73 @@ pf_multihome_scan_asconf(struct mbuf *m, int start, int len, return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); } +int +pf_icmp_state_lookup(struct pf_state_key_cmp *key, struct pf_pdesc *pd, + struct pf_kstate **state, struct mbuf *m, int direction, struct pfi_kkif *kif, + u_int16_t icmpid, u_int16_t type, int icmp_dir, int *iidx, int multi) +{ + key->af = pd->af; + key->proto = pd->proto; + if (icmp_dir == PF_IN) { + *iidx = pd->sidx; + key->port[pd->sidx] = icmpid; + key->port[pd->didx] = type; + } else { + *iidx = pd->didx; + key->port[pd->sidx] = type; + key->port[pd->didx] = icmpid; + } + if (pd->af == AF_INET6 && multi != PF_ICMP_MULTI_NONE) { + switch (multi) { + case PF_ICMP_MULTI_SOLICITED: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = IPV6_ADDR_INT32_ONE; + key->addr[pd->sidx].addr32[3] = pd->src->addr32[3]; + key->addr[pd->sidx].addr8[12] = 0xff; + break; + case PF_ICMP_MULTI_LINK: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = 0; + key->addr[pd->sidx].addr32[3] = IPV6_ADDR_INT32_ONE; + break; + } + } else + PF_ACPY(&key->addr[pd->sidx], pd->src, key->af); + PF_ACPY(&key->addr[pd->didx], pd->dst, key->af); + + STATE_LOOKUP(kif, key, *state, pd); + + /* Is this ICMP message flowing in right direction? */ + if ((*state)->rule.ptr->type && + (((*state)->direction == direction) ? + PF_IN : PF_OUT) != icmp_dir) { + if (V_pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: icmp type %d in wrong direction (%d): ", + icmp_dir, pd->dir); + pf_print_state(*state); + printf("\n"); + } + return (PF_DROP); + } + return (-1); +} + static int pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) { struct pf_addr *saddr = pd->src, *daddr = pd->dst; - u_int16_t icmpid = 0, *icmpsum; + u_int16_t *icmpsum, virtual_id, virtual_type; u_int8_t icmptype, icmpcode; - int state_icmp = 0; + int icmp_dir, iidx, ret, multi; struct pf_state_key_cmp key; +#ifdef INET + u_int16_t icmpid; +#endif + + MPASS(*state == NULL); bzero(&key, sizeof(key)); switch (pd->proto) { @@ -6468,49 +6673,43 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, icmpcode = pd->hdr.icmp.icmp_code; icmpid = pd->hdr.icmp.icmp_id; icmpsum = &pd->hdr.icmp.icmp_cksum; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; +#ifdef INET icmpid = pd->hdr.icmp6.icmp6_id; +#endif icmpsum = &pd->hdr.icmp6.icmp6_cksum; - - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ } - if (!state_icmp) { + if (pf_icmp_mapping(pd, icmptype, &icmp_dir, &multi, + &virtual_id, &virtual_type) == 0) { /* * ICMP query/reply message not related to a TCP/UDP packet. * Search for an ICMP state. */ - key.af = pd->af; - key.proto = pd->proto; - key.port[0] = key.port[1] = icmpid; - if (pd->dir == PF_IN) { /* wire side, straight */ - PF_ACPY(&key.addr[0], pd->src, key.af); - PF_ACPY(&key.addr[1], pd->dst, key.af); - } else { /* stack side, reverse */ - PF_ACPY(&key.addr[1], pd->src, key.af); - PF_ACPY(&key.addr[0], pd->dst, key.af); + ret = pf_icmp_state_lookup(&key, pd, state, m, pd->dir, + kif, virtual_id, virtual_type, icmp_dir, &iidx, + PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); } - STATE_LOOKUP(kif, &key, *state, pd); - (*state)->expire = pf_get_uptime(); (*state)->timeout = PFTM_ICMP_ERROR_REPLY; @@ -6533,14 +6732,14 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[0] != + if (nk->port[iidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, icmpid, - nk->port[pd->sidx], 0); + nk->port[iidx], 0); pd->hdr.icmp.icmp_id = - nk->port[pd->sidx]; + nk->port[iidx]; } m_copyback(m, off, ICMP_MINLEN, @@ -6905,13 +7104,15 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMP; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp_id; + icmpid = iih.icmp_id; + pf_icmp_mapping(&pd2, iih.icmp_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); - STATE_LOOKUP(kif, &key, *state, pd); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) + return (ret); /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6921,21 +7122,23 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp_id) - pf_change_icmp(pd2.src, &iih.icmp_id, + (virtual_type == ICMP_ECHO && + nk->port[iidx] != iih.icmp_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP_ECHO) ? + &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP_ECHO) ? + nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp_id) - pf_change_icmp(pd2.dst, &iih.icmp_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, - pd2.ip_sum, icmpsum, - pd->ip_sum, 0, AF_INET); + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, + pd2.ip_sum, icmpsum, pd->ip_sum, 0, + AF_INET); m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); m_copyback(m, ipoff2, sizeof(h2), (caddr_t)&h2); @@ -6957,13 +7160,25 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMPV6; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp6_id; - - STATE_LOOKUP(kif, &key, *state, pd); + pf_icmp_mapping(&pd2, iih.icmp6_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, + state, m, pd->dir, kif, + virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); + } /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6973,19 +7188,21 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp6_id) - pf_change_icmp(pd2.src, &iih.icmp6_id, + ((virtual_type == ICMP6_ECHO_REQUEST) && + nk->port[pd2.sidx] != iih.icmp6_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP6_ECHO_REQUEST) + ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP6_ECHO_REQUEST) + ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp6_id) - pf_change_icmp(pd2.dst, &iih.icmp6_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index eb3d087e3df6..4fcad7e578a8 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -225,6 +225,23 @@ pf_get_sport(sa_family_t af, u_int8_t proto, struct pf_krule *r, if (pf_map_addr(af, r, saddr, naddr, NULL, &init_addr, sn)) return (1); + if (proto == IPPROTO_ICMP) { + if (*nport == htons(ICMP_ECHO)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#ifdef INET6 + if (proto == IPPROTO_ICMPV6) { + if (*nport == htons(ICMP6_ECHO_REQUEST)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#endif /* INET6 */ + bzero(&key, sizeof(key)); key.af = af; key.proto = proto; @@ -633,7 +650,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, switch (r->action) { case PF_NAT: if (pd->proto == IPPROTO_ICMP) { - low = 1; + low = 1; high = 65535; } else { low = r->rpool.proxy_port[0]; From nobody Mon Jul 29 17:42:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXm0Z0TZ4z5Rff5; Mon, 29 Jul 2024 17:42:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXm0Y63zqz4MZG; Mon, 29 Jul 2024 17:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWUU8uFm6ZGCdWnzX9Lymi2GCKYUp3v/FNV/C2GN4TM=; b=aYB+cDWNS3qLCj2oIFe0+G8LDSQtFfCXitK87FcbAvT75A8UMdciWAg1p/dym246XwEFbs m8tMZvqm8WtxEDzfxd3M35TnAqBBY+RAzYV2QIZSxjExtfVIcmb/j3Upg8kI1dZsgEWH+h vDf/iqSV4o8ggUEoZqL5zh5UFGcfdP+TVdy/SuVKWIejcgyvaMfo36To+NC4oUzSWPlpuu rrc5nk3czS25Ie3FuEHNnPfP557qYQXvtIAlZeDcK1U7KNq4ojpYhfsu5rzzvlUBFTaryH 9k781ZdUQvfek9LNQ/FoWTHX5kPGV+LNcKNAksb/wm0bxxkHR0jY/VEmk18Uzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722274973; a=rsa-sha256; cv=none; b=NfvgdLwZDTWBxLFs2Xs9nUVD+NwW8wZGyd4Je5Ru4LwbR1PRIADAWbP0RBBNmChhVlweeG k3e9jdvr8/8BH4qG9apMFPTIIsBnesZgxHnog52P5jAXg7+fYMJcA1gZ8/DOfjTyrnpyOz xbLrBQCTQDhGBH0ej+TnEHXizgIfRy0M2+muClDsEJ9juTnZGYQE+f6p1MSV0pKzPlEVYt nt6IotvE8ur49TEFFeLP/dFTwfVhtSLl4DtiMlkvxa6izphiveojjtj1+U2WD6w3mDxFhM t64fYzOKj63lVL1Q539X/6QAiPv9Pv6Zm4N7T4kBY/OKQKJyMSR7N9Cxe6Ewpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWUU8uFm6ZGCdWnzX9Lymi2GCKYUp3v/FNV/C2GN4TM=; b=l7eCd4PQ/3u5+Z+2SkxVbkXatqIZdfzFBxrgxxb/+eq79joXLwLaHL0OeP1q0maaWwmaLz /BJqhosbRZi4qHulLFbjkadkNPklEZed2f9oKYgSyw3RNSWfqS1jVRqKPKleiK2x4n5s3c 8KuZuhcJJkP3LaP43sq+NqRnaYgLLCHDhmMa+3j4GQvQ+w/v/l/sEh6grjyVi66v6+vJw+ 8718HdJmcRUh2tNCUoJMr4eNB5Pb7EU218Zhsuiq3Zt3js+ejBacIk5isR4oMO+dAp7jen MpKiJLFSWPOz09pfiP+7Gw96kFJEoa2vxOo8A8iiG34vRQcKH5XyPKhQukF6Qg== 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 4WXm0Y5h4BzjyT; Mon, 29 Jul 2024 17:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46THgrjB023175; Mon, 29 Jul 2024 17:42:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46THgrm7023172; Mon, 29 Jul 2024 17:42:53 GMT (envelope-from git) Date: Mon, 29 Jul 2024 17:42:53 GMT Message-Id: <202407291742.46THgrm7023172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: e296b0de9e46 - main - pf: some ICMP types that also have icmp_id, pointed out by markus@ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2 commit e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2 Author: Kristof Provost AuthorDate: 2024-07-10 11:32:03 +0000 Commit: Kristof Provost CommitDate: 2024-07-29 17:42:26 +0000 pf: some ICMP types that also have icmp_id, pointed out by markus@ ok henning markus MFC after: 1 day Obtained From: OpenBSD, mcbride 8c0632cd274b Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 0ea68834ac63..f4832e2b5481 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1808,21 +1808,21 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_IN; case ICMP_TSTAMPREPLY: *icmptype = ICMP_TSTAMP; - *icmpid = 0; /* Time is not a secret. */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IREQ: *icmp_dir = PF_IN; case ICMP_IREQREPLY: *icmptype = ICMP_IREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_MASKREQ: *icmp_dir = PF_IN; case ICMP_MASKREPLY: *icmptype = ICMP_MASKREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IPV6_WHEREAREYOU: From nobody Mon Jul 29 17:42:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXm0b1LcRz5Rff8; Mon, 29 Jul 2024 17:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXm0Z6qgJz4MgR; Mon, 29 Jul 2024 17:42:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zBPgBbkH/vYHP2uYfbVtoOzcE61SO0YS7lLRRqPX8Ck=; b=uvmqL+ybFjeTpYbXRSNHSGYC3dKTRkGvjaIk0+Rab6UfHzI5omSMNw/Da0Sk2ubDhSePa6 JfHknwh0Wamm8QcxpRQ8KdSN959S0Cd0EJ7DbXq7k5E9Xb7k39YcYuGM6d8pw7s72aafFE 0n+qmnF/rdgepP9GZVA7VIAfU0Qxhww5QpjfWKE3E9F9IIevjtx7AQWxKEPAlorkiHK09y mgW5++NPR8zWoMk43ia/oMsXNFf9mmveWsWzMC+xsiSNnEXtbxmomVLaKaX6u3JsSAIbB9 CNCvYi0OGi+Wu5Rbhqx0+XmPEtzerYxpTQcVQzWjKyrdwSpxfenDBHSGBsFJTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722274975; a=rsa-sha256; cv=none; b=x0lLGhIHcMwMG35F4V6A2NsgUjjc3nLqq4DS2hMsKKGLuBV0NmPSZ5csfiAfbTyxUGMO/R xfkHlwwYXIxsmz0ivQZqkA+Op1qsaW0RWZ6MS9kN2x0ZPnIrTmtehgWLjFQG4Mr30dU/5i zaBTzGVH/f7+/+kpSah1ruYpr8aXupWanlSIxjcB3+wr8bDTYDXwMtqhXm/xZ9GVRNorAI RL60vGxYyuh9Y9NNht383vDxfvX+eczcJZgk8CFruRmqnCWNZtfRZ7MqovBr+xD4u5bfKA lZPO7ulp+vJFM9m3HBeQ4R50Oal1ulP4K7jefV4S9H5Uo2A4L3XQq9JHWgSZyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zBPgBbkH/vYHP2uYfbVtoOzcE61SO0YS7lLRRqPX8Ck=; b=T4fAl1p4ZHR7fKwWRK/I5iRidYdSzry9RCjVx2flGzkZeJjn+bSO+anLOSN0kPgX8Ny1mP UM/AoHiC+HD3OOrTgokB2URvzEbVuh2B3p1HpEL5HCivQLLBabRDPlrZmiN3lk7t7H8yqd r/edA33bJ87fMHT1veY4f+aeq2cAZWmBd/3op1c9D3F5GiXaOlaHbFYOIJOwNCWjSxLYJn kMTQtC3CDf81F7NAC8Pq1QYwW+lM2CLpOa3/DBveY5pTeqE73E6wl39nufpu3vOCJgSq7a QsmFDkMq2f7Aqfkrkj6rcCLzQJMZoZ0fqvK5r77o4WteigqJawY3UHs3alGloA== 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 4WXm0Z6RV0zkQY; Mon, 29 Jul 2024 17:42:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46THgsxW023225; Mon, 29 Jul 2024 17:42:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46THgsaw023222; Mon, 29 Jul 2024 17:42:54 GMT (envelope-from git) Date: Mon, 29 Jul 2024 17:42:54 GMT Message-Id: <202407291742.46THgsaw023222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 46755f52247b - main - pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46755f52247bd34a7f013d6844ed0c673ac0defc Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=46755f52247bd34a7f013d6844ed0c673ac0defc commit 46755f52247bd34a7f013d6844ed0c673ac0defc Author: Kristof Provost AuthorDate: 2024-07-10 12:10:50 +0000 Commit: Kristof Provost CommitDate: 2024-07-29 17:42:26 +0000 pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() In pf_icmp_mapping() the ICMP and ICMPv6 types shared the same number space. In fact they are independent and must be handled separately. Fix traceroute via pf by splitting pf_icmp_mapping() into IPv4 and IPv6 sections. ok henning@ mcbride@; tested mcbride@; sure deraadt@ MFC after: 1 day Obtained From: OpenBSD, bluhm ef4bccd7509e Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 247 ++++++++++++++++++++++++++++------------------------ 1 file changed, 135 insertions(+), 112 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f4832e2b5481..2532980168e1 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1786,7 +1786,7 @@ pf_isforlocal(struct mbuf *m, int af) int pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, - int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) + int *icmp_dir, int *multi, u_int16_t *virtual_id, u_int16_t *virtual_type) { /* * ICMP types marked with PF_OUT are typically responses to @@ -1796,128 +1796,151 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_OUT; *multi = PF_ICMP_MULTI_LINK; /* Queries (and responses) */ - switch (type) { - case ICMP_ECHO: - *icmp_dir = PF_IN; - case ICMP_ECHOREPLY: - *icmptype = ICMP_ECHO; - *icmpid = pd->hdr.icmp.icmp_id; - break; + switch (pd->af) { +#ifdef INET + case AF_INET: + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *virtual_type = ICMP_ECHO; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_TSTAMP: - *icmp_dir = PF_IN; - case ICMP_TSTAMPREPLY: - *icmptype = ICMP_TSTAMP; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *virtual_type = ICMP_TSTAMP; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IREQ: - *icmp_dir = PF_IN; - case ICMP_IREQREPLY: - *icmptype = ICMP_IREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *virtual_type = ICMP_IREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_MASKREQ: - *icmp_dir = PF_IN; - case ICMP_MASKREPLY: - *icmptype = ICMP_MASKREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *virtual_type = ICMP_MASKREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IPV6_WHEREAREYOU: - *icmp_dir = PF_IN; - case ICMP_IPV6_IAMHERE: - *icmptype = ICMP_IPV6_WHEREAREYOU; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *virtual_type = ICMP_IPV6_WHEREAREYOU; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_MOBILE_REGREQUEST: - *icmp_dir = PF_IN; - case ICMP_MOBILE_REGREPLY: - *icmptype = ICMP_MOBILE_REGREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *virtual_type = ICMP_MOBILE_REGREQUEST; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_ROUTERSOLICIT: - *icmp_dir = PF_IN; - case ICMP_ROUTERADVERT: - *icmptype = ICMP_ROUTERSOLICIT; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *virtual_type = ICMP_ROUTERSOLICIT; + *virtual_id = 0; /* Nothing sane to match on! */ + break; -#ifdef INET6 - case ICMP6_ECHO_REQUEST: - *icmp_dir = PF_IN; - case ICMP6_ECHO_REPLY: - *icmptype = ICMP6_ECHO_REQUEST; - *icmpid = pd->hdr.icmp6.icmp6_id; - break; + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ - case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; - case MLD_LISTENER_REPORT: { - *icmptype = MLD_LISTENER_QUERY; - *icmpid = 0; + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } +#endif /* INET */ +#ifdef INET6 + case AF_INET6: + switch (type) { + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *virtual_type = ICMP6_ECHO_REQUEST; + *virtual_id = pd->hdr.icmp6.icmp6_id; + break; - /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ - case ICMP6_WRUREQUEST: - *icmp_dir = PF_IN; - case ICMP6_WRUREPLY: - *icmptype = ICMP6_WRUREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *virtual_type = MLD_LISTENER_QUERY; + *virtual_id = 0; + break; + } + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *virtual_type = MLD_MTRACE; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case MLD_MTRACE: - *icmp_dir = PF_IN; - case MLD_MTRACE_RESP: - *icmptype = MLD_MTRACE; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *virtual_type = ND_NEIGHBOR_SOLICIT; + *virtual_id = 0; + break; + } - case ND_NEIGHBOR_SOLICIT: - *icmp_dir = PF_IN; - case ND_NEIGHBOR_ADVERT: { - *icmptype = ND_NEIGHBOR_SOLICIT; - *multi = PF_ICMP_MULTI_SOLICITED; - *icmpid = 0; + /* + * These ICMP types map to other connections. + * ND_REDIRECT can't be in this list because the triggering + * packet header is optional. + */ + case ICMP6_DST_UNREACH: + case ICMP6_PACKET_TOO_BIG: + case ICMP6_TIME_EXCEEDED: + case ICMP6_PARAM_PROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ + /* + * All remaining ICMP6 types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } - #endif /* INET6 */ - /* These ICMP types map to other connections */ - case ICMP_UNREACH: - case ICMP_SOURCEQUENCH: - case ICMP_REDIRECT: - case ICMP_TIMXCEED: - case ICMP_PARAMPROB: -#ifdef INET6 - /* - * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH - * ND_REDIRECT can't be in this list because the triggering packet - * header is optional. - */ - case ICMP6_PACKET_TOO_BIG: -#endif /* INET6 */ - /* These will not be used, but set them anyways */ - *icmp_dir = PF_IN; - *icmptype = htons(type); - *icmpid = 0; - return (1); /* These types are matched to other state */ - /* - * All remaining ICMP types get their own states, - * and will only match in one direction. - */ default: *icmp_dir = PF_IN; - *icmptype = type; - *icmpid = 0; + *virtual_type = type; + *virtual_id = 0; break; } - HTONS(*icmptype); - return (0); + HTONS(*virtual_type); + return (0); /* These types match to their own state */ } void @@ -4747,7 +4770,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (virtual_type == ICMP_ECHO && + if (virtual_type == htons(ICMP_ECHO) && nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, @@ -7122,13 +7145,13 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - (virtual_type == ICMP_ECHO && + (virtual_type == htons(ICMP_ECHO) && nk->port[iidx] != iih.icmp_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); @@ -7188,13 +7211,13 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - ((virtual_type == ICMP6_ECHO_REQUEST) && + ((virtual_type == htons(ICMP6_ECHO_REQUEST)) && nk->port[pd2.sidx] != iih.icmp6_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); From nobody Mon Jul 29 17:42:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXm0c2T75z5Rfh1; Mon, 29 Jul 2024 17:42: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXm0c0mcTz4Mlh; Mon, 29 Jul 2024 17:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uBIk8/TDBTunPYPnckrwjgdASD4zcUpd1DZsaMPZv5o=; b=Yc7/pOHaWq9Q2ssU0odajLOOcbKVHd7a6+15qu5fAgto98JI2IPFo9uXSDUcdq03HgvDjY CDJv+jNrSFL/+vdj7Yb1Kt6EejHgaNqg78nCVZ4gYKAIMo44I9QiB6N3fdjI9k4Yb1AfLB u1tUAKRg5cfbAm5NkQHYTYC9Zf4YWDRA2L8nF2yUJ/kYB9iTemskb3kvcrbKaD6NWlwrh9 r7be1Z0D6xu6MxBAfZAKfSpEmaMYSPriaAyD/N6uPpi0JLbKHzFeoq2Xhv03VXFGWk8jCE ttNHLvtbygFkIIp2M0UNYjotesj5E9A6j0S6/5pdRAZ78zp7Zfn+byTvMJaHSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722274976; a=rsa-sha256; cv=none; b=PywGMHnGSFV8phizU62ws/B3dwnrvULkRC7YJhryagy8//5kJjFNlk80l47ToUwLlV5JQE 7qXAQqHYfPGTT66V+gpAJMAsYNvGbp4+wYdmgRDzoYmFcIXhLN2PgipWagCucqIa8upsVv HY8E3ZZOtXtW+5HGnG1m6l2XGgBg/W9GlJwRVXwhXGsDeduirB/qQF8HTPtXgL7UwmP5v9 MBsYlgBq6yf/bb7BITUNbFr0tHFc5iPYsu+La2igQZXPt7Gur0cqzi8GTKJDbpZ3/JijaL 1fA+QbjccZo1+cZSCK3dw5YQ5YYDGLh2eYgOA/OEbX/0VmyWVMCW2IWGIT9DZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uBIk8/TDBTunPYPnckrwjgdASD4zcUpd1DZsaMPZv5o=; b=w26uH3tPd8Hq/ONZ2OYQ2/hwP7B1/lGxQvKZKtHKYY4M/dcWznpfwQew6NpBkCaOF2H7Hr L9zVL4UgDxb4d5z54va2Pot3ndJaf4YYPjZveV8jp/28ffwnqtBVPbu9R96zVkAGs7247v VFM3joP1Oj26sAuPxDpLp7Zbf9VxVojGCgUEthm/OjqJ1Dh+2MoFCKbwBdDLUNuN0Pa8Es hx4VMUbNfm+5Vqc4P/wvOI28OT9rNxCo5vMFjDOGBGnba3Gu5fYWbDdtsMiQozMX7L6x7j AcyakIBeTEFS5wbhmv6iPVLjO58RVtHKCGAYsIdvxkMCTc/PVGudF3LURc2kkQ== 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 4WXm0c0NQ2zjyV; Mon, 29 Jul 2024 17:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46THgtDu023284; Mon, 29 Jul 2024 17:42:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46THgt4T023281; Mon, 29 Jul 2024 17:42:55 GMT (envelope-from git) Date: Mon, 29 Jul 2024 17:42:55 GMT Message-Id: <202407291742.46THgt4T023281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 1afe4da75d1d - main - pf: allow MLD LR to be sent without state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1afe4da75d1d2acd33b25eea942af28aa41c82c2 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1afe4da75d1d2acd33b25eea942af28aa41c82c2 commit 1afe4da75d1d2acd33b25eea942af28aa41c82c2 Author: Kristof Provost AuthorDate: 2024-07-10 12:36:18 +0000 Commit: Kristof Provost CommitDate: 2024-07-29 17:42:26 +0000 pf: allow MLD LR to be sent without state Change PF behavior to allow MLD Listener Report packets to be sent without needing a previously created state by MLD Listener Query. It wasn't working because: (1) you might not have a previous MLD Listener Query and (2) the addresses of the Query and Report don't match. ok mikeb@, sashan@ MFC after: 1 day Obtained From: OpenBSD, rzalamena , 5c526dbdb0f2 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 2532980168e1..62d604260713 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1885,8 +1885,15 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, break; case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; case MLD_LISTENER_REPORT: { + /* + * Listener Report can be sent by clients + * without an associated Listener Query. + * In addition to that, when Report is sent as a + * reply to a Query its source and destination + * address are different. + */ + *icmp_dir = PF_IN; *virtual_type = MLD_LISTENER_QUERY; *virtual_id = 0; break; From nobody Mon Jul 29 17:42:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXm0d4SVkz5Rg6G; Mon, 29 Jul 2024 17:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXm0d2GNSz4MZr; Mon, 29 Jul 2024 17:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aNRicnBa/KPr+tntfmgJCfVGv9BTNVfjCnptPZmdbkY=; b=Njy6qZdl9On7uaqT4yJu7OR6+IA9Rj9x/CF2YCTq8gLwEGuX/LuS1nqudY3lo1copJfZfC sc3eJ2PDhxXerNW94BpcTp0u7QgvpTPVaP3ugWBT5tCI27qkoQqci7gX3DT6io5cxtCSxN zvyzTpDgDAvfwszHHE5HlL1eT0sCheFTk1fETXQYGhyacGcqCWy22OVnD9/M+3BEdMgdoU CoLUyMVQTE004vSAa3V481JYOnETtb+h1DoRU+VF0P9v+yG0oWHe+1i3sWVFwLP2f5qG7n 4vzA45sda28vuibQYVSLKRrrigEGUqPtHeRguO0Feb2P62bP/ZRy6WgkIrctBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722274977; a=rsa-sha256; cv=none; b=POHB+6XbDSqS4dAeiiqPnmqPYDra+O/aZBr5nntLOPPSk1JuRk5xURiHVTfXRszmJRnoel jwqaVEuXestjqN3Nxe0fR5DXiC2ZTb9WJkK5eMwrDeV2HdYcv6i2BIfSt0iuPM/U3qZw4J Y10iapxufOnM/jgtUK3jY637/DHDxdENx6XZa3F+diNsl6p+kCvkpJHzcxzK7z2ztrl3PO KCi8Ti5NXW+P9kHNZVI/HtHZv9xLvQLvAIrHgDaVuzFR++xAzdE5Wlc4NFf/zn6fH5+zKc BccWZRD1rHuopkcwoL/ibqc/QKrG++QhKi42cMEZGaNGXj6ePlV4j0UDsphMdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722274977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aNRicnBa/KPr+tntfmgJCfVGv9BTNVfjCnptPZmdbkY=; b=BaeyudYP0CP6DAwXCmav4iiNnP4LWSg2IfeaykZRxYsDSYaDOljJfvfd0fgwIzYte5cWLO bVscLxaVMDqhTd4hPefTMxmUq2ExdlpxPr53E5lGZI39CIYgsshViKv/UQOry29eMATFsm +6eQepD9AGEsQNZIBJkBvnDFIZXM3X9jS334aNRsgg5AoZRk0lVEPzwdcpw3eFjak+O8la SccxU1PLsTQSnEpJ6qapI98T+0Gk0Nz6Ijy+CmI79vYhtetxKd1IdMnqyyU/XtOJD4rQz+ CrNNNesYRNX20IIv/8hRHYfpF+LiBYwq+RB2QoAtokv7Jd8MvqV9QhZ8fiJxiQ== 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 4WXm0d1m3xzkdq; Mon, 29 Jul 2024 17:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46THgvWX023338; Mon, 29 Jul 2024 17:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46THgv58023335; Mon, 29 Jul 2024 17:42:57 GMT (envelope-from git) Date: Mon, 29 Jul 2024 17:42:57 GMT Message-Id: <202407291742.46THgv58023335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b9f0dbc3d006 - main - pf tests: ensure we don't confuse different ICMP types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9f0dbc3d006e0b904ee4275d54459f4edd65bb8 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b9f0dbc3d006e0b904ee4275d54459f4edd65bb8 commit b9f0dbc3d006e0b904ee4275d54459f4edd65bb8 Author: Kristof Provost AuthorDate: 2024-07-09 09:22:18 +0000 Commit: Kristof Provost CommitDate: 2024-07-29 17:42:26 +0000 pf tests: ensure we don't confuse different ICMP types When creating a state for ICMP (v4 or v6) packets we only used the ID, which means that we could confuse different ICMP types. For example, if we allowed neighbour discovery but not ICMPv6 echo requests an ND packet could create a state that the echo request would match. Test that this is now fixed. Reported by: Enrico Bassetti MFC after: 1 day Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/icmp6.sh | 89 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 6b57260796ed..f4dd36d9e35d 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -16,6 +16,7 @@ ATF_TESTS_SH+= altq \ fragmentation_no_reassembly \ get_state \ icmp \ + icmp6 \ if_enc \ limits \ loginterface \ diff --git a/tests/sys/netpfil/pf/icmp6.sh b/tests/sys/netpfil/pf/icmp6.sh new file mode 100644 index 000000000000..35d20c83cc4f --- /dev/null +++ b/tests/sys/netpfil/pf/icmp6.sh @@ -0,0 +1,89 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Rubicon Communications, LLC (Netgate) +# +# 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. + +. $(atf_get_srcdir)/utils.subr + +common_dir=$(atf_get_srcdir)/../common + +atf_test_case "zero_id" "cleanup" +zero_id_head() +{ + atf_set descr 'Test ICMPv6 echo with ID 0 keep being blocked' + atf_set require.user root + atf_set require.progs scapy +} + +zero_id_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad + + # Sanity check + atf_check -s exit:0 -o ignore \ + ping -c 1 2001:db8::1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set block-policy drop" \ + "antispoof quick for { egress ${epair}b }" \ + "block all" \ + "pass out" \ + "pass in quick inet6 proto IPV6-ICMP icmp6-type 135" \ + "pass in quick inet6 proto IPV6-ICMP icmp6-type 136" \ + "pass out quick inet6 proto IPV6 from self to any" + + # Now we can't ping + atf_check -s exit:2 -o ignore \ + ping -c 1 2001:db8::1 + + # Force neighbour discovery + ndp -d 2001:db8::1 + + # Verify that we don't confuse echo request with ID 0 for neighbour discovery + atf_check -s exit:1 -o ignore \ + ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 2001:db8::1 \ + --replyif ${epair}a + + jexec alcatraz pfctl -ss -vv + jexec alcatraz pfctl -sr -vv +} + +zero_id_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "zero_id" +} From nobody Mon Jul 29 17:55:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXmGt6FLYz5RgX2; Mon, 29 Jul 2024 17:55:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXmGt5W8Wz4Pq4; Mon, 29 Jul 2024 17:55:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722275718; 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=+XG/EwWURgtiUPwNlsD5yp5aaqDBgzmDz2wQ4QdQmOY=; b=LQtXAbDRb1tIV3wuszosAzaHiqJR7zv+sOiaLYcSiLZzqHmA9xKE2v0/PuQFvvoXfkduzm k+aul7JQH7k/4PJ/xF5Ob3Inqv8rHQCgMe//zoHp+/XzvnWQ5exYTTuXwPV5JdFU4WASPU 3HTw+e1Jn2potyZmXTs1LilaDWOdX9JCnvyKhGjAqeRqm1iB34iKPeuQqkb4fih3tpi7Am G/G7d0xqA+E4pmNBRyr94Fjbpqwz0klQQOMK8rWngoM8BDopE/qkwO9OZZ6rQFpun5gNC5 y6IAFe46XG5hnWFyze086uc3/vbGkK0Ys2OVss+i3k3MXdqERCCQeFcgJcHwTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722275718; a=rsa-sha256; cv=none; b=cUX0E3zSQxkJngpxq3BsqV6dQE5OyZm5vZtZvY/GUEZxH+syhBR9jSwmi+iW5lm5kCsog3 KX2nDFsxg6fpCcgVkrO+9ktMImAVK6YHYNmAfoGbgr+YuFFYe+QcISkg/a67vOzYXH+He3 PZdzdNOPh+XIX37Qm2TFVLGiJ5zgG/Swc5/iKlvHM9O06D8uj8QyLBCN3lo26Rp5+0hZ56 ZdSvnI0F1M3AZAS0bM6Psrvd1PSgKTO+3hsfPCni+1uiyyCuAiWFcPZcW4LTG/Z2SHLrF1 2kxMRY+iW9e0fq1LHbPKKu3BWlfHcLrGevTWTrefpmVoil63ZDPIFFp53g8mLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722275718; 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=+XG/EwWURgtiUPwNlsD5yp5aaqDBgzmDz2wQ4QdQmOY=; b=AYS9vzLEzJuG5gcR1rV9iuVhmfUO37c6l6UHRidzIi50eB+d1Jy83luXECvCQgRbUSeJvd VlR2sdTVBWjy8iNfpghvttq7zgeFySuKIkAU9KR5Gjmw+aI8ss1hyLUFY4DIJ4vcjf0B1c vnIbuB5/2mDclRyredYtQyzrqXJ67nhZfgvu2m5VUyNUTKpE/gSSHFOzx+hoBzvL1BLClA mAMtLPzTZj90O3WW6don1yqRRjjm3enwtSknl1j7ORKbN35l0j8cN3LQF9IJmF8uzJ4c3p RQBZNs2NZ1xspGvobzRPv/6dME5f8/FGjfgdi9PQO7UP3NDbadbUry9Dh3myQw== Received: from [IPV6:2601:5c0:4200:b830:3058:32bd:d7:4892] (unknown [IPv6:2601:5c0:4200:b830:3058:32bd:d7:4892]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WXmGt3621z1TLc; Mon, 29 Jul 2024 17:55:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 29 Jul 2024 13:55:17 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 Content-Language: en-US To: Warner Losh , Mark Johnston Cc: Yuri Pankov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/29/24 13:40, Warner Losh wrote: > On Mon, Jul 29, 2024 at 10:39 AM Mark Johnston wrote: > >> On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote: >>> Mark Johnston wrote: >>>> The branch main has been updated by markj: >>>> >>>> URL: >> https://cgit.FreeBSD.org/src/commit/?id=801c452795ac441523655eb3277051b7b034becf >>>> >>>> commit 801c452795ac441523655eb3277051b7b034becf >>>> Author: Mark Johnston >>>> AuthorDate: 2024-07-29 14:12:40 +0000 >>>> Commit: Mark Johnston >>>> CommitDate: 2024-07-29 14:17:04 +0000 >>>> >>>> man9: Really complete the removal of MD5.9 >>>> >>>> Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate >> kernel side manual page.") >>>> Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual page >> from section 9.") >>>> --- >>>> ObsoleteFiles.inc | 2 ++ >>>> share/man/man9/Makefile | 2 -- >>>> 2 files changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc >>>> index b21778466800..01b4824e8692 100644 >>>> --- a/ObsoleteFiles.inc >>>> +++ b/ObsoleteFiles.inc >>>> @@ -56,6 +56,8 @@ OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz >>>> >>>> # 20240729: remove MD5(9) >>>> OLD_FILES+=usr/share/man/man9/MD5.9.gz >>>> +OLD_FILES+=usr/share/man/man9/MD5Init.9 >>>> +OLD_FILES+=usr/share/man/man9/MD5Transform.9 >>> >>> This really needs to be smarter, but you have to specify .gz suffix for >>> man entries as we have compression enabled by default. >> >> Sigh, who knew it was so difficult to remove a man page. >> > > There is a pull request being worked on that will be smarter about what's > removed since we have compress (UFS) and uncompress (ZFS) setups > now. Does it just add an OLD_MAN helper variable to use instead of OLD_FILES and then try the various extension combinations for each OLD_MAN? -- John Baldwin From nobody Mon Jul 29 18:02:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXmRD2H6yz5RhGn; Mon, 29 Jul 2024 18:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXmRD1mftz4QR9; Mon, 29 Jul 2024 18:02:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722276152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvewLn8LFCzmYOttrrzatU9JqhAkzf97Q9HBz7ca9mo=; b=wX6ay/LSRPO3uVK9+6u5IMdUIKEz9GlYGnC9a/sPQK3F4Pk1LDzDoGtDKOCxlFHx7SWsvK zHCaI+f54jjUKcHjI/yTP96LwMiupyJwwghXMiFykiacX/vsioAL+aqe5+rOBSnW3bYeL/ Fv5b+iAOoQaE8Huef7p5w8XeQr0KKjWNH90XQx8+/6QnQnkKpVZSp4eMXNFbA5kxDUxBNp /BKd3GQJMsRjSiWNx258qmlWTY98uvDPEbyg9DqmT/tGyH8HatLbM98D6OiFpDQZafkPxF IrR1xL+hT9C52baXtlCqH/EcC4oYQBfzDe5e/yZ6eo63A/s4BMvPQ/QrIa7ZnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722276152; a=rsa-sha256; cv=none; b=B1BSWo8r7W/3y4zJdgPGHeIJy9DBdBHJY7fm776YjweBYKNvMSSuIkwtPutuXHetPrFpgI 2d76S4MVhPasmVKLnNSZFMFVXca1VyclI6UbR3TChiPJ9OZQB7ZUcILH46/p44qQ4752Os +XmyQOrpJoYxpwAFB29MaBawdvmVjBqymS3BMsiBGE4wyppWQmmCdhFLUwGYIMBdfdYYM7 SNoHDi9YGptpaf1uv2h/j8bWgktxT9+XLuwONqd6VFB6CqtT52X+nB8b/b7aox6FVNGCfB JkM79UEirH/S7XvWftZplGILhYSXXkVERO4QnG4oSvQUbTpodNv+3wbre+HLGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722276152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvewLn8LFCzmYOttrrzatU9JqhAkzf97Q9HBz7ca9mo=; b=xI/SCWj+EAsA6CsIfT6Ryq3j0DP1Rj2SfepfQiBUkDEtYUj0Bf60ScRRTvw89PIqAGozmv uKocNcRrvHvM0t5uucM9fTIG1wb3DFcxVC+hA4IwY7/QxIqEp65m+lcjZ5UTJSNY2XsqHL goQJviNjOCY+9Wyzj+/JrVor1K5nGIezamiAvM6z3qbfVm4Meth4VAnaI7s/IztwvadRWp jhOlxWqU1OuQMtogaQoUPxRjMZXd+/58ookCAhu0he6aRvd0XUE7Vfg8AyoP6TgmI2RQ0R 22Bg+82v2uEHpkWccx7EHxTgIMO5E4TzoHPNKIcl/fydIwhLBzb/5phAkc3Shg== 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 4WXmRD1Mvxzl4G; Mon, 29 Jul 2024 18:02:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TI2W2U057721; Mon, 29 Jul 2024 18:02:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TI2WA8057718; Mon, 29 Jul 2024 18:02:32 GMT (envelope-from git) Date: Mon, 29 Jul 2024 18:02:32 GMT Message-Id: <202407291802.46TI2WA8057718@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: 4113ea3403fc - main - vm_object: speed up page collect flush List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4113ea3403fc6abc5e3c51eb027ccef714c89270 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=4113ea3403fc6abc5e3c51eb027ccef714c89270 commit 4113ea3403fc6abc5e3c51eb027ccef714c89270 Author: Doug Moore AuthorDate: 2024-07-29 17:59:24 +0000 Commit: Doug Moore CommitDate: 2024-07-29 18:02:13 +0000 vm_object: speed up page collect flush vm_pageout_cluster prepares an array for passing to vm_pageout_flush by starting in the middle of a double-sized array and working out from the middle. Using the same technique in vm_object_page_collect_flush saves one loop that traverses a piece of linked list, and 80 bytes of amd64 binary code. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46173 --- sys/vm/vm_object.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 0af4402938ba..be21081255c2 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1115,17 +1115,14 @@ static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int pagerflags, int flags, boolean_t *allclean, boolean_t *eio) { - vm_page_t ma[vm_pageout_page_count], p_first, tp; - int count, i, mreq, runlen; + vm_page_t ma[2 * vm_pageout_page_count], tp; + int count, mreq, runlen; vm_page_lock_assert(p, MA_NOTOWNED); vm_page_assert_xbusied(p); VM_OBJECT_ASSERT_WLOCKED(object); - - count = 1; - mreq = 0; - - for (tp = p; count < vm_pageout_page_count; count++) { + ma[vm_pageout_page_count] = p; + for (count = 1, tp = p; count < vm_pageout_page_count; count++) { tp = vm_page_next(tp); if (tp == NULL || vm_page_tryxbusy(tp) == 0) break; @@ -1133,24 +1130,22 @@ vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int pagerflags, vm_page_xunbusy(tp); break; } + ma[vm_pageout_page_count + count] = tp; } - for (p_first = p; count < vm_pageout_page_count; count++) { - tp = vm_page_prev(p_first); + for (mreq = 0, tp = p; count < vm_pageout_page_count; count++, mreq++) { + tp = vm_page_prev(tp); if (tp == NULL || vm_page_tryxbusy(tp) == 0) break; if (!vm_object_page_remove_write(tp, flags, allclean)) { vm_page_xunbusy(tp); break; } - p_first = tp; - mreq++; + ma[vm_pageout_page_count - 1 - mreq] = tp; } - for (tp = p_first, i = 0; i < count; tp = TAILQ_NEXT(tp, listq), i++) - ma[i] = tp; - - vm_pageout_flush(ma, count, pagerflags, mreq, &runlen, eio); + vm_pageout_flush(&ma[vm_pageout_page_count - mreq], count, pagerflags, + mreq, &runlen, eio); return (runlen); } From nobody Mon Jul 29 19:00:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXnkY40j8z5Rn1x; Mon, 29 Jul 2024 19:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXnkY3Twpz4WK0; Mon, 29 Jul 2024 19:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722279653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NdZwnXdL8atJ0mqjgYgWm9GLLgcL8jkoD/0buVYyJ+M=; b=lr0EpKy6HqvfiNLwXeqt0fUCYRIKx4qtp73cB9uPdzSvmsbpO+6hSq0Z79Kz1BW+qsI4xj xDXAqOcTKsoTkaQA328Eawm1HewfTrD2OESSF91Z3mBoLzcNkZa/1WBTYooOLMtTAqETrO xV3vY5zVu+mfsTFnoQQteqC8rrZjc20ygJfX6E5FR7+EdZwBHXARnfTVwt1OEERRsswgog w5RNxwB2URpgL3MuFBLrFnG37VgluGVRZPXGgYHUHCdLvCq3XuEnMnYfITqh6Dryubqmrc EwPG698XdoT6lt8tYLs4UjJY6zTtAuhlDANfNohJH64COYmgLNJoKeXbcsGtSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722279653; a=rsa-sha256; cv=none; b=is4okjQ3ZrumFa89Q6mdYc15LtcqaQ50K01rTjTHESV4RolbZtvGC7tGErv9IfVjPmyBBi qctHaNhOKPfB0okib1ES2X0MWgl/9/OCVuyJs+0JbwH8ut2YyxhCxnaHVsg1yG2eHKYUqB nAq6i7mLbbUgITTco2evWUaXP2d5vVhk960yX2qhJlipjhgTTrCDVHojiAvYHn5yLZx6H/ dCpapgRwG8+IlVtNYM2iAdHqfde92k5W8eZzWgYxvl0Z4hIc8o0oWgBe3OHFhxLOUkziu+ NeDcOFJDThNsT1G4bd/TxLp6hg7qKyFph5Vu0wdKPSwgc97n6v1pxRnOAa4vEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722279653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NdZwnXdL8atJ0mqjgYgWm9GLLgcL8jkoD/0buVYyJ+M=; b=E9EhTbl/1XxoDCJzIFWf5I2rveWTI1Q+ZfhY4lHn7L5fUo1Cxfh6HhNJT7aa21zKwVjtyT T7M7micCuhmFaAAQgn4txQLBw/2G/Hv8M3BQ+EeLDmB5o35q9MBRWIy+vLNHr5UnMXudUp XNBjhN2PzgnMtPUz5HKu1fOWztA7KppYkpTBF0BqphIKFDsRytkyxXCYomesXGKUlvP0F9 QtR8A7h7I9Z/HhumygPhOoc4VOm1Wrn5nbMSocYkiq7rGKtfCph6fa3y/RYxRWRWc6ATJH hUpZ5b5bOTIeUTFw+HnKIhlAxyJzQpaSDVgNzR2TkqOOBcc/ii2KYwva/dd/EA== 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 4WXnkY35PXzmFW; Mon, 29 Jul 2024 19:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TJ0rRR055856; Mon, 29 Jul 2024 19:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TJ0rhr055853; Mon, 29 Jul 2024 19:00:53 GMT (envelope-from git) Date: Mon, 29 Jul 2024 19:00:53 GMT Message-Id: <202407291900.46TJ0rhr055853@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: 4a06d149371c - main - depend-cleanup: remove entries from 2020 and 2021 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4a06d149371c16287e1dd5a8fa51e92346a0c3f4 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4a06d149371c16287e1dd5a8fa51e92346a0c3f4 commit 4a06d149371c16287e1dd5a8fa51e92346a0c3f4 Author: Ed Maste AuthorDate: 2024-07-29 17:06:48 +0000 Commit: Ed Maste CommitDate: 2024-07-29 18:57:32 +0000 depend-cleanup: remove entries from 2020 and 2021 > These tests increase the build time (albeit by a small amount), so > they should be removed once enough time has passed and it is extremely > unlikely anyone would try a NO_CLEAN build against an object tree from > before the related change. The comment suggests a year is a reasonable period but we'll be somewhat more conservative for now, in part so that we retain different examples of special cases. Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46178 --- tools/build/depend-cleanup.sh | 51 ------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 45f04c0ace73..b93d50a57ff4 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -103,57 +103,6 @@ clean_dep() } # Date Rev Description -# 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp -clean_dep lib/libomp ittnotify_static c -# 20200414 r359930 closefrom -clean_dep lib/libc closefrom S - -# 20200826 r364746 OpenZFS merge, apply a big hammer (remove whole tree) -if [ -e "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o ] && \ - egrep -qw "cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c" \ - "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o; then - echo "Removing old ZFS tree" - for libcompat in "" $ALL_libcompats; do - dirprfx=${libcompat:+obj-lib${libcompat}/} - run rm -rf "$OBJTOP"/${dirprfx}cddl - done -fi - -# 20200916 WARNS bumped, need bootstrapped crunchgen stubs -if [ -e "$OBJTOP"/rescue/rescue/rescue.c ] && \ - ! grep -q 'crunched_stub_t' "$OBJTOP"/rescue/rescue/rescue.c; then - echo "Removing old rescue(8) tree" - run rm -rf "$OBJTOP"/rescue/rescue -fi - -# 20210105 fda7daf06301 pfctl gained its own version of pf_ruleset.c -if [ -e "$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o ] && \ - egrep -qw "sys/netpfil/pf/pf_ruleset.c" \ - "$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o; then - echo "Removing old pf_ruleset dependecy file" - run rm -rf "$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o -fi - -# 20210108 821aa63a0940 non-widechar version of ncurses removed -if [ -e "$OBJTOP"/lib/ncurses/ncursesw ]; then - echo "Removing stale ncurses objects" - for libcompat in "" $ALL_libcompats; do - dirprfx=${libcompat:+obj-lib${libcompat}/} - run rm -rf "$OBJTOP"/${dirprfx}lib/ncurses - done -fi - -# 20210608 f20893853e8e move from atomic.S to atomic.c -clean_dep cddl/lib/libspl atomic S -# 20211207 cbdec8db18b5 switch to libthr-friendly pdfork -clean_dep lib/libc pdfork S - -# 20211230 5e6a2d6eb220 libc++.so.1 path changed in ldscript -if [ -e "$OBJTOP"/lib/libc++/libc++.ld ] && \ - fgrep -q "/usr/lib/libc++.so" "$OBJTOP"/lib/libc++/libc++.ld; then - echo "Removing old libc++ linker script" - run rm -f "$OBJTOP"/lib/libc++/libc++.ld -fi # 20220326 fbc002cb72d2 move from bcmp.c to bcmp.S if [ "$MACHINE_ARCH" = "amd64" ]; then From nobody Mon Jul 29 19:18:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXp7Q66cCz5RphB for ; Mon, 29 Jul 2024 19:18:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXp7Q3qX8z4Z7R for ; Mon, 29 Jul 2024 19:18:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1fc49c0aaffso21870475ad.3 for ; Mon, 29 Jul 2024 12:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722280736; x=1722885536; 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=EivefK6cYbUK2GZOS47nur5ppQuoAdnWo4bEg4OCG6c=; b=HkPk7uWNnXnsy31rPkh8ufi8FY5r84pBtIPI0T83IINL8IvASn02l7d7/pvY95kKQK FLh0zAIn19zq9faPqz+/dY9/fYYm0molifC+UMkCYkAMbf7VHzHqnA3P4/nQDySnxp3o SFhCm0YcoLrVrxVtzET2ZabAx85hR3+57jUSAMHE1rkAVTaqL5PMXHedh3Y9Iint+40e yH1qWrj8yB5he+obmvyWhyJ2cTnTeICAON0il9BEtZ6SWNEp5MEuY5b/NJAZqdulIC0f 90ERpu13EzCeqU1zaKqAuX2XeqY7tO7XHXs4f6JgX55SRkQ/pGgVBhVCAxqP8maLfwkz E11w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722280736; x=1722885536; 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=EivefK6cYbUK2GZOS47nur5ppQuoAdnWo4bEg4OCG6c=; b=kFsE5A3pJr6sgMZl+DmQzDe3sppHfjoX4u9K1g3NT7Yp2ZnYk5CrC5l1k/No4k1+yV LjOH6KeZLVy5g5iJSzLa0g3+1hWqwlDeY//uSG4erZPcCdMMopOhJgLqAA90gyBqHVw0 W0JW5ot9jnya4uQ16Gb5SpnzlkX5SEOKxY2P2hcv+ctU8nnIcy/uqKP3t6njER6ScM93 hs6OQZIuyeivxxRPVb1nPbsU9sokA5XcnzSscBzY2CTZcrDFHH6ykztyE47Wh45qtkhB QvjUe2XA3OWeNrDABW/ETUUmX+h1se8DMIUAZ3VC0/Ef0Nr9Bq7Rb1fMQem9UVOOjsAy ZXVQ== X-Forwarded-Encrypted: i=1; AJvYcCXzCtpw1mrR2AH4az4oXmjj/TxQJa1rQZGEnUp8UyhWuobEylwI54tVJDS+V8CRHoUEQMobteoTT4kSsrtKz7zCtZquZmP3Qji/d6p51+Qo X-Gm-Message-State: AOJu0YxZ+hHSwr+Oz6P2sq9XBvNoDNBtJP/cU9+daDheivbnL6sMGKfB gbi2pf33gUlWHnhPzSd8Lct3bI4Xa8nobUhhd4EwzrY8fMQHjcMN2VWeO8swWgts6J+lcbvlosB CpFSQqfv5YSpfk0WyHuQ03tCnT5cGPkFfA0G1E+hzc0xtgRRQmU0/4g== X-Google-Smtp-Source: AGHT+IGjDQ4feQc5Tbkoh5IQhs8FqmRkUDQIvVnj6a4//ISI2XBoNTn4kghZNx/RCfQ0HCtxGrE2n8iZni6kbGJntN0= X-Received: by 2002:a17:90a:9281:b0:2cb:51e4:3ed3 with SMTP id 98e67ed59e1d1-2cf7e1c84a1mr6961586a91.18.1722280736341; Mon, 29 Jul 2024 12:18:56 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> In-Reply-To: From: Warner Losh Date: Mon, 29 Jul 2024 13:18:45 -0600 Message-ID: Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 To: John Baldwin Cc: Mark Johnston , Yuri Pankov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000007e5a29061e67bba0" 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: 4WXp7Q3qX8z4Z7R --0000000000007e5a29061e67bba0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey John, On Mon, Jul 29, 2024 at 11:55=E2=80=AFAM John Baldwin wro= te: > On 7/29/24 13:40, Warner Losh wrote: > > On Mon, Jul 29, 2024 at 10:39=E2=80=AFAM Mark Johnston > wrote: > > > >> On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote: > >>> Mark Johnston wrote: > >>>> The branch main has been updated by markj: > >>>> > >>>> URL: > >> > https://cgit.FreeBSD.org/src/commit/?id=3D801c452795ac441523655eb3277051b= 7b034becf > >>>> > >>>> commit 801c452795ac441523655eb3277051b7b034becf > >>>> Author: Mark Johnston > >>>> AuthorDate: 2024-07-29 14:12:40 +0000 > >>>> Commit: Mark Johnston > >>>> CommitDate: 2024-07-29 14:17:04 +0000 > >>>> > >>>> man9: Really complete the removal of MD5.9 > >>>> > >>>> Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate > >> kernel side manual page.") > >>>> Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual > page > >> from section 9.") > >>>> --- > >>>> ObsoleteFiles.inc | 2 ++ > >>>> share/man/man9/Makefile | 2 -- > >>>> 2 files changed, 2 insertions(+), 2 deletions(-) > >>>> > >>>> diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > >>>> index b21778466800..01b4824e8692 100644 > >>>> --- a/ObsoleteFiles.inc > >>>> +++ b/ObsoleteFiles.inc > >>>> @@ -56,6 +56,8 @@ OLD_FILES+=3Dusr/share/man/man9/ifaddr_byindex.9.g= z > >>>> > >>>> # 20240729: remove MD5(9) > >>>> OLD_FILES+=3Dusr/share/man/man9/MD5.9.gz > >>>> +OLD_FILES+=3Dusr/share/man/man9/MD5Init.9 > >>>> +OLD_FILES+=3Dusr/share/man/man9/MD5Transform.9 > >>> > >>> This really needs to be smarter, but you have to specify .gz suffix f= or > >>> man entries as we have compression enabled by default. > >> > >> Sigh, who knew it was so difficult to remove a man page. > >> > > > > There is a pull request being worked on that will be smarter about what= 's > > removed since we have compress (UFS) and uncompress (ZFS) setups > > now. > > Does it just add an OLD_MAN helper variable to use instead of OLD_FILES > and then try the various extension combinations for each OLD_MAN? > https://github.com/freebsd/freebsd-src/pull/1295 was submitted a bit ago. the repetition is why I've not committed it. Is an approach like that good, or should we move all the old man pages to OLD_MAN? Warner > -- > John Baldwin > > --0000000000007e5a29061e67bba0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey John,

On Mon, Jul 29, 2024 at 11:5= 5=E2=80=AFAM John Baldwin <jhb@freebs= d.org> wrote:
On 7/29/24 13:40, Warner Losh wrote:
> On Mon, Jul 29, 2024 at 10:39=E2=80=AFAM Mark Johnston <markj@freebsd.org> wrote= :
>
>> On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote:
>>> Mark Johnston wrote:
>>>> The branch main has been updated by markj:
>>>>
>>>> URL:
>> https://c= git.FreeBSD.org/src/commit/?id=3D801c452795ac441523655eb3277051b7b034becf
>>>>
>>>> commit 801c452795ac441523655eb3277051b7b034becf
>>>> Author:=C2=A0 =C2=A0 =C2=A0Mark Johnston <markj@FreeBSD= .org>
>>>> AuthorDate: 2024-07-29 14:12:40 +0000
>>>> Commit:=C2=A0 =C2=A0 =C2=A0Mark Johnston <markj@FreeBSD= .org>
>>>> CommitDate: 2024-07-29 14:17:04 +0000
>>>>
>>>>=C2=A0 =C2=A0 =C2=A0 man9: Really complete the removal of M= D5.9
>>>>
>>>>=C2=A0 =C2=A0 =C2=A0 Fixes:=C2=A0 46b0db2dbe9f ("Remov= e unnecessary and now inaccurate
>> kernel side manual page.")
>>>>=C2=A0 =C2=A0 =C2=A0 Fixes:=C2=A0 36d68cb2ddd2 ("Compl= ete the removal of the MD5 manual page
>> from section 9.")
>>>> ---
>>>>=C2=A0 =C2=A0ObsoleteFiles.inc=C2=A0 =C2=A0 =C2=A0 =C2=A0| = 2 ++
>>>>=C2=A0 =C2=A0share/man/man9/Makefile | 2 --
>>>>=C2=A0 =C2=A02 files changed, 2 insertions(+), 2 deletions(= -)
>>>>
>>>> diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
>>>> index b21778466800..01b4824e8692 100644
>>>> --- a/ObsoleteFiles.inc
>>>> +++ b/ObsoleteFiles.inc
>>>> @@ -56,6 +56,8 @@ OLD_FILES+=3Dusr/share/man/man9/ifaddr_b= yindex.9.gz
>>>>
>>>>=C2=A0 =C2=A0# 20240729: remove MD5(9)
>>>>=C2=A0 =C2=A0OLD_FILES+=3Dusr/share/man/man9/MD5.9.gz
>>>> +OLD_FILES+=3Dusr/share/man/man9/MD5Init.9
>>>> +OLD_FILES+=3Dusr/share/man/man9/MD5Transform.9
>>>
>>> This really needs to be smarter, but you have to specify .gz s= uffix for
>>> man entries as we have compression enabled by default.
>>
>> Sigh, who knew it was so difficult to remove a man page.
>>
>
> There is a pull request being worked on that will be smarter about wha= t's
> removed since we have compress (UFS) and uncompress (ZFS) setups
> now.

Does it just add an OLD_MAN helper variable to use instead of OLD_FILES
and then try the various extension combinations for each OLD_MAN?

=

was submitted a bit ago. the repetition is why I've= not committed it. Is an approach
like that good, or should we mo= ve all the old man pages to OLD_MAN?

Warner
<= div>=C2=A0
--
John Baldwin

--0000000000007e5a29061e67bba0-- From nobody Mon Jul 29 19:37:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXpY70yjpz5RrM7; Mon, 29 Jul 2024 19:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXpY70SWcz4cgG; Mon, 29 Jul 2024 19:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722281867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91o5gsL9QXnlj7PJzLuPPgMGwGpuw7+X/t5JMv2zrvg=; b=GCbt7n2xyGmbpE9hdV3iIZMLm5jzJLVkMXNfoXagPs+Zgg0tECIcTCy+vx9VYoz2DdLYVt PITSLJC4YhHR9bF64AJa7FMd4w229gv9OEPM7e9R8oc4DwvU+PBh2FY7DSrWxhl04Gip0/ yUA9QR5nYYFyYO2URnuzQgZS7+iSkWpDtMlPjtK2GQycEo3i7a1UabMwCxo9hk91m2lWgE SUHFU/AX00rvXjnaji2II/FfnIx5m8lnbllG91NYV83l5qF7fosnK/MAFoQ0YmWINI1imh 6ja1QAGiz8qsvrIzUpIQ47Jyozc1hiM+QkowF2Qtl51PEF7BtGF8VzJufuPrmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722281867; a=rsa-sha256; cv=none; b=FPVtVuQNk6kExiGnRZ1SF4+UU8x+MEkTaPVGBK1sQcEnvXv7H+E4DN0IFhiXav9PNEDTS9 vSRZRYsaYTHTzVwFhfVdFyRN+7j3MgQudCkpCCfnaKAO3mzFwd71NxgFLoXK+FU5PW/I4x Sjb0R0UcEDyrsd6VgFzMJpAsvm8n0S7WgXCvSSsZf2+shwUno6rsVh48N+vglaGVd35N9T +cEBkB3HNiakmaMPg/elXfXI7e9GL5T/afbfJeQ2tIrfO7R2xSteN52yu77aHD79KHU5Ke mFi9QuHFsOI8BUqKR877DgQH1xE6T8QHwj6qJlkRPC+9hkVAoKcmJOfr1JZ1mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722281867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91o5gsL9QXnlj7PJzLuPPgMGwGpuw7+X/t5JMv2zrvg=; b=ITtmFTMJqIWBOaHNbkFSKyw+C00XOdPZup3h97KDFuQ6p0qxSiaAwl5+KJpy4zM3PAHBhF YISvPvEmVTr1MW4hVNtk9UMegBpz/06Wml/Xfm9QWN/GlG4S4tgWTdtTuELZnQKe1HpoNT /y0Tpg35OUVTBKTPV2bltxyBvVat/Z5rvPShBbcES9qajK/0DX/T0+OijJTtY+ejX6hrrn 0mcoh7eE2ArdEmOdeT2aGm/CT4vosKIdJwHtE8FWoO5lo/SjAIRQOSImjZ5VyMankIT14S x/ImJH/cl1kkvpsc3QRXM08RZt5nwIMLum2jZzUfWU/i+mfneQYbI12G6S5phg== 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 4WXpY7047nznQq; Mon, 29 Jul 2024 19:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TJbkgC011248; Mon, 29 Jul 2024 19:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TJbkdQ011245; Mon, 29 Jul 2024 19:37:46 GMT (envelope-from git) Date: Mon, 29 Jul 2024 19:37:46 GMT Message-Id: <202407291937.46TJbkdQ011245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 9082398090bc - main - lib/libc/amd64/string: fix overread condition in memccpy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9082398090bcf0ac333397d47e594b105ea3aefd Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=9082398090bcf0ac333397d47e594b105ea3aefd commit 9082398090bcf0ac333397d47e594b105ea3aefd Author: Robert Clausecker AuthorDate: 2024-07-20 19:53:04 +0000 Commit: Robert Clausecker CommitDate: 2024-07-29 19:36:10 +0000 lib/libc/amd64/string: fix overread condition in memccpy An overread condition in memccpy(dst, src, c, len) would occur if src does not cross a 16 byte boundary and there is no instance of c between *src and the next 16 byte boundary. This could cause a read fault if src is just before the end of a page and the next page is unmapped or unreadable. The bug is a consequence of basing memccpy() on the strlcpy() code: whereas strlcpy() assumes that src is a nul-terminated string and hence a terminator is always present, c may not be present at all in the source string. It was not caught earlier due to insufficient unit test design. As a part of the fix, the function is refactored such that the runt case (buffer length from last alignment boundary between 1 and 32 B) is handled separately. This reduces the number of conditional branches on all code paths and simplifies the handling of early matches in the non-runt case. Performance is improved slightly. os: FreeBSD arch: amd64 cpu: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz │ memccpy.unfixed.out │ memccpy.fixed.out │ │ sec/op │ sec/op vs base │ Short 66.76µ ± 0% 62.45µ ± 1% -6.44% (p=0.000 n=20) Mid 7.938µ ± 0% 7.967µ ± 0% +0.36% (p=0.001 n=20) Long 3.577µ ± 0% 3.577µ ± 0% ~ (p=0.429 n=20) geomean 12.38µ 12.12µ -2.08% │ memccpy.unfixed.out │ memccpy.fixed.out │ │ B/s │ B/s vs base │ Short 1.744Gi ± 0% 1.864Gi ± 1% +6.89% (p=0.000 n=20) Mid 14.67Gi ± 0% 14.61Gi ± 0% -0.36% (p=0.001 n=20) Long 32.55Gi ± 0% 32.55Gi ± 0% ~ (p=0.429 n=20) geomean 9.407Gi 9.606Gi +2.12% Reported by: getz Reviewed by: getz Approved by: mjg (blanket, via IRC) See also: D46051 MFC: stable/14 Event: GSoC 2024 Differential Revision: https://reviews.freebsd.org/D46052 --- lib/libc/amd64/string/memccpy.S | 113 ++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/lib/libc/amd64/string/memccpy.S b/lib/libc/amd64/string/memccpy.S index a2d9e33b3d36..69b650fffc33 100644 --- a/lib/libc/amd64/string/memccpy.S +++ b/lib/libc/amd64/string/memccpy.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 The FreeBSD Foundation + * Copyright (c) 2023, 2024 The FreeBSD Foundation * * This software was developed by Robert Clausecker * under sponsorship from the FreeBSD Foundation. @@ -83,34 +83,47 @@ ARCHENTRY(__memccpy, baseline) pshufd $0, %xmm4, %xmm4 # cccc -> cccccccccccccccc and $~0xf, %rsi movdqa %xmm4, %xmm1 - pcmpeqb (%rsi), %xmm1 # NUL found in head? - mov $-1, %r8d + pcmpeqb (%rsi), %xmm1 # c found in head? and $0xf, %ecx - shl %cl, %r8d # mask of bytes in the string - pmovmskb %xmm1, %eax + mov $-1, %eax + pmovmskb %xmm1, %r8d + lea -32(%rcx), %r11 + shl %cl, %eax # mask of bytes in the string + add %rdx, %r11 # distance from alignment boundary - 32 + jnc .Lrunt # jump if buffer length is 32 or less + and %r8d, %eax - jnz .Lhead_nul + jz 0f # match (or induced match) found? + + /* match in first chunk */ + tzcnt %eax, %edx # where is c? + sub %ecx, %edx # ... from the beginning of the string? + lea 1(%rdi, %rdx, 1), %rax # return value + jmp .L0116 - movdqa 16(%rsi), %xmm3 # load second string chunk +0: movdqa 16(%rsi), %xmm3 # load second string chunk movdqu (%r9), %xmm2 # load unaligned string head - mov $32, %r8d - sub %ecx, %r8d # head length + length of second chunk movdqa %xmm4, %xmm1 - pcmpeqb %xmm3, %xmm1 # NUL found in second chunk? - - sub %r8, %rdx # enough space left for the second chunk? - jb .Lhead_buf_end + pcmpeqb %xmm3, %xmm1 # c found in second chunk? /* process second chunk */ pmovmskb %xmm1, %eax test %eax, %eax - jnz .Lsecond_nul + jz 0f + + /* match in second chunk */ + tzcnt %eax, %edx # where is c? + sub $16, %ecx + sub %ecx, %edx # adjust for alignment offset + lea 1(%rdi, %rdx, 1), %rax # return value + jmp .L0132 - /* string didn't end in second chunk and neither did buffer -- not a runt! */ - movdqa 32(%rsi), %xmm0 # load next string chunk + /* c not found in second chunk: prepare for main loop */ +0: movdqa 32(%rsi), %xmm0 # load next string chunk movdqa %xmm4, %xmm1 movdqu %xmm2, (%rdi) # deposit head into buffer sub %rcx, %rdi # adjust RDI to correspond to RSI + mov %r11, %rdx movdqu %xmm3, 16(%rdi) # deposit second chunk sub %rsi, %rdi # express RDI as distance from RSI add $32, %rsi # advance RSI past first two chunks @@ -119,7 +132,7 @@ ARCHENTRY(__memccpy, baseline) /* main loop unrolled twice */ ALIGN_TEXT -0: pcmpeqb %xmm0, %xmm1 # NUL byte encountered? +0: pcmpeqb %xmm0, %xmm1 # c encountered? pmovmskb %xmm1, %eax test %eax, %eax jnz 3f @@ -131,7 +144,7 @@ ARCHENTRY(__memccpy, baseline) jb 2f add $32, %rsi # advance pointers to next chunk - pcmpeqb %xmm0, %xmm1 # NUL byte encountered? + pcmpeqb %xmm0, %xmm1 # c encountered? pmovmskb %xmm1, %eax test %eax, %eax jnz 4f @@ -146,11 +159,10 @@ ARCHENTRY(__memccpy, baseline) add $16, %edx /* 1--16 bytes left in the buffer but string has not ended yet */ -2: pcmpeqb %xmm1, %xmm0 # NUL byte encountered? +2: pcmpeqb %xmm1, %xmm0 # c encountered? pmovmskb %xmm0, %r8d mov %r8d, %ecx bts %edx, %r8d # treat end of buffer as end of string - or $0x10000, %eax # ensure TZCNT finds a set bit tzcnt %r8d, %r8d # find tail length add %rsi, %rdi # restore RDI movdqu 1(%rsi, %r8, 1), %xmm0 # load string tail @@ -162,42 +174,39 @@ ARCHENTRY(__memccpy, baseline) ret 4: sub $16, %rsi # undo second advancement - add $16, %rdx # restore number of remaining bytes - /* string has ended but buffer has not */ + /* terminator found and buffer has not ended yet */ 3: tzcnt %eax, %eax # find length of string tail - movdqu -15(%rsi, %rax, 1), %xmm0 # load string tail (incl. NUL) + movdqu -15(%rsi, %rax, 1), %xmm0 # load string tail (incl. c) add %rsi, %rdi # restore destination pointer - movdqu %xmm0, -15(%rdi, %rax, 1) # store string tail (incl. NUL) + movdqu %xmm0, -15(%rdi, %rax, 1) # store string tail (incl. c) lea 1(%rdi, %rax, 1), %rax # compute return value ret -.Lhead_buf_end: - pmovmskb %xmm1, %r8d - add $32, %edx # restore edx to (len-1) + ecx - shl $16, %r8d # place 2nd chunk NUL mask into bits 16--31 - mov %r8d, %r10d - bts %rdx, %r8 # treat end of buffer as if terminator present - xor %eax, %eax # return value if terminator not found - tzcnt %r8, %rdx # find string/buffer len from alignment boundary + /* buffer is 1--32 bytes in size */ + ALIGN_TEXT +.Lrunt: add $32, %r11d # undo earlier decrement + mov %r8d, %r10d # keep a copy of the original match mask + bts %r11d, %r8d # induce match at buffer end + and %ax, %r8w # is there a match in the first 16 bytes? + jnz 0f # if yes, skip looking at second chunk + + pcmpeqb 16(%rsi), %xmm4 # check for match in second chunk + pmovmskb %xmm4, %r8d + shl $16, %r8d # place second chunk matches in bits 16--31 + mov %r8d, %r10d # keep a copy of the original match mask + bts %r11d, %r8d # induce a match at buffer end + +0: xor %eax, %eax # return value if terminator not found + tzcnt %r8d, %edx # find string/buffer length from alignment boundary lea 1(%rdi, %rdx, 1), %r8 # return value if terminator found + rcx - sub %rcx, %r8 # subtract rcx - bt %rdx, %r10 # was the terminator present? + sub %rcx, %r8 + bt %edx, %r10d # was the terminator present? cmovc %r8, %rax # if yes, return pointer, else NULL - sub %ecx, %edx # find actual string/buffer len - jmp .L0132 + sub %ecx, %edx # find actual string/buffer length -.Lsecond_nul: - add %r8, %rdx # restore buffer length - tzcnt %eax, %r8d # where is the NUL byte? - lea -16(%rcx), %eax - sub %eax, %r8d # string length - lea 1(%rdi, %r8, 1), %rax # return value if NUL before end of buffer - xor %ecx, %ecx # return value if not - cmp %r8, %rdx # is the string shorter than the buffer? - cmova %r8, %rdx # copy only min(buflen, srclen) bytes - cmovb %rcx, %rax # return NUL if buffer ended before string -.L0132: cmp $16, %rdx # at least 17 bytes to copy (not incl NUL)? + ALIGN_TEXT +.L0132: cmp $16, %rdx # at least 17 bytes to copy? jb .L0116 /* copy 17--32 bytes */ @@ -207,16 +216,8 @@ ARCHENTRY(__memccpy, baseline) movdqu %xmm1, -15(%rdi, %rdx, 1) ret -.Lhead_nul: - tzcnt %eax, %r8d # where is the NUL byte? - sub %ecx, %r8d # ... from the beginning of the string? - lea 1(%rdi, %r8, 1), %rax # return value if NUL before end of buffer - xor %ecx, %ecx # return value if not - cmp %r8, %rdx # is the string shorter than the buffer? - cmova %r8, %rdx # copy only min(buflen, srclen) bytes - cmovb %rcx, %rax # return NUL if buffer ended before string - /* process strings of 1--16 bytes (rdx: min(buflen, srclen), rax: srclen) */ + ALIGN_TEXT .L0116: cmp $8, %rdx # at least 9 bytes to copy? jae .L0916 From nobody Mon Jul 29 19:49:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXppJ5jjvz5RsDv; Mon, 29 Jul 2024 19: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXppJ59ldz4dyx; Mon, 29 Jul 2024 19: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=1722282552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUzZ6I7mhruGv4qAWic+gZFdntrfvu9o8jCosmmTwE8=; b=IYUrEJ6GZJL4TUkkyT3u+2kZ9nQe1WHjtH77rBHl8JHuIe/yGCi01UCA+mqvJYafThP82S 9yN5y4UI0bS00Qa8CjwlvXaWgLTp3nB70Dyl2Fe5r52p08dnmhSoQpKEK15C01E1lXYOFo 2GOOYV1fprWQEghvu0D+nNkP7AV9cqmWmD7jIC7zPOHZh/SHcWEBs5ClUplCcYxFM1nlKt QZ0xEDQ5UH5c0J1Eq7MaEQb370bsGr5WH1OJGg51R/BVlZ7s8Sz95rlLeVnn4nMZRdG4/Y IMzJbmrIwZ+5sajBwkfNk2bOZzo68EejmE4L98hz0ODP7y5JcwqLBxihdqO7OA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722282552; a=rsa-sha256; cv=none; b=r1LuzmnMtMGD3AMltVR1eHJFTE6j25WTDEG6Rmttux6DAGtQTVV6q0akLN+d5wZhdq7T9H CISSDpaeE2qibmb+Ix62nb9UpDm5cUbWzFsrtJUI5oYHwoyp80aJiH1a2DMkQiuK6/XjTW +N77IV3gIDW6xL72EYpHx6cS4aMPugi68cIYbXL7qplQsy01uMjP9hdbEzfHsApzgTqPPH TvguQaJIryyH9w9HdkwHpOTiekeHkaMfGKOi9g+1YMhDwmQoUWL5XHySkfgKc1EAgp5TlF 3ZJJ/tWxOFG0jJLSYiQtLsm2zn/jQMWA/Q4HogRxXrCdER7/FuLOY99aRN0tew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722282552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUzZ6I7mhruGv4qAWic+gZFdntrfvu9o8jCosmmTwE8=; b=Yz0Kyws3N0IBpyJGH9fFn9Eiej1hxgTgXUE2vjruLXHeNFi0Nd4a25G9lHahETo8Gss8Sz CQdhQrXCQIC2CZEsfUMfidcnzTv2dXmP3KKCjTKvdkk1DyVIGT9LG3M4eOwtOxe7Nnlb0q XdUp7mmFuet2ReN9LpIu4bGVuWF5xiLj4RIN+bvBvJHo5P//Vj7KiMI3LwH6VjcWC/0fA+ 6NvEnIm9+rqgEy4CZmPB0s0BulNHVFrwol+O6+cqgrQXDEtszs6cxakvCBLp1MYeaL1o9b MUN2m9oPJLAprSycwhBT3u4/lulgYPvzyALeeCvVNTATQ3oPpFFNQjXUvDnYcQ== 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 4WXppJ4mr7znfx; Mon, 29 Jul 2024 19:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TJnCdQ028064; Mon, 29 Jul 2024 19:49:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TJnCGG028061; Mon, 29 Jul 2024 19:49:12 GMT (envelope-from git) Date: Mon, 29 Jul 2024 19:49:12 GMT Message-Id: <202407291949.46TJnCGG028061@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: a2b67d4a6e36 - main - Update dirdeps.mk to latest List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a2b67d4a6e364586ae7180cc4696609e8960f955 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a2b67d4a6e364586ae7180cc4696609e8960f955 commit a2b67d4a6e364586ae7180cc4696609e8960f955 Author: Simon J. Gerraty AuthorDate: 2024-07-29 19:48:38 +0000 Commit: Simon J. Gerraty CommitDate: 2024-07-29 19:48:56 +0000 Update dirdeps.mk to latest Also add meta2deps.{py,sh} to FILES so they get installed/staged Reviewed by: stevek --- share/mk/Makefile | 2 ++ share/mk/dirdeps.mk | 51 +++++++++++++++++++++++++++++---------- share/mk/local.dirdeps-targets.mk | 2 ++ share/mk/meta.subdir.mk | 3 +-- 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/share/mk/Makefile b/share/mk/Makefile index 85b39a9c72ea..737b11d5a0f2 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -67,6 +67,8 @@ FILES= \ meta.stage.mk \ meta.subdir.mk \ meta.sys.mk \ + meta2deps.py \ + meta2deps.sh \ ${SRCTOP}/contrib/bmake/mk/posix.mk \ stage-install.sh \ sys.mk \ diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk index b3b34145e8e9..2a9d2ac92102 100644 --- a/share/mk/dirdeps.mk +++ b/share/mk/dirdeps.mk @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.166 2024/01/05 23:16:34 sjg Exp $ +# $Id: dirdeps.mk,v 1.170 2024/06/24 02:21:00 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # @@ -139,7 +139,7 @@ # DIRDEPS_EXPORT_VARS (DEP_EXPORT_VARS) # It is discouraged, but sometimes necessary for a # Makefile.depend file to influence the environment. -# Doing this is correctly (especially if using DIRDEPS_CACHE) is +# Doing this correctly (especially if using DIRDEPS_CACHE) is # tricky so a Makefile.depend file can set DIRDEPS_EXPORT_VARS # and dirdeps.mk will do the deed: # @@ -581,6 +581,7 @@ BUILD_DIRDEPS_MAKEFILE ?= -f dirdeps.mk # these should generally do BUILD_DIRDEPS_MAKEFILE ?= +BUILD_DIRDEPS_OVERRIDES ?= BUILD_DIRDEPS_TARGETS ?= ${.TARGETS} .if ${DIRDEPS_CACHE} != ${STATIC_DIRDEPS_CACHE:Uno} && ${DIRDEPS_CACHE:M${SRCTOP}/*} == "" @@ -600,7 +601,9 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP TARGET_SPEC=${TARGET_SPEC} \ MAKEFLAGS= ${DIRDEP_CACHE_MAKE:U${.MAKE}} -C ${_CURDIR} \ ${BUILD_DIRDEPS_MAKEFILE} \ - ${BUILD_DIRDEPS_TARGETS} BUILD_DIRDEPS_CACHE=yes \ + ${BUILD_DIRDEPS_TARGETS} \ + ${BUILD_DIRDEPS_OVERRIDES} \ + BUILD_DIRDEPS_CACHE=yes \ .MAKE.DEPENDFILE=.none \ ${"${DEBUG_DIRDEPS:Nno}":?DEBUG_DIRDEPS='${DEBUG_DIRDEPS}':} \ ${.MAKEFLAGS:tW:S,-D ,-D,g:tw:M*WITH*} \ @@ -692,9 +695,22 @@ DEP_DIRDEPS_FILTER = \ ${DIRDEPS_FILTER.${DEP_TARGET_SPEC}:U} \ ${TARGET_SPEC_VARS:@v@${DIRDEPS_FILTER.${DEP_$v}:U}@} \ ${DIRDEPS_FILTER:U} + .if empty(DEP_DIRDEPS_FILTER) # something harmless -DEP_DIRDEPS_FILTER = U +DEP_DIRDEPS_FILTER = u +.endif + +# this is applied after we have computed build dirs +# so everything is fully qualified and starts with ${SRCTOP}/ +DEP_DIRDEPS_BUILD_DIR_FILTER = \ + ${DIRDEPS_BUILD_DIR_FILTER.${DEP_TARGET_SPEC}:U} \ + ${TARGET_SPEC_VARS:@v@${DIRDEPS_BUILD_DIR_FILTER.${DEP_$v}:U}@} \ + ${DIRDEPS_BUILD_DIR_FILTER:U} + +.if empty(DEP_DIRDEPS_BUILD_DIR_FILTER) +# something harmless +DEP_DIRDEPS_BUILD_DIR_FILTER = u .endif # this is what we start with @@ -714,6 +730,7 @@ __qual_depdirs += ${__hostdpadd} .if ${_debug_reldir} .info DEP_DIRDEPS_FILTER=${DEP_DIRDEPS_FILTER:ts:} +.info DEP_DIRDEPS_BUILD_DIR_FILTER=${DEP_DIRDEPS_BUILD_DIR_FILTER:ts:} .info depdirs=${__depdirs:S,^${SRCTOP}/,,:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}} .info qualified=${__qual_depdirs:S,^${SRCTOP}/,,:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}} .info unqualified=${__unqual_depdirs:S,^${SRCTOP}/,,:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}} @@ -733,7 +750,8 @@ _build_dirs += \ # make sure we do not mess with qualifying "host" entries _build_dirs := ${_build_dirs:M*.host*:${M_dep_qual_fixes.host:ts:}} \ ${_build_dirs:N*.host*:${M_dep_qual_fixes:ts:}} -_build_dirs := ${_build_dirs:O:u} +# some filters can only be applied now +_build_dirs := ${_build_dirs:${DEP_DIRDEPS_BUILD_DIR_FILTER:ts:}:O:u} .if ${_debug_reldir} .info _build_dirs=${_build_dirs:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}} .endif @@ -743,6 +761,11 @@ _build_dirs := ${_build_dirs:O:u} _build_all_dirs += ${_build_dirs} ${_build_xtra_dirs} _build_all_dirs := ${_build_all_dirs:O:u} +# we prefer DIRDEPS_EXPORT_VARS +.if empty(DIRDEPS_EXPORT_VARS) && !empty(DEP_EXPORT_VARS) +DIRDEPS_EXPORT_VARS = ${DEP_EXPORT_VARS} +.endif + # Normally if doing make -V something, # we do not want to waste time chasing DIRDEPS # but if we want to count the number of Makefile.depend* read, we do. @@ -754,10 +777,9 @@ _cache_script = echo '\# ${DEP_RELDIR}.${DEP_TARGET_SPEC}'; # guard against _new_dirdeps being too big for a single command line _new_dirdeps := ${_build_all_dirs:@x@${target($x):?:$x}@:S,^${SRCTOP}/,,} _cache_xtra_deps := ${_build_xtra_dirs:S,^${SRCTOP}/,,} -.if !empty(DIRDEPS_EXPORT_VARS) || !empty(DEP_EXPORT_VARS) +.if !empty(DIRDEPS_EXPORT_VARS) # Discouraged, but there are always exceptions. # Handle it here rather than explain how. -DIRDEPS_EXPORT_VARS ?= ${DEP_EXPORT_VARS} _cache_xvars := echo; ${DIRDEPS_EXPORT_VARS:@v@echo '$v = ${$v}';@} echo '.export ${DIRDEPS_EXPORT_VARS}'; echo; _cache_script += ${_cache_xvars} .endif @@ -771,12 +793,6 @@ ${_build_all_dirs}: _DIRDEP_USE .info ${DEP_RELDIR}.${DEP_TARGET_SPEC}: needs: ${_build_dirs:S,^${SRCTOP}/,,:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}} .endif -.if !empty(DIRDEPS_EXPORT_VARS) || !empty(DEP_EXPORT_VARS) -.export ${DIRDEPS_EXPORT_VARS} ${DEP_EXPORT_VARS} -DIRDEPS_EXPORT_VARS = -DEP_EXPORT_VARS = -.endif - # this builds the dependency graph .for m in ${_machines} .if ${BUILD_DIRDEPS_CACHE} == "yes" && !empty(_build_dirs) @@ -832,6 +848,15 @@ ${_this_dir}.$m: ${_build_dirs:M*.$m:N${_this_dir}.$m} .endif +.if !empty(DIRDEPS_EXPORT_VARS) +.if ${BUILD_DIRDEPS_CACHE} == "no" +.export ${DIRDEPS_EXPORT_VARS} +.endif +# Reset these, we are done with them for this iteration. +DIRDEPS_EXPORT_VARS = +DEP_EXPORT_VARS = +.endif + # Now find more dependencies - and recurse. .for d in ${_build_all_dirs} .if !target(_dirdeps_checked.$d) diff --git a/share/mk/local.dirdeps-targets.mk b/share/mk/local.dirdeps-targets.mk index f07708c2c551..00346cddeeee 100644 --- a/share/mk/local.dirdeps-targets.mk +++ b/share/mk/local.dirdeps-targets.mk @@ -1 +1,3 @@ .-include <${.PARSEFILE:S/local/site/}> + +DIRDEPS_TARGETS_DIRS ?= targets targets/pseudo targets/packages diff --git a/share/mk/meta.subdir.mk b/share/mk/meta.subdir.mk index e2ece24515a4..aee8a1a9a39b 100644 --- a/share/mk/meta.subdir.mk +++ b/share/mk/meta.subdir.mk @@ -1,6 +1,6 @@ # SPDX-License-Identifier: BSD-2-Clause # -# $Id: meta.subdir.mk,v 1.14 2024/02/17 17:26:57 sjg Exp $ +# $Id: meta.subdir.mk,v 1.15 2024/04/19 15:10:22 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -70,7 +70,6 @@ DIRDEPS := ${DIRDEPS:S,^./,,:S,/./,/,g:${SUBDIRDEPS_FILTER:Uu}} # dirdeps.mk will compute some interesting combinations. .undef ALL_MACHINES -DEP_RELDIR = ${RELDIR} .include .endif .endif From nobody Mon Jul 29 20:18:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqRY54xLz5RvRX; Mon, 29 Jul 2024 20:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqRY4FS2z4gQp; Mon, 29 Jul 2024 20:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o/FcwLmFM0SaOVx2/Wq3IlukrVh8ZVFgC5kvTaLvHE0=; b=bfxQWMcHWUj8l4S84t9oH6hrfvn0kXEiMdTFzjbCkcGxMe19P2na4QTdx5Nk1C9dqg4VfT YLpqlNlGLIAOrJDorFKZKv+oSbZGCkfrtsFm3oQ30ddsiipgN0a2pU+rd0bt/MznrK8HkS fnKfi/Apc61WhCBWWWzuAnV0e0MpUeDz7ODdIC1tG/QYBK1/6/9zyrYTkOMcua1bWMtIgC EUt2WHxkxIW4d7rzhR0IWCDeYLRZexpSx4uoAheGuzkS6giNwvtRpLI/qbYfOUrYHEzSex udz8hz2tsbap8Qx81pm7QgzRoBAghsGVO5eZ+QZiK8rhBXp9xSiT0DoYa64Lug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722284281; a=rsa-sha256; cv=none; b=XQvRRqTnVMRFiQfBLtcmQ/41hzulJlfB1JpO6HEUbWMJQlb6Qybiuj/hMomlynyKc5kHne yRswa4ULTRB6dv1CBrfvz09mNl+bPj8BJDsTXfhf0G2A2ArV7qqbLoScYhAd06b752wGav ABwr5EOsM7ykTETLNT39m6qmFy7sfLlwaD05A614eIx+SYD9hIZeBCwWs/ctHzPvJClyJp glZfJcydaiYDiYrvVgR2qHALFuFF7O8zqMj7sYxdM1+BfZ7CFuSOqDLPxXLRD7feYiQx6H 0ZHFH9LPipPbjzL5ibMXFPCEPdV4Dc1RKp35wQrqvSHO7JypnWW60QBfO44V0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o/FcwLmFM0SaOVx2/Wq3IlukrVh8ZVFgC5kvTaLvHE0=; b=s07hxzcmB9DWYFLwo+y/Yn1l9+YAqBuwZkzJ3ei0ZvB9PZA+/03dWZLTSgwkcTbC8kZLGf 9LWwOMC66mzxU7rakPiUG0Fl54ZCAd8qiTA2hbHQJcA3QPE0i2O517vFJzm8qoj2WME7Pt 5+Og2oZfrwuFzqzsFFBTZMoEQzkZKLX20w2t4XTsSBOS2hdjaA3Eu5drUbfiyGv1w/wq8+ cGcNi7qoymhMGr1R5lbaGQza2Ya0xR9nnbnIs1CO2HKL/Klqvz0M38x9hQZP38uCVyGwB8 r5z+iHKx3hcZe4hNPQFshb2mcb8Q6z8vOsy3+E0t+DRfaX88hZKwB0w2l/BU1Q== 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 4WXqRY3rl9zp7B; Mon, 29 Jul 2024 20:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKI1Rd079051; Mon, 29 Jul 2024 20:18:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKI1PR079048; Mon, 29 Jul 2024 20:18:01 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:18:01 GMT Message-Id: <202407292018.46TKI1PR079048@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: ad57cea9e633 - main - adjkerntz.8: minor cleanup (markup, spdx, reflow) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ad57cea9e633cac5ef3f17ce0a82160bc32d7f63 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ad57cea9e633cac5ef3f17ce0a82160bc32d7f63 commit ad57cea9e633cac5ef3f17ce0a82160bc32d7f63 Author: Alexander Ziaee AuthorDate: 2024-07-24 19:39:13 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:06:06 +0000 adjkerntz.8: minor cleanup (markup, spdx, reflow) + real-time and rtc added to search keywords - local dropped from search keywords + ntpd added to see also + use machine independent language Reported by: emaste (MI language) MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1326 --- sbin/adjkerntz/adjkerntz.8 | 72 ++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/sbin/adjkerntz/adjkerntz.8 b/sbin/adjkerntz/adjkerntz.8 index 787282348a91..b87981fd19f4 100644 --- a/sbin/adjkerntz/adjkerntz.8 +++ b/sbin/adjkerntz/adjkerntz.8 @@ -1,4 +1,7 @@ -.\" Copyright (C) 1993-1998 by Andrey A. Chernov, Moscow, Russia. +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 1993-1998 by Andrey A. Chernov, Moscow, Russia. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 8, 2012 +.Dd July 29, 2024 .Dt ADJKERNTZ 8 .Os .Sh NAME .Nm adjkerntz -.Nd adjust the local time CMOS clock to reflect time zone changes and keep the current timezone offset for the kernel +.Nd adjust real-time clock (rtc) and kernel timezone offset .Sh SYNOPSIS .Nm .Fl i @@ -37,7 +40,7 @@ The .Nm utility maintains the proper relationship between the kernel clock, which -is always set to UTC and the CMOS clock, which may be set to local time. +is always set to UTC and the real-time clock, which may be set to local time. The .Nm utility also informs the kernel about machine timezone shifts in order to @@ -51,13 +54,13 @@ installed on the same system rather than fixing broken MS-DOS file timestamps. If the file .Pa /etc/wall_cmos_clock -exists, it means that the CMOS clock keeps local time (MS-DOS and MS-Windows -compatible mode). -If that file does not exist, it means that the CMOS clock keeps UTC time. +exists, it means that the real-time clock keeps local time +.Pq MS-DOS and MS-Windows compatible mode . +If that file does not exist, it means that the real-time clock keeps UTC time. The .Nm utility passes this state to the -.Pa machdep.wall_cmos_clock +.Va machdep.wall_cmos_clock kernel variable. .Pp Adjustments may be needed at system startup and shutdown, and @@ -65,7 +68,7 @@ whenever a time zone change occurs. To handle these different situations, .Nm is invoked in two ways: -.Bl -tag -width 4n +.Bl -tag -width "-a [-s]" .It Fl i This form handles system startups and shutdowns. The @@ -76,51 +79,51 @@ on entry to multi-user mode, before any other daemons have been started. The .Nm utility puts itself into the background. -Then, for a local time CMOS clock, +Then, for a local time real-time clock, .Nm reads the local time from it and sets the kernel clock to the corresponding UTC time. The .Nm utility also stores the local time zone offset in the -.Pa machdep.adjkerntz +.Va machdep.adjkerntz kernel variable, for use by subsequent invocations of -.Em "'adjkerntz -a'" +.Ql adjkerntz -a and by local time file systems. .Pp -For a local time CMOS clock -.Em "'adjkerntz -i'" +For a local time real-time clock +.Ql adjkerntz -i pauses and remains inactive as a background daemon until it receives a SIGTERM. The SIGTERM will normally be sent by .Xr init 8 -when the system leaves multi-user mode (usually, because the system -is being shut down). +when the system leaves multi-user mode +.Pq usually, because the system is being shut down . After receiving the SIGTERM, .Nm -reads the UTC kernel clock and updates the CMOS clock, if necessary, +reads the UTC kernel clock and updates the real-time clock, if necessary, to ensure that it reflects the current local time zone. Then .Nm exits. .It Fl a Op Fl s -This form is used to update the local time CMOS clock and kernel -.Pa machdep.adjkerntz -variable when time zone changes occur, +This form is used to update the local time real-time clock and +.Va machdep.adjkerntz +kernel variable when time zone changes occur, e.g., when entering or leaving daylight savings time. The .Nm utility uses the kernel clock's UTC time, -the previously stored -time zone offset, and the changed time zone rule to -calculate a new time zone offset. +the previously stored time zone offset, +and the changed time zone rule to calculate a new time zone offset. It stores the new offset into the -.Pa machdep.adjkerntz -kernel variable and updates the wall CMOS clock to the new local time. +.Va machdep.adjkerntz +kernel variable and updates the wall real-time clock to the new local time. If -.Em "'adjkerntz -a'" -was started at a nonexistent time (during a timezone change), it exits -with a warning diagnostic unless the +.Ql adjkerntz -a +was started at a nonexistent time +.Pq during a timezone change , +it exits with a warning diagnostic unless the .Fl s option was used, in which case .Nm @@ -128,14 +131,14 @@ sleeps 30 minutes and tries again. .Pp This form should be invoked from root's .Xr crontab 5 -every half hour between midnight and 5am, when most modern time -zone changes occur. +every half hour between midnight and 5am, +when most modern time zone changes occur. Warning: do not use the .Fl s option in a .Xr crontab 5 command line, or multiple -.Em "'adjkerntz -a'" +.Ql adjkerntz -a instances could conflict with each other. .El .Pp @@ -145,7 +148,7 @@ utility clears the kernel timezone structure and makes the kernel clock run in the UTC time zone. Super-user privileges are required for all operations. .Sh ENVIRONMENT -.Bl -tag -width Fl +.Bl -tag -width /etc/wall_cmos_clock .It Ev TZ Time zone change rule, see .Xr tzset 3 ; @@ -164,8 +167,8 @@ and .Xr zic 8 . .It Pa /etc/wall_cmos_clock Empty file. -Its presence indicates that the machine's CMOS clock is set to local -time, while its absence indicates a UTC CMOS clock. +Its presence indicates that the machine's real-time clock is set to local +time, while its absence indicates a UTC real-time clock. .El .Sh DIAGNOSTICS No diagnostics. @@ -178,6 +181,7 @@ and exits with a nonzero return code. .Xr tzset 3 , .Xr crontab 5 , .Xr mount_msdosfs 8 , +.Xr ntpd 8 , .Xr rc 8 , .Xr sysctl 8 , .Xr tzsetup 8 , From nobody Mon Jul 29 20:18:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqRZ68Xtz5Rvl5; Mon, 29 Jul 2024 20:18: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqRZ5B4Jz4gQq; Mon, 29 Jul 2024 20:18:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zGvY0rt9kSJ9oUxbd2Qz9EC33EkM4c7IxJhN2DnhGJU=; b=wysHIl3JfLWAAiwXly4ZBLcAgPNnKpV8jTygjxKodiy89iwYmfjdaXmGe3DEe8qbt1vVdI 7VKws4baY7E123EMdy5tSwIKSz+E/y4vzANHVkzybBv4Yo6Nnm4HmJwrleMznCaALH/1zO Oxyu8A9MW/+XWaGIeq/nX3CESnZkfcy9aPYFqWQYJx/7salUeJnUVuc8wjnONPNcfx8EOs KSIfgo0S5VM+lEztCEi2XHdfA65tGgqRV+cDyLjNMVxV9n2Ip1bxOAAeqgFxpTBptxRaSn Kn2Gc4rmwZCPj7mlu+eAkwFsAdHWh9q6aIYLdeVpXsR0NKSyR6KLlIaCr1PYgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722284282; a=rsa-sha256; cv=none; b=ZTQ5eM7ffs/hQRVkBo/tYXorUi5MDAy/CYT4C3PUPb4PVMRRrhdQDsvE4IWLIqjOUQ5KXe 8T98xjNf3s5djoQDGpll/sfds/Mi/8+5XDTz+WmANmhTIzHMcNkBVqarTLhGVviouO+HYB TLUZ8izQfF5w8cnM0amY28FCRnkpnTva3WNDJt/e2l3kZN2dX/UVMVe0WEdwVZJVWCyJz/ c9OwMasRL6HzNBaPCK22C13eAzltgWP+WuOBSqoQmW4naq9AQ/fYWamqZIC5W+Y56QwVEM X7qSqc3otZwdMme3xRckva4rsl0eJ8ntEz1X3CrtcJVFdGUq7Zc7nPu/jQvzdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zGvY0rt9kSJ9oUxbd2Qz9EC33EkM4c7IxJhN2DnhGJU=; b=aorws6cvZwohvOfCozr2e0rJcVmhTv8Uamb79weVXKIFJftph0LmkuPfy9HK//kzXRZhr3 DtMIKjYPN7BthfDW6MeGytD+S6N2E9utdgPgjLjvBb2vL0YLUzrrlXCS0bRVrWrWCxUW0D 0WCJez4R4fDWw4Lz3OlZBKPa7N90JwAUqMjn8mhCEGMp1ODpLVoyGsYRw/MVzisuKKqUuY 3t/AnU0fgbwKcBqCn799Oplzsg+CKaZMpy8iqfLjyD3njIrvXeKkvT4aGyZ+pI4XK1EsI/ fOZwegufB7/Z1JE1LNvk/+iyZya+hZ/K5nk/NVtq5IWrqX9E9QODaULBc1Eqzg== 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 4WXqRZ4pJGzp9Z; Mon, 29 Jul 2024 20:18:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKI2XZ079092; Mon, 29 Jul 2024 20:18:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKI2OC079089; Mon, 29 Jul 2024 20:18:02 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:18:02 GMT Message-Id: <202407292018.46TKI2OC079089@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: 1d551845f3e8 - main - netstat.1: Clarify -d argument List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1d551845f3e864e618a10ec6427bd46d887d4280 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d551845f3e864e618a10ec6427bd46d887d4280 commit 1d551845f3e864e618a10ec6427bd46d887d4280 Author: Bram AuthorDate: 2024-07-17 08:26:50 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:07:11 +0000 netstat.1: Clarify -d argument The man page states that the -d flag can be used to show the dropped packets. But, the number of dropped input packets are always shown, independent of the -d flag. This commit clarifies that the -d flag will add the number of dropped output packets to the output. MFC after: 3 days Reviewed by: imp, Alexander Ziaee Pull Request: https://github.com/freebsd/freebsd-src/pull/1332 --- usr.bin/netstat/netstat.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index ceb532e120d4..a5bbfc2f1b35 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 14, 2023 +.Dd July 29, 2024 .Dt NETSTAT 1 .Os .Sh NAME @@ -312,7 +312,7 @@ address with which they are associated. .It Fl b Show the number of bytes in and out. .It Fl d -Show the number of dropped packets. +Show the number of dropped output packets. .It Fl h Print all counters in human readable form. .It Fl n @@ -381,7 +381,7 @@ Show IPv6 only. See .Sx GENERAL OPTIONS . .It Fl d -Show the number of dropped packets. +Show the number of dropped output packets. .It Fl M Use an alternative core. See From nobody Mon Jul 29 20:18:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqRc36Rtz5Rvc1; Mon, 29 Jul 2024 20:18:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqRb6DnCz4gnh; Mon, 29 Jul 2024 20:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJuV2nTlpyNDA397mIqHMAvoNaCgOlBm9+RrDWNA99Q=; b=hLbom74FW2KWrm6hQFoNGZqI+5uwVuqNvCCgxDn8lPnAH+Yau9gzw69wivMGk3c47g/4kZ yfejmGPV2/FHIC8jrer8HrzrfyDPbk8IWLNg9/ZsHY3LV0ojr/h8+7Cf6T5Hg7EnMMS4CM F6/XchZdk2kJOHrGEHtUSacxYKXmV1LIGqTQxRBTmj9SegPCzTKPgj0O69YYMDKZWHKC6S rKPCYV8b4plTCIsJnwTk5nmL+QkaOM8PX2z2INK6Ua5peXqtRBauOCaabzbHZZ9GfQxYXN h4i0QwSLM6wt2G7GayXGxY9UFEHTlWMAsrBnMF6Lx5Cjzs0uW9+X8QN7ZSeNWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722284283; a=rsa-sha256; cv=none; b=Kp/+oINE6px6r1rTyijtOkLbwQbsgyquZcD/naWvNFTJHiw8gCZN9LGFY6M0iF/O5Toeg1 I5SUAE2dCLdqvQ5PwNsMV87ZTk81NX652sum6vK7KS4t/sw2R2G2Irr9eg269RPwupBUVn N8dckZiuwOfCPlHTuyJL2DsVNgNu63Zoh/hIwoxB8dM553Sqlm4+ISeeEXPpHMJwwO2WYW LMTHSO0fC5eEjFuics+uiD+UcjW/OohLIrbs+edfVppYttm6K+u0aTuZSs+0B4XdsPNngc jpgc0pWt+OAmb0iyX/liAdI8+DN1QQYQ83ADXq+tZGAbBB9AhBEkd4oDZ79+fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJuV2nTlpyNDA397mIqHMAvoNaCgOlBm9+RrDWNA99Q=; b=Xwrn1MEopmmQtah7H9J/5c8ZaZfEE9Xpi6QbZeqxwqsIzVfrhJ3mSSZPySiJvLTeJ9++9Q DK335htMFu+ZL0u1OVZLMmQKJUPsQhRGp6CnY49KinV6d66oHyOjz68Jg1FUCUDmf/wjzX SvvcPWD5gTx/m6kNr5DNW8e+PpGmHWtfP/S1ty9O3zhnkKjqYfxSRMiFK3Eo1CeFoEHwGs 4Sp9kTykOU5s1aZgaf2d8okwgXlrYafyhuu9l6eDjFdEBTOQURrNM9eCSMXAwOjd4YfAdD 7oRHefzSITLPay4I72o+BiSEykK5WkphIYv3bhwIs1LqDWcDSlETcVU3kEqcUw== 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 4WXqRb5pQnzp9b; Mon, 29 Jul 2024 20:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKI3FP079143; Mon, 29 Jul 2024 20:18:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKI3cW079140; Mon, 29 Jul 2024 20:18:03 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:18:03 GMT Message-Id: <202407292018.46TKI3cW079140@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: 5f659bb0b63d - main - test(1): quote closing bracket in error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 5f659bb0b63d0d0068645d70e1c39f7a26fafd63 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5f659bb0b63d0d0068645d70e1c39f7a26fafd63 commit 5f659bb0b63d0d0068645d70e1c39f7a26fafd63 Author: Daniel Tameling AuthorDate: 2024-07-24 11:56:16 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:08:33 +0000 test(1): quote closing bracket in error message If test is called as [ and one forgets to close the bracket, the error message is currently [: missing ] To make it obvious that this is not something printed in brackets, quote the closing bracket in the message, which is what everybody else is doing: [: missing ']' Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1346 --- bin/test/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/test/test.c b/bin/test/test.c index af2783f0aee9..a35c5b424d3f 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -198,7 +198,7 @@ main(int argc, char **argv) p++; if (strcmp(p, "[") == 0) { if (strcmp(argv[--argc], "]") != 0) - error("missing ]"); + error("missing ']'"); argv[argc] = NULL; } From nobody Mon Jul 29 20:18:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqRd1dSgz5RvfT; Mon, 29 Jul 2024 20:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqRd0CBGz4gjH; Mon, 29 Jul 2024 20:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jVZZ/KwT9eTIakpIOIFy7rwM8nHI4SWoZ7AsNZWgMWg=; b=tNog1CnpXNnfUBQwrLvaqZ/8Ogqp6MeKNy0c2CgCuQncVnPZ3DNgeRCrn4AnKswcoXukmC KApoUyLqo1DU9WDctnvrjkvl6Au7A+aKIJw+mzQGuCTI3HnTO91jYgEt7vw3YwjXk4k1T4 h8G5K5yIKZNqVGUWi/INbv0t4HqpTWbumZdGDAWgHuG5UP1DBzR6YXM6U654vqr2ugRx8D VUYPn6+08E4m0GLltG1/uci6L6hwf/H1/pEa/KW0ao0p0WgqGeAW76x+yOZPIBI3brQgKp tc5CdSk18ctd3zB6oZOozasCnDBg1CHdVTvzFrMpOja4Eg2FfeeEKmi3hiEdhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722284285; a=rsa-sha256; cv=none; b=lrhSh9ikmRtN+yL8ylqYis8aaKS06orNlQHVCjN08GjenGJXGVNN8jyuiiELB5DUxzDcWa GQSCmz/A+GzZfRpo2pG5KmwEtM3YT66WO9h1h+/EhyxsSlDWotx7ov6jeR2KXkM5C5GB/K NsTmpr0BBKDN9DHkmDH49I2s7pUVDoFnxfWit7funPIp9r2IC3CCb0oXeCSioLQk3HrQf+ pcfM2LFD/HI8wm9Api0mG8lav84a5RHKF8V9ugGE+/acmzhzbo5IvKCKA8qbgf505fUgF1 TXZeQsHvjM2pjrnCapyipP+NpSZAUfPtuxc2kecvNZNl4ZmfEcQjuOtWwItUcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jVZZ/KwT9eTIakpIOIFy7rwM8nHI4SWoZ7AsNZWgMWg=; b=DTLdTLXuhYI5pp8aNb40jdURXHeda/FI+bueuc+737fgGKcBE7Q61ZwqT9xrKUms35j0so Uvb3H6j6qL5G9U7F8lnJ18J4Lrg0w5H9pQM71YMjMsXG8KAAzNeg2O/drbqTCZz69kex8x 4qOfpxV8HljEF+6ctjGIIinKHddP/zgZD2Z3z8/4MiQdY0TWvfPfCPuGstpPcTKHI4QSlB usmLk2CwMHgsqu2ja+QZfUNERvQSLoN7K9l3dml75SQUxo0GkkBdawn8n6rptAuchu3pGm Ibb8/sJWroVfig77ZR0SbP6o9Ds699ycWLja35SvTVg+/+3KJgFh6Vfa6g/WTw== 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 4WXqRc6rvrzp7C; Mon, 29 Jul 2024 20:18:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKI4cI079187; Mon, 29 Jul 2024 20:18:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKI40v079184; Mon, 29 Jul 2024 20:18:04 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:18:04 GMT Message-Id: <202407292018.46TKI40v079184@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: 969484b53217 - main - bytgpio: expose PNP info List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 969484b53217cee65d6802f1954f0431cbfc6b45 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=969484b53217cee65d6802f1954f0431cbfc6b45 commit 969484b53217cee65d6802f1954f0431cbfc6b45 Author: Ahmad Khalifa AuthorDate: 2024-07-26 08:21:44 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:09:08 +0000 bytgpio: expose PNP info Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1349 --- sys/dev/gpio/bytgpio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/bytgpio.c b/sys/dev/gpio/bytgpio.c index b3f5f02081c5..f7b2a73ec6cb 100644 --- a/sys/dev/gpio/bytgpio.c +++ b/sys/dev/gpio/bytgpio.c @@ -278,6 +278,8 @@ const struct pinmap_info bytgpio_sus_pins[] = { GPIO_PIN_MAP(40, 0) }; +static char *bytgpio_gpio_ids[] = { "INT33FC", NULL }; + #define SUS_PINS nitems(bytgpio_sus_pins) #define BYGPIO_PIN_REGISTER(sc, pin, r) ((sc)->sc_pinpad_map[(pin)].reg * 16 + (r)) @@ -538,12 +540,11 @@ bytgpio_pin_toggle(device_t dev, uint32_t pin) static int bytgpio_probe(device_t dev) { - static char *gpio_ids[] = { "INT33FC", NULL }; int rv; if (acpi_disabled("gpio")) return (ENXIO); - rv = ACPI_ID_PROBE(device_get_parent(dev), dev, gpio_ids, NULL); + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, bytgpio_gpio_ids, NULL); if (rv <= 0) device_set_desc(dev, "Intel Baytrail GPIO Controller"); return (rv); @@ -675,3 +676,4 @@ static driver_t bytgpio_driver = { DRIVER_MODULE(bytgpio, acpi, bytgpio_driver, 0, 0); MODULE_DEPEND(bytgpio, acpi, 1, 1, 1); MODULE_DEPEND(bytgpio, gpiobus, 1, 1, 1); +ACPI_PNP_INFO(bytgpio_gpio_ids); From nobody Mon Jul 29 20:18:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqRf35N2z5RvfV; Mon, 29 Jul 2024 20:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqRf0wr6z4gwp; Mon, 29 Jul 2024 20:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CA9BBV1G6jH9Csi3JoBPoMvUm3xFT5kcYIOfqjgMRIo=; b=bVclHoZhK1S7MpGER2MPU5aXrD7o4VPiN7RxzQrBkEskFNbeDL5RTqvjmfXdcA+w+kGK33 MEAKcCUwttOKT6LKVbv33SOtBpdUOJXWgZf7AJDl976NLxwIJE7owO2BXXuOalRv/p0TeX vA+jYxGS/ekRx81Yu/3RNb1TQWqu1RcQ7eZ7qQWF9RQFiCnYXE2tphW8NxfWiRSFqp+Zy5 DAv1XT55Cl2N9MTqzjyjmaPePisj7GOTqnP2tIWbVGseaVyqzjZTvSFo4hGRwbQXU/FI3J LU/7/DafGVallc2S00Pgcz/A2Sd99g0Oo7UU9BJJvEMF94uEXjFkwf4QaBTXig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722284286; a=rsa-sha256; cv=none; b=UJGHFZIJkUHq5XM6u3Gbf42yscokoUKrrw+95dB3hR8i0g/rNVAof5c2JPTeKOet4DN7SX /Hbm1YAJ6nbgYnsWTMHx1o/B73WIkr1dvo7nBNVhcfQPObaXztrFyAIBOXeuDfUJu+21/z i+P1QSyXNLtUZLVH2w5eKp6iiy4lqfUkSwhH5R5CWmjnXghHbu29exd+8x7hMoS8FR7U+3 TOxq7r5vomNALKLY3y4D7skG5FiXuXsfDeESjPwUr2qcv8n20FVTYYi7rjeEChVcoE2uT7 O5Y9ZbiidAEM6gvsN8X98Jzh2I7gVAcmG4Add8dWwAEn0byru9JyiDhl/BofKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CA9BBV1G6jH9Csi3JoBPoMvUm3xFT5kcYIOfqjgMRIo=; b=sQklpfPv7+kJldmalFSCXIuJNQkf/jjAihPUDMDYYARQ/nTHH95IH9ptmOZDcr2Ki3w0ef 2nljrnJ6FJZjkM+qXA0+qzfq5xLvlVEiZQyDZ7x5K0FVi34ywa+gY53X90QuARASf9QYAW /HBDUgwP4IZTLs6XSLKWhb45VwG4TTYWoKbF7L4QEZ+DpZxriHdXCgDtSxCrTKpD4FmStB Kr9TjX+rUUhCb1UlZQ25AvbkTVPXgm8Fq7AxZjl3v+jC5jqWRF1lf38B/zmUP3MqBzI2br fy/SOJa1gjtoUwanPjHCJBgVhzzAKhSHuGkcU72b5UhM/dX+z1eN0fCZ2Zo2Aw== 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 4WXqRf0HPGzp7D; Mon, 29 Jul 2024 20:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKI5R7079243; Mon, 29 Jul 2024 20:18:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKI5Ni079240; Mon, 29 Jul 2024 20:18:05 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:18:05 GMT Message-Id: <202407292018.46TKI5Ni079240@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: 68bcf53ea2b8 - main - mtree: Fix the sort order in BSD.include.dist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 68bcf53ea2b82aaaac49dbeaf59cc3885ccc9a3a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=68bcf53ea2b82aaaac49dbeaf59cc3885ccc9a3a commit 68bcf53ea2b82aaaac49dbeaf59cc3885ccc9a3a Author: Jose Luis Duran AuthorDate: 2024-07-27 20:06:40 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:12:58 +0000 mtree: Fix the sort order in BSD.include.dist Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1351 --- etc/mtree/BSD.include.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index f8c83d6dde7a..ad32813b5774 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -310,12 +310,12 @@ .. netinet6 .. + netipsec + .. netlink route .. .. - netipsec - .. netpfil pf .. From nobody Mon Jul 29 20:18:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqRg4SNBz5RvfY; Mon, 29 Jul 2024 20:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqRg1jRSz4gTX; Mon, 29 Jul 2024 20:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z3dKK+6G/taqOvynZzITvDEV9cbCL0nTFsw/8Pi7LVI=; b=qryThuahYTqiIXOGD5+F6zj5UTrekHJeZlWehdAGM5IzRFMouKF/93mIaf60/2Y99SPFt7 Dfk8IaWHkM4lFX8swJUYfbRQq1MZD0izqFcfgaGzZJ1jhoRjcF+z1eqtb9o39zWRBoquLt 1vGohqMBZ3wvqNS+GHvQ938LQBMC9D2rklVwOU7htmsbT5D/1l+n6AurPr0ZRbJqsoIV+z s2W+3RP3rEqtZUSd4LJ5lJcTTkHld2JCPdUc31h7L9m9pi+VMpcNpmQQD+58oozzgWiylN HsD06ih1IGD/BAE8rqyGRhMH+QpB08QxBr/zLPgM52TA1oTw6GapzBY2Qsf/WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722284287; a=rsa-sha256; cv=none; b=tT2h/zg9C2i4royq4ok6sAqWi52/yYSaqjr6LN+2m+RacConxOh0oP4bFu6edClRmdfoYu MIxU3oW0Kb+3i27W/CGAR3j8vtCfuVoQbHvBeGbUZpB/dFJz+rNT30Gx9MSzl/owfMktVQ JXn5dmBCpHanLxrjtvhLw0K/5SMRbLkXVlbPJoQjW6IVUzOOs3KjE0ygq9oM8SzOkrOosD If6UT5dYp7nr6asdPPF5u2q7AH2BN86HsCk6URCmm4yyEdycDNRO6XoXaOYCccDICH5lkS TRJinjSNOQadqJy+l3m4PDcT8cWYZxGtmUzhTnm9QGpoeQBE4kvtBMuTyKgymw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z3dKK+6G/taqOvynZzITvDEV9cbCL0nTFsw/8Pi7LVI=; b=xACxJAvdJYcVb9AvP3+VPyXcrbX6jhBefLmMHbbuOMHuGwvVlPDAf5cExye7ANpoaPFALz arWZXTq9XmjeSjUZ+5kMDLYrlx/DgWkhfzlnhGE26ckYHlG9UB7qUyy2dhih05CrnQ14oG HlYDdukYgTV8PxuNMYolc3RMlXJ6SgQhaROwNpwTwcTvd44bjMcyWQjy4kIEvi6vaNxAJv 3rm1hKLfPjUW7Kh8WGKeEZV1lqqTPqQOlcg+PpNKO5EQjkhrQkIWjBZnVqtLGg4HM1I80x DBcPp9NjBhh1/NxxOkcC5Ak0UcEm/R1LfRz7zHXH5FLeDqUgIPc3D8FTaJYAJA== 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 4WXqRg1H8Vzp7F; Mon, 29 Jul 2024 20:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKI7jj079291; Mon, 29 Jul 2024 20:18:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKI7q4079288; Mon, 29 Jul 2024 20:18:07 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:18:07 GMT Message-Id: <202407292018.46TKI7q4079288@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: 1c8a45b5540d - main - mtree: Fix the sort order in BSD.tests.dist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1c8a45b5540d74fedd36a695f52a5d12d899c0a3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1c8a45b5540d74fedd36a695f52a5d12d899c0a3 commit 1c8a45b5540d74fedd36a695f52a5d12d899c0a3 Author: Jose Luis Duran AuthorDate: 2024-07-27 20:17:41 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:13:02 +0000 mtree: Fix the sort order in BSD.tests.dist Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1351 --- etc/mtree/BSD.tests.dist | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 5c724e5a8e5b..ba03881bcc27 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -91,6 +91,10 @@ .. usr.sbin dtrace + amd64 + arrays + .. + .. common aggs .. @@ -269,10 +273,6 @@ ustack .. .. - amd64 - arrays - .. - .. .. zfsd .. @@ -1201,12 +1201,12 @@ .. tsort .. - units - .. unifdef .. uniq .. + units + .. unzip .. vmstat From nobody Mon Jul 29 20:18:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqRh408Vz5Rvc6; Mon, 29 Jul 2024 20:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqRh2VTqz4h0c; Mon, 29 Jul 2024 20:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDtnHYIht3bEDlwNR7nPd8KopcKXJ/evQNk2HZz+/vI=; b=XbzxUTAuFZwbX8wnTHnTgk5X8cZlAacXDnLBumUppOGYA0lcLFfELMnZ8Pfyib/yCpozen GpoVkfwEyUCU7T4gCP3MwWSvkjf9jV5vxs2YKdMegmxXx9RwH5Rag2h8GwetMrHcmKAsEO GCuxX5pD9G/+mMMsxDrOZsuEfw01xUHAcxYHYFfQJvRItNowd9+nauvEhE6PdJBfYlYBMU s4r6idjuNmVh8SN+li5w9xBsCLMpniV2uu12Y50aHE+43Z6Ljx20Pf/a00ANu/qEUSzJRG iRFg7as7acJ5nD472XyeD9B3F7wzYZ37Ju1t5Ya4qcneR/4XWiFcpCF7lg67Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722284288; a=rsa-sha256; cv=none; b=ORJ15H1EVMS77lbZ+e6dIYU4W58315cHuLWa2yObWtboMlZWGoSmwcZIP3O4z+5XrIkiCh U5Q16fXpqng0HDQbdDdC/ZgvawPc1anJ+cu0rtJ3QMTY+9CYERypnEUi7cNbnfD8uZSFIE nHeLCjBOZPycHCeJSjb7RF48vy7G3yZ6Sy7ho1BaPfxyBPM9b/8xCDUdcN+Jd71TfkX5sT sf96HRvDVOH3b5ubngNuI5bnn1D4/loGMQue2o3bLRAH3/Kb8MeSiIgypMcQ2rCRhAFKA4 B4A9tlQ2MXaONZK3TiCsXShXLqmBZ7fTSYykJ3h2HepKolCwZ7o20PLks9fePQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722284288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDtnHYIht3bEDlwNR7nPd8KopcKXJ/evQNk2HZz+/vI=; b=I0jmJ/q4swyXanr+Bt+FyTwVp/a2D92Tm6FqhxrE+ozX887ne3LgD8r0OPjfKpCU7FwI5Y ppXTNKjv4yd3T+Vh5p7swMZRqhM26J87ZzrVSfM21hWbs6kIfZ6Y1jXQMJVwF622aGicoB EiWbFX26+gNq5VDaeYbbyC2BFEptJZkWf4JsAYuYXsUO8NfGHEem9sjAOmxJyTuPe1cM2W GZejJqf4boQOYMJAfCyOJRQ/K6OB87W9FvV/4DUZoVpIosWbezT1PV28RaHLlEe/5loO5k /6OGovey7GQwRXjG58T4Ecz4xRgVESPtU0vd175o2ry/VxA/N5p4V/E0IU3nDQ== 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 4WXqRh24CVzp7G; Mon, 29 Jul 2024 20:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKI8hs079334; Mon, 29 Jul 2024 20:18:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKI8Le079331; Mon, 29 Jul 2024 20:18:08 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:18:08 GMT Message-Id: <202407292018.46TKI8Le079331@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: d57329565955 - main - pw: Clarify groupadd/groupmod memberlist formats List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d573295659550cf4bfbf3aaaf97d050fe7416d77 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d573295659550cf4bfbf3aaaf97d050fe7416d77 commit d573295659550cf4bfbf3aaaf97d050fe7416d77 Author: Jose Luis Duran AuthorDate: 2024-07-29 06:43:25 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:14:14 +0000 pw: Clarify groupadd/groupmod memberlist formats Clarify in which formats the memberlist for groupadd/groupmod can be accepted for '-M', '-m', or '-d' flag. Related commit: 40ab104eaa6f6d5577dcff6d8bf04de03faef345. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1352 --- usr.sbin/pw/pw.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pw/pw.8 b/usr.sbin/pw/pw.8 index 5ba35c193811..c72623ee05b3 100644 --- a/usr.sbin/pw/pw.8 +++ b/usr.sbin/pw/pw.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 28, 2022 +.Dd July 29, 2024 .Dt PW 8 .Os .Sh NAME @@ -837,7 +837,8 @@ new group or replace an existing membership list .Pq in Cm groupmod . .Ar memberlist -is a comma separated list of valid and existing user names or uids. +is a comma, space, or tab-separated list of valid and existing user names or +uids. .It Fl m Ar newmembers Similar to .Fl M , From nobody Mon Jul 29 20:31:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqlX2lG0z5RwSG; Mon, 29 Jul 2024 20:31:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqlX157gz4kSl; Mon, 29 Jul 2024 20:31:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3db23a60850so1893269b6e.0; Mon, 29 Jul 2024 13:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722285109; x=1722889909; 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=XMB0TyK4VgYKhXQ1pY6q85/rtWD0lyG4YqC71CAPKxk=; b=W7wH7Ox3XfC4y8L66PomE0ESGVyhd7yDYVb0C8yY0/7U8Ustlv9BrMKKVhjK8wOVMM 2bbcnGYCY9OVoUiPzW+GZCWaVG5/RFcDvptYlcTTALRuHVvQ2RDcQn+jfzapUQgE3jlb E+LtP0UqOe24JqP2FN5MdPSNhwz9XCDt/nIf7K3DZC/WD1WYEoleHahyoWR6Y0tRbFxW w++q2Drlbe29cO7Z6QL4sp1FxBdR86azrIMWIQKdyqqkhCt8BXtonII9c7EIBSOLs0Nr KQThnxrkRkaOn2URne9Qs/sKOmfNEdLEUSZMxiCeKT2c46hWPZwhkBcRoQDypgSfY8F7 YEDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722285109; x=1722889909; 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=XMB0TyK4VgYKhXQ1pY6q85/rtWD0lyG4YqC71CAPKxk=; b=G6m7VRbs/5pkxtngdRSm8nsWCrqXKa9/7Qjl4Dj3GzHZ7Hz5bc6q9rcTrCoXit9xFz hGqrrFp14tJ0fGigUgHBo/5SGrQoS/+yJhnVBZYFOSsEO76/Y7pKCM/NhBG9/KpniH7q qdEVVWHFq/u3iHfArKxnGt8fJV6xE9U98WLLZqsLsemDnDkGpvQ0rwAFMWBFsyigZ8LL O6Z5FeHVnNGCHyIg8y+sKdhQ8N3xDtnu9t+1DsZU1e2kCtY3bZfo1jntQreNEDews9Fc J+jI7vfmEIz14e/SeQfXHyxpYKPBDHOJp36SMG72DatrDIUEMGbK5exHnEvKNK24Ozn8 TyiQ== X-Forwarded-Encrypted: i=1; AJvYcCXYOKNFAfBJqM7ZsUk40IoTx1ThX1IhpHZ/m+LIjWGyoeKNhtLw42XNjJsYa8dTNum8DOnz8avrA94eGJB5bnzpNMqKg3J7zNTbsDksi4Ju8YcrgK3o7dHh4Rdmun9g7LP8kd1qbFOYuYo4hCb3b+tHhg== X-Gm-Message-State: AOJu0Yx3GKFTQCTFyyMThtztKub1nXJ7OTACi/INtLt+YQJEeqZcV9Qm +VnVaBT6fGD+JneLRzddJWs4KSGyiJXoYlP5fpa2xxMeO+Zg1KBKV4s/3nLWjbQ= X-Google-Smtp-Source: AGHT+IEt2/Xg/ML2MTFeh1qQsLMrgIvn+KxtuKk/oSwWHM5TF+Uxr9IFVqhSOqNI0VB1Ed/fLE7WtQ== X-Received: by 2002:a05:6358:b3d6:b0:1aa:d1f7:8 with SMTP id e5c5f4694b2df-1adbe8c69b0mr896627455d.7.1722285109374; Mon, 29 Jul 2024 13:31:49 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bb3f7e419csm56874876d6.0.2024.07.29.13.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 13:31:48 -0700 (PDT) Date: Mon, 29 Jul 2024 16:31:46 -0400 From: Mark Johnston To: Michael Tuexen Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 71867653008c - main - udp: improve handling of cached route Message-ID: References: <202407282141.46SLfuuZ083113@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202407282141.46SLfuuZ083113@gitrepo.freebsd.org> 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: 4WXqlX157gz4kSl On Sun, Jul 28, 2024 at 09:41:56PM +0000, Michael Tuexen wrote: > The branch main has been updated by tuexen: > > URL: https://cgit.FreeBSD.org/src/commit/?id=71867653008ce17a66a9c935e9dc29c1320bf48b > > commit 71867653008ce17a66a9c935e9dc29c1320bf48b > Author: Michael Tuexen > AuthorDate: 2024-07-28 21:25:22 +0000 > Commit: Michael Tuexen > CommitDate: 2024-07-28 21:36:48 +0000 > > udp: improve handling of cached route > > The inp_route pointer should only be provided to the network > layer, when no destination address is provided. This is only > one of the conditions, where a write lock is needed. > If, for example, the route is also cached, when the socket is > unbound, problems show up, when the sendto is called, then > connect and finally send, when the route for the addresses > provided in the sendto and connect call use different outgoing > interfaces. > While there, clearly document why the write lock is taken. > > Reported by: syzbot+59122d2e848087d3355a@syzkaller.appspotmail.com > Reviewed by: Peter Lei, glebius > MFC after: 3 days > Sponsored by: Netflix, Inc. > Differential Revision: https://reviews.freebsd.org/D46056 Hi Michael, After this commit, two regression tests started failing: https://ci.freebsd.org/job/FreeBSD-main-amd64-test/25371/testReport/sys.netinet6.test_ip6_output/py/TestIP6Output__test_output6_nhop/ https://ci.freebsd.org/job/FreeBSD-main-amd64-test/25371/testReport/sys.netinet6.test_ip6_output/py/TestIP6OutputNhopLL__test_output6_nhop_linklocal/ I verified that they pass again after reverting this commit. Could you please take a look? From nobody Mon Jul 29 20:39:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqwK1vB5z5RxLB; Mon, 29 Jul 2024 20:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqwK1PpLz4lBS; Mon, 29 Jul 2024 20:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722285569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dyT5ClVwxNh9QnqdW0ud0lTtIVkpTVeeBtCuyMcEOtA=; b=XBVIFIH/kxSsHaXC6VnNPkUw8o9EpOgVxSCHTwXjh4dCCmxyqqx1RErq1M1kEEUxxBTBcm T3Sr5au9dJSkJurIUDinIOKEcqIKK4/w9INnymsOi6gkxJnrTWgaCE2gUdYgci+d/bBkwZ EPl+4tQAoKp/6+WcS4BIYHe1ERM6S9uA4MW5f1DWISNNMtnJ6ViOjqhclscwTUoI4qNpp6 rvw5PaUWolo1igGSFPk2tKdSaencKmf2MlaSrdVZVsPfpS3U347VoxwyHMdyKRt123zOTO p8Kq1R8KylF6ujWwdru4hWYIF/ihqctsdWUd2dggWzKzDYNsci6ofssQc6i0JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722285569; a=rsa-sha256; cv=none; b=QKltvptVsYPpVghBwEmAWojw9n0UU7ddqU3oXv3UaA8CNo/DN5RMqdqhhNzzCQX4o3ccp1 aBgyT+KG+TcjDmOV3sjYFQhh8bwYtp0/PeIrcb0HnFBZvg5hw2R2nDLu7FWY8rRd0XqqyV gngYcjcTYLzVR7BujTIe3IyyF/hM5SwOPyJYiCQuuI0W89LQ3F1m2HglDX3bnTz5wz6zY+ ed8cj7ea5X0FEW1zF+egtlfsbS4LYtIUkRwXdxQp+0VQJxEPXqV8WPuBWdqGGeWvoI75wO YoejCkgyK7aQcTQEjZ8dTquGtEKWTguICIjPKAhrv9r2uXERi/EHKhvJGW98Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722285569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dyT5ClVwxNh9QnqdW0ud0lTtIVkpTVeeBtCuyMcEOtA=; b=Bv1j9jxzv/UWHF0tYcueG53sCXB9KERF2g27zRxZ7ngv+2vPdJDL6vELELZNtW008BMXwS e1aOM2CyuEmTifge5s4PfLwLNHOmdwA09GblDGpOIbaQMQxu7kEFI3LJg9fBdxdfRO1+cV VvBTzhLAetUaFBnE8hXlq8ZPyrp4qfCoW6cXO6M22XEFWQva/3YJ2ewchUMNPPDjOf+Wjh kaxZvGzZtEjZbal1L4JontpNMJXnUY4XALQByyCb/dwp95TkevsrMztOM2dGFrFiYqxioD zRCaPBEnQzpt69hxNPJl+JfAGzt+YzHoggq25QbbNdthoJGPV2jg2ZMS1EJJ4A== 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 4WXqwK0ft3zprD; Mon, 29 Jul 2024 20:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKdS0d013201; Mon, 29 Jul 2024 20:39:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKdS2u013198; Mon, 29 Jul 2024 20:39:28 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:39:28 GMT Message-Id: <202407292039.46TKdS2u013198@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: 0244e0a177a6 - main - openssl: Add include for getrandom() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0244e0a177a68fc8ff7e8a58fa7a9553956232ec Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0244e0a177a68fc8ff7e8a58fa7a9553956232ec commit 0244e0a177a68fc8ff7e8a58fa7a9553956232ec Author: John Baldwin AuthorDate: 2024-07-29 20:38:49 +0000 Commit: John Baldwin CommitDate: 2024-07-29 20:38:49 +0000 openssl: Add include for getrandom() GCC 14 (but not earlier versions) warns about a missing prototype for getrandom(). Include explicitly to bring in the prototype rather than depending on a nested include. While here, stop defining sysctl_random() since it is no longer used. Reviewed by: brooks Fixes: 838b6caababb openssl: use getrandom(2) instead of probing for getentropy(2) Differential Revision: https://reviews.freebsd.org/D45995 --- crypto/openssl/providers/implementations/rands/seeding/rand_unix.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c index eadacedbe40c..f8e73a02daf4 100644 --- a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c +++ b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c @@ -28,7 +28,7 @@ # include # endif #endif -#if (defined(__FreeBSD__) || defined(__NetBSD__)) && !defined(OPENSSL_SYS_UEFI) +#if defined(__NetBSD__) # include # include # include @@ -36,7 +36,8 @@ #if defined(__OpenBSD__) # include #endif -#if defined(__DragonFly__) +#if (defined(__DragonFly__) || defined(__FreeBSD__)) \ + && !defined(OPENSSL_SYS_UEFI) # include # include #endif @@ -212,7 +213,7 @@ void ossl_rand_pool_keep_random_devices_open(int keep) # error "librandom not (yet) supported" # endif -# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND) +# if defined(__NetBSD__) && defined(KERN_ARND) /* * sysctl_random(): Use sysctl() to read a random number from the kernel * Returns the number of bytes returned in buf on success, -1 on failure. From nobody Mon Jul 29 20:47:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXr5y0RBtz5Rxyl; Mon, 29 Jul 2024 20:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXr5x4QGMz4lxm; Mon, 29 Jul 2024 20:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722286069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q+tI8TSCZ+0WZBTXrD3KnbZliqk6X1XMt+ieFNgYldo=; b=qGosc5jJQHbobLoPSuCxrzbg0Dm511DajwdE6hB0L2B65XSPzTG0b0XXVbeRIti1f1k0W+ /vXDtl9L6CFXKcm7luXnX+8pNfri8tuMAG6fZRgKaGY+ykU31OA6kQUhYKWMZgZN6coK5N GXhsHmrQ87XDTo64T5CkDR79y8L19lje/AJXswxp/igJDcr/K7KcOdFe24FMzlos3uyxnJ PuQPodqSTiyrJIfZFt7Nkp1chehAAGidpf33nqEdDPMqhUWL0LYFBQttAMV+iZXZvfcocv +eEpvF0kzVqn44rR1k2eEwO4nR3lzUOHZ7o+3m3FNl4ZGs9ZiL+6mD7NcMDyCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722286069; a=rsa-sha256; cv=none; b=KOn47Cm4m0qFayekXZqBaPpuCOzp11E2inLD41OJUS8RaTHzkpcMN+HNLDFkSWwCoKqyz9 ankaXqg41PHqheEvrJ5a6LIv+TMTFjuPujhejYlrwjgxMFuToxHZoUL+5o0v5oMeHEokPh 0UhPQKFAmAg24hnDj0liI9s2P0ppNvzt2uxXFE7hEFZp9xBq3nXcHMpGDPbpDhuWiQJmdB pQfvSeGTTQHa4x+2DwfxzkdhsKUqSPy/8CzFaXIiVflEufbPMYX2+2pKjosPlNi6BwrGGP p4j9HU3zaWncZ87Scbcpp0NgV09nj8Cs4/VYod59s86IXQbBMoSH/JpCg5bu/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722286069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q+tI8TSCZ+0WZBTXrD3KnbZliqk6X1XMt+ieFNgYldo=; b=VR6n3L9KCXspGsucNNGWU/OcbISgXiHAN5oNRCUqJJeoarNFCsRF3eMlkHnlAfs/tC/2uA zp+NTC8pG5Xz2JiPJva3jewwAYWGCdpq3ee/jwmOiImtnJtA/1N0yjsQF4rBMJAMhwUWyc 6qIFogyCQzrqTXwwmmrkte1SHtMGLbXCTk4sfdwH7MrGREywg6R7EU5bdDPMQcuLo66Se8 xjQ42zTBZf+WYw/ikKBQ9ELdgKCOQMmiqBsl0oRtpsG9FcShPxTVic7FjWj6ga+3Bjzn6a V4nWyooR0yVXnwwfWW5jDCFItC/nybQUlCX8n2hb4qJjcSHJUpPX2P2oiD+XAg== 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 4WXr5x3v9Hzq3p; Mon, 29 Jul 2024 20:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKlnI0030103; Mon, 29 Jul 2024 20:47:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKlnQZ030100; Mon, 29 Jul 2024 20:47:49 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:47:49 GMT Message-Id: <202407292047.46TKlnQZ030100@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: 882a725bdfc7 - main - siphash: allow zero values for final & len in SipBuf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 882a725bdfc71b9fc3b70cbcc230327528f3635e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=882a725bdfc71b9fc3b70cbcc230327528f3635e commit 882a725bdfc71b9fc3b70cbcc230327528f3635e Author: Mark O'Donovan AuthorDate: 2024-07-11 17:50:31 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:44:27 +0000 siphash: allow zero values for final & len in SipBuf() Currently the assert checks for XOR of final and len. This assert fails when running the unit tests in siphash_test.c. We need to allow the case where both values are zero. Signed-off-by: Mark O'Donovan Reviewed by: imp, cperciva Pull Request: https://github.com/freebsd/freebsd-src/pull/1324 --- sys/crypto/siphash/siphash.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/crypto/siphash/siphash.c b/sys/crypto/siphash/siphash.c index 92c87d71d391..89b2b18149ef 100644 --- a/sys/crypto/siphash/siphash.c +++ b/sys/crypto/siphash/siphash.c @@ -92,16 +92,21 @@ SipBuf(SIPHASH_CTX *ctx, const uint8_t **src, size_t len, int final) { size_t x = 0; - KASSERT((!final && len > 0) || (final && len == 0), - ("%s: invalid parameters", __func__)); + /* handle hashing 0 length buffer - needed for test vectors */ + if (len == 0 && final == 0) + return (0); - if (!final) { + if (final) { + KASSERT(len == 0, ("%s: invalid len param", __func__)); + ctx->buf.b8[7] = (uint8_t)ctx->bytes; + } else { + KASSERT((len > 0) && src && *src, + ("%s: invalid parameters", __func__)); x = MIN(len, sizeof(ctx->buf.b64) - ctx->buflen); bcopy(*src, &ctx->buf.b8[ctx->buflen], x); ctx->buflen += x; *src += x; - } else - ctx->buf.b8[7] = (uint8_t)ctx->bytes; + } if (ctx->buflen == 8 || final) { ctx->v[3] ^= le64toh(ctx->buf.b64); From nobody Mon Jul 29 20:47:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXr5z0JBtz5Ry4G; Mon, 29 Jul 2024 20:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXr5y4yB8z4m5G; Mon, 29 Jul 2024 20:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722286070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djADO+GgdZIquB3sDZ37qPbwOoMXyRF9CxvkY7dA5QQ=; b=RhSTMhmUkyHX6DK73ZVc+S9m+K0kxzh+CmkLMiYMkHpVYelCiDNJm9yR5HByzSaUHLqPsR ItKcOqG/j96XqaPcElbnOGZloslW1rkrNWV8G3+X6Wf2D0TSqULGrbaoBEioyPu/Z9WjUK hDp7z/cXZQ2NDkd/DRTAOAp+dAEfckD1+cah/VuriV4HSgx75uKBBHjSgwE6YM850CjsLo Wf/7AmkkVVDVTahC0rD2xPcSv5G6Zgff8h6H6Snai7r7rB9sJvlcoHk5TjHyIvYuuO58X5 pZhVT199Zvb0tIq8BWw0QeorDJuPIsFWpfyx6FKMl6r4e/OMSCD0fGU7Ty91qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722286070; a=rsa-sha256; cv=none; b=TXN0jiVSxdtyoNJwmk1WarhJ1eOgQLC0DYVstB4ceev4xYlEQ0HkYmUpHLkKlMjP7yExbj mHT1Qcoo5rBBNN9sJHBZcFMuepRzvjr8hN65J1o8JJYeWOzjInD9ufwo/L3p0NO0+XuqOQ G6WKpADY615IEwlwpgRiTEqBsUqLKiljCq+jXu8WpA6PdEUZbVvCebt7Nv8/T8tnuu1Kuy RXggtTEATGUOzMyMs3i9jtuqWO9t16kZ6TB9ha8+UPzwjJJb/QYcRRoIZ4Mf5by8StOpe+ QgJATf7tjuWxlfcZ0Xn/sH9J699ylFckY+qF1Nd1N1BMCkSh2REjaLf2r1fSMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722286070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djADO+GgdZIquB3sDZ37qPbwOoMXyRF9CxvkY7dA5QQ=; b=sUsnRlrdbgr46HPr2OKWsKbD/CTe7XsylH3mUS8qGAOXFR17BXSGpkPePsVSVrf5cKXvgX 9gb9NxCg3/hUa9e1T/pB/rEePSgyFbKHUw4iul8r2ShkPj8AFJzFzK0AG10hkLvr/fMYKt ecdSxBlFZY3nD7VP8VocTLpXAKJc1LLIk31oLgsXLxAyyUC47daJ2Yuufa2KA/jNaNk+3/ KaJ6y8u3MGbirPkmNbvXbKiC+VqqvJaPLM0C2IO8rrjgNuhUXnggzacicROBj24NxJmJeL YRGwCRITy1ha9vjsgC3yAYjZgaOyuLGXGwTIrVBPhNM+rMSv37pfl0RYV6YGZQ== 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 4WXr5y4Nzyzpdd; Mon, 29 Jul 2024 20:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKloEs030153; Mon, 29 Jul 2024 20:47:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKloHo030150; Mon, 29 Jul 2024 20:47:50 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:47:50 GMT Message-Id: <202407292047.46TKloHo030150@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: e40474f3de84 - main - siphash: minor improvements to siphash unit test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e40474f3de84f3c7b885af45d9a9391c6cf448c2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e40474f3de84f3c7b885af45d9a9391c6cf448c2 commit e40474f3de84f3c7b885af45d9a9391c6cf448c2 Author: Mark O'Donovan AuthorDate: 2024-07-11 17:50:48 +0000 Commit: Warner Losh CommitDate: 2024-07-29 20:44:41 +0000 siphash: minor improvements to siphash unit test Signed-off-by: Mark O'Donovan Reviewed by: imp, cperciva Pull Request: https://github.com/freebsd/freebsd-src/pull/1324 --- sys/crypto/siphash/siphash_test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/crypto/siphash/siphash_test.c b/sys/crypto/siphash/siphash_test.c index a9af5a5ebe58..a9f5bcf062bb 100644 --- a/sys/crypto/siphash/siphash_test.c +++ b/sys/crypto/siphash/siphash_test.c @@ -115,7 +115,7 @@ SipHash24_TestVectors(void) for (i = 0; i < 16; ++i) k[i] = i; - /* Step through differnet length. */ + /* Step through different lengths */ for (i = 0; i < MAXLEN; ++i) { in[i] = i; @@ -124,14 +124,14 @@ SipHash24_TestVectors(void) SipHash_Update(&ctx, in, i); SipHash_Final(out, &ctx); - if (memcmp(out, vectors[i], 8)) + if (memcmp(out, vectors[i], 8)) { + fail++; #if 0 printf("%i: test vector failed\n", i); - else + } else { printf("%i: test vector correct\n", i); -#else - fail++; #endif + } } return ((fail == 0)); From nobody Mon Jul 29 22:57:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXtzV0V6mz5S91T; Mon, 29 Jul 2024 22:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXtzT5GwPz43D7; Mon, 29 Jul 2024 22:57:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=URBY4hx0SgEtzq9ivZZgQveVgadQmlxCUpZay2k/QLs=; b=TdLWFWlvFJyyoVaXyDFg3LdM/MIUb3GzvESXvKJZFb2mSOXlM3dse+WDCsAY6z8GW/Cr1+ 99xpQrFcneQNIOV4jpJstOfvdVDv9X9bnVlL1cEcWCLF8BlCuYsDe/uGxvgQsfrcIdqrQg 4H6WuRCad4hdsQuBJ4wSPIuixILzwzLx3DxoneCGDyelcyyWASO6/nBs7Y4agx8+4c8eRe xkmUQKWuS8/kub+sXNC5OdDtcIjFLbgHtvaR+XsUhAL7+fjuyjblRjTOnMTz7foITdD+Ks 1jHJimrdBYkZqaGw5U/Gf3D9Z1nUVNH9mUiUHZC3Wr6hdQdFkB7rm2SRstFq2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722293845; a=rsa-sha256; cv=none; b=bXwJrVcBBxfTtNYwVN3+6i3RFxMvkgrlWde+genYWKIsE6KHutxs4HkGSwADhRxvJG8vED E31d/WnWpH3cnZ6gOdTYu3ZVCoPN+7YKrTwQemzLIy2XA4WNzazxr6h6Gq4sseXDoR5djf g82GvNjLSEE3aw1NwYBPFBAgm7cOrBOS9bfpKE+7pyou9sGQ557SCpn4iz4KkebPXgPdc4 FDzdypOURzgDoF37zRD+6vQMijTeeHcVmnMDt1H8OCf1ATeQ6k7w7FAmFW7W1RnkYC9miC jalSF5/A5wPgjACX5wnqt57Ky5HxmaLxdBNn17+KMpoJtHpra6/QI/KTZQDgvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=URBY4hx0SgEtzq9ivZZgQveVgadQmlxCUpZay2k/QLs=; b=ywEyAwWVk6dSOy3lnDnga3y62SWg/ZbUwZgx/sKWX/bRnMr3KArO/i+0fw6X/RKCEtMC4J 5c8T8be0VdCq4LumTxBwa/aFCHB/Am92uQcaIltqBvw7M71+l3exsj85vdtKMFixZUuHz6 7KvjWa9uc95MAbMivl2RsR33VYDq7RN1WhIkTeNE6T2e2KsrPj6H43cd3mXH29imqWPZJD d58WNMdAN/nmhDbwQ89hS4n6xUYXH/vL8f07foPbuu51aV50knH8vWfXFiCf+BJaNUkjti h4CIz5vYVBHKqzdtIT4Xu4k7Sp81mYwtn8GNrAoSsvQAnKGYM+r2pCDm5kIB/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 4WXtzT4t84zslr; Mon, 29 Jul 2024 22:57:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TMvPOZ049401; Mon, 29 Jul 2024 22:57:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TMvPr6049397; Mon, 29 Jul 2024 22:57:25 GMT (envelope-from git) Date: Mon, 29 Jul 2024 22:57:25 GMT Message-Id: <202407292257.46TMvPr6049397@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: 8165650389ba - main - stand: Remove obsolete junk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8165650389ba2d0a68cea6902ac3750055cad9da Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8165650389ba2d0a68cea6902ac3750055cad9da commit 8165650389ba2d0a68cea6902ac3750055cad9da Author: Warner Losh AuthorDate: 2024-07-29 22:56:28 +0000 Commit: Warner Losh CommitDate: 2024-07-29 22:56:28 +0000 stand: Remove obsolete junk We long ago changed newvers.sh to make these comments bogus. Remove them since every single one of them is broken after the $FreeBSD$ removal. Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D45879 --- stand/efi/loader/version | 4 ---- stand/efi/loader/version.veriexec | 3 --- stand/i386/loader/version | 4 ---- stand/kboot/kboot/version | 5 ----- stand/powerpc/ofw/version | 4 ---- stand/uboot/version | 4 ---- stand/userboot/userboot/version | 1 - 7 files changed, 25 deletions(-) diff --git a/stand/efi/loader/version b/stand/efi/loader/version index 2bed97c231d2..4d6c3592e10a 100644 --- a/stand/efi/loader/version +++ b/stand/efi/loader/version @@ -1,6 +1,2 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.1: Keep in sync with i386 version. 0.1: Initial i386 version. Derived from ia64. diff --git a/stand/efi/loader/version.veriexec b/stand/efi/loader/version.veriexec index 5c9292310c04..090267dfa9cb 100644 --- a/stand/efi/loader/version.veriexec +++ b/stand/efi/loader/version.veriexec @@ -1,6 +1,3 @@ -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 2.1: SMBIOS 3 support 2.0: Secure boot support 1.1: Keep in sync with i386 version. diff --git a/stand/i386/loader/version b/stand/i386/loader/version index ea8067efa243..e5fdb8976bf2 100644 --- a/stand/i386/loader/version +++ b/stand/i386/loader/version @@ -1,7 +1,3 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.1: New calling conventions for fopen. 1.0: New semantics for finding the kernel, new boot. 0.8: Set/getenv & cia, copyin/out. diff --git a/stand/kboot/kboot/version b/stand/kboot/kboot/version index b24d6ea8e47a..a142c2b0ce2c 100644 --- a/stand/kboot/kboot/version +++ b/stand/kboot/kboot/version @@ -1,6 +1 @@ -$FreeBSD: user/nwhitehorn/kboot/powerpc/kboot/version 224106 2011-07-16 19:01:09Z nwhitehorn $ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 0.1: Initial kboot/PowerPC version. diff --git a/stand/powerpc/ofw/version b/stand/powerpc/ofw/version index 145f69c28aa4..24bdc8254ce3 100644 --- a/stand/powerpc/ofw/version +++ b/stand/powerpc/ofw/version @@ -1,5 +1 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 0.1: Initial OFW/PowerPC version. diff --git a/stand/uboot/version b/stand/uboot/version index 71464740dcc9..e779e403e7ec 100644 --- a/stand/uboot/version +++ b/stand/uboot/version @@ -1,5 +1 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.5: Unified ubldr build diff --git a/stand/userboot/userboot/version b/stand/userboot/userboot/version index 3b86a26c72ae..f361513b2741 100644 --- a/stand/userboot/userboot/version +++ b/stand/userboot/userboot/version @@ -1,4 +1,3 @@ - 1.2: Userboot with lua or forth 1.1: Initial userland boot From nobody Mon Jul 29 22:57:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXtzW0yKxz5S8tm; Mon, 29 Jul 2024 22:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXtzV6CJxz432Z; Mon, 29 Jul 2024 22:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pCzAracvVMUjNrd3vTCLElsLFhAiuwl8c7GS094w9WA=; b=Pr23XYO7SEz53y/A8zoncKWz23VhDVsnqg7ALSWRkii0Bq3RcuDbYiOlZMYdDlwY6zfGqs RaqdXHh4vIaMP/m9b9splWXy9q3JOOTwVbDrUb736hPpiBHqq6ZjKcBJqd0FBZWCGKfPi1 LGF401ePui96rYrR1+ptmVKM9TGypkNzuaF586w9a5kFCXxWhpsu7PAc4kZo0qyKRBsC2L M9sMX5BVOxPEAmWW46yzINShBzGq4wUbVv6q29s06L0u1uYXAYLriskg2rnDjvM2giIEqH mpIm0XYl5zVwHpOQAU2K17+N79xOQ0GMbC1xK60aX/1buiAXp/MhmKr3fyrRJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722293846; a=rsa-sha256; cv=none; b=o3LWt4L9B2QJPQBdSLlNSH3sIp2HU2CrOn7+QCpBvaHSWDV1FllAprolVYpj7etRnrGPM9 NGc1B0r/4BB86ViJC5oFKRkUNlYSln1vTQGM2zNfit357usGjTD08u+UF5LLfFWKD9Gs4f jTBjypGVi6A43R9nukK4rwrwojAVqL21+zN2ruFhvb3Km8Xq/z7wFw1t7M9YluOAlWaaef iI4Mte5D9N1BmvKDJs4rQ/lrFnuB/zNT8aGlPbcuB2wcdxoOcHtVWaC48NTO6ikTbcPXQC lTbnBJGZyP1ps2iPf59huVRUr8C0CPwlmxyJ8o+ieWJA1JKuuqTpts9HFY8aGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pCzAracvVMUjNrd3vTCLElsLFhAiuwl8c7GS094w9WA=; b=QjCwvq5V0HXGNnv4zBB7qXKUjaIPxLu3jyoDaiADA05hDr1vVPop2LRfySeuHq1PbAi4fQ euc9J5P/6kQpzOlyF1ChxnG9l+VYETqc9pGxaEHqqx5YhsolpX3WoZbY/2AlnxmM4tO4da LQYaBo1vHVWf7Q/5UCZIpTc7B5n3MPUvc/upwJM4OF0ZgMdPEpKftUanhC2Ke6FmtXwYIH Z8eQN60N/xsTUikfly5BtTVnSWha2GVCK594pIA5p9vj6SIJVNfCmE9/+Ebnw6LI2sdY/+ WHA6TisQZWS6BBbcrGUlEP8xuj4SBY8O0prkHQIzU31dJKMbPV9E/IYBtOarPQ== 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 4WXtzV5q0jztC3; Mon, 29 Jul 2024 22:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TMvQxa049449; Mon, 29 Jul 2024 22:57:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TMvQxv049446; Mon, 29 Jul 2024 22:57:26 GMT (envelope-from git) Date: Mon, 29 Jul 2024 22:57:26 GMT Message-Id: <202407292257.46TMvQxv049446@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: 65300ca72945 - main - stand: Kill commented out line List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 65300ca729452f62c201baedcbb4a67f2afc5ed5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=65300ca729452f62c201baedcbb4a67f2afc5ed5 commit 65300ca729452f62c201baedcbb4a67f2afc5ed5 Author: Warner Losh AuthorDate: 2024-07-29 22:56:48 +0000 Commit: Warner Losh CommitDate: 2024-07-29 22:56:48 +0000 stand: Kill commented out line This line is no longer needed as fallback, and should have been deleted in 7870a52598ad8 instead of commented out, but 26 years later, I have a high degree of confidence that old change was right and we won't need this line as a fallback. Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D45880 --- stand/common/newvers.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh index 916fecb98334..369a1c7c76df 100755 --- a/stand/common/newvers.sh +++ b/stand/common/newvers.sh @@ -44,7 +44,6 @@ shift $((OPTIND - 1)) LC_ALL=C; export LC_ALL u=${USER-root} h=${HOSTNAME-`hostname`} t=`date` -#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '` r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` bootprog_info="FreeBSD/${3} ${2}, Revision ${r}\\n" From nobody Mon Jul 29 22:57:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXtzX21Djz5S8hc; Mon, 29 Jul 2024 22:57:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXtzX069nz439l; Mon, 29 Jul 2024 22:57:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Juzr7YBcYfAeKuGQiKjug9XljvxGnSniztryAgtmsiY=; b=pP2xicrJfErJR7PuY/+0bVX25sBrq7zjcmqH/gryLbk0y7KM6BKiNM7kPhrHFagBRcFN3s ZmnNdVG3W5zOBG5hxU3FWbtyEzTxG+z3KLqKOCsDr1QpFBjnSppn8RgbnAzMfcBVaIjnx6 O8+7GPZ3bBKNvSIEUXDr+dXomi1dFopFpnPUSFdnqrtkN+VtFC1V8S8E/ekMEA7As2yXlV TqsQ6v65+zkgmH95dFNKjlFRwXPnRcJxww4Dv6oJi4LQiwtoTsLkKc7xuwTSAm50ATCigl 6qrMG5gi+v9CGnQCGnO5E4aMns5C84bh/tBHZKceht7mb9a6r1SPrplvSP5fPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722293848; a=rsa-sha256; cv=none; b=S5qS+FNQvyQZs40XRs27tOQiBwhiD3leYWdV9Bgnf0s3pxzHYtBQhvnuLVI4S2O3/scXR9 AignY1/TQQhEApuCykbT4yKbFo67Hb3X28JsXiU6UDQf5QRYV3BGDL5zAjE/IczNYBphk/ p0NMHhxVpV3qPJBGPChiIXbqWEg9mOzyZfENfsjhFFeGoaUoa3jCf2PSsmXTJxIgQrVMvH RFO3FZyYEu0Hjo1y4ydKZWGaVqBm0JbHdx3J1clnMyjEb/pgqKQvhkOq6Usg+vs8OiXQc7 jq7E5/rkFsV683hRDLYiHdICjS7ZNgck4OI6QssMfNTJR+lR4/2Q35irMOTgVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Juzr7YBcYfAeKuGQiKjug9XljvxGnSniztryAgtmsiY=; b=KBWAsQIYgneAUMVwK+ZO0qU2MsvyB445oFa6m4pt6PEWN7F1g0oLEe0l6S+S2xrfcZ6EXw cSfUr9fxtgHkbPOiFQGvoBuQY1UaVccQbS7qUBDBXfMr5CHKyksYY85s5mZBJ0zzJKA8ii I4SORR+INifp1BMyoa5B9TTCklBZSotle5IpolpabuOJDggWcsE8Ve6EQe2kg186lMupg1 nCK3DHQxQjo1Nad6R2iuWc5qhFmg6Hs7sFdofMHS1kURjObmJedEkH5WlWzOsRk2EG8s6p DLwrKBoGYIVpQVFbwLL0drMBXqOYxXEK/ZsBsjKPdgEFbTnprf31nrhvTM/xAA== 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 4WXtzW6pHfztC4; Mon, 29 Jul 2024 22:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TMvRsP049491; Mon, 29 Jul 2024 22:57:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TMvReZ049488; Mon, 29 Jul 2024 22:57:27 GMT (envelope-from git) Date: Mon, 29 Jul 2024 22:57:27 GMT Message-Id: <202407292257.46TMvReZ049488@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: b38a82c77ab9 - main - Revert "loader/lua: Remove pager shim" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b38a82c77ab90eace53c56151b191efd1f4a8439 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b38a82c77ab90eace53c56151b191efd1f4a8439 commit b38a82c77ab90eace53c56151b191efd1f4a8439 Author: Warner Losh AuthorDate: 2024-07-29 22:56:55 +0000 Commit: Warner Losh CommitDate: 2024-07-29 22:56:55 +0000 Revert "loader/lua: Remove pager shim" This reverts commit 8b9178cd0d35ff2beafebdd51c8c44ba2b5aeb0f. Really old loader.efi files persist in the field. Revert this to support it. We need to support this through at least 14.2 now, alas. MFC After: 3 days Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45881 --- stand/lua/cli.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stand/lua/cli.lua b/stand/lua/cli.lua index 596e55a8d1d8..6832da0a31a5 100644 --- a/stand/lua/cli.lua +++ b/stand/lua/cli.lua @@ -30,6 +30,18 @@ local core = require("core") local cli = {} +if not pager then + -- shim for the pager module that just doesn't do it. + -- XXX Remove after 12.2 goes EoL. + pager = { + open = function() end, + close = function() end, + output = function(str) + printc(str) + end, + } +end + -- Internal function -- Parses arguments to boot and returns two values: kernel_name, argstr -- Defaults to nil and "" respectively. From nobody Mon Jul 29 22:57:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXtzY242cz5S8kt; Mon, 29 Jul 2024 22:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXtzY1780z438C; Mon, 29 Jul 2024 22:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t5s2wxKcHCH7l8Nc5bJeoH6Hp2XaBHX4lADyl7VcclE=; b=qcC4Yvhu5qzkr1ts2UUr4eLEteXxqRoCj24oUXk/xaqv+nCwSpTCTtDIa5wcGJb6g629UJ SO5xwGe4IsOjDdHZ8xUPW2gxYOO6WFcL9qdXtNkqlmdQdOTV6xkLlFU17Ric8HX55nfwxt J9nSihL9l+OFeFPYPYAkchqTOhNBePfXucQH6uFjmWuWzjIyXQs68xx9vN3pdgnX5D7kkC i47Unz+P/zYT/QSrg0R4sDceoq+zkhjo+O716bVqgLrJ2109Nx+musn4dcfn7fkQ8i0gMN emAIz0wK/6cWe8spKPpr3h3d6dIyoB1jrwR4tmc9/Ku5ozELht1+KHZjURoStQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722293849; a=rsa-sha256; cv=none; b=BAFvnC5gxY+Nd/WDynJOQPFFEf/3E9KMdpm1d3rtxc32kUW98ByjwPfqYy1n3dCKL6db/P YQdf37McAn0g/mQIzoeiu/sLHYAZDL+WDxNbJb+OJqsZF/ipv/P4tOw8qWZ+GoCZoDo8qr TjFnT6B6sJDkZtzqD02WkT4dHSRxMKFEDUZ/VPnFtqGiyCdy31qcIV99u+VPaNnarW1AnE EAjJLAdVQoFWqn/Jbd7UpPUOdbWJ/igEq9nj3WOdD5lkbqoRqVFOLoY5Tk6YP0xs9k3zpK 960nd8/46lDcjeLlTaqqgbm7bslmjlO6in3FG9jYLymrQNNfykKIrsB65LtAHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t5s2wxKcHCH7l8Nc5bJeoH6Hp2XaBHX4lADyl7VcclE=; b=CSQBqQjvsKaR8IHq8fcgmx7waZdhizeqiA4X3Cpo3i2RRWRFT/V4rmpgumAp8irY6KSjNV 3taFrq2HwBcH3P/6/zW+cSlAsF/ANGbCSN2EqP6wOp8CUrgBDYzt7lw9hO2b6pUPA/7wwL xXvk3wn3vx/O/ROTCFkiS+rofP7RDy0uOVQEkkpuY7yth0xoWk31EYPD782dWpxhIkT9bI FDSfLHHCgls0AdrqGDhSkIlIo4X3VfxKzGppW+jruQ5UHjh8ZweuA+SkX1eP/br9pw40Ek m+0yCkcp+baPFALKWkMtb6YwcmPjd9y1fn5YtbU3FtIe9GxW9JiA83DyYYgcXA== 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 4WXtzY0k3kzt4V; Mon, 29 Jul 2024 22:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TMvSgZ049539; Mon, 29 Jul 2024 22:57:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TMvSbH049536; Mon, 29 Jul 2024 22:57:28 GMT (envelope-from git) Date: Mon, 29 Jul 2024 22:57:28 GMT Message-Id: <202407292257.46TMvSbH049536@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: 522a65a8d97a - main - Revert "loader/lua: Remove compat shim for loader.lua_path" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 522a65a8d97a0d6b634266f1b4a89aa8f374279c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=522a65a8d97a0d6b634266f1b4a89aa8f374279c commit 522a65a8d97a0d6b634266f1b4a89aa8f374279c Author: Warner Losh AuthorDate: 2024-07-29 22:57:04 +0000 Commit: Warner Losh CommitDate: 2024-07-29 22:57:04 +0000 Revert "loader/lua: Remove compat shim for loader.lua_path" This reverts commit ab97d42addae97a389c6f22d6bba62ed954bb8e7. There's too many people in the field with FreeBSD 12.0 loader.efi that stubbed their toe on upgrading to 14.1 since they'd not updated loader.efi. While we sort out that mess, add back this workaround. Can revisit after 14.2 maybe. MFC After: 3 days Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45882 --- stand/lua/core.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index eaabff6a7602..9226de564348 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -65,7 +65,13 @@ end -- message on failure. function try_include(module) if module:sub(1, 1) ~= "/" then - module = loader.lua_path .. "/" .. module + local lua_path = loader.lua_path + -- XXX Temporary compat shim; this should be removed once the + -- loader.lua_path export has sufficiently spread. + if lua_path == nil then + lua_path = "/boot/lua" + end + module = lua_path .. "/" .. module -- We only attempt to append an extension if an absolute path -- wasn't specified. This assumes that the caller either wants -- to treat this like it would require() and specify just the From nobody Mon Jul 29 22:57:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXtzb5MRTz5S8tn; Mon, 29 Jul 2024 22:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXtzb3LTGz43H1; Mon, 29 Jul 2024 22:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=78m8FEn5jAcSvvrNggI2mm9WKC3PZyOcgneCpK8Sn4o=; b=fomdVmPU/p+G3s1gRFGRMs7CLTvgn43y9QqeaKOB5FctvCN/vUDPOOzaVZXjrfgn4x6zLt 5hHrSckaqFf4Oq12rfQDdme1FLs/B9v30yvGwHd3sYeqQaLYhf6SBdTq/HmgvRdO93xI4l tSWIONKJbn28le2Xqbp5FpLWwuUIXtIHQ3/fTLuD1eQbyumEjkzwJLhnGY0n/rOrFESIOf R861mIKGtdiuoGjVanyK7KbRIGThhxREIPrI8GjI0CQBPSd0RTq4PuacUa6rzvfanhPnZD Lp5gou+L30PkviPUavBU7jAgHCvWGMZ9HbAuL5eyYOVM0n78AkD0tgNn7m2KTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722293851; a=rsa-sha256; cv=none; b=V0eP8Q7nsIRyKeNpDeiTKKNnXg5xmhU542VhjeVp71GEelLHseaGFVKmIGjnTid4CDUqSt yGab6jKYeJS9ZZTRwQxvQczAY2OjWbLhVofPaRgj7NMxelz+ruB9P4qLTDtk1Z9b47GmBD p0uo23L0IQNc/bMKSuzIEXMHL3kHC8FzJq3aGPm93ZvuIOYUA7KUGiu+sFojiQE9jzz+eg xBJH+kvSd0xkSXYMkEVC55LrAqr0Bhw28dc2Qvwcrk2SFEcZ164GBJOAKEskgUtX8+uV6j sS305ebszNlGf9nqwGR6BwhLg0kqeh+JD26tVyoGSiitJI73Hox8vQZSuUZU8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=78m8FEn5jAcSvvrNggI2mm9WKC3PZyOcgneCpK8Sn4o=; b=pOMm/HMtLwS1r1WLLlInz4nS18nyeu6S0RWd+mY8E/D5SyNcxD+FpnobWPCR3gPbT8A9vT rLuOFJtpRhZ3ByBiQCxwbRV/E0RTwdaTDPAxY2I7m0r6YJwn6987jrcoW77M4cZZmQI5SH RzJnUi4VvCFrPFneJ3NwcEKrVJyd1vqmT7BCYmEWqG8F4GAnwOpEyk38V7oHwYKZih3Dce MomfabP8iFdHPpbIwaE5qHM9attQGraBaSkymfjcwJHPEnVclbfKvauKeW07qjzZwpWhkC HOTiQVwEQ+QJ/zYQNgw9nyb9EmF70xl0k+unnnfmcgDQqRwPLQvyOoAOzffHKA== 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 4WXtzb2jKQztC5; Mon, 29 Jul 2024 22:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TMvVJu049635; Mon, 29 Jul 2024 22:57:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TMvVY9049632; Mon, 29 Jul 2024 22:57:31 GMT (envelope-from git) Date: Mon, 29 Jul 2024 22:57:31 GMT Message-Id: <202407292257.46TMvVY9049632@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: 9f7f90507528 - main - loader: Bump all versions to 3.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9f7f90507528aaa9a2f54575c1d4f4010d01c2e5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f7f90507528aaa9a2f54575c1d4f4010d01c2e5 commit 9f7f90507528aaa9a2f54575c1d4f4010d01c2e5 Author: Warner Losh AuthorDate: 2024-07-29 22:57:22 +0000 Commit: Warner Losh CommitDate: 2024-07-29 22:57:22 +0000 loader: Bump all versions to 3.0 Each incompatible change we make, we bump the major version. We've not done the bump in a while, so sync everybody to 3.0. Anything older than 3.0 will be given a warning that their boot loader is too old. We check only the major version, though, so minor versions can still be bumped for individual loaders (though I honestly doubt we'll ever need to do that again). Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45888 --- stand/efi/loader/version | 1 + stand/efi/loader/version.veriexec | 1 + stand/i386/loader/version | 1 + stand/kboot/kboot/version | 1 + stand/powerpc/ofw/version | 1 + stand/uboot/version | 1 + stand/userboot/userboot/version | 1 + 7 files changed, 7 insertions(+) diff --git a/stand/efi/loader/version b/stand/efi/loader/version index 4d6c3592e10a..570796b66956 100644 --- a/stand/efi/loader/version +++ b/stand/efi/loader/version @@ -1,2 +1,3 @@ +3.0: Lua scripts API stability 1.1: Keep in sync with i386 version. 0.1: Initial i386 version. Derived from ia64. diff --git a/stand/efi/loader/version.veriexec b/stand/efi/loader/version.veriexec index 090267dfa9cb..529f3ef5544b 100644 --- a/stand/efi/loader/version.veriexec +++ b/stand/efi/loader/version.veriexec @@ -1,3 +1,4 @@ +3.0: Lua scripts API stability 2.1: SMBIOS 3 support 2.0: Secure boot support 1.1: Keep in sync with i386 version. diff --git a/stand/i386/loader/version b/stand/i386/loader/version index e5fdb8976bf2..82229ae6a06d 100644 --- a/stand/i386/loader/version +++ b/stand/i386/loader/version @@ -1,3 +1,4 @@ +3.0: Lua scripts API stability 1.1: New calling conventions for fopen. 1.0: New semantics for finding the kernel, new boot. 0.8: Set/getenv & cia, copyin/out. diff --git a/stand/kboot/kboot/version b/stand/kboot/kboot/version index a142c2b0ce2c..be162b693ada 100644 --- a/stand/kboot/kboot/version +++ b/stand/kboot/kboot/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 0.1: Initial kboot/PowerPC version. diff --git a/stand/powerpc/ofw/version b/stand/powerpc/ofw/version index 24bdc8254ce3..fd8b01228f46 100644 --- a/stand/powerpc/ofw/version +++ b/stand/powerpc/ofw/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 0.1: Initial OFW/PowerPC version. diff --git a/stand/uboot/version b/stand/uboot/version index e779e403e7ec..0293880a1f90 100644 --- a/stand/uboot/version +++ b/stand/uboot/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 1.5: Unified ubldr build diff --git a/stand/userboot/userboot/version b/stand/userboot/userboot/version index f361513b2741..2fba2c27eabc 100644 --- a/stand/userboot/userboot/version +++ b/stand/userboot/userboot/version @@ -1,3 +1,4 @@ +3.0: Lua scripts API stability 1.2: Userboot with lua or forth 1.1: Initial userland boot From nobody Mon Jul 29 22:57:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXtzZ4grkz5S8w1; Mon, 29 Jul 2024 22:57: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXtzZ2Dnpz430j; Mon, 29 Jul 2024 22:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7OFyqTYO4wLcmNY3DtAsf+TvmtAFoOwEi4FgwyfUeo=; b=XT6AYPrazkh7wl4O2KPTi4QWAYPt4k8ErJqPCt2gZdG8L2EHHY4cWogTUjIt90l1bnO+g1 ddTYLAD9C0cn/N1WqwnPCPJH2DIwOWzxfKhh8oJ+MZR2Qp2dEhVaRRi9N/sbkgBwTumBDM 32m0+vQdPjDAJa3PzbMyGOEd/6PKopCp5iZIpljTecKGMartKQTnM+1U/Ns+4h7JGqRXn/ LHG5TdS8ek3LP6L9ehPreHD4s1hREojQ/BY1x7oI9vdOxUGBNqIkyCW8rNq7qD+mIOxtIm znNGY3fGae/qGQCfVAckhylDK8+VUnMMe5r8BHvEdkaikaawedy2deF7wBYQNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722293850; a=rsa-sha256; cv=none; b=edRGkIKfodOvXf5bVXOQ+zzelJh2vSd2Ya9kviW0ydZ67NprgNE3zFpnSvcgtG0Hn8eKdH hgLUVm74o/FZEmPlh2xUY9g8dJKvFBiSRGyRzmlex1bb6eMaeIs0S4A2CiZJJO0aeyKEs0 eroeq71bxmCsn8g5sTCSpUYdJUBVEbo8YbIQI7cq3+gkpUAIEfJBR+G3tQPcLLxUNnAPsE d5bu5iocK6Ocw/WvTasojLF7U+gSmgSfnfYdVZXyWV9CyIj6q+2NwidnHJfOhpKICfRl/l iolJKjb6c7kd+Cd7xyb6A66OTX+9yAZSHyTFIsUNiOtHagQuJ4szKHfVBTK5vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7OFyqTYO4wLcmNY3DtAsf+TvmtAFoOwEi4FgwyfUeo=; b=WMnXGwtLO0p8nNIQG2phS1i6nBISOdmNvbl8Gkb+JudHCaMWNwDKej3TRSSxabfD//cvJn bNucpQ24TH9dYVNibNULfDeYtqImJ51IbTZQM6PyVrkrHGAgxdsZOCi5QI/vodGISBIsPi IC0uuaUdGZb+HI3LEdKhWbo0Pltwkv+aaM6hkfSCRTS+RGnHioIJTsjn7seKjzbLsjc91n GNMrxUFpJgojYvnUAZfk8SAYxhI3yHshlAzTTmaDCdJG01BNwfNBKRUzaB7oDn5hLDFaJF LBtQATbuVvu+oaUpVgmzfvGOCYsNUvMFlway5UBAIXqN9bFSG2QxcdLt4qpRpg== 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 4WXtzZ1jL4zt6G; Mon, 29 Jul 2024 22:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TMvU0M049585; Mon, 29 Jul 2024 22:57:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TMvUVC049582; Mon, 29 Jul 2024 22:57:30 GMT (envelope-from git) Date: Mon, 29 Jul 2024 22:57:30 GMT Message-Id: <202407292257.46TMvUVC049582@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: 809edb3636a5 - main - Revert "loader/lua: Remove workaround for command_error" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 809edb3636a5494ad7d3dfff910e0aab89d83442 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=809edb3636a5494ad7d3dfff910e0aab89d83442 commit 809edb3636a5494ad7d3dfff910e0aab89d83442 Author: Warner Losh AuthorDate: 2024-07-29 22:57:13 +0000 Commit: Warner Losh CommitDate: 2024-07-29 22:57:13 +0000 Revert "loader/lua: Remove workaround for command_error" This reverts commit 552f3072af54820cf1805f712e2567bc1b7f046d. loader.command_error was added just after 11.2, but appears to not have been back ported to 11.x. 11.0 was the first lua loader release, so keep this compat shim until we sort out what to do. MFC After: 3 days Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45883 --- stand/lua/config.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index ba6144364247..86f5ef6174a2 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -407,7 +407,12 @@ local function loadModule(mod, silent) end if cli_execute_unparsed(str) ~= 0 then - print(loader.command_error()) + -- XXX Temporary shim: don't break the boot if + -- loader hadn't been recompiled with this + -- function exposed. + if loader.command_error then + print(loader.command_error()) + end if not silent then print("failed!") end From nobody Mon Jul 29 22:57:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXtzd01mDz5S91Y; Mon, 29 Jul 2024 22:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXtzc4GJJz438q; Mon, 29 Jul 2024 22:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tb00aXQ7V3xhL0siS20zCqU/j31sMSjnEgRrFP3pnW8=; b=KA1S5Av2On+3nqZIGlzV84yIgD/51zyND+QIKNp6iXyPPDIFK8w03eTfCViFJwofizArVF Qy37jjw6+f1kRrsXf4BjM3GUj87AuoFnYZK/bPoZyawd0kjvXhZYX+CWeSD4wxcw2OarOE LfpSOHRJbLt8nH9XA19IWmORPDa80z7MoYkCwPi8dz5pDgJn/ednNZIvPkbPvw0+4YAZT2 RQ/flGDPfnXo6Aq1HLA5yPEl7TOtbI4FkYwWJkdRLaCkVnFV0TyCyV3cuijhTYKeAixuCm 95yHoJN+2VlQBZxN11bRCJYasB06qQEeCnUhn1odSBfA883UKoQtkbB713TR2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722293852; a=rsa-sha256; cv=none; b=cvlN0TAUKzHQxpcT2eRWGnl5xw7sghWCWfoxJLHWfPk+heOapNTKGx2/TnJaB+JRz1r9oJ OLOWH28Dog/baY0AsElGwnPeYOxqcOQuyJaa4QaOxVu288O7jFRDLMwAxcFH+ZX+zKq3/t /R8VRkLXzz6zvPBX+Ro9tAxpSl0pL0CBlpWJE58bBZBS1zPL7aYDO0S1RhdA3Ii8n4QjDi 1GyWOJQkWpum7Jx8XQAeUDIbm7B+ZtnVJpMMy0cZ+SNhA40IV2OkciIttuyIovk8dmjz5I Iq+I5KprEIEZU3z6aKILTz7Y9D6By8/z8rTKUoWfy3vdn23WMRvPs7f8v5PJow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tb00aXQ7V3xhL0siS20zCqU/j31sMSjnEgRrFP3pnW8=; b=HU/OPg06oFVT+SPVgHmVxXn5b2C5c6TE/12+Xx4yleIiR3DnvkeR425rEsq2A6ngwdSNYn 5YYZDHXsr7QFy1YL+GoFKOsmEbONvknwNYWzMjs5y9+U2HQUvpvh6EJIFF07+iuXIrios3 mEsst5nXjyalAsAkrIyzQ8avxUozBNtWQfMTC6GLILbL7pkDiQoiooRxDaWpDAH6svJZrM SSQ1OEsx5CbTBuMGgEFDs2/NIq8PKLU2De9xZsTCbJlcIuBTc85n1BC4OFFHSlYJbC8yHU c/RUUMIp1luSfT9iea4eXCJmwctbeT5qtMoYfuOeUtL0bXhme1V1+GiBbROYEw== 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 4WXtzc3qWDzt4W; Mon, 29 Jul 2024 22:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TMvWVq049698; Mon, 29 Jul 2024 22:57:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TMvWoH049695; Mon, 29 Jul 2024 22:57:32 GMT (envelope-from git) Date: Mon, 29 Jul 2024 22:57:32 GMT Message-Id: <202407292257.46TMvWoH049695@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: a2fd7ae87991 - main - stand: Print a warning of the loader is too old List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a2fd7ae87991044ca283974ced8f6ed635d1cb0c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a2fd7ae87991044ca283974ced8f6ed635d1cb0c commit a2fd7ae87991044ca283974ced8f6ed635d1cb0c Author: Warner Losh AuthorDate: 2024-07-29 22:57:30 +0000 Commit: Warner Losh CommitDate: 2024-07-29 22:57:30 +0000 stand: Print a warning of the loader is too old If the loader is < 3.0, print a warning that it's too old and needs to be upgraded. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45889 --- stand/lua/core.lua | 21 +++++++++++++++++++++ stand/lua/core.lua.8 | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 9226de564348..7b7560ddc820 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -542,6 +542,27 @@ function core.nextConsoleChoice() end end +-- Sanity check the boot loader revision +-- Loaders with version 3.0 have everything that we need without backwards +-- compatible hacks. Warn users that still have old versions to upgrade so +-- that we can remove the backwards compatible hacks in the future since +-- they have been there a long time. +local loader_major = 3 + +function core.loaderTooOld() + return loader.version == nil or loader.version < loader_major * 1000 +end + +if core.loaderTooOld() then + print("**********************************************************************") + print("**********************************************************************") + print("***** *****") + print("***** BOOT LOADER IS TOO OLD. PLEASE UPGRADE. *****") + print("***** *****") + print("**********************************************************************") + print("**********************************************************************") +end + recordDefaults() hook.register("config.reloaded", core.clearCachedKernels) return core diff --git a/stand/lua/core.lua.8 b/stand/lua/core.lua.8 index 84447d7632b9..0bdf88c1a364 100644 --- a/stand/lua/core.lua.8 +++ b/stand/lua/core.lua.8 @@ -218,6 +218,10 @@ If there are no elements, this returns nil and nil. If there is one element, this returns the front element and an empty table. This will not operate on truly associative tables; numeric indices are required. +.It Fn core.loaderTooOld +Returns true if the loader is too old. +Specifically, this means, is the loader old enough to require one or more +workarounds in the current lua base modules. .El .Sh SEE ALSO .Xr loader.conf 5 , From nobody Mon Jul 29 22:57:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXtzf3DlGz5S8w2; Mon, 29 Jul 2024 22:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXtzd5Gd9z4392; Mon, 29 Jul 2024 22:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zTCV2hD59G12DJH2jmvycHwCJ7C3HH31e5+mku90Iao=; b=VjV2slT8pQ7kZb1TqqREz1S2Ne8nNj14GNzW6ftllmCKhLjf6I2fboIiVxhCYcl1K+Gnp1 a3D1pnhMfEtMkfH6gLkOT3tAaOyK3WQLM6ft+QRPvpf1w/eN2yAIxqaIYDuVvJUZYCp49N 81o3Imw0/jQ7lXEMvEKSI67ptAiF4TWzrhu3vL5TRByhmJ8FPhmdjs2Uu8JExBIXWik4Sg UMuK54/xtaK31XZ2KRvnSR4cXs5JUwb9MmcpHfhyQ1NzuAZl8GTntf+5qYjF88vnetmUhy S5Z//WjcooCQquPjWrDbcXPpkjFtydsIR66K7D9UnQstI4pIboUnYrUnUGQVQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722293853; a=rsa-sha256; cv=none; b=j7DcH1Hg/oYKEcWnsOHND79WDlR5W33S74j/NzfvAvZVIWkJggqWgicQLop+WtNztJ31Ru ZCYsexp46BC4riEVCe2X3bU8tWroJhJHCbFwcPGo8OVJy/rBomBq1gpjJyN3VWXGWbiNlj v9lwj+4V/D1r07x1Qh5LcNe+zdrJEnPTXH2VGMA9ajVzeghkTwjtZcyQSU/puiy+R3y0cd f2wNyoDZxXjHoOpVlouByP3nthCX8EmyRM1h9bfadmeDKJmfgSmwYrjtrCC6jBWj34jWgi pxFu/qtQ4bJ7iEPaibbeUQiAwfSi7zp2yF5WimPdmmfDF7x1mzeBwTfxDqMXHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722293853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zTCV2hD59G12DJH2jmvycHwCJ7C3HH31e5+mku90Iao=; b=rujbb0dc3LUO52HYkG4VSZuOo6IeLJTHOvH7aIh/qJJQYX4GdMomDJZez0pyecLA6XxW4n ME2u1jG85uyIAxGAViQYp4/K4KgejJSVKYD/hXkjkJ4N1bhXAw/CLCacwLsyQ0lDoEF7P+ HvcTGTnMK5BATn6NBiAe1IjOaxsoHBdavjBt8uiQehIeRC4j1Wy6CDstm0IS4/7YltpUXN xUzP9nqF9TbJH7xrdG7/QodlUMNxnP85Oz70wOHoF+7xosI30pEgD/0EiDymQZmuFFEmxM BgDyk9CYwh9ppEbN1uuYoRsfm1bppj+4rPDcANevRvD+UWWa+EgkdDDgsyJ7Gg== 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 4WXtzd4spmzshS; Mon, 29 Jul 2024 22:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TMvXhB049757; Mon, 29 Jul 2024 22:57:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TMvXXk049754; Mon, 29 Jul 2024 22:57:33 GMT (envelope-from git) Date: Mon, 29 Jul 2024 22:57:33 GMT Message-Id: <202407292257.46TMvXXk049754@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: 0eac99f76ec3 - main - stand: Add "Loader needs updating" to the first menu item" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0eac99f76ec31270f902cc2a0ff5ae4b5b606a65 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0eac99f76ec31270f902cc2a0ff5ae4b5b606a65 commit 0eac99f76ec31270f902cc2a0ff5ae4b5b606a65 Author: Warner Losh AuthorDate: 2024-07-29 22:57:37 +0000 Commit: Warner Losh CommitDate: 2024-07-29 22:57:37 +0000 stand: Add "Loader needs updating" to the first menu item" When the boot loader version is too old, add a warning to the boot menu to maybe catch people's attention. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45890 --- stand/lua/menu.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 4a948acf8241..66d7fe673023 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -245,6 +245,7 @@ menu.welcome = { boot_entry_1, boot_entry_2 = multi_user, single_user end return { + loader_needs_upgrade, boot_entry_1, boot_entry_2, menu_entries.prompt, @@ -411,6 +412,15 @@ menu.welcome = { end, alias = {"l", "L"}, }, + loader_needs_upgrade = { + entry_type = core.MENU_SEPARATOR, + name = function() + return "Loader requires updating" + end + visible = function() + return core.loaderTooOld() + end + }, vendor = { entry_type = core.MENU_ENTRY, visible = function() From nobody Mon Jul 29 23:58:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXwLT33Fwz5SF6q; Mon, 29 Jul 2024 23:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXwLT2DWnz4DHC; Mon, 29 Jul 2024 23:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DZhDudAaYrZ4Or8GZiWNnr81ENkuR35ueWjSPpGFyNQ=; b=UzEr01nrybG5FvLaPE8yH0DH19FpoUo0vYnKztl/LpCu4ddLJWyqPIcvpZ757kj/SlHCR3 jWCY8y8SGbjk+G6vuf90xV4/r7j9PyVRX9iRAj21fRasMmsFiZCGBL73poGb1J1wmpbg0y BPIt70BYAaz0jL2tkuoLj529Sq8f8iHEfsORLO/ShKhATaTruichW935lmgiSKRHaVb6ac fiLp5rafyfYhweps7kFqk91X471AVMorVoe5uc2HqoEAIqtegSl0YTPIsFn74rpZg51t2C RFHZGIAuTDVkI8ce8Pbsu/FKuYO/5nL3WD8sMJTEyRkkuyYCUPYK/giydNjfSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722297537; a=rsa-sha256; cv=none; b=Wt7M35qkI0AmPwiMkv7i22pMNnIn7BQ0J0zHVEciWbeLd6yBFDDGmReLx5FCu8V/tI8Bb+ npq1Ryr4rcykTcdoUnbhUMXSf7FSKmj9YgcssGuqCY/jxnf0/gEq+ZkKNFo3mjCadgigD/ Nxg+dQWAUFqBd4WMSCfgcJECRUyeERkVYUJYBYJyYiTqpMc5zc5JDhztL1eGeeZPUcZQ0i hg5INryQ0QaJED/2eIqngnB/nwUzbxPss18j8bJLQ7BZX2PQgqBwSB5ncrJ0id43/RrPmb G93bLPl4J+8mBatQF12uqAJZp/P9VSZdP9J2jHwhfqEnXZO1A/27NfuVHlAJZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DZhDudAaYrZ4Or8GZiWNnr81ENkuR35ueWjSPpGFyNQ=; b=ASqrZ7XJoyzRyiYuARP6M+R2iuxbTWnAj4NGiWUXBIptXjX/BbuyEICMkhiXRTIT6ulR90 +S9EC2uEF8H/NBQARPUe3Eqf5xoycdzJ9U+2VgZkV1UuP2NJf6gAtikintQLqgeuYKO+vO iqtUwpeM0w/2CgPcqTNsivvcH/ziyheIwI+l7p8akGnQ1ugt7ZC2AWuOTVIxXUyuYL0hB0 /gbMQu4IQgKcBABfjstYEM74Sk1Gn0ryPTg1J40VntBqaUMHWtvnCwZWh5zadlnEu6K3G+ cospLyluGKb1Yt3KB2B0eV4ulc63mxNA2JvsDQVTXF6Ui1epvSWp+KoNSZqTgQ== 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 4WXwLT1rGTzvFH; Mon, 29 Jul 2024 23:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TNwvjc051614; Mon, 29 Jul 2024 23:58:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TNwvqn051611; Mon, 29 Jul 2024 23:58:57 GMT (envelope-from git) Date: Mon, 29 Jul 2024 23:58:57 GMT Message-Id: <202407292358.46TNwvqn051611@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: bc25bc6850e5 - main - rtld(1): Spell value as VALUE, not NAME List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: bc25bc6850e512c4c45effdff6178d20b5eca558 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bc25bc6850e512c4c45effdff6178d20b5eca558 commit bc25bc6850e512c4c45effdff6178d20b5eca558 Author: Konstantin Belousov AuthorDate: 2024-07-25 11:50:01 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-29 23:57:33 +0000 rtld(1): Spell value as VALUE, not NAME Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/rtld.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 4cc5b639c89a..992138b1ffc0 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -352,7 +352,7 @@ The syntax of the direct invocation is .Op Fl b Ar exe .Op Fl d .Op Fl f Ar fd -.Op Fl o Ar OPT=NAME +.Op Fl o Ar OPT=VALUE .Op Fl p .Op Fl u .Op Fl v From nobody Mon Jul 29 23:58:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXwLV5DCFz5SFFZ; Mon, 29 Jul 2024 23:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXwLV38wHz4DNG; Mon, 29 Jul 2024 23:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9bvBe9oSfI0yaIpPvImMbGEUoRS5wuBc+HwHwOorgyU=; b=gIsnhHxp0FmP97M5hOXnUAXVNDFESLcLh/+goE2j72H5NbOrVJ0wOq1bf2xglVvJnB3gqu OmXvfzmXzF/9phhQgtYTt54LvKDP2IWgPNTCjUPusEZHoWpv/kE75WHIvfzVJKcD+gCsBj yZrAzbx4RWX7BYUGYSlztJle/oB7dON5jCbW9i/wESoVJM5fa/pUHWTlllvsP5MxPc+QKC /U/JSwtieM2ewCQ/FwLW6hi98KYnEuDjEa24lVeT/DaxV65RlMBSFOdkKBjtahw332P8JL BKJVI/UcbBOcZ1piFwXnZw8tDIfVK3LKV5x8ZybNoxewxAN7GVhlgcG+mtpLQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722297538; a=rsa-sha256; cv=none; b=hQJvK22M4Vbqci5YsZA1mwHQbap8NhuVdk6+ENOVmaXMPqF2Duz2ky615EWuOkuPsR5nWe QrGQNwlIMsQFLVoA8VS3D2hnbA5C48KyZGopu1HvwKZPFo3xWzJF1tJgLTn8RessuGSNiK YBwUk5zJXKsqBZ95wfzuBc5jDGYj1O3lFYbrXUrzfFa8jUCV3QjvqkMIlTJYi1b6cB6RUZ kliw3Q4UfI/yr+3UWYyIu/bgtCKeE/1ro1+C3rnMf5srvTCDwviFN6CMmHsU1WBbwbmoI7 3VtPdCrKe24xAJFPNu/kLrlf+d4lCeTvqXW4UsLOr8vlI7I8Mew/lgkD85lfsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9bvBe9oSfI0yaIpPvImMbGEUoRS5wuBc+HwHwOorgyU=; b=hpPYX7UrVX//cBwvPOCvRPOt9mQl7DpK8eV6GIAvpPjFarprhZNEeZM1xZYRH9h/AUzV59 +8qdCozkrIg+YH+jUNCAYeNl0iBAohsdJW7JNMNYuPVKxqsFC93R374W+9wGcdPq4Kgzkt 9Vz6SxX1eHB3xVKhU1yWMeMpS6smDyHv7H+PeNxu/KLbpaKYDhuwPCRd40AyECIPmZ9TgJ 6An77toInbIm7zZmKN0k3CZPypvxVrKu5ACM6gHvPWfSHAvcLnyotsIt3Mw91qfayNql9v aVOvwbHwVQ3dUbjNAd1Wr3rLBDQltBhq/vKwaL/YMh/eTvsVh0sQiHogBT+6AA== 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 4WXwLV2V9Mzvdq; Mon, 29 Jul 2024 23:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TNwwg5051668; Mon, 29 Jul 2024 23:58:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TNwwJq051665; Mon, 29 Jul 2024 23:58:58 GMT (envelope-from git) Date: Mon, 29 Jul 2024 23:58:58 GMT Message-Id: <202407292358.46TNwwJq051665@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: 47315d6d3562 - main - rtld: make ld_get_env_var() usable for all rtld source files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 47315d6d3562111883142bb09320d35f05d34a58 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=47315d6d3562111883142bb09320d35f05d34a58 commit 47315d6d3562111883142bb09320d35f05d34a58 Author: Konstantin Belousov AuthorDate: 2024-07-17 03:59:24 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-29 23:57:33 +0000 rtld: make ld_get_env_var() usable for all rtld source files Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/rtld.c | 28 +--------------------------- libexec/rtld-elf/rtld.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index ef34a9d36bc3..f49c429d0061 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -343,32 +343,6 @@ ld_utrace_log(int event, void *handle, void *mapbase, size_t mapsize, utrace(&ut, sizeof(ut)); } -enum { - LD_BIND_NOW = 0, - LD_PRELOAD, - LD_LIBMAP, - LD_LIBRARY_PATH, - LD_LIBRARY_PATH_FDS, - LD_LIBMAP_DISABLE, - LD_BIND_NOT, - LD_DEBUG, - LD_ELF_HINTS_PATH, - LD_LOADFLTR, - LD_LIBRARY_PATH_RPATH, - LD_PRELOAD_FDS, - LD_DYNAMIC_WEAK, - LD_TRACE_LOADED_OBJECTS, - LD_UTRACE, - LD_DUMP_REL_PRE, - LD_DUMP_REL_POST, - LD_TRACE_LOADED_OBJECTS_PROGNAME, - LD_TRACE_LOADED_OBJECTS_FMT1, - LD_TRACE_LOADED_OBJECTS_FMT2, - LD_TRACE_LOADED_OBJECTS_ALL, - LD_SHOW_AUXV, - LD_STATIC_TLS_EXTRA, -}; - struct ld_env_var_desc { const char * const n; const char *val; @@ -403,7 +377,7 @@ static struct ld_env_var_desc ld_env_vars[] = { LD_ENV_DESC(STATIC_TLS_EXTRA, false), }; -static const char * +const char * ld_get_env_var(int idx) { return (ld_env_vars[idx].val); diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 9df5b4ec8f59..fcd42f3841b3 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -352,6 +352,32 @@ typedef struct Struct_SymLook { struct Struct_RtldLockState *lockstate; } SymLook; +enum { + LD_BIND_NOW = 0, + LD_PRELOAD, + LD_LIBMAP, + LD_LIBRARY_PATH, + LD_LIBRARY_PATH_FDS, + LD_LIBMAP_DISABLE, + LD_BIND_NOT, + LD_DEBUG, + LD_ELF_HINTS_PATH, + LD_LOADFLTR, + LD_LIBRARY_PATH_RPATH, + LD_PRELOAD_FDS, + LD_DYNAMIC_WEAK, + LD_TRACE_LOADED_OBJECTS, + LD_UTRACE, + LD_DUMP_REL_PRE, + LD_DUMP_REL_POST, + LD_TRACE_LOADED_OBJECTS_PROGNAME, + LD_TRACE_LOADED_OBJECTS_FMT1, + LD_TRACE_LOADED_OBJECTS_FMT2, + LD_TRACE_LOADED_OBJECTS_ALL, + LD_SHOW_AUXV, + LD_STATIC_TLS_EXTRA, +}; + void _rtld_error(const char *, ...) __printflike(1, 2) __exported; void rtld_die(void) __dead2; const char *rtld_strerror(int); @@ -373,6 +399,7 @@ void dump_Elf_Rela(Obj_Entry *, const Elf_Rela *, u_long); /* * Function declarations. */ +const char *ld_get_env_var(int idx); uintptr_t rtld_round_page(uintptr_t); uintptr_t rtld_trunc_page(uintptr_t); Elf32_Word elf_hash(const char *); From nobody Mon Jul 29 23:58:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXwLW6G6Vz5SDtD; Mon, 29 Jul 2024 23:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXwLW47z0z4DCp; Mon, 29 Jul 2024 23:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qfAQyFna3iZiBLvFRHOdb7qDanz6FqEJtFkdVpipKuA=; b=rAWU6m12DuJxlfEyD3lCYDJyQynRx1M547P6M+zfboTWcLChXX1q1YUEgugA4qs7/F47Kl l6F2JHAfKRqWK+3xGERCf1ZACPl3zEnax2w533RX+G4SAKtmUE6Wjv5JkkDsUBmrMPJqXR wHAKWfK0AhIh6jd9GObKZPLG7hF9qSTaeKUAu3h/W1TBSUBpiVXGsTuauE8IqgR2gbsgrp 3Pc8nZ2JEp014YLIDzkLyiqBs+agkMDaaEv1uegPYi65qro84Tom3VfXYQ1D06uTrwd+Ce Zjj8bfjgPFxPGGje+9vHsJAYgYmw83ok+7qg/rGJ/Z/b2a2OjnabbVXCbRHrfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722297539; a=rsa-sha256; cv=none; b=wBPsIvK3KpyIwMo27/z50JU6jzo1/pyIkpaG4Gxino42IRrlDoUhWmd3cZW6NGOqW8aDMZ 7/uYPHZKQNP3Mex6sZ0kWWKVHIM9BvvB2tbWFg7wwOcOKzcOOsjQWVRr9F5skeiyv4uPMR gZF5YUKeObemBIaxuPcHgau1XCjd3Wu/SRfZwqgY0WWUsSRo57vmowjPMYKQ6uGX07Wckh axXIcajz7PUo0znEmCSqsFgs0DViNyHkYh3nF50uMNc59+9YPwDE1jN8yfq2EojZKtvbxL 08iYXPxrrY+gTf+uzvxpsyHDEAoaXrptAlBVd8+UeTaLWpCAk181iaDe+Z3mjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qfAQyFna3iZiBLvFRHOdb7qDanz6FqEJtFkdVpipKuA=; b=RTsV8NAlnVubaVXOn1z4ghnrHY/T4CB8gskFPlNF1DKDnezpQW09LYPUpOkxcQk/077gTn 2TdikNeK/l51ith3VL+WZKRJ7qgocQp+tX0V/NeJxeRkQ/n6LrgA8+nzZGVFhLdQDDeHOy +5DoQzqiIEKiBbkj2RoBKKNT4mXYJsRLcIj87O9t49bXM928GXhbJuHRgmiNOfNvMAw3tX W0VDrgan6Jm6GdUGOq/VXW0MB5rP7ag9E2YJbfaLjYyObOcRHXWQWnRx7uxxHMzB1si4j1 AFczZIQ82gsOmu03wu6cfTKYQ7AQAxJDQPxzRl7XariZBHBHK4YJ31FIrQyQdg== 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 4WXwLW3YYLzvgK; Mon, 29 Jul 2024 23:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TNwxj4051711; Mon, 29 Jul 2024 23:58:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TNwx6r051708; Mon, 29 Jul 2024 23:58:59 GMT (envelope-from git) Date: Mon, 29 Jul 2024 23:58:59 GMT Message-Id: <202407292358.46TNwx6r051708@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: 860c4d94ac46 - main - rtld: add LD_NO_DL_ITERATE_PHDR_AFTER_FORK env var List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 860c4d94ac46cee35a678cf3c9cdbd437dfed75e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=860c4d94ac46cee35a678cf3c9cdbd437dfed75e commit 860c4d94ac46cee35a678cf3c9cdbd437dfed75e Author: Konstantin Belousov AuthorDate: 2024-07-17 04:05:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-29 23:57:33 +0000 rtld: add LD_NO_DL_ITERATE_PHDR_AFTER_FORK env var which makes threaded fork ignore the phdr rtld lock, in particular allowing the dl_iterate_phdr() to block in callback. The cost is that the image started in this mode cannot use dl_iterate_phdr() after fork. PR: 280318 Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/rtld.1 | 10 +++++++++- libexec/rtld-elf/rtld.c | 1 + libexec/rtld-elf/rtld.h | 1 + libexec/rtld-elf/rtld_lock.c | 7 +++++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 992138b1ffc0..31e046a5cdc4 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -26,7 +26,7 @@ .\" (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 28, 2024 +.Dd July 24, 2025 .Dt RTLD 1 .Os .Sh NAME @@ -329,6 +329,14 @@ The static TLS extra space is used when loading objects compiled for initial-exec TLS code model with .Xr dlopen 3 . The minimum value that can be specified is \'128\'. +.It Ev LD_NO_DL_ITERATE_PHDR_AFTER_FORK +Allow +.Xr dl_iterate_phdr 3 +to block in callback, without causing deadlock with the +.Xr fork 2 . +The drawback is that the image started in this mode cannot use +.Xr dl_iterate_phdr 3 +after fork. .El .Sh DIRECT EXECUTION MODE .Nm diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index f49c429d0061..1f0c59722ac6 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -375,6 +375,7 @@ static struct ld_env_var_desc ld_env_vars[] = { LD_ENV_DESC(TRACE_LOADED_OBJECTS_ALL, false), LD_ENV_DESC(SHOW_AUXV, false), LD_ENV_DESC(STATIC_TLS_EXTRA, false), + LD_ENV_DESC(NO_DL_ITERATE_PHDR_AFTER_FORK, false), }; const char * diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index fcd42f3841b3..656e980c6261 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -376,6 +376,7 @@ enum { LD_TRACE_LOADED_OBJECTS_ALL, LD_SHOW_AUXV, LD_STATIC_TLS_EXTRA, + LD_NO_DL_ITERATE_PHDR_AFTER_FORK, }; void _rtld_error(const char *, ...) __printflike(1, 2) __exported; diff --git a/libexec/rtld-elf/rtld_lock.c b/libexec/rtld-elf/rtld_lock.c index 0c790450dcec..323bb7494c32 100644 --- a/libexec/rtld-elf/rtld_lock.c +++ b/libexec/rtld-elf/rtld_lock.c @@ -463,6 +463,7 @@ _rtld_atfork_pre(int *locks) if (locks == NULL) return; + bzero(ls, sizeof(ls)); /* * Warning: this did not worked well with the rtld compat @@ -472,7 +473,8 @@ _rtld_atfork_pre(int *locks) * _rtld_atfork_pre() must provide the working implementation * of the locks anyway, and libthr locks are fine. */ - wlock_acquire(rtld_phdr_lock, &ls[0]); + if (ld_get_env_var(LD_NO_DL_ITERATE_PHDR_AFTER_FORK) == NULL) + wlock_acquire(rtld_phdr_lock, &ls[0]); wlock_acquire(rtld_bind_lock, &ls[1]); /* XXXKIB: I am really sorry for this. */ @@ -492,5 +494,6 @@ _rtld_atfork_post(int *locks) ls[0].lockstate = locks[2]; ls[1].lockstate = locks[0]; lock_release(rtld_bind_lock, &ls[1]); - lock_release(rtld_phdr_lock, &ls[0]); + if (ld_get_env_var(LD_NO_DL_ITERATE_PHDR_AFTER_FORK) == NULL) + lock_release(rtld_phdr_lock, &ls[0]); } From nobody Mon Jul 29 23:59:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXwLY0gRZz5SFLc; Mon, 29 Jul 2024 23:59:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXwLX4dMSz4DHp; Mon, 29 Jul 2024 23:59:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHBRm36qwmdeWd6Rs9D8zd4Z57qUqUVUQbEpczZ4ECw=; b=X/k6VNx4Cp85qws8MGWvQNPpShctIAH9wVjkYL4mrtBMROqhOJLxu6TtuQOz/pSL4/E67v l7m3mbct+jnCGZaTdydMGUTMOqgbXeJ0pLzKpUs/F622sKaEd7fSy7KtP58ywUEJRnCFm5 c94a0o2BfkQKx/w4nMfIR5SDZlqZM1fzkw/9aUKSoWXZo6tyjfLl6MooCplDkuODVjQiG1 Ut9g3Gbdb6exAos8zA8N9sLF5ykNRTC9dI1DKbei6nPL6Xzo9SMNbKFilLDOtBOB/j+3D3 Ji2vD6kZvKxiaEGBw9BndWxrlFBS871/cLmOSU+91Mm4a5f4K7QeBNw2jKRdHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722297540; a=rsa-sha256; cv=none; b=k92DMBm6AC30/uYDvM3/E+RriEZ1L//Xb+3JGd7oaZqZ49oYMUknk6OWrP9uMD6RgeBKgP 9nVKBTZH1xAB3nrsZ1lQ44r06z57IhCukZsO02WEj2lgexBQCvbvBO+kdPXhrH7ErvWxuO fkx7qitR36+7G9URvVeT362xjTFsOrUEj/FVVpsXK+3P+Ahp9JnkpUixzn1FeZPFTtCmzg cnTfuNYuCa2bEkCBIBevZoxesh8vCG76Iiwc8FVgJVlEfBc8folYnKsoK6yk73YPgDB6M0 LxF6JAffuGmhOZCJPAHIZdru1bHo0hDNOwRQm2PpsTu069dxY1TkFpX07D6+zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHBRm36qwmdeWd6Rs9D8zd4Z57qUqUVUQbEpczZ4ECw=; b=r5RcOYdeSeJ16FW4vAVX9A3Lbnrw/Yg/d1hTKL7feuOzHOtgoY2U1xS1oO1ZmCBLX2DtcN /LDmvKUjQKNG+QLpMusTIlO7VIwsyRnCaUH17VNUqQZWcoeysdJx6A+13Gi7DPwnzhv/5K S60D2vXV+ZH+1qhk9ykju7rB+2eLl0CZ2mjDn/LOR1wAvHe8Gd/vjbQ5NlJywzDBT3syaP P1qPZCqg19MTJBE10xOaIpziRhYLR9goox3WDD/PyrKHA09nIKndQAzXLZfmKNv2sTwkHK +vsO/dh+45cR/wfNYI1B/Urqo5lYek8Jcs3n+hwvbGdK5iFJyUdF5FJVi+ZzFA== 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 4WXwLX4FsPzvC9; Mon, 29 Jul 2024 23:59:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TNx0jg051763; Mon, 29 Jul 2024 23:59:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TNx0Ol051760; Mon, 29 Jul 2024 23:59:00 GMT (envelope-from git) Date: Mon, 29 Jul 2024 23:59:00 GMT Message-Id: <202407292359.46TNx0Ol051760@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: 31f688a26d82 - main - rtld: avoid division in __thr_map_stacks_exec() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 31f688a26d82ce00d1ec7ca9ed17b9914bf5176f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=31f688a26d82ce00d1ec7ca9ed17b9914bf5176f commit 31f688a26d82ce00d1ec7ca9ed17b9914bf5176f Author: Konstantin Belousov AuthorDate: 2024-07-24 10:17:55 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-29 23:57:33 +0000 rtld: avoid division in __thr_map_stacks_exec() The function is called by rtld with the rtld bind lock write-locked, when fixing the stack permission during dso load. Not every ARMv7 CPU supports the div, which causes the recursive entry into rtld to resolve the __aeabi_uidiv symbol, causing self-lock. Workaround the problem by using roundup2() instead of open-coding less efficient formula. Diagnosed by: mmel Based on submission by: John F Carr Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libthr/thread/thr_stack.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libthr/thread/thr_stack.c b/lib/libthr/thread/thr_stack.c index f576a2c04104..d249bb5606fd 100644 --- a/lib/libthr/thread/thr_stack.c +++ b/lib/libthr/thread/thr_stack.c @@ -126,10 +126,7 @@ static char *last_stack = NULL; static inline size_t round_up(size_t size) { - if (size % _thr_page_size != 0) - size = ((size / _thr_page_size) + 1) * - _thr_page_size; - return size; + return (roundup2(size, _thr_page_size)); } void From nobody Mon Jul 29 23:59:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXwLZ1fVjz5SFNN; Mon, 29 Jul 2024 23:59: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXwLY69Fwz4DYn; Mon, 29 Jul 2024 23:59:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zLW8PhStRqGKC3U9x6jPPtCcV8pRThxhCJ0Fww73+XE=; b=F4oMCV7QWPPOOFJoXhg4ebX2vyPHezV3jMPorOnDkbk/tWQoCL+xLWLJHuz6/l2oxd2CwJ VX/tRnl2XjNs/EhQEhg117e1qa0h5kZXWVzwRCO3wzG9FwKFvDMwJovQJMIGQoeKfNU4st bceqbwFTv8Cye3LaTtlCi2HXX16dODpdptFLfvcPU+lKSQFEM58vZiSrSJzUjPcBIlWjzt HqM3MyJ40mjA4rz/cT//4P9R9U5sSRRZluOmPgScYHg3R+X/UbkP1wtI74MxwZ+C8T2UdY XqmLZIVyMCx14MDXx/Eb5qZo7JwBivPwJXcImr+4wtVnwWRyLhl1jZewxU3lRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722297541; a=rsa-sha256; cv=none; b=J8u20wy1tTqsqMT9G8vsqPrXgjMDS7ZuPPAwAMDU4IfGyPlBmZLDc5b1tJUlU0x5QYqpwr UNW3uviQwNQouq24w8oF+pGKeGcAQ4IsVzbd9ZVunl4uzFNMRpc+O1TkX/ohlT65uFdfx8 Rb+HfOl0d4T0I91T02RGYyBwrjUbtTiZdieKnxmPCTTWYVaEfHSIcBPhzhZ15A3hlddVe0 L/Ls5teomPFZHbKLDknc9TP9bTcBePUL/RsbosTlvJD+TckQ+xGBdlnLdPa891xNIUCrx9 MAKUgznlqKU9XQYj5Y5KoNDNWXZKUZM3Y8uSyNc1dWaQWb4N2Vo6/1WuSauUcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zLW8PhStRqGKC3U9x6jPPtCcV8pRThxhCJ0Fww73+XE=; b=Petw0TFFIN5brpRQEz8U64YX5tHS3dzsGFFulM/F1m3LI4/Hka5ZQ2Un3SNeWZt+Oj5V1a ID7YXHZ+saws/XPl4uVQ9I8GlxSTzLPErs6UGKNKiOHdMEexpmEWCjZbakgayKEQYau1kw BWpBJ0ACgwozGnpNsSABob/Eq4Qa1hCpgtbnxg1bpa6tCg4Fvguvmfkw4AXInhXYAT9zwB 6vp1Fhj39/BP67dX3pLbk0LBx1TOPYGKWEu/NoJIUM/OSgtaUvXDFSeljK0iCh+mTKELlC JTX0E34F61BI5AAxybhw29AbfEtBPXhNyUCFSSxmPXjXmfiCMazPyXhyPCQ7rg== 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 4WXwLY5VHLztmm; Mon, 29 Jul 2024 23:59:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TNx183051805; Mon, 29 Jul 2024 23:59:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TNx1X0051802; Mon, 29 Jul 2024 23:59:01 GMT (envelope-from git) Date: Mon, 29 Jul 2024 23:59:01 GMT Message-Id: <202407292359.46TNx1X0051802@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: 3f3ec4b99f79 - main - exit(3): make it thread-safe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 3f3ec4b99f79d32a0bf15495559ca9883bd751f2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3f3ec4b99f79d32a0bf15495559ca9883bd751f2 commit 3f3ec4b99f79d32a0bf15495559ca9883bd751f2 Author: Konstantin Belousov AuthorDate: 2024-07-24 20:41:32 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-29 23:57:34 +0000 exit(3): make it thread-safe It was explained by Rich Felker on libc-coord. See https://austingroupbugs.net/view.php?id=1845. Reviewed by: imp, markj Tested by: antoine (exp-run) Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D46108 --- lib/libc/stdlib/exit.3 | 19 ++++++++++++++++++- lib/libc/stdlib/exit.c | 21 +++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/exit.3 b/lib/libc/stdlib/exit.3 index 1ff590bb3ae8..b117e77c9e3b 100644 --- a/lib/libc/stdlib/exit.3 +++ b/lib/libc/stdlib/exit.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 5, 2021 +.Dd July 24, 2024 .Dt EXIT 3 .Os .Sh NAME @@ -102,6 +102,23 @@ values described in .Xr sysexits 3 may be used to provide more information to the parent process. .Pp +Calls to the +.Fn exit +function are serialized. +All functions registered by +.Xr atexit 3 +are executed in the first thread that called +.Nm exit . +If any other thread of the process calls +.Nm exit +before all registered functions have completed or before the process +terminates, the thread is blocked until the process terminates. +The exit status of the process is the +.Fa status +argument of the first +.Nm exit +call which thread proceeds the atexit handlers. +.Pp Note that .Fn exit does nothing to prevent bottomless recursion should a function registered diff --git a/lib/libc/stdlib/exit.c b/lib/libc/stdlib/exit.c index bca978428ce3..16631fad5b90 100644 --- a/lib/libc/stdlib/exit.c +++ b/lib/libc/stdlib/exit.c @@ -31,6 +31,7 @@ #include "namespace.h" #include +#include #include #include "un-namespace.h" @@ -48,6 +49,20 @@ void (*__cleanup)(void); */ int __isthreaded = 0; +static pthread_mutex_t exit_mutex; +static pthread_once_t exit_mutex_once = PTHREAD_ONCE_INIT; + +static void +exit_mutex_init_once(void) +{ + pthread_mutexattr_t ma; + + _pthread_mutexattr_init(&ma); + _pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE); + _pthread_mutex_init(&exit_mutex, &ma); + _pthread_mutexattr_destroy(&ma); +} + /* * Exit, flushing stdio buffers if necessary. */ @@ -59,6 +74,12 @@ exit(int status) _thread_autoinit_dummy_decl = 1; + /* Make exit(3) thread-safe */ + if (__isthreaded) { + _once(&exit_mutex_once, exit_mutex_init_once); + _pthread_mutex_lock(&exit_mutex); + } + /* * We're dealing with cleaning up thread_local destructors in the case of * the process termination through main() exit. From nobody Mon Jul 29 23:59:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXwLb1z2qz5SFLk; Mon, 29 Jul 2024 23:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXwLZ6xhSz4DZ2; Mon, 29 Jul 2024 23:59:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5HRcF/86N/goS7+6zUlMH4IUDXf1nzyRgUNTOBBAru4=; b=StcNaojh/7GvsO43PQFzLCskpSLWfmxqJOK39tagZmPCOZcWjVupTeOj1xsDFXdIEgE4fc ZXrvKC4kqBb9Q/NBwwfIv3uQoYT7BTV6vCrPci85q7wdYP8nKzf444wpEW4xfDdY5zuIxJ cRzMSczfK25PG7jRnDUWXdh8D0E82J2R2vvge9VCrrEygpoAlKnyuxoCv3oFGTVrJGdBjp ynTCfLefvDL4sy/RJUJslKHO01OyR6JssgGQUgUjX3wAuT2+HF2H4CnONcMNJRgHnxcIV4 m8fMxO+VG5zXsikln4gBQBTh3TnmX5hvdbotkW5pelUn3jotCDjp55GO4M7fFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722297543; a=rsa-sha256; cv=none; b=dEOBrQzFXbs4WWkCn3U7evt1QUslSnRbeSgAKhjSLrzxNUleuooJm8y4nNL+edJ3Db7Pek NmZhVgz6Jc9UZbAT2VFiLIpH1DqV6lwZTXkbBYW5jqYlqo/PN3xhpiA+5PCEIVpkpQuucW ncgyzQdPk3hWaf9fXUl8Jy5Q4avkG55txTMqBiEzIFS7mbtMVoNT608qMve97LHYm8c0r6 cKz06f3a5vIulSpFnz5//jNwnsjePTpgN0nqJ3al4aXuFkCLRo4N7zib+94oETWuwMwOSd b4TLkxA8rOHmkzfvQBH2Q/2dhC9H5RVKRowVB234EI/r3nq89mPjUD2i7pBnzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722297543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5HRcF/86N/goS7+6zUlMH4IUDXf1nzyRgUNTOBBAru4=; b=MBk0CGw76UtyZK+JO0Uh6277IC34V/TfaibqlKE9HLBrRZiZRoyjd0cAByIvrBq9rG3YPr 3y/g1HnZ4VBq/PcqH92InYOjkpXeP8BhMPW0f+ZIY3gSZe5VnVvVcM0B4Glx3xpaLNG+hj eMn2WHXdLM1s6kj4Njm+PuA5rtvzGTdl56cSWYWdhuqoJHfbgwgoL94eDokfOl3a3klB7d jiUdZUwkUJ0tJa+b7ohKnnfxmwEYv8XW7pkVkFRNwrYgdg81XY/vT01KW3FFQscQk2BvZ7 MYpuGHSmNrDoqV+S5GRQ/JAuum7i1upZSPVkJY45K+kvwMdMDiuws+BNx2QK+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 4WXwLZ6YTyzvgL; Mon, 29 Jul 2024 23:59:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TNx2P6051868; Mon, 29 Jul 2024 23:59:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TNx217051865; Mon, 29 Jul 2024 23:59:02 GMT (envelope-from git) Date: Mon, 29 Jul 2024 23:59:02 GMT Message-Id: <202407292359.46TNx217051865@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: c4269e63ecf3 - main - exit(3): clarify how to obtain full exit status of the exited process List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: c4269e63ecf301306a6176b9fe9002c4c2265695 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c4269e63ecf301306a6176b9fe9002c4c2265695 commit c4269e63ecf301306a6176b9fe9002c4c2265695 Author: Konstantin Belousov AuthorDate: 2024-07-25 17:28:45 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-29 23:57:34 +0000 exit(3): clarify how to obtain full exit status of the exited process Sponsored by: The FreeBSD Foundation MFC after: 3 days --- lib/libc/stdlib/exit.3 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/libc/stdlib/exit.3 b/lib/libc/stdlib/exit.3 index b117e77c9e3b..bfb14c5c9f83 100644 --- a/lib/libc/stdlib/exit.3 +++ b/lib/libc/stdlib/exit.3 @@ -102,6 +102,20 @@ values described in .Xr sysexits 3 may be used to provide more information to the parent process. .Pp +The complete +.Fa status +value is avaliable as +.Va si_status +member of the +.Vt siginfo_t +structure, to the +.Xr wait6 2 +and +.Xr sigwaitinfo 2 +callers, and +.Va SIGCHLD +signal handlers. +.Pp Calls to the .Fn exit function are serialized. From nobody Tue Jul 30 02:34:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXzp40mdwz5SSPJ; Tue, 30 Jul 2024 02:34:36 +0000 (UTC) (envelope-from gallatin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXzp40DHTz4X3W; Tue, 30 Jul 2024 02:34:36 +0000 (UTC) (envelope-from gallatin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722306876; 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=K2Y6yFIDpcKWVefRUcgALNwVGn+YkWtQQurpdYTadb8=; b=oc2syRq+EpMdMl7qq7XpnT0IVGfkdaZkYwSp93BAu/Nl72tX5OiTlhPrJ5dIKGnWeRoBBk t2yEb+j7CIp4vdI7Dc8E5P8wxQKfE+Em2XGxfJfBeIguvi6z7rS56T2GASEHv7YIhNa7pS 8Y/a0rtu/BMbqJ/cyN3I+0Fcwi+r3lGbGhet7goNoCD9qJ9NY9CpvMEV+OLo4wnCsqHWgI SCraw9PTW/js9qEFuGQ5UIcxhczdl5vaIxBvmOTI43UVMk47OyhLXsrLtKAZaHz+t/txP2 9KV8x3dlKYSc7R8kwhC3ZLGOdmQdudMe/qowALX+1nlUrHroI9tmU7js/Y8f6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722306876; a=rsa-sha256; cv=none; b=aq0fH3/iysa89kcBkOma5AmQGsb8iu3owcvMw9g7cgGTS9lrdRtALAuOVimaIKOR7l0yuu 1zbAaJpakGTnM5+fg+rBmduv40L+N4rQ3v/j3imc8PmkKSVtwczIRdBD9O/HA0l8w/mdIB n2YyqF5dOE/3AApncQjHxeWS7bMWc6SAbNpAZ6y03f9wRjz9ED9I/KHn+Kss7P/Xt9IJAX jF15TEJmv8tJEADilWSXH1MP+ZVOcUWc06WYM6A6PDC1r74wclBtRhNZk7kVYmJGHkPf8l 1PTLXk4BxiEC+s3TXYJ1DmI2o3mMqKH8VHM+H78r9I0V/zOjV/gu1AxrCmnrcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722306876; 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=K2Y6yFIDpcKWVefRUcgALNwVGn+YkWtQQurpdYTadb8=; b=Id0tzYox6y8PhstIkCrXr9WwLz987hn2r+PhbdERv0b/mEvEVAx2OKohPkohNZj+JuB7/z 2aOQb38mu+Za2TiHIucnfBZdfE2jXgGdx3dmpU9ljZy6zeEeRImoCpwgPyWhk+YvYwDXUD Zwy1syoqVwHNZRKkuXoujcjAeMcTdlqMud4BBFzUer9jO6+sOT6dScY+lIP8fJUlahgTjA 5yaxKxk3CZbahrda2vOYsFbBfsrqtQTFN0h1EZ1q8/5syYS6ElW+bvliD4Roa30VZahCnK IxzLzHSYfSyMLeOudv8cRF9SFTWV6uNfejdhoEK4TJU7tebxlsYAqZq51cdoyw== Received: from fauth1-smtp.messagingengine.com (fauth1-smtp.messagingengine.com [103.168.172.200]) (using TLSv1.3 with cipher TLS_AES_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: gallatin) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WXzp35gXkz1fM0; Tue, 30 Jul 2024 02:34:35 +0000 (UTC) (envelope-from gallatin@freebsd.org) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfauth.nyi.internal (Postfix) with ESMTP id 12B9C1200069; Mon, 29 Jul 2024 22:34:34 -0400 (EDT) Received: from wimap26 ([10.202.2.86]) by compute1.internal (MEProxy); Mon, 29 Jul 2024 22:34:34 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeefgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvfevufgtsegrtd erreerredtnecuhfhrohhmpedfffhrvgifucfirghllhgrthhinhdfuceoghgrlhhlrght ihhnsehfrhgvvggsshgurdhorhhgqeenucggtffrrghtthgvrhhnpeeggfeugeevuedtue dvleefffduteegtdffudeihefhgfegfeekffeiueevkeeuudenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrghllhgrthhinhdomhgvshhmth hprghuthhhphgvrhhsohhnrghlihhthidqudeffeehledvvdduiedqvdelhedtgedukeeg qdhgrghllhgrthhinheppehfrhgvvggsshgurdhorhhgsehfrghsthhmrghilhdrtghomh dpnhgspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: i41414658:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id DB14119C0069; Mon, 29 Jul 2024 22:34:33 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-582-g5a02f8850-fm-20240719.002-g5a02f885 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Message-Id: In-Reply-To: References: <202405060315.4463FxP6098471@gitrepo.freebsd.org> <52e1bb60-32f3-49de-9714-78762edbfd4c@app.fastmail.com> Date: Mon, 29 Jul 2024 22:34:13 -0400 From: "Drew Gallatin" To: "Konstantin Belousov" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c097967b9af9 - main - mlx5en: add diagnostic in one more case of failed eeprom read preparation Content-Type: multipart/alternative; boundary=d78273312bf64c0f8daf716107e09c82 --d78273312bf64c0f8daf716107e09c82 Content-Type: text/plain Thank you! On Fri, Jul 26, 2024, at 4:02 PM, Konstantin Belousov wrote: > On Fri, Jul 26, 2024 at 01:14:23PM -0400, Drew Gallatin wrote: > > Hi, > > > > This recently hit our tree and was deployed, and our operations team is quite upset because this results in a massive (orders of magnitude) increase in our kernel log messages due to our monitoring scripts probing each port. > > > > Can we please move this under bootverbose, or have some other way to suppress these prints? I can back this out in our tree, but I don't want to create yet another local patch. > > > I will put it under bootverbose. > --d78273312bf64c0f8daf716107e09c82 Content-Type: text/html Content-Transfer-Encoding: quoted-printable

= Thank you!
On Fri, Jul 26, 2024, at 4:02 PM, Konstantin Be= lousov wrote:
On Fri, Jul 26, 2024 at 01:14:23PM -0400, Drew Gallatin wrote:
> Hi,

> This recent= ly hit our tree and was deployed, and our operations team is quite upset= because this results in a massive (orders of magnitude)  increase = in our kernel log messages due to our monitoring scripts probing each po= rt.

> Can we please move this = under bootverbose, or have some other way to suppress these prints? = ; I can back this out in our tree, but I don't want to create yet anothe= r local patch.

I will put it unde= r bootverbose.


--d78273312bf64c0f8daf716107e09c82-- From nobody Tue Jul 30 03:34:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WY17H0LxHz5SXQN; Tue, 30 Jul 2024 03:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WY17G6yxWz4cCW; Tue, 30 Jul 2024 03:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722310475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQUB7yFnPcmGMkVyDweXheB2LGBnNepNjOOWVNGSu9w=; b=ms07olS4vd4xLn62y6jbSXyK5ptNhI3c/nRT0lc9JidlT6QBaJ5L+gJJCwVwKiCpPmqj2D JD1caVpwNNMF5BcTC/R73O1LVRgRLlcbQb2cRqMTQ6wtAaPX1w209H+ssz/qkhcl5ZrRkQ rjOGspJlyUrpmSushUL6W3D6KbeCc2G2UVtfMzlkzl06MZvKABMP/5+6MulupoIZHFADHG KYtE8UUEgoT0Vd23ZJBk5qQvgthaLaZNNwy1k7fePIVPosC6rFPLfd0rVnwUvrnSkl77pF Q7RHYG+SNb92MsEsY7hhAd52zAhbSWBbHbwTfR8nP7HyNXIrlzPscKlK8aIHEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722310475; a=rsa-sha256; cv=none; b=iLd2/5lG9nWBSrlh9eRG9d/8Do0ObzCn8JPbNrBzqeIjhzSmiCR62J/TwBaeNzh/ocy9q/ 8PAL9Vdhul/VQfn5D575zGepsu2aA+nQqo0umJSziPyGSEv9DDfKMAGuRMIrbJqYIzsXt3 WahNexIbLwill03SL7X8comR3LVqCfE6dlZWjb/LLFR1d88lrzRy/xpcHo8Qho2vpR4LCv RRrNahdNSVnBYGiXnmJgnEFGQj6y9ZMZVfJBsRODsCHN+MVYd26yommLVZ0OOLYj+0vm9l HFyhNkFS8lcwcKy8cp6/2GP7wHpjWo7EWLyGgZwnuaXR/hTG9qdP0FCeE/1xeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722310475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQUB7yFnPcmGMkVyDweXheB2LGBnNepNjOOWVNGSu9w=; b=iHYSqzWmeaNIkwoUxy5lfLOPH75bwb63BSSVowx7dyaIRW7HandJGTSng3HrCEKIe5f/GV 3OyDvdgOV3vz4blKALHcEcaSBV3395sqUYsLY91E7Ui1pBiaoXORj5PiRAIySANBJrzWrr oe3L+zM0bcgq1BfBITAzxB6hF83K4X/kafjG+0Z2l6oXEX9VMk9Z4SLENrWcS1IQhsgicl 7VgRIDyg7RbAbiaSmifkC453Tg9CcReIPJEOFpXI20xIn5XgpeX2Otc4UJPpe9ZQUMdpeh fAzwQFzxjl9VqDCDVYxdw97VCemb9PqVE8AYMUSZOVtLL+JTaEwfohbyh9vIjw== 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 4WY17G6WRZz1238; Tue, 30 Jul 2024 03:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46U3YYVU026668; Tue, 30 Jul 2024 03:34:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46U3YYlf026665; Tue, 30 Jul 2024 03:34:34 GMT (envelope-from git) Date: Tue, 30 Jul 2024 03:34:34 GMT Message-Id: <202407300334.46U3YYlf026665@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: 7cb65be96d47 - main - stand: Use correct loader needs to be updated code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 7cb65be96d47cbe0b740266bc633d272fc4c5e6b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7cb65be96d47cbe0b740266bc633d272fc4c5e6b commit 7cb65be96d47cbe0b740266bc633d272fc4c5e6b Author: Warner Losh AuthorDate: 2024-07-30 02:15:19 +0000 Commit: Warner Losh CommitDate: 2024-07-30 02:26:11 +0000 stand: Use correct loader needs to be updated code Use the correct loader code that adds an inactive highlighted menu item indicating that an update is needed. My laptop is the only machine that I have a boot menu. I'd debugged the menu part there, but had all the other changes, including my original menu code, on my server and hadn't copied it back before pushing. Fixes: 0eac99f76ec3 Sponsored by: Netflix --- stand/lua/menu.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 66d7fe673023..0587e5ae6586 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -245,7 +245,6 @@ menu.welcome = { boot_entry_1, boot_entry_2 = multi_user, single_user end return { - loader_needs_upgrade, boot_entry_1, boot_entry_2, menu_entries.prompt, @@ -264,6 +263,10 @@ menu.welcome = { menu_entries.boot_envs, menu_entries.chainload, menu_entries.vendor, + { + entry_type = core.MENU_SEPARATOR, + }, + menu_entries.loader_needs_upgrade, } end, all_entries = { @@ -415,8 +418,8 @@ menu.welcome = { loader_needs_upgrade = { entry_type = core.MENU_SEPARATOR, name = function() - return "Loader requires updating" - end + return color.highlight("Loader needs to be updated") + end, visible = function() return core.loaderTooOld() end From nobody Tue Jul 30 04:57:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WY2ys2w8yz5RBK5; Tue, 30 Jul 2024 04:57:25 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WY2yr4tj4z4m3n; Tue, 30 Jul 2024 04:57:24 +0000 (UTC) (envelope-from gnn@neville-neil.com) Authentication-Results: mx1.freebsd.org; none Received: by mail.gandi.net (Postfix) with ESMTPSA id 0DB6840004; Tue, 30 Jul 2024 04:57:18 +0000 (UTC) From: George Neville-Neil To: Warner Losh Cc: John Baldwin , Mark Johnston , Yuri Pankov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 Date: Tue, 30 Jul 2024 11:57:13 +0700 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: gnn@neville-neil.com 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:29169, ipnet:217.70.176.0/20, country:FR] X-Rspamd-Queue-Id: 4WY2yr4tj4z4m3n On 30 Jul 2024, at 2:18, Warner Losh wrote: > Hey John, > > On Mon, Jul 29, 2024 at 11:55=E2=80=AFAM John Baldwin = wrote: > >> On 7/29/24 13:40, Warner Losh wrote: >>> On Mon, Jul 29, 2024 at 10:39=E2=80=AFAM Mark Johnston >> wrote: >>> >>>> On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote: >>>>> Mark Johnston wrote: >>>>>> The branch main has been updated by markj: >>>>>> >>>>>> URL: >>>> >> https://cgit.FreeBSD.org/src/commit/?id=3D801c452795ac441523655eb32770= 51b7b034becf >>>>>> >>>>>> commit 801c452795ac441523655eb3277051b7b034becf >>>>>> Author: Mark Johnston >>>>>> AuthorDate: 2024-07-29 14:12:40 +0000 >>>>>> Commit: Mark Johnston >>>>>> CommitDate: 2024-07-29 14:17:04 +0000 >>>>>> >>>>>> man9: Really complete the removal of MD5.9 >>>>>> >>>>>> Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate >>>> kernel side manual page.") >>>>>> Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual= >> page >>>> from section 9.") >>>>>> --- >>>>>> ObsoleteFiles.inc | 2 ++ >>>>>> share/man/man9/Makefile | 2 -- >>>>>> 2 files changed, 2 insertions(+), 2 deletions(-) >>>>>> >>>>>> diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc >>>>>> index b21778466800..01b4824e8692 100644 >>>>>> --- a/ObsoleteFiles.inc >>>>>> +++ b/ObsoleteFiles.inc >>>>>> @@ -56,6 +56,8 @@ OLD_FILES+=3Dusr/share/man/man9/ifaddr_byindex.9= =2Egz >>>>>> >>>>>> # 20240729: remove MD5(9) >>>>>> OLD_FILES+=3Dusr/share/man/man9/MD5.9.gz >>>>>> +OLD_FILES+=3Dusr/share/man/man9/MD5Init.9 >>>>>> +OLD_FILES+=3Dusr/share/man/man9/MD5Transform.9 >>>>> >>>>> This really needs to be smarter, but you have to specify .gz suffix= for >>>>> man entries as we have compression enabled by default. >>>> >>>> Sigh, who knew it was so difficult to remove a man page. >>>> >>> >>> There is a pull request being worked on that will be smarter about wh= at's >>> removed since we have compress (UFS) and uncompress (ZFS) setups >>> now. >> >> Does it just add an OLD_MAN helper variable to use instead of OLD_FILE= S >> and then try the various extension combinations for each OLD_MAN? >> > > https://github.com/freebsd/freebsd-src/pull/1295 > > was submitted a bit ago. the repetition is why I've not committed it. I= s an > approach > like that good, or should we move all the old man pages to OLD_MAN? > As the person who screwed this up I think OLD_MAN would be super helpful.= Also as an OLD MAN I find this hilarious. Best, George From nobody Tue Jul 30 06:25:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WY4wd1S6hz5RL7g for ; Tue, 30 Jul 2024 06:25:37 +0000 (UTC) (envelope-from garyj@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WY4wb5td7z3xcR for ; Tue, 30 Jul 2024 06:25:35 +0000 (UTC) (envelope-from garyj@gmx.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.de header.s=s31663417 header.b=kbe3sFag; dmarc=pass (policy=quarantine) header.from=gmx.de; spf=pass (mx1.freebsd.org: domain of garyj@gmx.de designates 212.227.17.20 as permitted sender) smtp.mailfrom=garyj@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1722320733; x=1722925533; i=garyj@gmx.de; bh=IQuNMHHOgfclFe8ZNxz55f3V5W27gYSsEt4WCs6IihU=; h=X-UI-Sender-Class:Date:From:To:Subject:Message-ID:In-Reply-To: References:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=kbe3sFagl/rE9aFe1aEsXFJB77YFRBs+jzKW3z1NQ3oWrN4fm1AE5rLa0UopsCem fV7B59aAYmvJKnW9hBETVWOFAzdnq5mOo+1zXgC0O//lofrDCOfFCIlGAs0IEnwsb +5P3xRdkGNvL/3qByXrBpNyzuxZ2u8khGjmLEWxLzvRxnqMyAje3JyRsOdTZo8FvT hdPUkWbqUg9NHmi1/hJyD92eEG02i862l15WNHu0fhlfYD4FiFziglCfJD3MbeuaN hW1iGgvWep2U6IhvfzT2Ri/cMpbLosMQo1oY6akioj4VuEo7WY2cDofGpf3iNeddJ CPYWUoUDMFptcUzdpA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from ernst.home ([91.2.58.134]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N95eJ-1sEaDa15OR-00wQHi for ; Tue, 30 Jul 2024 08:25:33 +0200 Date: Tue, 30 Jul 2024 06:25:14 +0000 From: Gary Jennejohn To: dev-commits-src-all@freebsd.org Subject: Re: git: 860c4d94ac46 - main - rtld: add LD_NO_DL_ITERATE_PHDR_AFTER_FORK env var Message-ID: <20240730082514.61f8fdae@ernst.home> In-Reply-To: <202407292358.46TNwx6r051708@gitrepo.freebsd.org> References: <202407292358.46TNwx6r051708@gitrepo.freebsd.org> Reply-To: garyj@gmx.de X-Mailer: Claws Mail 3.20.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:gbe7I5HIUn17bkFGZYuVXm4IEAYPHm/bmgW+9Xx1cAEibAVeb21 uUkJFpeKMA7n5RvVcddmbL4lQxnxbjvzDg8PYiCLjAu2nQgMikycVxGtA7OOPnuxDg83bcg J3I9pa2egQDVzB/zlTLFWW0TVwAd5kMfzIRPeecRiu1uhmIMW3NuH4GR9pPqbbWFTlEBzxV C1CNo/8km8FguN1w96eVQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:zzeB670Bopo=;+l+2IMfe4xKC5ITlevnL6bhd9b9 QfgRDeMbwUFndbOhCXQQTkwg1T1J5hVhiMQIGc67o/oNfQmGwK/6SULyvvf4/02VKBSm1gaHk GGjcRwANid8DTQsaRUXyhFCeeSuBTW+jKTUjZY4cEqQBR8VdAZJBOFJHC8wUJTxNLQc1+VTeE 5DxhC1+UdnbFTKYQwaCUCseGPk21pVYhLr81mm6G+auEN0/jIfoS563Hw2b4QVvJX1JUBUl0s +rmi/ErpAKpnRmiXC9Tjbn+guLXgr7HGo/OWZGxhafNyr17249aLmzWTtIHUnYRPO2s/johaE 7dClmyPrp/sojdlC+pxW3IzOJ+gFLT3N47DlNgspG/GotJKQSZNIWSocT35wnnyQ6vJ7J3Ya2 4JSF2/OkKaoIFilifZJJn86nIeP1BvC/iMNvJAvIimce9VwpOQL4Voe3l1kbhkvUXcp6Jm1BY oEK2vAekOkOpRZTLoZ0kh889dNye5WWxHQLpgL4LLulby0XOpioM9t9KFS+xUlsbM1lLZp2In 2DZBzz1Kc/al8mKgpiwYZxZslXUUWlC8y0Pya7b0dI2RJT54pL6+M0B09627aeXrQQEZ0Dm2K winjIjS5D7uKA4JxRY+SKS38rsD//gf+CGGtwwDjpYkn+ksafXMuIgOhA7cu2sYNPJeS7TmWN 3Aean7q9A9emzcD4urHYQ2uy+RNhjAyOY84VVsQIDgOZLXKloKWKeo6nFFVZgyww4nI4sS0An YpN7FNnU5KGCmk+rGDFOXulAmPUF98gnpOqvruU42Q9njdeyt6lNKrk3Gr45jTGHqPFSSRL94 enVKQsCxvWqNAcEM4y5+p5+w== X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.19 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.88)[-0.875]; DMARC_POLICY_ALLOW(-0.50)[gmx.de,quarantine]; NEURAL_HAM_SHORT(-0.22)[-0.215]; R_DKIM_ALLOW(-0.20)[gmx.de:s=s31663417]; R_SPF_ALLOW(-0.20)[+a:mout.gmx.net]; MIME_GOOD(-0.10)[text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[212.227.17.20:from]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.17.20:from]; ONCE_RECEIVED(0.10)[]; FREEMAIL_REPLYTO(0.00)[gmx.de]; FREEMAIL_FROM(0.00)[gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmx.de]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmx.de:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; HAS_REPLYTO(0.00)[garyj@gmx.de] X-Rspamd-Queue-Id: 4WY4wb5td7z3xcR On Mon, 29 Jul 2024 23:58:59 GMT Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D860c4d94ac46cee35a678cf3c= 9cdbd437dfed75e > > commit 860c4d94ac46cee35a678cf3c9cdbd437dfed75e > Author: Konstantin Belousov > AuthorDate: 2024-07-17 04:05:33 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-07-29 23:57:33 +0000 > > rtld: add LD_NO_DL_ITERATE_PHDR_AFTER_FORK env var > > which makes threaded fork ignore the phdr rtld lock, in particular > allowing the dl_iterate_phdr() to block in callback. The cost is th= at > the image started in this mode cannot use dl_iterate_phdr() after fo= rk. > > PR: 280318 > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > --- > libexec/rtld-elf/rtld.1 | 10 +++++++++- > libexec/rtld-elf/rtld.c | 1 + > libexec/rtld-elf/rtld.h | 1 + > libexec/rtld-elf/rtld_lock.c | 7 +++++-- > 4 files changed, 16 insertions(+), 3 deletions(-) > > diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 > index 992138b1ffc0..31e046a5cdc4 100644 > --- a/libexec/rtld-elf/rtld.1 > +++ b/libexec/rtld-elf/rtld.1 > @@ -26,7 +26,7 @@ > .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U= SE OF > .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > .\" > -.Dd April 28, 2024 > +.Dd July 24, 2025 <=3D=3D SHOULD BE 2024 > .Dt RTLD 1 [SNIP] =2D- Gary Jennejohn From nobody Tue Jul 30 07:57:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WY6yJ0mHJz5RSxM; Tue, 30 Jul 2024 07:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WY6yH72Y7z44Y3; Tue, 30 Jul 2024 07:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722326232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DPjt9zPRPBTH2NldU3av/dV99VeSyB1sLWG/i6NKjXA=; b=Z1k0WOuE4JOLGh3Ru44Gs0MDhF+/FERg6Bu9JJpX/tLMVqGQs9Oa5+GDkE2pCXv/oX6VS3 Xya5Mzdo4V9YbH1ppymIPZmQRY+n5VQK8i4+hLrti4rg5KEGoKDs3GPe5HQHmIjnbkivA7 NxfPlAxCHXuiFGlF5O+5QRfH7ulfz/wRpek9E4vta7diM16KBetHDcfIF06JEd9H7tuScy t/2BG9191LzLGMmr5Kz+zs7SWYDPKHXfvdrJY6lBQXrh1aQuH2Vu/5Ad5Sek8jiWB4z0Mj nlDDW1xN+S4836OizB0jQGJs1rO/rueya4W98CNf6TMNh97J6m4GL6uLA524XA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722326232; a=rsa-sha256; cv=none; b=wMOZJ9qkMegYcWrngXEgrj6UDwnFvktXIRvF3dZG4Z48FEE225j+DLMCR6Yvi46HQ8xK5z /oHX+SQ8EVhhzBwPh93bvG/qPFGPJVVqEO2o/HCNRwU0RI7qUg+9pNGVMcfh9C0nsrB52H BJx9pjFOMEG9HLhWDO97hPZQhZxhnhNmZZsxck+sgN61q0/CzbumE2nFy6Yk/NykxTlAjm qEKPYvGLgM4KraBlo9z6dydWek3Y97OJvCiBNMUR0JYpiQksICIGuRcMwfPQkLCQt/ALGT Dlaj+gFcUNZiGbhqD8Z6y1CR6/KdONhcv0kxmb6uKVI30KQNPlwFRiWS0fKwOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722326232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DPjt9zPRPBTH2NldU3av/dV99VeSyB1sLWG/i6NKjXA=; b=PjSA3e4UHIubxFCykq4Soe/lI6HLc1+OBoaKGNMOYHQuKMEtsNvGKnay/coZOXJ8SqKoJU AjkMorh6ANerGiahK48wWCPVV9e9bWAZv0K53DaSksJuLolndCz3VuDRY0ggwGfsCiXarq X5bt5nW/P+Bk7PZOt9k1GP0dFhMqAKLmLdj4MA8vN4gu45m41qX5FnPvdk/OSdBgHpu4RG Ss5HI5JgRpv8qKEz7wekqEN3BJC11FCYeP2JCSYG11GdHUM5s2KaYCaSvb6z6MVhospzDd ylNh1LktV4dps0LK4ye1xScOXxQDJ6aMZYUV8w0gtm6yUEu1y5TsDS9cRLqpQg== 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 4WY6yH6dfVz17sm; Tue, 30 Jul 2024 07:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46U7vB0T066414; Tue, 30 Jul 2024 07:57:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46U7vBVT066411; Tue, 30 Jul 2024 07:57:11 GMT (envelope-from git) Date: Tue, 30 Jul 2024 07:57:11 GMT Message-Id: <202407300757.46U7vBVT066411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: baa006f34227 - main - xen: introduce a per-arch scratch mapping ranges List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: baa006f3422719d22da2ea920a5a46b608f47ce2 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=baa006f3422719d22da2ea920a5a46b608f47ce2 commit baa006f3422719d22da2ea920a5a46b608f47ce2 Author: Roger Pau Monné AuthorDate: 2024-07-25 09:00:08 +0000 Commit: Roger Pau Monné CommitDate: 2024-07-30 07:39:38 +0000 xen: introduce a per-arch scratch mapping ranges The current approach is to create foreign mappings in any unpopulated address on the memory map. This however can cause issues, as late-loaded drivers could then found their MMIO region has been stolen to be used as foreign mapping scratch space (due to the Xen drivers having started first). Add a local resource manager to the xenpv bus driver, architectures can add suitable resources to that resource manager at boot in order to be used in preference of the generic MMIO resource allocator. No functional change, as the introduced scratch mapping range is not yet populated. Sponsored by: Cloud Software Group MFC after: 1 week Reviewed by: Elliott Mitchell Differential revision: https://reviews.freebsd.org/D46122 --- sys/dev/xen/bus/xenpv.c | 77 +++++++++++++++++++++++++++++++++++++++++++++---- sys/xen/xen-os.h | 5 ++++ 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/sys/dev/xen/bus/xenpv.c b/sys/dev/xen/bus/xenpv.c index 169e52f3a879..5073b93b24f1 100644 --- a/sys/dev/xen/bus/xenpv.c +++ b/sys/dev/xen/bus/xenpv.c @@ -65,6 +65,16 @@ #define LOW_MEM_LIMIT 0 #endif +/* + * Memory ranges available for creating external mappings (foreign or grant + * pages for example). + */ +static struct rman unpopulated_mem = { + .rm_end = ~0, + .rm_type = RMAN_ARRAY, + .rm_descr = "Xen scratch memory", +}; + static void xenpv_identify(driver_t *driver, device_t parent) { @@ -91,10 +101,25 @@ xenpv_probe(device_t dev) return (BUS_PROBE_NOWILDCARD); } +/* Dummy init for arches that don't have a specific implementation. */ +int __weak_symbol +xen_arch_init_physmem(device_t dev, struct rman *mem) +{ + + return (0); +} + static int xenpv_attach(device_t dev) { - int error; + int error = rman_init(&unpopulated_mem); + + if (error != 0) + return (error); + + error = xen_arch_init_physmem(dev, &unpopulated_mem); + if (error != 0) + return (error); /* * Let our child drivers identify any child devices that they @@ -110,6 +135,14 @@ xenpv_attach(device_t dev) return (error); } +static int +release_unpopulated_mem(device_t dev, struct resource *res) +{ + + return (rman_is_region_manager(res, &unpopulated_mem) ? + rman_release_resource(res) : bus_release_resource(dev, res)); +} + static struct resource * xenpv_alloc_physmem(device_t dev, device_t child, int *res_id, size_t size) { @@ -117,17 +150,48 @@ xenpv_alloc_physmem(device_t dev, device_t child, int *res_id, size_t size) vm_paddr_t phys_addr; void *virt_addr; int error; + const unsigned int flags = RF_ACTIVE | RF_UNMAPPED | + RF_ALIGNMENT_LOG2(PAGE_SHIFT); + + KASSERT((size & PAGE_MASK) == 0, ("unaligned size requested")); + size = round_page(size); + + /* Attempt to allocate from arch resource manager. */ + res = rman_reserve_resource(&unpopulated_mem, 0, ~0, size, flags, + child); + if (res != NULL) { + rman_set_rid(res, *res_id); + rman_set_type(res, SYS_RES_MEMORY); + } else { + static bool warned = false; - res = bus_alloc_resource(child, SYS_RES_MEMORY, res_id, LOW_MEM_LIMIT, - ~0, size, RF_ACTIVE | RF_UNMAPPED); - if (res == NULL) + /* Fallback to generic MMIO allocator. */ + if (__predict_false(!warned)) { + warned = true; + device_printf(dev, + "unable to allocate from arch specific routine, " + "fall back to unused memory areas\n"); + } + res = bus_alloc_resource(child, SYS_RES_MEMORY, res_id, + LOW_MEM_LIMIT, ~0, size, flags); + } + + if (res == NULL) { + device_printf(dev, + "failed to allocate Xen unpopulated memory\n"); return (NULL); + } phys_addr = rman_get_start(res); error = vm_phys_fictitious_reg_range(phys_addr, phys_addr + size, VM_MEMATTR_XEN); if (error) { - bus_release_resource(child, SYS_RES_MEMORY, *res_id, res); + int error = release_unpopulated_mem(child, res); + + if (error != 0) + device_printf(dev, "failed to release resource: %d\n", + error); + return (NULL); } virt_addr = pmap_mapdev_attr(phys_addr, size, VM_MEMATTR_XEN); @@ -150,7 +214,8 @@ xenpv_free_physmem(device_t dev, device_t child, int res_id, struct resource *re pmap_unmapdev(virt_addr, size); vm_phys_fictitious_unreg_range(phys_addr, phys_addr + size); - return (bus_release_resource(child, SYS_RES_MEMORY, res_id, res)); + + return (release_unpopulated_mem(child, res)); } static device_method_t xenpv_methods[] = { diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h index 98be41124846..bae4f9ef1d13 100644 --- a/sys/xen/xen-os.h +++ b/sys/xen/xen-os.h @@ -39,6 +39,8 @@ #include #ifndef __ASSEMBLY__ +#include + #include #include @@ -158,6 +160,9 @@ void xc_printf(const char *, ...) __printflike(1, 2); */ void xen_emergency_print(const char *str, size_t size); +/* Arch-specific helper to init scratch mapping space. */ +int xen_arch_init_physmem(device_t dev, struct rman *mem); + #ifndef xen_mb #define xen_mb() mb() #endif From nobody Tue Jul 30 07:57:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WY6yK2Srqz5RT7d; Tue, 30 Jul 2024 07:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WY6yK0zVxz44Q6; Tue, 30 Jul 2024 07:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722326233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D3d4IdtL8P3PFKtUjWCjI9l31Y7+DY+jkQg04RraFlo=; b=q1Umu3h0qEzDaMVSis7KbMmJJo/4Du/jiDxyxiJMM+K4j3a92wNA9V3VCNN48es72dUnzB o8N4ubeeh/OVGZUCJNBS2oLH04uWB0z9YOvLK9kERQki5i42bhnLGKieiKHj2l+rJk/3bF j3KCl41PuT+BhgVKNnVw5pn1FV6bpVYLm9LKkqRlhmk228RXfv+yd7WjelfhRBWY9hPsD+ UG4IQQxWaxkhWk0xOM57v+ivI4VWClbktct5mspT3tdA7M2QnJtiklwgYYGlx+HKJnZ36B KWU6I1Thm8Tv9XcNIV9Bo/UG8G9PVYluj3wSGsuFpj4fZBuBWgNp62eq5fTMYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722326233; a=rsa-sha256; cv=none; b=W5NX9MtQG2sdZ4OsMnfCeBNXuCW1MUIGXmQ6S9V+P3zaiT5GRaNy5Vz5uuDUBWRVKPk9Vl ZLJcEed/AxHZoqXF9bGfSRiVpxcV+LFHw/48KWXiO+7y0lmabscZZmVSmOEtH4Vp9lsPZZ 6kKhoeP2OGUfqyFsK2YKZuWuQXX+SmuHrFwoMf6CTxIzDMO1NwtQVsXsDk0bDuZDvAzPxW OJcFF1KlisF0WAEPvGHTt1UVkqmOW/L6Uzszt1X5YcyLYmpb2jxGSby2mp+lM7r19uE2RR yKPku6WgFK6iO/oSHto9z7oQU8cxvA5HIWFkdZX2Ko8t+L8hfg+GiPYGmZQoWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722326233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D3d4IdtL8P3PFKtUjWCjI9l31Y7+DY+jkQg04RraFlo=; b=ux2UzQB9DlB3s0GwX6K3BLI/GfG01tvwUwgCw5UwfLVeiq8C5qrbkF0xf6AICuNaPgN5gn vNYPABPKQ93n9fKaHFmk0sy/aZImlvvSnXN7eT1Vvyz7wVjQSLc8vaFYa4XvwZPlP6v/va xAlFTqSG4IFCV31CXPp3pnifNQ7rTtjCEOqKHTUwif0ne2eDhaAyYBZ6AhLoPh17cORn74 6W+FbfL6CnaxMfEfXRxIB5u9zYa8VoZ9bk1LxQJlXdm7X08noTxT14QKDshmU/lTFpicQs 7T9p6J29WO813ZJWrcs0UNRgmtk97FEwLcFto6RGIflAT72gRd9zj03FIbtGdA== 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 4WY6yK0Zqqz18V2; Tue, 30 Jul 2024 07:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46U7vCKI066472; Tue, 30 Jul 2024 07:57:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46U7vCDn066469; Tue, 30 Jul 2024 07:57:12 GMT (envelope-from git) Date: Tue, 30 Jul 2024 07:57:12 GMT Message-Id: <202407300757.46U7vCDn066469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 69c47485b5f9 - main - x86/xen: use UNUSABLE e820 regions for external mappings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69c47485b5f9609c32269523a704d1ad0c638a30 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=69c47485b5f9609c32269523a704d1ad0c638a30 commit 69c47485b5f9609c32269523a704d1ad0c638a30 Author: Roger Pau Monné AuthorDate: 2024-02-15 10:42:17 +0000 Commit: Roger Pau Monné CommitDate: 2024-07-30 07:41:17 +0000 x86/xen: use UNUSABLE e820 regions for external mappings Using holes in the memory map to create external mappings (for example grants or foreign maps) can be dangerous, as the guest might not have enough knowledge of whether such holes are maybe MMIO of some devices. Workaround this by using UNUSABLE e820 ranges as scratch space for external mappings. The e820 memory map provided to dom0 is based on the native one, but since PVH dom0 uses second stage translation, the UNUSABLE ranges on the host memory map doesn't affect it, and we can also guarantee no device MMIO uses those. Additionally, any RAM in the e820 not available to dom0 because dom0 memory has been limited on the command line, or because those are in use by Xen, are converted to UNUSABLE in the dom0 memory map. Note that domU don't usually have UNUSABLE ranges in their memory maps, and hence the logic introduced here won't help in avoiding conflicts with MMIO regions. However the usage of external mappings on domUs is in general limited, and the logic introduced here simply won't be helpful to them, but won't regress the current state. Sponsored by: Cloud Software Group MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46123 --- sys/x86/xen/hvm.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/sys/x86/xen/hvm.c b/sys/x86/xen/hvm.c index 22f070213f9b..d2ab1c32b0a2 100644 --- a/sys/x86/xen/hvm.c +++ b/sys/x86/xen/hvm.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -548,3 +549,52 @@ xen_has_iommu_maps(void) return (regs[0] & XEN_HVM_CPUID_IOMMU_MAPPINGS); } + +int +xen_arch_init_physmem(device_t dev, struct rman *mem) +{ + static struct bios_smap smap[128]; + struct xen_memory_map memmap = { + .nr_entries = nitems(smap), + }; + unsigned int i; + int error; + + set_xen_guest_handle(memmap.buffer, smap); + error = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap); + if (error != 0) + return (error); + + /* + * Fill with UNUSABLE regions, as it's always fine to use those for + * foreign mappings, they will never be populated. + */ + for (i = 0; i < memmap.nr_entries; i++) { + const vm_paddr_t max_phys = cpu_getmaxphyaddr(); + vm_paddr_t start, end; + + if (smap[i].type != SMAP_TYPE_ACPI_ERROR) + continue; + + start = round_page(smap[i].base); + /* In 32bit mode we possibly need to truncate the addresses. */ + end = MIN(trunc_page(smap[i].base + smap[i].length) - 1, + max_phys); + + if (start >= end) + continue; + + if (bootverbose != 0) + device_printf(dev, + "scratch mapping region @ [%016jx, %016jx]\n", + start, end); + + error = rman_manage_region(mem, start, end); + if (error != 0) + device_printf(dev, + "unable to add scratch region [%016jx, %016jx]: %d\n", + start, end, error); + } + + return (0); +} From nobody Tue Jul 30 09:47:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WY9PX0skjz5Rdsn; Tue, 30 Jul 2024 09:47:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WY9PX0RmZz4LT7; Tue, 30 Jul 2024 09:47:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722332848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgcJugcpUA7AQa/ANn2EyphqS3l7OBs65d1Ba/xWitk=; b=pV/ZulVEncwU394AX/fPob+YGHEZjkhOEqqb6fq6MPzGBcShw1AsQVcv0ZngPZz0liXVqT YadEpk5RuyX2s6YIcHrYC2Fgx6TsRMfv18zEGH04WP9OmDjSYegRKj9ZLPR93ov7YBLJ/q 65niY0EonkNfgTb7yVN64vY+0fmQlTiONTD04mkpXyLXwQjHVfgOuAFHgUz1IuDsBApz3H mQcVHE1UfQn5687FknolXRf5NlA8WTF0J2xCaVTPKtOz1RLiacRhUg0l9N1QViS4vF7YzB f4me08/Y4Mmti8INn2Vt2yJHQaVT10VVVH9kDCcgffFvhgfi5YqNZa9wQyk63w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722332848; a=rsa-sha256; cv=none; b=ZqPG9PN4kN96eeHtRMdqyjPhF5SJxhNhqXIpUXnzUm3ubeehl/7U737yyVKSVj1yD+8Exs W1CiRD1ZGFjC5zpl7m9fGV0FYJWMxEX4THePNYZuMVZXZxmlwMUVEUoPO3fQvQkI/1W1j6 dcaq4a17t1xvytGrycwAMUCOptBaTCObYTbDYH1TtGMrJqy8QQfBiW5NkKVGAQdINVIx2s 8moCGqaGL8UOOY0vNdgK3ojTPTFEc8Tp61IzipmGmVecpl6bzvafmdzy9neHjacBTgjhs8 7B/olNumuLtGf28P0GWHNveJeYokheTD/DnUDekLNtgDXVXLnFsmv8FWwrVRRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722332848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgcJugcpUA7AQa/ANn2EyphqS3l7OBs65d1Ba/xWitk=; b=XdQDWXBHkjaTcbsPlzYJCPK267kLhfh69RDPiqVUVhxjlpwEwxCU0oqIJDJWkYsmDA2lQs /2CZIOB0GrOyRGLZFvuXrrabYGojFd9x2Z4wwZJKL16Zyhj1Rq5T/sWe33mI16SC6lEg4x 8lWAVo9qVHGpjHJNuzs/pUBVtruXqdhKEtmvv/vZC3U5/HD3PzyTjw2dn/NcMNVE6wLfIR JdsFeMU2kiHf4+cMYIhbrsB1N9PqM/gXAL+SuIwUx50RFxWGEytSLrGSsdkXt0HYbNAJ+g UK+RlOw+aKuEkf0V54tuQRlzbu3+jvr+uH/xHJ0/IrQNybcEkAZRgkp/WX91xg== 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 4WY9PW71cPz1C85; Tue, 30 Jul 2024 09:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46U9lRP8052864; Tue, 30 Jul 2024 09:47:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46U9lRi4052861; Tue, 30 Jul 2024 09:47:27 GMT (envelope-from git) Date: Tue, 30 Jul 2024 09:47:27 GMT Message-Id: <202407300947.46U9lRi4052861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 4d32367a44e0 - main - Revert "udp: improve handling of cached route" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d32367a44e0cd46591c04f98e706696d997457a Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=4d32367a44e0cd46591c04f98e706696d997457a commit 4d32367a44e0cd46591c04f98e706696d997457a Author: Michael Tuexen AuthorDate: 2024-07-30 09:46:27 +0000 Commit: Michael Tuexen CommitDate: 2024-07-30 09:46:27 +0000 Revert "udp: improve handling of cached route" This reverts commit 71867653008ce17a66a9c935e9dc29c1320bf48b. Two tests of the test suite are failing. Reverting the change until it is improved. --- sys/netinet/udp_usrreq.c | 20 ++++++++------------ sys/netinet6/udp6_usrreq.c | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 1666d4bd3142..9dad79e95b04 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1087,6 +1087,7 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, uint16_t cscov = 0; uint32_t flowid = 0; uint8_t flowtype = M_HASHTYPE_NONE; + bool use_cached_route; inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_send: inp == NULL")); @@ -1115,21 +1116,16 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, sin = (struct sockaddr_in *)addr; /* - * In the following cases we want a write lock on the inp for either - * local operations or for possible route cache updates in the IPv6 - * output path: - * - on connected sockets (sin6 is NULL) for route cache updates, - * - when we are not bound to an address and source port (it is - * in_pcbinshash() which will require the write lock). - * - when we are using a mapped address on an IPv6 socket (for - * updating inp_vflag). + * udp_send() may need to temporarily bind or connect the current + * inpcb. As such, we don't know up front whether we will need the + * pcbinfo lock or not. Do any work to decide what is needed up + * front before acquiring any locks. * * We will need network epoch in either case, to safely lookup into * pcb hash. */ - if (sin == NULL || - (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0) || - (flags & PRUS_IPV6) != 0) + use_cached_route = sin == NULL || (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0); + if (use_cached_route || (flags & PRUS_IPV6) != 0) INP_WLOCK(inp); else INP_RLOCK(inp); @@ -1480,7 +1476,7 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, else UDP_PROBE(send, NULL, inp, &ui->ui_i, inp, &ui->ui_u); error = ip_output(m, inp->inp_options, - sin == NULL ? &inp->inp_route : NULL, ipflags, + use_cached_route ? &inp->inp_route : NULL, ipflags, inp->inp_moptions, inp); INP_UNLOCK(inp); NET_EPOCH_EXIT(et); diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index d7d85c6b3d13..414be35b5bef 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -937,7 +937,7 @@ udp6_send(struct socket *so, int flags_arg, struct mbuf *m, else UDP_PROBE(send, NULL, inp, ip6, inp, udp6); error = ip6_output(m, optp, - sin6 == NULL ? &inp->inp_route6 : NULL, flags, + INP_WLOCKED(inp) ? &inp->inp_route6 : NULL, flags, inp->in6p_moptions, NULL, inp); INP_UNLOCK(inp); NET_EPOCH_EXIT(et); From nobody Tue Jul 30 13:52:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYGrK6YPyz5S1L6; Tue, 30 Jul 2024 13:52:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYGrK653bz4rwN; Tue, 30 Jul 2024 13:52:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722347553; 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=96VkamLg0LbjO9viGfcKJSi/uYHm5jlqY0eG/e4Dfa8=; b=fmTa9HOY8yy53L6KRtIuriDlXZOo4eLXuKho+8l9OD3zd/2NEP/bTWUtdMkfke7677cZkP 7+qr5xIvVoyREWm2f90bOqmhnMuXr4Sd/9ky3/q74iQyS3kWQLjf2I2D2MX84xatTagnUQ LgXrTdXiPkoeST3VGc8mNQi8SZSLWVbBRUiPrF2jQsRBW7SsRoaI+ifiCdu1ntElpO/kxQ sHYfKhQRqjtg10O9MqpKdmSZdgbnncBU4ySAf3/wnghtegqscGU/GajU5KbQrppmwB+r2S so0zXOBVYkjwx4sCb6qXvXQsP62ovjB7SzJ9xI4ttSUNgyEuQ6oYf9C03FGZdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722347553; a=rsa-sha256; cv=none; b=Eu4PEupHPQ4NPp+i4cvvJ6KzY5E5Czbp/j7nKgPkj0yAFtubqzIy/LH18H4ywSKGmigsEg FoJb5a8MSkCKWtWZ4xiHh+qQj6oMVYGyckmu560hw8XdiUE0P6UEf3sdrnz+Y7lQD/oq5r xJXlBdqZKcC+04VkbEslaruJpJuUJtnrJYyfcYfyhA7z0bETk4VomAxLa6yfqMvanRvPCB wf8R680ABdT/oMyCutJBti1vf+gyACoaXF1lzZNa/0MGHY3Na6OwuCwECx3cc00JANNUA9 qK5Cvag4llXMNWa0b72w5e5haQd8lzfpDLG2Gghl5OD/++7o5ryKy8kd9UN+xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722347553; 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=96VkamLg0LbjO9viGfcKJSi/uYHm5jlqY0eG/e4Dfa8=; b=RleVqqrtuMcZljFnhz+m14sYceyGJPfmPdLGjikW2oRlyiiz+y9i/ULWpiVUvtG5T7PHZj 8KnR/3Cb17LlYK5vKZ3PRZF+HQUqm2LNF2ajY4fuIOnzQKTTPajO1YUNofHI4BMuOSGIqs aAnFAEdeyfpeUR+piAfPATcvPwycBDrKfRtPr1C/4YxId9AXLD4+Lc4OcGDn+WBEEmLaji 6b593KRXDMoqnXNhE/WOKqtQ15O4BhKYZAtN7MdXdqvUUaGq1YTuOWXLIxqn5pKmkb8qbm 69NfJbPlBPw5MiPLrrnhNpBYgZFCUquymGWuHSnJNBv4kaDd4Q54/Itx1hKzLw== Received: from [IPV6:2601:5c0:4200:b830:392f:842d:8de1:d214] (unknown [IPv6:2601:5c0:4200:b830:392f:842d:8de1:d214]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WYGrK3pwWzPnc; Tue, 30 Jul 2024 13:52:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 30 Jul 2024 09:52:32 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 Content-Language: en-US To: Warner Losh Cc: Mark Johnston , Yuri Pankov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/29/24 15:18, Warner Losh wrote: > Hey John, > > On Mon, Jul 29, 2024 at 11:55 AM John Baldwin wrote: > >> On 7/29/24 13:40, Warner Losh wrote: >>> On Mon, Jul 29, 2024 at 10:39 AM Mark Johnston >> wrote: >>> >>>> On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote: >>>>> Mark Johnston wrote: >>>>>> The branch main has been updated by markj: >>>>>> >>>>>> URL: >>>> >> https://cgit.FreeBSD.org/src/commit/?id=801c452795ac441523655eb3277051b7b034becf >>>>>> >>>>>> commit 801c452795ac441523655eb3277051b7b034becf >>>>>> Author: Mark Johnston >>>>>> AuthorDate: 2024-07-29 14:12:40 +0000 >>>>>> Commit: Mark Johnston >>>>>> CommitDate: 2024-07-29 14:17:04 +0000 >>>>>> >>>>>> man9: Really complete the removal of MD5.9 >>>>>> >>>>>> Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate >>>> kernel side manual page.") >>>>>> Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual >> page >>>> from section 9.") >>>>>> --- >>>>>> ObsoleteFiles.inc | 2 ++ >>>>>> share/man/man9/Makefile | 2 -- >>>>>> 2 files changed, 2 insertions(+), 2 deletions(-) >>>>>> >>>>>> diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc >>>>>> index b21778466800..01b4824e8692 100644 >>>>>> --- a/ObsoleteFiles.inc >>>>>> +++ b/ObsoleteFiles.inc >>>>>> @@ -56,6 +56,8 @@ OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz >>>>>> >>>>>> # 20240729: remove MD5(9) >>>>>> OLD_FILES+=usr/share/man/man9/MD5.9.gz >>>>>> +OLD_FILES+=usr/share/man/man9/MD5Init.9 >>>>>> +OLD_FILES+=usr/share/man/man9/MD5Transform.9 >>>>> >>>>> This really needs to be smarter, but you have to specify .gz suffix for >>>>> man entries as we have compression enabled by default. >>>> >>>> Sigh, who knew it was so difficult to remove a man page. >>>> >>> >>> There is a pull request being worked on that will be smarter about what's >>> removed since we have compress (UFS) and uncompress (ZFS) setups >>> now. >> >> Does it just add an OLD_MAN helper variable to use instead of OLD_FILES >> and then try the various extension combinations for each OLD_MAN? >> > > https://github.com/freebsd/freebsd-src/pull/1295 > > was submitted a bit ago. the repetition is why I've not committed it. Is an > approach > like that good, or should we move all the old man pages to OLD_MAN? This is solving a different problem. This is dealing with removing duplicate copies e.g. when switching from WITH_MANCOMPRESS=yes to WITHOUT_MANCOMPRESS=yes. OLD_MAN would be orthogonal. It would be similar to how we use extra logic for OLD_LIBS where we look for debug symbols in /usr/lib/debug to remove along with the library. For OLD_MAN we would try to remove both $f and $f.gz. -- John Baldwin From nobody Tue Jul 30 14:00:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYH1G5F1Bz5S1rH for ; Tue, 30 Jul 2024 14:00:18 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYH1G3Wh0z4sdk for ; Tue, 30 Jul 2024 14:00:18 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4281d812d3eso23044425e9.3 for ; Tue, 30 Jul 2024 07:00:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722348016; x=1722952816; 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=4CoTbLuFtoy8nnLvGrczbig3PEtsRB7OQ/dqT9/iLKQ=; b=WF8InYJdNF+ZM48j9QP6XW9Xp0Stv783/gRWWofGIEqsPv0Tzio7csOpqueV0/FEz7 v/cZGHCH+CmwKV6TyZhFJmCn0TouFgAyQk2eAhPI60mM9dnO/yajUdJ2FNIbhBAtpAnX /WvfFpw5c8SjJYaiAb1jFeUGbCJpO3GdPsEtzzXDaU0NWIoUnk59Lx0ksY8uAOTRj5A0 OuX1FgNrIo3Z6+N2QlhaYmQyO6b8NiEx/vHmdlOlmYORqXtF+EzsbM1VbppIrp9p1Kp1 u4CJkIZHPvoMJtnkmyNwuoXrQbVLBMmVx2B/eG/soXQYVjFf0OkkCYU341l/0yj4jp5O eYDg== X-Forwarded-Encrypted: i=1; AJvYcCVNgNuvhUl5baoBj8/Y5jvwKtvGqAlc2KnAu76/JXHWxxigYx8ijR4fYsffETrpndkNgVjH2eKac2bKp6zbrGWauQd9/egIb9GAjE1jw2fS X-Gm-Message-State: AOJu0YzA9ZTuQWmNrn4UyB80oMwvZ3n7U1MMBRyps/JOrsSmmJSlB2dw pEZAcdjgHXmhw59uHpAXl+4wKwt1PKNkSeAIXKJ963Xj2CP7OVEb4pxGLDVppjM= X-Google-Smtp-Source: AGHT+IFP7OF9vJVSZP0S26azPSdGoErKGfA7zYLkZBy7c46OjfqCkYzEhFxm64I/xIKbDJ0sxcxFeg== X-Received: by 2002:a05:600c:4311:b0:428:111a:193 with SMTP id 5b1f17b1804b1-42811e0b9a7mr74960965e9.37.1722348016330; Tue, 30 Jul 2024 07:00:16 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-428068cda0csm210329825e9.47.2024.07.30.07.00.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2024 07:00:15 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 From: Jessica Clarke In-Reply-To: Date: Tue, 30 Jul 2024 15:00:04 +0100 Cc: Warner Losh , Mark Johnston , Yuri Pankov , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> To: John Baldwin X-Mailer: Apple Mail (2.3774.600.62) 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: 4WYH1G3Wh0z4sdk On 30 Jul 2024, at 14:52, John Baldwin wrote: >=20 > On 7/29/24 15:18, Warner Losh wrote: >> Hey John, >> On Mon, Jul 29, 2024 at 11:55=E2=80=AFAM John Baldwin = wrote: >>> On 7/29/24 13:40, Warner Losh wrote: >>>> On Mon, Jul 29, 2024 at 10:39=E2=80=AFAM Mark Johnston = >>> wrote: >>>>=20 >>>>> On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote: >>>>>> Mark Johnston wrote: >>>>>>> The branch main has been updated by markj: >>>>>>>=20 >>>>>>> URL: >>>>>=20 >>> = https://cgit.FreeBSD.org/src/commit/?id=3D801c452795ac441523655eb3277051b7= b034becf >>>>>>>=20 >>>>>>> commit 801c452795ac441523655eb3277051b7b034becf >>>>>>> Author: Mark Johnston >>>>>>> AuthorDate: 2024-07-29 14:12:40 +0000 >>>>>>> Commit: Mark Johnston >>>>>>> CommitDate: 2024-07-29 14:17:04 +0000 >>>>>>>=20 >>>>>>> man9: Really complete the removal of MD5.9 >>>>>>>=20 >>>>>>> Fixes: 46b0db2dbe9f ("Remove unnecessary and now = inaccurate >>>>> kernel side manual page.") >>>>>>> Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 = manual >>> page >>>>> from section 9.") >>>>>>> --- >>>>>>> ObsoleteFiles.inc | 2 ++ >>>>>>> share/man/man9/Makefile | 2 -- >>>>>>> 2 files changed, 2 insertions(+), 2 deletions(-) >>>>>>>=20 >>>>>>> diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc >>>>>>> index b21778466800..01b4824e8692 100644 >>>>>>> --- a/ObsoleteFiles.inc >>>>>>> +++ b/ObsoleteFiles.inc >>>>>>> @@ -56,6 +56,8 @@ = OLD_FILES+=3Dusr/share/man/man9/ifaddr_byindex.9.gz >>>>>>>=20 >>>>>>> # 20240729: remove MD5(9) >>>>>>> OLD_FILES+=3Dusr/share/man/man9/MD5.9.gz >>>>>>> +OLD_FILES+=3Dusr/share/man/man9/MD5Init.9 >>>>>>> +OLD_FILES+=3Dusr/share/man/man9/MD5Transform.9 >>>>>>=20 >>>>>> This really needs to be smarter, but you have to specify .gz = suffix for >>>>>> man entries as we have compression enabled by default. >>>>>=20 >>>>> Sigh, who knew it was so difficult to remove a man page. >>>>>=20 >>>>=20 >>>> There is a pull request being worked on that will be smarter about = what's >>>> removed since we have compress (UFS) and uncompress (ZFS) setups >>>> now. >>>=20 >>> Does it just add an OLD_MAN helper variable to use instead of = OLD_FILES >>> and then try the various extension combinations for each OLD_MAN? >>>=20 >> https://github.com/freebsd/freebsd-src/pull/1295 >> was submitted a bit ago. the repetition is why I've not committed it. = Is an >> approach >> like that good, or should we move all the old man pages to OLD_MAN? >=20 > This is solving a different problem. This is dealing with removing = duplicate > copies e.g. when switching from WITH_MANCOMPRESS=3Dyes to = WITHOUT_MANCOMPRESS=3Dyes. >=20 > OLD_MAN would be orthogonal. It would be similar to how we use extra = logic > for OLD_LIBS where we look for debug symbols in /usr/lib/debug to = remove along > with the library. For OLD_MAN we would try to remove both $f and = $f.gz. list-old-files already has: -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n=E2=80=9D So as long as you list the manpages with a .gz suffix it=E2=80=99ll = already handle the uncompressed version. Jess From nobody Tue Jul 30 14:12:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYHHX6n6hz5S3FB; Tue, 30 Jul 2024 14:12:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHHX6BWKz4vN0; Tue, 30 Jul 2024 14:12:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722348760; 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=NFlxIJPhxOBlCGIAckZbOe6rhP9LhLpAIVoP95GmdEQ=; b=oxV0MdvJWCcKpuf1TyEH0NwnQiyqIOoaCycufRm1+XzBywCEZYYUjRv3AS1FADvAnH1L1c 3NBwK8RMugTrBqBgNW+lgSHNEVltOgsLFcIHT351Cs07sG/l3pNpJXq2NyZP9i78BABTtr IdIcJXyxYpXsICDc/B0EtqF8WUNkMy3ntBmcoHkNR8ijML6kaYsPcvNwSq9tSsWktd9Xj4 PSdMR2LSrO8mnt+SIjQQXcpTizVpu603eACSJlhtojf7Yv6s5U7aYjT1E87lIPtCfgyYFx ulOEhq9o29KOBfShOFmLWqsPjAGV2wreKPBHnVsdEEgP0G8kDROOhDowv2SrGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722348760; a=rsa-sha256; cv=none; b=NasFqYl4FnozfJh0Ea/sfCQL80+q/wcr+j3CmEA/j/ErvSpN8LOBuTyGNeF1vfcnRcTBCx OlKWbROC0f2wx4qDicYr+849jx8KlUX8hA9naBotTYqWBaKOeHtw9UhbahpFxzBhIA7kU9 rEyJlM0AvNdqFosXB0hQLQo6QUqSO5kj2mwctm8w1k01A6aCUZEJA9NRCAL+sK75MbLfPp y2w+5aIea5E/0+5pSqqA2MIDKnl/cZjdpOKX9RQ2oN9wLxELoh+TpReOBlnW1UgWrOVXef l2s0nUQ0pP+A+Z9jePBE8WS45jgSAqPurrSX+Wc8QKgNHQdc2Kmvn9h0qeqCNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722348760; 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=NFlxIJPhxOBlCGIAckZbOe6rhP9LhLpAIVoP95GmdEQ=; b=X1tdwCcgA4wxX9d0bLP9l8cnSAn0t6xJAiBMnUKVEHMATUcLN3FXlnLChgKjol7d1o7qEJ 1ySrdh9ay6XGMk0C+4z2GHFQvi/WbmmY9eq4/Q8QhB0OFrbOuWZ0/atupvwlHBucX5V1QV AEarmAaU4w6xtbYCZlxTIVz6x4JLqJnOlSO4ACYsx+O+KxfbVoTj8qQ+u2TBgjw5NUQvAc 1CSXQdHm56pqH/4wkVR7neYtWkaGgHrzZEiFmFbbWGOsLYk9io6F13/km9rmyPVql4dCPt nHbbR0AiF0rZFsF7CBu3tStiB16n+ULyk4EaD4lG5XcxV+NoR4mM7LLscrhkXQ== Received: from [IPV6:2601:5c0:4200:b830:392f:842d:8de1:d214] (unknown [IPv6:2601:5c0:4200:b830:392f:842d:8de1:d214]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WYHHX3fXpzPF6; Tue, 30 Jul 2024 14:12:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <93322d8e-4ce5-4175-bdd1-6fde7012914b@FreeBSD.org> Date: Tue, 30 Jul 2024 10:12:39 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 801c452795ac - main - man9: Really complete the removal of MD5.9 Content-Language: en-US To: Jessica Clarke Cc: Warner Losh , Mark Johnston , Yuri Pankov , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202407291431.46TEVQow094080@gitrepo.freebsd.org> <63334eb1-7af6-439a-89a0-ba379428c5a6@aetern.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/30/24 10:00, Jessica Clarke wrote: > On 30 Jul 2024, at 14:52, John Baldwin wrote: >> >> On 7/29/24 15:18, Warner Losh wrote: >>> Hey John, >>> On Mon, Jul 29, 2024 at 11:55 AM John Baldwin wrote: >>>> On 7/29/24 13:40, Warner Losh wrote: >>>>> On Mon, Jul 29, 2024 at 10:39 AM Mark Johnston >>>> wrote: >>>>> >>>>>> On Mon, Jul 29, 2024 at 11:31:19PM +0700, Yuri Pankov wrote: >>>>>>> Mark Johnston wrote: >>>>>>>> The branch main has been updated by markj: >>>>>>>> >>>>>>>> URL: >>>>>> >>>> https://cgit.FreeBSD.org/src/commit/?id=801c452795ac441523655eb3277051b7b034becf >>>>>>>> >>>>>>>> commit 801c452795ac441523655eb3277051b7b034becf >>>>>>>> Author: Mark Johnston >>>>>>>> AuthorDate: 2024-07-29 14:12:40 +0000 >>>>>>>> Commit: Mark Johnston >>>>>>>> CommitDate: 2024-07-29 14:17:04 +0000 >>>>>>>> >>>>>>>> man9: Really complete the removal of MD5.9 >>>>>>>> >>>>>>>> Fixes: 46b0db2dbe9f ("Remove unnecessary and now inaccurate >>>>>> kernel side manual page.") >>>>>>>> Fixes: 36d68cb2ddd2 ("Complete the removal of the MD5 manual >>>> page >>>>>> from section 9.") >>>>>>>> --- >>>>>>>> ObsoleteFiles.inc | 2 ++ >>>>>>>> share/man/man9/Makefile | 2 -- >>>>>>>> 2 files changed, 2 insertions(+), 2 deletions(-) >>>>>>>> >>>>>>>> diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc >>>>>>>> index b21778466800..01b4824e8692 100644 >>>>>>>> --- a/ObsoleteFiles.inc >>>>>>>> +++ b/ObsoleteFiles.inc >>>>>>>> @@ -56,6 +56,8 @@ OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz >>>>>>>> >>>>>>>> # 20240729: remove MD5(9) >>>>>>>> OLD_FILES+=usr/share/man/man9/MD5.9.gz >>>>>>>> +OLD_FILES+=usr/share/man/man9/MD5Init.9 >>>>>>>> +OLD_FILES+=usr/share/man/man9/MD5Transform.9 >>>>>>> >>>>>>> This really needs to be smarter, but you have to specify .gz suffix for >>>>>>> man entries as we have compression enabled by default. >>>>>> >>>>>> Sigh, who knew it was so difficult to remove a man page. >>>>>> >>>>> >>>>> There is a pull request being worked on that will be smarter about what's >>>>> removed since we have compress (UFS) and uncompress (ZFS) setups >>>>> now. >>>> >>>> Does it just add an OLD_MAN helper variable to use instead of OLD_FILES >>>> and then try the various extension combinations for each OLD_MAN? >>>> >>> https://github.com/freebsd/freebsd-src/pull/1295 >>> was submitted a bit ago. the repetition is why I've not committed it. Is an >>> approach >>> like that good, or should we move all the old man pages to OLD_MAN? >> >> This is solving a different problem. This is dealing with removing duplicate >> copies e.g. when switching from WITH_MANCOMPRESS=yes to WITHOUT_MANCOMPRESS=yes. >> >> OLD_MAN would be orthogonal. It would be similar to how we use extra logic >> for OLD_LIBS where we look for debug symbols in /usr/lib/debug to remove along >> with the library. For OLD_MAN we would try to remove both $f and $f.gz. > > list-old-files already has: > > -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n” > > So as long as you list the manpages with a .gz suffix it’ll already > handle the uncompressed version. Ah, ok. Perhaps part of the goal of OLD_MAN would be to avoid the need to include the .gz suffix since it gets forgotten periodically, but that would be the only goal given the above snippet. -- John Baldwin From nobody Tue Jul 30 14:29:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYHfk41S7z5S4Fb; Tue, 30 Jul 2024 14:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHfk34w8z4ykv; Tue, 30 Jul 2024 14:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgbgVWOGsqidNi8E1yoZyJ4XNTLLujfrh73+qzFm+BA=; b=WQHX2bSvCELTiHj3cTdMNzmnEktKLgtU5nFIfB9rLL0gFD8nsFFz72HOc+YK1GM0YdeSDw p3WMrf/aZ96qmZx4lctxSJVgik8hczYKu3NlrukayS5tHSd5ExLwMKJeWdFjmq2Pmz4iQn VAzYDKdLRtOPAJ83wt6QZfChJd09YmCY+ODCikWpK2XFL0aQ/kqIX2HIhggb49Hg75mPVl EFDfjgq7OBPWFPN1DEUL5G90vpBV6zIbBuzkUfxBlsLvcvG9TsQn2LyhGvEYdSdCH+wE8L MKD7sdRUNX4TtukKZbdKSWT0dLISOP0Y0pJKl9QxzSbF33jNGCIL/bChn7a8iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722349758; a=rsa-sha256; cv=none; b=SAsNpJhknHj3bvB7nFrAKmCCJGy959gKYUfIWwt6mM84ji6/cxhJZO0NV7svEKH8wF2Cr+ MRDVVdcpwXzPcBYIege1NNwpYxH1ycd1bIVcIDtGGsU/mMorosOJ61qdgtj9146b5X7vDg Om7M3JukGTwbhMwVk6DnZlYHfrha8Y8BpXWdD3y84N8e5bDLmkehBz1xjvsJBG6CMIduHS wMREGf8OIfkTWJci8gTDvd5XrjUAE9pEeC5YmGSo8iJeI8y42Vg0M8BVnE2pbmb/Qopvu2 /yi5pOnu1Boin2/Kk3eCqx1ed6Ucvoy64zE1PKtSwbDMt/+TEgYDOMKkRbeeYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgbgVWOGsqidNi8E1yoZyJ4XNTLLujfrh73+qzFm+BA=; b=bHfDrx+xlOxsFUheQuT1dn3mUsLaSE9Vq4TPmUbBbi76+SoSbP+CgJE/LLMUOC5CRA5FCy 6eVmSBBpFLuvu0EKyFxVV//0+L+wCrUHLrBiKkP6iVb26N62DWN0Gi0eqCtslogz/eUasd 1uVK3D8GD+8VGHaTjybgNAC023qZQKl4bTnP9rD79eucv4p2Qx0c4RrGCQgRlib6rZDzzG bn3Vf9g3fQdybKijAVWmJEFRVH4ymna86jJivdBCVtFU7W2x4wiz1/qe5tAYs0B1aqbAiu 8lNCQpnZJZ/VX1ES1tGrLkctBzZn+bKyF/9vx6kg0SJ+G+k/czNsAmTrW8JgRg== 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 4WYHfk2hDSzLsl; Tue, 30 Jul 2024 14:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UETIbc029563; Tue, 30 Jul 2024 14:29:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UETIY7029560; Tue, 30 Jul 2024 14:29:18 GMT (envelope-from git) Date: Tue, 30 Jul 2024 14:29:18 GMT Message-Id: <202407301429.46UETIY7029560@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: a14de491e031 - main - nvmf_tcp: Use min() to simplify a few statements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a14de491e031338c6b939e31c423078b36b8c2f3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a14de491e031338c6b939e31c423078b36b8c2f3 commit a14de491e031338c6b939e31c423078b36b8c2f3 Author: John Baldwin AuthorDate: 2024-07-30 14:26:14 +0000 Commit: John Baldwin CommitDate: 2024-07-30 14:26:14 +0000 nvmf_tcp: Use min() to simplify a few statements Sponsored by: Chelsio Communications --- sys/dev/nvmf/nvmf_tcp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sys/dev/nvmf/nvmf_tcp.c b/sys/dev/nvmf/nvmf_tcp.c index 8f1b3bf01e39..6c84a40611c3 100644 --- a/sys/dev/nvmf/nvmf_tcp.c +++ b/sys/dev/nvmf/nvmf_tcp.c @@ -623,10 +623,7 @@ mbuf_copyto_io(struct mbuf *m, u_int skip, u_int len, while (len != 0) { MPASS((m->m_flags & M_EXTPG) == 0); - todo = m->m_len - skip; - if (todo > len) - todo = len; - + todo = min(m->m_len - skip, len); memdesc_copyback(&io->io_mem, io_offset, todo, mtodo(m, skip)); skip = 0; io_offset += todo; @@ -1000,9 +997,7 @@ nvmf_tcp_handle_r2t(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu) struct mbuf *m; uint32_t sent, todo; - todo = data_len; - if (todo > qp->max_tx_data) - todo = qp->max_tx_data; + todo = min(data_len, qp->max_tx_data); m = nvmf_tcp_command_buffer_mbuf(cb, data_offset, todo, &sent, todo < data_len); tcp_send_h2c_pdu(qp, r2t->cccid, r2t->ttag, data_offset, m, @@ -1458,8 +1453,7 @@ tcp_allocate_qpair(bool controller, qp->maxh2cdata = params->tcp.maxh2cdata; qp->max_tx_data = tcp_max_transmit_data; if (!controller) { - if (qp->max_tx_data > params->tcp.maxh2cdata) - qp->max_tx_data = params->tcp.maxh2cdata; + qp->max_tx_data = min(qp->max_tx_data, params->tcp.maxh2cdata); } qp->max_icd = params->tcp.max_icd; From nobody Tue Jul 30 14:29:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYHfn1KFtz5S4Fc; Tue, 30 Jul 2024 14:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHfm53Qgz4yq6; Tue, 30 Jul 2024 14:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dHJTV+OCPmJA8aJSOpYqCVkPhBX3VcCbiMfgHxrvAOU=; b=F+O59K6R5mexqGxuOd5kcuSc0ThpMbs+yWXoOnTKDOItY8XSmTKPPvlWppOJxtnxBEwlHY kP64RCf9vAUWM5TY6BaDWeXHn/QJbfIrXTx/P3YPbhPDuG7Edbea0HUcD9irxla/fD18jv 1H2dl7Uw/XuRnEc37CEzOGxk7Anq0VA+ABORNxTK53x1It9YD7tL17dDzGHhG9XGqJMwWn vbywpNIovVQPDL3BASwH/+/ZF8Hym234eTd+8UHCjEYWR0pkLiJRQ8YwC00sL6pRUwe6Tv GQwgKqCDeTM51efq9KoyuegAMdnBZmXDpU4NWzuvqyf8LGDWdmvlIoaD0FVHzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722349760; a=rsa-sha256; cv=none; b=CzAtJY5sgn+D4CaMG8kd/16mwKsNHvUuql95OB9WTTEp4A/J6NfkITBEX14HSHRhLrGBLG PFVdwCfWuq2ojnO4QNbs6WE6NoQ19X3CkOpyckLwGh4ZUj5UXTKogtAQ9eizlLIwR8CI0I thFJvAFMOzPnFqVN2B5stn//9ylb02R4aPG4BgcRrSDyfOubi2Z6h0NTQklYzqINXYDFve 8KL7AMWGtZAhQnGS3L4xUV9DSqHgdUljv/q0LiWDpjpVzPVcGqtrm83RUsK+zPjR8aphpx XG+YjnqF9cxqv7R7xjQ0CDVNsN53IqpnOKcheeriubKpiHsvJc0IfVKD7i2j0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dHJTV+OCPmJA8aJSOpYqCVkPhBX3VcCbiMfgHxrvAOU=; b=prRDskvzzwOYQfvjkabUod+ZdCn8Go4cgowGQTpSlDU0wBSNLtzTDPId3q4hx5mu/66gis aFBxKic7Z3Tnnc+HoSKUCumQ4F4FNe3aZNuv0I9emNBLhMtDFyqwTJ+1/rWEB1KVrXtV+p zsCAyV5PpHhn2Iva8gG32EoTxZxDWOaAUiSvh6MZS0Vt29tsoXEDwuYpcyU/+rEwZ7/hsD z6T/u9bOUV8ySWsq+vuAAPRlB0Wd1iYvkXvpQQ+mszazN5Qf2yWojjgnvFX//UWu81sdZp JnaxByPNPQ0De8MlcilkFN9zx5DTy24jrzLJv4/vcTwyXRiBcNoEcidd5aj2Yw== 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 4WYHfm4h3pzLND; Tue, 30 Jul 2024 14:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UETKDc029668; Tue, 30 Jul 2024 14:29:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UETKNq029665; Tue, 30 Jul 2024 14:29:20 GMT (envelope-from git) Date: Tue, 30 Jul 2024 14:29:20 GMT Message-Id: <202407301429.46UETKNq029665@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: 19c15e41c6cd - main - nvmf_tcp: Update R2T accounting stats when aborting command buffers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 19c15e41c6cdf7bb5abd89ff0ebd11c620409256 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=19c15e41c6cdf7bb5abd89ff0ebd11c620409256 commit 19c15e41c6cdf7bb5abd89ff0ebd11c620409256 Author: John Baldwin AuthorDate: 2024-07-30 14:28:19 +0000 Commit: John Baldwin CommitDate: 2024-07-30 14:28:19 +0000 nvmf_tcp: Update R2T accounting stats when aborting command buffers If a queue pair is destroyed (e.g. due to the TCP connection dropping) while a host to controller data transfer is in progress, the pending_r2ts counter can be non-zero. This can later trigger an assertion failure when the capsule is freed. To fix, update the relevant R2T accounting stats when aborting active command buffers during queue pair destruction. Sponsored by: Chelsio Communications --- sys/dev/nvmf/nvmf_tcp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/nvmf/nvmf_tcp.c b/sys/dev/nvmf/nvmf_tcp.c index 80c75e02c9b5..135c9968d8eb 100644 --- a/sys/dev/nvmf/nvmf_tcp.c +++ b/sys/dev/nvmf/nvmf_tcp.c @@ -1553,6 +1553,7 @@ tcp_free_qpair(struct nvmf_qpair *nq) for (u_int i = 0; i < qp->num_ttags; i++) { cb = qp->open_ttags[i]; if (cb != NULL) { + cb->tc->active_r2ts--; cb->error = ECONNABORTED; tcp_release_command_buffer(cb); } @@ -1564,6 +1565,10 @@ tcp_free_qpair(struct nvmf_qpair *nq) TAILQ_FOREACH_SAFE(cb, &qp->rx_buffers.head, link, ncb) { tcp_remove_command_buffer(&qp->rx_buffers, cb); mtx_unlock(&qp->rx_buffers.lock); +#ifdef INVARIANTS + if (cb->tc != NULL) + cb->tc->pending_r2ts--; +#endif cb->error = ECONNABORTED; tcp_release_command_buffer(cb); mtx_lock(&qp->rx_buffers.lock); From nobody Tue Jul 30 14:29:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYHfl5jFBz5S46N; Tue, 30 Jul 2024 14:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHfl43Nyz4yvr; Tue, 30 Jul 2024 14:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCC47BREyFBAIsN3Q/SfQIrcJnZef3IqpS2s0NaUmxw=; b=kS4/ltHPb2HuB7HV8vGIdCffO+vFCam3oDslUFz3LjfJIceAXTDpLnxW4vpUQtUqfG0kap N+3bq1Ips7V2aHaAoM+Wuky5a53QpCzhZLMkUs+WQvGCRRiLDwoAf4/b+ygS3RD4gRDJLG pAqW+zgRKPZFHX2c4RUEFdxOmLBDjUynH3DuUm/uR0+u6W+N52p817ytI8n0zU5AlRg9Fc MUg4dqJfQAHRdSG5XnN1OwR2VyWRlga5qwa3DM04BCcD0NSUA9yzz2FyASQ9Ak3KTDFhj2 LyWrRvDqApkQOl5FyV9PZ3GVJv3W6EXcJSzqGF4Lk34Z5T/koz2XY0PztO6koQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722349759; a=rsa-sha256; cv=none; b=bKIzYT6wj4CvGeLVXxCg5CqOJ74KiimjoUq0D1QTPbnn+UX6QJH1mn5d3Sk1GmtK8UJONh C/jeLgXgvESvXFcC9JzckSZeth7JSPxVBFAs8y370E0xDn//C+8F3bqq33yFyX2exaTxWx BsIHAigQDo+yMvywXw+1Mk+llLLwNeGWs3SQq/i5pk5TmOaoRVzmFxXMIzfOiJen4Yrb/3 6DML672S+/d8rwFJ2YU7nSmFydlBm+H5XGUc07J4pyB8aU9WTmvFV2QToJ76LBUI/QKSLT W8q0a/CIHkMtmCgY12IW7mbH159eY1rdxwK6cf68hBypKHHJCZO0NbvezHT6Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCC47BREyFBAIsN3Q/SfQIrcJnZef3IqpS2s0NaUmxw=; b=hrjBo8qtpgY8QhiaS/3Eg3dHuHtDm/+QUr1qHYnci/6pFYwvvo73FLSForgzbET7jvDNBA P8mFoU2yRbruOMM9Zcfi1PS8nfUS4tJJO+vSHALEvGIcojbaeRtDQfIpTMg0LqH2CgGn0z 9WLMT8iet3CzFTGX9ln5vI15ilYoav7FBNau39V1LYpaeDbzkDcLniWCH0G4SNCO5gI890 1woAt9ZjyJNYblp1DduW/Obu9cqrn+JDpPlTRnsUKJ+MAsD5dZgCpxDLn1ZOmW8CMqjukL u7jkGie88TDZKjxa4TddXGJNi/mZ6yvT+Mi0hYh2xRbFqxP8/QpGDWx7bvwG8w== 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 4WYHfl3g6fzLqP; Tue, 30 Jul 2024 14:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UETJZn029614; Tue, 30 Jul 2024 14:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UETJ9d029611; Tue, 30 Jul 2024 14:29:19 GMT (envelope-from git) Date: Tue, 30 Jul 2024 14:29:19 GMT Message-Id: <202407301429.46UETJ9d029611@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: 6df040ea6e4a - main - nvmf_tcp: Avoid setting some unused parameters in tcp_allocate_qpair List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6df040ea6e4a533d4010b810c8aa74a3c3979d9a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6df040ea6e4a533d4010b810c8aa74a3c3979d9a commit 6df040ea6e4a533d4010b810c8aa74a3c3979d9a Author: John Baldwin AuthorDate: 2024-07-30 14:27:47 +0000 Commit: John Baldwin CommitDate: 2024-07-30 14:27:47 +0000 nvmf_tcp: Avoid setting some unused parameters in tcp_allocate_qpair Specifically, some parameters only apply to either controller or host queue pairs but not both. Sponsored by: Chelsio Communications --- sys/dev/nvmf/nvmf_tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvmf/nvmf_tcp.c b/sys/dev/nvmf/nvmf_tcp.c index 6c84a40611c3..80c75e02c9b5 100644 --- a/sys/dev/nvmf/nvmf_tcp.c +++ b/sys/dev/nvmf/nvmf_tcp.c @@ -1450,12 +1450,13 @@ tcp_allocate_qpair(bool controller, qp->header_digests = params->tcp.header_digests; qp->data_digests = params->tcp.data_digests; qp->maxr2t = params->tcp.maxr2t; - qp->maxh2cdata = params->tcp.maxh2cdata; + if (controller) + qp->maxh2cdata = params->tcp.maxh2cdata; qp->max_tx_data = tcp_max_transmit_data; if (!controller) { qp->max_tx_data = min(qp->max_tx_data, params->tcp.maxh2cdata); + qp->max_icd = params->tcp.max_icd; } - qp->max_icd = params->tcp.max_icd; if (controller) { /* Use the SUCCESS flag if SQ flow control is disabled. */ From nobody Tue Jul 30 14:29:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYHfp1P0cz5S4Fd; Tue, 30 Jul 2024 14:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHfn67QNz4ysL; Tue, 30 Jul 2024 14:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hb9OVzmH8f+4jUlnDBSBWTYql1fqmv6p6nIXE/WvMXc=; b=xzIEb+GD16yioBgtkNEX89lPHNPFKHw5fPpdnScsVC37U0MduBnx9niu6pPwu4PV+ovyGX W22y/8lfXmQBvQA2jm2jfnVBEZH94JMoNxiaqOkzoe7/8uV587hZdYu/CM0X4tgBbcmESY koMVBf04SVF+wZWR2Pi+xst7ZTMifqvGRMa6EUL/u6UWZ+wB51ycV5oeWAC265nMSvBz1L yD7Pm37sx5bYeC1U5YPWpJd3YBcqqrylQ21QaVjxxRLqB/c23VEryaid0EM/V942BK5pIs eswZbMsuy/cO+oE1qFPAh+xChAkQ2N+truY3Tc2feA5YKzYgfpqxmgsi8qhmOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722349761; a=rsa-sha256; cv=none; b=Ie872FrdxGiKfUkkwtxPR9HUK4FGfpvIKg7a4Nk7RvLkpJuc5rFJZLcTF/IsyNE47GrpUd bWQkm7BWc+5ThyVMcjgef3T2MY2W4DL/fN2cqNcZBAeiZchf1djvI6OLAmeZKE0FC5gmQd 60jCFxbkcf8K43zFTlODyarpWEbnyxQIhS9jBHxCZEMir0+ZGUxs6LipJcm3WWcbsksMA+ lNfT/TFEJiHPYQiKtVMB+HwsgcLaeZMaxU3q7YmW/2gJx1hLU/YigULYocUMtdOOlXnAN7 SFRmBHMVBjC4Hmj54G61+Hb+0SsQYiqvIPLQO24y6z5jnUp2jD3UFRCYy52/kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hb9OVzmH8f+4jUlnDBSBWTYql1fqmv6p6nIXE/WvMXc=; b=dQbixvHWjPu7VLGtFHm4X3ysNbmFoPFqhs0dLssOWbxEYEnmU+E8l2/dwKsHwXWc6T226Q xQi0loJdoS9iFv8PjD3ypzNX/x/e1Ts5/vscv2wGJNp5tkSmN1aTaOYaTh2WzolhfUtGTU JrmbBduCSvOLfjCrS/A2OeYIpVvbc5FXbPjYWKDmzmuiid+S8XuCurM6v0l92I0Ynjiq2A CBv7LYAQGSeXZTllDo8KdbQRva5ljvUn3nGlmv+3r6Z9hz7JWg96r/xXZ+tUuQ+wS86EiK B3EZ4a34ow1Zd2hCTiujx+FoUe6BOaEcpkucB5ukcNc4LlH1I6BdsHzXHCU20w== 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 4WYHfn5jLMzKtT; Tue, 30 Jul 2024 14:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UETLxK029724; Tue, 30 Jul 2024 14:29:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UETLei029721; Tue, 30 Jul 2024 14:29:21 GMT (envelope-from git) Date: Tue, 30 Jul 2024 14:29:21 GMT Message-Id: <202407301429.46UETLei029721@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: 8ebacb9daa9e - main - nvmf_tcp: Correct calculation of number of TTAGs to allocate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8ebacb9daa9ee3f3b6beed56477024009b84edc1 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8ebacb9daa9ee3f3b6beed56477024009b84edc1 commit 8ebacb9daa9ee3f3b6beed56477024009b84edc1 Author: John Baldwin AuthorDate: 2024-07-30 14:28:54 +0000 Commit: John Baldwin CommitDate: 2024-07-30 14:28:54 +0000 nvmf_tcp: Correct calculation of number of TTAGs to allocate The increment of 1 was intended to convert qp->maxr2t from 0's based to 1 based before multiplying by the queue length. Sponsored by: Chelsio Communications --- sys/dev/nvmf/nvmf_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvmf/nvmf_tcp.c b/sys/dev/nvmf/nvmf_tcp.c index 135c9968d8eb..67d239b63faf 100644 --- a/sys/dev/nvmf/nvmf_tcp.c +++ b/sys/dev/nvmf/nvmf_tcp.c @@ -1464,7 +1464,7 @@ tcp_allocate_qpair(bool controller, /* NB: maxr2t is 0's based. */ qp->num_ttags = MIN((u_int)UINT16_MAX + 1, - (uint64_t)params->qsize * (uint64_t)qp->maxr2t + 1); + (uint64_t)params->qsize * ((uint64_t)qp->maxr2t + 1)); qp->open_ttags = mallocarray(qp->num_ttags, sizeof(*qp->open_ttags), M_NVMF_TCP, M_WAITOK | M_ZERO); } From nobody Tue Jul 30 14:39:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYHtW3kBkz5S55y; Tue, 30 Jul 2024 14:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHtW36JTz52wt; Tue, 30 Jul 2024 14:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722350371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KUO0Uyi+2qBj/YW5RySHERmOpNpI7eTVX8gbfwi3kbc=; b=SniokgihrB+7v1Wxnz9ope5vYEUfGtHRDNhqymyWXm6eNsqxB0Ctdpwa1GI4yCCoeGxW5b ryM229Z6UWpudiFV5RWK/occoWN1oiYQA+XxD+IIM4Vc1/WeiOyA4mW1sZdB9yzLt0aHkn iGnS3xfnU7bU4XIO/G4be5ZrKOeZ2LyRBdC6gAgSa2L+fq2+hoBXuVhmprGRd7ETgV9Ol9 1uoOCE0S02mSrE7CDddfjI6x/Fae2ejmUAdg5YvK7juAClAni4Uielw/kdoDfMTcqbvk2g 75QMndZKeMKfx+GvrJto2r9uE4lxt32YRFl1f/eOUvxDLLDOGtRgLDkCxMwSmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722350371; a=rsa-sha256; cv=none; b=G1IRvPWlp8d7U6k83ug4jC02MiWrPb3IESCj0jJ6xI+mtVCS4rTioWzamfrH+ULOS/CT0H KAj6XbWC3HM8y0K3eZ6tOVEiQeUeJoYUHhjt5+d27kfspab2A1/wEX5pmAVTd+Qu/yJwiu ayN1UjqwmtJEjpzP3NcLJRC58EGHZ4PD6ZDEdbbL3Ups9RwDypi+5qoQVFsOICpxcfk1fr NtpqP+t582erjrdVkpcubdqvkg3daoRaHZH8bujkgvI97/Q/yFh1FI9MYZ9qpPFTwD/iKO JOjSV2djb7zklwyP1mQNuIQMUA7VCI+IwK4x6T7O/lF2soCVPtiu2Sjp5fJ4cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722350371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KUO0Uyi+2qBj/YW5RySHERmOpNpI7eTVX8gbfwi3kbc=; b=pK/oOjGBkL+X5iXaH37gjGViS6isQWCA1gmUn5muuX6oTGpm9tHDuMJzGII0B2tJBjx/32 0DGNQLyQLRBC0c9cbHOFPMkKkkybEccvducbesph+U8aGGloTEDpRBG1BtjyEH4Uom32yc 7w1sprYjdpScNLqmMuDpjE0aX33X6hQQal6QMwBQ4EnNp3IpC2DFz7rQCqGojn2vciIVbr mskFAdNIq6M41l2hPGv+VgLqvau2x3xEm6ki2OH684EluDySDZpfDezikvCXPEhtxS2U2H BpIkuuhPw00ZbEvgeKH6PT8GQpyx/fNMiHcdNR2g6lEczhEOo2JUTluhCTOREA== 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 4WYHtW2jwpzLgW; Tue, 30 Jul 2024 14:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UEdVRF046220; Tue, 30 Jul 2024 14:39:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UEdVU1046217; Tue, 30 Jul 2024 14:39:31 GMT (envelope-from git) Date: Tue, 30 Jul 2024 14:39:31 GMT Message-Id: <202407301439.46UEdVU1046217@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: 177624f2f425 - main - intr: Remove dead code from intr_event_remove_handler() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 177624f2f425901bb241789d639a16bded2247ae Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=177624f2f425901bb241789d639a16bded2247ae commit 177624f2f425901bb241789d639a16bded2247ae Author: Mark Johnston AuthorDate: 2024-07-30 14:35:53 +0000 Commit: Mark Johnston CommitDate: 2024-07-30 14:35:53 +0000 intr: Remove dead code from intr_event_remove_handler() We currently destroy the ithread in intr_event_destroy(). In preparation for fixing a bug there, remove this dead code and reorganize a bit to avoid some code duplication. No functional change intended. Reviewed by: kib, jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45490 --- sys/kern/kern_intr.c | 64 ++++++++++++++++------------------------------------ 1 file changed, 19 insertions(+), 45 deletions(-) diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 7a57d964acd9..6ccf758ae266 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -851,9 +851,6 @@ intr_event_remove_handler(void *cookie) struct intr_event *ie; struct intr_handler *ih; struct intr_handler **prevptr; -#ifdef notyet - int dead; -#endif if (handler == NULL) return (EINVAL); @@ -874,53 +871,30 @@ intr_event_remove_handler(void *cookie) "interrupt event \"%s\"", handler->ih_name, ie->ie_name); } - /* - * If there is no ithread, then directly remove the handler. Note that - * intr_event_handle() iterates ie_handlers in a lock-less fashion, so - * care needs to be taken to keep ie_handlers consistent and to free - * the removed handler only when ie_handlers is quiescent. - */ if (ie->ie_thread == NULL) { + /* + * If there is no ithread, then directly remove the handler. + * Note that intr_event_handle() iterates ie_handlers in a + * lock-less fashion, so care needs to be taken to keep + * ie_handlers consistent and to free the removed handler only + * when ie_handlers is quiescent. + */ CK_SLIST_REMOVE_PREVPTR(prevptr, ih, ih_next); intr_event_barrier(ie); - intr_event_update(ie); - mtx_unlock(&ie->ie_lock); - free(handler, M_ITHREAD); - return (0); + } else { + /* + * Let the interrupt thread do the job. The interrupt source is + * disabled when the interrupt thread is running, so it does not + * have to worry about interaction with intr_event_handle(). + */ + KASSERT((handler->ih_flags & IH_DEAD) == 0, + ("duplicate handle remove")); + handler->ih_flags |= IH_DEAD; + intr_event_schedule_thread(ie, NULL); + while (handler->ih_flags & IH_DEAD) + msleep(handler, &ie->ie_lock, 0, "iev_rmh", 0); } - - /* - * Let the interrupt thread do the job. - * The interrupt source is disabled when the interrupt thread is - * running, so it does not have to worry about interaction with - * intr_event_handle(). - */ - KASSERT((handler->ih_flags & IH_DEAD) == 0, - ("duplicate handle remove")); - handler->ih_flags |= IH_DEAD; - intr_event_schedule_thread(ie, NULL); - while (handler->ih_flags & IH_DEAD) - msleep(handler, &ie->ie_lock, 0, "iev_rmh", 0); intr_event_update(ie); - -#ifdef notyet - /* - * XXX: This could be bad in the case of ppbus(8). Also, I think - * this could lead to races of stale data when servicing an - * interrupt. - */ - dead = 1; - CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) { - if (ih->ih_handler != NULL) { - dead = 0; - break; - } - } - if (dead) { - ithread_destroy(ie->ie_thread); - ie->ie_thread = NULL; - } -#endif mtx_unlock(&ie->ie_lock); free(handler, M_ITHREAD); return (0); From nobody Tue Jul 30 14:39:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYHtX4g5jz5S563; Tue, 30 Jul 2024 14:39: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHtX473Hz52wy; Tue, 30 Jul 2024 14:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722350372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQRMms8C1gM+/C2Skf6NCyGzDnWTSeolLNX6zqRCPSU=; b=R09bm1781GsRRmq4T/nap2LhGjZSBpj1JJZb+QP91BJHEeT6990GvWnzMSl3Mjd2envHtz m0f5lkRjfsjL6WXVIVpu9C7a4uJjiTzROXEtxcRYUI4/gxcbblbj7C8vnGkhq4EjX2Tdui ssfvfspNszXdeqE9hsxY/yXh5nW6JrvwQvZ52krVY8eFiyb4l5e4TVSkQP/Cu/JGphFPCk 8EfdKq4ckm3Iq2maJBY2mvU75KJIKQaQeMxwivUhEmxGX23Zi1PI2dQlrh+L9ZyK68dM1G MI3t5bf+Qg6bpXVoDL76AnD1uyIC8YiiuiBCjYOYKlO43T0Og48rR3ngrZutQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722350372; a=rsa-sha256; cv=none; b=kXPUORdWbNsas9WbMe/GTW4GemjHiiU608z5ZCL8GCSWN3X2cRn6+lDzt4JfzwglaK7Ks/ aDAzmA39lFcfqT4Yup1oL/tSzPpvwSDpTEt2sF4AUE9Ye151gpBKJf7fwNS5TpSlJVhASg isk+JVJG2SlTTpQ92sPmoIZgU9YlKvYDrTZxycMvp72ORdxMIooDTw8tMBglESyZxjaxa4 77CH33Fg+xmqrsF+T6jrJuQh4lOdSCLCXWs1mYLXw2FWqiK7MZGWY2p7E4bYV8t5XEKdwk CQRUeIt87nEaZH9PWL1IoDYVbVMJcT6d/zSRONFWrAZ2eC10GfL6yhNredg96g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722350372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQRMms8C1gM+/C2Skf6NCyGzDnWTSeolLNX6zqRCPSU=; b=lr1suEluLPMPHwTE3pZLt8es3nfWuy6oOBZN+NU1F45Voo7LMzaZh/4fRLeRvu7fu9V01K tswlmNf/0351Dxefi9t5yNSoZjdabTqkFGuoZvLIAul872V5heLNUVtMuegSw4VbHg/Ml8 vBc5ttx4vAZDw0pOT8C8JMgifpl9K7HbPCUZU39++DrZF7UsEnhE3gf2CxnqZYzuTrtUrP O4bM9WueGA5OpLv5MRzM/ir7HvC5JdDfnlVW3+Y5TDdsiBwbx667XE+OigSxJUjhCHDAGL LG9gyZg+QECy0/bJrZ/+2U/EtBm+Wc2N/LJr6yMhwbP4Rno5HXA4YHbNDSlFqg== 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 4WYHtX3jVqzLgX; Tue, 30 Jul 2024 14:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UEdWdR046265; Tue, 30 Jul 2024 14:39:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UEdW0B046262; Tue, 30 Jul 2024 14:39:32 GMT (envelope-from git) Date: Tue, 30 Jul 2024 14:39:32 GMT Message-Id: <202407301439.46UEdW0B046262@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: c122d7ffad5e - main - ithread: Annotate a branch in ithread_execute_handlers() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: c122d7ffad5efb31e1aa5035cb1a26ad2e479074 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c122d7ffad5efb31e1aa5035cb1a26ad2e479074 commit c122d7ffad5efb31e1aa5035cb1a26ad2e479074 Author: Mark Johnston AuthorDate: 2024-07-30 14:36:35 +0000 Commit: Mark Johnston CommitDate: 2024-07-30 14:37:26 +0000 ithread: Annotate a branch in ithread_execute_handlers() No functional change intended. Reviewed by: kib, jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45491 --- sys/kern/kern_intr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 6ccf758ae266..a4ec45d0c4f8 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -1203,8 +1203,9 @@ ithread_execute_handlers(struct proc *p, struct intr_event *ie) * number of back to back interrupts exceeds the storm threshold, * then enter storming mode. */ - if (intr_storm_threshold != 0 && ie->ie_count >= intr_storm_threshold && - !(ie->ie_flags & IE_SOFT)) { + if (__predict_false(intr_storm_threshold != 0 && + ie->ie_count >= intr_storm_threshold && + (ie->ie_flags & IE_SOFT) == 0)) { /* Report the message only once every second. */ if (ppsratecheck(&ie->ie_warntm, &ie->ie_warncnt, 1)) { printf( From nobody Tue Jul 30 14:39:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYHtY6vKNz5S51G; Tue, 30 Jul 2024 14:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHtY4nvVz5303; Tue, 30 Jul 2024 14:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722350373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2lXj28LtMNECdvdjmor8BlVn6Jx24VQgFkysJsyStQU=; b=qCwCBX2eeZRUexz3MnQ77aSEvMoxtSZs8tIuCnNICJdd/PWizW90wQjVjblbpN7dRdRaLP didCJAzUEEc8DOuy2e5DC67l6S11khfdhB5OfwYAcNnkzPWVYCmqIUB6dJ7pFobp4SJiL1 pEO6TWeFmfqR8TlYcT4c9FRd2t7peKb+QoSRFUWB+lH+nXypvANNiGtBQQuws4DiDGes2Y 2vGs4k6FrbJ77XgxPzzB9h3RI4bf6mPWoFA70w0RWTlwelhVHEQWBql8NvOLItwioS0bZt VesYOTzkGSP17zufj89OXdVcmCwRyTCo59nUc0rfWxP741gUJMU+ymi9RTp6Dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722350373; a=rsa-sha256; cv=none; b=PF/th4bcPLGjorZEKkOFBz0edFhlrAmI2w+5EdzNyrYkr9pCUtMUq8+fW1V0xCsTtnjka0 94hOBKQNjdEHMRCfCwUrmVRrqp5fyulgRJyyMNTETHKH0T7POaFXA1Tq1/RkKJYuQGwjh0 ZmwXFvniGkuWtfz506iUiyV0vqbtO13N5YG4hCG+R1qNifbnCXLOjR5McgbLiIRRBCX1Mx mSfFnjuM82I3XwnPq8YfXR7pptM2a9dz1JOl3CYLFFyZDM/GeOBSzPi36aatVgGXPVx3nd tWA6vacZVLn9giGBB+DdyVS5ETlrHcN5IssFDdIqNbZZLG1v+8yYhrnnqJWdMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722350373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2lXj28LtMNECdvdjmor8BlVn6Jx24VQgFkysJsyStQU=; b=QQDg1Dfx2YhYtIx/1fOJIPSY6SBXhZm+wKlsZZUen1TiguvCrbzZZki0oBknPjEnLoaMOx xBU1lUf1bHAg+S21vtXsGkGAUR7dBZlDUZgrHBs2YMCTv8Rjdl1Mc53UMZxcSSyqUdmC21 8EepwNGmmCxs/PDqm4Pq4uo3MdOKOt6fb234X64whtuu13n4OFLJAAZHC33KMMuXMFtnA0 Jp0DXxFVHZlr/lWW/yOhwU6C4j0L8OgHA00G3UUYoa9WHwWefDC8iRwlOAirjtJDRkQmFZ TpSpjU9UAnNAGKRzuGuGtHsPLlQQ94r4L5azS4cd6nPGe2rqQSNojEpzu4aewA== 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 4WYHtY4QGyzM85; Tue, 30 Jul 2024 14:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UEdXZO046307; Tue, 30 Jul 2024 14:39:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UEdXOh046304; Tue, 30 Jul 2024 14:39:33 GMT (envelope-from git) Date: Tue, 30 Jul 2024 14:39:33 GMT Message-Id: <202407301439.46UEdXOh046304@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: 8381e9f49ec7 - main - ithread: Improve synchronization in ithread_destroy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8381e9f49ec733437754a822ef2e8344115289ac Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8381e9f49ec733437754a822ef2e8344115289ac commit 8381e9f49ec733437754a822ef2e8344115289ac Author: Mark Johnston AuthorDate: 2024-07-30 14:36:54 +0000 Commit: Mark Johnston CommitDate: 2024-07-30 14:37:32 +0000 ithread: Improve synchronization in ithread_destroy() Previously, to destroy an ithread we would set IT_DEAD in its flags, and then wake it up if it wasn't already running. After doing this, intr_event_destroy() would free the intr_event structure. However, it did not wait for the ithread to exit, so it was possible for the ithread to access the intr_event after it was freed. This use-after-free happens readily when running the pf tests in parallel, since they frequently create and destroy VNET jails, and pf registers several VNET-local swi handlers. Fix the race by modifying ithread_destroy() to wait until the ithread has signaled that it is about to exit by setting ie->ie_thread = NULL. Existing callers of intr_event_destroy() are allowed to sleep. Reported by: KASAN Reviewed by: kib, jhb MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D45492 --- sys/kern/kern_intr.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index a4ec45d0c4f8..ad0cc135167e 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -541,14 +541,10 @@ intr_event_destroy(struct intr_event *ie) return (EBUSY); } TAILQ_REMOVE(&event_list, ie, ie_list); -#ifndef notyet - if (ie->ie_thread != NULL) { + mtx_unlock(&event_lock); + if (ie->ie_thread != NULL) ithread_destroy(ie->ie_thread); - ie->ie_thread = NULL; - } -#endif mtx_unlock(&ie->ie_lock); - mtx_unlock(&event_lock); mtx_destroy(&ie->ie_lock); free(ie, M_ITHREAD); return (0); @@ -581,10 +577,16 @@ ithread_create(const char *name) static void ithread_destroy(struct intr_thread *ithread) { + struct intr_event *ie; struct thread *td; - CTR2(KTR_INTR, "%s: killing %s", __func__, ithread->it_event->ie_name); td = ithread->it_thread; + ie = ithread->it_event; + + mtx_assert(&ie->ie_lock, MA_OWNED); + + CTR2(KTR_INTR, "%s: killing %s", __func__, ie->ie_name); + thread_lock(td); ithread->it_flags |= IT_DEAD; if (TD_AWAITING_INTR(td)) { @@ -592,6 +594,8 @@ ithread_destroy(struct intr_thread *ithread) sched_wakeup(td, SRQ_INTR); } else thread_unlock(td); + while (ie->ie_thread != NULL) + msleep(ithread, &ie->ie_lock, 0, "ithd_dth", 0); } int @@ -1235,7 +1239,7 @@ ithread_loop(void *arg) struct intr_event *ie; struct thread *td; struct proc *p; - int wake, epoch_count; + int epoch_count; bool needs_epoch; td = curthread; @@ -1245,7 +1249,6 @@ ithread_loop(void *arg) ("%s: ithread and proc linkage out of sync", __func__)); ie = ithd->it_event; ie->ie_count = 0; - wake = 0; /* * As long as we have interrupts outstanding, go through the @@ -1255,9 +1258,14 @@ ithread_loop(void *arg) /* * If we are an orphaned thread, then just die. */ - if (ithd->it_flags & IT_DEAD) { + if (__predict_false((ithd->it_flags & IT_DEAD) != 0)) { CTR3(KTR_INTR, "%s: pid %d (%s) exiting", __func__, p->p_pid, td->td_name); + mtx_lock(&ie->ie_lock); + ie->ie_thread = NULL; + wakeup(ithd); + mtx_unlock(&ie->ie_lock); + free(ithd, M_ITHREAD); kthread_exit(); } @@ -1302,17 +1310,12 @@ ithread_loop(void *arg) TD_SET_IWAIT(td); ie->ie_count = 0; mi_switch(SW_VOL | SWT_IWAIT); - } else { - if (ithd->it_flags & IT_WAIT) { - wake = 1; - ithd->it_flags &= ~IT_WAIT; - } + } else if ((ithd->it_flags & IT_WAIT) != 0) { + ithd->it_flags &= ~IT_WAIT; thread_unlock(td); - } - if (wake) { wakeup(ithd); - wake = 0; - } + } else + thread_unlock(td); } } From nobody Tue Jul 30 15:00:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYJM75S73z5RNLn; Tue, 30 Jul 2024 15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYJM74yyYz57Vh; Tue, 30 Jul 2024 15: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=1722351651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0xwjEkmLHBSHW+8nL/zHWIbvbUq3PC1LCJ9RAvY8zc=; b=Wg0KAolxDwFxAA1oUEmzKxHg0nK+Y+ntBhiBmYSv/vmCXehcPbp/Ff8+KbNQ7HhGqubwTY V41nI4R9FTsUy+QqRUJQ5NOsmULHV7fiqbfvXZZ0tAWuuLnleGdkSHh91agTvuU/mtOPoA JyQozJGmE7mDQPXC/d4CE41Q40jN4Gkl+cayovQ6PfVZoHFF5qhflQttIo4iZiLECPYv6L 38NjadTLF3VGj21qGjoWIiYKrBfbIWK0DkfaZzVm5ltLp4Od5ZR/WyBBfN/8fytBMh6Ysi APU9uVN3RwHIV/c+SJczKL3K3Bh9POypKe9zz7iNiMLXTd9j5xpKQVbeKCUauA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722351651; a=rsa-sha256; cv=none; b=hsCSE702GBPiyayWbl9/7VRwrKD4vp1fueq8kQZEFaGvaE3mswD5kiOsAwMCPmIOU81wiz o6XqojvkQ04tw7spxjDmybwDvKHTulaeuche5zxPh9LNaKM5D0gDL28cl/VAPgPJ84crui JFvI8RvcBgeisG64eEKUkWzJ4TuMf/zdaD3q2KRa7NUTpYNlc7DRiSjBFkrhuMIeOSc0La e9QWPIdCSC0YrzIkGaeCypXVXTQhYoMBC+lGXz3TcDvXp272zJIvtPe7/LEM0IOlQ9/ZhK Qqlumh5Swqlnq6oKxf+h/hriJptpHT52pgeW7rt8HEFZ3DmRRGHWF7XHXDmP7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722351651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0xwjEkmLHBSHW+8nL/zHWIbvbUq3PC1LCJ9RAvY8zc=; b=qTkYtr/suJGfp13vxQWwOwv0E+gdsBkphTekQJzRP26yIzHJVrNtJ3qdR0nADVhUI+feU1 SmewAgryNcHoPoe6pZyZZna43SYKCW8BKcK/+7fSbGfWwCJuU+BgXEZBh/BwGmwAql+2uh n6xPiB9LOKzs1tTVmWgPdWn9XIoWIAlARCw7H6tuW8rTOSdr5fRc3hI7qbYAPKfz2VD2fo 0yIOudHEi0n0kk2yW4kYsSHDRTWrHLvZ85wSKANGt/rdanoXZIf1BwN5Ni3TUKxckYu54/ zdRula8LFGcb83k7haOpdn/hUbX0Rw9i8KinGjZJrXlhzTg5b2DYXvh+CphwIg== 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 4WYJM74ZHrzMwM; Tue, 30 Jul 2024 15:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UF0pIM092291; Tue, 30 Jul 2024 15:00:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UF0pL9092288; Tue, 30 Jul 2024 15:00:51 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:00:51 GMT Message-Id: <202407301500.46UF0pL9092288@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: 65f264dcf737 - main - ipsec_offload: indirect two more functions on the ipsec.ko module load List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 65f264dcf7374d71781cebf4c7c84bc312e33352 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=65f264dcf7374d71781cebf4c7c84bc312e33352 commit 65f264dcf7374d71781cebf4c7c84bc312e33352 Author: Konstantin Belousov AuthorDate: 2024-07-23 07:20:10 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-30 14:59:49 +0000 ipsec_offload: indirect two more functions on the ipsec.ko module load Specifically, ipsec_accel_on_ifdown() and ipsec_accel_drv_sa_lifetime_update() should be present in kernel for future mlx5en driver to be statically linkable into the kernel built with IPSEC_HOOKS + IPSEC_OFFLOAD. Sponsored by: NVIDIA networking --- sys/netipsec/ipsec_offload.c | 16 ++++++++++++---- sys/netipsec/ipsec_offload.h | 3 +++ sys/netipsec/key.c | 27 +++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c index 8ccae7a94f2a..984134539d8b 100644 --- a/sys/netipsec/ipsec_offload.c +++ b/sys/netipsec/ipsec_offload.c @@ -151,6 +151,9 @@ static void ipsec_accel_sa_recordxfer(struct secasvar *sav, struct mbuf *m); static void ipsec_accel_sync_imp(void); static bool ipsec_accel_is_accel_sav_impl(struct secasvar *sav); static struct mbuf *ipsec_accel_key_setaccelif_impl(struct secasvar *sav); +static void ipsec_accel_on_ifdown_impl(struct ifnet *ifp); +static void ipsec_accel_drv_sa_lifetime_update_impl(struct secasvar *sav, + if_t ifp, u_int drv_spi, uint64_t octets, uint64_t allocs); static void ipsec_accel_init(void *arg) @@ -167,6 +170,9 @@ ipsec_accel_init(void *arg) ipsec_accel_sync_p = ipsec_accel_sync_imp; ipsec_accel_is_accel_sav_p = ipsec_accel_is_accel_sav_impl; ipsec_accel_key_setaccelif_p = ipsec_accel_key_setaccelif_impl; + ipsec_accel_on_ifdown_p = ipsec_accel_on_ifdown_impl; + ipsec_accel_drv_sa_lifetime_update_p = + ipsec_accel_drv_sa_lifetime_update_impl; pctrie_init(&drv_spi_pctrie); } SYSINIT(ipsec_accel_init, SI_SUB_VNET_DONE, SI_ORDER_ANY, @@ -183,6 +189,8 @@ ipsec_accel_fini(void *arg) ipsec_accel_sync_p = NULL; ipsec_accel_is_accel_sav_p = NULL; ipsec_accel_key_setaccelif_p = NULL; + ipsec_accel_on_ifdown_p = NULL; + ipsec_accel_drv_sa_lifetime_update_p = NULL; ipsec_accel_sync_imp(); clean_unrhdr(drv_spi_unr); /* avoid panic, should go later */ clear_unrhdr(drv_spi_unr); @@ -784,8 +792,8 @@ ipsec_accel_on_ifdown_sp(struct ifnet *ifp) free(marker, M_IPSEC_MISC); } -void -ipsec_accel_on_ifdown(struct ifnet *ifp) +static void +ipsec_accel_on_ifdown_impl(struct ifnet *ifp) { ipsec_accel_on_ifdown_sp(ifp); ipsec_accel_on_ifdown_sav(ifp); @@ -949,8 +957,8 @@ ipsec_accel_sa_lifetime_update(struct seclifetime *lft_c, lft_c->usetime = min(lft_c->usetime, lft_l->usetime); } -void -ipsec_accel_drv_sa_lifetime_update(struct secasvar *sav, if_t ifp, +static void +ipsec_accel_drv_sa_lifetime_update_impl(struct secasvar *sav, if_t ifp, u_int drv_spi, uint64_t octets, uint64_t allocs) { struct epoch_tracker et; diff --git a/sys/netipsec/ipsec_offload.h b/sys/netipsec/ipsec_offload.h index 27b9c938832e..72055a110951 100644 --- a/sys/netipsec/ipsec_offload.h +++ b/sys/netipsec/ipsec_offload.h @@ -61,6 +61,9 @@ extern int (*ipsec_accel_sa_lifetime_op_p)(struct secasvar *sav, extern void (*ipsec_accel_sync_p)(void); extern bool (*ipsec_accel_is_accel_sav_p)(struct secasvar *sav); extern struct mbuf *(*ipsec_accel_key_setaccelif_p)(struct secasvar *sav); +extern void (*ipsec_accel_on_ifdown_p)(struct ifnet *ifp); +extern void (*ipsec_accel_drv_sa_lifetime_update_p)(struct secasvar *sav, + if_t ifp, u_int drv_spi, uint64_t octets, uint64_t allocs); #ifdef IPSEC_OFFLOAD /* diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 38dd2bc5c1a6..149173e0b5f6 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -109,6 +109,9 @@ int (*ipsec_accel_sa_lifetime_op_p)(struct secasvar *sav, void (*ipsec_accel_sync_p)(void); bool (*ipsec_accel_is_accel_sav_p)(struct secasvar *sav); struct mbuf *(*ipsec_accel_key_setaccelif_p)(struct secasvar *sav); +void (*ipsec_accel_on_ifdown_p)(struct ifnet *ifp); +void (*ipsec_accel_drv_sa_lifetime_update_p)(struct secasvar *sav, if_t ifp, + u_int drv_spi, uint64_t octets, uint64_t allocs); #endif #define FULLMASK 0xff @@ -8964,3 +8967,27 @@ ipsec_sahtree_rlock(struct rm_priotracker *sahtree_trackerp) { rm_rlock(&sahtree_lock, sahtree_trackerp); } + +#ifdef IPSEC_OFFLOAD +void +ipsec_accel_on_ifdown(struct ifnet *ifp) +{ + void (*p)(struct ifnet *ifp); + + p = atomic_load_ptr(&ipsec_accel_on_ifdown_p); + if (p != NULL) + p(ifp); +} + +void +ipsec_accel_drv_sa_lifetime_update(struct secasvar *sav, if_t ifp, + u_int drv_spi, uint64_t octets, uint64_t allocs) +{ + void (*p)(struct secasvar *sav, if_t ifp, u_int drv_spi, + uint64_t octets, uint64_t allocs); + + p = atomic_load_ptr(&ipsec_accel_drv_sa_lifetime_update_p); + if (p != NULL) + p(sav, ifp, drv_spi, octets, allocs); +} +#endif From nobody Tue Jul 30 15:00:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYJM91fyLz5RNFg; Tue, 30 Jul 2024 15:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYJM905PRz57b9; Tue, 30 Jul 2024 15:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722351653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3wjhbJQqUHHy0X/R0Lz4EBp7WrmzTUyls2FASRSK0rY=; b=MP9xklypJTxBI4rAorG3K9B+N5ybgdIy0jx4IJsVYvZ/scVJAb+YpsbB2fbMoTH4xA1o5l G9YRFYZJ3BkL5azyRzTDKmjjSlHqpwpKVdHdSs1+VwfY7THfmMX0MafnKj4fAcRHUEZZAS YHKpDStAKaDN4if9/qyyPMVWZR4Qc5mrIZMA+zUNW+eWPmLUm26z965BaTABt+ilAcgpG4 hhCKODOpiOty+19vm2pzWQlwYJFlwLxYqMhkoYwJIp36VkgpoVo2iG1hOX8OXA0fb/75mz K9yrCRikRP0xEdZsHmeuSjERE8I3WDnf9CCfyPRzBLzSJfhwLGbEbtY5fMd9aQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722351653; a=rsa-sha256; cv=none; b=J+QxNnGc6P1vpY4vPDUWS1tO8nhTrvho8J1BSrR1vfQQpeWQvnn5DYGfHvDkAEIdWHDAYd afThBx3v+89KYwG22rpZJg2sPJwv79ok5dxLolzcHwTYH2Do6K4jqMlCWaWNANyX/aS/Hs d7LCOpSEdPREKAHjdM8omIhFGNRWtQzzLHDX1IkPqefdyHfuUM9Efd3k1p758UDVB7no61 lDgbyenDBxjv3PNpYTnsmT0s9BV6nFc0K2slv+7xo4OJfAue0YGqz3HJSVdurpRZJsDatJ uL0ftX1ugXRWKplY7lt2hdzItPXQd+ypZPs0u6OpF7vxRfSOwweV0OoXbGfz3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722351653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3wjhbJQqUHHy0X/R0Lz4EBp7WrmzTUyls2FASRSK0rY=; b=H52HjVgxFo7ee5iw6057oEIDFdWiqxxBgW1av93Qk1ivRRClArrK/TW3Jw8RCEVfHMzlxQ Sa4xybWgZOjqPflLyzNsFD5Z1TYUWZpwMr0Fc/HJizEaF8w2qwjkrrZysTaGznB/Cn/7nR GogimUxMrx5jwFlgU8Of1bMkGfbIlP2vG1eqbTS5DQoZTnr5KSfrGuCAxsokx6ldWW4Usa znrRX8bHnZ/wJ+zB7K9y5X1xzm9PMdu1C3D+QfnGmZfobcBRuoPN1uVrI/aTFq34hHCFx4 R1k2TiukkyB4cpsaYQF/3uPlUQhHRIcWm23Iv+RoF/TnqTcO8qaD32bQJXGsXQ== 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 4WYJM86pMrzMdD; Tue, 30 Jul 2024 15:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UF0qJL092331; Tue, 30 Jul 2024 15:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UF0qGB092328; Tue, 30 Jul 2024 15:00:52 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:00:52 GMT Message-Id: <202407301500.46UF0qGB092328@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: e23731db48ef - main - mlx5en: add IPSEC_OFFLOAD support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e23731db48ef9c6568d4768b1f87d48514339faa Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e23731db48ef9c6568d4768b1f87d48514339faa commit e23731db48ef9c6568d4768b1f87d48514339faa Author: Konstantin Belousov AuthorDate: 2024-07-22 11:31:35 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-30 15:00:04 +0000 mlx5en: add IPSEC_OFFLOAD support Right now, only IPv4 transport mode, with aes-gcm ESP, is supported. Driver also cooperates with NAT-T, and obeys socket policies, which makes IKEd like StrongSwan working. Sponsored by: NVIDIA networking --- sys/conf/files | 20 +- sys/dev/mlx5/cq.h | 6 + sys/dev/mlx5/crypto.h | 36 + sys/dev/mlx5/device.h | 125 +- sys/dev/mlx5/doorbell.h | 6 +- sys/dev/mlx5/driver.h | 7 + sys/dev/mlx5/fs.h | 226 +- sys/dev/mlx5/mlx5_accel/ipsec.h | 346 ++- sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c | 747 ++++++ sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c | 2047 +++++++++++++++ sys/dev/mlx5/mlx5_accel/mlx5_ipsec_offload.c | 486 ++++ sys/dev/mlx5/mlx5_accel/mlx5_ipsec_rxtx.c | 76 + sys/dev/mlx5/mlx5_core/eswitch.h | 8 +- sys/dev/mlx5/mlx5_core/fs_chains.h | 71 + sys/dev/mlx5/mlx5_core/fs_cmd.h | 120 + sys/dev/mlx5/mlx5_core/fs_core.h | 490 ++-- sys/dev/mlx5/mlx5_core/fs_ft_pool.h | 23 + sys/dev/mlx5/mlx5_core/fs_tcp.h | 6 +- sys/dev/mlx5/mlx5_core/mlx5_cmd.c | 3 + sys/dev/mlx5/mlx5_core/mlx5_core.h | 10 + sys/dev/mlx5/mlx5_core/mlx5_crypto.c | 94 + sys/dev/mlx5/mlx5_core/mlx5_eq.c | 11 + sys/dev/mlx5/mlx5_core/mlx5_eswitch.c | 140 +- sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.c | 102 - sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.h | 54 - sys/dev/mlx5/mlx5_core/mlx5_fs_chains.c | 664 +++++ sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c | 1239 ++++++--- sys/dev/mlx5/mlx5_core/mlx5_fs_core.c | 3514 ++++++++++++++++++++++++++ sys/dev/mlx5/mlx5_core/mlx5_fs_counters.c | 2 +- sys/dev/mlx5/mlx5_core/mlx5_fs_ft_pool.c | 85 + sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c | 50 +- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 2874 --------------------- sys/dev/mlx5/mlx5_core/mlx5_fw.c | 6 + sys/dev/mlx5/mlx5_core/mlx5_main.c | 20 +- sys/dev/mlx5/mlx5_core/mlx5_tls.c | 60 - sys/dev/mlx5/mlx5_core/wq.h | 17 + sys/dev/mlx5/mlx5_en/en.h | 22 +- sys/dev/mlx5/mlx5_en/en_hw_tls_rx.h | 2 +- sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 350 ++- sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c | 2 + sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c | 4 +- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 38 +- sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 10 +- sys/dev/mlx5/mlx5_en/mlx5_en_tx.c | 3 + sys/dev/mlx5/mlx5_ib/mlx5_ib.h | 2 +- sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c | 8 +- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 37 +- sys/dev/mlx5/mlx5_ifc.h | 719 ++++-- sys/dev/mlx5/mlx5_lib/aso.h | 92 + sys/dev/mlx5/mlx5_lib/mlx5_aso.c | 428 ++++ sys/dev/mlx5/qp.h | 13 +- sys/dev/mlx5/tls.h | 3 - sys/modules/mlx5/Makefile | 18 +- 53 files changed, 11214 insertions(+), 4328 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 5250b65135e6..6e69c128ee65 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4952,6 +4952,8 @@ dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_crypto.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_diag_cnt.c optional mlx5 pci \ @@ -4962,15 +4964,17 @@ dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eswitch.c optional mlx5 pci \ compile-with "${OFED_C}" -dev/mlx5/mlx5_core/mlx5_fc_cmd.c optional mlx5 pci \ +dev/mlx5/mlx5_core/mlx5_fs_chains.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_fs_core.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_counters.c optional mlx5 pci \ compile-with "${OFED_C}" -dev/mlx5/mlx5_core/mlx5_fs_tcp.c optional mlx5 pci \ +dev/mlx5/mlx5_core/mlx5_fs_ft_pool.c optional mlx5 pci \ compile-with "${OFED_C}" -dev/mlx5/mlx5_core/mlx5_fs_tree.c optional mlx5 pci \ +dev/mlx5/mlx5_core/mlx5_fs_tcp.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fw.c optional mlx5 pci \ compile-with "${OFED_C}" @@ -5012,8 +5016,18 @@ dev/mlx5/mlx5_core/mlx5_vsc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_lib/mlx5_aso.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_lib/mlx5_gid.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c optional mlx5 pci \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_accel/mlx5_ipsec_offload.c optional mlx5 pci \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_accel/mlx5_ipsec.c optional mlx5 pci \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_accel/mlx5_ipsec_rxtx.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_dim.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" diff --git a/sys/dev/mlx5/cq.h b/sys/dev/mlx5/cq.h index 02de7f66e260..cc551e65dead 100644 --- a/sys/dev/mlx5/cq.h +++ b/sys/dev/mlx5/cq.h @@ -111,6 +111,12 @@ struct mlx5_cq_modify_params { } params; }; +enum { + CQE_STRIDE_64 = 0, + CQE_STRIDE_128 = 1, + CQE_STRIDE_128_PAD = 2, +}; + static inline int cqe_sz_to_mlx_sz(u8 size) { return size == 64 ? CQE_SIZE_64 : CQE_SIZE_128; diff --git a/sys/dev/mlx5/crypto.h b/sys/dev/mlx5/crypto.h new file mode 100644 index 000000000000..3b2c4c218ef2 --- /dev/null +++ b/sys/dev/mlx5/crypto.h @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2023, NVIDIA Technologies. 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 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 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 __MLX5_CRYPTO_H__ +#define __MLX5_CRYPTO_H__ + +struct mlx5_core_dev; + +int mlx5_encryption_key_create(struct mlx5_core_dev *, u32 pdn, u32 key_type, + const void *p_key, u32 key_len, u32 *p_obj_id); +int mlx5_encryption_key_destroy(struct mlx5_core_dev *mdev, u32 oid); + +#endif /* __MLX5_CRYPTO_H__ */ diff --git a/sys/dev/mlx5/device.h b/sys/dev/mlx5/device.h index 4b7cf8686794..50995d4f70a7 100644 --- a/sys/dev/mlx5/device.h +++ b/sys/dev/mlx5/device.h @@ -148,12 +148,14 @@ __mlx5_mask16(typ, fld)) tmp; \ }) -#define MLX5_BY_PASS_NUM_REGULAR_PRIOS 8 -#define MLX5_BY_PASS_NUM_DONT_TRAP_PRIOS 8 +#define MLX5_RDMA_RX_NUM_COUNTERS_PRIOS 2 +#define MLX5_RDMA_TX_NUM_COUNTERS_PRIOS 1 +#define MLX5_BY_PASS_NUM_REGULAR_PRIOS 16 +#define MLX5_BY_PASS_NUM_DONT_TRAP_PRIOS 16 #define MLX5_BY_PASS_NUM_MULTICAST_PRIOS 1 #define MLX5_BY_PASS_NUM_PRIOS (MLX5_BY_PASS_NUM_REGULAR_PRIOS +\ - MLX5_BY_PASS_NUM_DONT_TRAP_PRIOS +\ - MLX5_BY_PASS_NUM_MULTICAST_PRIOS) + MLX5_BY_PASS_NUM_DONT_TRAP_PRIOS +\ + MLX5_BY_PASS_NUM_MULTICAST_PRIOS) /* insert a value to a struct */ #define MLX5_VSC_SET(typ, p, fld, v) do { \ @@ -391,6 +393,8 @@ enum { MLX5_OPCODE_UMR = 0x25, MLX5_OPCODE_QOS_REMAP = 0x2a, + MLX5_OPCODE_ACCESS_ASO = 0x2d, + MLX5_OPCODE_SIGNATURE_CANCELED = (1 << 15), }; @@ -567,6 +571,11 @@ struct mlx5_eqe_vport_change { __be32 rsvd1[6]; }; +struct mlx5_eqe_obj_change { + u8 rsvd0[2]; + __be16 obj_type; + __be32 obj_id; +}; #define PORT_MODULE_EVENT_MODULE_STATUS_MASK 0xF #define PORT_MODULE_EVENT_ERROR_TYPE_MASK 0xF @@ -638,6 +647,7 @@ union ev_data { struct mlx5_eqe_dct dct; struct mlx5_eqe_temp_warning temp_warning; struct mlx5_eqe_xrq_err xrq_err; + struct mlx5_eqe_obj_change obj_change; } __packed; struct mlx5_eqe { @@ -703,7 +713,12 @@ struct mlx5_cqe64 { u8 l4_hdr_type_etc; __be16 vlan_info; __be32 srqn; /* [31:24]: lro_num_seg, [23:0]: srqn */ - __be32 imm_inval_pkey; + union { + __be32 immediate; + __be32 inval_rkey; + __be32 pkey; + __be32 ft_metadata; + }; u8 rsvd40[4]; __be32 byte_cnt; __be64 timestamp; @@ -919,6 +934,7 @@ enum { MLX5_MATCH_OUTER_HEADERS = 1 << 0, MLX5_MATCH_MISC_PARAMETERS = 1 << 1, MLX5_MATCH_INNER_HEADERS = 1 << 2, + MLX5_MATCH_MISC_PARAMETERS_2 = 1 << 3, }; @@ -988,12 +1004,19 @@ enum mlx5_cap_type { MLX5_CAP_VECTOR_CALC, MLX5_CAP_QOS, MLX5_CAP_DEBUG, - MLX5_CAP_NVME, - MLX5_CAP_DMC, - MLX5_CAP_DEC, + MLX5_CAP_RESERVED_14, + MLX5_CAP_DEV_MEM, + MLX5_CAP_RESERVED_16, MLX5_CAP_TLS, + MLX5_CAP_VDPA_EMULATION = 0x13, MLX5_CAP_DEV_EVENT = 0x14, + MLX5_CAP_IPSEC, + MLX5_CAP_CRYPTO = 0x1a, + MLX5_CAP_DEV_SHAMPO = 0x1d, + MLX5_CAP_MACSEC = 0x1f, MLX5_CAP_GENERAL_2 = 0x20, + MLX5_CAP_PORT_SELECTION = 0x25, + MLX5_CAP_ADV_VIRTUALIZATION = 0x26, /* NUM OF CAP Types */ MLX5_CAP_NUM }; @@ -1058,6 +1081,9 @@ enum mlx5_mcam_feature_groups { #define MLX5_CAP_FLOWTABLE(mdev, cap) \ MLX5_GET(flow_table_nic_cap, mdev->hca_caps_cur[MLX5_CAP_FLOW_TABLE], cap) +#define MLX5_CAP64_FLOWTABLE(mdev, cap) \ + MLX5_GET64(flow_table_nic_cap, (mdev)->hca_caps_cur[MLX5_CAP_FLOW_TABLE], cap) + #define MLX5_CAP_FLOWTABLE_MAX(mdev, cap) \ MLX5_GET(flow_table_nic_cap, mdev->hca_caps_max[MLX5_CAP_FLOW_TABLE], cap) @@ -1067,6 +1093,54 @@ enum mlx5_mcam_feature_groups { #define MLX5_CAP_FLOWTABLE_NIC_RX_MAX(mdev, cap) \ MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_receive.cap) +#define MLX5_CAP_FLOWTABLE_NIC_TX(mdev, cap) \ + MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_transmit.cap) + +#define MLX5_CAP_FLOWTABLE_NIC_TX_MAX(mdev, cap) \ + MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_transmit.cap) + +#define MLX5_CAP_FLOWTABLE_SNIFFER_RX(mdev, cap) \ + MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_receive_sniffer.cap) + +#define MLX5_CAP_FLOWTABLE_SNIFFER_RX_MAX(mdev, cap) \ + MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_receive_sniffer.cap) + +#define MLX5_CAP_FLOWTABLE_SNIFFER_TX(mdev, cap) \ + MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_transmit_sniffer.cap) + +#define MLX5_CAP_FLOWTABLE_SNIFFER_TX_MAX(mdev, cap) \ + MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_transmit_sniffer.cap) + +#define MLX5_CAP_FLOWTABLE_RDMA_RX(mdev, cap) \ + MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_receive_rdma.cap) + +#define MLX5_CAP_FLOWTABLE_RDMA_RX_MAX(mdev, cap) \ + MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_receive_rdma.cap) + +#define MLX5_CAP_FLOWTABLE_RDMA_TX(mdev, cap) \ + MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_transmit_rdma.cap) + +#define MLX5_CAP_FLOWTABLE_RDMA_TX_MAX(mdev, cap) \ + MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_transmit_rdma.cap) + +#define MLX5_CAP_FLOWTABLE_NIC_TX(mdev, cap) \ + MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_transmit.cap) + +#define MLX5_CAP_FLOWTABLE_NIC_TX_MAX(mdev, cap) \ + MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_transmit.cap) + +#define MLX5_CAP_FLOWTABLE_RDMA_RX(mdev, cap) \ + MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_receive_rdma.cap) + +#define MLX5_CAP_FLOWTABLE_RDMA_RX_MAX(mdev, cap) \ + MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_receive_rdma.cap) + +#define MLX5_CAP_FLOWTABLE_RDMA_TX(mdev, cap) \ + MLX5_CAP_FLOWTABLE(mdev, flow_table_properties_nic_transmit_rdma.cap) + +#define MLX5_CAP_FLOWTABLE_RDMA_TX_MAX(mdev, cap) \ + MLX5_CAP_FLOWTABLE_MAX(mdev, flow_table_properties_nic_transmit_rdma.cap) + #define MLX5_CAP_ESW_FLOWTABLE(mdev, cap) \ MLX5_GET(flow_table_eswitch_cap, \ mdev->hca_caps_cur[MLX5_CAP_ESWITCH_FLOW_TABLE], cap) @@ -1093,14 +1167,46 @@ enum mlx5_mcam_feature_groups { #define MLX5_CAP_ESW_INGRESS_ACL_MAX(mdev, cap) \ MLX5_CAP_ESW_FLOWTABLE_MAX(mdev, flow_table_properties_esw_acl_ingress.cap) +#define MLX5_CAP_ESW_FT_FIELD_SUPPORT_2(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE(mdev, ft_field_support_2_esw_fdb.cap) + +#define MLX5_CAP_ESW_FT_FIELD_SUPPORT_2_MAX(mdev, cap) \ + MLX5_CAP_ESW_FLOWTABLE_MAX(mdev, ft_field_support_2_esw_fdb.cap) + #define MLX5_CAP_ESW(mdev, cap) \ MLX5_GET(e_switch_cap, \ mdev->hca_caps_cur[MLX5_CAP_ESWITCH], cap) +#define MLX5_CAP64_ESW_FLOWTABLE(mdev, cap) \ + MLX5_GET64(flow_table_eswitch_cap, \ + (mdev)->hca_caps_cur[MLX5_CAP_ESWITCH_FLOW_TABLE], cap) + #define MLX5_CAP_ESW_MAX(mdev, cap) \ MLX5_GET(e_switch_cap, \ mdev->hca_caps_max[MLX5_CAP_ESWITCH], cap) +#define MLX5_CAP_PORT_SELECTION(mdev, cap) \ + MLX5_GET(port_selection_cap, \ + mdev->hca_caps_cur[MLX5_CAP_PORT_SELECTION], cap) + +#define MLX5_CAP_PORT_SELECTION_MAX(mdev, cap) \ + MLX5_GET(port_selection_cap, \ + mdev->hca_caps_max[MLX5_CAP_PORT_SELECTION], cap) + +#define MLX5_CAP_ADV_VIRTUALIZATION(mdev, cap) \ + MLX5_GET(adv_virtualization_cap, \ + mdev->hca_caps_cur[MLX5_CAP_ADV_VIRTUALIZATION], cap) + +#define MLX5_CAP_ADV_VIRTUALIZATION_MAX(mdev, cap) \ + MLX5_GET(adv_virtualization_cap, \ + mdev->hca_caps_max[MLX5_CAP_ADV_VIRTUALIZATION], cap) + +#define MLX5_CAP_FLOWTABLE_PORT_SELECTION(mdev, cap) \ + MLX5_CAP_PORT_SELECTION(mdev, flow_table_properties_port_selection.cap) + +#define MLX5_CAP_FLOWTABLE_PORT_SELECTION_MAX(mdev, cap) \ + MLX5_CAP_PORT_SELECTION_MAX(mdev, flow_table_properties_port_selection.cap) + #define MLX5_CAP_ODP(mdev, cap)\ MLX5_GET(odp_cap, mdev->hca_caps_cur[MLX5_CAP_ODP], cap) @@ -1169,6 +1275,9 @@ enum mlx5_mcam_feature_groups { #define MLX5_CAP_DEV_EVENT(mdev, cap)\ MLX5_ADDR_OF(device_event_cap, (mdev)->hca_caps_cur[MLX5_CAP_DEV_EVENT], cap) +#define MLX5_CAP_IPSEC(mdev, cap) \ + MLX5_GET(ipsec_cap, (mdev)->hca_caps_cur[MLX5_CAP_IPSEC], cap) + enum { MLX5_CMD_STAT_OK = 0x0, MLX5_CMD_STAT_INT_ERR = 0x1, diff --git a/sys/dev/mlx5/doorbell.h b/sys/dev/mlx5/doorbell.h index 11ce9ae6649f..4a32e74623a0 100644 --- a/sys/dev/mlx5/doorbell.h +++ b/sys/dev/mlx5/doorbell.h @@ -61,10 +61,12 @@ static inline void mlx5_write64(__be32 val[2], void __iomem *dest, { unsigned long flags; - spin_lock_irqsave(doorbell_lock, flags); + if (doorbell_lock) + spin_lock_irqsave(doorbell_lock, flags); __raw_writel((__force u32) val[0], dest); __raw_writel((__force u32) val[1], dest + 4); - spin_unlock_irqrestore(doorbell_lock, flags); + if (doorbell_lock) + spin_unlock_irqrestore(doorbell_lock, flags); } #endif diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 6ebe4171a503..db1c9f0bb46c 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -634,11 +634,13 @@ struct mlx5_priv { #endif struct mlx5_pme_stats pme_stats; + struct mlx5_flow_steering *steering; struct mlx5_eswitch *eswitch; struct mlx5_bfreg_data bfregs; struct mlx5_uars_page *uar; struct mlx5_fc_stats fc_stats; + struct mlx5_ft_pool *ft_pool; }; enum mlx5_device_state { @@ -728,6 +730,10 @@ struct mlx5_core_dev { struct mlx5_flow_root_namespace *esw_ingress_root_ns; struct mlx5_flow_root_namespace *sniffer_rx_root_ns; struct mlx5_flow_root_namespace *sniffer_tx_root_ns; + struct mlx5_flow_root_namespace *nic_tx_root_ns; + struct mlx5_flow_root_namespace *rdma_tx_root_ns; + struct mlx5_flow_root_namespace *rdma_rx_root_ns; + u32 num_q_counter_allocated[MLX5_INTERFACE_NUMBER]; struct mlx5_crspace_regmap *dump_rege; uint32_t *dump_data; @@ -756,6 +762,7 @@ struct mlx5_core_dev { #ifdef CONFIG_MLX5_FPGA struct mlx5_fpga_device *fpga; #endif + struct xarray ipsec_sadb; }; enum { diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index 8107726bc76a..ee0d28b6758a 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -33,8 +33,33 @@ #include #include +enum mlx5_flow_destination_type { + MLX5_FLOW_DESTINATION_TYPE_NONE, + MLX5_FLOW_DESTINATION_TYPE_VPORT, + MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE, + MLX5_FLOW_DESTINATION_TYPE_TIR, + MLX5_FLOW_DESTINATION_TYPE_FLOW_SAMPLER, + MLX5_FLOW_DESTINATION_TYPE_UPLINK, + MLX5_FLOW_DESTINATION_TYPE_PORT, + MLX5_FLOW_DESTINATION_TYPE_COUNTER, + MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM, + MLX5_FLOW_DESTINATION_TYPE_RANGE, + MLX5_FLOW_DESTINATION_TYPE_TABLE_TYPE, +}; + +enum { + MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO = 1 << 16, + MLX5_FLOW_CONTEXT_ACTION_ENCRYPT = 1 << 17, + MLX5_FLOW_CONTEXT_ACTION_DECRYPT = 1 << 18, + MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_NS = 1 << 19, +}; + enum { - MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO = 1 << 16, + MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT = BIT(0), + MLX5_FLOW_TABLE_TUNNEL_EN_DECAP = BIT(1), + MLX5_FLOW_TABLE_TERMINATION = BIT(2), + MLX5_FLOW_TABLE_UNMANAGED = BIT(3), + MLX5_FLOW_TABLE_OTHER_VPORT = BIT(4), }; /*Flow tag*/ @@ -61,54 +86,149 @@ enum { enum mlx5_flow_namespace_type { MLX5_FLOW_NAMESPACE_BYPASS, + MLX5_FLOW_NAMESPACE_KERNEL_RX_MACSEC, + MLX5_FLOW_NAMESPACE_LAG, MLX5_FLOW_NAMESPACE_OFFLOADS, + MLX5_FLOW_NAMESPACE_ETHTOOL, MLX5_FLOW_NAMESPACE_KERNEL, MLX5_FLOW_NAMESPACE_LEFTOVERS, - MLX5_FLOW_NAMESPACE_SNIFFER_RX, - MLX5_FLOW_NAMESPACE_SNIFFER_TX, + MLX5_FLOW_NAMESPACE_ANCHOR, + MLX5_FLOW_NAMESPACE_FDB_BYPASS, MLX5_FLOW_NAMESPACE_FDB, MLX5_FLOW_NAMESPACE_ESW_EGRESS, MLX5_FLOW_NAMESPACE_ESW_INGRESS, + MLX5_FLOW_NAMESPACE_SNIFFER_RX, + MLX5_FLOW_NAMESPACE_SNIFFER_TX, + MLX5_FLOW_NAMESPACE_EGRESS, + MLX5_FLOW_NAMESPACE_EGRESS_IPSEC, + MLX5_FLOW_NAMESPACE_EGRESS_MACSEC, + MLX5_FLOW_NAMESPACE_RDMA_RX, + MLX5_FLOW_NAMESPACE_RDMA_RX_KERNEL, + MLX5_FLOW_NAMESPACE_RDMA_TX, + MLX5_FLOW_NAMESPACE_PORT_SEL, + MLX5_FLOW_NAMESPACE_RDMA_RX_COUNTERS, + MLX5_FLOW_NAMESPACE_RDMA_TX_COUNTERS, + MLX5_FLOW_NAMESPACE_RDMA_RX_IPSEC, + MLX5_FLOW_NAMESPACE_RDMA_TX_IPSEC, +}; + +enum { + FDB_BYPASS_PATH, + FDB_TC_OFFLOAD, + FDB_FT_OFFLOAD, + FDB_TC_MISS, + FDB_BR_OFFLOAD, + FDB_SLOW_PATH, + FDB_PER_VPORT, }; struct mlx5_flow_table; struct mlx5_flow_group; struct mlx5_flow_rule; struct mlx5_flow_namespace; +struct mlx5_flow_handle; + +enum { + FLOW_CONTEXT_HAS_TAG = BIT(0), +}; + +struct mlx5_flow_context { + u32 flags; + u32 flow_tag; + u32 flow_source; +}; struct mlx5_flow_spec { u8 match_criteria_enable; u32 match_criteria[MLX5_ST_SZ_DW(fte_match_param)]; u32 match_value[MLX5_ST_SZ_DW(fte_match_param)]; + struct mlx5_flow_context flow_context; +}; + +enum { + MLX5_FLOW_DEST_VPORT_VHCA_ID = BIT(0), + MLX5_FLOW_DEST_VPORT_REFORMAT_ID = BIT(1), +}; + +enum mlx5_flow_dest_range_field { + MLX5_FLOW_DEST_RANGE_FIELD_PKT_LEN = 0, }; struct mlx5_flow_destination { - u32 type; + enum mlx5_flow_destination_type type; union { - u32 tir_num; - struct mlx5_flow_table *ft; - u32 vport_num; + u32 tir_num; + u32 ft_num; + struct mlx5_flow_table *ft; + u32 counter_id; + struct { + u16 num; + u16 vhca_id; + struct mlx5_pkt_reformat *pkt_reformat; + u8 flags; + } vport; + struct { + struct mlx5_flow_table *hit_ft; + struct mlx5_flow_table *miss_ft; + enum mlx5_flow_dest_range_field field; + u32 min; + u32 max; + } range; + u32 sampler_id; }; }; -enum mlx5_flow_act_actions { - MLX5_FLOW_ACT_ACTIONS_FLOW_TAG = 1 << 0, - MLX5_FLOW_ACT_ACTIONS_MODIFY_HDR = 1 << 1, - MLX5_FLOW_ACT_ACTIONS_PACKET_REFORMAT = 1 << 2, - MLX5_FLOW_ACT_ACTIONS_COUNT = 1 << 3, +struct mlx5_exe_aso { + u32 object_id; + u8 type; + u8 return_reg_id; + union { + u32 ctrl_data; + struct { + u8 meter_idx; + u8 init_color; + } flow_meter; + }; +}; + +enum { + FLOW_ACT_NO_APPEND = BIT(0), + FLOW_ACT_IGNORE_FLOW_LEVEL = BIT(1), +}; + +struct mlx5_fs_vlan { + u16 ethtype; + u16 vid; + u8 prio; +}; + +#define MLX5_FS_VLAN_DEPTH 2 + +enum mlx5_flow_act_crypto_type { + MLX5_FLOW_ACT_CRYPTO_TYPE_IPSEC, +}; + +enum mlx5_flow_act_crypto_op { + MLX5_FLOW_ACT_CRYPTO_OP_ENCRYPT, + MLX5_FLOW_ACT_CRYPTO_OP_DECRYPT, }; -enum MLX5_FLOW_ACT_FLAGS { - MLX5_FLOW_ACT_NO_APPEND = 1 << 0, +struct mlx5_flow_act_crypto_params { + u32 obj_id; + u8 type; /* see enum mlx5_flow_act_crypto_type */ + u8 op; /* see enum mlx5_flow_act_crypto_op */ }; struct mlx5_flow_act { - u32 actions; /* See enum mlx5_flow_act_actions */ - u32 flags; - u32 flow_tag; - struct mlx5_modify_hdr *modify_hdr; + u32 action; + struct mlx5_modify_hdr *modify_hdr; struct mlx5_pkt_reformat *pkt_reformat; - struct mlx5_fc *counter; + struct mlx5_flow_act_crypto_params crypto; + u32 flags; + struct mlx5_fs_vlan vlan[MLX5_FS_VLAN_DEPTH]; + struct ib_counters *counters; + struct mlx5_flow_group *fg; + struct mlx5_exe_aso exe_aso; }; #define FT_NAME_STR_SZ 20 @@ -135,6 +255,28 @@ static inline bool outer_header_zero(u32 *match_criteria) size - 1); } +struct mlx5_flow_namespace * +mlx5_get_flow_vport_acl_namespace(struct mlx5_core_dev *dev, + enum mlx5_flow_namespace_type type, + int vport); + +struct mlx5_flow_table_attr { + int prio; + int max_fte; + u32 level; + u32 flags; + u16 uid; + struct mlx5_flow_table *next_ft; + + struct { + int max_num_groups; + int num_reserved_entries; + } autogroup; +}; + +struct mlx5_flow_namespace * +mlx5_get_fdb_sub_ns(struct mlx5_core_dev *dev, int n); + struct mlx5_flow_namespace * mlx5_get_flow_namespace(struct mlx5_core_dev *dev, enum mlx5_flow_namespace_type type); @@ -145,24 +287,19 @@ mlx5_get_flow_namespace(struct mlx5_core_dev *dev, */ struct mlx5_flow_table * mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns, - int prio, - const char *name, - int num_flow_table_entries, - int max_num_groups, - int num_reserved_entries); + struct mlx5_flow_table_attr *ft_attr); struct mlx5_flow_table * mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns, - u16 vport, - int prio, - const char *name, - int num_flow_table_entries); + struct mlx5_flow_table_attr *ft_attr, u16 vport); + +struct mlx5_flow_table *mlx5_create_lag_demux_flow_table( + struct mlx5_flow_namespace *ns, + int prio, u32 level); struct mlx5_flow_table * mlx5_create_flow_table(struct mlx5_flow_namespace *ns, - int prio, - const char *name, - int num_flow_table_entries); + struct mlx5_flow_table_attr *ft_attr); int mlx5_destroy_flow_table(struct mlx5_flow_table *ft); /* inbox should be set with the following values: @@ -175,18 +312,17 @@ struct mlx5_flow_group * mlx5_create_flow_group(struct mlx5_flow_table *ft, u32 *in); void mlx5_destroy_flow_group(struct mlx5_flow_group *fg); -/* Single destination per rule. - * Group ID is implied by the match criteria. - */ -struct mlx5_flow_rule * -mlx5_add_flow_rule(struct mlx5_flow_table *ft, - u8 match_criteria_enable, - u32 *match_criteria, - u32 *match_value, - u32 sw_action, - struct mlx5_flow_act *flow_act, - struct mlx5_flow_destination *dest); -void mlx5_del_flow_rule(struct mlx5_flow_rule **); +struct mlx5_flow_handle * +mlx5_add_flow_rules(struct mlx5_flow_table *ft, + const struct mlx5_flow_spec *spec, + struct mlx5_flow_act *flow_act, + struct mlx5_flow_destination *dest, + int num_dest); +void mlx5_del_flow_rules(struct mlx5_flow_handle **pp); + +int mlx5_modify_rule_destination(struct mlx5_flow_handle *handler, + struct mlx5_flow_destination *new_dest, + struct mlx5_flow_destination *old_dest); /*The following API is for sniffer*/ typedef int (*rule_event_fn)(struct mlx5_flow_rule *rule, @@ -292,4 +428,8 @@ int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter, u64 *packets, u64 *bytes); u32 mlx5_fc_id(struct mlx5_fc *counter); /******* End of Flow counters API ******/ + +u32 mlx5_flow_table_id(struct mlx5_flow_table *ft); +int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn); +int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn); #endif diff --git a/sys/dev/mlx5/mlx5_accel/ipsec.h b/sys/dev/mlx5/mlx5_accel/ipsec.h index c020d41cd875..1658542fc9c6 100644 --- a/sys/dev/mlx5/mlx5_accel/ipsec.h +++ b/sys/dev/mlx5/mlx5_accel/ipsec.h @@ -1,137 +1,277 @@ /*- - * Copyright (c) 2017 Mellanox Technologies. All rights reserved. + * Copyright (c) 2023 NVIDIA corporation & affiliates. * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: + * 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. * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: + * THIS SOFTWARE IS PROVIDED BY 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 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. * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. */ #ifndef __MLX5_ACCEL_IPSEC_H__ #define __MLX5_ACCEL_IPSEC_H__ -#ifdef CONFIG_MLX5_ACCEL - +#include #include +#include +#include +#include +#include + +#define MLX5E_IPSEC_SADB_RX_BITS 10 +#define MLX5_IPSEC_METADATA_MARKER(ipsec_metadata) ((ipsec_metadata >> 31) & 0x1) + +struct mlx5e_priv; +struct mlx5e_tx_wqe; +struct mlx5e_ipsec_tx; +struct mlx5e_ipsec_rx; + +struct aes_gcm_keymat { + u64 seq_iv; + + u32 salt; + u32 icv_len; -enum { - MLX5_ACCEL_IPSEC_DEVICE = BIT(1), - MLX5_ACCEL_IPSEC_IPV6 = BIT(2), - MLX5_ACCEL_IPSEC_ESP = BIT(3), - MLX5_ACCEL_IPSEC_LSO = BIT(4), + u32 key_len; + u32 aes_key[256 / 32]; }; -#define MLX5_IPSEC_SADB_IP_AH BIT(7) -#define MLX5_IPSEC_SADB_IP_ESP BIT(6) -#define MLX5_IPSEC_SADB_SA_VALID BIT(5) -#define MLX5_IPSEC_SADB_SPI_EN BIT(4) -#define MLX5_IPSEC_SADB_DIR_SX BIT(3) -#define MLX5_IPSEC_SADB_IPV6 BIT(2) +struct mlx5e_ipsec_priv_bothdir { + struct mlx5e_ipsec_sa_entry *priv_in; + struct mlx5e_ipsec_sa_entry *priv_out; +}; + +struct mlx5e_ipsec_work { + struct work_struct work; + struct mlx5e_ipsec_sa_entry *sa_entry; + void *data; +}; -enum { - MLX5_IPSEC_CMD_ADD_SA = 0, - MLX5_IPSEC_CMD_DEL_SA = 1, +struct mlx5e_ipsec_dwork { + struct delayed_work dwork; + struct mlx5e_ipsec_sa_entry *sa_entry; + struct mlx5e_ipsec_priv_bothdir *pb; }; -enum mlx5_accel_ipsec_enc_mode { - MLX5_IPSEC_SADB_MODE_NONE = 0, - MLX5_IPSEC_SADB_MODE_AES_GCM_128_AUTH_128 = 1, - MLX5_IPSEC_SADB_MODE_AES_GCM_256_AUTH_128 = 3, +struct mlx5e_ipsec_aso { + u8 __aligned(64) ctx[MLX5_ST_SZ_BYTES(ipsec_aso)]; + dma_addr_t dma_addr; + struct mlx5_aso *aso; + /* Protect ASO WQ access, as it is global to whole IPsec */ + spinlock_t lock; }; -#define MLX5_IPSEC_DEV(mdev) (mlx5_accel_ipsec_device_caps(mdev) & \ - MLX5_ACCEL_IPSEC_DEVICE) +struct mlx5_replay_esn { + u32 replay_window; + u32 esn; + u32 esn_msb; + u8 overlap : 1; + u8 trigger : 1; +}; + +struct mlx5_accel_esp_xfrm_attrs { + u32 spi; + struct aes_gcm_keymat aes_gcm; -struct mlx5_accel_ipsec_sa { - __be32 cmd; - u8 key_enc[32]; - u8 key_auth[32]; - __be32 sip[4]; - __be32 dip[4]; union { - struct { - __be32 reserved; - u8 salt_iv[8]; - __be32 salt; - } __packed gcm; - struct { - u8 salt[16]; - } __packed cbc; - }; - __be32 spi; - __be32 sw_sa_handle; - __be16 tfclen; - u8 enc_mode; - u8 sip_masklen; - u8 dip_masklen; - u8 flags; - u8 reserved[2]; -} __packed; - -/** - * mlx5_accel_ipsec_sa_cmd_exec - Execute an IPSec SADB command - * @mdev: mlx5 device - * @cmd: command to execute - * May be called from atomic context. Returns context pointer, or error - * Caller must eventually call mlx5_accel_ipsec_sa_cmd_wait from non-atomic - * context, to cleanup the context pointer - */ -void *mlx5_accel_ipsec_sa_cmd_exec(struct mlx5_core_dev *mdev, - struct mlx5_accel_ipsec_sa *cmd); - -/** - * mlx5_accel_ipsec_sa_cmd_wait - Wait for command execution completion - * @context: Context pointer returned from call to mlx5_accel_ipsec_sa_cmd_exec - * Sleeps (killable) until command execution is complete. - * Returns the command result, or -EINTR if killed - */ -int mlx5_accel_ipsec_sa_cmd_wait(void *context); + __be32 a4; + __be32 a6[4]; + } saddr; + + union { + __be32 a4; + __be32 a6[4]; + } daddr; + + u8 dir : 2; + u8 encap : 1; + u8 drop : 1; + u8 family; + struct mlx5_replay_esn replay_esn; + u32 authsize; + u32 reqid; + u16 sport; + u16 dport; +}; + +enum mlx5_ipsec_cap { + MLX5_IPSEC_CAP_CRYPTO = 1 << 0, + MLX5_IPSEC_CAP_ESN = 1 << 1, + MLX5_IPSEC_CAP_PACKET_OFFLOAD = 1 << 2, + MLX5_IPSEC_CAP_ROCE = 1 << 3, + MLX5_IPSEC_CAP_PRIO = 1 << 4, + MLX5_IPSEC_CAP_TUNNEL = 1 << 5, + MLX5_IPSEC_CAP_ESPINUDP = 1 << 6, +}; + +struct mlx5e_ipsec { + struct mlx5_core_dev *mdev; *** 16872 LINES SKIPPED *** From nobody Tue Jul 30 15:00:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYJMB1yG6z5RNJ7; Tue, 30 Jul 2024 15:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYJMB10MPz57Sw; Tue, 30 Jul 2024 15:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722351654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BOXuRFRDfY/cN1uUa050PSn1FWlRx1qrKPU6D7OFvCM=; b=tWzJTLCGxDsl69Xw+jYQwV4SM1x1Mjbm1nAUNmtEkELP5N/VGPdGwDLuHpzD0JRhlQ5K3J F1BPGC+YVQgFa9PnKK47ofos5zTODHSBtndvtmP7BJfvMH08OWjWkG+CFDPGN1DnVDIqk1 bGQp6zz5+Z0WOqTdZa89EPF1lIUb6pT/HGQlqDpMe0OVVusnNa6oCZzMU43GwV0wRSb9Gh Zh0dFxwDWdGC860ZWaBlhpOgiDK3a4zdvgmY1Lz2/YsPZXThHISatprKlU68kiSGCsYN2d feuji+4uk6r2ZvGfQy/rebMguHUg+qGx0wYNFiNM1fcLNU+ITzM98OpLm9xKxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722351654; a=rsa-sha256; cv=none; b=rNVaKYPNUGVW7ZlK796mcjSASgWi350dysZK5ayFxHOd0CFKVyDVwSs9uaEPxGVKMkNnFc dSGtnnPp8ZoE6UPVT4q22AFrEiRjzlU4D6noSR0p+s6fR10oe+UH4vc+g413BgWUqVaaax 071decswD96vl6hnnUG4GVsirG5D5v9A0Dje/qF4soXvKur+O4TG01f7DLE3WSuxun8UKC D5rJEoXcFz8peJ5sXSpxjkb8ISmywihLLlzjn6sIZ4EHqA37ZwCUwUjV0VbGzUVyHGYftE /0+TKNOS/vHPtiSpzCfYJmD9xH/hqD/KJWd0zfsIKqGYEvPuIzJDljfYQS3NlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722351654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BOXuRFRDfY/cN1uUa050PSn1FWlRx1qrKPU6D7OFvCM=; b=Ir8Pkv6MRfBSHUlwiBTH+I7z/rMB8dPQ8qreIxJola7Yo9AToN98/ijSoaQ/e33u1Az/XJ avHvI9pV81BRnXNAmuz6UnBk3FbWIS8cPRGCdIE1jQUS0hmldFnJq99iU6GMdQvoIaWIzl eaB1WjhK9ibgKt+KfetURJ7iAtwvELX18nb3KTfxM8XxD37glbOTZrTQQy5CQzJJNY3DKB N+DBSnFBfOq+K+AIUtL4gEMqtXF4c2zZDVynXRABEbgttAHCbBxKIHMC6rXPa5hNplpRB7 rdhQraF+wr6mTWcYXvAnYJbinZAZA/pcZYK+AYmxAmwpiEUndKEMDEXdMH1Qwg== 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 4WYJMB0cQhzMdF; Tue, 30 Jul 2024 15:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UF0r6l092394; Tue, 30 Jul 2024 15:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UF0r39092391; Tue, 30 Jul 2024 15:00:53 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:00:53 GMT Message-Id: <202407301500.46UF0r39092391@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: 2204a4829083 - main - mlx5en: limit reporting eeprom read failure due to unplugged module to verboseboot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 2204a4829083bf2a40304ea873d287a5498973d7 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2204a4829083bf2a40304ea873d287a5498973d7 commit 2204a4829083bf2a40304ea873d287a5498973d7 Author: Konstantin Belousov AuthorDate: 2024-07-26 21:09:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-30 15:00:04 +0000 mlx5en: limit reporting eeprom read failure due to unplugged module to verboseboot Requested by: gallatin Sponsored by: NVIDIA networking MFC after: 1 week --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 791e278daaf8..ccbdf11a1dd5 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -3687,9 +3687,11 @@ out: /* Check if module is present before doing an access */ module_status = mlx5_query_module_status(priv->mdev, module_num); if (module_status != MLX5_MODULE_STATUS_PLUGGED_ENABLED) { - mlx5_en_err(ifp, - "Query module %d status: not plugged (%d), eeprom reading is not supported\n", - module_num, module_status); + if (bootverbose) + mlx5_en_err(ifp, + "Query module %d status: not plugged (%d), " + "eeprom reading is not supported\n", + module_num, module_status); error = EINVAL; goto err_i2c; } From nobody Tue Jul 30 15:38:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKBr6g4Zz5RRRN; Tue, 30 Jul 2024 15:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKBr65GVz41wN; Tue, 30 Jul 2024 15:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSpWo1o8uOsi+MBV6DEV56E9wyg9HpwfcI9z2HxfXso=; b=RqS/eqrBeKuBM1rOhsA+0e085BjM/qcIcG8lSXlh2fFllcGCt44DKfMYbzq8jO1nKvKcHP L1ri8tycffIlLPttoZCf5Sdb8Tj5Xt9AOl+B8DbGF9nVl96uQYNCI2+B5/e+r0rmJ8kgM1 5KjxGbGSHpjeUx3MthoMjhN5nkYCKAw3Y51iVqG4gKrWb4tPx938xczgxCkbxL8QJP7mZe c+2GumhJ1WfSmh7/rmize2RP9EtPtANHwYqCHvGpksi5I4+sD6tq/BXqOPomzsCT3vyOCA X4RLcDDUn5jeem+aRq/K6v4oIo+ptS3LTQdv7K4mwRRvfqbJyl8gtyAnq6irkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722353924; a=rsa-sha256; cv=none; b=RbCEk1WBD448D7I+O7HcpaGEyVKCopASTN2IBWDqbJFh2x5mOl/tFwF61tj4ErxUSWW7FO Bj12ts8xESYeo0FrsgJ1iYEVKQgZYUxPgpOMJumzrqLfgCtq3BqIq8V9Y1JO55kURTLeTh ZtZk0F8SBZlA8FfCV/SC/oawpzQgGA29koTwJe0ADFrkAfotwbPUiFjcplMXVJhNL9fMJ8 Ta3SxFa+as1KWe2ZKOZb9DiUh0GaeGAvUVW50GakXW6IjmK7Up1a4Z/4mYqYau08w34PN6 e95t3Zd8T29a852Ty/nC+buwV9Vn9XVQk/8Bx5HxvxoCzz/5KMG70e8BXbkznw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSpWo1o8uOsi+MBV6DEV56E9wyg9HpwfcI9z2HxfXso=; b=cjQX447/1MF40M0ssRFGss8Ju1CE2NreZrEm3dHwd8scPkFax21GU3PmE7A5IWDTNIT8nj C7ZwWtIzswN8mPqrDNRl014zLX6C6tO8L925A6h+DReUMoHLPGIwBym422hpszFBRjE4y2 ZrRHG5CGpxnHCYXWpW7Wxa5pFhnwKHYd4KA/BCTm9DtrGZ/gcEIrFhUZ/t1xf0e2v9zcpW pB+p/dHPd4rSIwndJWlvBQnt9uMzb+Nrk3uUZ8dbjwVH2a8gkW5XgZwRABtlvNwsEcf9c8 xa61IY0GvcWxDlEY/D19gv6acpAJxZz62qB8nqgBa1NHy85R/FN5tETMh3HdsQ== 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 4WYKBr5YzxzNH8; Tue, 30 Jul 2024 15:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFcihR049501; Tue, 30 Jul 2024 15:38:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFciDs049498; Tue, 30 Jul 2024 15:38:44 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:38:44 GMT Message-Id: <202407301538.46UFciDs049498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 78f3e0f6b3ad - main - malloc(9): Introduce M_NEVERFREED List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78f3e0f6b3ad70d9574730fc3338474376ef8ebd Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=78f3e0f6b3ad70d9574730fc3338474376ef8ebd commit 78f3e0f6b3ad70d9574730fc3338474376ef8ebd Author: Bojan Novković AuthorDate: 2024-05-03 18:18:56 +0000 Commit: Bojan Novković CommitDate: 2024-07-30 15:38:18 +0000 malloc(9): Introduce M_NEVERFREED This patch adds an additional malloc(9) flag to distinguish allocations that are never freed during runtime. Differential Revision: https://reviews.freebsd.org/D45045 Reviewed by: alc, kib, markj Tested by: alc --- sys/sys/malloc.h | 3 ++- sys/vm/uma_core.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index dfd7928fc258..9b281da4b4d4 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -60,8 +60,9 @@ #define M_BESTFIT 0x2000 /* only for vmem, low fragmentation */ #define M_EXEC 0x4000 /* allocate executable space */ #define M_NEXTFIT 0x8000 /* only for vmem, follow cursor */ +#define M_NEVERFREED 0x10000 /* chunk will never get freed */ -#define M_VERSION 2020110501 +#define M_VERSION 2024073001 /* * Two malloc type structures are present: malloc_type, which is used by a diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 516ac2c2965a..e93c561d759a 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1791,6 +1791,9 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int domain, int flags, if (keg->uk_flags & UMA_ZONE_NODUMP) aflags |= M_NODUMP; + if (keg->uk_flags & UMA_ZONE_NOFREE) + aflags |= M_NEVERFREED; + /* zone is passed for legacy reasons. */ size = keg->uk_ppera * PAGE_SIZE; mem = keg->uk_allocf(zone, size, domain, &sflags, aflags); From nobody Tue Jul 30 15:38:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKBt076Bz5RRRQ; Tue, 30 Jul 2024 15:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKBs6j30z42Hy; Tue, 30 Jul 2024 15:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tyQTmNtbBrV+viAxd6pi7z4fOD3wUrsbV1sXJsMTewc=; b=EczLmyK9V9qgJjm09LCJxxwtjvECAfenYtRjWbjoX60Zo+tg0ix4M5ZvpVm1HbaURzIf5o u/YP1qJeAOJAxJqYR4qB+M8s4DTOemwQcDvVtjeg8ytQg/LhTBmQ1SAAkVV1p6lPO0vtrF c5zT1q8nmro9pntZbixvroOav2dWmhxjJxNqSUmAXNSx/yjE8kJxIBU1U9EcJFFpi8lyhE 8vZdtLGuFPwhmeBKbYmv+ut5hslK23lm2SDclD1mbfR20/d5FinOBH+gYN83cmdlZdSOzm 3UkLMn6kM+QFSL4ZFXO7f7+oUMh7Wo8SWF3+e266r2+HGMTMmUylIYq7v3ywVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722353925; a=rsa-sha256; cv=none; b=M6qDIdzFUE4RM6RKyfb1CFt1ogYGhI1hhmbiRTWQQzkrEFfrAHXfdqEC23QE8n097DZDhs a7dSy27U4V4nKE8Fa2Nio/URCEYq9Qeio2fIeRv9g4h0WFQDcClbDlq0NZH8YXelExvM72 nzWXWtdB3CKSD5iBz0RZAKS6PAYGKTapf/GUOBsFDfQzd/SM90Bq/V5K5OjIN1R+Z8S54l RnXmM5BR/yYvnZOO9ZigkWzJ2GiXyohLWiWr/jgIvVf/pUS/IP4O930XGknROTHeYI8B/L f+AtSILxBsi27rkWSBs2kqPCqK21D5ncyRqUyb4I2GWH4yhqG1RcZCFQ6djrdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tyQTmNtbBrV+viAxd6pi7z4fOD3wUrsbV1sXJsMTewc=; b=Vi741MaxvuAhVIwE0YOJVlWiqMKJaS0U8l36nao8D8EH3TwJ7WCelkM5zRSjpL50qiP6vg NHl2aTF9q8cCSRH0BQdqh3rFOgd8J6nF3o1i17tETG9i+OCATTE2SzYxxAUUaVH682weUa /fx1zedJpy3SMVwJI1hFSqcD5UWB6Pty0JPX8stpwP2K+ian6eH2ovsUu7+VHpjQlTNLVF bOGSavPhb6dZXpRmYS6nO1aalejTulsQ1tMO2YZpadfCNrgutPWh4BLUXs4S6REPfCEBbL 7E/toXVJAjjH1ISG7SnlzNjs3x8PAYzyaJC51CEIIkSgBwp144ByZqIRPHUH7A== 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 4WYKBs6Jm8zNWR; Tue, 30 Jul 2024 15:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFcjfF049552; Tue, 30 Jul 2024 15:38:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFcjNx049549; Tue, 30 Jul 2024 15:38:45 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:38:45 GMT Message-Id: <202407301538.46UFcjNx049549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 92b9138991dd - main - vm: Introduce VM_ALLOC_NOFREE and PG_NOFREE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92b9138991dd2829ac744592cb9f9f3415be146c Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=92b9138991dd2829ac744592cb9f9f3415be146c commit 92b9138991dd2829ac744592cb9f9f3415be146c Author: Bojan Novković AuthorDate: 2024-07-14 13:13:56 +0000 Commit: Bojan Novković CommitDate: 2024-07-30 15:38:24 +0000 vm: Introduce VM_ALLOC_NOFREE and PG_NOFREE This patch adds two additional vm_page flags to distinguish pages that never get released while the system is running (e.g. UMA_ZONE_NOFREE slabs). Differential Revision: https://reviews.freebsd.org/D45970 Reviewed by: alc, kib, markj Tested by: alc --- sys/vm/vm_page.c | 13 ++++++++++--- sys/vm/vm_page.h | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 64413ba10bfa..3b6b88e4eb32 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2082,7 +2082,8 @@ vm_page_alloc_domain_after(vm_object_t object, vm_pindex_t pindex, int domain, #define VPA_FLAGS (VM_ALLOC_CLASS_MASK | VM_ALLOC_WAITFAIL | \ VM_ALLOC_NOWAIT | VM_ALLOC_NOBUSY | \ VM_ALLOC_SBUSY | VM_ALLOC_WIRED | \ - VM_ALLOC_NODUMP | VM_ALLOC_ZERO | VM_ALLOC_COUNT_MASK) + VM_ALLOC_NODUMP | VM_ALLOC_ZERO | \ + VM_ALLOC_NOFREE | VM_ALLOC_COUNT_MASK) KASSERT((req & ~VPA_FLAGS) == 0, ("invalid request %#x", req)); KASSERT(((req & (VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY)) != @@ -2154,6 +2155,8 @@ found: flags |= m->flags & PG_ZERO; if ((req & VM_ALLOC_NODUMP) != 0) flags |= PG_NODUMP; + if ((req & VM_ALLOC_NOFREE) != 0) + flags |= PG_NOFREE; m->flags = flags; m->a.flags = 0; m->oflags = (object->flags & OBJ_UNMANAGED) != 0 ? VPO_UNMANAGED : 0; @@ -2418,11 +2421,13 @@ vm_page_alloc_noobj_domain(int domain, int req) #define VPAN_FLAGS (VM_ALLOC_CLASS_MASK | VM_ALLOC_WAITFAIL | \ VM_ALLOC_NOWAIT | VM_ALLOC_WAITOK | \ VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | \ - VM_ALLOC_NODUMP | VM_ALLOC_ZERO | VM_ALLOC_COUNT_MASK) + VM_ALLOC_NODUMP | VM_ALLOC_ZERO | \ + VM_ALLOC_NOFREE | VM_ALLOC_COUNT_MASK) KASSERT((req & ~VPAN_FLAGS) == 0, ("invalid request %#x", req)); - flags = (req & VM_ALLOC_NODUMP) != 0 ? PG_NODUMP : 0; + flags = ((req & VM_ALLOC_NODUMP) != 0 ? PG_NODUMP : 0) | + ((req & VM_ALLOC_NOFREE) != 0 ? PG_NOFREE : 0); vmd = VM_DOMAIN(domain); again: if (vmd->vmd_pgcache[VM_FREEPOOL_DIRECT].zone != NULL) { @@ -3937,6 +3942,8 @@ vm_page_free_prep(vm_page_t m) m, i, (uintmax_t)*p)); } #endif + KASSERT((m->flags & PG_NOFREE) == 0, + ("%s: attempting to free a PG_NOFREE page", __func__)); if ((m->oflags & VPO_UNMANAGED) == 0) { KASSERT(!pmap_page_is_mapped(m), ("vm_page_free_prep: freeing mapped page %p", m)); diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 61a0228273c2..07a6c98c8ee8 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -457,6 +457,7 @@ extern struct mtx_padalign pa_lock[]; #define PG_ZERO 0x04 /* page is zeroed */ #define PG_MARKER 0x08 /* special queue marker page */ #define PG_NODUMP 0x10 /* don't include this page in a dump */ +#define PG_NOFREE 0x20 /* page should never be freed. */ /* * Misc constants. @@ -537,7 +538,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); #define VM_ALLOC_WIRED 0x0020 /* (acgnp) Allocate a wired page */ #define VM_ALLOC_ZERO 0x0040 /* (acgnp) Allocate a zeroed page */ #define VM_ALLOC_NORECLAIM 0x0080 /* (c) Do not reclaim after failure */ -#define VM_ALLOC_AVAIL0 0x0100 +#define VM_ALLOC_NOFREE 0x0100 /* (an) Page will never be released */ #define VM_ALLOC_NOBUSY 0x0200 /* (acgp) Do not excl busy the page */ #define VM_ALLOC_NOCREAT 0x0400 /* (gp) Don't create a page */ #define VM_ALLOC_AVAIL1 0x0800 @@ -575,6 +576,8 @@ malloc2vm_flags(int malloc_flags) pflags |= VM_ALLOC_WAITOK; if ((malloc_flags & M_NORECLAIM)) pflags |= VM_ALLOC_NORECLAIM; + if ((malloc_flags & M_NEVERFREED)) + pflags |= VM_ALLOC_NOFREE; return (pflags); } #endif From nobody Tue Jul 30 15:38:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKBv31Rqz5RRBF; Tue, 30 Jul 2024 15:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKBv0ZVnz42JC; Tue, 30 Jul 2024 15:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iV6H+1LgzN8uf7PwETLHkQJ2XrsyTA7jmtFpty+1NXc=; b=CMPoD7IfL/8EWzKYMRnkTFTvcLiSgWLU8hp3COBRBMr9tZLmRJ44ZcQOZMoLysczc6Gb9E /TIngMnIHT0qJCJ55B42kdaz4JrZuVmd34P0x/yk3IDeC6KgYsidIm0wQf/cPiIGJOPvOU t2ekvKDKnXjTARcWbXCbLAx6cw0Xx6VUOZkngYFGN4HSiQDrSkNtgEih5kpN3mG3vKAzts sgBzaB+d+Epx45BK64W48YBbQD9k+LAihPf+IVUvcg0WJwlGUnFNrLDwdcm+JGSR+gTGV0 hJNkfBmsniXmrpVOztigr+8iFaaKUcaEKyqwzTgwJ1u7yQDxJD5j3aaENzgrIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722353927; a=rsa-sha256; cv=none; b=S3VSrbYY3EACbF161NSCfPRZkPbWKqT+MbY+1f4XiTRgy1czqE0YzwK9Vrw0uEeghbbaoZ 1rXbJ+r0fkKvKK3zPV10MT4WNyFpHVcbXpByK6kl7v9/hPO/WgB4ZE3i9iiNjIjGROtAyB kRLmmj5POlHhsXN+WtMaf8RXaW9St8l0/lyobXZP5q/fT4JePrX5htZsyAEUULhIRMSYDC mhqz4S/pIZD67nv91c/+xs3GC0igODAtwigFCpKQxGEkUAYuV+B1QOOdonDlnzA9l5h2GN uInEiWySiOcGXIetCu5z012GGBod8X1DZrUE3pfkJP3UUrnjNt+BOdUlttCljw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iV6H+1LgzN8uf7PwETLHkQJ2XrsyTA7jmtFpty+1NXc=; b=THoMMU0YSZHy2PD4vZJizjqxcd2qLfy65pZ+fZWTmurlWxTlvXFo7Qemcwa8aAa3D2wkSn OzbCPeGnh13Lc5b+5G/Xy034VQcmic5CfTzVeqtMwzrhVGj4KpGa7JT3FRiaFUKf4mhmjs XDaWEQLGmPe30RfYQ7sqM8PEUZeIXJDXXvGtdY9IpYFvNH3GhP8lNgk7CVg/Pb0im/EwVX PiR93wIJ3x/kiVeeo1qApNQxelJpaLrEkX2zD9Ob3uqQ1WnfmVFZ/K65jANtTMVIP5R082 Iy2nm05Qhvbom1lvzPlT+z1BCRxF4Jd7+yDx7JUpx7WOQ9bx5GY7EfcaK13qtA== 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 4WYKBv0BVCzNWS; Tue, 30 Jul 2024 15:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFck2W049592; Tue, 30 Jul 2024 15:38:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFckFQ049589; Tue, 30 Jul 2024 15:38:46 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:38:46 GMT Message-Id: <202407301538.46UFckFQ049589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: a8693e89e3e4 - main - vm: Introduce vm_page_alloc_nofree_domain List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8693e89e3e4a04efd02901cc93bb6148e3e40d6 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=a8693e89e3e4a04efd02901cc93bb6148e3e40d6 commit a8693e89e3e4a04efd02901cc93bb6148e3e40d6 Author: Bojan Novković AuthorDate: 2024-07-14 13:14:22 +0000 Commit: Bojan Novković CommitDate: 2024-07-30 15:38:24 +0000 vm: Introduce vm_page_alloc_nofree_domain This patch adds a reservation-aware bump allocator intended for allocating NOFREE pages. The main goal of this change is to reduce the long-term fragmentation issues caused by pages that are never freed during runtime. The `vm_page_alloc_nofree_domain` routine hands out 0-order pages from a preallocated superpage. Once an active NOFREE superpage fills up, the routine will try to allocate a new one and discard the old one. This routine will get invoked whenever VM_ALLOC_NOFREE is passed to vm_page_alloc_noobj or vm_page_alloc. Differential Revision: https://reviews.freebsd.org/D45863 Reviewed by: alc, kib, markj Tested by: alc --- sys/vm/vm_page.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ sys/vm/vm_pagequeue.h | 4 ++++ 2 files changed, 66 insertions(+) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 3b6b88e4eb32..ff9df7f4a9fc 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -163,6 +163,7 @@ SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | static uma_zone_t fakepg_zone; static void vm_page_alloc_check(vm_page_t m); +static vm_page_t vm_page_alloc_nofree_domain(int domain, int req); static bool _vm_page_busy_sleep(vm_object_t obj, vm_page_t m, vm_pindex_t pindex, const char *wmesg, int allocflags, bool locked); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); @@ -2099,6 +2100,11 @@ vm_page_alloc_domain_after(vm_object_t object, vm_pindex_t pindex, int domain, if (!vm_pager_can_alloc_page(object, pindex)) return (NULL); again: + if (__predict_false((req & VM_ALLOC_NOFREE) != 0)) { + m = vm_page_alloc_nofree_domain(domain, req); + if (m != NULL) + goto found; + } #if VM_NRESERVLEVEL > 0 /* * Can we allocate the page from a reservation? @@ -2430,6 +2436,12 @@ vm_page_alloc_noobj_domain(int domain, int req) ((req & VM_ALLOC_NOFREE) != 0 ? PG_NOFREE : 0); vmd = VM_DOMAIN(domain); again: + if (__predict_false((req & VM_ALLOC_NOFREE) != 0)) { + m = vm_page_alloc_nofree_domain(domain, req); + if (m != NULL) + goto found; + } + if (vmd->vmd_pgcache[VM_FREEPOOL_DIRECT].zone != NULL) { m = uma_zalloc(vmd->vmd_pgcache[VM_FREEPOOL_DIRECT].zone, M_NOWAIT | M_NOVM); @@ -2480,6 +2492,56 @@ found: return (m); } +#if VM_NRESERVLEVEL > 1 +#define VM_NOFREE_IMPORT_ORDER (VM_LEVEL_1_ORDER + VM_LEVEL_0_ORDER) +#elif VM_NRESERVLEVEL > 0 +#define VM_NOFREE_IMPORT_ORDER VM_LEVEL_0_ORDER +#else +#define VM_NOFREE_IMPORT_ORDER 8 +#endif + +/* + * Allocate a single NOFREE page. + * + * This routine hands out NOFREE pages from higher-order + * physical memory blocks in order to reduce memory fragmentation. + * When a NOFREE for a given domain chunk is used up, + * the routine will try to fetch a new one from the freelists + * and discard the old one. + */ +static vm_page_t +vm_page_alloc_nofree_domain(int domain, int req) +{ + vm_page_t m; + struct vm_domain *vmd; + struct vm_nofreeq *nqp; + + KASSERT((req & VM_ALLOC_NOFREE) != 0, ("invalid request %#x", req)); + + vmd = VM_DOMAIN(domain); + nqp = &vmd->vmd_nofreeq; + vm_domain_free_lock(vmd); + if (nqp->offs >= (1 << VM_NOFREE_IMPORT_ORDER) || nqp->ma == NULL) { + if (!vm_domain_allocate(vmd, req, + 1 << VM_NOFREE_IMPORT_ORDER)) { + vm_domain_free_unlock(vmd); + return (NULL); + } + nqp->ma = vm_phys_alloc_pages(domain, VM_FREEPOOL_DEFAULT, + VM_LEVEL_0_ORDER); + if (nqp->ma == NULL) { + vm_domain_freecnt_inc(vmd, 1 << VM_NOFREE_IMPORT_ORDER); + vm_domain_free_unlock(vmd); + return (NULL); + } + nqp->offs = 0; + } + m = &nqp->ma[nqp->offs++]; + vm_domain_free_unlock(vmd); + + return (m); +} + vm_page_t vm_page_alloc_noobj(int req) { diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h index 7e133ec947b4..86863a0a6400 100644 --- a/sys/vm/vm_pagequeue.h +++ b/sys/vm/vm_pagequeue.h @@ -246,6 +246,10 @@ struct vm_domain { u_int vmd_domain; /* (c) Domain number. */ u_int vmd_page_count; /* (c) Total page count. */ long vmd_segs; /* (c) bitmask of the segments */ + struct vm_nofreeq { + vm_page_t ma; + int offs; + } vmd_nofreeq; /* (f) NOFREE page bump allocator. */ u_int __aligned(CACHE_LINE_SIZE) vmd_free_count; /* (a,f) free page count */ u_int vmd_pageout_deficit; /* (a) Estimated number of pages deficit */ uint8_t vmd_pad[CACHE_LINE_SIZE - (sizeof(u_int) * 2)]; From nobody Tue Jul 30 15:38:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKBw3rqWz5RRKc; Tue, 30 Jul 2024 15:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKBw1dN6z42Lw; Tue, 30 Jul 2024 15:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VeE7cpQTvzXJvAK375Scb2qqUQFCQ8dFCb6cwZZ4K14=; b=q9pMGw2x+lXbXzT0f/E5L9PCO++i//4DnEd2kmUy1m+XyoWBDIenxNwWFYaASaOt/OoR31 1pT8l7bsXWn3zuX8LUw8OpDqTW1Jm4T3DEMgi27zag1/aDLp4cAx/XOoYqGaSkT9hftfDu Sf6Vh4rk9+M1xcjcL2K3GHUJcPiOHCqX2EFIaW8qNoRwyTJo1Bou6NKPPYAUIuYw1nLb6v f2J3ti6vPHPEc4SKn6BDX0Zdw5rFHpzsEIDsXJyFx5P4wF15y2oqWa/CSMpmaYNamUUSzx loIzxwkCcrchaZhPh36dZpU7SeMIi2HhkObNfEF0SDEj/IDum05urAwuKPnz0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722353928; a=rsa-sha256; cv=none; b=H04LSt2sL+5cUE68ONcNTEnTYeqE5Ma968yHl0NFYhu4K4q5i6ktU0L/n34dmp9LmgF1v4 UjmJHEwIm1CTpOHqRkUiOT4cJ6l0ZKdUI5b7FdggJRyGZ63dRSsghjj0DHwUfo+o4NDZsD rRpHl9ZMbe/MduvGkQ5K7XfrrJ7GP9tseHAtZDNIjIOiWCrKkXXDchR1xpO6CL1BTasjwF n4iQOK5FzRbDwgUk4KIjwSLkFQ0pzPgD6WNM0OGASzXMGQzHGuL3mg/yJQc1SliJAad5pY CIrsgH26Pco6/YHYOcAI3eU2HKtYkZeuG3Bzz5+TKBKdNyBmMStMGBVyZZwJsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VeE7cpQTvzXJvAK375Scb2qqUQFCQ8dFCb6cwZZ4K14=; b=M20Ht3tMOu2353QKUKcNl5xelM5yQ9IdSAyDFjUJoOiRxVCs7NsyJIAe2FtSksYfQMW2sQ IC4+mQ8P8yNllLIWDrSdK8xoAyOSFCQc3JR+9AoTDg8Gs+QIqmJBOqyPpoaay5xm5aHOrZ JmtEhXXP+thCpm2SuJLUCehLhAIQnS0Fc/Wzljsu7mZHqZh4OrC5sPLNSfIPiYMH8ZVqQs QzNBr8VynSYc9JdsnPA84buoyQccPJ4pJCYs1ish88wBLPO1XTv4e4TaTQ7wn2BR8Ve1Xj T6Ym9dGFVLFhlD12mGhXIvnRNo1Bj3rNJ4WiwIqVFmTZ6cBjYdh2HUVp5YIV0w== 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 4WYKBw1Dx6zNc2; Tue, 30 Jul 2024 15:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFcmK7049650; Tue, 30 Jul 2024 15:38:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFcmoH049647; Tue, 30 Jul 2024 15:38:48 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:38:48 GMT Message-Id: <202407301538.46UFcmoH049647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 3f32a7e4eee5 - main - vm: Add a KVA arena for M_NEVERFREED allocations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f32a7e4eee53d5565a4076e69a41d1afd803e0c Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=3f32a7e4eee53d5565a4076e69a41d1afd803e0c commit 3f32a7e4eee53d5565a4076e69a41d1afd803e0c Author: Bojan Novković AuthorDate: 2024-07-16 14:14:30 +0000 Commit: Bojan Novković CommitDate: 2024-07-30 15:38:24 +0000 vm: Add a KVA arena for M_NEVERFREED allocations This patch adds a new KVA arena for separating M_NEVERFREED allocations. Separating KVAs for pages that are never freed should facilitate superpage promotion in the kernel. Differential Revision: https://reviews.freebsd.org/D45997 Reviewed by: alc, kib, markj Tested by: alc --- sys/vm/vm_kern.c | 21 ++++++++++++++++----- sys/vm/vm_pagequeue.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index a04044463fe2..fb7c80b767ed 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -473,10 +473,12 @@ kmem_malloc_domain(int domain, vm_size_t size, int flags) vm_size_t asize; int rv; - if (__predict_true((flags & M_EXEC) == 0)) + if (__predict_true((flags & (M_EXEC | M_NEVERFREED)) == 0)) arena = vm_dom[domain].vmd_kernel_arena; - else + else if ((flags & M_EXEC) != 0) arena = vm_dom[domain].vmd_kernel_rwx_arena; + else + arena = vm_dom[domain].vmd_kernel_nofree_arena; asize = round_page(size); if (vmem_alloc(arena, asize, flags | M_BESTFIT, &addr)) return (0); @@ -882,20 +884,29 @@ kmem_init(vm_offset_t start, vm_offset_t end) /* * In architectures with superpages, maintain separate arenas * for allocations with permissions that differ from the - * "standard" read/write permissions used for kernel memory, - * so as not to inhibit superpage promotion. + * "standard" read/write permissions used for kernel memory + * and pages that are never released, so as not to inhibit + * superpage promotion. * - * Use the base import quantum since this arena is rarely used. + * Use the base import quantum since these arenas are rarely + * used. */ #if VM_NRESERVLEVEL > 0 vm_dom[domain].vmd_kernel_rwx_arena = vmem_create( "kernel rwx arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); + vm_dom[domain].vmd_kernel_nofree_arena = vmem_create( + "kernel NOFREE arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); vmem_set_import(vm_dom[domain].vmd_kernel_rwx_arena, kva_import_domain, (vmem_release_t *)vmem_xfree, kernel_arena, KVA_QUANTUM); + vmem_set_import(vm_dom[domain].vmd_kernel_nofree_arena, + kva_import_domain, (vmem_release_t *)vmem_xfree, + kernel_arena, KVA_QUANTUM); #else vm_dom[domain].vmd_kernel_rwx_arena = vm_dom[domain].vmd_kernel_arena; + vm_dom[domain].vmd_kernel_nofree_arena = + vm_dom[domain].vmd_kernel_arena; #endif } diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h index 86863a0a6400..af1183e63e53 100644 --- a/sys/vm/vm_pagequeue.h +++ b/sys/vm/vm_pagequeue.h @@ -243,6 +243,7 @@ struct vm_domain { } vmd_pgcache[VM_NFREEPOOL]; struct vmem *vmd_kernel_arena; /* (c) per-domain kva R/W arena. */ struct vmem *vmd_kernel_rwx_arena; /* (c) per-domain kva R/W/X arena. */ + struct vmem *vmd_kernel_nofree_arena; /* (c) per-domain kva NOFREE arena. */ u_int vmd_domain; /* (c) Domain number. */ u_int vmd_page_count; /* (c) Total page count. */ long vmd_segs; /* (c) bitmask of the segments */ From nobody Tue Jul 30 15:38:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKBx51j4z5RRPJ; Tue, 30 Jul 2024 15:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKBx2dmKz42Gg; Tue, 30 Jul 2024 15:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w8CkQ0esVl/7SuauL2cAY9snG1D2mAoMOA8hx2YCnqo=; b=Xq/LckylCp5w/M3DLCIjNPpvmfAvJ88CiZov3/hXy2OG1lldUMcJVUzUQAtOsBYHcyqIH2 o/vcpNGecjFXnVj4igquln7X5ud36DSvEvDwGCqV9a5rjfpy3pYDWbqidV4y2TmLUoym7N 6LgS6h629WMMeDK2WsRzSVvCORM/6CUxYXu4gHtgHkspw7tdtF6Zl3Bf9egcVtQusnZ4NJ gJxmSXneNFxz5AjtRYdqYPiv+2Qz/DAnbObYzNTzlFFdP5N3IosnQTyEg5ecsOu26Hjo/M Iy6kGP6LU260bPHAj2aj8MtVp2ikSo55Q2ocg3IiNpzI2H7pv9txbg+pFWiXAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722353929; a=rsa-sha256; cv=none; b=j0lPKjITnTIagm47rJHlE/K/u2uaooWglxHij69Chsbjj2lE6lKHBxNr3mfNjBxblgcmWR amWJe3zPFTxoeFPRPSz8uymyzbWwIPqpoBCJNYwN5p24sxDDs9TgUb7CeLOcoypnd26RgP /PTGiB6lyzhO06BH2FvOb0pmv+Q5sy7Aq9cMTlEhExorsiDtHaObs5cYTNiDUXqOOcVKsK LzlapvBFMvOAjcXm1LQc5dwr/I3mPpaLSDnrZhVefjZBsyFFEmLvBtSn5b6FRen6IOAO9h Z+oRMkaiW9qCyA+N6oGdHdUcPyGhneZdASDem852JNQ9f3ZrZm6lvoL6doCEOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w8CkQ0esVl/7SuauL2cAY9snG1D2mAoMOA8hx2YCnqo=; b=U06Ofm4Kb/A2k+TTkOqGqZclq3TvWsaQrhngTc7nJdlRGqJj2YXGeN9SuBOMx3Au0L2nfs a29GkhLew+bxG0lF+WmcPZfNPi9LIcgJyH2/lGsG92DJoMg37YKdg2t4SVwYFrNl3nkMTP M4u4+XS1o3IoKhzWbbbMfivXOhYqymKkUlXmkG3iWV9rznJepTdkFMHE2KRfIKQlI6KkVd syu+oaFCRUv6kfoZrng4b0mf9kyfGsNhgUu8SMKQ3p/EJfFLnX6EBjwnysISBn85LHO8iY LbI/N5Vn5kYIHrfqii3RyH36GNJcWcwtiqxE1TSTeu5PaoaNdeZL7kAxJLQeyg== 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 4WYKBx2FRrzNKl; Tue, 30 Jul 2024 15:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFcnai049701; Tue, 30 Jul 2024 15:38:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFcnNn049698; Tue, 30 Jul 2024 15:38:49 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:38:49 GMT Message-Id: <202407301538.46UFcnNn049698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: ddc09a10eaa6 - main - pmap_growkernel: Use VM_ALLOC_NOFREE when allocating pagetable pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddc09a10eaa66bbebeb691021bb2a9f934d33d58 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=ddc09a10eaa66bbebeb691021bb2a9f934d33d58 commit ddc09a10eaa66bbebeb691021bb2a9f934d33d58 Author: Bojan Novković AuthorDate: 2024-07-16 15:12:25 +0000 Commit: Bojan Novković CommitDate: 2024-07-30 15:38:24 +0000 pmap_growkernel: Use VM_ALLOC_NOFREE when allocating pagetable pages This patch modifies pmap_growkernel in all pmaps to use VM_ALLOC_NOFREE when allocating new pagetable pages. This should help reduce longterm fragmentation as these pages are never released after they are allocated. Differential Revision: https://reviews.freebsd.org/D45998 Reviewed by: alc, markj, kib, mhorne Tested by: alc --- sys/amd64/amd64/pmap.c | 7 ++++--- sys/arm/arm/pmap-v6.c | 2 +- sys/arm64/arm64/pmap.c | 6 +++--- sys/i386/i386/pmap.c | 4 ++-- sys/powerpc/aim/mmu_radix.c | 6 +++--- sys/riscv/riscv/pmap.c | 6 +++--- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 778d07689ff0..cf0fc7184f56 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -5156,8 +5156,8 @@ pmap_growkernel(vm_offset_t addr) pdpe = pmap_pdpe(kernel_pmap, end); if ((*pdpe & X86_PG_V) == 0) { nkpg = pmap_alloc_pt_page(kernel_pmap, - pmap_pdpe_pindex(end), VM_ALLOC_WIRED | - VM_ALLOC_INTERRUPT | VM_ALLOC_ZERO); + pmap_pdpe_pindex(end), VM_ALLOC_INTERRUPT | + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); paddr = VM_PAGE_TO_PHYS(nkpg); @@ -5176,7 +5176,8 @@ pmap_growkernel(vm_offset_t addr) } nkpg = pmap_alloc_pt_page(kernel_pmap, pmap_pde_pindex(end), - VM_ALLOC_WIRED | VM_ALLOC_INTERRUPT | VM_ALLOC_ZERO); + VM_ALLOC_INTERRUPT | VM_ALLOC_NOFREE | VM_ALLOC_WIRED | + VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); paddr = VM_PAGE_TO_PHYS(nkpg); diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index de1082e7ae62..6cc78b187a9a 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -2067,7 +2067,7 @@ pmap_growkernel(vm_offset_t addr) * Install new PT2s page into kernel PT2TAB. */ m = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | - VM_ALLOC_WIRED | VM_ALLOC_ZERO); + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (m == NULL) panic("%s: no memory to grow kernel", __func__); m->pindex = pte1_index(kernel_vm_end) & ~PT2PG_MASK; diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 59de6ef37f09..58795e25c82e 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -2959,7 +2959,7 @@ pmap_growkernel(vm_offset_t addr) if (pmap_load(l1) == 0) { /* We need a new PDP entry */ nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | - VM_ALLOC_WIRED | VM_ALLOC_ZERO); + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpg->pindex = kernel_vm_end >> L1_SHIFT; @@ -2978,8 +2978,8 @@ pmap_growkernel(vm_offset_t addr) continue; } - nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpg->pindex = kernel_vm_end >> L2_SHIFT; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 5808c31a99af..57ba48d399c3 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -2264,8 +2264,8 @@ __CONCAT(PMTYPE, growkernel)(vm_offset_t addr) continue; } - nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpg->pindex = kernel_vm_end >> PDRSHIFT; diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index ae6e4d116e87..0a38ad97ad91 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -3580,7 +3580,7 @@ mmu_radix_growkernel(vm_offset_t addr) if ((be64toh(*l2e) & PG_V) == 0) { /* We need a new PDP entry */ nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | - VM_ALLOC_WIRED | VM_ALLOC_ZERO); + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpg->pindex = kernel_vm_end >> L2_PAGE_SIZE_SHIFT; @@ -3598,8 +3598,8 @@ mmu_radix_growkernel(vm_offset_t addr) continue; } - nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpg->pindex = pmap_l3e_pindex(kernel_vm_end); diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index bcf2ada887fb..34922b0f511e 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -1832,7 +1832,7 @@ pmap_growkernel(vm_offset_t addr) if (pmap_load(l1) == 0) { /* We need a new PDP entry */ nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | - VM_ALLOC_WIRED | VM_ALLOC_ZERO); + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpg->pindex = kernel_vm_end >> L1_SHIFT; @@ -1857,8 +1857,8 @@ pmap_growkernel(vm_offset_t addr) continue; } - nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + nkpg = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | + VM_ALLOC_NOFREE | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpg->pindex = kernel_vm_end >> L2_SHIFT; From nobody Tue Jul 30 15:38:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKBy6l7Cz5RRMN; Tue, 30 Jul 2024 15:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKBy3jBJz42K1; Tue, 30 Jul 2024 15:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mq/qt3bqr8geQlWOEQJRU2kwOX/kCQDZnXtScLZJRzg=; b=PauCyML6Du9hvYWYQEb2BJKcSCH462yMLpjCh5qT/NF/h0I2xTKJTq3yH15La/OqS4KXiI pAkjM32htxYMu9Yo8VzDpqZnudlvjcvpB+2I1KSU+5uoeyDJLrgOH7Fkm9CtFmbwQ56BK7 BK8Ti/XPCTrWgelx18ODDrrZ888IaPdjvywYzS3P9xlx+0jyFonerQfCwf1YGBnpTRTEoj yRH4P4HhQq+5bs73C0VoPTdGBUs4ClvTPAXrJrjuoKC/CKvno+f/TshQH7XKDLQqrx2LVE 5d1PTcVFyySQ6LkUqJ6R4DwTnBVeGxbOB2OCclO/M7j8/ZSoz/PqwM71BR0vOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722353930; a=rsa-sha256; cv=none; b=i9zqXkG8rBai0DfjqRAa0v2XZtyKdOdKkRYf2ecveMjHwh2RJiwVAxvak7HRrmgrk1mx61 sODqFf8jsb4FMayd8G/jnWIps00e2FEyadCgMJp+o57BPRLEcgiS/1H5jY4KoJZTnPh8Dv aIRjBve8iI7Sv1S5h8YJM/dE5uoq/th+2u256xWFQ1UBaVaPh7holvzMAlR/M26aX+ERhX kCWdCqVlDTV1wUgDCpGlfeMIdAtcmjIwz0z97RVHv//FVRjNCrAJyRA3uR31egzeFtrvTy xE6SmV9+hLXHJLTMzgClK+kFjszMLIzTKMGKrWP/rh0v2Y/KI7c4Wxe1qhg/fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722353930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mq/qt3bqr8geQlWOEQJRU2kwOX/kCQDZnXtScLZJRzg=; b=RX/Bvpkd21Msw4iRZyEoqCAkuA4xhJ666b1OjTiENjzUfwPrwWR6KZ7j0DB8pj3HC2nSJb JbddaM1F9UuSJHO+hjitN/suXu+ngypA1IDxHAuXPb3Fake7/g1iIluBANQ0AVc9WA2OLI LeDKonZ96FhWcuM4J4cUV1oOdtx65SQ2xQ4odRaHexG1NSM2a4Ap+EMkDkg+OEvdEUeYFA rchWIfBh/2ffFdXxy/DGUj3LWxTVSKIfNlKoH3qPGLwLIcpePaBemR5VKSDVeva1Cpr6kd NQ+fi0EJ3ENgilPPwkg4egMnPdO4baUoiTjCXhe+VegujL9/7QBIdZnZXLli9Q== 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 4WYKBy3H8QzNKm; Tue, 30 Jul 2024 15:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFco4e049755; Tue, 30 Jul 2024 15:38:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFco2O049752; Tue, 30 Jul 2024 15:38:50 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:38:50 GMT Message-Id: <202407301538.46UFco2O049752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 1206cf04a717 - main - sys: Bump __FreeBSD_version to mark new malloc(9) flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1206cf04a717a55bc15255ed043b066941cb43f2 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=1206cf04a717a55bc15255ed043b066941cb43f2 commit 1206cf04a717a55bc15255ed043b066941cb43f2 Author: Bojan Novković AuthorDate: 2024-07-30 14:41:22 +0000 Commit: Bojan Novković CommitDate: 2024-07-30 15:38:25 +0000 sys: Bump __FreeBSD_version to mark new malloc(9) flags This bump is meant to cover the addition of the M_NEVERFREED flag. --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 7461f7dec403..79d188c93230 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500022 +#define __FreeBSD_version 1500023 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Tue Jul 30 15:55:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKZk150dz5RSQr; Tue, 30 Jul 2024 15:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKZk0ddxz45HS; Tue, 30 Jul 2024 15:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722354958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p4bA05huwTWy/u6lkTZvDNrZ/XEeZLwYrHZCDoWzAaY=; b=V7A5BZOe6f3GZpLKw+BxLRderl/p/og4sm3T+DNQw+4rXDuXT749ed6h0WdjyJOdWp/sPf Su9M7UuYOEFHIGIaSPy5Qx68OYsyiTe010hmaMjbKzoZmzmW/7NkYyrnTqy/ws09j3bzsw qR6M+tDwKiVv4t0iHY75/MTUKEylj5zx3mfamc7YINkdiTW18VVMX19Gb+2koDoYyS8Nc8 vqIzIoq47B6cQsINCTfxqgiE6XE6WC9abd0hh+Knwif8uAYqazB2gNYdUA/QtGXVvxs2++ 2S8Nrx+t7NoPyeXvj75Hc+NzOz0KxxPvVUDLKzE+r/bEmh7rhQfFySB/eOdfhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722354958; a=rsa-sha256; cv=none; b=lr4FZ8o9/K498CBH/uQYp9itYybH3KctltiDuUcC2sK/MkSGEY9T/fyU9j0EIwWGW0oZw1 h2AGydJAfaSSSxzphoioD8S0OBgh3Fqoa9bSGkrc9W+zalkeCySvcvNLhot9I162D7qQIO Ai8cp0E5zu+OwUWlYqWZ7IrCsp+fUSl9ikyjeRddhv1WARV+nDSayhIjI0wwwO5yNIxuB4 myMfCUL/Cox/tHspnjVNCoGP+XShTt6APUVKmMsKzdajhv1iZLn6OZadLSxhgPrUDCBP1V BTi/JzsEK+0R0GqNjZq1XZh+ezWU5s6ShwWVZ47Q1QSQLlvleMF/FqCH+mz5fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722354958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p4bA05huwTWy/u6lkTZvDNrZ/XEeZLwYrHZCDoWzAaY=; b=T+giCWyzzU8RBgy3DOx1fOcmUIg2qaLbUJsjaEmjR2whz6lRBmVVU9tQauyaSYcETzcPs6 hLQVQzEBbL6DOrsI8JC5+6hotRB1WD+4TzMXYo3zOLt2UurrrRL2bE5ysMQL2L69qOt1L2 61NRXEDiFP48bcgoHc5F1wefky5T1PmYbIjXLCLq8XhLAcJqzKraio509xUfl5jTsR+myp +DghzuITwf2i/Fps0a8krBZl/PfFfWPi4nvZGzQfFEPJFaX3soScczEkP6BRU2s7LZ6Wn3 +2Z27e94ljLmXYcX8YWtmd2yZj4HquvXv0PFelRK2kVUfH8tEYmdZAhKK0wj+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 4WYKZk0F3QzPHl; Tue, 30 Jul 2024 15:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFtvjG082637; Tue, 30 Jul 2024 15:55:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFtvdL082634; Tue, 30 Jul 2024 15:55:57 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:55:57 GMT Message-Id: <202407301555.46UFtvdL082634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5437ef1dc12d - stable/14 - libdtrace: Compute the relocation offset for all non-ET_REL objects List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5437ef1dc12db8e34ecaf82b45be6255230ed5ba Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5437ef1dc12db8e34ecaf82b45be6255230ed5ba commit 5437ef1dc12db8e34ecaf82b45be6255230ed5ba Author: Mark Johnston AuthorDate: 2024-07-10 21:21:54 +0000 Commit: Mark Johnston CommitDate: 2024-07-30 15:55:32 +0000 libdtrace: Compute the relocation offset for all non-ET_REL objects The use of an ifdef here most likely carries over from when the dtrace port only worked on x86 platforms. MFC after: 2 weeks Sponsored by: Innovate UK (cherry picked from commit 7bbcbd43c53b49360969ca82b152fd6d971e9055) --- .../opensolaris/lib/libdtrace/common/dt_module.c | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c index 6fb9b0f84769..2a0386c33124 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c @@ -1251,19 +1251,21 @@ dt_module_update(dtrace_hdl_t *dtp, struct kld_file_stat *k_stat) * [Text][R/O data][R/W data][Dynamic][BSS][Non loadable] */ dmp->dm_text_size = dmp->dm_data_va - dmp->dm_text_va; -#if defined(__i386__) - /* - * Find the first load section and figure out the relocation - * offset for the symbols. The kernel module will not need - * relocation, but the kernel linker modules will. - */ - for (i = 0; gelf_getphdr(dmp->dm_elf, i, &ph) != NULL; i++) { - if (ph.p_type == PT_LOAD) { - dmp->dm_reloc_offset = k_stat->address - ph.p_vaddr; - break; + + if (!is_elf_obj) { + /* + * Find the first load section and figure out the relocation + * offset for the symbols. The kernel module will not need + * relocation, but the kernel linker modules will. + */ + for (i = 0; gelf_getphdr(dmp->dm_elf, i, &ph) != NULL; i++) { + if (ph.p_type == PT_LOAD) { + dmp->dm_reloc_offset = + k_stat->address - ph.p_vaddr; + break; + } } } -#endif if (dmp->dm_info.objfs_info_primary) dmp->dm_flags |= DT_DM_PRIMARY; From nobody Tue Jul 30 15:55:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKZl1qCmz5RSrc; Tue, 30 Jul 2024 15:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKZl1GtGz459X; Tue, 30 Jul 2024 15:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722354959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2LxAjjxBcGBlUC3FIFMtanyqhNfWrEfyWg8kAeY44Js=; b=BxGFWt4rZL5M3irUA+ot9DhiOi5Bw5/2GOBKaIalwS3CVVH3+BAbH23nZLJ45PGtP+2BeC vYChIYNS+ycpnrZEY7s4oenfvVqRn2KR2+h9CfGuJt5oHWU9o28s1LBjpTachh3M5WVlal 9YnGPomIYJpHetsSroTTgDyZ4vxHU/9JR/VridVs90OBBoOC+nLGqCr7/TANzx1yOeuCSa QEnjhuiVhHxgS94xva9s9KB3sMRtrWGLqufjAjtUrVxgRJ+i2SIMWq23HiY/h8bxifqDrc 0/NGe6Nn70pNhCpBF+W74XUULppj77Lk9JarmSXNgUp5AzeIQ+YlWLS1jPqgjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722354959; a=rsa-sha256; cv=none; b=hObBY1lkAi7uZ+zXF9mAC5rsF0jndHXrtD8dt8Sd1kukUFJB1e8e4lR7Wt/eEmf3V5x3p9 SGRx3Ghw5RGo42GuH+6dyA7h01iXaC9E/jCETOq1AKTuOFK+Fj3/W7g3bSGWur74yuL02H 9oSjFKuMU1tUfqoKe6s7JzQl8PKIu+wHsBcM0IZqaIuMI/gL7C695MCumk53Si+riUvL8Z /l/q1m8nuf85pumT3nxsggmsZ1ms+F4t3RRiJsNSOXccwW+yc/DVLcZ8IpL8RmjX0r3usD 4fnf/0TTAJLksN/m+KPFFtNSN4/Lt6dvdpVSKQCk1N/J/zVCy6jj5NtXR/CHLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722354959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2LxAjjxBcGBlUC3FIFMtanyqhNfWrEfyWg8kAeY44Js=; b=ROta6zTAWKt12zpsvLCyfMO2Uq0/vob+tA11hrXTGHJ4CxAe3R0Vi8aWOMo4V19t2Sv2zs 5YyEQ+E2AYCUPwtdouZMcADRt+tmEWAi22tcP+TKK4w4WUVRwbfHGc/H6ka+uCKrJACY7D 8WL96SvEQoEE28+ppnLP7adnQj91g7hYNIlHY99qc5iCq/6A9cvPSZ1hSNSV86JRvXjOE7 jL+lT4+8qFqraNg1i1Lqs1LpGxC/ENZQP1hi2NFlz9K0wanlJzY9M7YLXs7ZnHjmWq2KXq KEUezTKINDX957xSWXdxdgsZ+NzpeyIPpbgsfq8wS61IBbPMHb7lIp94IU12uA== 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 4WYKZl0tPRzNJB; Tue, 30 Jul 2024 15:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFtxxZ082676; Tue, 30 Jul 2024 15:55:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFtxbV082673; Tue, 30 Jul 2024 15:55:59 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:55:59 GMT Message-Id: <202407301555.46UFtxbV082673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fb8670d3f876 - stable/14 - gnop tests: Serialize List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: fb8670d3f876309981f8d22aa0a7d8ecf16d78b3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fb8670d3f876309981f8d22aa0a7d8ecf16d78b3 commit fb8670d3f876309981f8d22aa0a7d8ecf16d78b3 Author: Mark Johnston AuthorDate: 2024-07-14 16:14:50 +0000 Commit: Mark Johnston CommitDate: 2024-07-30 15:55:32 +0000 gnop tests: Serialize Some of these tests make use of test disk devices, but then they can't run in parallel. MFC after: 2 weeks (cherry picked from commit dc8357de606aa65fc1c35a43d4a5f1d706164ddb) --- tests/sys/geom/class/nop/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sys/geom/class/nop/Makefile b/tests/sys/geom/class/nop/Makefile index 54b41584d441..a3347e0cdb65 100644 --- a/tests/sys/geom/class/nop/Makefile +++ b/tests/sys/geom/class/nop/Makefile @@ -5,4 +5,8 @@ TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} ATF_TESTS_SH+= nop_test +# Some tests make use of the "disks" property and kyua may schedule +# them to run at the time time, which the tests do not expect. +TEST_METADATA.nop_test+= is_exclusive="true" + .include From nobody Tue Jul 30 15:56:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYKZm5tFLz5RSyN; Tue, 30 Jul 2024 15:56: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYKZm2bt0z45NS; Tue, 30 Jul 2024 15:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722354960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hFm1gckm5LejHQhn24WI/dMw7ENIfvWzqdcPleVlVj4=; b=P+T33MJRDSXgHmkrPogRyutZEls2NVoGrqtETQJSaJWwhINs3zIsGQo8yNyNIZUcpWKfD/ hk5v/L7FI6AfOYWDjapwigDGeGLe7MppWoxegTm1lgurZ5qVdtkqnT1uE5bC5xlR8KcXR4 Tagb3HWLN0P44XbSc4yYTVTZSXJHnZp7iKk8fJRUIvMjHJx2dZVI6RtqGWdGIZiQR1+gVD nUoBZBMoXWIwHLforcAunY3AnVIKOFH0VQmAv7svGq4Ts9guZj8ajzWfqk5svu/fnn5CWA wdhwF0plkWzLqS1mIIO2hxURCci/GjyyZ+mA56cCmhri0gR+K2ZL7XXk1ZW27A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722354960; a=rsa-sha256; cv=none; b=t/+0a6bFuKYZP1XWgikazoKor0bdbni15mxvqIXVasAmiXpGP7gQtK+9LBjnNaH4gLIHl/ nN4iA6geEYWIFClq4FAPIDy1A9kf8gGycN/u/DGb62QfGgt34xm98+YwPWsmSY5pYuN2Xt 1R30Va0+8AxwryZKzmP76Z5R//3zDyEOiOOaKexnoClYLWN54WKfrKNq7xXMScNcsBVrfK KCQWgoVbfdCeQt3Wc3F0LOMQhq5ryRATHEpDIuawBWGffOna7OlnuZz0PhZogVsVJ86yHk lrlQV7UJMTroRVQqzV1U6nLZufgw9mHu0n7tb+zBAnmV9jwh7TIpEol1t8FkZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722354960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hFm1gckm5LejHQhn24WI/dMw7ENIfvWzqdcPleVlVj4=; b=p/9h1tmVWUTcH1XqHFlryYFJN9MLA8dXRleXwIwMYXjmkP5X7ZC/605oEnfCHuKFOZQ3WB sW78Bw8Pbq6P89Fx1IOF9Dbx33M/7RRdjt2BJRLCxTQq5KBOgAUwO52uTw14+6c+oj5wn0 1zxPE87Ghu1hIC0lazauChs4ode989vE8cWanW8lxMdFveu+MHmCPl6BdfVVt4pmg0RGmb TcuTrYWlFO/NwjsW1sdpRMvwmWE4KWOm0HJN1uIrILR7YZRWzsxxYXbx5TfGha+/8g5VG7 mElkERrDbuNtd+nzCJUJ9DmgvxRoD8c6xk70utXC51uJgEsjgX13Z6danUQlDw== 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 4WYKZm2BHszNdZ; Tue, 30 Jul 2024 15:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UFu0JK082722; Tue, 30 Jul 2024 15:56:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UFu09l082719; Tue, 30 Jul 2024 15:56:00 GMT (envelope-from git) Date: Tue, 30 Jul 2024 15:56:00 GMT Message-Id: <202407301556.46UFu09l082719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bed96ef09d2f - stable/14 - socket tests: Serialize sonewconn_overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bed96ef09d2f37abe4e88efe7e5feec83eb9f3c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bed96ef09d2f37abe4e88efe7e5feec83eb9f3c7 commit bed96ef09d2f37abe4e88efe7e5feec83eb9f3c7 Author: Mark Johnston AuthorDate: 2024-07-14 16:12:50 +0000 Commit: Mark Johnston CommitDate: 2024-07-30 15:55:32 +0000 socket tests: Serialize sonewconn_overflow It relies on being able inspect the dmesg buffer to see whether the kernel logged certain messages. If it's interleaved with tests that generate large amounts of console output (e.g., GELI tests), then it can fail spuriously. MFC after: 2 weeks (cherry picked from commit ab27e232b14c07317642a2e4c546c9b71bd9c00b) --- tests/sys/kern/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index d78c761feaac..29d33f4c617c 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -57,6 +57,7 @@ ATF_TESTS_SH+= coredump_phnum_test ATF_TESTS_SH+= sonewconn_overflow TEST_METADATA.sonewconn_overflow+= required_programs="python" TEST_METADATA.sonewconn_overflow+= required_user="root" +TEST_METADATA.sonewconn_overflow+= is_exclusive="true" ATF_TESTS_SH+= sendfile_test ${PACKAGE}FILES+= sonewconn_overflow.py From nobody Tue Jul 30 16:17:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYL3d2qHkz5RVY6; Tue, 30 Jul 2024 16:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYL3d0dWbz48gT; Tue, 30 Jul 2024 16:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722356253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3TaVGey9ZdQE0qZGNyjnR5MvvAbQLSzyoIwrl38W/c=; b=uqqvGkLSr4CTLpu9cD2Wk92QkqbE4OSEGsOq5Jtv5GcnVK0C6rS0IZV89DGx+7TtKVV4Wb APawUfgsbQib+S9nwYwhI7kYcPcq88T+yv6bK8M81MvW6FKksbez5u5uoir9f5iKp7z3Z5 YPYKFnuP0u5JHl8aFgAI9YN3ClfzRW1Qi6t/koGOWAjWfhP+eOjrXeqzsCS7F7Fwnjav7c Zxjk26cRIEamC7MRLpJIFU+a+nh8uHZKGe/gb6LNdp9/yGSvEj4HtLJNKSo7liv19UVTfA dIA0BLT9McZ07jXz8BemZIzfO8ab1Fc8l948Y7k+cv+dDVdWsP8OIX9drYDThA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722356253; a=rsa-sha256; cv=none; b=hjxogwIRJnS96gHKcnhuUMVqM3VU8c2nj0qHe3iysh/eicdua7CZhFKyTR2o7ZWWVLmw+X xo/Im1abO6kx1tfnTkhsFcsopOYeIDQXXGsc7d22Dq31gywWPj9wz8oqGP6YhxwHUw1ybM OPc0Ol6qUB6mtVBwi9yxtLY/YK49y0Hi9BBL6ik5Ho9JALpF5l/xOfWpQsfw/PkocwkCjb 1F7MvM4Msw7925yMovotLSVQ09ltkGDleHdBEhIxHUiVN7kNTQBAam+z8/YCU3uFrRGR7l 1s/mHXu9r3XxpZc8hsSeuq+4C9R3iCF7jjCQ4cGddEn+XES1eGYKCrkMyhHc5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722356253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3TaVGey9ZdQE0qZGNyjnR5MvvAbQLSzyoIwrl38W/c=; b=ZK7XjbASjV93gK4sJvMU33GaOhp2bZZYv8pOALYvP5cdy5JeOZir5IwKxYrQTehDPTMOMQ sI1AbTqe4/hzXd2TQXgGzyxLwzpybOdCH6eOAO6Lhp4O0YkcV5qsWw87X2f5QHqAinv35T ZbsXGyZklsEGwiiDzc2RhVwmXSPVOzpISVRW27qTKg0UqnlW0C4dxRy4kj4Zt8/D+Kfpjx jlItVEOsOf0g+PKZ6YNguLo3yi56G4WAkG4iSDSDsfuFwhi+8/wEJtAwRAFr5UKEEBn/ZK pN2PLUDihVLEcimBo7kI1ky9p+ineQuivKkeOs4jKauUQE7aWJdO1XMnXOeJKQ== 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 4WYL3d0DhJzP0M; Tue, 30 Jul 2024 16:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UGHWsn018138; Tue, 30 Jul 2024 16:17:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UGHWoT018135; Tue, 30 Jul 2024 16:17:32 GMT (envelope-from git) Date: Tue, 30 Jul 2024 16:17:32 GMT Message-Id: <202407301617.46UGHWoT018135@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: 5c2bc3db201a - main - Remove "All Rights Reserved" from FreeBSD Foundation copyrights List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 5c2bc3db201a4fe8d7911cf816bea104d5dc2138 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5c2bc3db201a4fe8d7911cf816bea104d5dc2138 commit 5c2bc3db201a4fe8d7911cf816bea104d5dc2138 Author: Ed Maste AuthorDate: 2024-07-30 16:02:17 +0000 Commit: Ed Maste CommitDate: 2024-07-30 16:16:36 +0000 Remove "All Rights Reserved" from FreeBSD Foundation copyrights These ones were unambiguous cases where the Foundation was the only listed copyright holder. Sponsored by: The FreeBSD Foundation --- include/xlocale.h | 1 - lib/libcasper/services/cap_dns/cap_dns.c | 1 - lib/libcasper/services/cap_dns/cap_dns.h | 1 - lib/libcasper/services/cap_dns/tests/dns_test.c | 1 - lib/libcasper/services/cap_grp/cap_grp.c | 1 - lib/libcasper/services/cap_grp/cap_grp.h | 1 - lib/libcasper/services/cap_grp/tests/grp_test.c | 1 - lib/libcasper/services/cap_pwd/cap_pwd.c | 1 - lib/libcasper/services/cap_pwd/cap_pwd.h | 1 - lib/libcasper/services/cap_pwd/tests/pwd_test.c | 1 - lib/libcasper/services/cap_sysctl/cap_sysctl.c | 1 - lib/libcasper/services/cap_sysctl/cap_sysctl.h | 1 - lib/libcasper/services/cap_sysctl/tests/sysctl_test.c | 1 - lib/libnv/common_impl.h | 1 - lib/libnv/tests/nvlist_add_test.c | 1 - lib/libnv/tests/nvlist_exists_test.c | 1 - lib/libnv/tests/nvlist_free_test.c | 1 - lib/libnv/tests/nvlist_get_test.c | 1 - lib/libnv/tests/nvlist_move_test.c | 1 - lib/libnv/tests/nvlist_send_recv_test.c | 1 - lib/libproc/proc_bkpt.c | 1 - lib/libproc/proc_regs.c | 1 - lib/libproc/proc_rtld.c | 1 - lib/librtld_db/librtld_db.3 | 1 - lib/librtld_db/rtld_db.c | 1 - lib/librtld_db/rtld_db.h | 1 - lib/libthr/plockstat.d | 1 - lib/libthr/thread/thr_malloc.c | 1 - lib/libthread_db/arch/aarch64/libpthread_md.c | 1 - libexec/ftpd/blacklist.c | 1 - libexec/ftpd/blacklist_client.h | 1 - libexec/rc/rc.d/blacklistd | 1 - libexec/rtld-elf/aarch64/reloc.c | 1 - libexec/rtld-elf/aarch64/rtld_start.S | 1 - libexec/rtld-elf/rtld_malloc.h | 1 - sbin/hastctl/hastctl.8 | 1 - sbin/hastctl/hastctl.c | 1 - sbin/hastd/activemap.c | 1 - sbin/hastd/activemap.h | 1 - sbin/hastd/control.c | 1 - sbin/hastd/control.h | 1 - sbin/hastd/ebuf.c | 1 - sbin/hastd/ebuf.h | 1 - sbin/hastd/hast_proto.h | 1 - sbin/hastd/hastd.8 | 1 - sbin/hastd/hastd.h | 1 - sbin/hastd/metadata.c | 1 - sbin/hastd/metadata.h | 1 - sbin/hastd/nv.c | 1 - sbin/hastd/nv.h | 1 - sbin/hastd/proto.c | 1 - sbin/hastd/proto.h | 1 - sbin/hastd/proto_impl.h | 1 - sbin/hastd/proto_socketpair.c | 1 - sbin/hastd/proto_uds.c | 1 - sbin/hastd/rangelock.c | 1 - sbin/hastd/rangelock.h | 1 - sbin/hastd/synch.h | 1 - share/examples/hast/ucarp.sh | 1 - share/examples/hast/ucarp_down.sh | 1 - share/examples/hast/ucarp_up.sh | 1 - share/examples/kld/khelp/h_example.c | 1 - tests/sys/fs/fusefs/unlink.cc | 1 - tests/sys/kern/kern_copyin.c | 1 - tools/regression/capsicum/syscalls/cap_fcntls_limit.c | 1 - tools/regression/capsicum/syscalls/cap_getmode.c | 1 - tools/regression/capsicum/syscalls/cap_ioctls_limit.c | 1 - tools/regression/capsicum/syscalls/misc.c | 1 - tools/regression/capsicum/syscalls/misc.h | 1 - tools/test/popss/popss.c | 1 - tools/test/vm86/vm86_test.c | 1 - tools/test/vm86/vm86_test_asm.s | 1 - tools/tools/vt/mkkfont/mkkfont.c | 1 - usr.bin/proccontrol/proccontrol.1 | 1 - usr.bin/proccontrol/proccontrol.c | 1 - 75 files changed, 75 deletions(-) diff --git a/include/xlocale.h b/include/xlocale.h index f39000d6b373..cc2fc0839593 100644 --- a/include/xlocale.h +++ b/include/xlocale.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by David Chisnall under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_dns/cap_dns.c b/lib/libcasper/services/cap_dns/cap_dns.c index 32cbf973ad45..8681f0baef40 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.c +++ b/lib/libcasper/services/cap_dns/cap_dns.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2012-2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_dns/cap_dns.h b/lib/libcasper/services/cap_dns/cap_dns.h index 4bf8e3648a2d..556cac1158d2 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.h +++ b/lib/libcasper/services/cap_dns/cap_dns.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_dns/tests/dns_test.c b/lib/libcasper/services/cap_dns/tests/dns_test.c index 2b50ab446dd1..76534bbbebad 100644 --- a/lib/libcasper/services/cap_dns/tests/dns_test.c +++ b/lib/libcasper/services/cap_dns/tests/dns_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_grp/cap_grp.c b/lib/libcasper/services/cap_grp/cap_grp.c index 6a5ad84fcd22..025ce00adf56 100644 --- a/lib/libcasper/services/cap_grp/cap_grp.c +++ b/lib/libcasper/services/cap_grp/cap_grp.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_grp/cap_grp.h b/lib/libcasper/services/cap_grp/cap_grp.h index a478a91cf760..9be2e7a78dd5 100644 --- a/lib/libcasper/services/cap_grp/cap_grp.h +++ b/lib/libcasper/services/cap_grp/cap_grp.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_grp/tests/grp_test.c b/lib/libcasper/services/cap_grp/tests/grp_test.c index 5441c8e9bdca..d7e9cf12954a 100644 --- a/lib/libcasper/services/cap_grp/tests/grp_test.c +++ b/lib/libcasper/services/cap_grp/tests/grp_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_pwd/cap_pwd.c b/lib/libcasper/services/cap_pwd/cap_pwd.c index 6bae01601d60..1b5963d8be3d 100644 --- a/lib/libcasper/services/cap_pwd/cap_pwd.c +++ b/lib/libcasper/services/cap_pwd/cap_pwd.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_pwd/cap_pwd.h b/lib/libcasper/services/cap_pwd/cap_pwd.h index 35e0e177bc62..496beea26392 100644 --- a/lib/libcasper/services/cap_pwd/cap_pwd.h +++ b/lib/libcasper/services/cap_pwd/cap_pwd.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_pwd/tests/pwd_test.c b/lib/libcasper/services/cap_pwd/tests/pwd_test.c index ff796005e298..68bb00650350 100644 --- a/lib/libcasper/services/cap_pwd/tests/pwd_test.c +++ b/lib/libcasper/services/cap_pwd/tests/pwd_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_sysctl/cap_sysctl.c b/lib/libcasper/services/cap_sysctl/cap_sysctl.c index 8e185e6474a0..c99fd74cb169 100644 --- a/lib/libcasper/services/cap_sysctl/cap_sysctl.c +++ b/lib/libcasper/services/cap_sysctl/cap_sysctl.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013, 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_sysctl/cap_sysctl.h b/lib/libcasper/services/cap_sysctl/cap_sysctl.h index fd7d051f21c8..51243128a683 100644 --- a/lib/libcasper/services/cap_sysctl/cap_sysctl.h +++ b/lib/libcasper/services/cap_sysctl/cap_sysctl.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c b/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c index 19803692141b..300333f11790 100644 --- a/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c +++ b/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013, 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/common_impl.h b/lib/libnv/common_impl.h index 03de9749aaf6..27af1710540a 100644 --- a/lib/libnv/common_impl.h +++ b/lib/libnv/common_impl.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_add_test.c b/lib/libnv/tests/nvlist_add_test.c index 4478efadf4e0..28f2b6f45446 100644 --- a/lib/libnv/tests/nvlist_add_test.c +++ b/lib/libnv/tests/nvlist_add_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_exists_test.c b/lib/libnv/tests/nvlist_exists_test.c index 7450256ab760..808692feb85b 100644 --- a/lib/libnv/tests/nvlist_exists_test.c +++ b/lib/libnv/tests/nvlist_exists_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_free_test.c b/lib/libnv/tests/nvlist_free_test.c index c715aef6657b..bb5eeaf7d04c 100644 --- a/lib/libnv/tests/nvlist_free_test.c +++ b/lib/libnv/tests/nvlist_free_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_get_test.c b/lib/libnv/tests/nvlist_get_test.c index d6e4a9b4d65a..f06be569c90d 100644 --- a/lib/libnv/tests/nvlist_get_test.c +++ b/lib/libnv/tests/nvlist_get_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_move_test.c b/lib/libnv/tests/nvlist_move_test.c index 3c99f4582c5e..2ef7ca4de384 100644 --- a/lib/libnv/tests/nvlist_move_test.c +++ b/lib/libnv/tests/nvlist_move_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index 4dd9fd35421f..f060ee2684d5 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libproc/proc_bkpt.c b/lib/libproc/proc_bkpt.c index 4d11bbc06c67..8649da178bb9 100644 --- a/lib/libproc/proc_bkpt.c +++ b/lib/libproc/proc_bkpt.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/libproc/proc_regs.c b/lib/libproc/proc_regs.c index df4bf19c3512..8d41233ec108 100644 --- a/lib/libproc/proc_regs.c +++ b/lib/libproc/proc_regs.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/libproc/proc_rtld.c b/lib/libproc/proc_rtld.c index db17c2b02b95..1d6fc732933a 100644 --- a/lib/libproc/proc_rtld.c +++ b/lib/libproc/proc_rtld.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/librtld_db/librtld_db.3 b/lib/librtld_db/librtld_db.3 index 041cc2cfa67b..07e1b67c096b 100644 --- a/lib/librtld_db/librtld_db.3 +++ b/lib/librtld_db/librtld_db.3 @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2010 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Rui Paulo under sponsorship from .\" the FreeBSD Foundation. diff --git a/lib/librtld_db/rtld_db.c b/lib/librtld_db/rtld_db.c index 0c2130db973f..0d2adf88e089 100644 --- a/lib/librtld_db/rtld_db.c +++ b/lib/librtld_db/rtld_db.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/librtld_db/rtld_db.h b/lib/librtld_db/rtld_db.h index 24dc18a9a0ba..41aa7409fbf3 100644 --- a/lib/librtld_db/rtld_db.h +++ b/lib/librtld_db/rtld_db.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/libthr/plockstat.d b/lib/libthr/plockstat.d index de620d893651..39d8946f33d3 100644 --- a/lib/libthr/plockstat.d +++ b/lib/libthr/plockstat.d @@ -1,6 +1,5 @@ /* * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c index 64ceb862c0ee..9a81d6d1bd6b 100644 --- a/lib/libthr/thread/thr_malloc.c +++ b/lib/libthr/thread/thr_malloc.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2019 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/lib/libthread_db/arch/aarch64/libpthread_md.c b/lib/libthread_db/arch/aarch64/libpthread_md.c index 2536107b508f..1ff08e2804fa 100644 --- a/lib/libthread_db/arch/aarch64/libpthread_md.c +++ b/lib/libthread_db/arch/aarch64/libpthread_md.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014-2015 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/libexec/ftpd/blacklist.c b/libexec/ftpd/blacklist.c index e8954f11bbe7..0a45f9369074 100644 --- a/libexec/ftpd/blacklist.c +++ b/libexec/ftpd/blacklist.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Kurt Lidl under sponsorship from the * FreeBSD Foundation. diff --git a/libexec/ftpd/blacklist_client.h b/libexec/ftpd/blacklist_client.h index 94ecc66c17ce..0b6805dc218e 100644 --- a/libexec/ftpd/blacklist_client.h +++ b/libexec/ftpd/blacklist_client.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Kurt Lidl under sponsorship from the * FreeBSD Foundation. diff --git a/libexec/rc/rc.d/blacklistd b/libexec/rc/rc.d/blacklistd index ecbb71e41fca..5248b0ea3580 100755 --- a/libexec/rc/rc.d/blacklistd +++ b/libexec/rc/rc.d/blacklistd @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2016 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Kurt Lidl under sponsorship from the # FreeBSD Foundation. diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c index 5dfe19e3d4f4..f76ce7f4d580 100644 --- a/libexec/rtld-elf/aarch64/reloc.c +++ b/libexec/rtld-elf/aarch64/reloc.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014-2015 The FreeBSD Foundation - * All rights reserved. * * Portions of this software were developed by Andrew Turner * under sponsorship from the FreeBSD Foundation. diff --git a/libexec/rtld-elf/aarch64/rtld_start.S b/libexec/rtld-elf/aarch64/rtld_start.S index 8de3e021d567..53a7463e2634 100644 --- a/libexec/rtld-elf/aarch64/rtld_start.S +++ b/libexec/rtld-elf/aarch64/rtld_start.S @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/libexec/rtld-elf/rtld_malloc.h b/libexec/rtld-elf/rtld_malloc.h index 247726b9f470..408cdc84d45e 100644 --- a/libexec/rtld-elf/rtld_malloc.h +++ b/libexec/rtld-elf/rtld_malloc.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2019 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/sbin/hastctl/hastctl.8 b/sbin/hastctl/hastctl.8 index a0a1e1f22634..f696858a8071 100644 --- a/sbin/hastctl/hastctl.8 +++ b/sbin/hastctl/hastctl.8 @@ -1,5 +1,4 @@ .\" Copyright (c) 2010 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Pawel Jakub Dawidek under sponsorship from .\" the FreeBSD Foundation. diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c index 224adce2810e..fe37dcaa1b58 100644 --- a/sbin/hastctl/hastctl.c +++ b/sbin/hastctl/hastctl.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/activemap.c b/sbin/hastd/activemap.c index 42f3d03b5482..d693d08d524e 100644 --- a/sbin/hastd/activemap.c +++ b/sbin/hastd/activemap.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/activemap.h b/sbin/hastd/activemap.h index a1dbf70e51af..ff598f841909 100644 --- a/sbin/hastd/activemap.h +++ b/sbin/hastd/activemap.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/control.c b/sbin/hastd/control.c index 13a0c5e0af30..0a9befcc4358 100644 --- a/sbin/hastd/control.c +++ b/sbin/hastd/control.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/control.h b/sbin/hastd/control.h index 4e16334dc824..ad7fb7978597 100644 --- a/sbin/hastd/control.h +++ b/sbin/hastd/control.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/ebuf.c b/sbin/hastd/ebuf.c index fdb5c442bfa5..1ec8dd672c35 100644 --- a/sbin/hastd/ebuf.c +++ b/sbin/hastd/ebuf.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/ebuf.h b/sbin/hastd/ebuf.h index a79821735539..a4a2b30f4cb4 100644 --- a/sbin/hastd/ebuf.h +++ b/sbin/hastd/ebuf.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/hast_proto.h b/sbin/hastd/hast_proto.h index ab0a46494b45..0158aa4ccee6 100644 --- a/sbin/hastd/hast_proto.h +++ b/sbin/hastd/hast_proto.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/hastd.8 b/sbin/hastd/hastd.8 index fefd03f7dbe0..05a2d9b5e4e9 100644 --- a/sbin/hastd/hastd.8 +++ b/sbin/hastd/hastd.8 @@ -1,5 +1,4 @@ .\" Copyright (c) 2010 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Pawel Jakub Dawidek under sponsorship from .\" the FreeBSD Foundation. diff --git a/sbin/hastd/hastd.h b/sbin/hastd/hastd.h index 15ad243adf7c..a54ef316f37a 100644 --- a/sbin/hastd/hastd.h +++ b/sbin/hastd/hastd.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/metadata.c b/sbin/hastd/metadata.c index 2f9cbc5e0971..5318d9f6aee5 100644 --- a/sbin/hastd/metadata.c +++ b/sbin/hastd/metadata.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/metadata.h b/sbin/hastd/metadata.h index b5215c1a85c9..6d8c593f0a46 100644 --- a/sbin/hastd/metadata.h +++ b/sbin/hastd/metadata.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/nv.c b/sbin/hastd/nv.c index 47499ce27294..0730e4f2a794 100644 --- a/sbin/hastd/nv.c +++ b/sbin/hastd/nv.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/nv.h b/sbin/hastd/nv.h index d1214f2b29ec..657a66fe38eb 100644 --- a/sbin/hastd/nv.h +++ b/sbin/hastd/nv.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto.c b/sbin/hastd/proto.c index 93c9a064215d..70166271a747 100644 --- a/sbin/hastd/proto.c +++ b/sbin/hastd/proto.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto.h b/sbin/hastd/proto.h index a7cecbe67479..729daa518d9d 100644 --- a/sbin/hastd/proto.h +++ b/sbin/hastd/proto.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto_impl.h b/sbin/hastd/proto_impl.h index 4f84f90c6f23..0a0074545f38 100644 --- a/sbin/hastd/proto_impl.h +++ b/sbin/hastd/proto_impl.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto_socketpair.c b/sbin/hastd/proto_socketpair.c index 2d3d61693e1b..59ac9553ff6e 100644 --- a/sbin/hastd/proto_socketpair.c +++ b/sbin/hastd/proto_socketpair.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto_uds.c b/sbin/hastd/proto_uds.c index 5bf4c64fe5f6..acb61a360180 100644 --- a/sbin/hastd/proto_uds.c +++ b/sbin/hastd/proto_uds.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/rangelock.c b/sbin/hastd/rangelock.c index 33aee39651a4..26025d1169ac 100644 --- a/sbin/hastd/rangelock.c +++ b/sbin/hastd/rangelock.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/rangelock.h b/sbin/hastd/rangelock.h index d01dbd755b40..4847887b6b7a 100644 --- a/sbin/hastd/rangelock.h +++ b/sbin/hastd/rangelock.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/synch.h b/sbin/hastd/synch.h index 9e03fcb8ca74..32463f836bd0 100644 --- a/sbin/hastd/synch.h +++ b/sbin/hastd/synch.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/share/examples/hast/ucarp.sh b/share/examples/hast/ucarp.sh index 73253a295f53..67c7aecea44f 100755 --- a/share/examples/hast/ucarp.sh +++ b/share/examples/hast/ucarp.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2010 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Pawel Jakub Dawidek under sponsorship from # the FreeBSD Foundation. diff --git a/share/examples/hast/ucarp_down.sh b/share/examples/hast/ucarp_down.sh index 133d35c59d5b..df78de156b1e 100755 --- a/share/examples/hast/ucarp_down.sh +++ b/share/examples/hast/ucarp_down.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2010 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Pawel Jakub Dawidek under sponsorship from # the FreeBSD Foundation. diff --git a/share/examples/hast/ucarp_up.sh b/share/examples/hast/ucarp_up.sh index 9f22b4205909..62dee23c12c7 100755 --- a/share/examples/hast/ucarp_up.sh +++ b/share/examples/hast/ucarp_up.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2010 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Pawel Jakub Dawidek under sponsorship from # the FreeBSD Foundation. diff --git a/share/examples/kld/khelp/h_example.c b/share/examples/kld/khelp/h_example.c index fea7826a1fb4..92f0c885bbce 100644 --- a/share/examples/kld/khelp/h_example.c +++ b/share/examples/kld/khelp/h_example.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010-2011 The FreeBSD Foundation - * All rights reserved. * * This software was developed at the Centre for Advanced Internet * Architectures, Swinburne University of Technology, Melbourne, Australia by diff --git a/tests/sys/fs/fusefs/unlink.cc b/tests/sys/fs/fusefs/unlink.cc index db54e286d85d..1d8a371649ee 100644 --- a/tests/sys/fs/fusefs/unlink.cc +++ b/tests/sys/fs/fusefs/unlink.cc @@ -1,6 +1,5 @@ /*- * Copyright (c) 2019 The FreeBSD Foundation - * All rights reserved. * * This software was developed by BFF Storage Systems, LLC under sponsorship * from the FreeBSD Foundation. diff --git a/tests/sys/kern/kern_copyin.c b/tests/sys/kern/kern_copyin.c index 6ad195d5d055..e677081a5c70 100644 --- a/tests/sys/kern/kern_copyin.c +++ b/tests/sys/kern/kern_copyin.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015, 2020 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/cap_fcntls_limit.c b/tools/regression/capsicum/syscalls/cap_fcntls_limit.c index d26f3e3b7c36..b76b120a1650 100644 --- a/tools/regression/capsicum/syscalls/cap_fcntls_limit.c +++ b/tools/regression/capsicum/syscalls/cap_fcntls_limit.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/cap_getmode.c b/tools/regression/capsicum/syscalls/cap_getmode.c index 72596b615877..8d72199ab5f6 100644 --- a/tools/regression/capsicum/syscalls/cap_getmode.c +++ b/tools/regression/capsicum/syscalls/cap_getmode.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/cap_ioctls_limit.c b/tools/regression/capsicum/syscalls/cap_ioctls_limit.c index 68bdefb417ce..c8cf03207e57 100644 --- a/tools/regression/capsicum/syscalls/cap_ioctls_limit.c +++ b/tools/regression/capsicum/syscalls/cap_ioctls_limit.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/misc.c b/tools/regression/capsicum/syscalls/misc.c index 704fd70b83ff..3549c1b3bf3c 100644 --- a/tools/regression/capsicum/syscalls/misc.c +++ b/tools/regression/capsicum/syscalls/misc.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/misc.h b/tools/regression/capsicum/syscalls/misc.h index 842500aff14d..22a0ab8094db 100644 --- a/tools/regression/capsicum/syscalls/misc.h +++ b/tools/regression/capsicum/syscalls/misc.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/test/popss/popss.c b/tools/test/popss/popss.c index 004ccb29c546..bb66f050beb1 100644 --- a/tools/test/popss/popss.c +++ b/tools/test/popss/popss.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/tools/test/vm86/vm86_test.c b/tools/test/vm86/vm86_test.c index 1057fc5c83d6..cbdb2c68a6df 100644 --- a/tools/test/vm86/vm86_test.c +++ b/tools/test/vm86/vm86_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/tools/test/vm86/vm86_test_asm.s b/tools/test/vm86/vm86_test_asm.s index 22e5cf70b7f7..0d76d2e77b1e 100644 --- a/tools/test/vm86/vm86_test_asm.s +++ b/tools/test/vm86/vm86_test_asm.s @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/tools/tools/vt/mkkfont/mkkfont.c b/tools/tools/vt/mkkfont/mkkfont.c index 3f92f926c029..ec4675cfcf1b 100644 --- a/tools/tools/vt/mkkfont/mkkfont.c +++ b/tools/tools/vt/mkkfont/mkkfont.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2009 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Ed Schouten under sponsorship from the * FreeBSD Foundation. diff --git a/usr.bin/proccontrol/proccontrol.1 b/usr.bin/proccontrol/proccontrol.1 index 5cb5d584f480..7ab917e4a61f 100644 --- a/usr.bin/proccontrol/proccontrol.1 +++ b/usr.bin/proccontrol/proccontrol.1 @@ -1,5 +1,4 @@ .\" Copyright (c) 2019 The FreeBSD Foundation, Inc. -.\" All rights reserved. .\" .\" This documentation was written by .\" Konstantin Belousov under sponsorship diff --git a/usr.bin/proccontrol/proccontrol.c b/usr.bin/proccontrol/proccontrol.c index 5b48ef2916f8..4b7543d63793 100644 --- a/usr.bin/proccontrol/proccontrol.c +++ b/usr.bin/proccontrol/proccontrol.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. From nobody Tue Jul 30 16:39:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYLY81c29z5RXfD; Tue, 30 Jul 2024 16:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYLY80jVzz4CgP; Tue, 30 Jul 2024 16:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722357580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l7d8GGyHtzeQOuvTMFPD54acvqIls35xT7/Nd4Q0TNc=; b=tv5O8X6Y9fFydIyYEfiDWuyCwCedK6O4T04iEd6jIU7gFZ3xCEe+sSijkSB028HnZ35oX2 QaamYpeOz2YSKO04PXmWkgQaUjip/gLE5qqubd+8sfPHVZw+wx8/8X0GYgcvZjdgCdLqhX kE7CN5pu9dgz2GAfVf94VKuMU0mXKy1DKY8BMR5eNH2yJy9+i4ozO4VG1eImhePR3geMBM 4R+lPxtirgwatQ2G31sNwSmKzPrZcPRCE4q3Df/0JW/WVifIlCIgwc9EFppi72FGjhm3oW yd2JTcZ7Cwe602H0qr14CRZWX/h7gqKLiD6TygVdc6jDwhyKdCiV4EI+IvwB1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722357580; a=rsa-sha256; cv=none; b=RgppzgiF8BRfAfVchQOseGawa/tfo02B5tsUQHd9L7CnXdgSwem9Z0YQ4GaftheqFlsbAF ZEC27qSWPPmmIxuvjhu/EFgkyXoKLZczx3S19NVanibaMveaZ3k4FwNtwSOWkeRch1xd/d gY0ltKUMkyLjMPRjhMuz+1adHvmQPE3BwgZANt2Y5S3MKsEp9sSvIyX1Vhit4SygU66kvS tCIQJo2IYyB2gtVDW4DVIB6lDuqWtLVvVHAfWrAz/yvjE7HryNzOUHkhorM88famLluvVu XM8CQSeIoohPsX+XQYzuSk5COAKEKJxA5DnpxhyaVC3MhUMl9/+zGAM9Ez0Q2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722357580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l7d8GGyHtzeQOuvTMFPD54acvqIls35xT7/Nd4Q0TNc=; b=CN/Fff9h7oyYgM3xx7+ZQ+Ul+Tm8dGDCl8BEXoDnOK3lxS2+68SRqCbWkqDa/XE+y09AF5 v7MSZm4ND//LiFHWzB9UwwJyc1+5xkxiSMBo0aWJPpUGBOxBduYr6Q4c2sahh5r0rTqlsK O77JDxcGgCuAN+lmkGW5azGv+JY+HENgEa+ZrNx1IPV496rUYkrOibvZWHCh7BhkEuRef0 dOx6VM9wJjSBtsaAk3DtbdQVM9x6IKjkkveD2CO46GGM1u2xI/EPm4+X62EixMk/9byP3a 0F1c5+ZdQmRe6xbzR391llvBmMPOvGl1db1/afxHky/Xb8cB/splwQpmPNNfXA== 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 4WYLY806K0zQ5j; Tue, 30 Jul 2024 16:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UGddKE051539; Tue, 30 Jul 2024 16:39:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UGddNR051536; Tue, 30 Jul 2024 16:39:39 GMT (envelope-from git) Date: Tue, 30 Jul 2024 16:39:39 GMT Message-Id: <202407301639.46UGddNR051536@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: 9333e1cbd028 - main - include: ssp: hide ppoll redirect behind __BSD_VISIBLE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9333e1cbd028d9b387709dfce5260db99c09b3d0 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9333e1cbd028d9b387709dfce5260db99c09b3d0 commit 9333e1cbd028d9b387709dfce5260db99c09b3d0 Author: Kyle Evans AuthorDate: 2024-07-30 16:34:09 +0000 Commit: Kyle Evans CommitDate: 2024-07-30 16:36:58 +0000 include: ssp: hide ppoll redirect behind __BSD_VISIBLE This mirrors ppoll's visibility in sys/poll.h and fixes a build issue with some _POSIX_C_SOURCE requests due to missing the sigset_t typedef. Reported by: eduardo Sponsored by: Klara, Inc. Sponsored by: Stormshield --- include/ssp/poll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ssp/poll.h b/include/ssp/poll.h index 66992009e928..815e73eb46b7 100644 --- a/include/ssp/poll.h +++ b/include/ssp/poll.h @@ -42,7 +42,7 @@ __ssp_redirect_raw_impl(int, poll, poll, return (__ssp_real(poll)(fds, nfds, timeout)); } - +#if __BSD_VISIBLE __ssp_redirect_raw_impl(int, ppoll, ppoll, (struct pollfd fds[], nfds_t nfds, const struct timespec *__restrict timeout, @@ -53,7 +53,7 @@ __ssp_redirect_raw_impl(int, ppoll, ppoll, return (__ssp_real(ppoll)(fds, nfds, timeout, newsigmask)); } - +#endif /* __BSD_VISIBLE */ __END_DECLS #endif /* __SSP_FORTIFY_LEVEL > 0 */ From nobody Tue Jul 30 16:52:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYLrC3rMSz5RYgY; Tue, 30 Jul 2024 16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYLrC2z05z4GhV; Tue, 30 Jul 2024 16: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=1722358363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8SHYu4u/mAK1WHU6rokpbgU9eeD68uxbd2j02uzPT+4=; b=kxKw+Er8HMm0Q/JZN/sRASmmcJYdDQ9HtO9CuQEBiVhohDkk2PL2xLNtoQwyOayxRmqcrI XHa8MyRZ0oteG/KZrs1gwN/TCHsNkeIBu4nh5ALv0oSyfeJVLyC0CQXj8SxQudyleZGkss MFZ7y2yXI1o+EqvEufbsGQFCdyalAu3zcJfmkBjhER98i0Q4xC9QirlnKkqr0KWtoyhhme wIRMUEYQ07GiDE0XVPVoTIOh7dclSh//X/+PDoK96Uv3iyiKs5smbJS1pzatrshOgJwM/i vK605Oj2CQ/dqw5i2KnFQn9DvanSy0/0evN23Jpur4gmmcUStmchKoO9c6PM8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722358363; a=rsa-sha256; cv=none; b=WLJSbOsnNTWLmF/h9pjhnx+oRsnnfkxSnKxBND1ltpv+vbO6hckuqwWgqv6l1qVvGIny7j pV8qDxtpt7zgGMLkj1t7FWjh73/7EUyyGCCwqha2IY8+jsDgDLSu7/65MSlhSBxMBGwmZx 6YaQLO79aRw+ebLBRlREsdA35KFwMRY6AeyZ/5hZiBWrqxMec/fXFpNgHR/JEF5mEumpBT XatTTeScVxop/kBe1HnEICRFxKLD1yHNhN5CBRNPje3aMKj4wUDDQv3CHykjeDE4yoaSnr woiKUHQoajYOSZBrHecYBGSs0sCTFlWz7e6pK/oAbQxtgFsSetC4iJCidujnkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722358363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8SHYu4u/mAK1WHU6rokpbgU9eeD68uxbd2j02uzPT+4=; b=P54KQESd5fzZ7S36o+65fnFq1oASZTuHxJ0CnZZG51DmcpRIEBNUgAxgDUbig8wfqvCiXh KI2G2y5ZVZbhl/dvT4VZrg1qGPlEga4ITdn8aubTNDuSs7jKz1zZAtAQ3TyhNAQSdzXXc+ s6zpmfVTTZYc5X0IJQf5pa8xiCgIo3gjxxBppHGWNJGP+pYNqL4i9KWEPKId46r9GkWUk6 7slRN4V58xkgzTI3rd2/softGxmNo6jXiQSFgvZjcVE5O39Rf7hYU9wy9blvrBScpD9ah8 R4ZdeJ60dUeWlyl99XQGl+Nj0H6L50o1v8rmPQWZfvrfcEAeANEMJkxhjq/MVg== 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 4WYLrC2T1rzQfR; Tue, 30 Jul 2024 16:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UGqhVE084250; Tue, 30 Jul 2024 16:52:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UGqhLf084247; Tue, 30 Jul 2024 16:52:43 GMT (envelope-from git) Date: Tue, 30 Jul 2024 16:52:43 GMT Message-Id: <202407301652.46UGqhLf084247@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: aff225414bec - main - ipsec_accel: consistently provide arguments name in typedefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: aff225414bec92e082d10efa8a7136ef9d37bb9c Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=aff225414bec92e082d10efa8a7136ef9d37bb9c commit aff225414bec92e082d10efa8a7136ef9d37bb9c Author: Konstantin Belousov AuthorDate: 2024-07-30 16:41:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-30 16:52:18 +0000 ipsec_accel: consistently provide arguments name in typedefs Sponsored by: NVidia networking --- sys/net/if_var.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 579585b25dd2..e493f8c7951e 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -131,8 +131,8 @@ typedef void (*if_qflush_fn_t)(if_t); typedef int (*if_transmit_fn_t)(if_t, struct mbuf *); typedef uint64_t (*if_get_counter_t)(if_t, ift_counter); typedef void (*if_reassign_fn_t)(if_t, struct vnet *, char *); -typedef int (*if_spdadd_fn_t)(if_t, void *sp, void *inp, void **priv); -typedef int (*if_spddel_fn_t)(if_t, void *sp, void *priv); +typedef int (*if_spdadd_fn_t)(if_t ifp, void *sp, void *inp, void **priv); +typedef int (*if_spddel_fn_t)(if_t ifp, void *sp, void *priv); typedef int (*if_sa_newkey_fn_t)(if_t ifp, void *sav, u_int drv_spi, void **privp); typedef int (*if_sa_deinstall_fn_t)(if_t ifp, u_int drv_spi, void *priv); From nobody Tue Jul 30 17:26:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYMb96xfQz5RcXG; Tue, 30 Jul 2024 17:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYMb96Lgrz4KFB; Tue, 30 Jul 2024 17:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722360389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVvRxNMOCPdQwpHfeozF5d7G0muOyJc/oP7rJhbiQho=; b=r1CBueeMn9bYWz8bhXDTeNagJIB9PSLMLXd+B59UBwvt8dVwVBnX3NkoR06YeIZZl6c6MJ gtwR+Qko7HW0Yhp5Zviwt52G1BNlovTUF0nRQ87JxQa+6J3RjleM5/hLfqVlduuL8G3WD0 I3WAVASy087DfCxP10XMl6EHOFNRhUzOvzUgnWtiZStrgqccUEMxFDpkbnTzzwT5Y2TC+J k3h8pdLSY1HzlEIxeQkPLJ87EJgSqCeRnd/5+ny6j0R2zN4CCzjTUEpIS+HT3WmIdq0Ylk C/Xt0f9XiiKjUZqGPJPKPo33mMaFaZSgJEmD1tSlUBeRSOj7wiH7cB7ZfD1S2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722360389; a=rsa-sha256; cv=none; b=K0yXQtKPR4GtpEMwf2f09fOy288iBQIelCnbAzT888oPEmlx7NpcPfzn8nSEW5me5VQcof wCbjU1nnKqr+nIR5MQJVafIRjl/fwXw/ANK99HvWDfYAj5cBYX9yt9/EnPShsyLvIriXD8 zoDLQrxIKRA4cxmBiETsWBccJQDxuEoY0GVhUdxFgYFZJJWV0/DSm+PDJli+TdtN3+L5QR XZLfjMLK9dA5GYXAzWkgzD23H2/PZSLhbLHCo0tFiLbA8gdbkZGc3xo8q2SbvmVESRppb3 JJiVdrc0WCujaY+s69OdQ8t8/t3rU6xgTt7RZNgxDNbsQfl56V9EMmKKOOAuDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722360389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVvRxNMOCPdQwpHfeozF5d7G0muOyJc/oP7rJhbiQho=; b=rt5/N3ATciRqUA6xImByKuxJDPoFKzoKxrocB9lulVUgbvPG+V+2qa8O0yp7Fif5hk7mxy iLVRY5SsILpNC2GquLCsBBttwJ58NGHRUMAMdHOb7uyONBpimfcHRxSFNP9yT5Ys9h65rW F9irquM+CFDup9UFrIy9I5U2ypzXTpNcYQR9UscDSBLhjo3ZxUzz8BoyabEeUj0oJvSvZe IJ/D7V/fRLf667x/Ojny200iu/I/fVlT768L3AnAM8asWNVgKG8s7eFADZjeCodow9k5sv KwbZSBliEs5OM6ehA071QrLfJXoTURr3wOW/uOGQuHELwGOxIiOf1ez9/WsCWQ== 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 4WYMb95s1vzRRm; Tue, 30 Jul 2024 17:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UHQTNR036930; Tue, 30 Jul 2024 17:26:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UHQTYp036927; Tue, 30 Jul 2024 17:26:29 GMT (envelope-from git) Date: Tue, 30 Jul 2024 17:26:29 GMT Message-Id: <202407301726.46UHQTYp036927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: d9ce4c0b6617 - main - vm_page: Fix inconsistent use of VM_NOFREE_IMPORT_ORDER in vm_page_alloc_nofree_domain List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9ce4c0b66170383a558b90ca835d31ee6d87927 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=d9ce4c0b66170383a558b90ca835d31ee6d87927 commit d9ce4c0b66170383a558b90ca835d31ee6d87927 Author: Bojan Novković AuthorDate: 2024-07-30 17:17:18 +0000 Commit: Bojan Novković CommitDate: 2024-07-30 17:25:37 +0000 vm_page: Fix inconsistent use of VM_NOFREE_IMPORT_ORDER in vm_page_alloc_nofree_domain Pass VM_NOFREE_IMPORT_ORDER to vm_phys_alloc_pages instead of VM_LEVEL_0_ORDER when allocating a higher-order page for the NOFREE page allocator. Reported by: alc Fixes: a8693e8 --- sys/vm/vm_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index ff9df7f4a9fc..0f41ea5a6bb5 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2528,7 +2528,7 @@ vm_page_alloc_nofree_domain(int domain, int req) return (NULL); } nqp->ma = vm_phys_alloc_pages(domain, VM_FREEPOOL_DEFAULT, - VM_LEVEL_0_ORDER); + VM_NOFREE_IMPORT_ORDER); if (nqp->ma == NULL) { vm_domain_freecnt_inc(vmd, 1 << VM_NOFREE_IMPORT_ORDER); vm_domain_free_unlock(vmd); From nobody Tue Jul 30 19:04:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYPmQ5V1Fz5RnDf; Tue, 30 Jul 2024 19:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYPmQ4zX8z4X5t; Tue, 30 Jul 2024 19:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722366278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZI6x66lQXP1V47jjizP0XrXWyywbeN7RXC7Oii6K30=; b=i0OSLUMStk1/RPstkWdUIKFd8qcbJPKUbK//dzkLIsHZqXtSFLASMX7Q1s7TBR8lS5jHaf actfg5dQMxJ39T5Dw8CP1R0kkOIQD1BbXNN5CGDt+CU0xR8t+YDvFIaovVHdYl7EARV1ys 73cQiJKSLALaZFY1GgPZy3Yx/KHnpq5cfwNTHg/Idmd7lNt/cliclZPhX5qFSC+tLfExwu XV4K3q3D9e9jCwakJjDqLnl339CrtDU70Lp6yaOUsTUWFSUN44Y5Wr915XyaB9Al4h7i5z /r/vNyfyr76GE1HSEvIBnEI+JCLOmONx9b3LgjQR0zN2VUP+gsCBqRX3fQtMkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722366278; a=rsa-sha256; cv=none; b=u3cuFOeYNbUHGxK5rrgdRz9/wr958D2OD5M6qIaCZIFBIq9bkteWgs3/xZZj9ahMU648N/ RTXBWebq9v3PzyKiOPx5Gs9DRd5LYZvLu16sXIwMOIN6GTPG6qZmLFJUVjksnsM9T/aB6v zIxfpBsC81rcqTD7f3wXmvNp3lfDyg6hfz7ezR3iC5B0+ssDZcui37pERx3zspSCvqlG+e cRtm8qkdu8gVwxwPql5bVn8c7pWz+7dpZ960RE+hnfVIvHmKfuSg5CCAjIol2N6W199VTM LuFgqC2QQWHONhvH2wbO8MnAd+nATuUlDEH0KW4txaU90NuxFsa84rEJW7Hc3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722366278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZI6x66lQXP1V47jjizP0XrXWyywbeN7RXC7Oii6K30=; b=mRacSp9zVOlDCdDrGuAihO6BL0pfJi9uuFUnjSO5FbPGMjXZRgP3zTYEmybmnmy6h4uK4e YsQtXubiK5KqxFIThY2+8nIpVt1ZqZpfFnaKbY1qTXcWT7aoZtrlog+m4+SOgK41yvRCsc k94qjcykDH++CVZVDOHHhOZduPdyqQvrX92X9taDoslI+wmg4ehCVLV1LaWSuqkAuG/292 6IEezRclvN4kcEOwFbaoIFfBl5S6MUL4qJnYiXKBonQdTb0IXME3uaLZ02g6cphxYR41Nw ytwBiyEZantNhIXh0Bna9LqijBhaY3NbYWzagRMniL0UWUPubtxyk3+Dd+rNyg== 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 4WYPmQ4WjqzVmq; Tue, 30 Jul 2024 19:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UJ4c0F005927; Tue, 30 Jul 2024 19:04:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UJ4cIS005924; Tue, 30 Jul 2024 19:04:38 GMT (envelope-from git) Date: Tue, 30 Jul 2024 19:04:38 GMT Message-Id: <202407301904.46UJ4cIS005924@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: 057453ffdf57 - main - filemon: Document how to build into the kernel. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 057453ffdf57bdfcbadb5d1834d425812e01ff43 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=057453ffdf57bdfcbadb5d1834d425812e01ff43 commit 057453ffdf57bdfcbadb5d1834d425812e01ff43 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-30 19:04:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-07-30 19:04:30 +0000 filemon: Document how to build into the kernel. MFC after: 3 days Reviewed by: olce, imp Differential Revision: https://reviews.freebsd.org/D46184 --- share/man/man4/filemon.4 | 4 +++- sys/conf/NOTES | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4 index 2561e1e89bf5..b6755494e432 100644 --- a/share/man/man4/filemon.4 +++ b/share/man/man4/filemon.4 @@ -29,13 +29,15 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 1, 2023 +.Dd July 30, 2024 .Dt FILEMON 4 .Os .Sh NAME .Nm filemon .Nd the filemon device .Sh SYNOPSIS +.Cd device filemon +.Pp .In dev/filemon/filemon.h .Sh DESCRIPTION The diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 555bae187271..a531620ede55 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2863,3 +2863,6 @@ device xz # xz_embedded LZMA de-compression library # Kernel support for stats(3). options STATS + +# File system monitoring +device filemon # file monitoring for make(1) meta-mode From nobody Tue Jul 30 19:30:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYQL3089gz5RqKg; Tue, 30 Jul 2024 19:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYQL26mnhz4bpc; Tue, 30 Jul 2024 19:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722367819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0YkL5+YWbfGKoqQbSTQrbc7g8iSRF8JXVEYdU6Pu2rg=; b=BF+EVysyOSaDpfY/9BVrDgDqrTp58c7AK2xEUAaixXrI3Snjwg33gbcXJEiFWuttomD9ys YOziaEAYfPL2ZlfZv87BefGCyUxQ0y9szEPfurjjUo853gFp6peoNvA04j8l2V0tjGTrjT ztOBqAmp2I7JKdBg0z4a4wPju+uCgTPttQrds/MNA5Kfb7QfEaxIL9f5g/ggfdF865UiiF /nkdzmK7MycYfJECYUp6cPc7SwQG8TwZrsPphPjVOaH+QiMXRmhL9I1A4/8tEMCVEIZkyL G3QCPdrpf9mwRXdnTZtYpW1ENY4Xg1JSApwUKkV5zjLOp1d9w1EfjnOPB49d+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722367818; a=rsa-sha256; cv=none; b=O9L5U9VMrR0fd7rR9moMQns38HtSNkEHhjfLLNsl26Nsj6193aEt3UxdZ0F48rct/4fBnW 5fl4iktc5kHCzYVVZ4QGBVLX4un1qfJFsB2fAM5oRBfqtbiqQEXbmzmiReMzlFcf+GYiLY aofy8gVVDrx4zjJEItRAzSjMxfCSjhnF9aqpK0G3JABHTcaR94+dyxrrfBRTASEd+tmQbj cn00JzcLShYgwyKXANnV58pOC9EssJH5MgJrZH7W+2ApwxGzlEy76vKlxFyMTcog/7bobR aWurv9xnlQR/cgaHi1cQCZ5eFynpInqEjJaHp7cZ0W4SxkMViZIYM91pkdc4rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722367818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0YkL5+YWbfGKoqQbSTQrbc7g8iSRF8JXVEYdU6Pu2rg=; b=weGTjRbkgULAAHy/YyuJdMEsS4jWGiEPz7+xJaWgGaqmKTV71zxTHSE/4QNZna10K8EwvF kG+rLN6+HnJVX3ReYyKT+saEKXQL9DWYqnuuRIs+p0bjoYdZZl/SY5XN2KtXWWVxkvYn/p tlnywOdNaB6iFF39v3/8rcBaXXyujipjhZfov3fdeQdgPnxjjCH681OKzZUK+tvVKBQHl3 p3OVtIR+8ueo4YEsrivCVJ2GHScWoExj4pDrP14+ZSOcfFtD11XGItSaGOGiouXp+XgofW VWbXN2qa1BpMI0ozNhdHKDmHfEPU/rRu5vP5PI/3Y82R9LCyP7c8Q+twatdoLQ== 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 4WYQL26NVLzWJ3; Tue, 30 Jul 2024 19:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UJUI8N049517; Tue, 30 Jul 2024 19:30:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UJUI4c049514; Tue, 30 Jul 2024 19:30:18 GMT (envelope-from git) Date: Tue, 30 Jul 2024 19:30:18 GMT Message-Id: <202407301930.46UJUI4c049514@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: 6f25b46721a1 - main - Fix enum warning in heimdal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6f25b46721a18cf4f036d041e7e5d275800a00b3 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6f25b46721a18cf4f036d041e7e5d275800a00b3 commit 6f25b46721a18cf4f036d041e7e5d275800a00b3 Author: Dimitry Andric AuthorDate: 2024-07-30 18:31:47 +0000 Commit: Dimitry Andric CommitDate: 2024-07-30 19:24:17 +0000 Fix enum warning in heimdal This fixes a clang 19 warning: crypto/heimdal/lib/krb5/deprecated.c:75:17: error: comparison of different enumeration types ('krb5_keytype' (aka 'enum ENCTYPE') and 'enum krb5_keytype_old') [-Werror,-Wenum-compare] 75 | if (keytype != KEYTYPE_DES || context->etypes_des == NULL) | ~~~~~~~ ^ ~~~~~~~~~~~ In https://github.com/heimdal/heimdal/commit/3bebbe5323 this was solved by adding a cast. That commit is rather large, so I'm only applying the one-liner here. MFC after: 3 days --- crypto/heimdal/lib/krb5/deprecated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/krb5/deprecated.c b/crypto/heimdal/lib/krb5/deprecated.c index e7c0105ebf7f..02cf7614f932 100644 --- a/crypto/heimdal/lib/krb5/deprecated.c +++ b/crypto/heimdal/lib/krb5/deprecated.c @@ -72,7 +72,7 @@ krb5_keytype_to_enctypes_default (krb5_context context, unsigned int i, n; krb5_enctype *ret; - if (keytype != KEYTYPE_DES || context->etypes_des == NULL) + if (keytype != (krb5_keytype)KEYTYPE_DES || context->etypes_des == NULL) return krb5_keytype_to_enctypes (context, keytype, len, val); for (n = 0; context->etypes_des[n]; ++n) From nobody Wed Jul 31 00:39:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYYC33Pmsz5SJ11; Wed, 31 Jul 2024 00:39:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYYC32cP7z4CZM; Wed, 31 Jul 2024 00:39:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722386383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5YleEryripVBVcFRkYm99jc2A+3HpqrQh9q8ttqCbpg=; b=XXdKrDo5n3OAg2d+hAQGMvYuMPS4DYA3f++uDh7zNUTe1R9O6JF+d8atOVyllJIoyy7eit SRHmw2iS69RcG/qH2e9t+9iVe2PksQqBl2hmQBhPFJdoMgnXu7GLB/lUaq5fTdI4KcK7yK uFgtnRKB0n25fkhpXyKvfVIcP1WjZEyYEUQEr+ae7IDISLbgQFYxgyies+3kNN7ZUlznG/ ElQk3jf1IcO1jcywexZrz/JKj6RmVzvJA0kjz+D1pG+WwDLUDA7VZCBXchszhoKfiu9LLM mVyVZAgcLRgfv00TVieIuvXgMXIBiu9uztsttBOE/GD+sNGzmKDkraVkA2Mzew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722386383; a=rsa-sha256; cv=none; b=e0Xr1U1eLk7bIkAWUSGHXZBpB1Eiyp0o7Nvif2jZ+yL25kog/fGx6gDr/UXDSeQ+g0CnMy h32W9spA+hMnMxzeMHL8IC4u2eHQev1AWBdEucFEN1whXcynNI8JvdNRVpe97SlcgVnyWe cYLdaQM0HXrSkwZ89IeDw+bZ5KVTtAM8aBRp4mJqBnKpsnkHmJ1vvUrGZw2sZdNCNtSshc hwD9va8WhwYCSMAg/+lvhV38xPqsDcBzDdtyfQkIDH0ZZ05eNeIokmfwJkhLR9mxDY5gcO DwcAr8RB+Ta1LsHZhjc4erQHFkx5ziE2Ss6Tf/TvBomSdGIBNOwmGSLd4eCJRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722386383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5YleEryripVBVcFRkYm99jc2A+3HpqrQh9q8ttqCbpg=; b=y2BibulkNWcStzr0RYHT7De8bCJ8OcHTakqCwTzyZU7eB9ebyeDgdy3xosv1/QL7xYWuKo IOGCiJJJrNUTSVeVJ24bbYAWUH+/KNaq3BqZduJvFFfJbLu5jxS3oOZqFMbO6nV4Eovlph 8VHb08mQ/Gy3zEj2rNc7zGOJWJWGdZxoqG6XxRsEJhOf5fvDcElZIA14Je51V2ohRpobhx mG+FvZB+LABt6oJevfu/mEJ6D1RPmTm7I2rlchXKUWaPqlYG4CI9XcLWICFk9s5Bw3v467 RjbAx4DvjRdQMoADLp9VqJsziU+miONeJMU60jxjVkRHohTHXlrQ79gT8sn6MA== 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 4WYYC324nBzflk; Wed, 31 Jul 2024 00:39:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V0dhgB062410; Wed, 31 Jul 2024 00:39:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V0dhHC062407; Wed, 31 Jul 2024 00:39:43 GMT (envelope-from git) Date: Wed, 31 Jul 2024 00:39:43 GMT Message-Id: <202407310039.46V0dhHC062407@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: b4e4512d4669 - main - filemon: Not an option. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b4e4512d4669267fb220b7c1a2844c506673a3ce Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b4e4512d4669267fb220b7c1a2844c506673a3ce commit b4e4512d4669267fb220b7c1a2844c506673a3ce Author: Dag-Erling Smørgrav AuthorDate: 2024-07-31 00:32:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-07-31 00:39:32 +0000 filemon: Not an option. MFC after: 3 days --- sys/conf/options | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/conf/options b/sys/conf/options index 899fd7869a5e..0e959c3b9828 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -106,7 +106,6 @@ CY_PCI_FASTINTR DEADLKRES opt_watchdog.h EXPERIMENTAL opt_global.h DIRECTIO -FILEMON opt_dontuse.h FFCLOCK FULL_PREEMPTION opt_sched.h GZIO opt_gzio.h From nobody Wed Jul 31 04:38:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVG2Bk0z5Sbgh; Wed, 31 Jul 2024 04:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVG1cg9z4X13; Wed, 31 Jul 2024 04:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yzwccHQNMzIR+yaRbPvLtBIfrIqwHGoL+Kqk5ss0D38=; b=WULACX07SyLujP6oChTKSOVSFRemXJ1jYRdqG+X2//KC7V+0FkcNI3X8yidpNQyAXkH9Qo CYPjoDcYgF6Jk0irjZkSj94FameaSXP5vlcptIDUCrkXlN1slwDp4u7nrmdNhO520idZui 3QXBKP+DzYFMMV7rCIi6aLTQ//duzhzsONco95RQnaGGtpECgzq9le49dhQTC46MlvIaKz TmITLcNo5dEBf6xtflxRrXId2A+inWVQg8xLgvw1jErW4QBC9Kgq/0wKUGyxTCLaZp/R4P EIegUaaPKQKzabKTNJdfYs7nA7CcUXI4bwCnaqg9Vhir3Yt1pyXDUAZwKSUuQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400694; a=rsa-sha256; cv=none; b=u23JRL3QTjkJHel2ICvjkIX0NQ+aPETrwr0MFuGPkUpBnAPZyPpF0oe1x0tdGRk71MIvrR P/H85/aq5yK/RPWos3ukSjZoHZLaB2uyZsKHsOIQwPaMTizfMpH74d9JvtazTCrUgJ52zj HODsn0sbzA899xNRnSZbRlNZZ9S9RkcqITP3VPCATqC7hDGpRysBbpmvajM48jG5a5ZVO+ C811JoWZO+a1yy+TB8ethx1JGb3c5FKDLt6JpFgWk21xkSWfIiuOXd+P69WAzGI7Cu61Dv EURmNMNkyPGvwp5bvwWYLcN0sQzdZEwpv8hkT8TwNPkUFK/yR/SViKrxIuf0qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yzwccHQNMzIR+yaRbPvLtBIfrIqwHGoL+Kqk5ss0D38=; b=NWkglfZfyD2gqOcHnO3q4zXvm8+EcrFIHx9au2Pg0txUjFS/rsrl28mwR08Ue40q3dH0IY 56D4YZs1OsjjN6+RovR8Fp9JQPcDiMrSZpp0lR419M9H0pZxj2znLWRtECHi6Oc/bWOETi Q+v8XwYNqcnJBgcWE6UlLfE9doJw2vWQOXsAQF/gIVYuy/E02NuU4W7MpxNElFiY4kdiw6 Rii3r/0GdR0t04ngSyB5mKtsw8+MzBGw+SpWiA01rPKO6CYXSQ+QkzdYSU206QOxJK8osN tbxBBYGOM0LoQMEWO1M39qeK4VdCkVj/sXFVMZ/s1MLqVMfALms2IxxDWQ6oRQ== 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 4WYfVG15YSzmfs; Wed, 31 Jul 2024 04:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cEkh068341; Wed, 31 Jul 2024 04:38:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cE56068338; Wed, 31 Jul 2024 04:38:14 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:14 GMT Message-Id: <202407310438.46V4cE56068338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 9c1fafce1ed3 - stable/13 - ice_ddp: Update to 1.3.35.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9c1fafce1ed3f005763862852e03762bcf9b9785 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=9c1fafce1ed3f005763862852e03762bcf9b9785 commit 9c1fafce1ed3f005763862852e03762bcf9b9785 Author: Eric Joyner AuthorDate: 2023-08-22 04:55:34 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 03:48:56 +0000 ice_ddp: Update to 1.3.35.0 This is intended to be used with the upcoming updated ice(4) version 1.38.16-k. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation (cherry picked from commit e04c4b4a369df3f1dcbebbdf726193f02af60801) --- sys/conf/files.amd64 | 6 +++--- sys/conf/files.arm64 | 6 +++--- sys/conf/files.powerpc | 6 +++--- sys/contrib/dev/ice/LICENSE | 2 +- .../dev/ice/{ice-1.3.30.0.pkg => ice-1.3.35.0.pkg} | Bin 692660 -> 692776 bytes sys/modules/ice_ddp/Makefile | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 245b6a29b585..7180f4e0e83d 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -207,7 +207,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -216,8 +216,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ioat/ioat.c optional ioat pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index bb593a8f9a01..286cbc0ae566 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -238,7 +238,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -247,8 +247,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 2db6e15b70f5..3bb98c15d15c 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -82,7 +82,7 @@ dev/ice/irdma_di_if.m optional ice pci powerpc64 | ice pci powerpc64le \ dev/ice/ice_ddp_common.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp powerpc64 | ice pci powerpc64le \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ @@ -91,8 +91,8 @@ ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp powerpc64 | ice pci powerpc64le \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ixl/if_ixl.c optional ixl pci powerpc64 \ diff --git a/sys/contrib/dev/ice/LICENSE b/sys/contrib/dev/ice/LICENSE index 7faadfc55aac..97fe53c2d998 100644 --- a/sys/contrib/dev/ice/LICENSE +++ b/sys/contrib/dev/ice/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2021, Intel Corporation. +Copyright (c) 2006-2023, Intel Corporation. All rights reserved. Redistribution. Redistribution and use in binary form, without diff --git a/sys/contrib/dev/ice/ice-1.3.30.0.pkg b/sys/contrib/dev/ice/ice-1.3.35.0.pkg similarity index 88% rename from sys/contrib/dev/ice/ice-1.3.30.0.pkg rename to sys/contrib/dev/ice/ice-1.3.35.0.pkg index 454a2a6ea193..fc3e8ebc640f 100644 Binary files a/sys/contrib/dev/ice/ice-1.3.30.0.pkg and b/sys/contrib/dev/ice/ice-1.3.35.0.pkg differ diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index 41ed4ac92888..ad85bc2a9935 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,5 +1,5 @@ KMOD= ice_ddp -FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.30.0.pkg:ice_ddp:0x01031e00 +FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.35.0.pkg:ice_ddp:0x01032300 .include From nobody Wed Jul 31 04:38:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVH3dLkz5Sbtd; Wed, 31 Jul 2024 04:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVH24Tjz4XMr; Wed, 31 Jul 2024 04:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8W71mtOEdwLCA01YBeSNrNZ9O7KGPRBh8JpRcpHC164=; b=tluxuLDh7XhQVfPGgEaYwGJTPWmUI4rMf2TwRkhH2FQYU5X6gM3501oLVyTdH0J1nwqzJZ GvZRovcgGJqMLZk7hoWR6Z78VmcKvZhbR0PVHnuxDo2oRvFHS67VT+avXrdnqSS2naLE6Z 789Qag37QiUpY37wMD1NQLDflUXGm/0NfdqZvW10VSI9FjW7GQrtf6xpt5+6lEXaz0Mpgf rfJS1gSrqjlU8dacZvR7Sc+mmq2KdmSX/KWypn8XfiWtBbozE2EU8cy+hyf5Z2gUCFuxcy 0DIuAkqK6ua45tJJY7A1/2KDUhWPDtCxQJlPZ646zvfiH0/vG9c3/NaGcesn2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400695; a=rsa-sha256; cv=none; b=Jw3KeMVzi1FxkTVjE9soaA/v9FXRwz6IbkA61w8fFe2jVxKtY8fFNg0999TCM8Vu9KcrMl QcNPkZO58R4KtuaRdbPXExsc4p2+bQaM1lLor4Mxm9oXWRIXdKdopIOlvKjqRdmmpRumKi jonc4lfzuVHDkqU35wUXyK6CekH6oUnGv7qFaW4Pj8B2703m8jshgWvXmQ9jB6MGMxji5e uSi5sYDPar1h1l8pKqFxDCmDJ0Kw5aSF8a6jfBucEEpAVHN87jRaqxsm+Qeo8qFQJPgOXF 18dPXjOj24ciBkna0dfV0WRFYvL79X1vo5u45knApSKn8jLPNDiZnLHitm2JEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8W71mtOEdwLCA01YBeSNrNZ9O7KGPRBh8JpRcpHC164=; b=dC/cWdynjE06Q2fIR58txlFDEQRl+3I04VKUyLsmt1hGNL70VneAxvXMHy1R0b0j9mtBHL wC7VmyS3pYxEbqkOZO0auV9bfJVqrzWJMZZhFDNwoifjXqZ8QfyR2vnxkcP+nH5j4x6JSN 9TxQww+Dv+4ComqT/hmZeOE5FdGomiuSHCt9YSV+y8kTaXAGSIdfpVppgdtpupozhod4AR kEgV927kRZfUawrdiMVoVzYxQWBQzH+62eyK//RVm/PMa48Jxzm7WG4eoHyUWJ34CmZ9ME 8CkR1ka0HaDUsxbz59CrfwVyIn81HBvN3feaEi+pypzJ+3iQmLJipYIwaBIlew== 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 4WYfVH1g3Xzn3V; Wed, 31 Jul 2024 04:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cFnk068380; Wed, 31 Jul 2024 04:38:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cFaT068377; Wed, 31 Jul 2024 04:38:15 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:15 GMT Message-Id: <202407310438.46V4cFaT068377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: f36e1b88dbea - stable/13 - ice(4): Update to 1.38.16-k List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f36e1b88dbeadbd17b2d38e7172e8cad81198a53 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=f36e1b88dbeadbd17b2d38e7172e8cad81198a53 commit f36e1b88dbeadbd17b2d38e7172e8cad81198a53 Author: Eric Joyner AuthorDate: 2023-08-24 23:26:13 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 04:29:07 +0000 ice(4): Update to 1.38.16-k New features - Add sysctl "link_active_on_if_down" (defaults to 1 to match previous behavior): set this to 0 to have the driver bring the physical link down when the interface is brought administratively down - Add sysctl "temp" to read chip temperature on E810 devices; this requires a 4.30 or newer NVM (see package sysutils/intel-nvmupdate-100g) Bug fixes and general changes - (linked to irdma) properly propagate PF reset request from irdma driver - (linked to irdma) properly notify irdma of an impending PF reset - (linked to irdma) move Protocol Engine error handling to irdma - Print log message when using a DDP that doesn't support the "TX balancing" mode - Block LLDP agent configuration when DSCP QoS mode is enabled - Fix kernel panic when updating NVM when adapter is in the "TX balancing" mode - Remove ice_sbq_cmd.h since it's unused - Fix LLDP RX filter to still allow LLDP frames to be received by SW after a PF reset in SW LLDP mode - Add ice_if_needs_restart handler in order to fix a bad VLAN and link down interaction - Issue PF reset during unload - nvmupdate process fixes - Use pci_msix_table_bar() to get MSI-X bar index at runtime instead of hardcoding it Signed-off-by: Eric Joyner Reviewed by: anzhu@netapp.com Sponsored by: Intel Corporation, NetApp Differential Revision: https://reviews.freebsd.org/D41655 (cherry picked from commit 9c30461dd25bac49045acbeac10e00b6cc13d2bc) --- sys/dev/ice/ice_adminq_cmd.h | 123 ++++++---- sys/dev/ice/ice_common.c | 490 +++++++++++++++++++++------------------- sys/dev/ice/ice_common.h | 6 +- sys/dev/ice/ice_controlq.c | 110 ++++----- sys/dev/ice/ice_controlq.h | 3 - sys/dev/ice/ice_dcb.c | 2 +- sys/dev/ice/ice_ddp_common.c | 4 + sys/dev/ice/ice_ddp_common.h | 1 + sys/dev/ice/ice_defs.h | 4 +- sys/dev/ice/ice_features.h | 2 + sys/dev/ice/ice_flow.c | 41 +++- sys/dev/ice/ice_flow.h | 6 +- sys/dev/ice/ice_fw_logging.c | 4 +- sys/dev/ice/ice_fwlog.c | 1 + sys/dev/ice/ice_lan_tx_rx.h | 1 - sys/dev/ice/ice_lib.c | 239 ++++++++++++++++++-- sys/dev/ice/ice_lib.h | 16 +- sys/dev/ice/ice_rdma.c | 16 ++ sys/dev/ice/ice_rdma.h | 80 ++++++- sys/dev/ice/ice_rdma_internal.h | 17 ++ sys/dev/ice/ice_sbq_cmd.h | 120 ---------- sys/dev/ice/ice_sched.c | 104 +++++++-- sys/dev/ice/ice_sched.h | 42 +++- sys/dev/ice/ice_strings.c | 4 + sys/dev/ice/ice_switch.c | 334 +++++++++++++++------------ sys/dev/ice/ice_switch.h | 86 ++++--- sys/dev/ice/ice_type.h | 112 ++++++++- sys/dev/ice/if_ice_iflib.c | 130 +++++++++-- sys/dev/ice/irdma_di_if.m | 5 + sys/dev/ice/irdma_if.m | 4 + sys/dev/ice/virtchnl.h | 2 +- 31 files changed, 1360 insertions(+), 749 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 710830e95a16..e4dc14b0162c 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -168,6 +168,7 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_LED 0x0061 #define ICE_AQC_CAPS_SDP 0x0062 #define ICE_AQC_CAPS_WR_CSR_PROT 0x0064 +#define ICE_AQC_CAPS_SENSOR_READING 0x0067 #define ICE_AQC_CAPS_LOGI_TO_PHYSI_PORT_MAP 0x0073 #define ICE_AQC_CAPS_SKU 0x0074 #define ICE_AQC_CAPS_PORT_MAP 0x0075 @@ -180,7 +181,8 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_EXT_TOPO_DEV_IMG3 0x0084 #define ICE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE 0x0085 #define ICE_AQC_CAPS_NAC_TOPOLOGY 0x0087 -#define ICE_AQC_CAPS_DYN_FLATTENING 0x0090 +#define ICE_AQC_CAPS_DYN_FLATTENING 0x008A +#define ICE_AQC_CAPS_OROM_RECOVERY_UPDATE 0x0090 #define ICE_AQC_CAPS_ROCEV2_LAG 0x0092 u8 major_ver; @@ -793,12 +795,30 @@ struct ice_aqc_sw_rules { __le32 addr_low; }; +/* Add switch rule response: + * Content of return buffer is same as the input buffer. The status field and + * LUT index are updated as part of the response + */ +struct ice_aqc_sw_rules_elem_hdr { + __le16 type; /* Switch rule type, one of T_... */ +#define ICE_AQC_SW_RULES_T_LKUP_RX 0x0 +#define ICE_AQC_SW_RULES_T_LKUP_TX 0x1 +#define ICE_AQC_SW_RULES_T_LG_ACT 0x2 +#define ICE_AQC_SW_RULES_T_VSI_LIST_SET 0x3 +#define ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR 0x4 +#define ICE_AQC_SW_RULES_T_PRUNE_LIST_SET 0x5 +#define ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR 0x6 + __le16 status; +}; + /* Add/Update/Get/Remove lookup Rx/Tx command/response entry * This structures describes the lookup rules and associated actions. "index" * is returned as part of a response to a successful Add command, and can be * used to identify the rule for Update/Get/Remove commands. */ struct ice_sw_rule_lkup_rx_tx { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 recipe_id; #define ICE_SW_RECIPE_LOGICAL_PORT_FWD 10 /* Source port for LOOKUP_RX and source VSI in case of LOOKUP_TX */ @@ -877,14 +897,17 @@ struct ice_sw_rule_lkup_rx_tx { * lookup-type */ __le16 hdr_len; - u8 hdr[STRUCT_HACK_VAR_LEN]; + u8 hdr_data[STRUCT_HACK_VAR_LEN]; }; +#pragma pack(1) /* Add/Update/Remove large action command/response entry * "index" is returned as part of a response to a successful Add command, and * can be used to identify the action for Update/Get/Remove commands. */ struct ice_sw_rule_lg_act { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 index; /* Index in large action table */ __le16 size; /* Max number of large actions */ @@ -939,50 +962,30 @@ struct ice_sw_rule_lg_act { #define ICE_LG_ACT_STAT_COUNT_M (0x7F << ICE_LG_ACT_STAT_COUNT_S) __le32 act[STRUCT_HACK_VAR_LEN]; /* array of size for actions */ }; +#pragma pack() +#pragma pack(1) /* Add/Update/Remove VSI list command/response entry * "index" is returned as part of a response to a successful Add command, and * can be used to identify the VSI list for Update/Get/Remove commands. */ struct ice_sw_rule_vsi_list { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 index; /* Index of VSI/Prune list */ __le16 number_vsi; __le16 vsi[STRUCT_HACK_VAR_LEN]; /* Array of number_vsi VSI numbers */ }; +#pragma pack() #pragma pack(1) /* Query VSI list command/response entry */ struct ice_sw_rule_vsi_list_query { __le16 index; - ice_declare_bitmap(vsi_list, ICE_MAX_VSI); + u8 vsi_list[DIVIDE_AND_ROUND_UP(ICE_MAX_VSI, BITS_PER_BYTE)]; }; #pragma pack() -#pragma pack(1) -/* Add switch rule response: - * Content of return buffer is same as the input buffer. The status field and - * LUT index are updated as part of the response - */ -struct ice_aqc_sw_rules_elem { - __le16 type; /* Switch rule type, one of T_... */ -#define ICE_AQC_SW_RULES_T_LKUP_RX 0x0 -#define ICE_AQC_SW_RULES_T_LKUP_TX 0x1 -#define ICE_AQC_SW_RULES_T_LG_ACT 0x2 -#define ICE_AQC_SW_RULES_T_VSI_LIST_SET 0x3 -#define ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR 0x4 -#define ICE_AQC_SW_RULES_T_PRUNE_LIST_SET 0x5 -#define ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR 0x6 - __le16 status; - union { - struct ice_sw_rule_lkup_rx_tx lkup_tx_rx; - struct ice_sw_rule_lg_act lg_act; - struct ice_sw_rule_vsi_list vsi_list; - struct ice_sw_rule_vsi_list_query vsi_list_query; - } pdata; -}; - -#pragma pack() - /* PFC Ignore (direct 0x0301) * The command and response use the same descriptor structure */ @@ -994,8 +997,8 @@ struct ice_aqc_pfc_ignore { u8 reserved[14]; }; -/* Set PFC Mode (direct 0x0303) - * Query PFC Mode (direct 0x0302) +/* Query PFC Mode (direct 0x0302) + * Set PFC Mode (direct 0x0303) */ struct ice_aqc_set_query_pfc_mode { u8 pfc_mode; @@ -1098,9 +1101,9 @@ struct ice_aqc_txsched_elem { u8 generic; #define ICE_AQC_ELEM_GENERIC_MODE_M 0x1 #define ICE_AQC_ELEM_GENERIC_PRIO_S 0x1 -#define ICE_AQC_ELEM_GENERIC_PRIO_M (0x7 << ICE_AQC_ELEM_GENERIC_PRIO_S) +#define ICE_AQC_ELEM_GENERIC_PRIO_M (0x7 << ICE_AQC_ELEM_GENERIC_PRIO_S) #define ICE_AQC_ELEM_GENERIC_SP_S 0x4 -#define ICE_AQC_ELEM_GENERIC_SP_M (0x1 << ICE_AQC_ELEM_GENERIC_SP_S) +#define ICE_AQC_ELEM_GENERIC_SP_M (0x1 << ICE_AQC_ELEM_GENERIC_SP_S) #define ICE_AQC_ELEM_GENERIC_ADJUST_VAL_S 0x5 #define ICE_AQC_ELEM_GENERIC_ADJUST_VAL_M \ (0x3 << ICE_AQC_ELEM_GENERIC_ADJUST_VAL_S) @@ -1673,6 +1676,32 @@ struct ice_aqc_set_mac_lb { u8 reserved[15]; }; +/* Get sensor reading (direct 0x0632) */ +struct ice_aqc_get_sensor_reading { + u8 sensor; +#define ICE_AQC_INT_TEMP_SENSOR 0x0 + u8 format; +#define ICE_AQC_INT_TEMP_FORMAT 0x0 + u8 reserved[6]; + __le32 addr_high; + __le32 addr_low; +}; + +/* Get sensor reading response (direct 0x0632) */ +struct ice_aqc_get_sensor_reading_resp { + union { + u8 raw[8]; + /* Output data for sensor 0x00, format 0x00 */ + struct { + s8 temp; + u8 temp_warning_threshold; + u8 temp_critical_threshold; + u8 temp_fatal_threshold; + u8 reserved[4]; + } s0f0; + } data; +}; + /* DNL Get Status command (indirect 0x0680) * Structure used for the response, the command uses the generic * ice_aqc_generic struct to pass a buffer address to the FW. @@ -2476,6 +2505,19 @@ struct ice_aqc_get_set_rss_keys { u8 extended_hash_key[ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE]; }; +enum ice_lut_type { + ICE_LUT_VSI = 0, + ICE_LUT_PF = 1, + ICE_LUT_GLOBAL = 2, + ICE_LUT_TYPE_MASK = 3 +}; + +enum ice_lut_size { + ICE_LUT_VSI_SIZE = 64, + ICE_LUT_GLOBAL_SIZE = 512, + ICE_LUT_PF_SIZE = 2048, +}; + /* Get/Set RSS LUT (indirect 0x0B05/0x0B03) */ struct ice_aqc_get_set_rss_lut { #define ICE_AQC_GSET_RSS_LUT_VSI_VALID BIT(15) @@ -2484,21 +2526,13 @@ struct ice_aqc_get_set_rss_lut { __le16 vsi_id; #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S 0 #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M \ - (0x3 << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) - -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_VSI 0 -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF 1 -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL 2 + (ICE_LUT_TYPE_MASK << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S 2 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M \ - (0x3 << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) + (ICE_LUT_TYPE_MASK << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128 128 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG 0 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512 512 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG 1 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K 2048 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG 2 #define ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S 4 @@ -2686,7 +2720,7 @@ struct ice_aqc_move_rdma_qset_buffer { }; /* Download Package (indirect 0x0C40) */ -/* Also used for Update Package (indirect 0x0C42 and 0x0C41) */ +/* Also used for Update Package (indirect 0x0C41 and 0x0C42) */ struct ice_aqc_download_pkg { u8 flags; #define ICE_AQC_DOWNLOAD_PKG_LAST_BUF 0x01 @@ -2989,6 +3023,8 @@ struct ice_aq_desc { struct ice_aqc_get_phy_caps get_phy; struct ice_aqc_set_phy_cfg set_phy; struct ice_aqc_restart_an restart_an; + struct ice_aqc_get_sensor_reading get_sensor_reading; + struct ice_aqc_get_sensor_reading_resp get_sensor_reading_resp; struct ice_aqc_dnl_get_status get_status; struct ice_aqc_dnl_run_command dnl_run; struct ice_aqc_dnl_call_command dnl_call; @@ -3239,6 +3275,7 @@ enum ice_adminq_opc { ice_aqc_opc_get_link_status = 0x0607, ice_aqc_opc_set_event_mask = 0x0613, ice_aqc_opc_set_mac_lb = 0x0620, + ice_aqc_opc_get_sensor_reading = 0x0632, ice_aqc_opc_dnl_get_status = 0x0680, ice_aqc_opc_dnl_run = 0x0681, ice_aqc_opc_dnl_call = 0x0682, diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index a3f50f251533..0df73583e137 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -343,6 +343,88 @@ ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size, return ICE_SUCCESS; } +/** + * ice_phy_maps_to_media + * @phy_type_low: PHY type low bits + * @phy_type_high: PHY type high bits + * @media_mask_low: media type PHY type low bitmask + * @media_mask_high: media type PHY type high bitmask + * + * Return true if PHY type [low|high] bits are only of media type PHY types + * [low|high] bitmask. + */ +static bool +ice_phy_maps_to_media(u64 phy_type_low, u64 phy_type_high, + u64 media_mask_low, u64 media_mask_high) +{ + /* check if a PHY type exist for media type */ + if (!(phy_type_low & media_mask_low || + phy_type_high & media_mask_high)) + return false; + + /* check that PHY types are only of media type */ + if (!(phy_type_low & ~media_mask_low) && + !(phy_type_high & ~media_mask_high)) + return true; + + return false; +} + +/** + * ice_set_media_type - Sets media type + * @pi: port information structure + * + * Set ice_port_info PHY media type based on PHY type. This should be called + * from Get PHY caps with media. + */ +static void ice_set_media_type(struct ice_port_info *pi) +{ + enum ice_media_type *media_type; + u64 phy_type_high, phy_type_low; + + phy_type_high = pi->phy.phy_type_high; + phy_type_low = pi->phy.phy_type_low; + media_type = &pi->phy.media_type; + + /* if no media, then media type is NONE */ + if (!(pi->phy.link_info.link_info & ICE_AQ_MEDIA_AVAILABLE)) + *media_type = ICE_MEDIA_NONE; + /* else if PHY types are only BASE-T, then media type is BASET */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_BASET_PHY_TYPE_LOW_M, 0)) + *media_type = ICE_MEDIA_BASET; + /* else if any PHY type is BACKPLANE, then media type is BACKPLANE */ + else if (phy_type_low & ICE_MEDIA_BP_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_BP_PHY_TYPE_HIGH_M) + *media_type = ICE_MEDIA_BACKPLANE; + /* else if PHY types are only optical, or optical and C2M, then media + * type is FIBER + */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_OPT_PHY_TYPE_LOW_M, 0) || + (phy_type_low & ICE_MEDIA_OPT_PHY_TYPE_LOW_M && + phy_type_low & ICE_MEDIA_C2M_PHY_TYPE_LOW_M)) + *media_type = ICE_MEDIA_FIBER; + /* else if PHY types are only DA, or DA and C2C, then media type DA */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_DAC_PHY_TYPE_LOW_M, 0) || + (phy_type_low & ICE_MEDIA_DAC_PHY_TYPE_LOW_M && + (phy_type_low & ICE_MEDIA_C2C_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_C2C_PHY_TYPE_HIGH_M))) + *media_type = ICE_MEDIA_DA; + /* else if PHY types are only C2M or only C2C, then media is AUI */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_C2M_PHY_TYPE_LOW_M, + ICE_MEDIA_C2M_PHY_TYPE_HIGH_M) || + ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_C2C_PHY_TYPE_LOW_M, + ICE_MEDIA_C2C_PHY_TYPE_HIGH_M)) + *media_type = ICE_MEDIA_AUI; + + else + *media_type = ICE_MEDIA_UNKNOWN; +} + /** * ice_aq_get_phy_caps - returns PHY capabilities * @pi: port information structure @@ -434,6 +516,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, ice_memcpy(pi->phy.link_info.module_type, &pcaps->module_type, sizeof(pi->phy.link_info.module_type), ICE_NONDMA_TO_NONDMA); + ice_set_media_type(pi); + ice_debug(hw, ICE_DBG_LINK, "%s: media_type = 0x%x\n", prefix, + pi->phy.media_type); } return status; @@ -513,156 +598,6 @@ ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number, return ICE_ERR_DOES_NOT_EXIST; } -/** - * ice_is_media_cage_present - * @pi: port information structure - * - * Returns true if media cage is present, else false. If no cage, then - * media type is backplane or BASE-T. - */ -static bool ice_is_media_cage_present(struct ice_port_info *pi) -{ - struct ice_aqc_get_link_topo *cmd; - struct ice_aq_desc desc; - - cmd = &desc.params.get_link_topo; - - ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_link_topo); - - cmd->addr.topo_params.node_type_ctx = - (ICE_AQC_LINK_TOPO_NODE_CTX_PORT << - ICE_AQC_LINK_TOPO_NODE_CTX_S); - - /* set node type */ - cmd->addr.topo_params.node_type_ctx |= - (ICE_AQC_LINK_TOPO_NODE_TYPE_M & - ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE); - - /* Node type cage can be used to determine if cage is present. If AQC - * returns error (ENOENT), then no cage present. If no cage present then - * connection type is backplane or BASE-T. - */ - return ice_aq_get_netlist_node(pi->hw, cmd, NULL, NULL); -} - -/** - * ice_get_media_type - Gets media type - * @pi: port information structure - */ -static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) -{ - struct ice_link_status *hw_link_info; - - if (!pi) - return ICE_MEDIA_UNKNOWN; - - hw_link_info = &pi->phy.link_info; - if (hw_link_info->phy_type_low && hw_link_info->phy_type_high) - /* If more than one media type is selected, report unknown */ - return ICE_MEDIA_UNKNOWN; - - if (hw_link_info->phy_type_low) { - /* 1G SGMII is a special case where some DA cable PHYs - * may show this as an option when it really shouldn't - * be since SGMII is meant to be between a MAC and a PHY - * in a backplane. Try to detect this case and handle it - */ - if (hw_link_info->phy_type_low == ICE_PHY_TYPE_LOW_1G_SGMII && - (hw_link_info->module_type[ICE_AQC_MOD_TYPE_IDENT] == - ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_ACTIVE || - hw_link_info->module_type[ICE_AQC_MOD_TYPE_IDENT] == - ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_PASSIVE)) - return ICE_MEDIA_DA; - - switch (hw_link_info->phy_type_low) { - case ICE_PHY_TYPE_LOW_1000BASE_SX: - case ICE_PHY_TYPE_LOW_1000BASE_LX: - case ICE_PHY_TYPE_LOW_10GBASE_SR: - case ICE_PHY_TYPE_LOW_10GBASE_LR: - case ICE_PHY_TYPE_LOW_25GBASE_SR: - case ICE_PHY_TYPE_LOW_25GBASE_LR: - case ICE_PHY_TYPE_LOW_40GBASE_SR4: - case ICE_PHY_TYPE_LOW_40GBASE_LR4: - case ICE_PHY_TYPE_LOW_50GBASE_SR2: - case ICE_PHY_TYPE_LOW_50GBASE_LR2: - case ICE_PHY_TYPE_LOW_50GBASE_SR: - case ICE_PHY_TYPE_LOW_50GBASE_FR: - case ICE_PHY_TYPE_LOW_50GBASE_LR: - case ICE_PHY_TYPE_LOW_100GBASE_SR4: - case ICE_PHY_TYPE_LOW_100GBASE_LR4: - case ICE_PHY_TYPE_LOW_100GBASE_SR2: - case ICE_PHY_TYPE_LOW_100GBASE_DR: - return ICE_MEDIA_FIBER; - case ICE_PHY_TYPE_LOW_10G_SFI_AOC_ACC: - case ICE_PHY_TYPE_LOW_25G_AUI_AOC_ACC: - case ICE_PHY_TYPE_LOW_40G_XLAUI_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_LAUI2_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_AUI2_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_AUI1_AOC_ACC: - case ICE_PHY_TYPE_LOW_100G_CAUI4_AOC_ACC: - case ICE_PHY_TYPE_LOW_100G_AUI4_AOC_ACC: - return ICE_MEDIA_FIBER; - case ICE_PHY_TYPE_LOW_100BASE_TX: - case ICE_PHY_TYPE_LOW_1000BASE_T: - case ICE_PHY_TYPE_LOW_2500BASE_T: - case ICE_PHY_TYPE_LOW_5GBASE_T: - case ICE_PHY_TYPE_LOW_10GBASE_T: - case ICE_PHY_TYPE_LOW_25GBASE_T: - return ICE_MEDIA_BASET; - case ICE_PHY_TYPE_LOW_10G_SFI_DA: - case ICE_PHY_TYPE_LOW_25GBASE_CR: - case ICE_PHY_TYPE_LOW_25GBASE_CR_S: - case ICE_PHY_TYPE_LOW_25GBASE_CR1: - case ICE_PHY_TYPE_LOW_40GBASE_CR4: - case ICE_PHY_TYPE_LOW_50GBASE_CR2: - case ICE_PHY_TYPE_LOW_50GBASE_CP: - case ICE_PHY_TYPE_LOW_100GBASE_CR4: - case ICE_PHY_TYPE_LOW_100GBASE_CR_PAM4: - case ICE_PHY_TYPE_LOW_100GBASE_CP2: - return ICE_MEDIA_DA; - case ICE_PHY_TYPE_LOW_25G_AUI_C2C: - case ICE_PHY_TYPE_LOW_40G_XLAUI: - case ICE_PHY_TYPE_LOW_50G_LAUI2: - case ICE_PHY_TYPE_LOW_50G_AUI2: - case ICE_PHY_TYPE_LOW_50G_AUI1: - case ICE_PHY_TYPE_LOW_100G_AUI4: - case ICE_PHY_TYPE_LOW_100G_CAUI4: - if (ice_is_media_cage_present(pi)) - return ICE_MEDIA_AUI; - /* fall-through */ - case ICE_PHY_TYPE_LOW_1000BASE_KX: - case ICE_PHY_TYPE_LOW_2500BASE_KX: - case ICE_PHY_TYPE_LOW_2500BASE_X: - case ICE_PHY_TYPE_LOW_5GBASE_KR: - case ICE_PHY_TYPE_LOW_10GBASE_KR_CR1: - case ICE_PHY_TYPE_LOW_10G_SFI_C2C: - case ICE_PHY_TYPE_LOW_25GBASE_KR: - case ICE_PHY_TYPE_LOW_25GBASE_KR1: - case ICE_PHY_TYPE_LOW_25GBASE_KR_S: - case ICE_PHY_TYPE_LOW_40GBASE_KR4: - case ICE_PHY_TYPE_LOW_50GBASE_KR_PAM4: - case ICE_PHY_TYPE_LOW_50GBASE_KR2: - case ICE_PHY_TYPE_LOW_100GBASE_KR4: - case ICE_PHY_TYPE_LOW_100GBASE_KR_PAM4: - return ICE_MEDIA_BACKPLANE; - } - } else { - switch (hw_link_info->phy_type_high) { - case ICE_PHY_TYPE_HIGH_100G_AUI2: - case ICE_PHY_TYPE_HIGH_100G_CAUI2: - if (ice_is_media_cage_present(pi)) - return ICE_MEDIA_AUI; - /* fall-through */ - case ICE_PHY_TYPE_HIGH_100GBASE_KR2_PAM4: - return ICE_MEDIA_BACKPLANE; - case ICE_PHY_TYPE_HIGH_100G_CAUI2_AOC_ACC: - case ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC: - return ICE_MEDIA_FIBER; - } - } - return ICE_MEDIA_UNKNOWN; -} - #define ice_get_link_status_datalen(hw) ICE_GET_LINK_STATUS_DATALEN_V1 /** @@ -681,7 +616,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, struct ice_aqc_get_link_status_data link_data = { 0 }; struct ice_aqc_get_link_status *resp; struct ice_link_status *li_old, *li; - enum ice_media_type *hw_media_type; struct ice_fc_info *hw_fc_info; bool tx_pause, rx_pause; struct ice_aq_desc desc; @@ -694,7 +628,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, hw = pi->hw; li_old = &pi->phy.link_info_old; - hw_media_type = &pi->phy.media_type; li = &pi->phy.link_info; hw_fc_info = &pi->fc; @@ -716,7 +649,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, li->link_speed = LE16_TO_CPU(link_data.link_speed); li->phy_type_low = LE64_TO_CPU(link_data.phy_type_low); li->phy_type_high = LE64_TO_CPU(link_data.phy_type_high); - *hw_media_type = ice_get_media_type(pi); li->link_info = link_data.link_info; li->link_cfg_err = link_data.link_cfg_err; li->an_info = link_data.an_info; @@ -747,7 +679,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, (unsigned long long)li->phy_type_low); ice_debug(hw, ICE_DBG_LINK, " phy_type_high = 0x%llx\n", (unsigned long long)li->phy_type_high); - ice_debug(hw, ICE_DBG_LINK, " media_type = 0x%x\n", *hw_media_type); ice_debug(hw, ICE_DBG_LINK, " link_info = 0x%x\n", li->link_info); ice_debug(hw, ICE_DBG_LINK, " link_cfg_err = 0x%x\n", li->link_cfg_err); ice_debug(hw, ICE_DBG_LINK, " an_info = 0x%x\n", li->an_info); @@ -1066,7 +997,8 @@ enum ice_status ice_init_hw(struct ice_hw *hw) if (status) goto err_unroll_cqinit; - hw->port_info = (struct ice_port_info *) + if (!hw->port_info) + hw->port_info = (struct ice_port_info *) ice_malloc(hw, sizeof(*hw->port_info)); if (!hw->port_info) { status = ICE_ERR_NO_MEMORY; @@ -1205,7 +1137,7 @@ void ice_deinit_hw(struct ice_hw *hw) */ enum ice_status ice_check_reset(struct ice_hw *hw) { - u32 cnt, reg = 0, grst_timeout, uld_mask; + u32 cnt, reg = 0, grst_timeout, uld_mask, reset_wait_cnt; /* Poll for Device Active state in case a recent CORER, GLOBR, * or EMPR has occurred. The grst delay value is in 100ms units. @@ -1237,8 +1169,10 @@ enum ice_status ice_check_reset(struct ice_hw *hw) uld_mask = ICE_RESET_DONE_MASK | (hw->func_caps.common_cap.iwarp ? GLNVM_ULD_PE_DONE_M : 0); + reset_wait_cnt = ICE_PF_RESET_WAIT_COUNT; + /* Device is Active; check Global Reset processes are done */ - for (cnt = 0; cnt < ICE_PF_RESET_WAIT_COUNT; cnt++) { + for (cnt = 0; cnt < reset_wait_cnt; cnt++) { reg = rd32(hw, GLNVM_ULD) & uld_mask; if (reg == uld_mask) { ice_debug(hw, ICE_DBG_INIT, "Global reset processes done. %d\n", cnt); @@ -1247,7 +1181,7 @@ enum ice_status ice_check_reset(struct ice_hw *hw) ice_msec_delay(10, true); } - if (cnt == ICE_PF_RESET_WAIT_COUNT) { + if (cnt == reset_wait_cnt) { ice_debug(hw, ICE_DBG_INIT, "Wait for Reset Done timed out. GLNVM_ULD = 0x%x\n", reg); return ICE_ERR_RESET_FAILED; @@ -1265,7 +1199,7 @@ enum ice_status ice_check_reset(struct ice_hw *hw) */ static enum ice_status ice_pf_reset(struct ice_hw *hw) { - u32 cnt, reg; + u32 cnt, reg, reset_wait_cnt, cfg_lock_timeout; /* If at function entry a global reset was already in progress, i.e. * state is not 'device active' or any of the reset done bits are not @@ -1290,8 +1224,10 @@ static enum ice_status ice_pf_reset(struct ice_hw *hw) * timeout plus the PFR timeout which will account for a possible reset * that is occurring during a download package operation. */ - for (cnt = 0; cnt < ICE_GLOBAL_CFG_LOCK_TIMEOUT + - ICE_PF_RESET_WAIT_COUNT; cnt++) { + reset_wait_cnt = ICE_PF_RESET_WAIT_COUNT; + cfg_lock_timeout = ICE_GLOBAL_CFG_LOCK_TIMEOUT; + + for (cnt = 0; cnt < cfg_lock_timeout + reset_wait_cnt; cnt++) { reg = rd32(hw, PFGEN_CTRL); if (!(reg & PFGEN_CTRL_PFSWR_M)) break; @@ -1299,7 +1235,7 @@ static enum ice_status ice_pf_reset(struct ice_hw *hw) ice_msec_delay(1, true); } - if (cnt == ICE_PF_RESET_WAIT_COUNT) { + if (cnt == cfg_lock_timeout + reset_wait_cnt) { ice_debug(hw, ICE_DBG_INIT, "PF reset polling failed to complete.\n"); return ICE_ERR_RESET_FAILED; } @@ -2452,6 +2388,11 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, true : false; ice_debug(hw, ICE_DBG_INIT, "%s: nvm_unified_update = %d\n", prefix, caps->nvm_unified_update); + caps->netlist_auth = + (number & ICE_NVM_MGMT_NETLIST_AUTH_SUPPORT) ? + true : false; + ice_debug(hw, ICE_DBG_INIT, "%s: netlist_auth = %d\n", prefix, + caps->netlist_auth); break; case ICE_AQC_CAPS_CEM: caps->mgmt_cem = (number == 1); @@ -2534,6 +2475,8 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, (phys_id & ICE_EXT_TOPO_DEV_IMG_LOAD_EN) != 0; caps->ext_topo_dev_img_prog_en[index] = (phys_id & ICE_EXT_TOPO_DEV_IMG_PROG_EN) != 0; + caps->ext_topo_dev_img_ver_schema[index] = + (phys_id & ICE_EXT_TOPO_DEV_IMG_VER_SCHEMA) != 0; ice_debug(hw, ICE_DBG_INIT, "%s: ext_topo_dev_img_ver_high[%d] = %d\n", prefix, index, @@ -2554,6 +2497,10 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, "%s: ext_topo_dev_img_prog_en[%d] = %d\n", prefix, index, caps->ext_topo_dev_img_prog_en[index]); + ice_debug(hw, ICE_DBG_INIT, + "%s: ext_topo_dev_img_ver_schema[%d] = %d\n", + prefix, index, + caps->ext_topo_dev_img_ver_schema[index]); break; } case ICE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE: @@ -2564,6 +2511,11 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, ice_debug(hw, ICE_DBG_INIT, "%s: dyn_flattening_en = %d\n", prefix, caps->dyn_flattening_en); break; + case ICE_AQC_CAPS_OROM_RECOVERY_UPDATE: + caps->orom_recovery_update = (number == 1); + ice_debug(hw, ICE_DBG_INIT, "%s: orom_recovery_update = %d\n", + prefix, caps->orom_recovery_update); + break; default: /* Not one of the recognized common capabilities */ found = false; @@ -2782,6 +2734,26 @@ ice_parse_nac_topo_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, dev_p->nac_topo.id); } +/** + * ice_parse_sensor_reading_cap - Parse ICE_AQC_CAPS_SENSOR_READING cap + * @hw: pointer to the HW struct + * @dev_p: pointer to device capabilities structure + * @cap: capability element to parse + * + * Parse ICE_AQC_CAPS_SENSOR_READING for device capability for reading + * enabled sensors. + */ +static void +ice_parse_sensor_reading_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, + struct ice_aqc_list_caps_elem *cap) +{ + dev_p->supported_sensors = LE32_TO_CPU(cap->number); + + ice_debug(hw, ICE_DBG_INIT, + "dev caps: supported sensors (bitmap) = 0x%x\n", + dev_p->supported_sensors); +} + /** * ice_parse_dev_caps - Parse device capabilities * @hw: pointer to the HW struct @@ -2827,6 +2799,9 @@ ice_parse_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, case ICE_AQC_CAPS_NAC_TOPOLOGY: ice_parse_nac_topo_dev_caps(hw, dev_p, &cap_resp[i]); break; + case ICE_AQC_CAPS_SENSOR_READING: + ice_parse_sensor_reading_cap(hw, dev_p, &cap_resp[i]); + break; default: /* Don't list common capabilities as unknown */ if (!found) @@ -3776,8 +3751,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, break; case ICE_FEC_DIS_AUTO: /* Set No FEC and auto FEC */ - if (!ice_fw_supports_fec_dis_auto(hw)) - return ICE_ERR_NOT_SUPPORTED; + if (!ice_fw_supports_fec_dis_auto(hw)) { + status = ICE_ERR_NOT_SUPPORTED; + goto out; + } cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS; /* fall-through */ case ICE_FEC_AUTO: @@ -3852,6 +3829,7 @@ enum ice_status ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, struct ice_sq_cd *cd) { + enum ice_status status = ICE_ERR_AQ_ERROR; struct ice_aqc_restart_an *cmd; struct ice_aq_desc desc; @@ -3866,7 +3844,16 @@ ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, else cmd->cmd_flags &= ~ICE_AQC_RESTART_AN_LINK_ENABLE; - return ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); + status = ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); + if (status) + return status; + + if (ena_link) + pi->phy.curr_user_phy_cfg.caps |= ICE_AQC_PHY_EN_LINK; + else + pi->phy.curr_user_phy_cfg.caps &= ~ICE_AQC_PHY_EN_LINK; + + return ICE_SUCCESS; } /** @@ -4062,6 +4049,51 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, return ICE_SUCCESS; } +static u16 ice_lut_type_to_size(u16 lut_type) +{ + switch (lut_type) { + case ICE_LUT_VSI: + return ICE_LUT_VSI_SIZE; + case ICE_LUT_GLOBAL: + return ICE_LUT_GLOBAL_SIZE; + case ICE_LUT_PF: + return ICE_LUT_PF_SIZE; + default: + return 0; + } +} + +static u16 ice_lut_size_to_flag(u16 lut_size) +{ + u16 f = 0; + + switch (lut_size) { + case ICE_LUT_GLOBAL_SIZE: + f = ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG; + break; + case ICE_LUT_PF_SIZE: + f = ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG; + break; + default: + break; + } + return f << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S; +} + +int ice_lut_size_to_type(int lut_size) +{ + switch (lut_size) { + case ICE_LUT_VSI_SIZE: + return ICE_LUT_VSI; + case ICE_LUT_GLOBAL_SIZE: + return ICE_LUT_GLOBAL; + case ICE_LUT_PF_SIZE: + return ICE_LUT_PF; + default: + return -1; + } +} + /** * __ice_aq_get_set_rss_lut * @hw: pointer to the hardware structure @@ -4073,7 +4105,7 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, static enum ice_status __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *params, bool set) { - u16 flags = 0, vsi_id, lut_type, lut_size, glob_lut_idx, vsi_handle; + u16 flags, vsi_id, lut_type, lut_size, glob_lut_idx = 0, vsi_handle; struct ice_aqc_get_set_rss_lut *cmd_resp; struct ice_aq_desc desc; enum ice_status status; @@ -4084,16 +4116,22 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params vsi_handle = params->vsi_handle; lut = params->lut; + lut_type = params->lut_type; + lut_size = ice_lut_type_to_size(lut_type); + cmd_resp = &desc.params.get_set_rss_lut; + if (lut_type == ICE_LUT_GLOBAL) + glob_lut_idx = params->global_lut_id; - if (!ice_is_vsi_valid(hw, vsi_handle) || !lut) + if (!lut || !lut_size || !ice_is_vsi_valid(hw, vsi_handle)) return ICE_ERR_PARAM; - lut_size = params->lut_size; - lut_type = params->lut_type; - glob_lut_idx = params->global_lut_id; - vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); + if (lut_size > params->lut_size) + return ICE_ERR_INVAL_SIZE; - cmd_resp = &desc.params.get_set_rss_lut; + if (set && lut_size != params->lut_size) + return ICE_ERR_PARAM; + + vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); if (set) { ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_rss_lut); @@ -4107,61 +4145,15 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params ICE_AQC_GSET_RSS_LUT_VSI_ID_M) | ICE_AQC_GSET_RSS_LUT_VSI_VALID); - switch (lut_type) { - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_VSI: - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF: - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL: - flags |= ((lut_type << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M); - break; - default: - status = ICE_ERR_PARAM; - goto ice_aq_get_set_rss_lut_exit; - } - - if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL) { - flags |= ((glob_lut_idx << ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S) & - ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_M); + flags = ice_lut_size_to_flag(lut_size) | + ((lut_type << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) & + ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M) | + ((glob_lut_idx << ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S) & + ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_M); - if (!set) - goto ice_aq_get_set_rss_lut_send; - } else if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) { - if (!set) - goto ice_aq_get_set_rss_lut_send; - } else { - goto ice_aq_get_set_rss_lut_send; - } - - /* LUT size is only valid for Global and PF table types */ - switch (lut_size) { - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128: - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512: - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K: - if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) { - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - } - /* fall-through */ - default: - status = ICE_ERR_PARAM; - goto ice_aq_get_set_rss_lut_exit; - } - -ice_aq_get_set_rss_lut_send: cmd_resp->flags = CPU_TO_LE16(flags); status = ice_aq_send_cmd(hw, &desc, lut, lut_size, NULL); - -ice_aq_get_set_rss_lut_exit: + params->lut_size = LE16_TO_CPU(desc.datalen); return status; } @@ -5155,7 +5147,7 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle, q_ctx->q_teid = LE32_TO_CPU(node.node_teid); /* add a leaf node into scheduler tree queue layer */ - status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node); + status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node, NULL); if (!status) status = ice_sched_replay_q_bw(pi, q_ctx); @@ -5390,7 +5382,7 @@ ice_ena_vsi_rdma_qset(struct ice_port_info *pi, u16 vsi_handle, u8 tc, for (i = 0; i < num_qsets; i++) { node.node_teid = buf->rdma_qsets[i].qset_teid; status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, - &node); *** 3425 LINES SKIPPED *** From nobody Wed Jul 31 04:38:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVJ5t1Xz5Sbny; Wed, 31 Jul 2024 04:38: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVJ2y5kz4X5r; Wed, 31 Jul 2024 04:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L0xwpdJ33VncAK9KAldTt/oOo1D7W0eSvsOJ/fPnQC0=; b=MspP3E2PCnnXKXD94UfeXjWJU7L0ZjfcxO0QXVJnyV96G09j2VgEEjIzXvTfNokcUFVzkc aU6DFeavVkiPWoZHyhev0OQi7OUoUd9KGrn+9WC3MabJVl7p/1eGeEkxMK7v9v34IQGvX/ 1qxX/Lw0dL/wF2wP2J4JZoW9bCRvy7+G76uG3aKpHUtbHRNdaavpEv297zGB8VQbrwDyWm GdxUNrg1sXlTc2SolqCN+sRLWbUYeAVJ0RoS3C7GOpHFeN10Mu1jWY1CQhSgscMD2j+L43 5jKj4kyRQaOHcdEeVi92kMFR2Wawq9a/VagfcbbuRXa087OIk4p3TKkgGPOn+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400696; a=rsa-sha256; cv=none; b=cE0yblCbc72hu7o0pAIFiq6AHcSFNYOB8LhGf/kso9tEy3nz2AhTqqOc1D3y0yFNT/IC5p w9dLOlTH6R9OpuX4R1aKU2cGaoNKq9gRzsCsMpPJ7yQJFJWQ0dduHtmuCEWnXj4ukzOyvi rVe2md1vqy9k7qZ6YreQOHdy5dMvvmEhq+m2QJwil4sOl07TbDEyxc80KvBS4zyNxnvuOt tB0LRrLrUtSiuem0/VzrkveGh1NDM8yaowUN65DWbhz9B6r/sk1dalaJQMjdFTzSG2u3mF 439hkgc490A4O7OJbVkZoGXDijcTHUXeFSojtNLYpDTBntgAWyfjv9TYWCj9aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L0xwpdJ33VncAK9KAldTt/oOo1D7W0eSvsOJ/fPnQC0=; b=Vr2RWL3AsbQBmANkixQnnlVPzuLZJDDhVV+4Eh1yPvrYxZzm4grniP8U3lz9zbKIBIyhk9 IYjjY7AqdzwPwE/ahoSFM4SzpoD1XiaMy273F7U4qBaMjhp9Jheu8i+N0CjECY7xJ3kWqz 9/5W0SgEiQ53KyttJNvaHE9GR+dTG3aulYnYCv6F4xtmuPSFtrUpPpC8cUGH4wBt3ZDp/4 ik7eS2zwU60DtQrkadRmyRaSCsSEQaIQU0Yk5ZjrW9DSGoZmDGjS1i3fJswLTYwBZvQ0Xd lVIp9uAK2SrtWfkBTG/qJsMQlVOdLCaXEjMF1bWmaX5TeTWWWx22fntSTMiphA== 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 4WYfVJ2YQHzmMn; Wed, 31 Jul 2024 04:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cGwt068422; Wed, 31 Jul 2024 04:38:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cGxL068419; Wed, 31 Jul 2024 04:38:16 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:16 GMT Message-Id: <202407310438.46V4cGxL068419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 3795e83c28e8 - stable/13 - ice_ddp: Update package to 1.3.36.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3795e83c28e89c4cc2d1485c1f9b72458195b5ed Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=3795e83c28e89c4cc2d1485c1f9b72458195b5ed commit 3795e83c28e89c4cc2d1485c1f9b72458195b5ed Author: Eric Joyner AuthorDate: 2024-02-13 06:39:21 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 04:29:15 +0000 ice_ddp: Update package to 1.3.36.0 This is intended to be used with the upcoming ice 1.39.13-k driver update, but is still backwards compatible with previous versions of the driver. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation (cherry picked from commit 768329961dc0c041f7647f1c4549944a2ca168aa) --- sys/conf/files.amd64 | 6 +++--- sys/conf/files.arm64 | 6 +++--- sys/conf/files.powerpc | 6 +++--- .../dev/ice/{ice-1.3.35.0.pkg => ice-1.3.36.0.pkg} | Bin 692776 -> 692776 bytes sys/modules/ice_ddp/Makefile | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 7180f4e0e83d..48f2d8408007 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -207,7 +207,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032400 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -216,8 +216,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.36.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.36.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ioat/ioat.c optional ioat pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 286cbc0ae566..2aaa19a8c7b7 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -238,7 +238,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032400 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -247,8 +247,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.36.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.36.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 3bb98c15d15c..22016c77e049 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -82,7 +82,7 @@ dev/ice/irdma_di_if.m optional ice pci powerpc64 | ice pci powerpc64le \ dev/ice/ice_ddp_common.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp powerpc64 | ice pci powerpc64le \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032400 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ @@ -91,8 +91,8 @@ ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp powerpc64 | ice pci powerpc64le \ - dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.36.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.36.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ixl/if_ixl.c optional ixl pci powerpc64 \ diff --git a/sys/contrib/dev/ice/ice-1.3.35.0.pkg b/sys/contrib/dev/ice/ice-1.3.36.0.pkg similarity index 98% rename from sys/contrib/dev/ice/ice-1.3.35.0.pkg rename to sys/contrib/dev/ice/ice-1.3.36.0.pkg index fc3e8ebc640f..ce5dbf41f557 100644 Binary files a/sys/contrib/dev/ice/ice-1.3.35.0.pkg and b/sys/contrib/dev/ice/ice-1.3.36.0.pkg differ diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index ad85bc2a9935..7329f0897325 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,5 +1,5 @@ KMOD= ice_ddp -FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.35.0.pkg:ice_ddp:0x01032300 +FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.36.0.pkg:ice_ddp:0x01032400 .include From nobody Wed Jul 31 04:38:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVK5SLqz5SbXD; Wed, 31 Jul 2024 04:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVK3gqzz4X3S; Wed, 31 Jul 2024 04:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dtETTZ/GzDuFTfiE5MTdyQ7+03/5gLuM2Um6SRiR4dE=; b=AxnISpFpOV27aWw1ZngZCHKQVTBgOaMR3oV/4WngzW5rlEtPQ5ozbOyRgAThtKdszhx89R Lz+jkCkC4bOx8ftz84U0Qjl+cShuhlv7xFkZ+2aLHOS7wntn8NWORzZ/iJh7h0Wy2MHjfm YR29a/5CNT2zPHyCjCwGfqLNbIbIty3gkUhteFr6Nvs02cI++ur8E+8fgYFgesdSZD2Voz GBIgbNaAjJ/Dx9vpTcvI2vJUY8C9tCkVAqwOyz/m09VaLw84BuFACUY5p+8H62K4TVdHKi Weyemn95dGOYkc/a+6DFLBMGH4LVXldbfgVP6SwohrQ3IYvlLtxOTu0CNyJ8bA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400697; a=rsa-sha256; cv=none; b=mJvynBmsslCnarEEEsJZ+WuUl51aR+oY3UBmKmeJmt+1QRBwjMjbTTgSTvYpSaighw1GYs yBpOzMj5hcO9gelvoXjm61+KyumSWKCqtsIzBG4Zzofi1zewwLnuRTJsZsIn4BOKszAF1H 8mR4tqFOaor+eiohXUanSHgcWKmfaCRlnPFPyykuMhqPxsjUUH13FOWI3Lluw9u0YFriLn WiWq12UT9RSf1zmr9A1/7E8dg3WkNND9ell/+KO4fg8ZByzGgZEhUCvnPZrB/fxwPk6aZW IOkNSi7rI85kCiClPfNyyB9D0ogYsLAUDKr2EJXgACRUP7gUJuH7+dl3E/zchQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dtETTZ/GzDuFTfiE5MTdyQ7+03/5gLuM2Um6SRiR4dE=; b=QJOO0i7Ybtq45WT3fEV8P4dnBmATnJWfnF8UkR3QmpnsI43vO/Yq3smTaVNOSxHl0si2Nh PrM/NYrmhhdekiauOCxXi0wF1iB+1j2kEDcjUxKeD54g1usEUm1eq6A/aI2ya1l5b9kiRv 9QlQ8Jgnvst+4z3V7plrIP1zZJQKPp5bs1OIae3VG1vFK7Fk6hmtFWVslpjTnlWnSzKjh7 PSVteB44I4BQVLASr7JbmKfre7rQVQvkJ0OklheMA4TPmBIf2n96pfT+bY8wY1nlnnTdso jMZcQO466pHVmSOjoVt+/Py1RneWquK2fpQ61MZ1qsTGxm0Tb+PNlpDHZh3dOw== 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 4WYfVK3FVZzm9p; Wed, 31 Jul 2024 04:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cH3g068461; Wed, 31 Jul 2024 04:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cHTb068458; Wed, 31 Jul 2024 04:38:17 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:17 GMT Message-Id: <202407310438.46V4cHTb068458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 0bf3573a5406 - stable/13 - iflib: Fix compiler warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0bf3573a5406029070ce2d24ab0da24d71a209a9 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=0bf3573a5406029070ce2d24ab0da24d71a209a9 commit 0bf3573a5406029070ce2d24ab0da24d71a209a9 Author: Stephen J. Kiernan AuthorDate: 2024-04-03 20:21:55 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 04:29:17 +0000 iflib: Fix compiler warnings Some of the QUAD sysctls are actually for unsigned quad values. Switch to using UQUAD instead, as that is meant for unsigned. Reviewed by: erj, jhb Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44620 (cherry picked from commit 303dea74c2cb3a41fba455fce8577993e637c3da) --- sys/net/iflib.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index d6dcb09312db..cdf9d4889565 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -7074,32 +7074,32 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD, &txq->ift_task.gt_cpu, 0, "cpu this queue is bound to"); #if MEMORY_LOGGING - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txq_dequeued", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_dequeued", CTLFLAG_RD, &txq->ift_dequeued, "total mbufs freed"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txq_enqueued", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_enqueued", CTLFLAG_RD, &txq->ift_enqueued, "total mbufs enqueued"); #endif - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag", CTLFLAG_RD, &txq->ift_mbuf_defrag, "# of times m_defrag was called"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "m_pullups", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "m_pullups", CTLFLAG_RD, &txq->ift_pullups, "# of times m_pullup was called"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag_failed", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag_failed", CTLFLAG_RD, &txq->ift_mbuf_defrag_failed, "# of times m_defrag failed"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "no_desc_avail", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "no_desc_avail", CTLFLAG_RD, &txq->ift_no_desc_avail, "# of times no descriptors were available"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "tx_map_failed", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "tx_map_failed", CTLFLAG_RD, &txq->ift_map_failed, "# of times DMA map failed"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txd_encap_efbig", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txd_encap_efbig", CTLFLAG_RD, &txq->ift_txd_encap_efbig, "# of times txd_encap returned EFBIG"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "no_tx_dma_setup", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "no_tx_dma_setup", CTLFLAG_RD, &txq->ift_no_tx_dma_setup, "# of times map failed for other than EFBIG"); SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_pidx", @@ -7114,10 +7114,10 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_in_use", CTLFLAG_RD, &txq->ift_in_use, 1, "descriptors in use"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txq_processed", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_processed", CTLFLAG_RD, &txq->ift_processed, "descriptors procesed for clean"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txq_cleaned", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_cleaned", CTLFLAG_RD, &txq->ift_cleaned, "total cleaned"); SYSCTL_ADD_PROC(ctx_list, queue_list, OID_AUTO, "ring_state", @@ -7182,16 +7182,16 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD, &fl->ifl_buf_size, 1, "buffer size"); #if MEMORY_LOGGING - SYSCTL_ADD_QUAD(ctx_list, fl_list, OID_AUTO, "fl_m_enqueued", + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_m_enqueued", CTLFLAG_RD, &fl->ifl_m_enqueued, "mbufs allocated"); - SYSCTL_ADD_QUAD(ctx_list, fl_list, OID_AUTO, "fl_m_dequeued", + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_m_dequeued", CTLFLAG_RD, &fl->ifl_m_dequeued, "mbufs freed"); - SYSCTL_ADD_QUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_enqueued", + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_enqueued", CTLFLAG_RD, &fl->ifl_cl_enqueued, "clusters allocated"); - SYSCTL_ADD_QUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_dequeued", + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_dequeued", CTLFLAG_RD, &fl->ifl_cl_dequeued, "clusters freed"); #endif From nobody Wed Jul 31 04:38:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVL6JFQz5Sbp2; Wed, 31 Jul 2024 04:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVL3wBwz4X1b; Wed, 31 Jul 2024 04:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JOLZp+uvrIj37q7w2AsMON2Fc8/QjPy9xwMQ6NtTpmg=; b=Os5hLbVDhlVKquAz9ipVT9qxWakVfAzvcnkfo/uR7O4YfJ4VTF2otgLU/UiEnBhzWOxGYQ es7Dao4ctzalm6ZUCARBAb4QSXebEl23Wy0C4KLvJs0CTYaqonwFxgUZRMKzK/aXzNaQKi d0cuPb/kiEGuLU09Wf1kdW3gMsWq5DqhJGtm+nZ0o45uzKe4tg905GRHG4hv1yBJiCDDZK CWxSn7OHEClDiqP3YENJOoFrZsZwMwhlQ0Am+XI9auuxZe1rzI3xA98kD6u/dnlXCAsC4U /tx38EOGWLVqMpaVd9w0PWhILRFLonSKSvrsyU8kmq1nU8hDkRt14WRiXsCWSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400698; a=rsa-sha256; cv=none; b=kcnmFrYL14XepXKQ/XwvLQDQ/yRdgh4VIUxUZQii04IcJ/T+teRmARSd+ZL+kafIdBGfNE A/kB/dwYM8ycLq9SD6rWp8wekjEbeTu8S7hAMtcNUaw9Rkm+hebP8EbCBqFKLhv1AtBgb/ hHAwS5gDmzon/PFXrxtw5r/15jiXLWkiLJ/JTpusBvqYpXo+Ubx93k0LiBQsj33YYV/fwO VfJ5QktQJoXTdbCk5QFOQzWgbPhy8eZzZh9/ks14MdkhQpMDGae/+LR0VM3nkj4Uj5/h1m Ot9X42KxA/BboLasSK36huDkZjX9WVK7SixzqlJZtGT7MRCjp9CSntWfsqHWUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JOLZp+uvrIj37q7w2AsMON2Fc8/QjPy9xwMQ6NtTpmg=; b=EoBVMLZeXGx/W5PBdqvJVNeC77Ezx7cTkVDtvv4gdBhNxS/wlkHgzinr+oxRFOA6vDzgwQ faHAHVwluUr5i+vElqVaqy7VL+Ns2Zvc31WPUn0T/R4SMF+eC6PxULijfsBBLyk/YF5P+P eLiXyO+iUHA/qB42oZZ386Kd+uYyUp4Taesb0ESoIiAYPkktC5EBZhGQ5F6q8B8Z7jtmhc mPWGNhUKQh3pICLJkv4YSqb4bcKnV4ay2EYHlH9Io627Zz+bARHsi+DIgXre5xGn1NmkME RUAO7GO4mSYHG5Uc9opL1xfbmWwNukHAZJr3++3lF6CvpUZ20Lp4En2bkQF8vA== 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 4WYfVL3XS7zm9q; Wed, 31 Jul 2024 04:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cISq068513; Wed, 31 Jul 2024 04:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cIxi068510; Wed, 31 Jul 2024 04:38:18 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:18 GMT Message-Id: <202407310438.46V4cIxi068510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: d381220e4ee1 - stable/13 - iflib: Correct indentation according to style(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d381220e4ee157801a79f9dd0eeecc8974e31632 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=d381220e4ee157801a79f9dd0eeecc8974e31632 commit d381220e4ee157801a79f9dd0eeecc8974e31632 Author: Stephen J. Kiernan AuthorDate: 2024-04-16 18:35:57 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 04:29:19 +0000 iflib: Correct indentation according to style(9) The indentation style for the SYSCTL_* macros used was not matching KNF. Reported by: jhb Differential Revision: https://reviews.freebsd.org/D44811 (cherry picked from commit e4a0c92e7aea50654290e3082668932cea16b64f) --- sys/net/iflib.c | 277 +++++++++++++++++++++++++++----------------------------- 1 file changed, 135 insertions(+), 142 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index cdf9d4889565..fec432a0cb65 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -584,13 +584,15 @@ static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, */ static int iflib_min_tx_latency = 0; SYSCTL_INT(_net_iflib, OID_AUTO, min_tx_latency, CTLFLAG_RW, - &iflib_min_tx_latency, 0, "minimize transmit latency at the possible expense of throughput"); + &iflib_min_tx_latency, 0, + "minimize transmit latency at the possible expense of throughput"); static int iflib_no_tx_batch = 0; SYSCTL_INT(_net_iflib, OID_AUTO, no_tx_batch, CTLFLAG_RW, - &iflib_no_tx_batch, 0, "minimize transmit latency at the possible expense of throughput"); + &iflib_no_tx_batch, 0, + "minimize transmit latency at the possible expense of throughput"); static int iflib_timer_default = 1000; SYSCTL_INT(_net_iflib, OID_AUTO, timer_default, CTLFLAG_RW, - &iflib_timer_default, 0, "number of ticks between iflib_timer calls"); + &iflib_timer_default, 0, "number of ticks between iflib_timer calls"); #if IFLIB_DEBUG_COUNTERS @@ -603,31 +605,31 @@ static int iflib_fl_refills; static int iflib_fl_refills_large; static int iflib_tx_frees; -SYSCTL_INT(_net_iflib, OID_AUTO, tx_seen, CTLFLAG_RD, - &iflib_tx_seen, 0, "# TX mbufs seen"); -SYSCTL_INT(_net_iflib, OID_AUTO, tx_sent, CTLFLAG_RD, - &iflib_tx_sent, 0, "# TX mbufs sent"); -SYSCTL_INT(_net_iflib, OID_AUTO, tx_encap, CTLFLAG_RD, - &iflib_tx_encap, 0, "# TX mbufs encapped"); -SYSCTL_INT(_net_iflib, OID_AUTO, tx_frees, CTLFLAG_RD, - &iflib_tx_frees, 0, "# TX frees"); -SYSCTL_INT(_net_iflib, OID_AUTO, rx_allocs, CTLFLAG_RD, - &iflib_rx_allocs, 0, "# RX allocations"); -SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills, CTLFLAG_RD, - &iflib_fl_refills, 0, "# refills"); +SYSCTL_INT(_net_iflib, OID_AUTO, tx_seen, CTLFLAG_RD, &iflib_tx_seen, 0, + "# TX mbufs seen"); +SYSCTL_INT(_net_iflib, OID_AUTO, tx_sent, CTLFLAG_RD, &iflib_tx_sent, 0, + "# TX mbufs sent"); +SYSCTL_INT(_net_iflib, OID_AUTO, tx_encap, CTLFLAG_RD, &iflib_tx_encap, 0, + "# TX mbufs encapped"); +SYSCTL_INT(_net_iflib, OID_AUTO, tx_frees, CTLFLAG_RD, &iflib_tx_frees, 0, + "# TX frees"); +SYSCTL_INT(_net_iflib, OID_AUTO, rx_allocs, CTLFLAG_RD, &iflib_rx_allocs, 0, + "# RX allocations"); +SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills, CTLFLAG_RD, &iflib_fl_refills, 0, + "# refills"); SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills_large, CTLFLAG_RD, - &iflib_fl_refills_large, 0, "# large refills"); + &iflib_fl_refills_large, 0, "# large refills"); static int iflib_txq_drain_flushing; static int iflib_txq_drain_oactive; static int iflib_txq_drain_notready; SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_flushing, CTLFLAG_RD, - &iflib_txq_drain_flushing, 0, "# drain flushes"); + &iflib_txq_drain_flushing, 0, "# drain flushes"); SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_oactive, CTLFLAG_RD, - &iflib_txq_drain_oactive, 0, "# drain oactives"); + &iflib_txq_drain_oactive, 0, "# drain oactives"); SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_notready, CTLFLAG_RD, - &iflib_txq_drain_notready, 0, "# drain notready"); + &iflib_txq_drain_notready, 0, "# drain notready"); static int iflib_encap_load_mbuf_fail; static int iflib_encap_pad_mbuf_fail; @@ -635,13 +637,13 @@ static int iflib_encap_txq_avail_fail; static int iflib_encap_txd_encap_fail; SYSCTL_INT(_net_iflib, OID_AUTO, encap_load_mbuf_fail, CTLFLAG_RD, - &iflib_encap_load_mbuf_fail, 0, "# busdma load failures"); + &iflib_encap_load_mbuf_fail, 0, "# busdma load failures"); SYSCTL_INT(_net_iflib, OID_AUTO, encap_pad_mbuf_fail, CTLFLAG_RD, - &iflib_encap_pad_mbuf_fail, 0, "# runt frame pad failures"); + &iflib_encap_pad_mbuf_fail, 0, "# runt frame pad failures"); SYSCTL_INT(_net_iflib, OID_AUTO, encap_txq_avail_fail, CTLFLAG_RD, - &iflib_encap_txq_avail_fail, 0, "# txq avail failures"); + &iflib_encap_txq_avail_fail, 0, "# txq avail failures"); SYSCTL_INT(_net_iflib, OID_AUTO, encap_txd_encap_fail, CTLFLAG_RD, - &iflib_encap_txd_encap_fail, 0, "# driver encap failures"); + &iflib_encap_txd_encap_fail, 0, "# driver encap failures"); static int iflib_task_fn_rxs; static int iflib_rx_intr_enables; @@ -653,22 +655,22 @@ static int iflib_rxd_flush; static int iflib_verbose_debug; -SYSCTL_INT(_net_iflib, OID_AUTO, task_fn_rx, CTLFLAG_RD, - &iflib_task_fn_rxs, 0, "# task_fn_rx calls"); +SYSCTL_INT(_net_iflib, OID_AUTO, task_fn_rx, CTLFLAG_RD, &iflib_task_fn_rxs, 0, + "# task_fn_rx calls"); SYSCTL_INT(_net_iflib, OID_AUTO, rx_intr_enables, CTLFLAG_RD, - &iflib_rx_intr_enables, 0, "# RX intr enables"); -SYSCTL_INT(_net_iflib, OID_AUTO, fast_intrs, CTLFLAG_RD, - &iflib_fast_intrs, 0, "# fast_intr calls"); -SYSCTL_INT(_net_iflib, OID_AUTO, rx_unavail, CTLFLAG_RD, - &iflib_rx_unavail, 0, "# times rxeof called with no available data"); + &iflib_rx_intr_enables, 0, "# RX intr enables"); +SYSCTL_INT(_net_iflib, OID_AUTO, fast_intrs, CTLFLAG_RD, &iflib_fast_intrs, 0, + "# fast_intr calls"); +SYSCTL_INT(_net_iflib, OID_AUTO, rx_unavail, CTLFLAG_RD, &iflib_rx_unavail, 0, + "# times rxeof called with no available data"); SYSCTL_INT(_net_iflib, OID_AUTO, rx_ctx_inactive, CTLFLAG_RD, - &iflib_rx_ctx_inactive, 0, "# times rxeof called with inactive context"); -SYSCTL_INT(_net_iflib, OID_AUTO, rx_if_input, CTLFLAG_RD, - &iflib_rx_if_input, 0, "# times rxeof called if_input"); -SYSCTL_INT(_net_iflib, OID_AUTO, rxd_flush, CTLFLAG_RD, - &iflib_rxd_flush, 0, "# times rxd_flush called"); + &iflib_rx_ctx_inactive, 0, "# times rxeof called with inactive context"); +SYSCTL_INT(_net_iflib, OID_AUTO, rx_if_input, CTLFLAG_RD, &iflib_rx_if_input, + 0, "# times rxeof called if_input"); +SYSCTL_INT(_net_iflib, OID_AUTO, rxd_flush, CTLFLAG_RD, &iflib_rxd_flush, 0, + "# times rxd_flush called"); SYSCTL_INT(_net_iflib, OID_AUTO, verbose_debug, CTLFLAG_RW, - &iflib_verbose_debug, 0, "enable verbose debugging"); + &iflib_verbose_debug, 0, "enable verbose debugging"); #define DBG_COUNTER_INC(name) atomic_add_int(&(iflib_ ## name), 1) static void @@ -6990,42 +6992,41 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx) ctx_list = device_get_sysctl_ctx(dev); child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); - ctx->ifc_sysctl_node = node = SYSCTL_ADD_NODE(ctx_list, child, OID_AUTO, "iflib", - CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "IFLIB fields"); + ctx->ifc_sysctl_node = node = SYSCTL_ADD_NODE(ctx_list, child, + OID_AUTO, "iflib", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "IFLIB fields"); oid_list = SYSCTL_CHILDREN(node); SYSCTL_ADD_CONST_STRING(ctx_list, oid_list, OID_AUTO, "driver_version", - CTLFLAG_RD, ctx->ifc_sctx->isc_driver_version, - "driver version"); + CTLFLAG_RD, ctx->ifc_sctx->isc_driver_version, "driver version"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_ntxqs", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_ntxqs, 0, - "# of txqs to use, 0 => use default #"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_ntxqs, 0, + "# of txqs to use, 0 => use default #"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_nrxqs", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_nrxqs, 0, - "# of rxqs to use, 0 => use default #"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_nrxqs, 0, + "# of rxqs to use, 0 => use default #"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_qs_enable", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_qs_eq_override, 0, - "permit #txq != #rxq"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_qs_eq_override, 0, + "permit #txq != #rxq"); SYSCTL_ADD_INT(ctx_list, oid_list, OID_AUTO, "disable_msix", - CTLFLAG_RWTUN, &ctx->ifc_softc_ctx.isc_disable_msix, 0, - "disable MSI-X (default 0)"); + CTLFLAG_RWTUN, &ctx->ifc_softc_ctx.isc_disable_msix, 0, + "disable MSI-X (default 0)"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "rx_budget", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_rx_budget, 0, - "set the RX budget"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_rx_budget, 0, "set the RX budget"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "tx_abdicate", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_tx_abdicate, 0, - "cause TX to abdicate instead of running to completion"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_tx_abdicate, 0, + "cause TX to abdicate instead of running to completion"); ctx->ifc_sysctl_core_offset = CORE_OFFSET_UNSPECIFIED; SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "core_offset", - CTLFLAG_RDTUN, &ctx->ifc_sysctl_core_offset, 0, - "offset to start using cores at"); + CTLFLAG_RDTUN, &ctx->ifc_sysctl_core_offset, 0, + "offset to start using cores at"); SYSCTL_ADD_U8(ctx_list, oid_list, OID_AUTO, "separate_txrx", - CTLFLAG_RDTUN, &ctx->ifc_sysctl_separate_txrx, 0, - "use separate cores for TX and RX"); + CTLFLAG_RDTUN, &ctx->ifc_sysctl_separate_txrx, 0, + "use separate cores for TX and RX"); SYSCTL_ADD_U8(ctx_list, oid_list, OID_AUTO, "use_logical_cores", - CTLFLAG_RDTUN, &ctx->ifc_sysctl_use_logical_cores, 0, - "try to make use of logical cores for TX and RX"); + CTLFLAG_RDTUN, &ctx->ifc_sysctl_use_logical_cores, 0, + "try to make use of logical cores for TX and RX"); /* XXX change for per-queue sizes */ SYSCTL_ADD_PROC(ctx_list, oid_list, OID_AUTO, "override_ntxds", @@ -7071,77 +7072,71 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_INT(ctx_list, queue_list, OID_AUTO, "cpu", - CTLFLAG_RD, - &txq->ift_task.gt_cpu, 0, "cpu this queue is bound to"); + CTLFLAG_RD, &txq->ift_task.gt_cpu, 0, + "cpu this queue is bound to"); #if MEMORY_LOGGING SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_dequeued", - CTLFLAG_RD, - &txq->ift_dequeued, "total mbufs freed"); + CTLFLAG_RD, &txq->ift_dequeued, "total mbufs freed"); SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_enqueued", - CTLFLAG_RD, - &txq->ift_enqueued, "total mbufs enqueued"); + CTLFLAG_RD, &txq->ift_enqueued, "total mbufs enqueued"); #endif SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag", - CTLFLAG_RD, - &txq->ift_mbuf_defrag, "# of times m_defrag was called"); + CTLFLAG_RD, &txq->ift_mbuf_defrag, + "# of times m_defrag was called"); SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "m_pullups", - CTLFLAG_RD, - &txq->ift_pullups, "# of times m_pullup was called"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag_failed", - CTLFLAG_RD, - &txq->ift_mbuf_defrag_failed, "# of times m_defrag failed"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "no_desc_avail", - CTLFLAG_RD, - &txq->ift_no_desc_avail, "# of times no descriptors were available"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "tx_map_failed", - CTLFLAG_RD, - &txq->ift_map_failed, "# of times DMA map failed"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txd_encap_efbig", - CTLFLAG_RD, - &txq->ift_txd_encap_efbig, "# of times txd_encap returned EFBIG"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "no_tx_dma_setup", - CTLFLAG_RD, - &txq->ift_no_tx_dma_setup, "# of times map failed for other than EFBIG"); + CTLFLAG_RD, &txq->ift_pullups, + "# of times m_pullup was called"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "mbuf_defrag_failed", CTLFLAG_RD, + &txq->ift_mbuf_defrag_failed, "# of times m_defrag failed"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "no_desc_avail", CTLFLAG_RD, &txq->ift_no_desc_avail, + "# of times no descriptors were available"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "tx_map_failed", CTLFLAG_RD, &txq->ift_map_failed, + "# of times DMA map failed"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "txd_encap_efbig", CTLFLAG_RD, &txq->ift_txd_encap_efbig, + "# of times txd_encap returned EFBIG"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "no_tx_dma_setup", CTLFLAG_RD, &txq->ift_no_tx_dma_setup, + "# of times map failed for other than EFBIG"); SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_pidx", - CTLFLAG_RD, - &txq->ift_pidx, 1, "Producer Index"); + CTLFLAG_RD, &txq->ift_pidx, 1, "Producer Index"); SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_cidx", - CTLFLAG_RD, - &txq->ift_cidx, 1, "Consumer Index"); - SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_cidx_processed", - CTLFLAG_RD, - &txq->ift_cidx_processed, 1, "Consumer Index seen by credit update"); + CTLFLAG_RD, &txq->ift_cidx, 1, "Consumer Index"); + SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, + "txq_cidx_processed", CTLFLAG_RD, &txq->ift_cidx_processed, + 1, "Consumer Index seen by credit update"); SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_in_use", - CTLFLAG_RD, - &txq->ift_in_use, 1, "descriptors in use"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_processed", - CTLFLAG_RD, - &txq->ift_processed, "descriptors procesed for clean"); + CTLFLAG_RD, &txq->ift_in_use, 1, "descriptors in use"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "txq_processed", CTLFLAG_RD, &txq->ift_processed, + "descriptors procesed for clean"); SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_cleaned", - CTLFLAG_RD, - &txq->ift_cleaned, "total cleaned"); + CTLFLAG_RD, &txq->ift_cleaned, "total cleaned"); SYSCTL_ADD_PROC(ctx_list, queue_list, OID_AUTO, "ring_state", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, __DEVOLATILE(uint64_t *, &txq->ift_br->state), 0, mp_ring_state_handler, "A", "soft ring state"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_enqueues", - CTLFLAG_RD, &txq->ift_br->enqueues, - "# of enqueues to the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_drops", - CTLFLAG_RD, &txq->ift_br->drops, - "# of drops in the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_starts", - CTLFLAG_RD, &txq->ift_br->starts, - "# of normal consumer starts in the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_stalls", - CTLFLAG_RD, &txq->ift_br->stalls, - "# of consumer stalls in the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_restarts", - CTLFLAG_RD, &txq->ift_br->restarts, - "# of consumer restarts in the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_abdications", - CTLFLAG_RD, &txq->ift_br->abdications, - "# of consumer abdications in the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_enqueues", CTLFLAG_RD, &txq->ift_br->enqueues, + "# of enqueues to the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_drops", CTLFLAG_RD, &txq->ift_br->drops, + "# of drops in the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_starts", CTLFLAG_RD, &txq->ift_br->starts, + "# of normal consumer starts in mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_stalls", CTLFLAG_RD, &txq->ift_br->stalls, + "# of consumer stalls in the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_restarts", CTLFLAG_RD, &txq->ift_br->restarts, + "# of consumer restarts in the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_abdications", CTLFLAG_RD, &txq->ift_br->abdications, + "# of consumer abdications in the mp_ring for this queue"); } if (scctx->isc_nrxqsets > 100) @@ -7156,44 +7151,42 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_INT(ctx_list, queue_list, OID_AUTO, "cpu", - CTLFLAG_RD, - &rxq->ifr_task.gt_cpu, 0, "cpu this queue is bound to"); + CTLFLAG_RD, &rxq->ifr_task.gt_cpu, 0, + "cpu this queue is bound to"); if (sctx->isc_flags & IFLIB_HAS_RXCQ) { - SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "rxq_cq_cidx", - CTLFLAG_RD, - &rxq->ifr_cq_cidx, 1, "Consumer Index"); + SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, + "rxq_cq_cidx", CTLFLAG_RD, &rxq->ifr_cq_cidx, 1, + "Consumer Index"); } for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) { snprintf(namebuf, NAME_BUFLEN, "rxq_fl%d", j); - fl_node = SYSCTL_ADD_NODE(ctx_list, queue_list, OID_AUTO, namebuf, - CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "freelist Name"); + fl_node = SYSCTL_ADD_NODE(ctx_list, queue_list, + OID_AUTO, namebuf, CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, "freelist Name"); fl_list = SYSCTL_CHILDREN(fl_node); SYSCTL_ADD_U16(ctx_list, fl_list, OID_AUTO, "pidx", - CTLFLAG_RD, - &fl->ifl_pidx, 1, "Producer Index"); + CTLFLAG_RD, &fl->ifl_pidx, 1, "Producer Index"); SYSCTL_ADD_U16(ctx_list, fl_list, OID_AUTO, "cidx", - CTLFLAG_RD, - &fl->ifl_cidx, 1, "Consumer Index"); + CTLFLAG_RD, &fl->ifl_cidx, 1, "Consumer Index"); SYSCTL_ADD_U16(ctx_list, fl_list, OID_AUTO, "credits", - CTLFLAG_RD, - &fl->ifl_credits, 1, "credits available"); + CTLFLAG_RD, &fl->ifl_credits, 1, + "credits available"); SYSCTL_ADD_U16(ctx_list, fl_list, OID_AUTO, "buf_size", - CTLFLAG_RD, - &fl->ifl_buf_size, 1, "buffer size"); + CTLFLAG_RD, &fl->ifl_buf_size, 1, "buffer size"); #if MEMORY_LOGGING - SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_m_enqueued", - CTLFLAG_RD, - &fl->ifl_m_enqueued, "mbufs allocated"); - SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_m_dequeued", - CTLFLAG_RD, - &fl->ifl_m_dequeued, "mbufs freed"); - SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_enqueued", - CTLFLAG_RD, - &fl->ifl_cl_enqueued, "clusters allocated"); - SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_dequeued", - CTLFLAG_RD, - &fl->ifl_cl_dequeued, "clusters freed"); + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, + "fl_m_enqueued", CTLFLAG_RD, &fl->ifl_m_enqueued, + "mbufs allocated"); + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, + "fl_m_dequeued", CTLFLAG_RD, &fl->ifl_m_dequeued, + "mbufs freed"); + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, + "fl_cl_enqueued", CTLFLAG_RD, &fl->ifl_cl_enqueued, + "clusters allocated"); + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, + "fl_cl_dequeued", CTLFLAG_RD, &fl->ifl_cl_dequeued, + "clusters freed"); #endif } } From nobody Wed Jul 31 04:38:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVN0F18z5Sc09; Wed, 31 Jul 2024 04:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVM5Pqcz4XNd; Wed, 31 Jul 2024 04:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j7WiNdffnALDKOY38WH7PAo1MLCEIQMuXy/msQ++RLY=; b=Hl+iRFNIxp8fLAcMcSUWpwT0LgvbSJCHFrno6A495lTDbs3VRMr8VCngw+CZn2cIcpPAQ5 Dm/URfnOt5OzKPHjDgfa11QTBcHEjeebRxP07dm21E0meOiqaBn0PKjStw4YVxiYUz/WMZ keJwIkDlYyeRa9pDBpAggx2yDMHoBYoVLy+g2gU2wvTNSd+n/jOXVWS19364qAJuiuK188 WCWBk7yks8wNffhmBHK++FZGzPXuH4sKaSoPSAoQYuugHSfa2KyyVlNwfURajfCuSxPjHh 2Fuhw7ELRHlV16wuMhFmfsYoYMkEZ1Bgeg03h1YQLbwv4gyaCulg7AZP+07l2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400699; a=rsa-sha256; cv=none; b=ufeaHxkBKR+YwlVMLMYhh3OfKvfBoe6TYzrq7HiiMONDa2hYr9G5iVfHdd4JHmu+KIhCTg uL+0qa97doOKy5ulYKJO1z6CS9Y/ecbGiiaAQhD9pBCnhWqw0TbcCRoccsU1ru8nUwQzn9 veN6VQYv8FUH2PTmgoI4KfkdZOaeEz2JfxqUVvQFT85HHKbEqUfQcYvvMqXI2+GjZ2j5vx /P6crbYsQbS+OQ8p+/rasu7URWB4CKBPn+D6tK5Wn/oGbkPilbdOQ0uqQ4MZ4+iNw5ZKhT qIwO9wSX5NkOh4nNtRupVDovaZTg4EWxDKsVsAIaGRTkvLTYpye1NiZdMhqlSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j7WiNdffnALDKOY38WH7PAo1MLCEIQMuXy/msQ++RLY=; b=K68MKiofld9EXkEUGaIYpy+cgglLXF1f4PXFEfXAjy7niWfBMzVSXrHkUQAyF2OsSju1yP YVKIpFAI43rws+Nqtc9gpHSTxSQ4xyuQ7mMWNZ5XCrpFuLfZR1c8mTuyayVmLiOcWY0fa0 p8DG09jDt7/OnjA+rn75GOi/D/5cbhrEmZ67nPFb8Niz5npkLSD8vG9aT29MsnD+dKFHgz KoA90Evk9AL0xdjvDE50PWh/jUXHLF0DrMJ46qqqsemDgquvdcwo3BVVZT2n2DqcigdxSe 1Gh/x47LPrNiYgrsyqP6RsWZbMTLMyeEM0ivNcZEYbLaunG02+LpTxLskEu2vQ== 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 4WYfVM4dngzm9r; Wed, 31 Jul 2024 04:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cJLn068574; Wed, 31 Jul 2024 04:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cJJl068571; Wed, 31 Jul 2024 04:38:19 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:19 GMT Message-Id: <202407310438.46V4cJJl068571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 1eb348e090fd - stable/13 - iflib: Add sysctl to request extra MSIX vectors on driver load List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1eb348e090fd3bda6c0f799fc4a22568f579f576 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=1eb348e090fd3bda6c0f799fc4a22568f579f576 commit 1eb348e090fd3bda6c0f799fc4a22568f579f576 Author: Eric Joyner AuthorDate: 2023-03-22 19:18:44 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 04:29:21 +0000 iflib: Add sysctl to request extra MSIX vectors on driver load Intended to be used with upcoming feature to add sub-interfaces, since those new interfaces will be dynamically created and will need to have spare MSI-X interrupts already allocated for them on driver load. This sysctl is marked as a tunable since it will need to be set before the driver is loaded since MSI-X interrupt allocation and setup is done during the attach process. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41326 (cherry picked from commit 3c7da27a473e339392121404e06c506df040c16f) --- sys/net/iflib.c | 14 ++++++++++++++ sys/net/iflib.h | 1 + 2 files changed, 15 insertions(+) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index fec432a0cb65..ed82ff9a3d09 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -194,6 +194,7 @@ struct iflib_ctx { #define CORE_OFFSET_UNSPECIFIED 0xffff uint8_t ifc_sysctl_separate_txrx; uint8_t ifc_sysctl_use_logical_cores; + uint16_t ifc_sysctl_extra_msix_vectors; bool ifc_cpus_are_physical_cores; qidx_t ifc_sysctl_ntxds[8]; @@ -270,6 +271,13 @@ iflib_get_sctx(if_ctx_t ctx) return (ctx->ifc_sctx); } +uint16_t +iflib_get_extra_msix_vectors_sysctl(if_ctx_t ctx) +{ + + return (ctx->ifc_sysctl_extra_msix_vectors); +} + #define IP_ALIGNED(m) ((((uintptr_t)(m)->m_data) & 0x3) == 0x2) #define CACHE_PTR_INCREMENT (CACHE_LINE_SIZE/sizeof(void*)) #define CACHE_PTR_NEXT(ptr) ((void *)(((uintptr_t)(ptr)+CACHE_LINE_SIZE-1) & (CACHE_LINE_SIZE-1))) @@ -7027,6 +7035,12 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx) SYSCTL_ADD_U8(ctx_list, oid_list, OID_AUTO, "use_logical_cores", CTLFLAG_RDTUN, &ctx->ifc_sysctl_use_logical_cores, 0, "try to make use of logical cores for TX and RX"); + SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "use_extra_msix_vectors", + CTLFLAG_RDTUN, &ctx->ifc_sysctl_extra_msix_vectors, 0, + "attempt to reserve the given number of extra MSI-X vectors during driver load for the creation of additional interfaces later"); + SYSCTL_ADD_INT(ctx_list, oid_list, OID_AUTO, "allocated_msix_vectors", + CTLFLAG_RDTUN, &ctx->ifc_softc_ctx.isc_vectors, 0, + "total # of MSI-X vectors allocated by driver"); /* XXX change for per-queue sizes */ SYSCTL_ADD_PROC(ctx_list, oid_list, OID_AUTO, "override_ntxds", diff --git a/sys/net/iflib.h b/sys/net/iflib.h index a444a4937a3c..f9b1045266c4 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -498,6 +498,7 @@ void iflib_led_create(if_ctx_t ctx); void iflib_add_int_delay_sysctl(if_ctx_t, const char *, const char *, if_int_delay_info_t, int, int); +uint16_t iflib_get_extra_msix_vectors_sysctl(if_ctx_t ctx); /* * Pseudo device support From nobody Wed Jul 31 04:38:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVP0rCVz5SbrV; Wed, 31 Jul 2024 04:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVN63Rsz4X3v; Wed, 31 Jul 2024 04:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+V+tzJ/XrxyD4k+ZLhcE9A8GpFd0c5iEQYWdiLtgnBs=; b=EEFTlfEdGScQFwOES78VzuC+bgmpjIoIYgo5KFQFN3jwgAS4S3EDZiAgayf28OSLT+4Z+A 9gbWbNjvQSO8WNRR4RR5Q5vTh1o8ToyJjfPjQlBP2+K6xbXLNg9jrXGm5lm5CIahR/U3x/ nfMe98nJbhCZF1mtx3xRNtW4cHBddSYdpVl6c4bwOfl4udk7G9epekIqSVIBpNdDt8Cxgq J4sxE1vP0s1nYNug0I03/AifpKrlkPgj8jnuCtKCGp7h2ZZdXBYubOMTGWct0wndKYt5P7 dWGVLeSaiZ2UN14mKEXn+7wDSzbgr5zn6hO4meYT5UKuemClGrd6J72Yy1CHBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400700; a=rsa-sha256; cv=none; b=Iqytpp1i/L9VSs+TUHKX6qv1LxRaoezuyU42PZDBEWNaHr4UyWTuT7WknKSk83o+8iK0M5 gGVLwLrJRJ/KC18CVtMJfgnHu3rNuGAl78eRuYLludawX5G0tsZg3lG0BaIq6RScBeuy3k umeWbrUXjw4ECMMVctpiS3xgFS+a9PRMU7DIfn5OzZ5Frnxt6w4Gn7YCB5q2sJKVNQ17iE /HlCBr4rPJlYqoUl+wRf70ILHnw0aXgw9asAxYhwg05lSdIiFK+rF6JLMYvAKHOu7YaNes /7bvmPflOx71GtfU03s1SlOR/XfxspQV+QD3xl62DsphGSlp2GyH9KfM1li03Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+V+tzJ/XrxyD4k+ZLhcE9A8GpFd0c5iEQYWdiLtgnBs=; b=u/5eSO/lddviRGIqWqCoK4URyw/z4+EA4OIqG7GHAHZNNK8E8ZwB6Pxpa+RviOESBGM6t/ UGNZVGNsSs3jHlTNYQHXP+Na3Pg2AVoxn++c49J8Hw+PGlgDplVHw5gRWwwl1LQGGVP29A 70Mv+t+TarkGGBNxGeDtB5GqzzOEpX5ghpWOSL+zOuq80ceB7zsXrTrxyhH13PnF61YlzR e+ZvM692Jf5U1CRxqyb1Qi1YLOKcocIMO4BbKS/6nG7aOkIeN3q4E8d0lhnlbqLoCDb0qL nNFgV39WqITtTLCUpwjAD1V616JviSdmZ0e5ckaiNecjXcDqXMSJURgO9vbovA== 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 4WYfVN5dLCzn50; Wed, 31 Jul 2024 04:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cKv4068626; Wed, 31 Jul 2024 04:38:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cKOB068623; Wed, 31 Jul 2024 04:38:20 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:20 GMT Message-Id: <202407310438.46V4cKOB068623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 67c30c246d16 - stable/13 - iflib: Add subinterface interrupt allocation function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 67c30c246d16414016f96fc87dd73413de25610d Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=67c30c246d16414016f96fc87dd73413de25610d commit 67c30c246d16414016f96fc87dd73413de25610d Author: Eric Joyner AuthorDate: 2023-01-18 00:46:39 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 04:29:23 +0000 iflib: Add subinterface interrupt allocation function The ice(4) driver will add the ability to create extra interfaces that hang off of the base interface; to do that the driver requires a method for the subinterface to request hardware interrupt resources from the base interface. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D39930 (cherry picked from commit ed34a6b6eab9ea39759ccd3f12876a815d271929) --- sys/net/iflib.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- sys/net/iflib.h | 12 +++++++++ 2 files changed, 89 insertions(+), 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index ed82ff9a3d09..38e7f57823d1 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1458,8 +1458,8 @@ iflib_dma_alloc_align(if_ctx_t ctx, int size, int align, iflib_dma_info_t dma, i &dma->idi_tag); if (err) { device_printf(dev, - "%s: bus_dma_tag_create failed: %d\n", - __func__, err); + "%s: bus_dma_tag_create failed: %d (size=%d, align=%d)\n", + __func__, err, size, align); goto fail_0; } @@ -6423,6 +6423,81 @@ iflib_irq_set_affinity(if_ctx_t ctx, if_irq_t irq, iflib_intr_type_t type, return (0); } +/* + * Allocate a hardware interrupt for subctx using the parent (ctx)'s hardware + * resources. + * + * Similar to iflib_irq_alloc_generic(), but for interrupt type IFLIB_INTR_RXTX + * only. + * + * XXX: Could be removed if subctx's dev has its intr resource allocation + * methods replaced with custom ones? + */ +int +iflib_irq_alloc_generic_subctx(if_ctx_t ctx, if_ctx_t subctx, if_irq_t irq, + int rid, iflib_intr_type_t type, + driver_filter_t *filter, void *filter_arg, + int qid, const char *name) +{ + device_t dev, subdev; + struct grouptask *gtask; + struct taskqgroup *tqg; + iflib_filter_info_t info; + gtask_fn_t *fn; + int tqrid, err; + driver_filter_t *intr_fast; + void *q; + + MPASS(ctx != NULL); + MPASS(subctx != NULL); + + tqrid = rid; + dev = ctx->ifc_dev; + subdev = subctx->ifc_dev; + + switch (type) { + case IFLIB_INTR_RXTX: + q = &subctx->ifc_rxqs[qid]; + info = &subctx->ifc_rxqs[qid].ifr_filter_info; + gtask = &subctx->ifc_rxqs[qid].ifr_task; + tqg = qgroup_if_io_tqg; + fn = _task_fn_rx; + intr_fast = iflib_fast_intr_rxtx; + NET_GROUPTASK_INIT(gtask, 0, fn, q); + break; + default: + device_printf(dev, "%s: unknown net intr type for subctx %s (%d)\n", + __func__, device_get_nameunit(subdev), type); + return (EINVAL); + } + + info->ifi_filter = filter; + info->ifi_filter_arg = filter_arg; + info->ifi_task = gtask; + info->ifi_ctx = q; + + NET_GROUPTASK_INIT(gtask, 0, fn, q); + + /* Allocate interrupts from hardware using parent context */ + err = _iflib_irq_alloc(ctx, irq, rid, intr_fast, NULL, info, name); + if (err != 0) { + device_printf(dev, "_iflib_irq_alloc failed for subctx %s: %d\n", + device_get_nameunit(subdev), err); + return (err); + } + + if (tqrid != -1) { + err = iflib_irq_set_affinity(ctx, irq, type, qid, gtask, tqg, q, + name); + if (err) + return (err); + } else { + taskqgroup_attach(tqg, gtask, q, dev, irq->ii_res, name); + } + + return (0); +} + int iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid, iflib_intr_type_t type, driver_filter_t *filter, diff --git a/sys/net/iflib.h b/sys/net/iflib.h index f9b1045266c4..f23b8138435c 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -402,6 +402,11 @@ typedef enum { * function. */ #define IFLIB_FEATURE_QUEUE_SELECT_V2 1301509 +/* + * Driver can create subinterfaces with their own Tx/Rx queues + * that all share a single device (or commonly, port) + */ +#define IFLIB_FEATURE_SUB_INTERFACES 1303503 /* * These enum values are used in iflib_needs_restart to indicate to iflib @@ -506,4 +511,11 @@ uint16_t iflib_get_extra_msix_vectors_sysctl(if_ctx_t ctx); if_pseudo_t iflib_clone_register(if_shared_ctx_t); void iflib_clone_deregister(if_pseudo_t); +/* + * Sub-interface support + */ +int iflib_irq_alloc_generic_subctx(if_ctx_t ctx, if_ctx_t subctx, if_irq_t irq, + int rid, iflib_intr_type_t type, + driver_filter_t *filter, void *filter_arg, + int qid, const char *name); #endif /* __IFLIB_H_ */ From nobody Wed Jul 31 04:38:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVQ1yk4z5Sbgy; Wed, 31 Jul 2024 04:38:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVQ02wlz4XWP; Wed, 31 Jul 2024 04:38:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TctUe8eL0hFcFVBr/UXW/j+4ybCdONHHowfZQAXFS6I=; b=xwVLOXpG83ve4R9logruSXHe7wMXbLxaVKu/+/n8MY/ySxqT9fc52Y1CQo6vVE2QUeOh3b LHwYh8J5tp7TE9Tl8LXeynMgiUHMQfp2IfHebHRK3IqKmSpig6C438PBws7KFXWdwLGjy3 /heReGBQrFZrbomA7RXGzF45F2bE/NApIoeBzO7ghNnGAl4UtwFpGeyONRgzBq+i24R/Iu Lz5PF3r/qqXOqXt4WPsjquE3TrDvE3/RX1zibzJZ1xQ86cX56I0Q19W28Dt8JKwlReeLXA sXMNuwNZlqwQtw44Y120QVvlc6Qe2l5jkDwYzaIZTZ2bovmcuofFN1kGiJzbtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400702; a=rsa-sha256; cv=none; b=m/FrBdJ2XbX6nk+jB6+WpYFJgZqEKOjbJeQf4Byt093ZPv1kTEZzxL6pZC8n3S2q8hIrDe STVgFloTz+BcAzfbYBP32gPEt1vQZcTM/msqxjvpSnvrB4GzC+/C9ZgOmnd9RQU08iYR0U actB7Vz1fMQkGa06x0aGXcWZTfJZHfHH5RKqb39fXz644s6lAqdLaa0GVf0jDABX856cOU 5Y1lGFnYVdyX8pUCQV8DzRRJiIv4r2f6E8iLrLAc4unfrgVnlT/ntzy3XjUOCQkIHaVOej oKGnz4wDOjB+TdY78Cc4sPN9VHIrJYGRbxuU3dtr+aoaeT3waJtctTLA0yGJoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TctUe8eL0hFcFVBr/UXW/j+4ybCdONHHowfZQAXFS6I=; b=WdBq6o5TdsgTkdtpV5OdBqnsacrvOspUpwR2HXaq4dye49bej3T6ahETqhAZ7mdT4Vl/+X fGI8hy/CSMkDcrZoEHTO8lmm4wJPpXzlJrd5wK9WYPI270INmRHmBg5p9MzdIaR5cXh2jG /b5z8d2MULO1lyWnQM5QCIvWx6bBzy+XKiDBSjNaLt9vkTTrQ8vLihaW7V+8zb4Ti/O4Pt 9L8uSwQ7gkgJ5EJsgHKJAvoJNjhzd/sZgBR8Jqw7BdihkxgXDxVSgWK704ej/Po/JWB+6W oM5dBArf7bxarLyXWgu8A1cXlpjBuc6ORZbD1IwmLKkARYhlHUGTN9YXgbzcaA== 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 4WYfVP6mcSzn3W; Wed, 31 Jul 2024 04:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cLPh068671; Wed, 31 Jul 2024 04:38:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cLUJ068668; Wed, 31 Jul 2024 04:38:21 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:21 GMT Message-Id: <202407310438.46V4cLUJ068668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: df718474022b - stable/13 - ice(4): Update copyright year to 2024 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: df718474022b4acb7bebd2f073ba26c50964e305 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=df718474022b4acb7bebd2f073ba26c50964e305 commit df718474022b4acb7bebd2f073ba26c50964e305 Author: Eric Joyner AuthorDate: 2024-02-13 06:25:47 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 04:29:25 +0000 ice(4): Update copyright year to 2024 Signed-off-by: Eric Joyner Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D44003 (cherry picked from commit 015f8cc5b0c10336a048f37a7071ea03516de242) --- sys/dev/ice/ice_adminq_cmd.h | 2 +- sys/dev/ice/ice_alloc.h | 2 +- sys/dev/ice/ice_bitops.h | 2 +- sys/dev/ice/ice_common.c | 2 +- sys/dev/ice/ice_common.h | 2 +- sys/dev/ice/ice_common_sysctls.h | 2 +- sys/dev/ice/ice_common_txrx.h | 2 +- sys/dev/ice/ice_controlq.c | 2 +- sys/dev/ice/ice_controlq.h | 2 +- sys/dev/ice/ice_dcb.c | 2 +- sys/dev/ice/ice_dcb.h | 2 +- sys/dev/ice/ice_ddp_common.c | 2 +- sys/dev/ice/ice_ddp_common.h | 2 +- sys/dev/ice/ice_defs.h | 2 +- sys/dev/ice/ice_drv_info.h | 2 +- sys/dev/ice/ice_features.h | 2 +- sys/dev/ice/ice_flex_pipe.c | 2 +- sys/dev/ice/ice_flex_pipe.h | 2 +- sys/dev/ice/ice_flex_type.h | 2 +- sys/dev/ice/ice_flow.c | 2 +- sys/dev/ice/ice_flow.h | 2 +- sys/dev/ice/ice_fw_logging.c | 2 +- sys/dev/ice/ice_fwlog.c | 2 +- sys/dev/ice/ice_fwlog.h | 2 +- sys/dev/ice/ice_hw_autogen.h | 2 +- sys/dev/ice/ice_iflib.h | 2 +- sys/dev/ice/ice_iflib_recovery_txrx.c | 2 +- sys/dev/ice/ice_iflib_sysctls.h | 2 +- sys/dev/ice/ice_iflib_txrx.c | 2 +- sys/dev/ice/ice_lan_tx_rx.h | 2 +- sys/dev/ice/ice_lib.c | 2 +- sys/dev/ice/ice_lib.h | 2 +- sys/dev/ice/ice_nvm.c | 2 +- sys/dev/ice/ice_nvm.h | 2 +- sys/dev/ice/ice_opts.h | 2 +- sys/dev/ice/ice_osdep.c | 2 +- sys/dev/ice/ice_osdep.h | 2 +- sys/dev/ice/ice_protocol_type.h | 2 +- sys/dev/ice/ice_rdma.c | 2 +- sys/dev/ice/ice_rdma.h | 2 +- sys/dev/ice/ice_rdma_internal.h | 2 +- sys/dev/ice/ice_resmgr.c | 2 +- sys/dev/ice/ice_resmgr.h | 2 +- sys/dev/ice/ice_rss.h | 2 +- sys/dev/ice/ice_sched.c | 2 +- sys/dev/ice/ice_sched.h | 2 +- sys/dev/ice/ice_status.h | 2 +- sys/dev/ice/ice_strings.c | 2 +- sys/dev/ice/ice_switch.c | 2 +- sys/dev/ice/ice_switch.h | 2 +- sys/dev/ice/ice_type.h | 2 +- sys/dev/ice/ice_vlan_mode.c | 2 +- sys/dev/ice/ice_vlan_mode.h | 2 +- sys/dev/ice/if_ice_iflib.c | 2 +- sys/dev/ice/irdma_di_if.m | 2 +- sys/dev/ice/irdma_if.m | 2 +- sys/dev/ice/virtchnl.h | 2 +- sys/dev/ice/virtchnl_inline_ipsec.h | 2 +- 58 files changed, 58 insertions(+), 58 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index e4dc14b0162c..31e9583494fc 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_alloc.h b/sys/dev/ice/ice_alloc.h index 4970fae3bcf7..90946143091a 100644 --- a/sys/dev/ice/ice_alloc.h +++ b/sys/dev/ice/ice_alloc.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h index 9c20106b994a..c7bf3384675e 100644 --- a/sys/dev/ice/ice_bitops.h +++ b/sys/dev/ice/ice_bitops.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index 0df73583e137..73249cb7add4 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_common.h b/sys/dev/ice/ice_common.h index 3d96792cf56f..024f6f4cdb01 100644 --- a/sys/dev/ice/ice_common.h +++ b/sys/dev/ice/ice_common.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_common_sysctls.h b/sys/dev/ice/ice_common_sysctls.h index 3ff004152784..37a50296ea81 100644 --- a/sys/dev/ice/ice_common_sysctls.h +++ b/sys/dev/ice/ice_common_sysctls.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_common_txrx.h b/sys/dev/ice/ice_common_txrx.h index 4a4d2fc948ed..865c1d27da44 100644 --- a/sys/dev/ice/ice_common_txrx.h +++ b/sys/dev/ice/ice_common_txrx.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_controlq.c b/sys/dev/ice/ice_controlq.c index 6568be2d9748..09816d4a812a 100644 --- a/sys/dev/ice/ice_controlq.c +++ b/sys/dev/ice/ice_controlq.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_controlq.h b/sys/dev/ice/ice_controlq.h index b32c753d14c5..047dd1beaf60 100644 --- a/sys/dev/ice/ice_controlq.h +++ b/sys/dev/ice/ice_controlq.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_dcb.c b/sys/dev/ice/ice_dcb.c index deb1505fa01c..a06117f90aad 100644 --- a/sys/dev/ice/ice_dcb.c +++ b/sys/dev/ice/ice_dcb.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_dcb.h b/sys/dev/ice/ice_dcb.h index 10c8c3cda9e9..ec2200afe200 100644 --- a/sys/dev/ice/ice_dcb.h +++ b/sys/dev/ice/ice_dcb.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_ddp_common.c b/sys/dev/ice/ice_ddp_common.c index 95e65317a4f2..a1573f5ea998 100644 --- a/sys/dev/ice/ice_ddp_common.c +++ b/sys/dev/ice/ice_ddp_common.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_ddp_common.h b/sys/dev/ice/ice_ddp_common.h index 10f6665d2b12..9305dc83520d 100644 --- a/sys/dev/ice/ice_ddp_common.h +++ b/sys/dev/ice/ice_ddp_common.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_defs.h b/sys/dev/ice/ice_defs.h index 3b96f9e0bf7c..e9f5192bed9f 100644 --- a/sys/dev/ice/ice_defs.h +++ b/sys/dev/ice/ice_defs.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h index 41598923dc94..ff13fe99ee27 100644 --- a/sys/dev/ice/ice_drv_info.h +++ b/sys/dev/ice/ice_drv_info.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_features.h b/sys/dev/ice/ice_features.h index c259684df4fc..b58af574976d 100644 --- a/sys/dev/ice/ice_features.h +++ b/sys/dev/ice/ice_features.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_flex_pipe.c b/sys/dev/ice/ice_flex_pipe.c index fc31afab9e79..943b37746f9d 100644 --- a/sys/dev/ice/ice_flex_pipe.c +++ b/sys/dev/ice/ice_flex_pipe.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_flex_pipe.h b/sys/dev/ice/ice_flex_pipe.h index 16f9334daa83..559905e7fb59 100644 --- a/sys/dev/ice/ice_flex_pipe.h +++ b/sys/dev/ice/ice_flex_pipe.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_flex_type.h b/sys/dev/ice/ice_flex_type.h index 5baa694ebda7..9c8f7b462677 100644 --- a/sys/dev/ice/ice_flex_type.h +++ b/sys/dev/ice/ice_flex_type.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_flow.c b/sys/dev/ice/ice_flow.c index a45bb0408b9d..0cf37159b251 100644 --- a/sys/dev/ice/ice_flow.c +++ b/sys/dev/ice/ice_flow.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_flow.h b/sys/dev/ice/ice_flow.h index c6e272b4dd6b..0857b325ca7c 100644 --- a/sys/dev/ice/ice_flow.h +++ b/sys/dev/ice/ice_flow.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_fw_logging.c b/sys/dev/ice/ice_fw_logging.c index 57445cc89056..a8caf65aca6d 100644 --- a/sys/dev/ice/ice_fw_logging.c +++ b/sys/dev/ice/ice_fw_logging.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_fwlog.c b/sys/dev/ice/ice_fwlog.c index b66860f67cf5..c3c6d9101627 100644 --- a/sys/dev/ice/ice_fwlog.c +++ b/sys/dev/ice/ice_fwlog.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_fwlog.h b/sys/dev/ice/ice_fwlog.h index 0aa7db9a8339..41e41de1e670 100644 --- a/sys/dev/ice/ice_fwlog.h +++ b/sys/dev/ice/ice_fwlog.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_hw_autogen.h b/sys/dev/ice/ice_hw_autogen.h index 36d13eb22f52..6b04bff4b722 100644 --- a/sys/dev/ice/ice_hw_autogen.h +++ b/sys/dev/ice/ice_hw_autogen.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_iflib.h b/sys/dev/ice/ice_iflib.h index d89d04985429..e9e09851b82c 100644 --- a/sys/dev/ice/ice_iflib.h +++ b/sys/dev/ice/ice_iflib.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_iflib_recovery_txrx.c b/sys/dev/ice/ice_iflib_recovery_txrx.c index 69ee98b46d35..dd90ffb8f21a 100644 --- a/sys/dev/ice/ice_iflib_recovery_txrx.c +++ b/sys/dev/ice/ice_iflib_recovery_txrx.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_iflib_sysctls.h b/sys/dev/ice/ice_iflib_sysctls.h index 1eac7249447e..a718f5d12943 100644 --- a/sys/dev/ice/ice_iflib_sysctls.h +++ b/sys/dev/ice/ice_iflib_sysctls.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_iflib_txrx.c b/sys/dev/ice/ice_iflib_txrx.c index 8afca4832d8f..59332e8509f9 100644 --- a/sys/dev/ice/ice_iflib_txrx.c +++ b/sys/dev/ice/ice_iflib_txrx.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_lan_tx_rx.h b/sys/dev/ice/ice_lan_tx_rx.h index 415565b4e99d..860958bffbaf 100644 --- a/sys/dev/ice/ice_lan_tx_rx.h +++ b/sys/dev/ice/ice_lan_tx_rx.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 9ba38f8582a8..a92658ba9f38 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index c07b9458db1f..fd8c8881cdbd 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_nvm.c b/sys/dev/ice/ice_nvm.c index 42a60e0df1c8..91393c1fc8b3 100644 --- a/sys/dev/ice/ice_nvm.c +++ b/sys/dev/ice/ice_nvm.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_nvm.h b/sys/dev/ice/ice_nvm.h index d359a9ea4e4e..32f791f63102 100644 --- a/sys/dev/ice/ice_nvm.h +++ b/sys/dev/ice/ice_nvm.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_opts.h b/sys/dev/ice/ice_opts.h index 4b11f277debe..479ead0dc41e 100644 --- a/sys/dev/ice/ice_opts.h +++ b/sys/dev/ice/ice_opts.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_osdep.c b/sys/dev/ice/ice_osdep.c index c9ac8e9f97c9..88b4984c290f 100644 --- a/sys/dev/ice/ice_osdep.c +++ b/sys/dev/ice/ice_osdep.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_osdep.h b/sys/dev/ice/ice_osdep.h index c6774588bdaa..ea355ddb31f4 100644 --- a/sys/dev/ice/ice_osdep.h +++ b/sys/dev/ice/ice_osdep.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_protocol_type.h b/sys/dev/ice/ice_protocol_type.h index 0793eb005eca..ced1bc5037dd 100644 --- a/sys/dev/ice/ice_protocol_type.h +++ b/sys/dev/ice/ice_protocol_type.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_rdma.c b/sys/dev/ice/ice_rdma.c index 12d100584b7b..327d1ceeb5c6 100644 --- a/sys/dev/ice/ice_rdma.c +++ b/sys/dev/ice/ice_rdma.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_rdma.h b/sys/dev/ice/ice_rdma.h index 6d818f84b6cf..68aa2f2099e7 100644 --- a/sys/dev/ice/ice_rdma.h +++ b/sys/dev/ice/ice_rdma.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_rdma_internal.h b/sys/dev/ice/ice_rdma_internal.h index 20718973af5d..c2ff8757c8c2 100644 --- a/sys/dev/ice/ice_rdma_internal.h +++ b/sys/dev/ice/ice_rdma_internal.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_resmgr.c b/sys/dev/ice/ice_resmgr.c index 547d6035e2bb..824b986fff57 100644 --- a/sys/dev/ice/ice_resmgr.c +++ b/sys/dev/ice/ice_resmgr.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_resmgr.h b/sys/dev/ice/ice_resmgr.h index eef028df4700..0869f5c5654c 100644 --- a/sys/dev/ice/ice_resmgr.h +++ b/sys/dev/ice/ice_resmgr.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_rss.h b/sys/dev/ice/ice_rss.h index 0b79bea6f30b..ede1fad5abe7 100644 --- a/sys/dev/ice/ice_rss.h +++ b/sys/dev/ice/ice_rss.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_sched.c b/sys/dev/ice/ice_sched.c index 49a8415132cb..ed9432292c0c 100644 --- a/sys/dev/ice/ice_sched.c +++ b/sys/dev/ice/ice_sched.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_sched.h b/sys/dev/ice/ice_sched.h index 4d9a4480fe58..490a7719a960 100644 --- a/sys/dev/ice/ice_sched.h +++ b/sys/dev/ice/ice_sched.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_status.h b/sys/dev/ice/ice_status.h index 48c8264c4bc5..016d987bac36 100644 --- a/sys/dev/ice/ice_status.h +++ b/sys/dev/ice/ice_status.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_strings.c b/sys/dev/ice/ice_strings.c index 16a1f9a34d56..7feaef163ef6 100644 --- a/sys/dev/ice/ice_strings.c +++ b/sys/dev/ice/ice_strings.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_switch.c b/sys/dev/ice/ice_switch.c index dfa2368e2bee..44be3999d3de 100644 --- a/sys/dev/ice/ice_switch.c +++ b/sys/dev/ice/ice_switch.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_switch.h b/sys/dev/ice/ice_switch.h index e5b0239d491b..70b5df769175 100644 --- a/sys/dev/ice/ice_switch.h +++ b/sys/dev/ice/ice_switch.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_type.h b/sys/dev/ice/ice_type.h index b7bab6a21a20..e153a772f746 100644 --- a/sys/dev/ice/ice_type.h +++ b/sys/dev/ice/ice_type.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_vlan_mode.c b/sys/dev/ice/ice_vlan_mode.c index 9b298a6ad71a..e0c6d7897607 100644 --- a/sys/dev/ice/ice_vlan_mode.c +++ b/sys/dev/ice/ice_vlan_mode.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_vlan_mode.h b/sys/dev/ice/ice_vlan_mode.h index 1cf4ebb68798..8b1a56c98a3d 100644 --- a/sys/dev/ice/ice_vlan_mode.h +++ b/sys/dev/ice/ice_vlan_mode.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 24a964cdcf0a..ce2ea7c857f3 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/irdma_di_if.m b/sys/dev/ice/irdma_di_if.m index 55564d554c12..61a1817925a2 100644 --- a/sys/dev/ice/irdma_di_if.m +++ b/sys/dev/ice/irdma_di_if.m @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright (c) 2023, Intel Corporation +# Copyright (c) 2024, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/irdma_if.m b/sys/dev/ice/irdma_if.m index a78a4b05f7d2..d3aa68bcdf46 100644 --- a/sys/dev/ice/irdma_if.m +++ b/sys/dev/ice/irdma_if.m @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright (c) 2023, Intel Corporation +# Copyright (c) 2024, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/virtchnl.h b/sys/dev/ice/virtchnl.h index da281bfa366b..d7a1d3f254bf 100644 --- a/sys/dev/ice/virtchnl.h +++ b/sys/dev/ice/virtchnl.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/virtchnl_inline_ipsec.h b/sys/dev/ice/virtchnl_inline_ipsec.h index ad8cfc1dcebb..adcd9f34c00f 100644 --- a/sys/dev/ice/virtchnl_inline_ipsec.h +++ b/sys/dev/ice/virtchnl_inline_ipsec.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2023, Intel Corporation +/* Copyright (c) 2024, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without From nobody Wed Jul 31 04:38:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYfVR3cBjz5Sc2Z; Wed, 31 Jul 2024 04:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYfVR17qYz4Xc0; Wed, 31 Jul 2024 04:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oAC3XHfoa5puLeNp+VDe622OTM4YTnl4CYggo9bsKfI=; b=J0s7FNikbXoL/WmQIgsW9BMyizw4Luh1m35Ksl6qfu8cvV9FyDGID9elB+u4G3vsC1OV/1 EspqUCMsUMQkWlZ0uNyMlNcAtHdPCJM2Ut3WEIYoHFa/y7z3SOywZ2S/ZuRtG9R3PKMGDx ZRU6Z2UTtn0qJ9CYIJI+uDcLkBMaQPMAw+U+OWVarj5S/eC5Xgin2nla4xZOLGUvRLV+BH fHnZNDg/X2/2Ds25dC+91PLqHknGe8KEY1BSLEApFx6w+qEh/MfbgzLCuON/L8eoLH2UB7 Z2fm/N3SmJ+raAMgXX2QBHZGSHnIYfpZQWmgjhPDJfY0DzMzXcQc5TJwBt657w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722400703; a=rsa-sha256; cv=none; b=oNOhW1PVZuHuHg9szEz9qGjm2ZfbV0vd48gq69qiSynb4C4Tt7EpCjN54kukxgrBcPtzmP Hc09HBFElvyVfizTM+KxzcMZnbyQCvRdB8m0tkBtaYFuPiEXv3wrcC7EulxGjIITy55Za1 LaXtnrt7GE61tY7WVkNl0WBDEizaWqTt2CnZtHRI9zddA1aPgI2SbguNlSiznP5suJ5IE8 j3Ew3NCaIeOnpDyz84kP5SaditXGCZEBfVP4QR3YY0uFh30M6eP2Bwvgiug3Jwtp3I2uYG rYXCBmpboPm4ghc74E6s92clqb2GvueGhlvF49MzNeoSsFvjW+Grh/6g4atqhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722400703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oAC3XHfoa5puLeNp+VDe622OTM4YTnl4CYggo9bsKfI=; b=aJ4yBwf8XGmytNUyR33imnCjuyWblaIDjmzJaWtLdQC3DQTi1kxkyTMyY1sUG03wWLFY/z mr8/sI2nSeLs4QLqezoYlZDXz95vj5763yo1lOmKA8p2KOdQIibUeiL0JI5uGv3H/LS2rH KuYYL356UqzJQ3W2r3KGUfnj+/s/V2qffHbqWX9ISgftMoR8+dt2DrLPH8SEL9v9hNGzHh x4mxKRe4IH42VS1L8ucNSeYUgi6ik73gd6/zyFo4p4Zio/V6pWb9jRrj62P206gpTViaUA PgtIstwJBNGHg/vyAPreihQlqYtX+7sUwoAIBSROCfzXHMDe3VrUJPtjwDRauQ== 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 4WYfVR0lxzzmtH; Wed, 31 Jul 2024 04:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V4cN7m068711; Wed, 31 Jul 2024 04:38:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V4cMMq068708; Wed, 31 Jul 2024 04:38:22 GMT (envelope-from git) Date: Wed, 31 Jul 2024 04:38:22 GMT Message-Id: <202407310438.46V4cMMq068708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: dbda7355908f - stable/13 - ice(4): Update to 1.39.13-k List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dbda7355908fc536e2b1fc6cd5b39c285fd88cc9 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=dbda7355908fc536e2b1fc6cd5b39c285fd88cc9 commit dbda7355908fc536e2b1fc6cd5b39c285fd88cc9 Author: Eric Joyner AuthorDate: 2024-02-13 06:26:26 +0000 Commit: Eric Joyner CommitDate: 2024-07-31 04:29:27 +0000 ice(4): Update to 1.39.13-k - Adds mirror interface functionality - Remove unused virtchnl headers Signed-off-by: Eric Joyner MFC-with: 768329961dc0c041f7647f1c4549944a2ca168aa Sponsored by: Intel Corporation Tested by: jeffrey.e.pieper@intel.com Differential Revision: https://reviews.freebsd.org/D44004 (cherry picked from commit 9e54973fc33aa44b77d1c851cb36fcd82dc44cda) --- sys/dev/ice/ice_adminq_cmd.h | 21 +- sys/dev/ice/ice_bitops.h | 4 +- sys/dev/ice/ice_common.c | 43 +- sys/dev/ice/ice_common.h | 8 +- sys/dev/ice/ice_controlq.c | 10 +- sys/dev/ice/ice_controlq.h | 3 +- sys/dev/ice/ice_drv_info.h | 10 +- sys/dev/ice/ice_features.h | 1 - sys/dev/ice/ice_flex_pipe.c | 1 + sys/dev/ice/ice_flow.c | 71 +- sys/dev/ice/ice_flow.h | 8 +- sys/dev/ice/ice_hw_autogen.h | 1 + sys/dev/ice/ice_iflib.h | 32 +- sys/dev/ice/ice_iflib_txrx.c | 351 +++++++++- sys/dev/ice/ice_lib.c | 360 ++++++++-- sys/dev/ice/ice_lib.h | 30 +- sys/dev/ice/ice_nvm.c | 33 +- sys/dev/ice/ice_nvm.h | 1 + sys/dev/ice/ice_protocol_type.h | 1 + sys/dev/ice/ice_sched.c | 7 +- sys/dev/ice/ice_strings.c | 6 + sys/dev/ice/ice_switch.c | 31 +- sys/dev/ice/ice_switch.h | 9 +- sys/dev/ice/ice_type.h | 15 +- sys/dev/ice/if_ice_iflib.c | 1264 ++++++++++++++++++++++++++++++++++- sys/dev/ice/virtchnl_inline_ipsec.h | 594 ---------------- sys/dev/ice/virtchnl_lan_desc.h | 0 27 files changed, 2133 insertions(+), 782 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 31e9583494fc..70b56144faf2 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -152,6 +152,7 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_WOL_PROXY 0x0008 #define ICE_AQC_CAPS_SRIOV 0x0012 #define ICE_AQC_CAPS_VF 0x0013 +#define ICE_AQC_CAPS_VMDQ 0x0014 #define ICE_AQC_CAPS_802_1QBG 0x0015 #define ICE_AQC_CAPS_802_1BR 0x0016 #define ICE_AQC_CAPS_VSI 0x0017 @@ -184,6 +185,8 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_DYN_FLATTENING 0x008A #define ICE_AQC_CAPS_OROM_RECOVERY_UPDATE 0x0090 #define ICE_AQC_CAPS_ROCEV2_LAG 0x0092 +#define ICE_AQC_BIT_ROCEV2_LAG 0x01 +#define ICE_AQC_BIT_SRIOV_LAG 0x02 u8 major_ver; u8 minor_ver; @@ -358,6 +361,8 @@ struct ice_aqc_set_port_params { #define ICE_AQC_RES_TYPE_FLAG_SHARED BIT(7) #define ICE_AQC_RES_TYPE_FLAG_SCAN_BOTTOM BIT(12) #define ICE_AQC_RES_TYPE_FLAG_IGNORE_INDEX BIT(13) +#define ICE_AQC_RES_TYPE_FLAG_SUBSCRIBE_SHARED BIT(14) +#define ICE_AQC_RES_TYPE_FLAG_SUBSCRIBE_CTL BIT(15) #define ICE_AQC_RES_TYPE_FLAG_DEDICATED 0x00 @@ -2198,6 +2203,14 @@ struct ice_aqc_nvm { #define ICE_AQC_NVM_MINSREV_MOD_ID 0x130 #define ICE_AQC_NVM_TX_TOPO_MOD_ID 0x14B +#define ICE_AQC_NVM_CMPO_MOD_ID 0x153 + +/* Cage Max Power override NVM module */ +struct ice_aqc_nvm_cmpo { + __le16 length; +#define ICE_AQC_NVM_CMPO_ENABLE BIT(8) + __le16 cages_cfg[8]; +}; /* Used for reading and writing MinSRev using 0x0701 and 0x0703. Note that the * type field is excluded from the section when reading and writing from @@ -2509,11 +2522,13 @@ enum ice_lut_type { ICE_LUT_VSI = 0, ICE_LUT_PF = 1, ICE_LUT_GLOBAL = 2, - ICE_LUT_TYPE_MASK = 3 + ICE_LUT_TYPE_MASK = 3, + ICE_LUT_PF_SMALL = 5, /* yields ICE_LUT_PF when &= ICE_LUT_TYPE_MASK */ }; enum ice_lut_size { ICE_LUT_VSI_SIZE = 64, + ICE_LUT_PF_SMALL_SIZE = 128, ICE_LUT_GLOBAL_SIZE = 512, ICE_LUT_PF_SIZE = 2048, }; @@ -2796,7 +2811,7 @@ struct ice_aqc_event_lan_overflow { /* Debug Dump Internal Data (indirect 0xFF08) */ struct ice_aqc_debug_dump_internals { - u8 cluster_id; + __le16 cluster_id; /* Expresses next cluster ID in response */ #define ICE_AQC_DBG_DUMP_CLUSTER_ID_SW 0 #define ICE_AQC_DBG_DUMP_CLUSTER_ID_TXSCHED 2 #define ICE_AQC_DBG_DUMP_CLUSTER_ID_PROFILES 3 @@ -2809,7 +2824,7 @@ struct ice_aqc_debug_dump_internals { #define ICE_AQC_DBG_DUMP_CLUSTER_ID_L2P 8 #define ICE_AQC_DBG_DUMP_CLUSTER_ID_QUEUE_MNG 9 #define ICE_AQC_DBG_DUMP_CLUSTER_ID_FULL_CSR_SPACE 21 - u8 reserved; +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_MNG_TRANSACTIONS 22 __le16 table_id; /* Used only for non-memory clusters */ __le32 idx; /* In table entries for tables, in bytes for memory */ __le32 addr_high; diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h index c7bf3384675e..499ee41228c3 100644 --- a/sys/dev/ice/ice_bitops.h +++ b/sys/dev/ice/ice_bitops.h @@ -402,7 +402,7 @@ static inline bool ice_is_any_bit_set(ice_bitmap_t *bitmap, u16 size) } /** - * ice_cp_bitmap - copy bitmaps. + * ice_cp_bitmap - copy bitmaps * @dst: bitmap destination * @src: bitmap to copy from * @size: Size of the bitmaps in bits @@ -460,7 +460,7 @@ ice_bitmap_hweight(ice_bitmap_t *bm, u16 size) } /** - * ice_cmp_bitmap - compares two bitmaps. + * ice_cmp_bitmap - compares two bitmaps * @bmp1: the bitmap to compare * @bmp2: the bitmap to compare with bmp1 * @size: Size of the bitmaps in bits diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index 73249cb7add4..ef487bcfd0f4 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -2319,6 +2319,10 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, ice_debug(hw, ICE_DBG_INIT, "%s: sr_iov_1_1 = %d\n", prefix, caps->sr_iov_1_1); break; + case ICE_AQC_CAPS_VMDQ: + caps->vmdq = (number == 1); + ice_debug(hw, ICE_DBG_INIT, "%s: vmdq = %d\n", prefix, caps->vmdq); + break; case ICE_AQC_CAPS_802_1QBG: caps->evb_802_1_qbg = (number == 1); ice_debug(hw, ICE_DBG_INIT, "%s: evb_802_1_qbg = %d\n", prefix, number); @@ -2404,7 +2408,7 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, ice_debug(hw, ICE_DBG_INIT, "%s: iwarp = %d\n", prefix, caps->iwarp); break; case ICE_AQC_CAPS_ROCEV2_LAG: - caps->roce_lag = (number == 1); + caps->roce_lag = !!(number & ICE_AQC_BIT_ROCEV2_LAG); ice_debug(hw, ICE_DBG_INIT, "%s: roce_lag = %d\n", prefix, caps->roce_lag); break; @@ -2726,6 +2730,10 @@ ice_parse_nac_topo_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, dev_p->nac_topo.mode = LE32_TO_CPU(cap->number); dev_p->nac_topo.id = LE32_TO_CPU(cap->phys_id) & ICE_NAC_TOPO_ID_M; + ice_info(hw, "PF is configured in %s mode with IP instance ID %d\n", + (dev_p->nac_topo.mode == 0) ? "primary" : "secondary", + dev_p->nac_topo.id); + ice_debug(hw, ICE_DBG_INIT, "dev caps: nac topology is_primary = %d\n", !!(dev_p->nac_topo.mode & ICE_NAC_TOPO_PRIMARY_M)); ice_debug(hw, ICE_DBG_INIT, "dev caps: nac topology is_dual = %d\n", @@ -3060,7 +3068,7 @@ void ice_clear_pxe_mode(struct ice_hw *hw) } /** - * ice_aq_set_port_params - set physical port parameters. + * ice_aq_set_port_params - set physical port parameters * @pi: pointer to the port info struct * @bad_frame_vsi: defines the VSI to which bad frames are forwarded * @save_bad_pac: if set packets with errors are forwarded to the bad frames VSI @@ -4058,6 +4066,8 @@ static u16 ice_lut_type_to_size(u16 lut_type) return ICE_LUT_GLOBAL_SIZE; case ICE_LUT_PF: return ICE_LUT_PF_SIZE; + case ICE_LUT_PF_SMALL: + return ICE_LUT_PF_SMALL_SIZE; default: return 0; } @@ -4089,6 +4099,8 @@ int ice_lut_size_to_type(int lut_size) return ICE_LUT_GLOBAL; case ICE_LUT_PF_SIZE: return ICE_LUT_PF; + case ICE_LUT_PF_SMALL_SIZE: + return ICE_LUT_PF_SMALL; default: return -1; } @@ -4116,8 +4128,8 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params vsi_handle = params->vsi_handle; lut = params->lut; - lut_type = params->lut_type; - lut_size = ice_lut_type_to_size(lut_type); + lut_size = ice_lut_type_to_size(params->lut_type); + lut_type = params->lut_type & ICE_LUT_TYPE_MASK; cmd_resp = &desc.params.get_set_rss_lut; if (lut_type == ICE_LUT_GLOBAL) glob_lut_idx = params->global_lut_id; @@ -4773,6 +4785,7 @@ ice_set_ctx(struct ice_hw *hw, u8 *src_ctx, u8 *dest_ctx, * @buf: dump buffer * @buf_size: dump buffer size * @ret_buf_size: return buffer size (returned by FW) + * @ret_next_cluster: next cluster to read (returned by FW) * @ret_next_table: next block to read (returned by FW) * @ret_next_index: next index to read (returned by FW) * @cd: pointer to command details structure @@ -4780,10 +4793,10 @@ ice_set_ctx(struct ice_hw *hw, u8 *src_ctx, u8 *dest_ctx, * Get internal FW/HW data (0xFF08) for debug purposes. */ enum ice_status -ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id, +ice_aq_get_internal_data(struct ice_hw *hw, u16 cluster_id, u16 table_id, u32 start, void *buf, u16 buf_size, u16 *ret_buf_size, - u16 *ret_next_table, u32 *ret_next_index, - struct ice_sq_cd *cd) + u16 *ret_next_cluster, u16 *ret_next_table, + u32 *ret_next_index, struct ice_sq_cd *cd) { struct ice_aqc_debug_dump_internals *cmd; struct ice_aq_desc desc; @@ -4796,7 +4809,7 @@ ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id, ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_debug_dump_internals); - cmd->cluster_id = cluster_id; + cmd->cluster_id = CPU_TO_LE16(cluster_id); cmd->table_id = CPU_TO_LE16(table_id); cmd->idx = CPU_TO_LE32(start); @@ -4805,6 +4818,8 @@ ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id, if (!status) { if (ret_buf_size) *ret_buf_size = LE16_TO_CPU(desc.datalen); + if (ret_next_cluster) + *ret_next_cluster = LE16_TO_CPU(cmd->cluster_id); if (ret_next_table) *ret_next_table = LE16_TO_CPU(cmd->table_id); if (ret_next_index) @@ -6051,7 +6066,7 @@ ice_aq_read_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr, */ enum ice_status ice_aq_write_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr, - u16 bus_addr, __le16 addr, u8 params, u8 *data, + u16 bus_addr, __le16 addr, u8 params, const u8 *data, struct ice_sq_cd *cd) { struct ice_aq_desc desc = { 0 }; @@ -6183,8 +6198,6 @@ static bool ice_is_fw_min_ver(struct ice_hw *hw, u8 branch, u8 maj, u8 min, if (hw->fw_min_ver == min && hw->fw_patch >= patch) return true; } - } else if (hw->fw_branch > branch) { - return true; } return false; @@ -6591,10 +6604,14 @@ u32 ice_get_link_speed(u16 index) */ bool ice_fw_supports_fec_dis_auto(struct ice_hw *hw) { - return ice_is_fw_min_ver(hw, ICE_FW_FEC_DIS_AUTO_BRANCH, + return ice_is_fw_min_ver(hw, ICE_FW_VER_BRANCH_E810, ICE_FW_FEC_DIS_AUTO_MAJ, ICE_FW_FEC_DIS_AUTO_MIN, - ICE_FW_FEC_DIS_AUTO_PATCH); + ICE_FW_FEC_DIS_AUTO_PATCH) || + ice_is_fw_min_ver(hw, ICE_FW_VER_BRANCH_E82X, + ICE_FW_FEC_DIS_AUTO_MAJ_E82X, + ICE_FW_FEC_DIS_AUTO_MIN_E82X, + ICE_FW_FEC_DIS_AUTO_PATCH_E82X); } /** diff --git a/sys/dev/ice/ice_common.h b/sys/dev/ice/ice_common.h index 024f6f4cdb01..3abfba874b9c 100644 --- a/sys/dev/ice/ice_common.h +++ b/sys/dev/ice/ice_common.h @@ -88,10 +88,10 @@ enum ice_status ice_get_caps(struct ice_hw *hw); void ice_set_safe_mode_caps(struct ice_hw *hw); enum ice_status -ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id, +ice_aq_get_internal_data(struct ice_hw *hw, u16 cluster_id, u16 table_id, u32 start, void *buf, u16 buf_size, u16 *ret_buf_size, - u16 *ret_next_table, u32 *ret_next_index, - struct ice_sq_cd *cd); + u16 *ret_next_cluster, u16 *ret_next_table, + u32 *ret_next_index, struct ice_sq_cd *cd); enum ice_status ice_set_mac_type(struct ice_hw *hw); @@ -352,7 +352,7 @@ ice_aq_read_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr, struct ice_sq_cd *cd); enum ice_status ice_aq_write_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr, - u16 bus_addr, __le16 addr, u8 params, u8 *data, + u16 bus_addr, __le16 addr, u8 params, const u8 *data, struct ice_sq_cd *cd); enum ice_status ice_aq_set_health_status_config(struct ice_hw *hw, u8 event_source, diff --git a/sys/dev/ice/ice_controlq.c b/sys/dev/ice/ice_controlq.c index 09816d4a812a..8aa2a7f765a2 100644 --- a/sys/dev/ice/ice_controlq.c +++ b/sys/dev/ice/ice_controlq.c @@ -482,7 +482,7 @@ shutdown_sq_out: } /** - * ice_aq_ver_check - Check the reported AQ API version. + * ice_aq_ver_check - Check the reported AQ API version * @hw: pointer to the hardware structure * * Checks if the driver should load on a given AQ API version. @@ -1037,12 +1037,18 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_ctl_q_info *cq, if (cq->sq.next_to_use == cq->sq.count) cq->sq.next_to_use = 0; wr32(hw, cq->sq.tail, cq->sq.next_to_use); + ice_flush(hw); + + /* Wait a short time before initial ice_sq_done() check, to allow + * hardware time for completion. + */ + ice_usec_delay(5, false); do { if (ice_sq_done(hw, cq)) break; - ice_usec_delay(ICE_CTL_Q_SQ_CMD_USEC, false); + ice_usec_delay(10, false); total_delay++; } while (total_delay < cq->sq_cmd_timeout); diff --git a/sys/dev/ice/ice_controlq.h b/sys/dev/ice/ice_controlq.h index 047dd1beaf60..d48d53a37161 100644 --- a/sys/dev/ice/ice_controlq.h +++ b/sys/dev/ice/ice_controlq.h @@ -60,8 +60,7 @@ enum ice_ctl_q { }; /* Control Queue timeout settings - max delay 1s */ -#define ICE_CTL_Q_SQ_CMD_TIMEOUT 10000 /* Count 10000 times */ -#define ICE_CTL_Q_SQ_CMD_USEC 100 /* Check every 100usec */ +#define ICE_CTL_Q_SQ_CMD_TIMEOUT 100000 /* Count 100000 times */ #define ICE_CTL_Q_ADMIN_INIT_TIMEOUT 10 /* Count 10 times */ #define ICE_CTL_Q_ADMIN_INIT_MSEC 100 /* Check every 100msec */ diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h index ff13fe99ee27..8e1200e08a64 100644 --- a/sys/dev/ice/ice_drv_info.h +++ b/sys/dev/ice/ice_drv_info.h @@ -62,16 +62,16 @@ * @var ice_rc_version * @brief driver release candidate version number */ -const char ice_driver_version[] = "1.37.11-k"; +const char ice_driver_version[] = "1.39.13-k"; const uint8_t ice_major_version = 1; -const uint8_t ice_minor_version = 37; -const uint8_t ice_patch_version = 11; +const uint8_t ice_minor_version = 39; +const uint8_t ice_patch_version = 13; const uint8_t ice_rc_version = 0; #define PVIDV(vendor, devid, name) \ - PVID(vendor, devid, name " - 1.37.11-k") + PVID(vendor, devid, name " - 1.39.13-k") #define PVIDV_OEM(vendor, devid, svid, sdevid, revid, name) \ - PVID_OEM(vendor, devid, svid, sdevid, revid, name " - 1.37.11-k") + PVID_OEM(vendor, devid, svid, sdevid, revid, name " - 1.39.13-k") /** * @var ice_vendor_info_array diff --git a/sys/dev/ice/ice_features.h b/sys/dev/ice/ice_features.h index b58af574976d..03b8c63af291 100644 --- a/sys/dev/ice/ice_features.h +++ b/sys/dev/ice/ice_features.h @@ -89,7 +89,6 @@ enum feat_list { static inline void ice_disable_unsupported_features(ice_bitmap_t __unused *bitmap) { - ice_clear_bit(ICE_FEATURE_SRIOV, bitmap); #ifndef DEV_NETMAP ice_clear_bit(ICE_FEATURE_NETMAP, bitmap); #endif diff --git a/sys/dev/ice/ice_flex_pipe.c b/sys/dev/ice/ice_flex_pipe.c index 943b37746f9d..f103e2aa6e71 100644 --- a/sys/dev/ice/ice_flex_pipe.c +++ b/sys/dev/ice/ice_flex_pipe.c @@ -672,6 +672,7 @@ enum ice_status ice_replay_tunnels(struct ice_hw *hw) if (status) { ice_debug(hw, ICE_DBG_PKG, "ERR: 0x%x - destroy tunnel port 0x%x\n", status, port); + hw->tnl.tbl[i].ref = refs; break; } diff --git a/sys/dev/ice/ice_flow.c b/sys/dev/ice/ice_flow.c index 0cf37159b251..c04f86445767 100644 --- a/sys/dev/ice/ice_flow.c +++ b/sys/dev/ice/ice_flow.c @@ -404,12 +404,11 @@ struct ice_flow_prof_params { }; #define ICE_FLOW_SEG_HDRS_L3_MASK \ - (ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV6 | \ - ICE_FLOW_SEG_HDR_ARP) + (ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_ARP) #define ICE_FLOW_SEG_HDRS_L4_MASK \ (ICE_FLOW_SEG_HDR_ICMP | ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_UDP | \ ICE_FLOW_SEG_HDR_SCTP) -/* mask for L4 protocols that are NOT part of IPV4/6 OTHER PTYPE groups */ +/* mask for L4 protocols that are NOT part of IPv4/6 OTHER PTYPE groups */ #define ICE_FLOW_SEG_HDRS_L4_MASK_NO_OTHER \ (ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_UDP | ICE_FLOW_SEG_HDR_SCTP) @@ -483,15 +482,13 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params) if ((hdrs & ICE_FLOW_SEG_HDR_IPV4) && (hdrs & ICE_FLOW_SEG_HDR_IPV_OTHER)) { - src = i ? - (const ice_bitmap_t *)ice_ptypes_ipv4_il : + src = i ? (const ice_bitmap_t *)ice_ptypes_ipv4_il : (const ice_bitmap_t *)ice_ptypes_ipv4_ofos_all; ice_and_bitmap(params->ptypes, params->ptypes, src, ICE_FLOW_PTYPE_MAX); } else if ((hdrs & ICE_FLOW_SEG_HDR_IPV6) && (hdrs & ICE_FLOW_SEG_HDR_IPV_OTHER)) { - src = i ? - (const ice_bitmap_t *)ice_ptypes_ipv6_il : + src = i ? (const ice_bitmap_t *)ice_ptypes_ipv6_il : (const ice_bitmap_t *)ice_ptypes_ipv6_ofos_all; ice_and_bitmap(params->ptypes, params->ptypes, src, ICE_FLOW_PTYPE_MAX); @@ -645,8 +642,7 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params, case ICE_FLOW_FIELD_IDX_ICMP_TYPE: case ICE_FLOW_FIELD_IDX_ICMP_CODE: /* ICMP type and code share the same extraction seq. entry */ - prot_id = (params->prof->segs[seg].hdrs & - ICE_FLOW_SEG_HDR_IPV4) ? + prot_id = (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV4) ? ICE_PROT_ICMP_IL : ICE_PROT_ICMPV6_IL; sib = fld == ICE_FLOW_FIELD_IDX_ICMP_TYPE ? ICE_FLOW_FIELD_IDX_ICMP_CODE : @@ -1301,20 +1297,20 @@ ice_flow_set_rss_seg_info(struct ice_flow_seg_info *segs, u8 seg_cnt, /* set outer most header */ if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV4) segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV4 | - ICE_FLOW_SEG_HDR_IPV_FRAG | - ICE_FLOW_SEG_HDR_IPV_OTHER; + ICE_FLOW_SEG_HDR_IPV_FRAG | + ICE_FLOW_SEG_HDR_IPV_OTHER; else if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV6) segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV6 | - ICE_FLOW_SEG_HDR_IPV_FRAG | - ICE_FLOW_SEG_HDR_IPV_OTHER; + ICE_FLOW_SEG_HDR_IPV_FRAG | + ICE_FLOW_SEG_HDR_IPV_OTHER; else if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV4_GRE) segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV4 | - ICE_FLOW_SEG_HDR_GRE | - ICE_FLOW_SEG_HDR_IPV_OTHER; + ICE_FLOW_SEG_HDR_GRE | + ICE_FLOW_SEG_HDR_IPV_OTHER; else if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV6_GRE) segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV6 | - ICE_FLOW_SEG_HDR_GRE | - ICE_FLOW_SEG_HDR_IPV_OTHER; + ICE_FLOW_SEG_HDR_GRE | + ICE_FLOW_SEG_HDR_IPV_OTHER; if (seg->hdrs & ~ICE_FLOW_RSS_SEG_HDR_VAL_MASKS) return ICE_ERR_PARAM; @@ -1418,11 +1414,14 @@ ice_get_rss_hdr_type(struct ice_flow_prof *prof) if (prof->segs_cnt == ICE_FLOW_SEG_SINGLE) { hdr_type = ICE_RSS_OUTER_HEADERS; } else if (prof->segs_cnt == ICE_FLOW_SEG_MAX) { - if (prof->segs[ICE_RSS_OUTER_HEADERS].hdrs == ICE_FLOW_SEG_HDR_NONE) + const struct ice_flow_seg_info *s; + + s = &prof->segs[ICE_RSS_OUTER_HEADERS]; + if (s->hdrs == ICE_FLOW_SEG_HDR_NONE) hdr_type = ICE_RSS_INNER_HEADERS; - if (prof->segs[ICE_RSS_OUTER_HEADERS].hdrs & ICE_FLOW_SEG_HDR_IPV4) + if (s->hdrs & ICE_FLOW_SEG_HDR_IPV4) hdr_type = ICE_RSS_INNER_HEADERS_W_OUTER_IPV4; - if (prof->segs[ICE_RSS_OUTER_HEADERS].hdrs & ICE_FLOW_SEG_HDR_IPV6) + if (s->hdrs & ICE_FLOW_SEG_HDR_IPV6) hdr_type = ICE_RSS_INNER_HEADERS_W_OUTER_IPV6; } @@ -1529,13 +1528,14 @@ ice_add_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof) * [62:63] - Encapsulation flag: * 0 if non-tunneled * 1 if tunneled - * 2 for tunneled with outer ipv4 - * 3 for tunneled with outer ipv6 + * 2 for tunneled with outer IPv4 + * 3 for tunneled with outer IPv6 */ -#define ICE_FLOW_GEN_PROFID(hash, hdr, encap) \ - ((u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \ +#define ICE_FLOW_GEN_PROFID(hash, hdr, encap) \ + ((u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \ (((u64)(hdr) << ICE_FLOW_PROF_HDR_S) & ICE_FLOW_PROF_HDR_M) | \ - (((u64)(encap) << ICE_FLOW_PROF_ENCAP_S) & ICE_FLOW_PROF_ENCAP_M))) + (((u64)(encap) << ICE_FLOW_PROF_ENCAP_S) & \ + ICE_FLOW_PROF_ENCAP_M))) /** * ice_add_rss_cfg_sync - add an RSS configuration @@ -1559,7 +1559,8 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, return ICE_ERR_PARAM; segs_cnt = (cfg->hdr_type == ICE_RSS_OUTER_HEADERS) ? - ICE_FLOW_SEG_SINGLE : ICE_FLOW_SEG_MAX; + ICE_FLOW_SEG_SINGLE : + ICE_FLOW_SEG_MAX; segs = (struct ice_flow_seg_info *)ice_calloc(hw, segs_cnt, sizeof(*segs)); @@ -1663,18 +1664,16 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, struct ice_rss_hash_cfg local_cfg; enum ice_status status; - if (!ice_is_vsi_valid(hw, vsi_handle) || - !cfg || cfg->hdr_type > ICE_RSS_ANY_HEADERS || + if (!ice_is_vsi_valid(hw, vsi_handle) || !cfg || + cfg->hdr_type > ICE_RSS_ANY_HEADERS || cfg->hash_flds == ICE_HASH_INVALID) return ICE_ERR_PARAM; + ice_acquire_lock(&hw->rss_locks); local_cfg = *cfg; if (cfg->hdr_type < ICE_RSS_ANY_HEADERS) { - ice_acquire_lock(&hw->rss_locks); status = ice_add_rss_cfg_sync(hw, vsi_handle, &local_cfg); - ice_release_lock(&hw->rss_locks); } else { - ice_acquire_lock(&hw->rss_locks); local_cfg.hdr_type = ICE_RSS_OUTER_HEADERS; status = ice_add_rss_cfg_sync(hw, vsi_handle, &local_cfg); if (!status) { @@ -1682,8 +1681,8 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, status = ice_add_rss_cfg_sync(hw, vsi_handle, &local_cfg); } - ice_release_lock(&hw->rss_locks); } + ice_release_lock(&hw->rss_locks); return status; } @@ -1707,7 +1706,8 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u8 segs_cnt; segs_cnt = (cfg->hdr_type == ICE_RSS_OUTER_HEADERS) ? - ICE_FLOW_SEG_SINGLE : ICE_FLOW_SEG_MAX; + ICE_FLOW_SEG_SINGLE : + ICE_FLOW_SEG_MAX; segs = (struct ice_flow_seg_info *)ice_calloc(hw, segs_cnt, sizeof(*segs)); if (!segs) @@ -1762,8 +1762,8 @@ ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle, struct ice_rss_hash_cfg local_cfg; enum ice_status status; - if (!ice_is_vsi_valid(hw, vsi_handle) || - !cfg || cfg->hdr_type > ICE_RSS_ANY_HEADERS || + if (!ice_is_vsi_valid(hw, vsi_handle) || !cfg || + cfg->hdr_type > ICE_RSS_ANY_HEADERS || cfg->hash_flds == ICE_HASH_INVALID) return ICE_ERR_PARAM; @@ -1774,7 +1774,6 @@ ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle, } else { local_cfg.hdr_type = ICE_RSS_OUTER_HEADERS; status = ice_rem_rss_cfg_sync(hw, vsi_handle, &local_cfg); - if (!status) { local_cfg.hdr_type = ICE_RSS_INNER_HEADERS; status = ice_rem_rss_cfg_sync(hw, vsi_handle, diff --git a/sys/dev/ice/ice_flow.h b/sys/dev/ice/ice_flow.h index 0857b325ca7c..31c369c144e0 100644 --- a/sys/dev/ice/ice_flow.h +++ b/sys/dev/ice/ice_flow.h @@ -188,14 +188,14 @@ enum ice_flow_avf_hdr_field { enum ice_rss_cfg_hdr_type { ICE_RSS_OUTER_HEADERS, /* take outer headers as inputset. */ ICE_RSS_INNER_HEADERS, /* take inner headers as inputset. */ - /* take inner headers as inputset for packet with outer ipv4. */ + /* take inner headers as inputset for packet with outer IPv4. */ ICE_RSS_INNER_HEADERS_W_OUTER_IPV4, - /* take inner headers as inputset for packet with outer ipv6. */ + /* take inner headers as inputset for packet with outer IPv6. */ ICE_RSS_INNER_HEADERS_W_OUTER_IPV6, /* take outer headers first then inner headers as inputset */ - /* take inner as inputset for GTPoGRE with outer ipv4 + gre. */ + /* take inner as inputset for GTPoGRE with outer IPv4 + GRE. */ ICE_RSS_INNER_HEADERS_W_OUTER_IPV4_GRE, - /* take inner as inputset for GTPoGRE with outer ipv6 + gre. */ + /* take inner as inputset for GTPoGRE with outer IPv6 + GRE. */ ICE_RSS_INNER_HEADERS_W_OUTER_IPV6_GRE, ICE_RSS_ANY_HEADERS }; diff --git a/sys/dev/ice/ice_hw_autogen.h b/sys/dev/ice/ice_hw_autogen.h index 6b04bff4b722..8e59ebc76835 100644 --- a/sys/dev/ice/ice_hw_autogen.h +++ b/sys/dev/ice/ice_hw_autogen.h @@ -5476,6 +5476,7 @@ #define GL_MNG_FW_RAM_STAT_MNG_MEM_ECC_ERR_S 1 #define GL_MNG_FW_RAM_STAT_MNG_MEM_ECC_ERR_M BIT(1) #define GL_MNG_FWSM 0x000B6134 /* Reset Source: POR */ +#define GL_MNG_FWSM_FW_LOADING_M BIT(30) #define GL_MNG_FWSM_FW_MODES_S 0 #define GL_MNG_FWSM_FW_MODES_M MAKEMASK(0x7, 0) #define GL_MNG_FWSM_RSV0_S 3 diff --git a/sys/dev/ice/ice_iflib.h b/sys/dev/ice/ice_iflib.h index e9e09851b82c..4ac5fffe5b7e 100644 --- a/sys/dev/ice/ice_iflib.h +++ b/sys/dev/ice/ice_iflib.h @@ -192,6 +192,29 @@ struct ice_rx_queue { struct if_irq que_irq; }; +/** + * @struct ice_mirr_if + * @brief structure representing a mirroring interface + */ +struct ice_mirr_if { + struct ice_softc *back; + struct ifnet *ifp; + struct ice_vsi *vsi; + + device_t subdev; + if_ctx_t subctx; + if_softc_ctx_t subscctx; + + u16 num_irq_vectors; + u16 *if_imap; + u16 *os_imap; + struct ice_irq_vector *rx_irqvs; + + u32 state; + + bool if_attached; +}; + /** * @struct ice_softc * @brief main structure representing one device @@ -262,7 +285,7 @@ struct ice_softc { struct ice_resmgr rx_qmgr; /* Interrupt allocation manager */ - struct ice_resmgr imgr; + struct ice_resmgr dev_imgr; u16 *pf_imap; int lan_vectors; @@ -302,7 +325,7 @@ struct ice_softc { /* NVM link override settings */ struct ice_link_default_override_tlv ldo_tlv; - u16 fw_debug_dump_cluster_mask; + u32 fw_debug_dump_cluster_mask; struct sx *iflib_ctx_lock; @@ -310,6 +333,11 @@ struct ice_softc { ice_declare_bitmap(feat_cap, ICE_FEATURE_COUNT); ice_declare_bitmap(feat_en, ICE_FEATURE_COUNT); + struct ice_resmgr os_imgr; + /* For mirror interface */ + struct ice_mirr_if *mirr_if; + int extra_vectors; + int last_rid; }; #endif /* _ICE_IFLIB_H_ */ diff --git a/sys/dev/ice/ice_iflib_txrx.c b/sys/dev/ice/ice_iflib_txrx.c index 59332e8509f9..d9e8a77173c1 100644 --- a/sys/dev/ice/ice_iflib_txrx.c +++ b/sys/dev/ice/ice_iflib_txrx.c @@ -44,6 +44,18 @@ /* Tx/Rx hotpath utility functions */ #include "ice_common_txrx.h" +/* + * Driver private implementations + */ +static int _ice_ift_txd_encap(struct ice_tx_queue *txq, if_pkt_info_t pi); +static int _ice_ift_txd_credits_update(struct ice_softc *sc, struct ice_tx_queue *txq, bool clear); +static int _ice_ift_rxd_available(struct ice_rx_queue *rxq, qidx_t pidx, qidx_t budget); +static int _ice_ift_rxd_pkt_get(struct ice_rx_queue *rxq, if_rxd_info_t ri); +static void _ice_ift_rxd_refill(struct ice_rx_queue *rxq, uint32_t pidx, + uint64_t *paddrs, uint16_t count); +static void _ice_ift_rxd_flush(struct ice_softc *sc, struct ice_rx_queue *rxq, + uint32_t pidx); + /* * iflib txrx method declarations */ @@ -55,6 +67,13 @@ static int ice_ift_rxd_available(void *arg, uint16_t rxqid, qidx_t pidx, qidx_t static void ice_ift_rxd_flush(void *arg, uint16_t rxqid, uint8_t flidx, qidx_t pidx); static void ice_ift_rxd_refill(void *arg, if_rxd_update_t iru); static qidx_t ice_ift_queue_select(void *arg, struct mbuf *m, if_pkt_info_t pi); +static int ice_ift_txd_credits_update_subif(void *arg, uint16_t txqid, bool clear); +static int ice_ift_txd_encap_subif(void *arg, if_pkt_info_t pi); +static void ice_ift_txd_flush_subif(void *arg, uint16_t txqid, qidx_t pidx); +static int ice_ift_rxd_available_subif(void *arg, uint16_t rxqid, qidx_t pidx, qidx_t budget); +static int ice_ift_rxd_pkt_get_subif(void *arg, if_rxd_info_t ri); +static void ice_ift_rxd_refill_subif(void *arg, if_rxd_update_t iru); +static void ice_ift_rxd_flush_subif(void *arg, uint16_t rxqid, uint8_t flidx, qidx_t pidx); /* Macro to help extract the NIC mode flexible Rx descriptor fields from the * advanced 32byte Rx descriptors. @@ -82,8 +101,27 @@ struct if_txrx ice_txrx = { }; /** - * ice_ift_txd_encap - prepare Tx descriptors for a packet - * @arg: the iflib softc structure pointer + * @var ice_subif_txrx + * @brief Tx/Rx operations for the iflib stack, for subinterfaces + * + * Structure defining the Tx and Rx related operations that iflib can request + * the subinterface driver to perform. These are the main entry points for the + * hot path of the transmit and receive paths in the iflib driver. + */ +struct if_txrx ice_subif_txrx = { + .ift_txd_credits_update = ice_ift_txd_credits_update_subif, + .ift_txd_encap = ice_ift_txd_encap_subif, + .ift_txd_flush = ice_ift_txd_flush_subif, + .ift_rxd_available = ice_ift_rxd_available_subif, + .ift_rxd_pkt_get = ice_ift_rxd_pkt_get_subif, + .ift_rxd_refill = ice_ift_rxd_refill_subif, + .ift_rxd_flush = ice_ift_rxd_flush_subif, + .ift_txq_select_v2 = NULL, +}; + +/** + * _ice_ift_txd_encap - prepare Tx descriptors for a packet + * @txq: driver's TX queue context * @pi: packet info * * Prepares and encapsulates the given packet into into Tx descriptors, in @@ -94,10 +132,8 @@ struct if_txrx ice_txrx = { * Return 0 on success, non-zero error code on failure. */ static int -ice_ift_txd_encap(void *arg, if_pkt_info_t pi) +_ice_ift_txd_encap(struct ice_tx_queue *txq, if_pkt_info_t pi) { - struct ice_softc *sc = (struct ice_softc *)arg; - struct ice_tx_queue *txq = &sc->pf_vsi.tx_queues[pi->ipi_qsidx]; int nsegs = pi->ipi_nsegs; bus_dma_segment_t *segs = pi->ipi_segs; struct ice_tx_desc *txd = NULL; @@ -156,6 +192,27 @@ ice_ift_txd_encap(void *arg, if_pkt_info_t pi) return (0); } +/** + * ice_ift_txd_encap - prepare Tx descriptors for a packet + * @arg: the iflib softc structure pointer + * @pi: packet info + * + * Prepares and encapsulates the given packet into Tx descriptors, in + * preparation for sending to the transmit engine. Sets the necessary context + * descriptors for TSO and other offloads, and prepares the last descriptor + * for the writeback status. + * + * Return 0 on success, non-zero error code on failure. + */ +static int +ice_ift_txd_encap(void *arg, if_pkt_info_t pi) +{ + struct ice_softc *sc = (struct ice_softc *)arg; + struct ice_tx_queue *txq = &sc->pf_vsi.tx_queues[pi->ipi_qsidx]; + + return _ice_ift_txd_encap(txq, pi); +} + /** * ice_ift_txd_flush - Flush Tx descriptors to hardware * @arg: device specific softc pointer @@ -176,9 +233,9 @@ ice_ift_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) } /** - * ice_ift_txd_credits_update - cleanup Tx descriptors - * @arg: device private softc - * @txqid: the Tx queue to update + * _ice_ift_txd_credits_update - cleanup Tx descriptors + * @sc: device private softc + * @txq: the Tx queue to update * @clear: if false, only report, do not actually clean * * If clear is false, iflib is asking if we *could* clean up any Tx @@ -186,13 +243,12 @@ ice_ift_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) * * If clear is true, iflib is requesting to cleanup and reclaim used Tx * descriptors. + * + * Called by other txd_credits_update functions passed to iflib. */ static int -ice_ift_txd_credits_update(void *arg, uint16_t txqid, bool clear) +_ice_ift_txd_credits_update(struct ice_softc *sc __unused, struct ice_tx_queue *txq, bool clear) { - struct ice_softc *sc = (struct ice_softc *)arg; - struct ice_tx_queue *txq = &sc->pf_vsi.tx_queues[txqid]; - qidx_t processed = 0; qidx_t cur, prev, ntxd, rs_cidx; int32_t delta; @@ -235,9 +291,28 @@ ice_ift_txd_credits_update(void *arg, uint16_t txqid, bool clear) } /** - * ice_ift_rxd_available - Return number of available Rx packets + * ice_ift_txd_credits_update - cleanup PF VSI Tx descriptors * @arg: device private softc - * @rxqid: the Rx queue id + * @txqid: the Tx queue to update + * @clear: if false, only report, do not actually clean + * + * Wrapper for _ice_ift_txd_credits_update() meant for TX queues that + * belong to the PF VSI. + * + * @see _ice_ift_txd_credits_update() + */ +static int +ice_ift_txd_credits_update(void *arg, uint16_t txqid, bool clear) +{ + struct ice_softc *sc = (struct ice_softc *)arg; + struct ice_tx_queue *txq = &sc->pf_vsi.tx_queues[txqid]; + + return _ice_ift_txd_credits_update(sc, txq, clear); +} + +/** + * _ice_ift_rxd_available - Return number of available Rx packets + * @rxq: RX queue driver structure * @pidx: descriptor start point * @budget: maximum Rx budget * @@ -245,10 +320,8 @@ ice_ift_txd_credits_update(void *arg, uint16_t txqid, bool clear) * of the given budget. */ static int -ice_ift_rxd_available(void *arg, uint16_t rxqid, qidx_t pidx, qidx_t budget) +_ice_ift_rxd_available(struct ice_rx_queue *rxq, qidx_t pidx, qidx_t budget) { - struct ice_softc *sc = (struct ice_softc *)arg; - struct ice_rx_queue *rxq = &sc->pf_vsi.rx_queues[rxqid]; union ice_32b_rx_flex_desc *rxd; uint16_t status0; int cnt, i, nrxd; @@ -270,20 +343,54 @@ ice_ift_rxd_available(void *arg, uint16_t rxqid, qidx_t pidx, qidx_t budget) return (cnt); } +/** + * ice_ift_rxd_available - Return number of available Rx packets + * @arg: device private softc + * @rxqid: the Rx queue id + * @pidx: descriptor start point + * @budget: maximum Rx budget + * + * Wrapper for _ice_ift_rxd_available() that provides a function pointer + * that iflib requires for RX processing. + */ +static int +ice_ift_rxd_available(void *arg, uint16_t rxqid, qidx_t pidx, qidx_t budget) +{ + struct ice_softc *sc = (struct ice_softc *)arg; + struct ice_rx_queue *rxq = &sc->pf_vsi.rx_queues[rxqid]; + + return _ice_ift_rxd_available(rxq, pidx, budget); +} + /** * ice_ift_rxd_pkt_get - Called by iflib to send data to upper layer * @arg: device specific softc * @ri: receive packet info * - * This function is called by iflib, and executes in ithread context. It is - * called by iflib to obtain data which has been DMA'ed into host memory. - * Returns zero on success, and EBADMSG on failure. + * Wrapper function for _ice_ift_rxd_pkt_get() that provides a function pointer + * used by iflib for RX packet processing. */ static int ice_ift_rxd_pkt_get(void *arg, if_rxd_info_t ri) { struct ice_softc *sc = (struct ice_softc *)arg; struct ice_rx_queue *rxq = &sc->pf_vsi.rx_queues[ri->iri_qsidx]; + + return _ice_ift_rxd_pkt_get(rxq, ri); +} + +/** + * _ice_ift_rxd_pkt_get - Called by iflib to send data to upper layer + * @rxq: RX queue driver structure + * @ri: receive packet info + * + * This function is called by iflib, and executes in ithread context. It is + * called by iflib to obtain data which has been DMA'ed into host memory. + * Returns zero on success, and EBADMSG on failure. + */ +static int +_ice_ift_rxd_pkt_get(struct ice_rx_queue *rxq, if_rxd_info_t ri) +{ union ice_32b_rx_flex_desc *cur; u16 status0, plen, ptype; bool eop; @@ -340,7 +447,7 @@ ice_ift_rxd_pkt_get(void *arg, if_rxd_info_t ri) /* Get packet type and set checksum flags */ ptype = le16toh(cur->wb.ptype_flex_flags0) & ICE_RX_FLEX_DESC_PTYPE_M; - if ((iflib_get_ifp(sc->ctx)->if_capenable & IFCAP_RXCSUM) != 0) + if ((if_getcapenable(ri->iri_ifp) & IFCAP_RXCSUM) != 0) ice_rx_checksum(rxq, &ri->iri_csum_flags, &ri->iri_csum_data, status0, ptype); @@ -356,16 +463,14 @@ ice_ift_rxd_pkt_get(void *arg, if_rxd_info_t ri) * @arg: device specific softc structure * @iru: the Rx descriptor update structure * - * Update the Rx descriptor indices for a given queue, assigning new physical - * addresses to the descriptors, preparing them for re-use by the hardware. + * Wrapper function for _ice_ift_rxd_refill() that provides a function pointer + * used by iflib for RX packet processing. */ static void ice_ift_rxd_refill(void *arg, if_rxd_update_t iru) { struct ice_softc *sc = (struct ice_softc *)arg; struct ice_rx_queue *rxq; - uint32_t next_pidx; - int i; uint64_t *paddrs; uint32_t pidx; uint16_t qsidx, count; @@ -377,6 +482,26 @@ ice_ift_rxd_refill(void *arg, if_rxd_update_t iru) rxq = &(sc->pf_vsi.rx_queues[qsidx]); + _ice_ift_rxd_refill(rxq, pidx, paddrs, count); +} + +/** + * _ice_ift_rxd_refill - Prepare Rx descriptors for re-use by hardware + * @rxq: RX queue driver structure + * @pidx: first index to refill + * @paddrs: physical addresses to use *** 3362 LINES SKIPPED *** From nobody Wed Jul 31 07:30:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkJk686Gz5RNbD; Wed, 31 Jul 2024 07:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkJk5bR6z4mjb; Wed, 31 Jul 2024 07:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DgqxkJIocmA9SkPi/zsi7TSe+Qsy5NvxKEmGbW/gwdo=; b=jOB0dBNJRHPdDoJR5dZ/PDUP/02AJca+uF9jYo98CqQIQLSQunu6sZCtgS/Kbk7kaI0q42 su7i3n3ugkKJLcYEwtFY4hB+CxA0NDJ7W71smZ1x28NQe5DAGFpPYoVgds+3qVr18JNG4K 2cBQV1a88MoZht5TG/KNpbT5o3qeI9m7CR/jwRZ3X8p1kzrsYnIXlemnw0dPEZexcjhtYX rUfnI9UKJEM22fE5OWbL7gO4d/AnYm/9f48Pj4A87Nz/ouLyvYHToqOmLto1iMqxmbzxWm 07A37LtRI+30HzgYIsAxbdn8fhxKIae65HypDphAboNpa1tgg3TvQvvZr5XPpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411014; a=rsa-sha256; cv=none; b=mYWss32vIqMWjKaULMPwJjhjf7Iz9J26+7qidiOMyRg8gOtlc66krDYfx1vJuX4K7sTlp6 U/Qh0BeIcYbjMq/VyD0WER3rDLc4sbI6rdQUftLUKHPfSi4LMmcZ1ij5B5cYTOPJDsOeuj BwNbCZG+DuOrLczcxgNJnp8bGdb41YvMs8N93mjy4Kys5Y8AJvpK6ZfYNdLrxzFIPyBNVr AhuJBCFUggyvfbj5NyxE1G4+oblhLfO5lPp0mcU6meIMCl3JXSrkl1nwhMJGCqzG/asH5q xkbTAwZA1Re10jMFHiFVGVhDKE8Z/Z9ASRT1JsioKPu5NSNOPF4G9CxqHaJ03g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DgqxkJIocmA9SkPi/zsi7TSe+Qsy5NvxKEmGbW/gwdo=; b=Wa4QDv0Z3Fy6cgjXPpiZtCKMd3eIcId6ezVaYx0pJOtBTxWQduOiYFSrlcdecwH52Bmuac VwBq9dfdPlzAC1a/SK17t3I16CHH1Ouz+gt1bbzAN6Sz1hMUHRj/oFVr7eSUtSvXOjjvor nvc4ehVWzTCvNuOwcs840vnvgQoN6kU5Y8hw8sSzdPT3/qHSTQO8Mgu07Vu44qwFVDJNNO bylx5BtjA177kxbOOaJBFooZo69bymk7lLG/cuFLpmWFh6Zq7Zr94VWlWZEDod6DM3dnaY yk3emFgiNUXj2r38+s6NWHWjgDtQ6Drl8h6CwZ3YO/wlnk1sMXjd/szkzmQzVQ== 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 4WYkJk54MVzr4d; Wed, 31 Jul 2024 07:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7UEFU063758; Wed, 31 Jul 2024 07:30:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7UETS063749; Wed, 31 Jul 2024 07:30:14 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:30:14 GMT Message-Id: <202407310730.46V7UETS063749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 511583866352 - stable/14 - Revert "Fix llvm register allocator for native/cross build differences" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 51158386635294dc6cff48090a1a8faa2c97553e Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=51158386635294dc6cff48090a1a8faa2c97553e commit 51158386635294dc6cff48090a1a8faa2c97553e Author: Dimitry Andric AuthorDate: 2024-07-28 11:08:50 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 07:29:41 +0000 Revert "Fix llvm register allocator for native/cross build differences" In preparation for applying the fix that landed upstream, this reverts commit 397c2693fa66508cb5e6b173650a1f3bc6c4dd4f: Fix llvm register allocator for native/cross build differences Work around an issue in LLVM's register allocator, which can cause slightly different i386 object files, when produced by a native or cross build of clang. This adds another volatile qualifier to a float variable declaration in the weightCalcHelper() function, which otherwise produces slightly different float results on amd64 and i386 hosts. In turn, this can lead to different (but equivalent) register choices, and thus non-identical assembly code. See https://github.com/llvm/llvm-project/issues/99396 for more details. Note this is a temporary fix, meant to merge in time for 13.4. As soon as upstream has a permanent solution we will import that. PR: 276961 Reported by: cperciva MFC after: 3 days (cherry picked from commit 52552d7572a6d3d7d3ce0d6862de9a9d203c5d01) --- contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp index afde8d001f88..f3cb7fa5af61 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp @@ -256,12 +256,7 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start, return -1.0f; } - // FreeBSD customization: similar to the HWeight declaration below, add a - // volatile qualifier to avoid slightly different weight results on amd64 - // and i386 hosts, and possibly choosing different registers in the register - // allocator. See for - // more details. - volatile float Weight = 1.0f; + float Weight = 1.0f; if (IsSpillable) { // Get loop info for mi. if (MI->getParent() != MBB) { From nobody Wed Jul 31 07:30:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkJl65gfz5RNPV; Wed, 31 Jul 2024 07:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkJl5Zh5z4mdr; Wed, 31 Jul 2024 07:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEAtOuYA5I/0PBep4FzYOUQUSPoMVODvfEp6ob3c/As=; b=erH6da/cgQ4/8aySOk4lD9wTY6dusjsFiwuxCuxPBo+jer9NOVPvZc354sO9x2UwZO3CxE eJ9JtMKWsCxiI0kxHeZI/tk0aNkd/44Pi3920MiAAGp1n82zmsQmS70Z+CMM7TNWAMG9w9 3cquuKGeQI2c6DBM3prE+alWfvg0pU2uiC1kbTpyY43ad0xLY/x4Mlwym/7B4LDlnpNs1u /3y2rUiSp4itaFK9/wGcvy8ps45JfJcQlEy8BBmcV5FpVY+5RutM0oWXbUYizENboT73HI WUnPPhHoc4ged9TpoT+EjHQ0/CbFORxWz8xOUA1chlf+gWWJ/KcwBhl9LjlEoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411015; a=rsa-sha256; cv=none; b=B/42tftm5qquxreETqA9hlzpnYRCEjiHh/AxwitLHAutoN3Nx7IRWBB5oa6pyqhoUodIdZ Cq3CYR5H5o+qVLug/TwfZlnmSpdED59kXi3SlK1JNCsLBD2PDrTYfHQBG79RGmJ1dfp5kZ Fnen5diU4460stoh2MOrq6aKojuBCdO+6T0wRaSLzYpR0JVvslcDwRZFXLa4v6WfkXIyho 6zNRamM7WhllEhtQnB7Bk+7aN8vWxJ3QKGfc3qnX1eDrZqQobT3HEMzwz81qklxZZLYlzT QmxTUmO0qnmSA6ct67JfT2Cot57DlFkz2xo7kH+n3DiHwO7jqPuSnrk2DfUjGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEAtOuYA5I/0PBep4FzYOUQUSPoMVODvfEp6ob3c/As=; b=Vzx4pBGVvH4SyS3ihucuJX/NVZgaqiNDlR2PQDPg8kmVNhuoFpP9cN+l+Cn4zheS6Ys4Vu vyQwfi5ZjBeT+wJwQCDS3/BYtbqSyh9DNISNfaELKmn+Yd1HNFGcDlTnsLKeNO7J1b3Ca2 Wkd3yW8KnevJNdSUF0gwqtEYq4kuY+JshlCRuAGmkbWxvldYAYiKhNj9LuD4rlOjO+TuXu SvNJgMIAZHj2ECf0xsw/OVqsynylMR7DDLe1ZP4uefsSscQvYHBo6ZY67ZCxe+1YbNp51u FfGii4NivY+n3RtUXzmPIzDHcI40zkXO8zMJoWwTphMQ2kksV8raVIAPuMpIAg== 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 4WYkJl5BBMzs8D; Wed, 31 Jul 2024 07:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7UFc3064453; Wed, 31 Jul 2024 07:30:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7UF3m064445; Wed, 31 Jul 2024 07:30:15 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:30:15 GMT Message-Id: <202407310730.46V7UF3m064445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 96ff33484ee5 - stable/14 - Merge commit c80c09f3e380 from llvm-project (by Dimitry Andric): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 96ff33484ee5f44bc3ac743ce235d23495465904 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=96ff33484ee5f44bc3ac743ce235d23495465904 commit 96ff33484ee5f44bc3ac743ce235d23495465904 Author: Dimitry Andric AuthorDate: 2024-07-28 11:13:37 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 07:29:47 +0000 Merge commit c80c09f3e380 from llvm-project (by Dimitry Andric): [CalcSpillWeights] Avoid x87 excess precision influencing weight result Fixes #99396 The result of `VirtRegAuxInfo::weightCalcHelper` can be influenced by x87 excess precision, which can result in slightly different register choices when the compiler is hosted on x86_64 or i386. This leads to different object file output when cross-compiling to i386, or native. Similar to 7af3432e22b0, we need to add a `volatile` qualifier to the local `Weight` variable to force it onto the stack, and avoid the excess precision. Define `stack_float_t` in `MathExtras.h` for this purpose, and use it. This is the version of the fix for PR276961 that landed upstream. PR: 276961 Reported by: cperciva MFC after: 3 days (cherry picked from commit 1a4b8325f6e3a45c77188343da504fe04495cc46) --- contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h | 8 ++++++++ contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp | 11 ++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h b/contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h index aa4f4d2ed42e..afb4fa262152 100644 --- a/contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h +++ b/contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h @@ -644,6 +644,14 @@ std::enable_if_t, T> MulOverflow(T X, T Y, T &Result) { return UX > (static_cast(std::numeric_limits::max())) / UY; } +/// Type to force float point values onto the stack, so that x86 doesn't add +/// hidden precision, avoiding rounding differences on various platforms. +#if defined(__i386__) || defined(_M_IX86) +using stack_float_t = volatile float; +#else +using stack_float_t = float; +#endif + } // End llvm namespace #endif diff --git a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp index f3cb7fa5af61..fa7ef669ec11 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp @@ -22,6 +22,7 @@ #include "llvm/CodeGen/TargetSubtargetInfo.h" #include "llvm/CodeGen/VirtRegMap.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include #include @@ -256,7 +257,9 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start, return -1.0f; } - float Weight = 1.0f; + // Force Weight onto the stack so that x86 doesn't add hidden precision, + // similar to HWeight below. + stack_float_t Weight = 1.0f; if (IsSpillable) { // Get loop info for mi. if (MI->getParent() != MBB) { @@ -283,11 +286,9 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start, Register HintReg = copyHint(MI, LI.reg(), TRI, MRI); if (!HintReg) continue; - // Force hweight onto the stack so that x86 doesn't add hidden precision, + // Force HWeight onto the stack so that x86 doesn't add hidden precision, // making the comparison incorrectly pass (i.e., 1 > 1 == true??). - // - // FIXME: we probably shouldn't use floats at all. - volatile float HWeight = Hint[HintReg] += Weight; + stack_float_t HWeight = Hint[HintReg] += Weight; if (HintReg.isVirtual() || MRI.isAllocatable(HintReg)) CopyHints.insert(CopyHint(HintReg, HWeight)); } From nobody Wed Jul 31 07:36:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkSW4sc2z5RP2v; Wed, 31 Jul 2024 07:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkSW4LYmz4pFn; Wed, 31 Jul 2024 07:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QE0ebUp82Pfyfss2KBEHRV0OhBD0v3O1njCQwSvkXs8=; b=YMXKhtDUo2ymrBkxaqzKNqFN82DP46w+6nBdtNsSYA9JD5hdU0CkxfmWdAq8BQIYUznl9k cY+3Bm+qhDyIpdFgWRx9M1f4/rM5ytoxtE70JAJDqWTbGtYPX/Dp9oqWroOFZaNbn/ZRLl JCiW3EXLim/+ViU7a//nWJ2V9bTjYKULOUJol/CaFAIffZL0/D+azjwPmnus1ETy3+L83g HkBAJumgRAlnUHlKfudMfAmGSqezxgainYqUsIVFsN5XJgOUPJpXhw/83RSWcO/sF6rvph EC5rwqmu7Xcmy9NVvbQikisMYM9+Uyg2Q0076KfOO2kX6wHsrC8UZO7ukv0C/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411419; a=rsa-sha256; cv=none; b=IdWt9hGQR3vzpES3Qm58c1wvOMgd9Jp5mT/yOiSstWMkcUfQI9+Hd56kwLd5rOsEekTbnG 0qFaoSDvi7tXKLTo6wtpWUbsDYEuikk5WbARMwMUPSi7bOQoj7l6jLusx/5lGZD+0g+6UM xlplBXj+FAIhsqodgmfF6D8hUCphxSZ7AT0nUIvW0LNqqSvfsQgStiWhYPzgkmmLCKOyGm JxvynEpSRQjJWQk3C5LYEZ2t1enpaJUfwNmwBwj4yWeD1CmfLG/rTtkSsY5Hgxeu/L1R8X uLYua36KrXs+2pMSj6fjBg0DOa1Id14ZPmhxur8+knW8ZLumaaXpd3Hr+mng/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=1722411419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QE0ebUp82Pfyfss2KBEHRV0OhBD0v3O1njCQwSvkXs8=; b=cZe3RwyuH8JjDbKVBFPiIoEHvds5DXBYOQ2DzXOxmg3K9ONUXJQrjPF45OcYKDEGNCiT9L aCQ2/aQK6ORDz2LI3KBPKJXyUNTLvBCWuVP5T7XkY/0I+yftAuuj3h3BNqkKJSXK9bn/qO QsAWqmWoa/6k/NSOGjFlLlzMJl/JdrENYfJpV2AmZAwUCocl7Zhgj99pOXfMQEa2rWOynI XkESu+ZcoJz+qnym+Bd6AchA/ufTiUZ/Vz+PonAIcH/q7KvHg3PVGkmsVGEPMaG/CnTxZz 0YXV0qsIttgY8EB0fUWU90MIkWt/q6ZUlG7/qx2fIEtZGWE7e9wgdTgMo2OXQA== 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 4WYkSW3xcGzsNY; Wed, 31 Jul 2024 07:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7axst073267; Wed, 31 Jul 2024 07:36:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7axQe073264; Wed, 31 Jul 2024 07:36:59 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:36:59 GMT Message-Id: <202407310736.46V7axQe073264@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c8d0dca5e5f7 - stable/13 - Revert "Fix llvm register allocator for native/cross build differences" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c8d0dca5e5f75b98c90ccfb60f8a65523072a8c7 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c8d0dca5e5f75b98c90ccfb60f8a65523072a8c7 commit c8d0dca5e5f75b98c90ccfb60f8a65523072a8c7 Author: Dimitry Andric AuthorDate: 2024-07-28 11:08:50 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 07:29:57 +0000 Revert "Fix llvm register allocator for native/cross build differences" In preparation for applying the fix that landed upstream, this reverts commit 397c2693fa66508cb5e6b173650a1f3bc6c4dd4f: Fix llvm register allocator for native/cross build differences Work around an issue in LLVM's register allocator, which can cause slightly different i386 object files, when produced by a native or cross build of clang. This adds another volatile qualifier to a float variable declaration in the weightCalcHelper() function, which otherwise produces slightly different float results on amd64 and i386 hosts. In turn, this can lead to different (but equivalent) register choices, and thus non-identical assembly code. See https://github.com/llvm/llvm-project/issues/99396 for more details. Note this is a temporary fix, meant to merge in time for 13.4. As soon as upstream has a permanent solution we will import that. PR: 276961 Reported by: cperciva MFC after: 3 days (cherry picked from commit 52552d7572a6d3d7d3ce0d6862de9a9d203c5d01) --- contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp index afde8d001f88..f3cb7fa5af61 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp @@ -256,12 +256,7 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start, return -1.0f; } - // FreeBSD customization: similar to the HWeight declaration below, add a - // volatile qualifier to avoid slightly different weight results on amd64 - // and i386 hosts, and possibly choosing different registers in the register - // allocator. See for - // more details. - volatile float Weight = 1.0f; + float Weight = 1.0f; if (IsSpillable) { // Get loop info for mi. if (MI->getParent() != MBB) { From nobody Wed Jul 31 07:37:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkSX6z18z5RP2w; Wed, 31 Jul 2024 07:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkSX5K30z4pL5; Wed, 31 Jul 2024 07:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q3iv6M7PbSPY98s4/JIuw7wMtI2nGJf8h5zJB/CbmKw=; b=S8FjzOFTreGRUsZE5JSgs43pPD3Ubv9VVdV8BeZrMtoJyFf2Uf5Ky//3rY9jXoYkeStwHk UtwhxOeBIfTJAUc1mpFTk6+LM6F9GUYaMKFm84XBqGLvDuL5bj2P4tV1XbsSoW7ZvEsLUW OpRgm6LcysYqBBcX0XVB0wzHpKWRQpVcsNzsMD/nQzEMwpsWKMDvVrk9zxQcMok/d0naWD RKDEIeWnvYiZIY9kFyK9ChZCwu0klJ4wzWEbqVUZuG0DeMCn16rHEBW4+8PdEQnTx7JxDj g8sk2Dz9ynrAa45YR9cOh/zMyTl8ckyT5jwiJIKaMGPLYOzwf8UMMJgLuJJ7Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411420; a=rsa-sha256; cv=none; b=XbtM0FdWYS9g/OTa6iIjG6+07VSr+AK1HdT9P8ahl9+sHfpYu1yDRRnAdwUHi969XsM4f1 Cou5quVYPmZC/4fD3rHO2UhGvVd/MDuFobp7qvfBSufXjA+2PfZxjusbBWyRXvxF4ASexx GNk0Q7Z10Y60w1qCSgebZKOVdbMWBpXBZkG43ZYEXl/GlCJ9x1mLdZ2W4wo9+sqdz1dDvY F/gy5pDucITI6CXPQBagq2Xyf+2UJA6SuP+PbAFfBoVwonBTGJY5vmEbTpg0VcwhFWRok8 etuhQBGQ38YyTUQOrReW+3zUQSprXTFbNXRog/9SnSx4wWfp74oylToO88nU7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q3iv6M7PbSPY98s4/JIuw7wMtI2nGJf8h5zJB/CbmKw=; b=rtHQvS15Y3F3d+zhiH4GkgJui/1O+vMQIWbYEVgBDlzqdqvxuldBZTIxWHA48f4a5ny5yl xlL/3Egtg/g7Qz5yIgi4pE9wERnwxdK9jET8ct4iDflBMcf64al19gCMVsh7DnJlx8Ipx9 zQ0FO2hchOkId4Jk07yi5aKVNAgw8PBgOgbIFwHE9mEFkfdFXK/DNTcdYd8ujgb49KfmZc DwkUjn41d02Bv1v5bCxa5uQi1a0BZrJ6QYIlYAUrmvNNZPZl5i7M2ufy24ywg1YTdbtrGz SpcSZA8/Daia/rYeSTxEgk7mdyEW86fouv8YDQ1ZalZjRw1XMstvUv7fajhepA== 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 4WYkSX4xLNzsVh; Wed, 31 Jul 2024 07:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7b0ga073326; Wed, 31 Jul 2024 07:37:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7b0lk073323; Wed, 31 Jul 2024 07:37:00 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:37:00 GMT Message-Id: <202407310737.46V7b0lk073323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 814641415fbe - stable/13 - Merge commit c80c09f3e380 from llvm-project (by Dimitry Andric): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 814641415fbee707b312c334e00a1ebb5157e37b Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=814641415fbee707b312c334e00a1ebb5157e37b commit 814641415fbee707b312c334e00a1ebb5157e37b Author: Dimitry Andric AuthorDate: 2024-07-28 11:13:37 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 07:29:59 +0000 Merge commit c80c09f3e380 from llvm-project (by Dimitry Andric): [CalcSpillWeights] Avoid x87 excess precision influencing weight result Fixes #99396 The result of `VirtRegAuxInfo::weightCalcHelper` can be influenced by x87 excess precision, which can result in slightly different register choices when the compiler is hosted on x86_64 or i386. This leads to different object file output when cross-compiling to i386, or native. Similar to 7af3432e22b0, we need to add a `volatile` qualifier to the local `Weight` variable to force it onto the stack, and avoid the excess precision. Define `stack_float_t` in `MathExtras.h` for this purpose, and use it. This is the version of the fix for PR276961 that landed upstream. PR: 276961 Reported by: cperciva MFC after: 3 days (cherry picked from commit 1a4b8325f6e3a45c77188343da504fe04495cc46) --- contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h | 8 ++++++++ contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp | 11 ++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h b/contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h index aa4f4d2ed42e..afb4fa262152 100644 --- a/contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h +++ b/contrib/llvm-project/llvm/include/llvm/Support/MathExtras.h @@ -644,6 +644,14 @@ std::enable_if_t, T> MulOverflow(T X, T Y, T &Result) { return UX > (static_cast(std::numeric_limits::max())) / UY; } +/// Type to force float point values onto the stack, so that x86 doesn't add +/// hidden precision, avoiding rounding differences on various platforms. +#if defined(__i386__) || defined(_M_IX86) +using stack_float_t = volatile float; +#else +using stack_float_t = float; +#endif + } // End llvm namespace #endif diff --git a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp index f3cb7fa5af61..fa7ef669ec11 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/CalcSpillWeights.cpp @@ -22,6 +22,7 @@ #include "llvm/CodeGen/TargetSubtargetInfo.h" #include "llvm/CodeGen/VirtRegMap.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include #include @@ -256,7 +257,9 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start, return -1.0f; } - float Weight = 1.0f; + // Force Weight onto the stack so that x86 doesn't add hidden precision, + // similar to HWeight below. + stack_float_t Weight = 1.0f; if (IsSpillable) { // Get loop info for mi. if (MI->getParent() != MBB) { @@ -283,11 +286,9 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start, Register HintReg = copyHint(MI, LI.reg(), TRI, MRI); if (!HintReg) continue; - // Force hweight onto the stack so that x86 doesn't add hidden precision, + // Force HWeight onto the stack so that x86 doesn't add hidden precision, // making the comparison incorrectly pass (i.e., 1 > 1 == true??). - // - // FIXME: we probably shouldn't use floats at all. - volatile float HWeight = Hint[HintReg] += Weight; + stack_float_t HWeight = Hint[HintReg] += Weight; if (HintReg.isVirtual() || MRI.isAllocatable(HintReg)) CopyHints.insert(CopyHint(HintReg, HWeight)); } From nobody Wed Jul 31 07:41:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYJ4wlMz5RPL4; Wed, 31 Jul 2024 07:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYJ3vWXz4qb3; Wed, 31 Jul 2024 07:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlzLV7mGWHTChjzI7bACYD2ga20i80EStnICeNoI8jw=; b=n7VzMogDekE1OfGGiRF+Ccf8l3/A0wShSlFXMXmvbZ+9STb8bp21bO5hHHW2V+UHMeg/vL pEl+QmXtzO0NeeqdcugxE3uUc6m4MKlWogWA5p3o13kyeIP7bO9XjXFO1k8GO7bPgX5Ko9 8UxSGURP9qYRiyar8G8N0ix1pOZPxnh6zhk4ULy43LhIBUaA7AC6M9iIp6BEw2qY0Pz0a0 ngvK28n56PmXE8wHDIow0GpnTeTod813tMoqUrwgwXJo9/BU+hF9t65tSDZ2Fdabkc0X48 HxAaj09dZn2Phe86Ag7QR+xmU2Hj7xwUGwqhAT2jN558VKfe54xETz10Xp1H0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411668; a=rsa-sha256; cv=none; b=aePQBU5Qsy1aZg2Rmisdr2HK22p/3vV4S1RyMLxQ6ZYtjNfEbjBwpohuy5MvdSQW2E+FzI YAhro0SgZUmAbXXZGf+McQ10bsDgDQtGWOdVqJap3jqQVMoN3rLBZyUix/e3nNNMQE+HXL 9/XC7q1LN5X2f2RLXwEcapFghCPjblYIvV/X3nkIQfZ+Zgu/7n2p5MBg795OTEOWGay5fO NGw8Qx36lGjH032hxi/NR5IeiAgCs9f9tcOZIzc2G1MWjtubpLFgoQog+Uf0rrQzIpoMTa jyNnw/CJ7Nm6HslQ3hfcE8dMuTt9YOBCSOf9BZUAi7aItaqLkkWxdwaQa8rl+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlzLV7mGWHTChjzI7bACYD2ga20i80EStnICeNoI8jw=; b=FF4P7b2l5tBspdQ9kEIMPIovH/XVDi54c1ZNyOgsYt0Na0VLW4qp9op1ZDrenX57yLd5DN VU5KELq/CT+04aVZmUMUUXyW6ZXGYrGjLcjKSuFI8Ys79RjIRt6aYIgV7Rb5Lxksl0gHdW /M/Zg8iiWiECz4FgjHaKgTvl4u1TgFQHOgxZYiv48qkV0Mxx3crvA76ichzph6r8T3xn+I MNokOzz1YGAl95xD4ejCCwzU9CuwqvH4EbaaHuJ6GliyCKQtfjChReils7079jtSGp+QfY eZtlFOhOX0aGhTAsevgHGUdv89073HOEPx5KO0ct/XaPsDlzsnmw4c8169J1gg== 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 4WYkYJ3WDMzsDy; Wed, 31 Jul 2024 07:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7f8o0084363; Wed, 31 Jul 2024 07:41:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7f8ZG084360; Wed, 31 Jul 2024 07:41:08 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:08 GMT Message-Id: <202407310741.46V7f8ZG084360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 2f6b4611b5b8 - stable/14 - pf: stricter state checking for ICMP and ICMPv6 packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2f6b4611b5b847aee1ff8d5017a0f8a657f4101d Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2f6b4611b5b847aee1ff8d5017a0f8a657f4101d commit 2f6b4611b5b847aee1ff8d5017a0f8a657f4101d Author: Kristof Provost AuthorDate: 2024-07-09 13:59:33 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:53 +0000 pf: stricter state checking for ICMP and ICMPv6 packets Include the ICMP type in one port of the state key, using the type to determine which side should be the id, and which should be the type. Also: - Handle ICMP6 messages which are typically sent to multicast addresses but recieve unicast replies, by doing fallthrough lookups against the correct multicast address. - Clear up some mistaken assumptions in the PF code: - Not all ICMP packets have an icmp_id, so simulate one based on other data if we can, otherwise set it to 0. - Don't modify the icmp id field in NAT unless it's echo - Use the full range of possible id's when NATing icmp6 echoy ok henning marco testing matthieu todd MFC after: 1 day Obtained From: OpenBSD, mcbride 70bf7555ef4c Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 534ee17e61ee094ec175703bc50e88ff6587703e) --- sys/netpfil/pf/pf.c | 381 ++++++++++++++++++++++++++++++++++++++----------- sys/netpfil/pf/pf_lb.c | 19 ++- 2 files changed, 317 insertions(+), 83 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 1a4ef22ce5de..b3c4d47cabc2 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -295,6 +295,8 @@ static void pf_change_ap(struct mbuf *, struct pf_addr *, u_int16_t *, u_int16_t, u_int8_t, sa_family_t); static int pf_modulate_sack(struct mbuf *, int, struct pf_pdesc *, struct tcphdr *, struct pf_state_peer *); +int pf_icmp_mapping(struct pf_pdesc *, u_int8_t, int *, + int *, u_int16_t *, u_int16_t *); static void pf_change_icmp(struct pf_addr *, u_int16_t *, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t *, u_int16_t *, u_int16_t *, @@ -341,6 +343,10 @@ static int pf_test_state_tcp(struct pf_kstate **, static int pf_test_state_udp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *); +int pf_icmp_state_lookup(struct pf_state_key_cmp *, + struct pf_pdesc *, struct pf_kstate **, struct mbuf *, + int, struct pfi_kkif *, u_int16_t, u_int16_t, + int, int *, int); static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -393,6 +399,8 @@ extern struct proc *pf_purge_proc; VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); +enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI_SOLICITED, PF_ICMP_MULTI_LINK }; + #define PACKET_UNDO_NAT(_m, _pd, _off, _s) \ do { \ struct pf_state_key *nk; \ @@ -1745,6 +1753,142 @@ pf_isforlocal(struct mbuf *m, int af) return (false); } +int +pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, + int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) +{ + /* + * ICMP types marked with PF_OUT are typically responses to + * PF_IN, and will match states in the opposite direction. + * PF_IN ICMP types need to match a state with that type. + */ + *icmp_dir = PF_OUT; + *multi = PF_ICMP_MULTI_LINK; + /* Queries (and responses) */ + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *icmptype = ICMP_ECHO; + *icmpid = pd->hdr.icmp.icmp_id; + break; + + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *icmptype = ICMP_TSTAMP; + *icmpid = 0; /* Time is not a secret. */ + break; + + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *icmptype = ICMP_IREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *icmptype = ICMP_MASKREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *icmptype = ICMP_IPV6_WHEREAREYOU; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *icmptype = ICMP_MOBILE_REGREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *icmptype = ICMP_ROUTERSOLICIT; + *icmpid = 0; /* Nothing sane to match on! */ + break; + +#ifdef INET6 + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *icmptype = ICMP6_ECHO_REQUEST; + *icmpid = pd->hdr.icmp6.icmp6_id; + break; + + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *icmptype = MLD_LISTENER_QUERY; + *icmpid = 0; + break; + } + + /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ + case ICMP6_WRUREQUEST: + *icmp_dir = PF_IN; + case ICMP6_WRUREPLY: + *icmptype = ICMP6_WRUREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *icmptype = MLD_MTRACE; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *icmptype = ND_NEIGHBOR_SOLICIT; + *multi = PF_ICMP_MULTI_SOLICITED; + *icmpid = 0; + break; + } + +#endif /* INET6 */ + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: +#ifdef INET6 + /* + * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH + * ND_REDIRECT can't be in this list because the triggering packet + * header is optional. + */ + case ICMP6_PACKET_TOO_BIG: +#endif /* INET6 */ + /* These will not be used, but set them anyways */ + *icmp_dir = PF_IN; + *icmptype = htons(type); + *icmpid = 0; + return (1); /* These types are matched to other state */ + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *icmptype = type; + *icmpid = 0; + break; + } + HTONS(*icmptype); + return (0); +} + void pf_intr(void *v) { @@ -4408,8 +4552,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, int tag = -1; int asd = 0; int match = 0; - int state_icmp = 0; - u_int16_t sport = 0, dport = 0; + int state_icmp = 0, icmp_dir, multi; + u_int16_t sport = 0, dport = 0, virtual_type, virtual_id; u_int16_t bproto_sum = 0, bip_sum = 0; u_int8_t icmptype = 0, icmpcode = 0; struct pf_kanchor_stackframe anchor_stack[PF_ANCHOR_STACKSIZE]; @@ -4443,33 +4587,37 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, case IPPROTO_ICMP: if (pd->af != AF_INET) break; - sport = dport = pd->hdr.icmp.icmp_id; hdrlen = sizeof(pd->hdr.icmp); icmptype = pd->hdr.icmp.icmp_type; icmpcode = pd->hdr.icmp.icmp_code; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: if (af != AF_INET6) break; - sport = dport = pd->hdr.icmp6.icmp6_id; hdrlen = sizeof(pd->hdr.icmp6); icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ default: @@ -4563,7 +4711,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, } #ifdef INET case IPPROTO_ICMP: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET)) pf_change_a(&saddr->v4.s_addr, pd->ip_sum, nk->addr[pd->sidx].v4.s_addr, 0); @@ -4572,11 +4719,12 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[1] != pd->hdr.icmp.icmp_id) { + if (virtual_type == ICMP_ECHO && + nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, - nk->port[1], 0); - pd->hdr.icmp.icmp_id = nk->port[1]; + nk->port[pd->sidx], 0); + pd->hdr.icmp.icmp_id = nk->port[pd->sidx]; pd->sport = &pd->hdr.icmp.icmp_id; } m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); @@ -4584,7 +4732,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET6)) pf_change_a6(saddr, &pd->hdr.icmp6.icmp6_cksum, &nk->addr[pd->sidx], 0); @@ -6417,15 +6564,73 @@ pf_multihome_scan_asconf(struct mbuf *m, int start, int len, return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); } +int +pf_icmp_state_lookup(struct pf_state_key_cmp *key, struct pf_pdesc *pd, + struct pf_kstate **state, struct mbuf *m, int direction, struct pfi_kkif *kif, + u_int16_t icmpid, u_int16_t type, int icmp_dir, int *iidx, int multi) +{ + key->af = pd->af; + key->proto = pd->proto; + if (icmp_dir == PF_IN) { + *iidx = pd->sidx; + key->port[pd->sidx] = icmpid; + key->port[pd->didx] = type; + } else { + *iidx = pd->didx; + key->port[pd->sidx] = type; + key->port[pd->didx] = icmpid; + } + if (pd->af == AF_INET6 && multi != PF_ICMP_MULTI_NONE) { + switch (multi) { + case PF_ICMP_MULTI_SOLICITED: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = IPV6_ADDR_INT32_ONE; + key->addr[pd->sidx].addr32[3] = pd->src->addr32[3]; + key->addr[pd->sidx].addr8[12] = 0xff; + break; + case PF_ICMP_MULTI_LINK: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = 0; + key->addr[pd->sidx].addr32[3] = IPV6_ADDR_INT32_ONE; + break; + } + } else + PF_ACPY(&key->addr[pd->sidx], pd->src, key->af); + PF_ACPY(&key->addr[pd->didx], pd->dst, key->af); + + STATE_LOOKUP(kif, key, *state, pd); + + /* Is this ICMP message flowing in right direction? */ + if ((*state)->rule.ptr->type && + (((*state)->direction == direction) ? + PF_IN : PF_OUT) != icmp_dir) { + if (V_pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: icmp type %d in wrong direction (%d): ", + icmp_dir, pd->dir); + pf_print_state(*state); + printf("\n"); + } + return (PF_DROP); + } + return (-1); +} + static int pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) { struct pf_addr *saddr = pd->src, *daddr = pd->dst; - u_int16_t icmpid = 0, *icmpsum; + u_int16_t *icmpsum, virtual_id, virtual_type; u_int8_t icmptype, icmpcode; - int state_icmp = 0; + int icmp_dir, iidx, ret, multi; struct pf_state_key_cmp key; +#ifdef INET + u_int16_t icmpid; +#endif + + MPASS(*state == NULL); bzero(&key, sizeof(key)); switch (pd->proto) { @@ -6435,49 +6640,43 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, icmpcode = pd->hdr.icmp.icmp_code; icmpid = pd->hdr.icmp.icmp_id; icmpsum = &pd->hdr.icmp.icmp_cksum; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; +#ifdef INET icmpid = pd->hdr.icmp6.icmp6_id; +#endif icmpsum = &pd->hdr.icmp6.icmp6_cksum; - - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ } - if (!state_icmp) { + if (pf_icmp_mapping(pd, icmptype, &icmp_dir, &multi, + &virtual_id, &virtual_type) == 0) { /* * ICMP query/reply message not related to a TCP/UDP packet. * Search for an ICMP state. */ - key.af = pd->af; - key.proto = pd->proto; - key.port[0] = key.port[1] = icmpid; - if (pd->dir == PF_IN) { /* wire side, straight */ - PF_ACPY(&key.addr[0], pd->src, key.af); - PF_ACPY(&key.addr[1], pd->dst, key.af); - } else { /* stack side, reverse */ - PF_ACPY(&key.addr[1], pd->src, key.af); - PF_ACPY(&key.addr[0], pd->dst, key.af); + ret = pf_icmp_state_lookup(&key, pd, state, m, pd->dir, + kif, virtual_id, virtual_type, icmp_dir, &iidx, + PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); } - STATE_LOOKUP(kif, &key, *state, pd); - (*state)->expire = time_uptime; (*state)->timeout = PFTM_ICMP_ERROR_REPLY; @@ -6500,14 +6699,14 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[0] != + if (nk->port[iidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, icmpid, - nk->port[pd->sidx], 0); + nk->port[iidx], 0); pd->hdr.icmp.icmp_id = - nk->port[pd->sidx]; + nk->port[iidx]; } m_copyback(m, off, ICMP_MINLEN, @@ -6872,13 +7071,15 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMP; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp_id; + icmpid = iih.icmp_id; + pf_icmp_mapping(&pd2, iih.icmp_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); - STATE_LOOKUP(kif, &key, *state, pd); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) + return (ret); /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6888,21 +7089,23 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp_id) - pf_change_icmp(pd2.src, &iih.icmp_id, + (virtual_type == ICMP_ECHO && + nk->port[iidx] != iih.icmp_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP_ECHO) ? + &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP_ECHO) ? + nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp_id) - pf_change_icmp(pd2.dst, &iih.icmp_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, - pd2.ip_sum, icmpsum, - pd->ip_sum, 0, AF_INET); + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, + pd2.ip_sum, icmpsum, pd->ip_sum, 0, + AF_INET); m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); m_copyback(m, ipoff2, sizeof(h2), (caddr_t)&h2); @@ -6924,13 +7127,25 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMPV6; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp6_id; - - STATE_LOOKUP(kif, &key, *state, pd); + pf_icmp_mapping(&pd2, iih.icmp6_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, + state, m, pd->dir, kif, + virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); + } /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6940,19 +7155,21 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp6_id) - pf_change_icmp(pd2.src, &iih.icmp6_id, + ((virtual_type == ICMP6_ECHO_REQUEST) && + nk->port[pd2.sidx] != iih.icmp6_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP6_ECHO_REQUEST) + ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP6_ECHO_REQUEST) + ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp6_id) - pf_change_icmp(pd2.dst, &iih.icmp6_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index eb3d087e3df6..4fcad7e578a8 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -225,6 +225,23 @@ pf_get_sport(sa_family_t af, u_int8_t proto, struct pf_krule *r, if (pf_map_addr(af, r, saddr, naddr, NULL, &init_addr, sn)) return (1); + if (proto == IPPROTO_ICMP) { + if (*nport == htons(ICMP_ECHO)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#ifdef INET6 + if (proto == IPPROTO_ICMPV6) { + if (*nport == htons(ICMP6_ECHO_REQUEST)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#endif /* INET6 */ + bzero(&key, sizeof(key)); key.af = af; key.proto = proto; @@ -633,7 +650,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, switch (r->action) { case PF_NAT: if (pd->proto == IPPROTO_ICMP) { - low = 1; + low = 1; high = 65535; } else { low = r->rpool.proxy_port[0]; From nobody Wed Jul 31 07:41:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYK5yKcz5RNry; Wed, 31 Jul 2024 07:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYK4zdQz4qS7; Wed, 31 Jul 2024 07:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhJI3T5i+lZ54Fwl0ALkMvnLbaPdnnkRk5liwAD1SrU=; b=cowkfcTxP1iWck2T39C/YcejeyWV84vjhWoMEodoiol/sDy5YXy3QBuXvT0ZifN2BhPhex vjkCL+/qhiC9GpsLgjMdXCVnlj+xXjlC6dUbI8ts81riHF5ad7J+aoS2TLQ/c1E3+3c9gf IWPCt/D6C8tT2/eRN8ZCJBZN+oGTdhVwbwKZZhtWqi8+sMvGhRzkOWdm62QKWncwtwp5T2 +S3r6KJ/j0wxHiXkwxFxxOMH9L9U6gS1yXixDeI+URzpjEaQLgcPFh4Tq548GB5WCt/E9r Uxas4zjaFsUDrnQyT9Y9blMZ/beuS0+oEXPfV2T6CAgvRsoiXn+IdEAnQOYKCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411669; a=rsa-sha256; cv=none; b=a+o8hwvcvxcqv7behUr4GTReKT5e5gFpnYdvSBAeZeH8DgurvO137BlFs/DWvS+UjOGE9+ EvYSsYm6aMvRDpAF78f72C1tIPr0v6zWfl/SpKLmRX5jZ8RCLOFBfssgyHkNgHa/TvJazY A2UF1qUNhvb4vdN87k2kwi00D6xdMYSxUDV+ydSpNeZBJDdrXwjtzg7gxmO+R8LgUEQvp0 ibmE/CUCbhOe57bHcjhMns5kMpFkYoFa8ayLo5ZCTUdp3I2v93Epa+A/08VRvSt55nJfcW vHgoVPHz256TwVSWTSGBWvxovSnY8B59rcPleAC781fQALuV/Kstv0N4mQqXGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhJI3T5i+lZ54Fwl0ALkMvnLbaPdnnkRk5liwAD1SrU=; b=RjR0xU1+utmvCJ5JJ+R2X9g/pWb1WMjq6mAeHqitzgnF/ex1CVhHqeKxueDwWZXqGmcXHP jpkbrutCbbYf6muzHxkdGPQwJLBoqlmfugeIYLxggk+QRYxUbmUHYyiRqqNeot10+r0zBc NVr6mFUn2Dxo57HXvxwxctniyMCYEYHuTkyru5cK7dygSmxpBFyDoX6wlNMAFbRBtOasgd om61hcUyDflmtgjGUygViF3eYkIh9Nv2kBdCPIRgRSWMPuZtppmEDbOpXOHScUCKrOdNm4 aNlNWb6/VHeLPPOAqTXhcS80CwadvL45sh96snU6lpAZeYR5u2fNlQblAvj13A== 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 4WYkYK4bBFzsNg; Wed, 31 Jul 2024 07:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7f9of084544; Wed, 31 Jul 2024 07:41:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7f9TZ084541; Wed, 31 Jul 2024 07:41:09 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:09 GMT Message-Id: <202407310741.46V7f9TZ084541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c5081b8d3918 - stable/14 - pf: some ICMP types that also have icmp_id, pointed out by markus@ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c5081b8d3918564c1aba5a5e3f0a5219568e3435 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c5081b8d3918564c1aba5a5e3f0a5219568e3435 commit c5081b8d3918564c1aba5a5e3f0a5219568e3435 Author: Kristof Provost AuthorDate: 2024-07-10 11:32:03 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:53 +0000 pf: some ICMP types that also have icmp_id, pointed out by markus@ ok henning markus MFC after: 1 day Obtained From: OpenBSD, mcbride 8c0632cd274b Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2) --- sys/netpfil/pf/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index b3c4d47cabc2..e74a385d0f72 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1777,21 +1777,21 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_IN; case ICMP_TSTAMPREPLY: *icmptype = ICMP_TSTAMP; - *icmpid = 0; /* Time is not a secret. */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IREQ: *icmp_dir = PF_IN; case ICMP_IREQREPLY: *icmptype = ICMP_IREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_MASKREQ: *icmp_dir = PF_IN; case ICMP_MASKREPLY: *icmptype = ICMP_MASKREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IPV6_WHEREAREYOU: From nobody Wed Jul 31 07:41:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYL2SJFz5RPLJ; Wed, 31 Jul 2024 07:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYL02RVz4qg0; Wed, 31 Jul 2024 07:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/GjKuEnqtwHg3cZ4TkFi72QesW2Gzp3pyNpC2fnwN8=; b=fZhAdP1p5kryxN8oNVWcKUp8bES+I8vtW4v3v5LglIVOqIlkCefkScFQClCX5BhrMiogsv eSFNkINgHiooaXQ0Uj6/2YzdDENdOEWxse/t8vA0cOnioRh3jzUMMmNIDr6KnjxtZI6Ljo q1rwpd/OEpz73M0uJnwjN5iDJJjKV2Y1R6f/BrrA5Ht+Ystctt0Lrr9seUwTsv7dCy4urd 4lgMgEmN+MEM3gprzRcjRcecQvNpb2MxwL+bjPOtGbqXray3aOCx8wIDDvcN4SxJwBM/+n zH9BO3VuIsvIhvvlh4zQf5WUFZnkl/TEeZzEAlRtwVu4zmecBwmU6j+4zpaxJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411670; a=rsa-sha256; cv=none; b=mbrq6T/tef7An6XvkTKH6RNT7Af/MXgJ82oXJkPKqFI+EYu/WlWoFVtqOOjg0oFnVARcIb X+iEwixdX6cQKCPaat1I+5RSEo24VwYm5fYdjukBDZB8HflPKg8ziyYFUgS0V1dfBzWZ1q KP6yNn9sMaapCPVsGSk/31V9lgF/QNNUEpEDJQ7gm9vKS+FU4TnH1M2vcicSUj+qvG6ftP SFLgKggUUOs2YFTq/6ofAvrsWQFWOGSrpCwIYYlldgin7Tid/c+t6H2zP+IDQb390LGn3x 4w8fHlgdN7OH9Jwz99b6R+TUt5LQBi9dSprFiEXqYXG9UfeHrm1oLa95ZLNqIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/GjKuEnqtwHg3cZ4TkFi72QesW2Gzp3pyNpC2fnwN8=; b=snuwVQxAIoP7MwY+OGug48nt4sVYtaZ/hX5RCGg6ya9Q7MiPwZwKjj8DFAGmYF0ojtAThB pc4XqUKp//gi7XDYyOmcDCplUpQUD98EXDHwoUlbMRdrbPD9M13bnZkeXxMuOsxfM1jpj+ DmomEh4ag0xLWIwrVQEpVQYjND/9OLmdDkG+XxopLAFduEb22+G94XyWAC5aTnBVfUhdoz wP0mMh7k9rhjRFuAwE2KlwNJsOM9iwTXOm2LOMMmmzYnQAY/OowKV8nstVt1I1hoNnAp3w 2f3ChKEHIlr0CnEn3k5WF3NifPJMRorqB8OuTwcEOA0eusrdHEVE4+SkqX51qw== 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 4WYkYK6kGlzsF0; Wed, 31 Jul 2024 07:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7f9FY084608; Wed, 31 Jul 2024 07:41:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7f9Rv084605; Wed, 31 Jul 2024 07:41:09 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:09 GMT Message-Id: <202407310741.46V7f9Rv084605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 3cf0fe176e72 - stable/13 - pf: some ICMP types that also have icmp_id, pointed out by markus@ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3cf0fe176e72a2c6cea6d4b8efd2a10a59c9a89a Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3cf0fe176e72a2c6cea6d4b8efd2a10a59c9a89a commit 3cf0fe176e72a2c6cea6d4b8efd2a10a59c9a89a Author: Kristof Provost AuthorDate: 2024-07-10 11:32:03 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:34 +0000 pf: some ICMP types that also have icmp_id, pointed out by markus@ ok henning markus MFC after: 1 day Obtained From: OpenBSD, mcbride 8c0632cd274b Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2) --- sys/netpfil/pf/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9f94da48a15f..66f27f7f45af 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1730,21 +1730,21 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_IN; case ICMP_TSTAMPREPLY: *icmptype = ICMP_TSTAMP; - *icmpid = 0; /* Time is not a secret. */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IREQ: *icmp_dir = PF_IN; case ICMP_IREQREPLY: *icmptype = ICMP_IREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_MASKREQ: *icmp_dir = PF_IN; case ICMP_MASKREPLY: *icmptype = ICMP_MASKREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IPV6_WHEREAREYOU: From nobody Wed Jul 31 07:41:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYM0Y6Zz5RPLS; Wed, 31 Jul 2024 07:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYL62thz4qb9; Wed, 31 Jul 2024 07:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nmJCn1tv9yGV/YsSIN2p+QQi7gbReoRqZ1MguxMTT54=; b=v9GTGEMd5V2XYdSk/7tXagVWg8I3mEcuWIU/RkO449CzhS8bNQ3apu6udTIYm7AlHkT4ji hxT4++wYNU2Zaz7yewhg8IMjhyoOXQTzINxDEyIeTLpKiW7T0HLm5dMwpZIxbWKo4zPQCW cUvLWLCekHJ7XShyFiOG9p3yCLdTuAk5KqfQw7RHB3y21iEDaIBzuvW6PU7J/ZdpkSme/D J2n6w4cdXof/fnMHmtsFblOBdjU1x4GDZbTjmzy3URQnqXehPY3lz+RG/0XEPu1gBae2DV EfS/6yRETDBLNMsKPo8usjj+7aKK4SDh1RZjEbvq87j182vdGhvxr0Nox8x5Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411670; a=rsa-sha256; cv=none; b=Jmni9h/GFA+51iQT/+RVnjxvASzlY3DRDxofeBQPHwauuOBjyaYf4qhv7gPyLjrymnitY1 /0zSF0URMiweXu/a6Wd3zc2arUxuELa3U8Fi1CW68Peg2TCb/XKQK522agQs0oovpYyaRz VcyvNaBbPy9eAqj5qeRdfrdaM/Isjc67iMGSpntqijL/IUGIuxk7CKi62ZqfVBgsEBjmPZ 40sOYzefiw2A6dvIoh0Uo9WBxCwornUqR4yxhktetkOHtHXflDPuhqi5oI3JwsQiDOEbZe EMUDxeLS2bKHJTg1TGmdgKHMsQLhjlRdVQ4lujH7uHQgM79lc8ekH92ILAIlNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nmJCn1tv9yGV/YsSIN2p+QQi7gbReoRqZ1MguxMTT54=; b=Q41l+cY7u/C2z4AP6ujEF81q1wQeXqiNq4/40k4t+eke2apw5aetESn4gphnd7zUNVC2nD 6BXHO3J83NEMhOEtTUHYKR/NM2hszFsC95WQkPAT8SG1I+PwqcTVv5BPG4baiVBwDV+7nF sy3kAB5yzEZPOMASgn8snwz+Zb8co7pdzGWD4C85YkSn3EQhBY5LWCOoiN5hGFQbIujzKa 2mpJv8xpvPYbAqNrUcBZzt/gi/9XABz4i2qpgoD/fZwEQKdDPyotODIsrjM+4jA7QYgwpI kLXO6yenVZQWMuTEsB2DbZCb3FvgvuWefCUUX7lHksIyGSR9dUkYK7ZEK50l0Q== 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 4WYkYL5fTyzsYc; Wed, 31 Jul 2024 07:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7fAqp084656; Wed, 31 Jul 2024 07:41:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7fA4W084653; Wed, 31 Jul 2024 07:41:10 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:10 GMT Message-Id: <202407310741.46V7fA4W084653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 7f77305a5ba4 - stable/14 - pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7f77305a5ba421f901cf3ac59a6449a70645fda4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7f77305a5ba421f901cf3ac59a6449a70645fda4 commit 7f77305a5ba421f901cf3ac59a6449a70645fda4 Author: Kristof Provost AuthorDate: 2024-07-10 12:10:50 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:53 +0000 pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() In pf_icmp_mapping() the ICMP and ICMPv6 types shared the same number space. In fact they are independent and must be handled separately. Fix traceroute via pf by splitting pf_icmp_mapping() into IPv4 and IPv6 sections. ok henning@ mcbride@; tested mcbride@; sure deraadt@ MFC after: 1 day Obtained From: OpenBSD, bluhm ef4bccd7509e Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 46755f52247bd34a7f013d6844ed0c673ac0defc) --- sys/netpfil/pf/pf.c | 247 ++++++++++++++++++++++++++++------------------------ 1 file changed, 135 insertions(+), 112 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index e74a385d0f72..261a52a7c2f0 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1755,7 +1755,7 @@ pf_isforlocal(struct mbuf *m, int af) int pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, - int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) + int *icmp_dir, int *multi, u_int16_t *virtual_id, u_int16_t *virtual_type) { /* * ICMP types marked with PF_OUT are typically responses to @@ -1765,128 +1765,151 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_OUT; *multi = PF_ICMP_MULTI_LINK; /* Queries (and responses) */ - switch (type) { - case ICMP_ECHO: - *icmp_dir = PF_IN; - case ICMP_ECHOREPLY: - *icmptype = ICMP_ECHO; - *icmpid = pd->hdr.icmp.icmp_id; - break; + switch (pd->af) { +#ifdef INET + case AF_INET: + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *virtual_type = ICMP_ECHO; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_TSTAMP: - *icmp_dir = PF_IN; - case ICMP_TSTAMPREPLY: - *icmptype = ICMP_TSTAMP; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *virtual_type = ICMP_TSTAMP; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IREQ: - *icmp_dir = PF_IN; - case ICMP_IREQREPLY: - *icmptype = ICMP_IREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *virtual_type = ICMP_IREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_MASKREQ: - *icmp_dir = PF_IN; - case ICMP_MASKREPLY: - *icmptype = ICMP_MASKREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *virtual_type = ICMP_MASKREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IPV6_WHEREAREYOU: - *icmp_dir = PF_IN; - case ICMP_IPV6_IAMHERE: - *icmptype = ICMP_IPV6_WHEREAREYOU; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *virtual_type = ICMP_IPV6_WHEREAREYOU; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_MOBILE_REGREQUEST: - *icmp_dir = PF_IN; - case ICMP_MOBILE_REGREPLY: - *icmptype = ICMP_MOBILE_REGREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *virtual_type = ICMP_MOBILE_REGREQUEST; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_ROUTERSOLICIT: - *icmp_dir = PF_IN; - case ICMP_ROUTERADVERT: - *icmptype = ICMP_ROUTERSOLICIT; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *virtual_type = ICMP_ROUTERSOLICIT; + *virtual_id = 0; /* Nothing sane to match on! */ + break; -#ifdef INET6 - case ICMP6_ECHO_REQUEST: - *icmp_dir = PF_IN; - case ICMP6_ECHO_REPLY: - *icmptype = ICMP6_ECHO_REQUEST; - *icmpid = pd->hdr.icmp6.icmp6_id; - break; + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ - case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; - case MLD_LISTENER_REPORT: { - *icmptype = MLD_LISTENER_QUERY; - *icmpid = 0; + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } +#endif /* INET */ +#ifdef INET6 + case AF_INET6: + switch (type) { + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *virtual_type = ICMP6_ECHO_REQUEST; + *virtual_id = pd->hdr.icmp6.icmp6_id; + break; - /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ - case ICMP6_WRUREQUEST: - *icmp_dir = PF_IN; - case ICMP6_WRUREPLY: - *icmptype = ICMP6_WRUREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *virtual_type = MLD_LISTENER_QUERY; + *virtual_id = 0; + break; + } + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *virtual_type = MLD_MTRACE; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case MLD_MTRACE: - *icmp_dir = PF_IN; - case MLD_MTRACE_RESP: - *icmptype = MLD_MTRACE; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *virtual_type = ND_NEIGHBOR_SOLICIT; + *virtual_id = 0; + break; + } - case ND_NEIGHBOR_SOLICIT: - *icmp_dir = PF_IN; - case ND_NEIGHBOR_ADVERT: { - *icmptype = ND_NEIGHBOR_SOLICIT; - *multi = PF_ICMP_MULTI_SOLICITED; - *icmpid = 0; + /* + * These ICMP types map to other connections. + * ND_REDIRECT can't be in this list because the triggering + * packet header is optional. + */ + case ICMP6_DST_UNREACH: + case ICMP6_PACKET_TOO_BIG: + case ICMP6_TIME_EXCEEDED: + case ICMP6_PARAM_PROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ + /* + * All remaining ICMP6 types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } - #endif /* INET6 */ - /* These ICMP types map to other connections */ - case ICMP_UNREACH: - case ICMP_SOURCEQUENCH: - case ICMP_REDIRECT: - case ICMP_TIMXCEED: - case ICMP_PARAMPROB: -#ifdef INET6 - /* - * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH - * ND_REDIRECT can't be in this list because the triggering packet - * header is optional. - */ - case ICMP6_PACKET_TOO_BIG: -#endif /* INET6 */ - /* These will not be used, but set them anyways */ - *icmp_dir = PF_IN; - *icmptype = htons(type); - *icmpid = 0; - return (1); /* These types are matched to other state */ - /* - * All remaining ICMP types get their own states, - * and will only match in one direction. - */ default: *icmp_dir = PF_IN; - *icmptype = type; - *icmpid = 0; + *virtual_type = type; + *virtual_id = 0; break; } - HTONS(*icmptype); - return (0); + HTONS(*virtual_type); + return (0); /* These types match to their own state */ } void @@ -4719,7 +4742,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (virtual_type == ICMP_ECHO && + if (virtual_type == htons(ICMP_ECHO) && nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, @@ -7089,13 +7112,13 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - (virtual_type == ICMP_ECHO && + (virtual_type == htons(ICMP_ECHO) && nk->port[iidx] != iih.icmp_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); @@ -7155,13 +7178,13 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - ((virtual_type == ICMP6_ECHO_REQUEST) && + ((virtual_type == htons(ICMP6_ECHO_REQUEST)) && nk->port[pd2.sidx] != iih.icmp6_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); From nobody Wed Jul 31 07:41:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYN21dqz5RPNK; Wed, 31 Jul 2024 07:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYM6Nlrz4qg5; Wed, 31 Jul 2024 07:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8SqNM5VTKgWrWx7hDcPsaWUIyFNwmTvMxMWcSMc0Ms=; b=CV24rspPA6OEtodMtSc97TjD0YdFnLT1U9mA/P2VGQz5Yp+JOBLnAuQfFxB/77KmK2k/Y1 C/cv+bPMmV5wIfvy+ySY92oebqD/W8G1biQwjP2sIY9z5JhJc5KdhVGD2w2J2j7+Q3ji2w J3dSdAg6B4FMLfoij2J5RqNT3p83HTCqcKtGRzWoSnOdpzBy1cJa1aEWnqBXnDAkbp0i7v 7umK7OcZL/lxhkW/CJUEqJNp9FNpg0Nu2bs/DntgXf367iB007qh6EH+CCIPBGS29Dzmoy UWhPdyLbP8+B70llwD03c9t/y5l1kun3DYT7M+Di5fnWSo6KA+mZmUChOqjGOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411671; a=rsa-sha256; cv=none; b=gf8iSKx81LJ2LQM7pSUYBFahVADSNWi53zOEAnN3R2zlVVnm2Uoi9tLuT/hfhAEVWrwl4y DTlWKrZCSsERCZzcc7tfgoQ3CwHCroa/S+HfGSBUjry+MFazlHmRC7RkLV3eyJFNSua8qX yYEe9nXfxZi/7+asE3/YiwMr0IJCH3mLmByq37O6DuEpnoTKQAZdI6eaJsXHJUJF4/IkKq m+nhY2hEnFcpok1r5hcmaP2mbxm0oXEe2snoedl99Y/rTkpoU8v8iVd8QN/tpHbsah4Vre PQm8nyBMNl6xZGMSPsYtecIjBt1DEUvPQsM2oUg5wACuARtSRi8Uo3dI16rD8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8SqNM5VTKgWrWx7hDcPsaWUIyFNwmTvMxMWcSMc0Ms=; b=CU89MAHaDu5BShSYxq66SWtmH7BtTtatgV/1lBVzKrse+1Xy0SEcCCVTX0Nq0duJI6A2WA U5s9wT1VIdgHSIysRIzXW26lzOESfU3Ub1uuh4ukB6fZtu3mu8OSQ4F60hMJqKVtV0DxgX cehux/Hg/I9aPz3Xyvwky3FpiCg3F1kOeuSue/oZC3+xQ5ULwF6LAueKSltm+FWJpA/Dof S2MNgNS3b+D4ZvWOSTyDlAqPfw+fPqQm4BRtWyRs8E9WWpBJRXWlTK3ohK63rhKepG1GMW 6HtyFBdc5FR0YurGZc9n2pujUUjlnCeYV+we4B9m+2oDk2pFtybXfpTgD0JhXQ== 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 4WYkYM5zszzsYd; Wed, 31 Jul 2024 07:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7fBL9084761; Wed, 31 Jul 2024 07:41:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7fBfO084758; Wed, 31 Jul 2024 07:41:11 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:11 GMT Message-Id: <202407310741.46V7fBfO084758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 3382c691dc6a - stable/14 - pf: allow MLD LR to be sent without state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3382c691dc6a0d4e1f39ff67b5507f6542972498 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3382c691dc6a0d4e1f39ff67b5507f6542972498 commit 3382c691dc6a0d4e1f39ff67b5507f6542972498 Author: Kristof Provost AuthorDate: 2024-07-10 12:36:18 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:53 +0000 pf: allow MLD LR to be sent without state Change PF behavior to allow MLD Listener Report packets to be sent without needing a previously created state by MLD Listener Query. It wasn't working because: (1) you might not have a previous MLD Listener Query and (2) the addresses of the Query and Report don't match. ok mikeb@, sashan@ MFC after: 1 day Obtained From: OpenBSD, rzalamena , 5c526dbdb0f2 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 1afe4da75d1d2acd33b25eea942af28aa41c82c2) --- sys/netpfil/pf/pf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 261a52a7c2f0..1fa60ce9d051 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1854,8 +1854,15 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, break; case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; case MLD_LISTENER_REPORT: { + /* + * Listener Report can be sent by clients + * without an associated Listener Query. + * In addition to that, when Report is sent as a + * reply to a Query its source and destination + * address are different. + */ + *icmp_dir = PF_IN; *virtual_type = MLD_LISTENER_QUERY; *virtual_id = 0; break; From nobody Wed Jul 31 07:41:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYM1tf0z5RPQm; Wed, 31 Jul 2024 07:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYM14mGz4qS9; Wed, 31 Jul 2024 07:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1GEW81okbY9dqAFA+3nfUal5aYvKGElko68DsFBG8o=; b=IMIweuYu8XE7qAM6scxtrllssDgTrL0oDahA0GGIJwQ0LQaDaQbIm9YqcuWBb/GZr8oq34 9CRQXQry4DEctle9SOvyJNFW+nRMi/oNZVl9uvzNLXI+dN3GdoTxZaSVPEyOuuU7DfVvpZ cObuJiJqOMIrav6+lOJKKT5rqajQskBkHoeD9QErCaqy+0h3wM0M0v7QKqpKhKPANCoQhz +mWH6G9pp8nqNhniidbIkF4NOdIhnzpAFRwOoKwy0/NS9tpK3euG/6iOVPh7oUO+365Kgv Mz+ZQ3dhDt/m4GsdLWl4CrZ2J4xulI0oJ/BovY3aLPfFh0RIxpTV32sCCUoqMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411671; a=rsa-sha256; cv=none; b=ALsZKlWtkuXfjyLon1kaTiTE4Ls77pMoYGvNAbWkdE3cqmBzFwWll31KjBqWfLJ9J97FbP OQRvZBSlano7+JKT3WSGAajuE92xCYwH64gJlyIKOX2WZrd7pTEgv+pkRAL6yUpyGk5X/e LP4kzIZ0H5rkcTrlbJh0kbBF9tAsizrKHt53BTq3b5kNfCH83Uo0ZRt1vUpuBRiBAHONgq 9FFBJH20ibhathgJS5gcqWxgD5aC1FVRax+2OnFWXlVHhcHytG8rw5GolaxqHHHcC0tilq tFwpGgEi88QbZ4yGKEYWP12/H9zMwyPrgWmkHNa2p2dV+BBmCoU3l79R/cQdwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1GEW81okbY9dqAFA+3nfUal5aYvKGElko68DsFBG8o=; b=lJBWvsTuxBHimmnv4QZ4Q8tSbuXhxjuYopc1Un3OfT0wyXh8SLXZxiOJa/Ebr1RRPyE6gd 2F1PBqEEGW+L0HX7/Ou46Y8woc9RIMUXktqpMKPrf+ifFOaxp0DT04tuqlEsnU8PRTeun+ ElYELCQ7aZh5FqekYxUgHXu5KRNDPJgaWuomeu1isqx/X8I15QuOTJX139uBkTtHyNu6x1 SZe+dP4KjgMteA+p9njurx5YbhhU493SnC7RzbuhXoBGnbKRaLlK1rJcCb87ifo0BcWikM /tYvReEaCY+wTJsNdYpyt2hk1pdzJGXB3TwrOCHNpnnbg7znkymblOpK4VRsjQ== 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 4WYkYM0fxvzsSv; Wed, 31 Jul 2024 07:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7fAJl084704; Wed, 31 Jul 2024 07:41:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7fA4V084701; Wed, 31 Jul 2024 07:41:10 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:10 GMT Message-Id: <202407310741.46V7fA4V084701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 178265a4be8a - stable/13 - pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 178265a4be8a81b93a5e6a640905e3382801c5be Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=178265a4be8a81b93a5e6a640905e3382801c5be commit 178265a4be8a81b93a5e6a640905e3382801c5be Author: Kristof Provost AuthorDate: 2024-07-10 12:10:50 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:34 +0000 pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() In pf_icmp_mapping() the ICMP and ICMPv6 types shared the same number space. In fact they are independent and must be handled separately. Fix traceroute via pf by splitting pf_icmp_mapping() into IPv4 and IPv6 sections. ok henning@ mcbride@; tested mcbride@; sure deraadt@ MFC after: 1 day Obtained From: OpenBSD, bluhm ef4bccd7509e Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 46755f52247bd34a7f013d6844ed0c673ac0defc) --- sys/netpfil/pf/pf.c | 247 ++++++++++++++++++++++++++++------------------------ 1 file changed, 135 insertions(+), 112 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 66f27f7f45af..767fecdcb3f1 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1708,7 +1708,7 @@ pf_isforlocal(struct mbuf *m, int af) int pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, - int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) + int *icmp_dir, int *multi, u_int16_t *virtual_id, u_int16_t *virtual_type) { /* * ICMP types marked with PF_OUT are typically responses to @@ -1718,128 +1718,151 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_OUT; *multi = PF_ICMP_MULTI_LINK; /* Queries (and responses) */ - switch (type) { - case ICMP_ECHO: - *icmp_dir = PF_IN; - case ICMP_ECHOREPLY: - *icmptype = ICMP_ECHO; - *icmpid = pd->hdr.icmp.icmp_id; - break; + switch (pd->af) { +#ifdef INET + case AF_INET: + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *virtual_type = ICMP_ECHO; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_TSTAMP: - *icmp_dir = PF_IN; - case ICMP_TSTAMPREPLY: - *icmptype = ICMP_TSTAMP; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *virtual_type = ICMP_TSTAMP; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IREQ: - *icmp_dir = PF_IN; - case ICMP_IREQREPLY: - *icmptype = ICMP_IREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *virtual_type = ICMP_IREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_MASKREQ: - *icmp_dir = PF_IN; - case ICMP_MASKREPLY: - *icmptype = ICMP_MASKREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *virtual_type = ICMP_MASKREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IPV6_WHEREAREYOU: - *icmp_dir = PF_IN; - case ICMP_IPV6_IAMHERE: - *icmptype = ICMP_IPV6_WHEREAREYOU; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *virtual_type = ICMP_IPV6_WHEREAREYOU; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_MOBILE_REGREQUEST: - *icmp_dir = PF_IN; - case ICMP_MOBILE_REGREPLY: - *icmptype = ICMP_MOBILE_REGREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *virtual_type = ICMP_MOBILE_REGREQUEST; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_ROUTERSOLICIT: - *icmp_dir = PF_IN; - case ICMP_ROUTERADVERT: - *icmptype = ICMP_ROUTERSOLICIT; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *virtual_type = ICMP_ROUTERSOLICIT; + *virtual_id = 0; /* Nothing sane to match on! */ + break; -#ifdef INET6 - case ICMP6_ECHO_REQUEST: - *icmp_dir = PF_IN; - case ICMP6_ECHO_REPLY: - *icmptype = ICMP6_ECHO_REQUEST; - *icmpid = pd->hdr.icmp6.icmp6_id; - break; + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ - case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; - case MLD_LISTENER_REPORT: { - *icmptype = MLD_LISTENER_QUERY; - *icmpid = 0; + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } +#endif /* INET */ +#ifdef INET6 + case AF_INET6: + switch (type) { + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *virtual_type = ICMP6_ECHO_REQUEST; + *virtual_id = pd->hdr.icmp6.icmp6_id; + break; - /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ - case ICMP6_WRUREQUEST: - *icmp_dir = PF_IN; - case ICMP6_WRUREPLY: - *icmptype = ICMP6_WRUREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *virtual_type = MLD_LISTENER_QUERY; + *virtual_id = 0; + break; + } + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *virtual_type = MLD_MTRACE; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case MLD_MTRACE: - *icmp_dir = PF_IN; - case MLD_MTRACE_RESP: - *icmptype = MLD_MTRACE; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *virtual_type = ND_NEIGHBOR_SOLICIT; + *virtual_id = 0; + break; + } - case ND_NEIGHBOR_SOLICIT: - *icmp_dir = PF_IN; - case ND_NEIGHBOR_ADVERT: { - *icmptype = ND_NEIGHBOR_SOLICIT; - *multi = PF_ICMP_MULTI_SOLICITED; - *icmpid = 0; + /* + * These ICMP types map to other connections. + * ND_REDIRECT can't be in this list because the triggering + * packet header is optional. + */ + case ICMP6_DST_UNREACH: + case ICMP6_PACKET_TOO_BIG: + case ICMP6_TIME_EXCEEDED: + case ICMP6_PARAM_PROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ + /* + * All remaining ICMP6 types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } - #endif /* INET6 */ - /* These ICMP types map to other connections */ - case ICMP_UNREACH: - case ICMP_SOURCEQUENCH: - case ICMP_REDIRECT: - case ICMP_TIMXCEED: - case ICMP_PARAMPROB: -#ifdef INET6 - /* - * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH - * ND_REDIRECT can't be in this list because the triggering packet - * header is optional. - */ - case ICMP6_PACKET_TOO_BIG: -#endif /* INET6 */ - /* These will not be used, but set them anyways */ - *icmp_dir = PF_IN; - *icmptype = htons(type); - *icmpid = 0; - return (1); /* These types are matched to other state */ - /* - * All remaining ICMP types get their own states, - * and will only match in one direction. - */ default: *icmp_dir = PF_IN; - *icmptype = type; - *icmpid = 0; + *virtual_type = type; + *virtual_id = 0; break; } - HTONS(*icmptype); - return (0); + HTONS(*virtual_type); + return (0); /* These types match to their own state */ } void @@ -4166,7 +4189,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (virtual_type == ICMP_ECHO && + if (virtual_type == htons(ICMP_ECHO) && nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, @@ -6497,13 +6520,13 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - (virtual_type == ICMP_ECHO && + (virtual_type == htons(ICMP_ECHO) && nk->port[iidx] != iih.icmp_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); @@ -6563,13 +6586,13 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - ((virtual_type == ICMP6_ECHO_REQUEST) && + ((virtual_type == htons(ICMP6_ECHO_REQUEST)) && nk->port[pd2.sidx] != iih.icmp6_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); From nobody Wed Jul 31 07:41:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYN3ZNdz5RPNL; Wed, 31 Jul 2024 07:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYN26kmz4qSF; Wed, 31 Jul 2024 07:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z4oFDFXVM4RBM9gLQWsXnAaJIOqoxmqmJEvKNSHM7qk=; b=oMCj4CveTng/uF1MjY47VQyytVRg928usk1tf+hDi16KoeM4GR5Z6tiA9bNfpTHGd7KYRF Pegws6D1TmfNvhs0QaEv+4GuzI5CFuqla5F+lLIXTyegJCkG76pbQ2k+b0xp8QrXMyliJ+ qr/rAjGIqgPUZkW7zHZQ4/5nIK3ATOGiPREHPVGk06KBPkjMQXW8UZYrfw8FntTp6MOxg0 Ajm8k7NbGb62MLo2U5WdNygGhg7/U2s62ZBq7pbMvYGjlVYAhAy+oLnq6VX43aFzNiapLx zZ2RtwRIQ9RxbkmVL+AUSXX+CBFagodkQnDnWuGtkDhMP7LlOAaDcM+rRT2WxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411672; a=rsa-sha256; cv=none; b=tfODAoC8IMwig0I9HBx+KDD+0hpAXgGNI6aH4tAsLAYXAg6+n1DsX6bxKceeb91CZEp9hJ KGed+FXbgpANQMBySjknrTyqnVmQ9Bd6X3Aza7Nrz/hSQDNCz8bYyk0yTziXykPtXassHI SH64p9yNXVPxp+8SC1dGkilO4jB2TOtZIQB+HEl/2mOhv39vyXy4G8pjo5SlRdAOm/K3Fr Jg24RTtpAdA6UduZvsdbB/3ouwp8WfiiwEhn8uTkL4v7aeE25onU27vvj/gguxufGSgkVq qq2InhQ6OMiAbhXeL0e7NQVrsjn++TmYn8qnrztqs7Brbsm1sflu6nFQLWzl/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=1722411672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z4oFDFXVM4RBM9gLQWsXnAaJIOqoxmqmJEvKNSHM7qk=; b=SIiWU6RYXPnZqqctKX6IJaHJiWLazvZHD9sJZxJwI/M7bil6E4DAI2GvIPUhFWpNNWLiAO DNNpxaSxAloiw2lhwoYj0bJqm1F7jUQPmgBm0x2rOgGcqnP16REget/pRX1+I3HtcZiljK hoqHp39I18FJSH8OdtK4JuSsm3UMqvQO0jquD0LAlZLxXQTCjAwevXweQXx7FQlv7rFto2 6OOH+2cooXrBqjGUybCM1nV81U1HrzjWhBg0Gr3lMJ31YIw/pBPbUbBpZ/2sH46SAAK9k8 nOe/o6Bpb4goBHGLw4KWleTN57bBWIt/Ipj0j36FMIWwSJ+8Xvs1Kja0YXfrAA== 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 4WYkYN1jqczsSw; Wed, 31 Jul 2024 07:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7fCi9084815; Wed, 31 Jul 2024 07:41:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7fCfG084812; Wed, 31 Jul 2024 07:41:12 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:12 GMT Message-Id: <202407310741.46V7fCfG084812@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 05f91f8dd5ce - stable/13 - pf: allow MLD LR to be sent without state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 05f91f8dd5ce46d274feff11103249e3d9428f38 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=05f91f8dd5ce46d274feff11103249e3d9428f38 commit 05f91f8dd5ce46d274feff11103249e3d9428f38 Author: Kristof Provost AuthorDate: 2024-07-10 12:36:18 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:35 +0000 pf: allow MLD LR to be sent without state Change PF behavior to allow MLD Listener Report packets to be sent without needing a previously created state by MLD Listener Query. It wasn't working because: (1) you might not have a previous MLD Listener Query and (2) the addresses of the Query and Report don't match. ok mikeb@, sashan@ MFC after: 1 day Obtained From: OpenBSD, rzalamena , 5c526dbdb0f2 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 1afe4da75d1d2acd33b25eea942af28aa41c82c2) --- sys/netpfil/pf/pf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 767fecdcb3f1..07d0604e924c 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1807,8 +1807,15 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, break; case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; case MLD_LISTENER_REPORT: { + /* + * Listener Report can be sent by clients + * without an associated Listener Query. + * In addition to that, when Report is sent as a + * reply to a Query its source and destination + * address are different. + */ + *icmp_dir = PF_IN; *virtual_type = MLD_LISTENER_QUERY; *virtual_id = 0; break; From nobody Wed Jul 31 07:41:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYP1y7gz5RPHT; Wed, 31 Jul 2024 07:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYP0Wzkz4qgD; Wed, 31 Jul 2024 07:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fb5jzVfWktrZkppaaTd60sHNUZFJS+WrX197nyPU0Ig=; b=ttGc6z+tOG9h55WYhIHK6nSmGYcn30tK821E2pU4h3zdspP6HvhlyBWcCVgwt94clRvtTS 8+xSvueTW0y8eK962dEQ+6pu4ClitxPL+7QhHhPwjlIBuCQ/LuGw49iR7vPTjE4IDz4DV2 Q0axtnyWNWeQMJusTGstYxEvTXVjigbKzra24ADEirXgKY1MTkwTb2igZw9NEGlRYg3MxV WlkdzUtp/leuPX+hjoNoMQHJrQbnssJmeIYuGh6pNw5xEC4Aq+owMDxa4TzuLOLUAFpFPe 7IgYVABX40sWaWQMvYPTRftC0WpNdqL3V7ISikhG6kXAPsa1zAMpIs1z4JPJyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411673; a=rsa-sha256; cv=none; b=yQd3xX4oTUZIJQhrZFRBWE01klD+tQNpCWb2gzdkaj50DDooORKgJ7sbzvA6wYl3vnmeqv NdCI1eCyU8kaXtO4SZM/sm/6czx8z29nzXwx59woV1zwRvkaGqhDLHiOJ9tOB7RP5PMfxo RjZf3wCEhRy6TQvGQB+t26Bnt5wUTDmHcQDW+ykJbOD5n2fH5+2hydXQPX/Hh269HVo/tK Xe6YOp6f+rg1ceI8N9St91xuUrqcjGabcCbFCxHKhwtMmQy+GHHYnG27I2rkC0D/KBI9do gv/bCOULSf4pI2lk6ns2L0Nw7NQA0kS2iGPsbtu3q5XNLtIyT90SV5fKsaxnZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fb5jzVfWktrZkppaaTd60sHNUZFJS+WrX197nyPU0Ig=; b=VfeaOSDGMy/MaonIBAn7EUBAXG/ntPapikAx/sttFKndIrmfoqc4TFof4KdDJ4+7g5Wb1D l0ubF0yxxpwjhk2+3wFfCZtSRdMNBzCbZ/61KQSi4SL/d1xB0QgVoJrO/CyqwRgE1uied0 cIKaZkT7pWiDWVll8v6gzEsLNNnvuJGZf1ujDmGZSkkTmM24oO96JB2bEfhklDmTfXRv1g o7a8+2I3pmu4MjHo+dgTmdyy5a9JyWFlGgn7mb+UU9f5NWKeP1ATe0OMA7oD+remhXVnV0 kNAx04jAUj+YsT3LAw4eXQynncLunQflUOgMCSS7v+S2NnFQQJje0fzKxmSQGg== 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 4WYkYP07Tszs3M; Wed, 31 Jul 2024 07:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7fCQf084870; Wed, 31 Jul 2024 07:41:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7fCmk084867; Wed, 31 Jul 2024 07:41:12 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:12 GMT Message-Id: <202407310741.46V7fCmk084867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 3e1f815655ef - stable/14 - pf tests: ensure we don't confuse different ICMP types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3e1f815655ef66963bc8f9ea9fbd691f2eddd2e8 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3e1f815655ef66963bc8f9ea9fbd691f2eddd2e8 commit 3e1f815655ef66963bc8f9ea9fbd691f2eddd2e8 Author: Kristof Provost AuthorDate: 2024-07-09 09:22:18 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:53 +0000 pf tests: ensure we don't confuse different ICMP types When creating a state for ICMP (v4 or v6) packets we only used the ID, which means that we could confuse different ICMP types. For example, if we allowed neighbour discovery but not ICMPv6 echo requests an ND packet could create a state that the echo request would match. Test that this is now fixed. Reported by: Enrico Bassetti MFC after: 1 day Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit b9f0dbc3d006e0b904ee4275d54459f4edd65bb8) --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/icmp6.sh | 89 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 1083f89a5502..9b793417c1d8 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -16,6 +16,7 @@ ATF_TESTS_SH+= altq \ fragmentation_no_reassembly \ get_state \ icmp \ + icmp6 \ killstate \ macro \ map_e \ diff --git a/tests/sys/netpfil/pf/icmp6.sh b/tests/sys/netpfil/pf/icmp6.sh new file mode 100644 index 000000000000..35d20c83cc4f --- /dev/null +++ b/tests/sys/netpfil/pf/icmp6.sh @@ -0,0 +1,89 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Rubicon Communications, LLC (Netgate) +# +# 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. + +. $(atf_get_srcdir)/utils.subr + +common_dir=$(atf_get_srcdir)/../common + +atf_test_case "zero_id" "cleanup" +zero_id_head() +{ + atf_set descr 'Test ICMPv6 echo with ID 0 keep being blocked' + atf_set require.user root + atf_set require.progs scapy +} + +zero_id_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad + + # Sanity check + atf_check -s exit:0 -o ignore \ + ping -c 1 2001:db8::1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set block-policy drop" \ + "antispoof quick for { egress ${epair}b }" \ + "block all" \ + "pass out" \ + "pass in quick inet6 proto IPV6-ICMP icmp6-type 135" \ + "pass in quick inet6 proto IPV6-ICMP icmp6-type 136" \ + "pass out quick inet6 proto IPV6 from self to any" + + # Now we can't ping + atf_check -s exit:2 -o ignore \ + ping -c 1 2001:db8::1 + + # Force neighbour discovery + ndp -d 2001:db8::1 + + # Verify that we don't confuse echo request with ID 0 for neighbour discovery + atf_check -s exit:1 -o ignore \ + ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 2001:db8::1 \ + --replyif ${epair}a + + jexec alcatraz pfctl -ss -vv + jexec alcatraz pfctl -sr -vv +} + +zero_id_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "zero_id" +} From nobody Wed Jul 31 07:41:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYkYP4hbCz5RPC3; Wed, 31 Jul 2024 07:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYkYP2rRtz4qgH; Wed, 31 Jul 2024 07:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=73dKPLjIWIITkAdmzYi0F/jeuiUMH7o+dfejES2dCO4=; b=ppurHzJBKgaAKciAzzPMs7r0JUvlVOyauO2Fc6tTAqn05de/DqWIuU37aj71atK9BGwxEG /KYyPVSdWNSBHOhQ0cx+kgerWe6mD9kc/+bzLkwKs0H7qgfPEBVjRLtFIiG7YHFzMaotcq F1GnA/9IKcSeGC6ACMhA9G2i4PhYkZ5FtvwYZqB7ya+Bcw3+HBunA7+gzC2qGd3xSNyAfh Cpa9ev7kOOg/rM4TtESRSoxNg95Wqe87YT6YzsQlOZfJoxJLMRUwf9lmXYlyrEy34TBdUs iIZHYokVqGPgMVBJ2REvqHHCzBpgoQEL18NofHN5obwAtYb3i0uaNaKGnW0UFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722411673; a=rsa-sha256; cv=none; b=Zgpn+p6vG1ee2BqEBuF8aUSNYNcf2W9rLvYTco+qKg+bHPGSfUFXT3tkqUm/TpIJbgjWLs GYed4xrn1TXywknJyqTtOixYpXCJDmeX/0KoCF4HwVye+uvkAqeP8XwkaryIsm23ZpZK6/ UiaYMW7+r3BtpbqrZvjVJtK4Xi2hk8p1sqe0Lz9W9JQiHSK2DDfY6T6V1bwGBOhrBYUxP+ oNESrQbncjiaUR1ylkmtrwS2fLYW7xrONlXVZPDOBWoPCs4WbPnv7MCRs9s+vGOb9RaUhO 5lOFuPrPxB9F4DiPzudBXx0MlM02tsV91CmaTKVZhpEO3sfapTi6ifxZmz51VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722411673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=73dKPLjIWIITkAdmzYi0F/jeuiUMH7o+dfejES2dCO4=; b=H+K2/55bsrtxKikuqcGqsf+Je6dO29gg6blOb7wwcm1ss15GUwdw1J27SRK+vPCVi+2YgH p8MbgHzOnfrMnsiES94ZVAJbEvpQTLBDVxIw8OyCZuebIKFVmfIHH7YMklIMJko0zA5XLw uaFKDsShvCEv3pUzctUqNO3b3esrOCgDU5gWkrmmOryRKQ5tmabNPt33hpJFP1AD5Rl1Wj QfHwwGPwEqm5SeV3Qh5lqHqJZp/zFpwxLPtGQ7gV3IKvC7u2nEOxW2W9kHXcp4YbOIhckk MzKTMVwRvtVnaztD0iYn0U4t25qgRB2nlhGYMjwkTSGGtkq3f4gwaE1oSce+9A== 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 4WYkYP2QJgzsQ8; Wed, 31 Jul 2024 07:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46V7fDYt084929; Wed, 31 Jul 2024 07:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46V7fDJs084926; Wed, 31 Jul 2024 07:41:13 GMT (envelope-from git) Date: Wed, 31 Jul 2024 07:41:13 GMT Message-Id: <202407310741.46V7fDJs084926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4ebd7fc30ab7 - stable/13 - pf tests: ensure we don't confuse different ICMP types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4ebd7fc30ab779b87c055b0d54eabdd97a9fc730 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4ebd7fc30ab779b87c055b0d54eabdd97a9fc730 commit 4ebd7fc30ab779b87c055b0d54eabdd97a9fc730 Author: Kristof Provost AuthorDate: 2024-07-09 09:22:18 +0000 Commit: Kristof Provost CommitDate: 2024-07-31 07:39:35 +0000 pf tests: ensure we don't confuse different ICMP types When creating a state for ICMP (v4 or v6) packets we only used the ID, which means that we could confuse different ICMP types. For example, if we allowed neighbour discovery but not ICMPv6 echo requests an ND packet could create a state that the echo request would match. Test that this is now fixed. Reported by: Enrico Bassetti MFC after: 1 day Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit b9f0dbc3d006e0b904ee4275d54459f4edd65bb8) --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/icmp6.sh | 89 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index ea0d5cb151a2..f033940b4564 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -12,6 +12,7 @@ ATF_TESTS_SH+= altq \ fragmentation \ get_state \ icmp \ + icmp6 \ killstate \ macro \ map_e \ diff --git a/tests/sys/netpfil/pf/icmp6.sh b/tests/sys/netpfil/pf/icmp6.sh new file mode 100644 index 000000000000..35d20c83cc4f --- /dev/null +++ b/tests/sys/netpfil/pf/icmp6.sh @@ -0,0 +1,89 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Rubicon Communications, LLC (Netgate) +# +# 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. + +. $(atf_get_srcdir)/utils.subr + +common_dir=$(atf_get_srcdir)/../common + +atf_test_case "zero_id" "cleanup" +zero_id_head() +{ + atf_set descr 'Test ICMPv6 echo with ID 0 keep being blocked' + atf_set require.user root + atf_set require.progs scapy +} + +zero_id_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad + + # Sanity check + atf_check -s exit:0 -o ignore \ + ping -c 1 2001:db8::1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set block-policy drop" \ + "antispoof quick for { egress ${epair}b }" \ + "block all" \ + "pass out" \ + "pass in quick inet6 proto IPV6-ICMP icmp6-type 135" \ + "pass in quick inet6 proto IPV6-ICMP icmp6-type 136" \ + "pass out quick inet6 proto IPV6 from self to any" + + # Now we can't ping + atf_check -s exit:2 -o ignore \ + ping -c 1 2001:db8::1 + + # Force neighbour discovery + ndp -d 2001:db8::1 + + # Verify that we don't confuse echo request with ID 0 for neighbour discovery + atf_check -s exit:1 -o ignore \ + ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 2001:db8::1 \ + --replyif ${epair}a + + jexec alcatraz pfctl -ss -vv + jexec alcatraz pfctl -sr -vv +} + +zero_id_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "zero_id" +} From nobody Wed Jul 31 14:50:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYw591RBSz5S2W1; Wed, 31 Jul 2024 14:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYw586WDbz4nRh; Wed, 31 Jul 2024 14:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722437452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvyM04Up+TuG6y+1VUCkaJ/DLGW4ZEMnTzem+GINc0I=; b=UN2Nb59ed3WDw25xn1bl47kbOnAi63ckVR5AUVNRvFIn3qm1MWxTWQVadNNEmy8HO4Uxmj UROSE+J9uY32bC5b+vsbjWwxkZ9BWgbOJGbnlNKVTz46hS+SpTdBzcfwQEDFHMS5jCc5bd UDKooPxtmbn0qftYzG20fzYYxS+kQS6jrTlF9bZdWScoQbrLsGCVoBPewDMRejmPwcctdy MayIVcQLUlLZoFodECh99rCA4R+WL1PaH75WwFapKs+BmsFIPGLaPa7sBXblF5A2t0PHeu rtSoCbssmD0ImmGZRMqVYMHN4+jgGW7Qu61lGT/8W5fMKXRLj5LXIWEdreMDoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722437452; a=rsa-sha256; cv=none; b=umXPEqoOLDAfp55mxAf4NgJ2W/HYsRmkf3XlVu5N9QZjj+v9fMkQDCgrtnpDXkOoKn1PTD TuXjAowdUPwhxaB6DeDtMTzeszhDnXDT4kjglZJBh8vpIJ7DH7OQYvcCqiFXQ1UnsJcEv9 XYhQeHUG92STC79s3cYKuCAI8QbN63C1aauTLZTL9zmb7B6f7vXAD0pZ7/1/9gkNMWdcxO lxODbvk3/S4XyhdSjx8SwdpJiEYrZ8Lp2lP4tvGP0ED7FhpQPq5EKxOneygnIwYOc2gfnm hPOfM13k1uaXTfLwT9b3FKqLyNdkJYzodxvt1RSsgWPdXk9HLfjs0Eaajfk0Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722437452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvyM04Up+TuG6y+1VUCkaJ/DLGW4ZEMnTzem+GINc0I=; b=WJuNc9UD0kcQSbNemjaZdSKtuoAwavYyZUKrsLsy4LV0RcNPOUwjyBMMvSzoFU5BZDnAZU +Jmvs8gJxRVLLkSOuWaVm8Exy4dYMGQvE9JJ0gevzsP+9mk+N5VZ0gcwNXntOknfl0QMhi 7FNmESHsE7Q2hOPx0/hyEY5m5+GU2zZfecPnmwHWd4bpTbSHxkqgEZ5eoRvxCJbz93ZhO+ UH9Ys5DqFfQqSkL1lH+rtU8u9+sxyZw/NYRyaCTMa4QFip2y9NAGN9A2p+UmEJ/9/FKGif 6TiLHm3fqDSWkCa92BrqWNrKlAiGjXcC2HbfqzJo1IGIAvO6aN+32R2ua0G0rw== 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 4WYw5861kPz158T; Wed, 31 Jul 2024 14:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VEoq1M014733; Wed, 31 Jul 2024 14:50:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VEoql9014730; Wed, 31 Jul 2024 14:50:52 GMT (envelope-from git) Date: Wed, 31 Jul 2024 14:50:52 GMT Message-Id: <202407311450.46VEoql9014730@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: f44ff2aba2d6 - main - bhyve: Treat the COMMAND register for PCI passthru devices as emulated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f44ff2aba2d64d1d9312cb55008dc90275ccdc04 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f44ff2aba2d64d1d9312cb55008dc90275ccdc04 commit f44ff2aba2d64d1d9312cb55008dc90275ccdc04 Author: John Baldwin AuthorDate: 2024-07-31 14:50:33 +0000 Commit: John Baldwin CommitDate: 2024-07-31 14:50:33 +0000 bhyve: Treat the COMMAND register for PCI passthru devices as emulated Don't pass through writes of the command register through to the physical device. These registers do not need to be in sync, and in some cases (e.g. when the guest is sizing the BAR and temporarily disables decoding), the states need to diverge. PR: 205549 Reviewed by: corvink Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46179 --- usr.sbin/bhyve/pci_passthru.c | 46 +++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 13d422eaa59c..b8ac782bd7be 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -607,6 +607,7 @@ cfginit(struct pci_devinst *pi, int bus, int slot, int func) { int error; struct passthru_softc *sc; + uint16_t cmd; uint8_t intline, intpin; error = 1; @@ -618,16 +619,18 @@ cfginit(struct pci_devinst *pi, int bus, int slot, int func) sc->psc_sel.pc_func = func; /* - * Copy physical PCI header to virtual config space. INTLINE and INTPIN - * shouldn't be aligned with their physical value and they are already set by - * pci_emul_init(). + * Copy physical PCI header to virtual config space. COMMAND, + * INTLINE, and INTPIN shouldn't be aligned with their + * physical value and they are already set by pci_emul_init(). */ + cmd = pci_get_cfgdata16(pi, PCIR_COMMAND); intline = pci_get_cfgdata8(pi, PCIR_INTLINE); intpin = pci_get_cfgdata8(pi, PCIR_INTPIN); for (int i = 0; i <= PCIR_MAXLAT; i += 4) { pci_set_cfgdata32(pi, i, pci_host_read_config(&sc->psc_sel, i, 4)); } + pci_set_cfgdata16(pi, PCIR_COMMAND, cmd); pci_set_cfgdata8(pi, PCIR_INTLINE, intline); pci_set_cfgdata8(pi, PCIR_INTPIN, intpin); @@ -643,13 +646,6 @@ cfginit(struct pci_devinst *pi, int bus, int slot, int func) goto done; } - pci_host_write_config(&sc->psc_sel, PCIR_COMMAND, 2, - pci_get_cfgdata16(pi, PCIR_COMMAND)); - - /* - * We need to do this after PCIR_COMMAND got possibly updated, e.g., - * a BAR was enabled, as otherwise the PCIOCBARMMAP might fail on us. - */ if (pci_msix_table_bar(pi) >= 0) { error = init_msix_table(sc); if (error != 0) { @@ -919,7 +915,7 @@ passthru_init(struct pci_devinst *pi, nvlist_t *nvl) passthru_cfgread_emulate, passthru_cfgwrite_emulate)) != 0) goto done; - /* Allow access to the physical command and status register. */ + /* Allow access to the physical status register. */ if ((error = set_pcir_handler(sc, PCIR_COMMAND, 0x04, NULL, NULL)) != 0) goto done; @@ -1073,28 +1069,26 @@ passthru_cfgwrite_default(struct passthru_softc *sc, struct pci_devinst *pi, return (0); } -#ifdef LEGACY_SUPPORT /* - * If this device does not support MSI natively then we cannot let - * the guest disable legacy interrupts from the device. It is the - * legacy interrupt that is triggering the virtual MSI to the guest. + * The command register is emulated, but the status register + * is passed through. */ - if (sc->psc_msi.emulated && pci_msi_enabled(pi)) { - if (coff == PCIR_COMMAND && bytes == 2) - val &= ~PCIM_CMD_INTxDIS; - } -#endif - - pci_host_write_config(&sc->psc_sel, coff, bytes, val); if (coff == PCIR_COMMAND) { + if (bytes <= 2) + return (-1); + + /* Update the physical status register. */ + pci_host_write_config(&sc->psc_sel, PCIR_STATUS, val >> 16, 2); + + /* Update the virtual command register. */ cmd_old = pci_get_cfgdata16(pi, PCIR_COMMAND); - if (bytes == 1) - pci_set_cfgdata8(pi, PCIR_COMMAND, val); - else if (bytes == 2) - pci_set_cfgdata16(pi, PCIR_COMMAND, val); + pci_set_cfgdata16(pi, PCIR_COMMAND, val & 0xffff); pci_emul_cmd_changed(pi, cmd_old); + return (0); } + pci_host_write_config(&sc->psc_sel, coff, bytes, val); + return (0); } From nobody Wed Jul 31 15:51:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYxR43rxGz5S798; Wed, 31 Jul 2024 15:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYxR41HNYz41Q2; Wed, 31 Jul 2024 15:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722441088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXsPn2WYR/082xT286qWN6Hb/y6Pnsl9sQH67Q3b4jg=; b=CtUWHHltNCxQHS3DpuEqWPfKQ750D2fxEWU+jLVdOKCbABTPHg0DBHYxO+i1oWrQ5wgC5G NUZOSZWPKrzk2JH41dfYvwzlbJuVgHNlvnkj75mkFic98XuDw4MlNvvb1Ufs8kkA7RbCCz ck+FbOzeFEXztEUMgQDnu5ookKin6umim3yO+vSDf0W1/ExQTgFtrtUfGk5SacOqTZ693V fV6uB8O5nfQ4PztpSqIArqxwxpUrXAqRLq8B+uq+t3KP0i+pADEYJM8oVb3/qSPLOJqVuF /Zm2/r5TMOzb9tfmJPrEuJzsafc9Y9MGdLRJEWNNTisHJvsfaudW2INdnpX+VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722441088; a=rsa-sha256; cv=none; b=BWndz+8HpZx9JvwCoNtlrc/rgyPxIbGEC8Nw0M9TPMd9v4k0PGVdvqr+0h9AtScjg1bhGJ fcHUdODxE8cJ7dnvghn+of8ZFjocd7IWAQ3cmSqcpyVqYM72PhdtInVlFJ4tuO8WsCZl3l tM4zUGJv0rXoIE/jHsS45wu2j4xQyj/RnypkOG+4gKqKfo4jkjFkFFrksOcs63YiDg2zmU 4jg4//h30s/x8nIFShe3EerbAv+ONETjfZjIBmq/QusVS3Le8zCyuhWFeyJcurZL8XjMER Z1IIrgriTPh+uq6d41eeOBJhSzGOJ1kbI6yMf1pM9yierPgpUNKSjVHzSzG+7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722441088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXsPn2WYR/082xT286qWN6Hb/y6Pnsl9sQH67Q3b4jg=; b=lfPRjloT4Dj89hMUVa1j+c6PJ8iG1w1g3dsEkudR5mG9MzmyT7SEoP0NhZaatAZbqqBYd9 mhISkHXbgyJOkBlhGcbSGTCDOBHkzVJ+9OEus9moUjewj/m/8sKJKl11nI9qkQBfFLHNGE SrW8R+6zrjjIkJapESJ4bO/s9urupufyFjfBD7MrcgamaStkAqHh0QJma4qKiPWjwVg2j0 djiDykcxYNnmQNDEEdtilihCvAIjGX6B5IaHYwafwX8K2Z6FTcpi2EgZrG1XhxeTUtJWbh 31k4AqfasdnYuXEkbJowk9ecEVO24LMcHqyctKVBubx+IZTsRhcZuwtoki21xQ== 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 4WYxR40g2Nz1689; Wed, 31 Jul 2024 15:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VFpRpv014442; Wed, 31 Jul 2024 15:51:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VFpRcr014439; Wed, 31 Jul 2024 15:51:27 GMT (envelope-from git) Date: Wed, 31 Jul 2024 15:51:27 GMT Message-Id: <202407311551.46VFpRcr014439@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: 46bc4963e2de - main - riscv: implement pmap_demote_l1() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 46bc4963e2de8d776c55015f61af129f00ad5b46 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=46bc4963e2de8d776c55015f61af129f00ad5b46 commit 46bc4963e2de8d776c55015f61af129f00ad5b46 Author: Mitchell Horne AuthorDate: 2024-07-31 14:06:10 +0000 Commit: Mitchell Horne CommitDate: 2024-07-31 15:28:13 +0000 riscv: implement pmap_demote_l1() For use in pmap_change_attr_locked(), where we might need to demote L1 pages in the DMAP. Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45628 --- sys/riscv/riscv/pmap.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 34922b0f511e..5eb5c02b7461 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -279,6 +279,13 @@ SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, promotions, CTLFLAG_RD, &pmap_l2_promotions, 0, "2MB page promotions"); +static SYSCTL_NODE(_vm_pmap, OID_AUTO, l1, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "L1 (1GB) page mapping counters"); + +static COUNTER_U64_DEFINE_EARLY(pmap_l1_demotions); +SYSCTL_COUNTER_U64(_vm_pmap_l1, OID_AUTO, demotions, CTLFLAG_RD, + &pmap_l1_demotions, "L1 (1GB) page demotions"); + /* * Data for the pv entry allocation mechanism */ @@ -303,6 +310,7 @@ static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); +static bool pmap_demote_l1(pmap_t pmap, pd_entry_t *l1, vm_offset_t va); static bool pmap_demote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset_t va); static bool pmap_demote_l2_locked(pmap_t pmap, pd_entry_t *l2, vm_offset_t va, struct rwlock **lockp); @@ -2795,6 +2803,67 @@ done: return (rv); } +/* + * Demote the specified L1 page to separate L2 pages. + * Currently only used for DMAP entries. + */ +static bool +pmap_demote_l1(pmap_t pmap, pd_entry_t *l1, vm_offset_t va) +{ + vm_page_t m; + pt_entry_t *l2, oldl1, newl2; + pd_entry_t newl1; + vm_paddr_t l2phys; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + + oldl1 = pmap_load(l1); + KASSERT((oldl1 & PTE_RWX) != 0, + ("pmap_demote_l1: oldl1 is not a leaf PTE")); + KASSERT((oldl1 & PTE_A) != 0, + ("pmap_demote_l1: oldl1 is missing PTE_A")); + KASSERT((oldl1 & (PTE_D | PTE_W)) != PTE_W, + ("pmap_demote_l1: not dirty!")); + KASSERT((oldl1 & PTE_SW_MANAGED) == 0, + ("pmap_demote_l1: L1 table shouldn't be managed")); + KASSERT(VIRT_IN_DMAP(va), + ("pmap_demote_l1: is unsupported for non-DMAP va=%#lx", va)); + + /* Demoting L1 means we need to allocate a new page-table page. */ + m = vm_page_alloc_noobj(VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED); + if (m == NULL) { + CTR2(KTR_PMAP, "pmap_demote_l1: failure for va %#lx in pmap %p", + va, pmap); + return (false); + } + + l2phys = VM_PAGE_TO_PHYS(m); + l2 = (pt_entry_t *)PHYS_TO_DMAP(l2phys); + + /* + * Create new entries, relying on the fact that only the low bits + * (index) of the physical address are changing. + */ + newl2 = oldl1; + for (int i = 0; i < Ln_ENTRIES; i++) + pmap_store(&l2[i], newl2 | (i << PTE_PPN1_S)); + + /* + * And update the L1 entry. + * + * NB: flushing the TLB is the responsibility of the caller. Cached + * translations are still "correct" for demoted mappings until some + * subset of the demoted range is modified. + */ + newl1 = ((l2phys / PAGE_SIZE) << PTE_PPN0_S) | PTE_V; + pmap_store(l1, newl1); + + counter_u64_add(pmap_l1_demotions, 1); + CTR2(KTR_PMAP, "pmap_demote_l1: success for va %#lx in pmap %p", + va, pmap); + return (true); +} + static bool pmap_demote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset_t va) { From nobody Wed Jul 31 15:51:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYxR53q9bz5S6yM; Wed, 31 Jul 2024 15:51:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYxR51qLsz41Md; Wed, 31 Jul 2024 15:51:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722441089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uBrCsS2WqO3Gufy1RK5VVv59kLBVnaoxf5w9pmRt8NA=; b=jMl/25ZhMqHGbGj1yaLG/3MTciCCYPui//sunSgtYiBddCbYZ8Oy+VscdVWJhgRL7wr6dL nyomVPKDNXQtm20SfS+z6Ze/YAIM90opSfIRls93Ix5GHLpyIJi3HMNGGqfP9N4E9swdVe Q0mgGzyshZgoIZaDdAjV/M6ws7sbdtby1ZqqrUMTFFy5wzOovPHR2MmauS1vxrxgEWVsBJ my4wucuwuycLDDwzlWyoBE4kQOOqHUVjY01XkNbZicStX7g11x8IHtCtC3hxoJ6ZDaWRlY vGfh7UxQH+7sW7xUSpD7jlyTz31iFzbsHk3f0CPEHgun+8GRPzEz+GBPtfsMww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722441089; a=rsa-sha256; cv=none; b=hqdmUyxNtf8Lg+bgXEqAh/LLh/HUyviPfzJwnis83SkmpV3mOQfTnTTp4bm6fR4vSYm31h yaTze2RrE5QKAYdajlS1oNdComA+BIDo6AAZ8ocYacSbdzpq6kwrrIrg5nUr3ja0ihutsD slS8IZPkzGX1FimelBfLJVOUTmIPgTPdmasqxbxCLbqI+T7d4GCv1uvAglT3h/1FO22gCn 5TJhcMEpFpTBSzUjeviPE9RGnLe2Hmzg3OgEmjClqOEW2Z71mk29Joj3huCKncdU/deWQ/ WZAPvVqi8Ik+EcE0Y5m+2KvkcznhZ5LoeXFp/Q4aekdXkuJELJE447AbgPXgdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722441089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uBrCsS2WqO3Gufy1RK5VVv59kLBVnaoxf5w9pmRt8NA=; b=g5r2hrmHkRVhlhEbeU7WnGtYVqnNanE63EkA4plpIrjZ+f38Ekc4NQg82L6pBLqXkbryoW YUOffZL8abKZvBezCP9vl/ddIVX+D8js1eN+aMGJDcLtNLO5Dsu5Ehl7xRGGIuqgt2cTNx vmf2lVaHYpu1Foe4tqhRdNuUoOmbpR4X+KtZmatGroh5LIvglEImrL+pfEI1MQO21CMp/m zNb+CRxMZoAhuWhgim6WWFaGJUOdr2THZ1gfquBCH1LfY2LgzZIU3FeyxWKBZy4sVGBemL ecqvyfsXoSir5a7NNzMLfIKAX0nDea8VjM2sUqze7nuoK1Es8O56xxUUDwGtJw== 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 4WYxR517rMz16ff; Wed, 31 Jul 2024 15:51:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VFpTcQ014481; Wed, 31 Jul 2024 15:51:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VFpTZe014478; Wed, 31 Jul 2024 15:51:29 GMT (envelope-from git) Date: Wed, 31 Jul 2024 15:51:29 GMT Message-Id: <202407311551.46VFpTZe014478@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: b7312c3df83d - main - riscv: Svpbmt extension support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b7312c3df83df96662e83aaa0eaadda7ef66c8e3 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b7312c3df83df96662e83aaa0eaadda7ef66c8e3 commit b7312c3df83df96662e83aaa0eaadda7ef66c8e3 Author: Mitchell Horne AuthorDate: 2024-07-31 14:06:53 +0000 Commit: Mitchell Horne CommitDate: 2024-07-31 15:28:13 +0000 riscv: Svpbmt extension support The Svpbmt extension provides specification of "Page-Based Memory Types", or memory attributes (e.g. cacheability constraints). Extend the pmap code to apply memory attributes when creating/updating PTEs. This is done in a way which has no effect on CPUs lacking Svpbmt support, and is non-hostile to alternate encodings of memory attributes -- a future change will enable this for T-HEAD CPUs, which implement this PTE feature in an different (incompatible) way. Reviewed by: jhb Tested by: br MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45471 --- sys/riscv/include/md_var.h | 1 + sys/riscv/include/pte.h | 19 ++++ sys/riscv/include/vm.h | 10 +- sys/riscv/riscv/identcpu.c | 2 + sys/riscv/riscv/pmap.c | 261 ++++++++++++++++++++++++++++++++++++++------- 5 files changed, 253 insertions(+), 40 deletions(-) diff --git a/sys/riscv/include/md_var.h b/sys/riscv/include/md_var.h index 467bf99a94fa..d9404db914a2 100644 --- a/sys/riscv/include/md_var.h +++ b/sys/riscv/include/md_var.h @@ -44,6 +44,7 @@ extern u_int mmu_caps; /* Supervisor-mode extension support */ extern bool has_sstc; extern bool has_sscofpmf; +extern bool has_svpbmt; struct dumperinfo; struct minidumpstate; diff --git a/sys/riscv/include/pte.h b/sys/riscv/include/pte.h index 031cae667f0c..34cd2a674627 100644 --- a/sys/riscv/include/pte.h +++ b/sys/riscv/include/pte.h @@ -83,6 +83,25 @@ typedef uint64_t pn_t; /* page number */ #define PTE_PROMOTE (PTE_V | PTE_RWX | PTE_D | PTE_G | PTE_U | \ PTE_SW_MANAGED | PTE_SW_WIRED) +/* + * Svpbmt Memory Attribute (MA) bits [62:61]. + * + * +------+-------+------------------------------------------------------------+ + * | Mode | Value | Requested Memory Attributes | + * +------+-------+------------------------------------------------------------+ + * | PMA | 00 | None, inherited from Physical Memory Attributes (firmware) | + * | NC | 01 | Non-cacheable, idempotent, weakly-ordered (RVWMO), | + * | | | main memory | + * | IO | 10 | Non-cacheable, non-idempotent, strongly-ordered, I/O | + * | -- | 11 | Reserved | + * +------+-------+------------------------------------------------------------+ + */ +#define PTE_MA_SHIFT 61 +#define PTE_MA_MASK (0x3ul << PTE_MA_SHIFT) +#define PTE_MA_NONE (0ul) +#define PTE_MA_NC (1ul << PTE_MA_SHIFT) +#define PTE_MA_IO (2ul << PTE_MA_SHIFT) + /* Bits 63 - 54 are reserved for future use. */ #define PTE_HI_MASK 0xFFC0000000000000ULL diff --git a/sys/riscv/include/vm.h b/sys/riscv/include/vm.h index 011d89af0fb4..b6c0a7725124 100644 --- a/sys/riscv/include/vm.h +++ b/sys/riscv/include/vm.h @@ -28,10 +28,14 @@ #define _MACHINE_VM_H_ /* Memory attribute configuration. */ -#define VM_MEMATTR_DEVICE 0 +#define VM_MEMATTR_PMA 0 #define VM_MEMATTR_UNCACHEABLE 1 -#define VM_MEMATTR_WRITE_BACK 2 +#define VM_MEMATTR_DEVICE 2 -#define VM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK +#define VM_MEMATTR_WRITE_BACK VM_MEMATTR_PMA +#define VM_MEMATTR_DEFAULT VM_MEMATTR_PMA + +#define VM_MEMATTR_LAST VM_MEMATTR_DEVICE +#define VM_MEMATTR_TOTAL (VM_MEMATTR_LAST + 1) #endif /* !_MACHINE_VM_H_ */ diff --git a/sys/riscv/riscv/identcpu.c b/sys/riscv/riscv/identcpu.c index 3803503e4b72..c681edfff47b 100644 --- a/sys/riscv/riscv/identcpu.c +++ b/sys/riscv/riscv/identcpu.c @@ -74,6 +74,7 @@ u_int mmu_caps; /* Supervisor-mode extension support. */ bool __read_frequently has_sstc; bool __read_frequently has_sscofpmf; +bool has_svpbmt; struct cpu_desc { const char *cpu_mvendor_name; @@ -414,6 +415,7 @@ update_global_capabilities(u_int cpu, struct cpu_desc *desc) /* Supervisor-mode extension support. */ UPDATE_CAP(has_sstc, (desc->smode_extensions & SV_SSTC) != 0); UPDATE_CAP(has_sscofpmf, (desc->smode_extensions & SV_SSCOFPMF) != 0); + UPDATE_CAP(has_svpbmt, (desc->smode_extensions & SV_SVPBMT) != 0); #undef UPDATE_CAP } diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 5eb5c02b7461..7058eb03cf44 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -369,6 +369,8 @@ 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 L1PTE_TO_PHYS(l1) \ + ((((l1) & ~PTE_HI_MASK) >> PTE_PPN2_S) << L1_SHIFT) #define PTE_TO_VM_PAGE(pte) PHYS_TO_VM_PAGE(PTE_TO_PHYS(pte)) /* @@ -533,6 +535,25 @@ pmap_distribute_l1(struct pmap *pmap, vm_pindex_t l1index, mtx_unlock(&allpmaps_lock); } +/* + * Holds the PTE mode bits (defined in pte.h) for defining e.g. cacheability. + * + * The indices correspond to the VM_MEMATTR_* defines in riscv/include/vm.h. + * + * The array will be empty if no mode bits are supported by the CPU, e.g. when + * lacking the Svpbmt extension. + */ +static __read_frequently pt_entry_t memattr_bits[VM_MEMATTR_TOTAL]; +static __read_frequently pt_entry_t memattr_mask; + +static __inline pt_entry_t +pmap_memattr_bits(vm_memattr_t mode) +{ + KASSERT(pmap_is_valid_memattr(kernel_pmap, mode), + ("invalid memory mode %u\n", mode)); + return (memattr_bits[(int)mode]); +} + /* * This should only be used during pmap bootstrap e.g. by * pmap_create_pagetables(). @@ -568,6 +589,7 @@ pmap_bootstrap_dmap(pd_entry_t *l1, vm_paddr_t freemempos) vm_offset_t va; vm_paddr_t min_pa, max_pa, pa, endpa; pd_entry_t *l2; + pt_entry_t memattr; u_int l1slot, l2slot; int physmap_idx; @@ -583,6 +605,8 @@ pmap_bootstrap_dmap(pd_entry_t *l1, vm_paddr_t freemempos) dmap_phys_base = rounddown(min_pa, L1_SIZE); dmap_phys_max = max_pa; + memattr = pmap_memattr_bits(VM_MEMATTR_DEFAULT); + /* Walk the physmap table. */ l2 = NULL; l1slot = Ln_ENTRIES; /* sentinel value */ @@ -611,7 +635,7 @@ pmap_bootstrap_dmap(pd_entry_t *l1, vm_paddr_t freemempos) /* map l2 pages */ l2slot = pmap_l2_index(va); - pmap_store(&l2[l2slot], L2_PTE(pa, PTE_KERN)); + pmap_store(&l2[l2slot], L2_PTE(pa, PTE_KERN | memattr)); pa += L2_SIZE; va += L2_SIZE; @@ -621,7 +645,7 @@ pmap_bootstrap_dmap(pd_entry_t *l1, vm_paddr_t freemempos) while (pa + L1_SIZE - 1 < endpa) { /* map l1 pages */ l1slot = pmap_l1_index(va); - pmap_store(&l1[l1slot], L1_PTE(pa, PTE_KERN)); + pmap_store(&l1[l1slot], L1_PTE(pa, PTE_KERN | memattr)); pa += L1_SIZE; va += L1_SIZE; @@ -641,7 +665,7 @@ l2end: /* map l2 pages */ l2slot = pmap_l2_index(va); - pmap_store(&l2[l2slot], L2_PTE(pa, PTE_KERN)); + pmap_store(&l2[l2slot], L2_PTE(pa, PTE_KERN | memattr)); pa += L2_SIZE; va += L2_SIZE; @@ -673,6 +697,7 @@ pmap_create_pagetables(vm_paddr_t kernstart, vm_size_t kernlen, vm_paddr_t *root_pt_phys) { pt_entry_t *l0, *l1, *kern_l2, *kern_l3, *devmap_l3; + pt_entry_t memattr; pd_entry_t *devmap_l2; vm_paddr_t kernend, freemempos, pa; int nkernl2, nkernl3, ndevmapl3; @@ -745,6 +770,9 @@ pmap_create_pagetables(vm_paddr_t kernstart, vm_size_t kernlen, if (freemempos < roundup2(kernend, L2_SIZE)) freemempos = roundup2(kernend, L2_SIZE); + /* Memory attributes for standard/main memory. */ + memattr = pmap_memattr_bits(VM_MEMATTR_DEFAULT); + /* * Map the kernel (and preloaded modules or data) using L2 superpages. * @@ -757,7 +785,8 @@ pmap_create_pagetables(vm_paddr_t kernstart, vm_size_t kernlen, */ slot = pmap_l2_index(KERNBASE); for (pa = kernstart; pa < kernend; pa += L2_SIZE, slot++) { - pmap_store(&kern_l2[slot], L2_PTE(pa, PTE_KERN | PTE_X)); + pmap_store(&kern_l2[slot], + L2_PTE(pa, PTE_KERN | PTE_X | memattr)); } /* @@ -830,6 +859,16 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) */ CPU_SET(PCPU_GET(hart), &kernel_pmap->pm_active); + /* + * Set up the memory attribute bits. + */ + if (has_svpbmt) { + memattr_bits[VM_MEMATTR_PMA] = PTE_MA_NONE; + memattr_bits[VM_MEMATTR_UNCACHEABLE] = PTE_MA_NC; + memattr_bits[VM_MEMATTR_DEVICE] = PTE_MA_IO; + memattr_mask = PTE_MA_MASK; + } + /* Create a new set of pagetables to run the kernel in. */ freemempos = pmap_create_pagetables(kernstart, kernlen, &root_pt_phys); @@ -862,7 +901,8 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) pte = pmap_l3(kernel_pmap, dpcpu); KASSERT(pte != NULL, ("Bootstrap pages missing")); for (i = 0; i < howmany(DPCPU_SIZE, PAGE_SIZE); i++) - pmap_store(&pte[i], L3_PTE(pa + ptoa(i), PTE_KERN)); + pmap_store(&pte[i], L3_PTE(pa + ptoa(i), PTE_KERN | + pmap_memattr_bits(VM_MEMATTR_DEFAULT))); /* Now, it can be initialized. */ dpcpu_init((void *)dpcpu, 0); @@ -875,7 +915,8 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) pte = pmap_l3(kernel_pmap, msgbufpv); KASSERT(pte != NULL, ("Bootstrap pages missing")); for (i = 0; i < howmany(msgbufsize, PAGE_SIZE); i++) - pmap_store(&pte[i], L3_PTE(pa + ptoa(i), PTE_KERN)); + pmap_store(&pte[i], L3_PTE(pa + ptoa(i), PTE_KERN | + pmap_memattr_bits(VM_MEMATTR_DEFAULT))); #undef reserve_space @@ -896,7 +937,7 @@ pmap_page_init(vm_page_t m) { TAILQ_INIT(&m->md.pv_list); - m->md.pv_memattr = VM_MEMATTR_WRITE_BACK; + m->md.pv_memattr = VM_MEMATTR_DEFAULT; } /* @@ -1145,10 +1186,11 @@ pmap_kextract(vm_offset_t va) ***************************************************/ void -pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode __unused) +pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode) { pt_entry_t entry; pt_entry_t *l3; + pt_entry_t memattr; vm_offset_t va; pn_t pn; @@ -1159,6 +1201,7 @@ pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode __unused) KASSERT((size & PAGE_MASK) == 0, ("pmap_kenter_device: Mapping is not page-sized")); + memattr = pmap_memattr_bits(mode); va = sva; while (size != 0) { l3 = pmap_l3(kernel_pmap, va); @@ -1166,6 +1209,7 @@ pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode __unused) pn = (pa / PAGE_SIZE); entry = PTE_KERN; + entry |= memattr; entry |= (pn << PTE_PPN0_S); pmap_store(l3, entry); @@ -1253,7 +1297,8 @@ pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end, int prot) void pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) { - pt_entry_t *l3, pa; + pt_entry_t *l3; + vm_paddr_t pa; vm_offset_t va; vm_page_t m; pt_entry_t entry; @@ -1268,6 +1313,7 @@ pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) l3 = pmap_l3(kernel_pmap, va); entry = PTE_KERN; + entry |= pmap_memattr_bits(m->md.pv_memattr); entry |= (pn << PTE_PPN0_S); pmap_store(l3, entry); @@ -3136,6 +3182,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, new_l3 |= (pn << PTE_PPN0_S); if ((flags & PMAP_ENTER_WIRED) != 0) new_l3 |= PTE_SW_WIRED; + new_l3 |= pmap_memattr_bits(m->md.pv_memattr); /* * Set modified bit gratuitously for writeable mappings if @@ -3371,7 +3418,8 @@ pmap_enter_2mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, PMAP_LOCK_ASSERT(pmap, MA_OWNED); pn = VM_PAGE_TO_PHYS(m) / PAGE_SIZE; - new_l2 = (pd_entry_t)((pn << PTE_PPN0_S) | PTE_R | PTE_V); + new_l2 = (pd_entry_t)((pn << PTE_PPN0_S) | PTE_R | PTE_V | + pmap_memattr_bits(m->md.pv_memattr)); if ((m->oflags & VPO_UNMANAGED) == 0) new_l2 |= PTE_SW_MANAGED; if ((prot & VM_PROT_EXECUTE) != 0) @@ -3706,7 +3754,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, pmap_resident_count_inc(pmap, 1); newl3 = ((VM_PAGE_TO_PHYS(m) / PAGE_SIZE) << PTE_PPN0_S) | - PTE_V | PTE_R; + PTE_V | PTE_R | pmap_memattr_bits(m->md.pv_memattr); if ((prot & VM_PROT_EXECUTE) != 0) newl3 |= PTE_X; if ((m->oflags & VPO_UNMANAGED) == 0) @@ -4804,9 +4852,13 @@ static int pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode) { vm_offset_t base, offset, tmpva; + vm_paddr_t phys; pd_entry_t *l1, l1e; pd_entry_t *l2, l2e; pt_entry_t *l3, l3e; + pt_entry_t bits, mask; + bool anychanged = false; + int error = 0; PMAP_LOCK_ASSERT(kernel_pmap, MA_OWNED); base = trunc_page(va); @@ -4817,46 +4869,155 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode) !(base >= VM_MIN_KERNEL_ADDRESS && base < VM_MAX_KERNEL_ADDRESS)) return (EINVAL); + bits = pmap_memattr_bits(mode); + mask = memattr_mask; + + /* First loop: perform PTE validation and demotions as necessary. */ for (tmpva = base; tmpva < base + size; ) { l1 = pmap_l1(kernel_pmap, tmpva); if (l1 == NULL || ((l1e = pmap_load(l1)) & PTE_V) == 0) return (EINVAL); if ((l1e & PTE_RWX) != 0) { /* - * TODO: Demote if attributes don't match and there - * isn't an L1 page left in the range, and update the - * L1 entry if the attributes don't match but there is - * an L1 page left in the range, once we support the - * upcoming Svpbmt extension. + * If the existing PTE has the correct attributes, then + * no need to demote. */ - tmpva = (tmpva & ~L1_OFFSET) + L1_SIZE; - continue; + if ((l1e & mask) == bits) { + tmpva = (tmpva & ~L1_OFFSET) + L1_SIZE; + continue; + } + + /* + * If the 1GB page fits in the remaining range, we + * don't need to demote. + */ + if ((tmpva & L1_OFFSET) == 0 && + tmpva + L1_SIZE <= base + size) { + tmpva += L1_SIZE; + continue; + } + + if (!pmap_demote_l1(kernel_pmap, l1, tmpva)) + return (EINVAL); } l2 = pmap_l1_to_l2(l1, tmpva); if (((l2e = pmap_load(l2)) & PTE_V) == 0) return (EINVAL); if ((l2e & PTE_RWX) != 0) { /* - * TODO: Demote if attributes don't match and there - * isn't an L2 page left in the range, and update the - * L2 entry if the attributes don't match but there is - * an L2 page left in the range, once we support the - * upcoming Svpbmt extension. + * If the existing PTE has the correct attributes, then + * no need to demote. */ - tmpva = (tmpva & ~L2_OFFSET) + L2_SIZE; - continue; + if ((l2e & mask) == bits) { + tmpva = (tmpva & ~L2_OFFSET) + L2_SIZE; + continue; + } + + /* + * If the 2MB page fits in the remaining range, we + * don't need to demote. + */ + if ((tmpva & L2_OFFSET) == 0 && + tmpva + L2_SIZE <= base + size) { + tmpva += L2_SIZE; + continue; + } + + if (!pmap_demote_l2(kernel_pmap, l2, tmpva)) + panic("l2 demotion failed"); } l3 = pmap_l2_to_l3(l2, tmpva); if (((l3e = pmap_load(l3)) & PTE_V) == 0) return (EINVAL); - /* - * TODO: Update the L3 entry if the attributes don't match once - * we support the upcoming Svpbmt extension. - */ + + tmpva += PAGE_SIZE; + } + + /* Second loop: perform PTE updates. */ + for (tmpva = base; tmpva < base + size; ) { + l1 = pmap_l1(kernel_pmap, tmpva); + l1e = pmap_load(l1); + if ((l1e & PTE_RWX) != 0) { + /* Unchanged. */ + if ((l1e & mask) == bits) { + tmpva += L1_SIZE; + continue; + } + + l1e &= ~mask; + l1e |= bits; + pmap_store(l1, l1e); + anychanged = true; + + /* Update corresponding DMAP entry */ + phys = L1PTE_TO_PHYS(l1e); + if (!VIRT_IN_DMAP(tmpva) && PHYS_IN_DMAP(phys)) { + error = pmap_change_attr_locked( + PHYS_TO_DMAP(phys), L1_SIZE, mode); + if (error != 0) + break; + } + tmpva += L1_SIZE; + continue; + } + + l2 = pmap_l1_to_l2(l1, tmpva); + l2e = pmap_load(l2); + if ((l2e & PTE_RWX) != 0) { + /* Unchanged. */ + if ((l2e & mask) == bits) { + tmpva += L2_SIZE; + continue; + } + + l2e &= ~mask; + l2e |= bits; + pmap_store(l2, l2e); + anychanged = true; + + /* Update corresponding DMAP entry */ + phys = L2PTE_TO_PHYS(l2e); + if (!VIRT_IN_DMAP(tmpva) && PHYS_IN_DMAP(phys)) { + error = pmap_change_attr_locked( + PHYS_TO_DMAP(phys), L2_SIZE, mode); + if (error != 0) + break; + } + tmpva += L2_SIZE; + continue; + } + + l3 = pmap_l2_to_l3(l2, tmpva); + l3e = pmap_load(l3); + + /* Unchanged. */ + if ((l3e & mask) == bits) { + tmpva += PAGE_SIZE; + continue; + } + + l3e &= ~mask; + l3e |= bits; + pmap_store(l3, l3e); + anychanged = true; + + phys = PTE_TO_PHYS(l3e); + if (!VIRT_IN_DMAP(tmpva) && PHYS_IN_DMAP(phys)) { + error = pmap_change_attr_locked(PHYS_TO_DMAP(phys), + L3_SIZE, mode); + if (error != 0) + break; + } tmpva += PAGE_SIZE; } - return (0); + if (anychanged) { + pmap_invalidate_range(kernel_pmap, base, tmpva); + if (mode == VM_MEMATTR_UNCACHEABLE) + cpu_dcache_wbinv_range((void *)base, size); + } + + return (error); } /* @@ -5093,7 +5254,7 @@ bool pmap_is_valid_memattr(pmap_t pmap __unused, vm_memattr_t mode) { - return (mode >= VM_MEMATTR_DEVICE && mode <= VM_MEMATTR_WRITE_BACK); + return (mode >= VM_MEMATTR_DEFAULT && mode <= VM_MEMATTR_LAST); } bool @@ -5149,17 +5310,38 @@ static void sysctl_kmaps_dump(struct sbuf *sb, struct pmap_kernel_map_range *range, vm_offset_t eva) { + char *mode; + int i; if (eva <= range->sva) return; - sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c %d %d %d\n", + for (i = 0; i < nitems(memattr_bits); i++) + if ((range->attrs & memattr_mask) == memattr_bits[i]) + break; + + switch (i) { + case VM_MEMATTR_PMA: + mode = "PMA"; + break; + case VM_MEMATTR_UNCACHEABLE: + mode = "NC "; + break; + case VM_MEMATTR_DEVICE: + mode = "IO "; + break; + default: + mode = "???"; + break; + } + + sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c %s %d %d %d\n", range->sva, eva, (range->attrs & PTE_W) == PTE_W ? 'w' : '-', (range->attrs & PTE_X) == PTE_X ? 'x' : '-', (range->attrs & PTE_U) == PTE_U ? 'u' : 's', (range->attrs & PTE_G) == PTE_G ? 'g' : '-', - range->l1pages, range->l2pages, range->l3pages); + mode, range->l1pages, range->l2pages, range->l3pages); /* Reset to sentinel value. */ range->sva = 0xfffffffffffffffful; @@ -5199,14 +5381,19 @@ sysctl_kmaps_check(struct sbuf *sb, struct pmap_kernel_map_range *range, /* The PTE global bit is inherited by lower levels. */ attrs = l1e & PTE_G; - if ((l1e & PTE_RWX) != 0) + if ((l1e & PTE_RWX) != 0) { attrs |= l1e & (PTE_RWX | PTE_U); - else if (l2e != 0) + attrs |= l1e & memattr_mask; + } else if (l2e != 0) attrs |= l2e & PTE_G; - if ((l2e & PTE_RWX) != 0) + + if ((l2e & PTE_RWX) != 0) { attrs |= l2e & (PTE_RWX | PTE_U); - else if (l3e != 0) + attrs |= l2e & memattr_mask; + } else if (l3e != 0) { attrs |= l3e & (PTE_RWX | PTE_U | PTE_G); + attrs |= l3e & memattr_mask; + } if (range->sva > va || !sysctl_kmaps_match(range, attrs)) { sysctl_kmaps_dump(sb, range, va); From nobody Wed Jul 31 17:23:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYzTN52Zhz5SFZ1; Wed, 31 Jul 2024 17:23: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYzTN4BSSz4HR1; Wed, 31 Jul 2024 17:23:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722446616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YdjjIQ6CyfdOKPzCQmsi35yLwx2D/DYQ6SnIw+Xqh/g=; b=xcnJVTRhOd2tWLhs1z0RK+iDCbIbEx/1EnmEEXVryyv1siXXc/GwnePupe7yVdFa6ywZ9f 5bO711RsEmhNqU116aHjDAb9YeSsO91htmb00fFrql5TyHZGznNpl51BRv9SrZhIr7RTFm bsOqQ6cBH8miPWJ5uWPcQs14VdthWuPt4vjAoe0UXUyi42MWQeeoRJsOhfwaSo40uZL1MN zhwD2MO3gJgf5mFMIb2J/LPjDGHr93PDO0KMp88o1bJmVd4HUQ/DxJ3pNVt2r54hoN8fPl rADwi4dReMbIKOBk6arkk1OwPUfxKZI50WAayAapmWgzR1Pm5puOPqy9Y2gASw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722446616; a=rsa-sha256; cv=none; b=mjxrcOwJc/ALJP1ynVtTwmHdRZFe0t2QunvtjPwMoZFQ8mX2Pkz0BmUP6vdoml1RCw/ML8 JHAXVB43xM35Z4eo256XHWv/ilZTQzYxKG7Yc3YL83CE5D7PRSqSNPc5NB3yA+gAEZTy4A oOQjqaO5xHxyU0ujs6Pp/9KD/iMlDpayZibN1w/zKH0G5fvSIpBvjZ1PbfS1TvTe1CaZbd WczIkrCXPKSLcySLoq8rKRmi9/KLlFMCcyPZyJtGN+pgj4y7Ko1DgMPwTfcauv1PxMb40C rL48EmOAhil5QxcZrcaWeI15a9F7KBi8ozaVtWzNbcmhKbntpFFcAVCHEZ7LkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722446616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YdjjIQ6CyfdOKPzCQmsi35yLwx2D/DYQ6SnIw+Xqh/g=; b=fvzfIHMbGQM624gTIb8RI4j4AsTV8JqxE2Bleunym+nCd2hb65scDkEa7tsCCu6Ntzj1KB 9oirv2djj7PTn1Ue7ClrfmZt+3k6P5Qz+pnRw1B6DXxe2lQ0lkVAnox6JH8ZgJFRX33eO3 lYZeAO6CWhuAvWmbFIMuWehq1/0dJReUDUzzGddSlJ4dF5VCVtV7XAdclMtGbuF5g9PXne 3sZFT2mlxWnxkPIa+j367uhSMuSh3+qPnJBakLChbSYFViJOcukhS6cki+639bf2mIbxjM jzZSkQvHJrE+5DU6WRXI2ov+zGhhYUl0b4jM0uZa9PPBj4FRNt+eoykJOnYH7g== 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 4WYzTN3p8Sz18mn; Wed, 31 Jul 2024 17:23:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VHNae8072753; Wed, 31 Jul 2024 17:23:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VHNauV072750; Wed, 31 Jul 2024 17:23:36 GMT (envelope-from git) Date: Wed, 31 Jul 2024 17:23:36 GMT Message-Id: <202407311723.46VHNauV072750@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michal Meloun Subject: git: bd774d7aa111 - stable/14 - libthr: Preresolve selected EABI symbols on arm. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bd774d7aa1117f531b2894a6428aa2792f7bedc8 Auto-Submitted: auto-generated The branch stable/14 has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=bd774d7aa1117f531b2894a6428aa2792f7bedc8 commit bd774d7aa1117f531b2894a6428aa2792f7bedc8 Author: Michal Meloun AuthorDate: 2024-07-24 15:11:27 +0000 Commit: Michal Meloun CommitDate: 2024-07-31 12:10:58 +0000 libthr: Preresolve selected EABI symbols on arm. Add the ability to pre-resolve architecture-specific EABI symbols and use it on arm for selected EABI functions. These functions can be called with rtld bind lock write-locked, so they should be resolved in forward. Reported by: Mark Millard , John F Carr Reviewed by: kib, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46104 (cherry picked from commit 5670b8cc3672d5a6bc2c41eb48d7d01343c43ad0) --- lib/libthr/arch/aarch64/include/pthread_md.h | 5 +++ lib/libthr/arch/amd64/include/pthread_md.h | 5 +++ lib/libthr/arch/arm/Makefile.inc | 3 ++ lib/libthr/arch/arm/thr_rtld_arm.c | 67 ++++++++++++++++++++++++++++ lib/libthr/arch/i386/include/pthread_md.h | 5 +++ lib/libthr/arch/powerpc/include/pthread_md.h | 5 +++ lib/libthr/arch/riscv/include/pthread_md.h | 10 +++++ lib/libthr/thread/thr_private.h | 1 + lib/libthr/thread/thr_rtld.c | 3 ++ 9 files changed, 104 insertions(+) diff --git a/lib/libthr/arch/aarch64/include/pthread_md.h b/lib/libthr/arch/aarch64/include/pthread_md.h index 75e6abf445ba..305abed55d3c 100644 --- a/lib/libthr/arch/aarch64/include/pthread_md.h +++ b/lib/libthr/arch/aarch64/include/pthread_md.h @@ -49,4 +49,9 @@ _get_curthread(void) return (_tcb_get()->tcb_thread); } +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif /* _PTHREAD_MD_H_ */ diff --git a/lib/libthr/arch/amd64/include/pthread_md.h b/lib/libthr/arch/amd64/include/pthread_md.h index fa0802e64ebb..5b1486b151c0 100644 --- a/lib/libthr/arch/amd64/include/pthread_md.h +++ b/lib/libthr/arch/amd64/include/pthread_md.h @@ -54,4 +54,9 @@ _get_curthread(void) #define HAS__UMTX_OP_ERR 1 +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif diff --git a/lib/libthr/arch/arm/Makefile.inc b/lib/libthr/arch/arm/Makefile.inc new file mode 100644 index 000000000000..4e770cf6b90f --- /dev/null +++ b/lib/libthr/arch/arm/Makefile.inc @@ -0,0 +1,3 @@ +.PATH: ${.CURDIR}/arch/arm +SRCS+= \ + thr_rtld_arm.c diff --git a/lib/libthr/arch/arm/thr_rtld_arm.c b/lib/libthr/arch/arm/thr_rtld_arm.c new file mode 100644 index 000000000000..35f5fe56cfff --- /dev/null +++ b/lib/libthr/arch/arm/thr_rtld_arm.c @@ -0,0 +1,67 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Michal Meloun + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +#include "thr_private.h" + +int __aeabi_idiv(int , int ); +unsigned __aeabi_uidiv(unsigned, unsigned ); + +struct {int q; int r;} __aeabi_idivmod(int, int ); +struct {unsigned q; unsigned r;} __aeabi_uidivmod(unsigned, unsigned); + +struct {int64_t q; int64_t r;} __aeabi_ldivmod(int64_t, int64_t); +struct {uint64_t q; uint64_t r;} __aeabi_uldivmod(uint64_t, uint64_t); + +void __aeabi_memset(void *dest, size_t n, int c); +void __aeabi_memclr(void *dest, size_t n); +void __aeabi_memmove(void *dest, void *src, size_t n); +void __aeabi_memcpy(void *dest, void *src, size_t n); +void __aeabi_memcmp(void *dest, void *src, size_t n); + +void +_thr_resolve_machdep(void) +{ + char tmp[2]; + + __aeabi_idiv(1, 1); + __aeabi_uidiv(1, 1); + + __aeabi_idivmod(1, 1); + __aeabi_uidivmod(1, 1); + + __aeabi_ldivmod(1, 1); + __aeabi_uldivmod(1, 1); + + __aeabi_memset(tmp, 1, 0); + __aeabi_memclr(tmp, 1); + __aeabi_memmove(tmp, tmp + 1, 1); + __aeabi_memcpy(tmp, tmp + 1, 1); + __aeabi_memcmp(tmp, tmp + 1, 1); +} diff --git a/lib/libthr/arch/i386/include/pthread_md.h b/lib/libthr/arch/i386/include/pthread_md.h index 2a396abe3824..cb9af559db32 100644 --- a/lib/libthr/arch/i386/include/pthread_md.h +++ b/lib/libthr/arch/i386/include/pthread_md.h @@ -54,4 +54,9 @@ _get_curthread(void) #define HAS__UMTX_OP_ERR 1 +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif diff --git a/lib/libthr/arch/powerpc/include/pthread_md.h b/lib/libthr/arch/powerpc/include/pthread_md.h index 14f1703b5460..31fa9820b26a 100644 --- a/lib/libthr/arch/powerpc/include/pthread_md.h +++ b/lib/libthr/arch/powerpc/include/pthread_md.h @@ -51,4 +51,9 @@ _get_curthread(void) #define HAS__UMTX_OP_ERR 1 +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif /* _PTHREAD_MD_H_ */ diff --git a/lib/libthr/arch/riscv/include/pthread_md.h b/lib/libthr/arch/riscv/include/pthread_md.h index 343f4cae8486..2f70aa5edf25 100644 --- a/lib/libthr/arch/riscv/include/pthread_md.h +++ b/lib/libthr/arch/riscv/include/pthread_md.h @@ -56,4 +56,14 @@ _get_curthread(void) return (NULL); } +static __inline void +_thr_resolve_machdep(void) +{ +} + +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif /* _PTHREAD_MD_H_ */ diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index f89941f96c78..7b8a2d6569f9 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -1103,6 +1103,7 @@ 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); +void _thr_resolve_machdep(void); __END_DECLS __NULLABILITY_PRAGMA_POP diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 54560a2f7df2..55197a9c5461 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -276,6 +276,9 @@ _thr_rtld_init(void) _thr_signal_block_check_fast(); _thr_signal_block_setup(curthread); + /* resolve machine depended functions, if any */ + _thr_resolve_machdep(); + uc_len = __getcontextx_size(); uc = alloca(uc_len); getcontext(uc); From nobody Wed Jul 31 17:23:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYzTn6YWKz5SFwK; Wed, 31 Jul 2024 17:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYzTn64tbz4HfN; Wed, 31 Jul 2024 17:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722446637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0T1i624iOycStLi4ugA10txT//3sYQ4HNcRMpMMvSRI=; b=pheXCwI/Mpd+q1sODmnPTRl1i+0NAkM1dzvCSbSFbVwnD5O+oEHM9nOzagSMYXUMoWMaJA g7pe5V+FaOnbBBcIKet49NmRrYq1eGjxBXsx3NJeVrUfr3vKfafWhV3seYc03tJCL4QLex WoMaMhSSy/OXOesWbuxG3ZLM0XmL5//WhrBZsydm532k2epX2VB+cQuh0R4P3qK73Vm26n BnEpgCRwTNLu5zu0sP5B6ZNfI0/HQUntfpoOpEYkWqUTfFHmqeUh3VAc2dLANA0RdfO+zB xbcjUcIwr5osHW48TnMY0YpjL2WDy393n4IAShVgFx7PoclLxYZplpFffNVNxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722446637; a=rsa-sha256; cv=none; b=xtHSw11pUsUZlol0J6YvuU7XfVUNc9307xIwaAHhW/ovZMMAbfPbPkBth4JdFSiQFTF85g n/O3kuZO4oMb6omlH6o0jy4PJLLlTD/0XTyvpnVQK6hPIPbyZA4YaurJsPcuAdUuPxdEDB vbmxVe0Zuy+qoBPbQ+4Vsp6yW+h8aJBTzH8eulEBf1UD5rRG5eHhzDqHlE7LqP6aTVH0Va HcP946TGmmalhdleKe2wsh11c21cNCnmflpFTgO2qkRZtDe39OYU3d1eIoJuYkCti7kfh7 GRCmhqpqUFfxxjTHAlTJPO4hMr48oXysC69CepsYAhGGLZ9GXshJXOxJk0KKsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722446637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0T1i624iOycStLi4ugA10txT//3sYQ4HNcRMpMMvSRI=; b=MsM0W12kfyjoeSWI+Ye7i+CmpyNWuigHp+TtKeMDndRPhqJHGvXCaSsUpHLAWrJHQglje3 KrNydS+4i7AjziUtlkHXHHntlc7T+7vlPwrkew6tsLD08GFXiByZKx9TG0vCGVVcjCaZsZ Rw+SFGwPNfnPSultjoXh0/EOpRLBwQRGQOIPzhuq6kxTEw6+w97Lzut+2noQCE+hwpQ621 tG6XSFCrCoLfKsNp4SEJnMqSkzalYKnMKD6cgV7JHEfOODnM055D3zhXGNaASR1Csz3QCv NWAxIt1BK9K8oP5GMl4ksgCA/DFX4PfSDX3AHiZOP5L32y3X1TULXGCeL4dOjg== 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 4WYzTn5hXYz199h; Wed, 31 Jul 2024 17:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VHNveo072944; Wed, 31 Jul 2024 17:23:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VHNv2v072941; Wed, 31 Jul 2024 17:23:57 GMT (envelope-from git) Date: Wed, 31 Jul 2024 17:23:57 GMT Message-Id: <202407311723.46VHNv2v072941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michal Meloun Subject: git: 30863065e50d - stable/13 - libthr: Preresolve selected EABI symbols on arm. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 30863065e50de5ae8fcc09f0de8d375e7aa9f621 Auto-Submitted: auto-generated The branch stable/13 has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=30863065e50de5ae8fcc09f0de8d375e7aa9f621 commit 30863065e50de5ae8fcc09f0de8d375e7aa9f621 Author: Michal Meloun AuthorDate: 2024-07-24 15:11:27 +0000 Commit: Michal Meloun CommitDate: 2024-07-31 12:03:39 +0000 libthr: Preresolve selected EABI symbols on arm. Add the ability to pre-resolve architecture-specific EABI symbols and use it on arm for selected EABI functions. These functions can be called with rtld bind lock write-locked, so they should be resolved in forward. Reported by: Mark Millard , John F Carr Reviewed by: kib, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46104 (cherry picked from commit 5670b8cc3672d5a6bc2c41eb48d7d01343c43ad0) --- lib/libthr/arch/aarch64/include/pthread_md.h | 5 +++ lib/libthr/arch/amd64/include/pthread_md.h | 5 +++ lib/libthr/arch/arm/Makefile.inc | 3 ++ lib/libthr/arch/arm/thr_rtld_arm.c | 67 ++++++++++++++++++++++++++++ lib/libthr/arch/i386/include/pthread_md.h | 5 +++ lib/libthr/arch/mips/include/pthread_md.h | 5 +++ lib/libthr/arch/powerpc/include/pthread_md.h | 5 +++ lib/libthr/arch/riscv/include/pthread_md.h | 5 +++ lib/libthr/thread/thr_private.h | 1 + lib/libthr/thread/thr_rtld.c | 3 ++ 10 files changed, 104 insertions(+) diff --git a/lib/libthr/arch/aarch64/include/pthread_md.h b/lib/libthr/arch/aarch64/include/pthread_md.h index 75e6abf445ba..305abed55d3c 100644 --- a/lib/libthr/arch/aarch64/include/pthread_md.h +++ b/lib/libthr/arch/aarch64/include/pthread_md.h @@ -49,4 +49,9 @@ _get_curthread(void) return (_tcb_get()->tcb_thread); } +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif /* _PTHREAD_MD_H_ */ diff --git a/lib/libthr/arch/amd64/include/pthread_md.h b/lib/libthr/arch/amd64/include/pthread_md.h index fa0802e64ebb..5b1486b151c0 100644 --- a/lib/libthr/arch/amd64/include/pthread_md.h +++ b/lib/libthr/arch/amd64/include/pthread_md.h @@ -54,4 +54,9 @@ _get_curthread(void) #define HAS__UMTX_OP_ERR 1 +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif diff --git a/lib/libthr/arch/arm/Makefile.inc b/lib/libthr/arch/arm/Makefile.inc new file mode 100644 index 000000000000..4e770cf6b90f --- /dev/null +++ b/lib/libthr/arch/arm/Makefile.inc @@ -0,0 +1,3 @@ +.PATH: ${.CURDIR}/arch/arm +SRCS+= \ + thr_rtld_arm.c diff --git a/lib/libthr/arch/arm/thr_rtld_arm.c b/lib/libthr/arch/arm/thr_rtld_arm.c new file mode 100644 index 000000000000..35f5fe56cfff --- /dev/null +++ b/lib/libthr/arch/arm/thr_rtld_arm.c @@ -0,0 +1,67 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Michal Meloun + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +#include "thr_private.h" + +int __aeabi_idiv(int , int ); +unsigned __aeabi_uidiv(unsigned, unsigned ); + +struct {int q; int r;} __aeabi_idivmod(int, int ); +struct {unsigned q; unsigned r;} __aeabi_uidivmod(unsigned, unsigned); + +struct {int64_t q; int64_t r;} __aeabi_ldivmod(int64_t, int64_t); +struct {uint64_t q; uint64_t r;} __aeabi_uldivmod(uint64_t, uint64_t); + +void __aeabi_memset(void *dest, size_t n, int c); +void __aeabi_memclr(void *dest, size_t n); +void __aeabi_memmove(void *dest, void *src, size_t n); +void __aeabi_memcpy(void *dest, void *src, size_t n); +void __aeabi_memcmp(void *dest, void *src, size_t n); + +void +_thr_resolve_machdep(void) +{ + char tmp[2]; + + __aeabi_idiv(1, 1); + __aeabi_uidiv(1, 1); + + __aeabi_idivmod(1, 1); + __aeabi_uidivmod(1, 1); + + __aeabi_ldivmod(1, 1); + __aeabi_uldivmod(1, 1); + + __aeabi_memset(tmp, 1, 0); + __aeabi_memclr(tmp, 1); + __aeabi_memmove(tmp, tmp + 1, 1); + __aeabi_memcpy(tmp, tmp + 1, 1); + __aeabi_memcmp(tmp, tmp + 1, 1); +} diff --git a/lib/libthr/arch/i386/include/pthread_md.h b/lib/libthr/arch/i386/include/pthread_md.h index 2a396abe3824..cb9af559db32 100644 --- a/lib/libthr/arch/i386/include/pthread_md.h +++ b/lib/libthr/arch/i386/include/pthread_md.h @@ -54,4 +54,9 @@ _get_curthread(void) #define HAS__UMTX_OP_ERR 1 +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif diff --git a/lib/libthr/arch/mips/include/pthread_md.h b/lib/libthr/arch/mips/include/pthread_md.h index 5ccf16cef1e5..b56f06606a8a 100644 --- a/lib/libthr/arch/mips/include/pthread_md.h +++ b/lib/libthr/arch/mips/include/pthread_md.h @@ -50,4 +50,9 @@ _get_curthread(void) return (NULL); } +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif /* _PTHREAD_MD_H_ */ diff --git a/lib/libthr/arch/powerpc/include/pthread_md.h b/lib/libthr/arch/powerpc/include/pthread_md.h index 14f1703b5460..31fa9820b26a 100644 --- a/lib/libthr/arch/powerpc/include/pthread_md.h +++ b/lib/libthr/arch/powerpc/include/pthread_md.h @@ -51,4 +51,9 @@ _get_curthread(void) #define HAS__UMTX_OP_ERR 1 +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif /* _PTHREAD_MD_H_ */ diff --git a/lib/libthr/arch/riscv/include/pthread_md.h b/lib/libthr/arch/riscv/include/pthread_md.h index 343f4cae8486..baddfe3ecb22 100644 --- a/lib/libthr/arch/riscv/include/pthread_md.h +++ b/lib/libthr/arch/riscv/include/pthread_md.h @@ -56,4 +56,9 @@ _get_curthread(void) return (NULL); } +static __inline void +_thr_resolve_machdep(void) +{ +} + #endif /* _PTHREAD_MD_H_ */ diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index e590fb0c1e7a..ec0c617a54c2 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); +void _thr_resolve_machdep(void); __END_DECLS __NULLABILITY_PRAGMA_POP diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 3bc07638e6bf..49e20fdf5145 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -275,6 +275,9 @@ _thr_rtld_init(void) _thr_signal_block_check_fast(); _thr_signal_block_setup(curthread); + /* resolve machine depended functions, if any */ + _thr_resolve_machdep(); + uc_len = __getcontextx_size(); uc = alloca(uc_len); getcontext(uc); From nobody Wed Jul 31 17:23:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYzTq13Kxz5SFrd; Wed, 31 Jul 2024 17:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYzTp75Spz4Hrq; Wed, 31 Jul 2024 17:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722446639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXPHj7kyFLQUxuPWaHicnujiNjR4p9+l+yE6TxjFhOE=; b=jvNQKr3MaKmFy0V72EZCZi11hFYly4FnqHAtJbIDjBjxCDqxBTsEjrKTwhuTnATIacZdOW JrkQp6MpJ4XuUcN5+6CCqF9iUI1j2TnxKiUaqGXIF8yy1wOOtF2y9PKeUtM17VZibLDrsa yc1Gz7lelrQjTWp5+LIMTliNhj4oDN20NQ78tc+lYV5EQns5+hYZC9PLqb58kxvOEfhdib RwnjHQQQnxyLDoIzeYwZozOqoKu2QuACwR/TUYTtaNiZZtvOp0ToHCkvNgVjHNxGX89Chb pF1XwZBxDEOYbr4mwbO17xXPXAMJ1pfscSBgJ4+SNnsXiRmiGhV6JNyN37bmQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722446639; a=rsa-sha256; cv=none; b=te4XhoIGJeq0lDu2JjHsdyuYZoMj0PylFjeAE7ayzBcV42WLFQtrltVyJZyArItO1u4wQb 6/jBBnP2DkWItQjhn+H3Ao0scGEXM99q7j2mkIoyRxKa06oL7Rir6EWVdoOPLnpXzH/+k3 sH7iXRztDyu172YlikV7unzcKV2GVXQkbI73ZLnfKz5y7Ch++coSbzekx7W5TyEsROHOpI X+vJU/z5Rdsj6XNlBoSKdV6NHY32qp6iMJfPqnrcB1jSkSto2frx9VdoC1gtFdTTrKdoIb XQaHzjPg/b53gY6z+vlLIfaVMHaPwnua5mcivJEly63Nli+bxsrUvw1uMPuG1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722446639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXPHj7kyFLQUxuPWaHicnujiNjR4p9+l+yE6TxjFhOE=; b=kpE3hA8J0zx3YrZ5CvtEOUQza6c7dfUM6D+t0TX7rJHUtYmu9vFHA10WYfvm2Hj4rg5JLz JkTfawRs8efMKXT46hNk5vkbNycR3dQDVgWNycOsqliI5TU1XqDHXWGiWlyoFvpMvkX4FQ AkjcJPTb+GSbd84jCnAg9fetDcD52WitLIWBlmTdxI6f3xlBlwoLoDOAIFWnlJyEgVnUEF 6fPVLJbZrA3nfC3jv51V9BUbLTd+9uEbcX9GLr0riemgZyvM6ucHm2jQV1d5L/pxEVeV0j 7wvT3hcINXjkfERM2O/dYEV+FY74oJpd5BWq6jVcPrGvNWAKeQugRd8525Y4OQ== 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 4WYzTp6jbfz199j; Wed, 31 Jul 2024 17:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VHNwgf073001; Wed, 31 Jul 2024 17:23:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VHNwv7072998; Wed, 31 Jul 2024 17:23:58 GMT (envelope-from git) Date: Wed, 31 Jul 2024 17:23:58 GMT Message-Id: <202407311723.46VHNwv7072998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michal Meloun Subject: git: 8ca43e674e3c - stable/13 - gdtoa: Regenerate configuration headers for 32-bit arm. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8ca43e674e3cddf3574e062abde6cd70c120984e Auto-Submitted: auto-generated The branch stable/13 has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=8ca43e674e3cddf3574e062abde6cd70c120984e commit 8ca43e674e3cddf3574e062abde6cd70c120984e Author: Michal Meloun AuthorDate: 2023-08-13 05:51:56 +0000 Commit: Michal Meloun CommitDate: 2024-07-31 12:25:35 +0000 gdtoa: Regenerate configuration headers for 32-bit arm. These configuration headers were only guessed, but unfortunately not exactly correctly. Therefore, re-generate them on real HW. Generated on CA15, verified on CA9, CA7(with VFP lite) and on 32-bit ARMv9. PR: 272229 Reported by: Robert Clausecker MFC after: 2 weeks (cherry picked from commit e59b6e48f4c8bbfee43a1bc6d9fd47691d3bd603) --- lib/libc/arm/arith.h | 10 ++++++---- lib/libc/arm/gd_qnan.h | 11 ++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/libc/arm/arith.h b/lib/libc/arm/arith.h index f0e28d253bf2..36e241f05356 100644 --- a/lib/libc/arm/arith.h +++ b/lib/libc/arm/arith.h @@ -1,19 +1,21 @@ /* * MD header for contrib/gdtoa - */ - -/* + * * NOTE: The definitions in this file must be correct or strtod(3) and * floating point formats in printf(3) will break! The file can be * generated by running contrib/gdtoa/arithchk.c on the target * architecture. See contrib/gdtoa/gdtoaimp.h for details. + * + * Generated on CA15, verified on CA9, CA7(with VFP lite) and on 32-bit ARMv9. + * */ #if !defined(__ARMEB__) && (defined(__VFP_FP__) || defined(__ARM_EABI__)) #define IEEE_8087 #define Arith_Kind_ASL 1 -#define Sudden_Underflow #else #define IEEE_MC68k #define Arith_Kind_ASL 2 #endif + +#define Double_Align diff --git a/lib/libc/arm/gd_qnan.h b/lib/libc/arm/gd_qnan.h index e5c4846e026f..acf13d0b7852 100644 --- a/lib/libc/arm/gd_qnan.h +++ b/lib/libc/arm/gd_qnan.h @@ -4,18 +4,19 @@ * This file can be generated by compiling and running contrib/gdtoa/qnan.c * on the target architecture after arith.h has been generated. * - * XXX I don't have ARM hardware, so I just guessed. --das + * Generated on CA15, verified on CA9, CA7(with VFP lite) and on 32-bit ARMv9. + * */ #define f_QNAN 0x7fc00000 #define d_QNAN0 0x0 #define d_QNAN1 0x7ff80000 #define ld_QNAN0 0x0 -#define ld_QNAN1 0xc0000000 -#define ld_QNAN2 0x7fff +#define ld_QNAN1 0x7ff80000 +#define ld_QNAN2 0x0 #define ld_QNAN3 0x0 #define ldus_QNAN0 0x0 #define ldus_QNAN1 0x0 #define ldus_QNAN2 0x0 -#define ldus_QNAN3 0xc000 -#define ldus_QNAN4 0x7fff +#define ldus_QNAN3 0x7ff8 +#define ldus_QNAN4 0x0 From nobody Wed Jul 31 18:27:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ0vR2rYjz5SLPW; Wed, 31 Jul 2024 18:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ0vR2FQ4z4Ndd; Wed, 31 Jul 2024 18:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722450467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q1rSxKuQKFq/PKMGNThZ0QAukq9XA2EqUNy4HemsLhk=; b=xYo5xV+AsQV4hOIGgClivGqxcrfcEyNxFUNHUcVQogHH4HvqQImgE4SN4oVrEw5GR77xhL nALj6t6+9k7G99C531cXbBaHCHm69aMQbUoZXa/X6T6uG0xCTSWo0Y+P91erh1aEkgWPWR p+PMWCaggzKwWi5EFtBjfE7E7X2JoCEhojAYAe9aIcLL26AWWOcGaKljcF2kfT+ZDc4hOI lnPkdFUYNLt72CZZse1CNLrZDK8gX/b1ddZEh6zPa63gqoORLk/K9EKVmoHXGac8lkQzrV nAsgOOgvSBMhKy0AJNRuP36/8QmS2+Z+GCEh7ElxqPel8UU+x7jov8JdPdcH2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722450467; a=rsa-sha256; cv=none; b=dac0vleGGAOSGVP8P8pk6+V1aU1CX8UugXwrZesA0vcqRrut4hjLA2KNcb9zHIsKorRdPi sZiw82O9XCvWTh+ghFWeMDxGHKReX5ky0sWlzEM6OzELaNhX7b/brxS+0eOHyLV+ijty+9 aj6Hm4s7lp7kq922uijCZYLxfT0MLuURLba6w091NH4Stfg8+mrMoGsUd+eDwOJbELPMEf Zy6Hbuy7No6BFhHQu3Y9iVWC7IuSBuHN+fBJ0GmwW7cJB+srSvXCF5y98ZdKdTbkl+cJjY RWAjPNJpfsXTI1AVmEpduHCWTkowQc+dezz0fpxrUXjLPmj4aUPKlRo70Z4WvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722450467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q1rSxKuQKFq/PKMGNThZ0QAukq9XA2EqUNy4HemsLhk=; b=auQO15pzUBBag3GkL6Blgct0SZ70oPeZqv5sYn0hR+30Ef0eYuC/iZQjNkm+NSp5M+mgEO dqhPXhXcQXLdrSSIy7mGO2R3AlB4rCOTZR4D86DAveGIiUXleIS1ME6X08w6YFaOt5BiPR UF1avNujnAHMTEfZgsQf5yZ+c1E2zpxKu+M8+sQ92UYJ8sr4MQ3yXvCw9iiD8KJU4YU9HN nMScxXE0VH/lm0a5dMjzo26wySJZcGc9O5308vq6g7BPLGvE0HvulOvFOnYfVanUjgWHvC QWAfV7nGBwPaNAvFQXi0nqq8Wdzt5lwQaClHw+YzkkUd53sqUCe27PYs36mOyg== 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 4WZ0vR1rnGz19PY; Wed, 31 Jul 2024 18:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VIRl0n075003; Wed, 31 Jul 2024 18:27:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VIRlZo075000; Wed, 31 Jul 2024 18:27:47 GMT (envelope-from git) Date: Wed, 31 Jul 2024 18:27:47 GMT Message-Id: <202407311827.46VIRlZo075000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michal Meloun Subject: git: fb084dd01e25 - stable/14 - Fix mismerge in lib/libthr/arch/riscv/include/pthread_md.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fb084dd01e25b7fa743e55dac40a0af29b6ea14d Auto-Submitted: auto-generated The branch stable/14 has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=fb084dd01e25b7fa743e55dac40a0af29b6ea14d commit fb084dd01e25b7fa743e55dac40a0af29b6ea14d Author: Michal Meloun AuthorDate: 2024-07-31 18:19:38 +0000 Commit: Michal Meloun CommitDate: 2024-07-31 18:27:05 +0000 Fix mismerge in lib/libthr/arch/riscv/include/pthread_md.h Fixes: bd774d7aa1117f531b2894a6428aa2792f7bedc8 --- lib/libthr/arch/riscv/include/pthread_md.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/libthr/arch/riscv/include/pthread_md.h b/lib/libthr/arch/riscv/include/pthread_md.h index 2f70aa5edf25..baddfe3ecb22 100644 --- a/lib/libthr/arch/riscv/include/pthread_md.h +++ b/lib/libthr/arch/riscv/include/pthread_md.h @@ -61,9 +61,4 @@ _thr_resolve_machdep(void) { } -static __inline void -_thr_resolve_machdep(void) -{ -} - #endif /* _PTHREAD_MD_H_ */ From nobody Wed Jul 31 19:02:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ1gc4bJKz5R8qn; Wed, 31 Jul 2024 19:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ1gc3k1Jz4RhN; Wed, 31 Jul 2024 19:02:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722452556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YkWIU5IZBnSCqXh0i0f2gtmoJz5U/0p3OHS2XMsYAW4=; b=CVSCu+pAlFXx4WUgS2i+T2nyxqDkaBWKUWUrhXi4Wkr/yb+T5en25RVRzkm8ex3h0973RO CmLfwB0BK0BuZQtlx+yWTsYqTCfqN1PysJz/zmlPuVK6yJpg2g/LBA6tL92fugfnbM+bmu OGMpHXY7S6nNif90Aarpx4G2akOw7uxgSw1DGXB08pzEuPBTKCG8P0U1CqBaAXiuYowEzp e8Taaaz7bIjg/9XAOXabm/AgOuCvI1b8Df4Un3M3+LUZHce+PA+fjwH//Dm45eHWNQUJ4H TNoq3ZUApAuVqQ4dR8jMx3PccSph5msmUunC6F9gUqRDhgOHmTwUcV2fiCMU8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722452556; a=rsa-sha256; cv=none; b=hLho25wEH+eHokd3YWuJwy7Ds3Lag56S3ih0//T4hs5ysJI8qeWDudNShtiB5zMqYikaly wrgg7oQUZXbpp+K883LB1NWI5UoH3vPnrlQ2HrQ8IzFtGa32IPaAMuCUuGN3n73fhyRnQ7 W+XMkgevYdEglH7CQRLCogpZFQk/dwoY5lwOybb/wppkGNjQ3OpTJn9eSeg+BYt7OFw9Tj QK3SsuXYyu/pWoSPqFeY50CQ/un2xMnM9/LbrQDNJVx9Jgw+FyZuZkJjoGYHHQmlL2vU20 q74Qdc3KhzJQu7Pi2YCXL0cOT3syAGJZkssQnN6iHqeNECM/ZIPmenGHbmUtTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722452556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YkWIU5IZBnSCqXh0i0f2gtmoJz5U/0p3OHS2XMsYAW4=; b=TXJmVN4zxe2t3MVRfMxaLS7DzhhU1BuiOgsQE/3XIOX9sCmXU9feYFtfZCXCTqNhCLbFX3 4WdNOnpEhB9L0677573q67UF0pgJgU2JfzTZpMkJ2kD3qWD31rVUCub6mahTN7yKu8Dav3 swN1fn2owD2OU9wYVM/dt6HhAndRxbSqgk2IQMTFLpNoefFpy68/rJrU54PlocNnTZKjeR +BiqFTSajGj0pZZ0XA9xJWm3R1v0tQjkZFh3drImeHMkcLZiVjHrt7Sy9WF5izl8zw6J39 zGo9f1VhfNFTjm404holqyJV7dwPCmYWq650dov3CgWRp8LTdL02Qz0PEmHKhA== 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 4WZ1gc3Jxvz1CSH; Wed, 31 Jul 2024 19:02:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJ2avf042011; Wed, 31 Jul 2024 19:02:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJ2avF042008; Wed, 31 Jul 2024 19:02:36 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:02:36 GMT Message-Id: <202407311902.46VJ2avF042008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: b72e57d6c941 - stable/13 - rtld: Define MD_OBJ_ENTRY for mips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b72e57d6c9414005ed991c6cccb1aed24e4718aa Auto-Submitted: auto-generated The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b72e57d6c9414005ed991c6cccb1aed24e4718aa commit b72e57d6c9414005ed991c6cccb1aed24e4718aa Author: Jessica Clarke AuthorDate: 2024-07-31 18:59:43 +0000 Commit: Jessica Clarke CommitDate: 2024-07-31 18:59:43 +0000 rtld: Define MD_OBJ_ENTRY for mips This is a direct commit to stable/13. Reported by: mmel Fixes: f9210d37c5c6 ("rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_Entry") --- libexec/rtld-elf/mips/rtld_machdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/rtld-elf/mips/rtld_machdep.h b/libexec/rtld-elf/mips/rtld_machdep.h index 84e1a1093058..0031b685c15d 100644 --- a/libexec/rtld-elf/mips/rtld_machdep.h +++ b/libexec/rtld-elf/mips/rtld_machdep.h @@ -35,6 +35,8 @@ struct Struct_Obj_Entry; +#define MD_OBJ_ENTRY + /* Return the address of the .dynamic section in the dynamic linker. */ #define rtld_dynamic(obj) (&_DYNAMIC) From nobody Wed Jul 31 19:26:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2Bq5KzGz5RCBt; Wed, 31 Jul 2024 19:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2Bq3LTBz4TfR; Wed, 31 Jul 2024 19:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ml/PA1eTsHwYtPmJSr2vucrM7FMRc9RvCE++qiDBRkw=; b=beTkymio2t24u2wx2FAT7L9WE7sB5kpSykabulCuu0/ONtwcDO8PQDhmaGOEHhnjGOPy09 GkDUckdo36PSF4BhD/6DTWMBkmOKC6uS+JwnT8pYjoN8DvzGvYw1j1kesfSvlClpbP8IWo sF/XW0xLZhkJNDoDcVz2YCDOpH+cAfGXJ3Yu8jnwEyeXoQ7++xE03wMwjKj+lZCm5mgPJw dXjB0G3PQQUy9T9v5mx6LvYf9TS9HAYNYTh246d//ubZJo0vWewCaW4pizCNJzCtiWLaLD s7D9wsWbeV6uqgZp3uUiQWsj5UpbwSKU5+uI8oe710eBTr/K2FJbkZJOtvCrCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722453971; a=rsa-sha256; cv=none; b=reOBH+iwL8pHHXQrPvU5qKAWYHSXKmFqycMOmTHVrb2/IpYCzflH2BLLELwh4klsci8xB+ RHhmnjOEy//3z37TJ1rb8T+X23KStkzFu0BJNGDKyOoVfGzZQkjFrQimeA2b3hxQZ+KlXi OJs7gR7ffwA7XyEXFIkI3irong6sX7ZQE1R3r0IVw02oFizj1kNCeiQiqFcWxMtebpGCnQ UBIYJB1r+UYOSItta8I3LgSCmDEFS5UPv5ekTRHGoMfeScy537aqVZzVRL6sZuSUz+Mk9d rJG93fxth1CAy5yYd1Z+qlnOXBNQRqw/LdKBlhiw4423UODeYt3Plokd5DZVXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ml/PA1eTsHwYtPmJSr2vucrM7FMRc9RvCE++qiDBRkw=; b=LWgeMkdG6BqaE5orE6Jm814Nhiv59aQnO8cx3Y31XHiNomLkI/rDsPOq4MBkcNEpJQWoTC N8KVlzTZGqozNsfOttKQyReqD85geeDHipOF7kmKkNOcTJXRZZFxE31KX0gMrJEAaA1ifj TAyzmAAaFjCDGYCZzm9W8eNy9BEBG4BUqHBYXoq4W6OaRrOy+85PvZh29ojhYOZ6tob/3a m5m5qM+esDUoY17LamFcvn8V/Vg1zqwKMqK8QDK8dN4zCsbBDZGZ66WMyBacnFsGEC+J/w ld+KK9mHtxlsDLR56L03mJarE0pD75fBNTos4QLRi9GASEVbOEK+FV4rGFKdjg== 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 4WZ2Bq29D9zDgh; Wed, 31 Jul 2024 19:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJQBsJ077922; Wed, 31 Jul 2024 19:26:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJQBen077919; Wed, 31 Jul 2024 19:26:11 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:26:11 GMT Message-Id: <202407311926.46VJQBen077919@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: b313bf154a5a - main - ObsoleteFiles.inc: Remove /rescue/gbde List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b313bf154a5afe5b07da7dd3d5c2efc87348a737 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b313bf154a5afe5b07da7dd3d5c2efc87348a737 commit b313bf154a5afe5b07da7dd3d5c2efc87348a737 Author: John Baldwin AuthorDate: 2024-07-31 16:11:04 +0000 Commit: John Baldwin CommitDate: 2024-07-31 19:25:27 +0000 ObsoleteFiles.inc: Remove /rescue/gbde Reported by: Mark Millard Fixes: 6ac1f02be34a Add GBDE to ObsoleteFiles.inc --- ObsoleteFiles.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 3ca9d410cb29..79d0f315b17b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -101,6 +101,7 @@ OLD_DIRS+=var/db/portsnap # 20240507: remove gbde OLD_FILES+=boot/kernel/geom_bde.ko OLD_FILES+=etc/rc.d/gbde +OLD_FILES+=rescue/gbde OLD_FILES+=sbin/gbde OLD_FILES+=usr/share/man/man4/gbde.4.gz OLD_FILES+=usr/share/man/man8/gbde.8.gz From nobody Wed Jul 31 19:26:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2Br5DDRz5RCCL; Wed, 31 Jul 2024 19:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2Br3QRpz4TFG; Wed, 31 Jul 2024 19:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ORD38ZLR/6QJJTun9WiapSy+u1r0piR5cVJKO5ZuPPM=; b=lu8hcW7KudNYtRSTXxk3Tx8cboN/4j7knsYLnV8bO3BijAld63Mlkzp+TUW3Z68QpSnufn 1oBge8rdCylVtnZVqnKDPI/x/LpiEmW7v70GIOTnAF4jErOamFfmJz/a2AArMcK7NtFheb 4y4gkWyLgGURzrsrtR0wbh9IeVSaJW/uNBooJZm9TqxEUAI/6rb/Y4wlfir+Wbc/RvLXFQ SHRpQvSqP4/GfhAfNxVR0ChH9JINDDBArXxaGyMbbOv/rtNog8NOIXEzEFddOSTPqPlkgK UJ7TSUhNJISt4/cFojSq9ckRoACMl0uA0E2WoCzX6jUoEsSUBR6NopHLO/6w1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722453972; a=rsa-sha256; cv=none; b=EWXzmT7QETvHcvKZoyNW4e6UcVfEYQjsRAXiBlGVBIF3wMsEcwLpYOpT8SqRTmhD9nP8QB FXX0d794Vk0YabFXTEXsyXZ6swNhKgm0bUHpnudx+lXIhF9cRHLst9ar5mAg/DUGDFr8Z1 v1ODQc1NtUETtp7vCwyYLbjpdEbutTJjwtgS/K6WNvOLtog9Z/MQr8SZdoaa7+GOAKoBsJ ox4c0MbZDO6j1Fj6qgIEWOmSFdScxp3sFUnpITc2CKz0sNibH+dKMRrkMal/OJmp6Kg/5a 1Lm/eLSp5PNwIlUBFqpTo7W3ULz+uHoXlnBMroa5NFakNaZcVAwBBmMUH6QsAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ORD38ZLR/6QJJTun9WiapSy+u1r0piR5cVJKO5ZuPPM=; b=crvg6n1+Tq1GVIn9ElsFpu17k760kg+RynRhWFVX4Tbrk4FRQgAsrD/1DU7GMjD6DZ5dw1 abE11g53odWBC0vm6/ZBcG0jsd1BUCrTuaDAipohk6fQsz1fIk7Nf/4gxzvaDSI4SxWcW6 zfXFTmmfZCJR2864JayTDQrGzr0puLr0scp6pfT1beyJtKgaTck/WMbwJ+Y2voF9S/A1iS 2GR+Amr4Iy6C7Gd+pIKKXCrHzcL8iDyAB+S8E9D9vtG2J6u4DB1Zc2Dbd2cgyRZWzPJBw1 VIlPehesFYOMw3p81Kk9sLq4AxGT1OalrTM1mREufIhQaThab8455hfQSpYjxQ== 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 4WZ2Br31Rcz1Cqy; Wed, 31 Jul 2024 19:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJQCev077963; Wed, 31 Jul 2024 19:26:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJQCOP077960; Wed, 31 Jul 2024 19:26:12 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:26:12 GMT Message-Id: <202407311926.46VJQCOP077960@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: 66158bda905e - main - ObsoleteFiles.inc: Remove CAM.4 MLINK List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 66158bda905eea447d2f8beef92556c090c41dbb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=66158bda905eea447d2f8beef92556c090c41dbb commit 66158bda905eea447d2f8beef92556c090c41dbb Author: John Baldwin AuthorDate: 2024-07-31 16:12:25 +0000 Commit: John Baldwin CommitDate: 2024-07-31 19:25:40 +0000 ObsoleteFiles.inc: Remove CAM.4 MLINK Reported by: Mark Millard Fixes: a00f9e4e8181 scsi: Stop installing both cam.4 and CAM.4 --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 79d0f315b17b..eeea036390d0 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -562,6 +562,9 @@ OLD_FILES+=usr/include/c++/v1/setjmp.h # 20240321: remove empty /usr/libdata/gcc directory OLD_DIRS+=usr/libdata/gcc +# 20240315: stop installing CAM.4 link to scsi.4 +OLD_FILES+=usr/share/man/man4/CAM.4.gz + # 20240307: Improperly installed awk tests removed OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/missing-precision.ok OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/negative-nf.ok From nobody Wed Jul 31 19:26:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2Bt2NQtz5RCBx; Wed, 31 Jul 2024 19:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2Bs5mXCz4TFK; Wed, 31 Jul 2024 19:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXtfsKjIAxDcwlA+aQmFkH9UMRvmoSb+EX6YpvDDGXE=; b=RMsmBjd5b23Gpu3BijCTvWnAxWjQnGsX92o5dhwFWLN/ExqIeLUdt24zZvjMUEDE11OgXr klVQpGh29cpnjRtPJsFOexMtaWZSR9Ihd+PRoptcUAm4w9XFApMOQsOXtGAHgx9VP5Azkt rEoQqt2EU0mzqHMxkMFGxE2JRe3iqda4nSZr8BBvMAXO8XlH7Qx5M5vRcSUMdsE6+5dTsz V2zohQhlc7IvZQ+mKRXLQI7YIbP2cz/txUvgWnAMTsAZKCntoT707ToYk+1N1/f/PVaqZr Z91LY8Al2g9jCsWzSfXckxlvaVxlSif8A4k+urchEJQUTxm9/3KJS3QoP8r6bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722453973; a=rsa-sha256; cv=none; b=IkH9TeKIoWtT/M45ZZpUR8zRh4TVWH6AIJ5xYluoWMishUUrj/BgWWWtwzlBhcQdrAV7d3 PtptrRJbvJkFXJBLj3/yyrXg4jiUKQc2Z1KWMRJvyJqLiBsKOz5cnVEd7iGT/5Xt3yApHH 8i8k8oGVTGW+k1+az3dSa3hcYY7tJzWpS6CQRaeSpiQmOWY5A7XCkL8vSXWOPOnGYsfrp4 peyTv1GwcpDbg202OmWLJKxyfDM9+1ySlSlrCV0WzlP4srL75yyc//7W5vzAdZ/5w37sKP FiQwICFQyYtvvylVCk9KA6GUcwmVU16WD8juMaxWPOW1dyf7+zPqzhRp8PycJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXtfsKjIAxDcwlA+aQmFkH9UMRvmoSb+EX6YpvDDGXE=; b=jvHLpqo57z7ssc0OVAz2luH8Kk1aTwRtf+FoKytnUp7rF0fJ152xss/v494eJw3npssV8+ E4Omj9HOLipwLd2FcMVeycTV6ktAuqPFoidWaQ+EnkQJM+V/cRSHacx3buFSlYvXno52It EA22ihftnExej0uueObovAsp7zAsFyy8V6LRO6+Zp0lCVOjkfewDFTgXAXdBGNAI7jcK/m /oJlQcnqLd4tFJFUXKzWGBdQS9PhuCT6O6dybMmgna6Iluj0gKjI0M5IQQGotlPxS/khyn hnTSrMtro4kKnDVaue2Cdi55j1SbIDZkk/+EKRMlTaVTLyuwWzTLkVyEVsE6/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WZ2Bs3z15z1Csw; Wed, 31 Jul 2024 19:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJQDCQ078014; Wed, 31 Jul 2024 19:26:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJQDd4078010; Wed, 31 Jul 2024 19:26:13 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:26:13 GMT Message-Id: <202407311926.46VJQDd4078010@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: 20cd6bbc1048 - main - ObsoleteFiles.inc: Remove dtrace/amd64/kinst test directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 20cd6bbc1048d985ac75667c23fcae5f5fe98001 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=20cd6bbc1048d985ac75667c23fcae5f5fe98001 commit 20cd6bbc1048d985ac75667c23fcae5f5fe98001 Author: John Baldwin AuthorDate: 2024-07-31 18:36:41 +0000 Commit: John Baldwin CommitDate: 2024-07-31 19:25:47 +0000 ObsoleteFiles.inc: Remove dtrace/amd64/kinst test directory Reported by: Mark Millard Fixes: 911f0260390e dtrace: move kinst tests to common --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index eeea036390d0..5a05bae7f4d2 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -1086,6 +1086,9 @@ OLD_FILES+=usr/include/machine/swi.h # 20230714: gsignal OLD_FILES+=usr/share/man/man9/gsignal.9.gz +# 20230704: kinst dtrace tests moved to common +OLD_DIRS+=usr/tests/cddl/usr.sbin/dtrace/amd64/kinst + # 20230626: Only install sys/dev/nvme/nvme.h to /usr/include OLD_FILES+=usr/include/dev/nvme/nvme_private.h From nobody Wed Jul 31 19:26:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2Bv3lJFz5RBq3; Wed, 31 Jul 2024 19:26:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2Bt5RPbz4TZp; Wed, 31 Jul 2024 19:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VkN3L8Q93cHeq4fIYfu4cW59gm0tJdp6miA1S0p6Cpw=; b=iB4FrVAh7h5a0DgP6V6TbYf8boihW+wSt6pMyU2/mVRQyUlJHqr0P8q+qkahXeFL36qrYa /uAbPlbUKutNRzm+ZgEobSVnZcCpQ1UNoicw2EpKl4micaYkAyw14o+meY4/QiaoYbWA1+ IKqIQZQ9681fkizpjgWyVWLgSRJ3gkFAuz5PPpjdWZFBW7Nbh4LlRDL9e7HstDXYOufjQa /29zi+DbysjCrv0IYFRuAuhIuSziHW7oBUQy2xtDzcn8LmljIYXv6oxMKjfUu0iZhp4rty cqk3MMJaIsPW1+H53ANKWdbOA/XazNFCHfer+v67X4Ufcq6PJgD1/7HJMET7tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722453974; a=rsa-sha256; cv=none; b=fElGJ+htN6oNQSXDPaucpUdIqFAU33gD08rIMM+/Ak1B1dEIbouatbJUBwL9KJGclnxCaN YZLzEz8YTYttZOZFbd+DKfuNkOjUC0Vsqh89u98R/oF47t1NxAqX2ah/FMnNVLogaQfrBm uveIjN1jcVmJDpnlWsGa8LzaGI+8IYnwmHwdum1FhmjpMMpJCo34SiKXC8bse2RVkqeXlx nQfDu2obNTXydu8RFu9NRSX8uTguYunUyjDFcYplpoSZlhuheWYamOwM6GogKjX3ePw2Sg b9pT+OQU3Gneqzpwqe7N6C1zP7t69R20HmhswEHQ2eeuHil5kpzp3+6lkPaWZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VkN3L8Q93cHeq4fIYfu4cW59gm0tJdp6miA1S0p6Cpw=; b=XuM7qAO+bOTdl2zGJ+qfCwXJOKiu8sXgtrCoU8TQ451SDrSSlDZNiOSfoQiG+q5EG3k7Y0 T6UQvXJ23WGZ6pne7J5DpRvAYtfEYAn8ciz3FUgkHnl4VBb1F/96OHny0LPcugBhl9PCOn QVsQ42Uy2KWZLwOf+ottadHw/DgB/Ygo9DRIoBJyDKer8Mq0FfAgXEaIieUkVfYUq5NQ+x csffaVfp/JmyuXnxaRMLqzg3/brF3fh9Zhzun6CyUFJkC3mgx2eaLmIITl7yzFIrSRxhOV 1JjaewtDbQi+VXQEt4QJvEAUeUzCk/oCoAHG/C/JwXkBthfeDvRMcnNXRqAdiA== 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 4WZ2Bt4ql6zDgj; Wed, 31 Jul 2024 19:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJQEb0078071; Wed, 31 Jul 2024 19:26:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJQEIc078068; Wed, 31 Jul 2024 19:26:14 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:26:14 GMT Message-Id: <202407311926.46VJQEIc078068@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: c04ef1bfb461 - main - ObsoleteFiles.inc: Add missing .gz suffix to various manpage entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: c04ef1bfb461a1c8d426b16532d85af5637727c9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c04ef1bfb461a1c8d426b16532d85af5637727c9 commit c04ef1bfb461a1c8d426b16532d85af5637727c9 Author: John Baldwin AuthorDate: 2024-07-31 18:48:24 +0000 Commit: John Baldwin CommitDate: 2024-07-31 19:25:51 +0000 ObsoleteFiles.inc: Add missing .gz suffix to various manpage entries Reported by: Mark Millard --- ObsoleteFiles.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 5a05bae7f4d2..01e612bfaf66 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -581,7 +581,7 @@ OLD_FILES+=usr/share/certs/trusted/Security_Communication_Root_CA.pem OLD_FILES+=usr/share/man/man9/callout_async_drain.9.gz # 20240114: Removal of geom_map(4) -OLD_FILES+=usr/share/man/man4/geom_map.4 +OLD_FILES+=usr/share/man/man4/geom_map.4.gz # 20240112: remove pmap_init2() OLD_FILES+=usr/share/man/man9/pmap_init2.9.gz @@ -1060,9 +1060,9 @@ OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers_test OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-linked-ptr-test # 20230807: Removal of the ath(4) AHB bus-frontend for MIPS -OLD_FILES+=usr/share/man/man4/ath_ahb.4 -OLD_FILES+=usr/share/man/man4/ath_pci.4 -OLD_FILES+=usr/share/man/man4/if_ath_pci.4 +OLD_FILES+=usr/share/man/man4/ath_ahb.4.gz +OLD_FILES+=usr/share/man/man4/ath_pci.4.gz +OLD_FILES+=usr/share/man/man4/if_ath_pci.4.gz # 20230803: Removal of support for cloning pseudo interfaces from iflib(9) OLD_FILES+=usr/include/net/iflib_private.h @@ -2096,8 +2096,8 @@ OLD_FILES+=usr/include/netinet/tcp_debug.h # 20221213: remove sync serial drivers and utilities OLD_FILES+=sbin/sconfig -OLD_FILES+=usr/share/man/man4/ce.4 -OLD_FILES+=usr/share/man/man4/cp.4 +OLD_FILES+=usr/share/man/man4/ce.4.gz +OLD_FILES+=usr/share/man/man4/cp.4.gz OLD_FILES+=usr/share/man/man8/sconfig.8.gz # 20221202: remove trpt(8) @@ -12541,8 +12541,8 @@ OLD_DIRS+=usr/lib/clang/3.9.1/lib OLD_DIRS+=usr/lib/clang/3.9.1 # 20170226: SVR4 compatibility removed .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/streams.4 -OLD_FILES+=usr/share/man/man4/svr4.4 +OLD_FILES+=usr/share/man/man4/streams.4.gz +OLD_FILES+=usr/share/man/man4/svr4.4.gz .endif # 20170219: OpenPAM RADULA upgrade removed the libpam tests OLD_FILES+=usr/tests/lib/libpam/Kyuafile From nobody Wed Jul 31 19:26:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2Bw3jP2z5RCGW; Wed, 31 Jul 2024 19:26: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2Bw0MbWz4Tj6; Wed, 31 Jul 2024 19:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ZQs+XHXMwFEu1ekNILXQN1UK4qIT8GAJrmAwi2ujXM=; b=SkUmfAUEBjBTashnPU9OJx7m8+21FnqNgnVk5sP/SCP9sgMwsGaP033NDsGsDno6ZGKCTG jcDSX014L+iMpTX6ijgnLyzszVUnE6c0fy3ZdzaweugLLadUILyaUW3zX+fbaEiHLBvodU /rbGeGAgj1FFSMV9+Kc9LMt9RE0vgzCdOsmG3AnjsEFJfC3i3UyhpZ9Bz2a9w5ib57hO48 9jM0Ccha2UBX4tg/yQzEK5gTSioBSDxqF/NMVgtTYFvXSxpy9/PPP89lnWo007KmHAopf5 3yY2KS6hfsffsWzpwD9Tp1lQQtAHZELEr9FW31o3sSoy3zntjxPvo6UclE8GMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722453976; a=rsa-sha256; cv=none; b=MRgUhGdZu42yq7oPwvfxOaqOROZzl7sjsD27s9HZbvZgFuURD//LnkJT1Sr2/CrKhhp8fn MamQxxewAfhIbC/HYSUbEjVlPBfhcWqMKa4gV3a42UWCV6p/Pf9DgpjFn00S8V5F1oG1S8 V0wgcpFfMFCHRGz53Yz6kqUnvaMUvSkn5+AyhjwO8ZrbrYiTEOnICwXIEAdiTAWczToUuG nRZ0OTFJV5BzuB2TG0CyEjmQhnutVFLjKsZ1+h2aOo5PeAkXHlCRLV6T/aiDm7JlOTnaJ2 D4e4YwYIFU3qrVjbXc9NLRF/tLNm2zL5kYhNofwvCfukl9UiVjl6lDcxdSayJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ZQs+XHXMwFEu1ekNILXQN1UK4qIT8GAJrmAwi2ujXM=; b=dfpTvRWS5na5jTuecTh4tklcfYleIGcCZRE+iDbdkaB23bzXCAdgoCXVmUUa6EY6oMwecx GS5WWU4IO8FE1OeqzKCWRSLsxEVC1RowHieFb45n90vNu5My2SsLq29LRv7XsBRpZsO8tm KCiksbRWnJRDd953UxEx2r6qg8vcxuqoPvFpJ2c7gp5//blCXcpvZxPqgSgXIp+yR9Q9vA oj0thKN4zxe/gfrXofHDiocroQ0Oery3pJ3BxLMmTtA8q+pHDNp7HICX5i8AP38+V7ztB+ 9S2LRPQFxKCTur0qiuIh+lvpHMuM4mVhxkmCIWuCT6DjZo1Lb7PoYmt/47I7mQ== 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 4WZ2Bv69HXz1Cr0; Wed, 31 Jul 2024 19:26:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJQF0I078109; Wed, 31 Jul 2024 19:26:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJQFxZ078106; Wed, 31 Jul 2024 19:26:15 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:26:15 GMT Message-Id: <202407311926.46VJQFxZ078106@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: a4b248b883cc - main - ObsoleteFiles.inc: Remove usr/share/examples/IPv6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a4b248b883cc2ade1a394a21ad108b851b4d454c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a4b248b883cc2ade1a394a21ad108b851b4d454c commit a4b248b883cc2ade1a394a21ad108b851b4d454c Author: John Baldwin AuthorDate: 2024-07-31 19:00:11 +0000 Commit: John Baldwin CommitDate: 2024-07-31 19:25:55 +0000 ObsoleteFiles.inc: Remove usr/share/examples/IPv6 Reported by: Mark Millard Fixes: 4339f1e667ff share/examples/IPv6/USAGE: remove --- ObsoleteFiles.inc | 4 ++++ etc/mtree/BSD.usr.dist | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 01e612bfaf66..d1851d2d5d33 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -577,6 +577,10 @@ OLD_FILES+=usr/tests/usr.bin/awk/bugs-fixed/system-status.ok2 # 20240211: caroot bundle updated OLD_FILES+=usr/share/certs/trusted/Security_Communication_Root_CA.pem +# 20240202: remove obsolete share/examples/IPv6/USAGE +OLD_FILES+=usr/share/examples/IPv6/USAGE +OLD_DIRS+=usr/share/examples/IPv6 + # 20240122: callout_async_drain() removed OLD_FILES+=usr/share/man/man9/callout_async_drain.9.gz diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 193184c3a134..13541aac1dd4 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -254,8 +254,6 @@ .. FreeBSD_version .. - IPv6 - .. bhyve .. bootforth From nobody Wed Jul 31 19:26:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2Bx3QJQz5RC2c; Wed, 31 Jul 2024 19:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2Bx0dpsz4TbM; Wed, 31 Jul 2024 19:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nM8iE2df+A8APBNHdlxQ4wHfkoK10s63Ao0e9bjA1dQ=; b=Xxmn8OlxGSChQNngt6A7E5/eRZicox+XHPOpmz7hxMEUs0BJUHiQghJ0ES4vunW/nNO3DF udqRi9vQJayDyOYWBHITq4iCrfETnZSck74R26uWGfIS136E5Tl3jwPB0Bim+76Cg9VYSc RUja5S1y6NyyQ79fBpRBfwLBW3aXkB3aOzDLJw1AwGqhaKo64AxrqBFHDaeIn9PLixMoF7 S3/CdGf/30JIqMBGpSLV97LoO6t8TO+aEcEpuTsX5yJEie0GWdf6NYG5Cq0K06aqgNI+5V CBf9tHiA4efsxP8Aytnnm6lekNqvj3lSm9lp4ygXLXgjfan6s48WgaJkmvVv2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722453977; a=rsa-sha256; cv=none; b=cr03Ah9ByoyecsnUXrTvYW26QDOWyvNpkWmT8YA2WAUnNwHDaV68vdaKWeXXQVaurR4nn2 TrmzUmsTb91ax07eOfgVR3M/H7ZR0raTDKt6MyRmdMRUzWMTT2D96nkUW3TgclllGNwaRw knufPRIc2zeLJ5TpKPgaBvog3fkyqskbU0kkt6+eRiqRBAG3yR0qEayq3sNGpJPrZMvxPn 5OZKVKbNYIWUGNRq1LX8m0f4o7mru+pjIhkxt0LN0f9L3rgK95XWDuOcZ2nSGpxkMWRmkH TO/y1qvhIbeFaTzI+4Ie1EfQ1J+9vP2KGKhWo6vj6MLUBvTzhCIgyr8IvZ+Lww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722453977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nM8iE2df+A8APBNHdlxQ4wHfkoK10s63Ao0e9bjA1dQ=; b=NGaAiofRcHA/eODugWZ/tuoahcAf8/pm8HxDtZ4RAyaW8XyPu9676R8C5ijTZ03jJWnfm4 Uo9EhP9BeKd3YFOOuQ+Jt6tJoIyT6xAQGWNjjYeX0VysCzPrakUh2xbUxYyZp/e3y54aGQ lidtRgM4Q4Qk5ATW6Y8b6LUZsDVEOynyr6bQnzSTEG2Hi7siOv2v0hhrIj8BtlyCryNg37 ktMFszTbvStj3ii9IP+eQSGRuLDC5D1A1fm0p/vXvsNez73vAmyjM2x1SpidpFP2F6b87z W+Qo9w0GxmnvOK0pkWWsXwUjRK8yaMdCCvWqWLHjx/5j7rzyEC1AdGP9PYX8nA== 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 4WZ2Bx0F2Jz1Cbk; Wed, 31 Jul 2024 19:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJQGFM078158; Wed, 31 Jul 2024 19:26:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJQGlQ078154; Wed, 31 Jul 2024 19:26:16 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:26:16 GMT Message-Id: <202407311926.46VJQGlQ078154@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: 09ed116dc5b8 - main - ObsoleteFiles.inc: Don't remove recently added mixer(8) tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 09ed116dc5b84e6b3478b42e5b1076604e92f676 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=09ed116dc5b84e6b3478b42e5b1076604e92f676 commit 09ed116dc5b84e6b3478b42e5b1076604e92f676 Author: John Baldwin AuthorDate: 2024-07-31 19:09:19 +0000 Commit: John Baldwin CommitDate: 2024-07-31 19:26:00 +0000 ObsoleteFiles.inc: Don't remove recently added mixer(8) tests An earlier set of mixer(8) tests were removed leading to this entry, but now the entry is removing the new tests. Fixes: 94a86f3f6920 mixer(8): Add tests --- ObsoleteFiles.inc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index d1851d2d5d33..f6984b49711c 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -3737,11 +3737,6 @@ OLD_FILES+=usr/share/man/man4/ng_h4.4.gz # 20210923: rename boot(9) to kern_reboot(9) OLD_FILES+=usr/share/man/man9/boot.9.gz -# 20210922: Old mixer(8) tests removed -OLD_FILES+=usr/tests/usr.sbin/mixer/Kyuafile -OLD_FILES+=usr/tests/usr.sbin/mixer/mixer_test -OLD_DIRS+=usr/tests/usr.sbin/mixer - # 20210921: remove cloudabi OLD_FILES+=usr/share/man/man4/cloudabi.4.gz OLD_FILES+=usr/share/man/man4/cloudabi32.4.gz From nobody Wed Jul 31 19:32:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2LC2dBwz5RCmq; Wed, 31 Jul 2024 19:32: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2LC1VQtz4YcL; Wed, 31 Jul 2024 19:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x5i8KBncIEmE/l90EXR+BxvKKHwR959hLVdDbCw8vMk=; b=DZ78Luz4XPghRkBNORm70TE6FRL5m7/ed23V24BPGgZb9MaANNFcGLVyhqYqrGXqJCG2KQ vLKewVadE6ooBJb8UtGGR8/Jc3euypgP95yyj+zFUJA+2FUG3J1YDryFk/h26AXvnFdJPv dZYtR2akfdg2fWm6RcW6XGRmFanosmMMnyIis5J0RNG7E3qLOkt4qymc3QVHH3/z4g0ZvD aeXvVrA/1+TCTo7yAOQGC5xEa4TIza+7DsOYBIUh9drkOdY2YxT+EUV6JL6c9hM9p7aRVQ M+FXwPFrJNOz5NCSSWSBa+jTWv2EvVwmarFSS95HNE5a20gaRZn+AM6iLRWldw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722454355; a=rsa-sha256; cv=none; b=jOs/xcAaPZDZ1Kc7qaNuwyKc5w4mYUdSCEgrexxiU3QsgnCOXBw7itEfzMfUC17dLFZZZo fu2Au0QLZGSwTErxgt+6xr20Qn+1zqDffyNsODXG3hSnHgoIuAoAh7q0Z5ZS8ldejrz2F+ l5q5bXd5Vdpx8l/svCO9n2GhGh5q6wg3YNp0h1k0/Nrvi68174424w1l2oVeszBAfOjjC5 kxnJI+CaWB8VcQ+gGaQ0R7kudmxP00V4FVcXX2qCS08joXuaZhCqbPNOPzIRt06ntISaQH RPLKphujeF96a+8eZxmmG6mdwazKMO+Yu1prejeHBFvyFetEbxOnGP4ZMwPs/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=1722454355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x5i8KBncIEmE/l90EXR+BxvKKHwR959hLVdDbCw8vMk=; b=MF8dXQoN9WdN+q1OXNPNXXcloUjff6qySy7iQL8h/dftvWlpq+XmkmlwMWX8sn1jxDVIcS 2RfQpyGgOSaBWHp8FxiXYA96/1NsUH7WmrHSLQIZ2aCB8ukTSrdQbwPPwiZHdlQUXGgl1J XU/Nd8Bz1KUJZvlK7En+IWy9ExdFAUr0mkWxXrWtHqq8CCeSEc/Ru81TymeEzyZg6+sALm UDC3si/+t0OWTttfI/2oi+YgwJlizP3gky4P9SDpiK/cQjFULDbyiMxyxBfobA+kRRH+PR H+Enu7mYlM8vm733z/u9lEZ5kA3Zgqw6wjSX6ZiuV48GDSRhHguWFGOPjoviaw== 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 4WZ2LC16MpzDss; Wed, 31 Jul 2024 19:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJWZ5X094473; Wed, 31 Jul 2024 19:32:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJWZxj094470; Wed, 31 Jul 2024 19:32:35 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:32:35 GMT Message-Id: <202407311932.46VJWZxj094470@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: 1d5a5500ad4b - main - Fix enum warning in keyserv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1d5a5500ad4b1f5187f40baaf58ab6868b18fc08 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1d5a5500ad4b1f5187f40baaf58ab6868b18fc08 commit 1d5a5500ad4b1f5187f40baaf58ab6868b18fc08 Author: Dimitry Andric AuthorDate: 2024-07-30 22:35:03 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 19:28:42 +0000 Fix enum warning in keyserv This fixes a clang 19 warning: usr.sbin/keyserv/crypt_server.c:237:53: error: comparison of different enumeration types ('des_mode' (aka 'enum des_mode') and 'enum desmode') [-Werror,-Wenum-compare] 237 | if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { | ~~~~~~~~~~~~~~ ^ ~~~ The type of `argp->des_mode` (aka `desargs::des_mode`) is `enum des_mode` from `/usr/include/rpcsvc/crypt.h`, not `enum desmode` from `/usr/include/rpc/des.h` (which is used in `struct desparams`). Luckily the integer values of `enum desmode`'s `CBC` and `ECB` are identical to those of `enum des_mode`'s `CBC_DES` and `ECB_DES`, so replace both values. MFC after: 3 days --- usr.sbin/keyserv/crypt_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c index 99ce8b8bf1af..28e60b31c5c1 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -234,9 +234,9 @@ des_crypt_1_svc(desargs *argp, struct svc_req *rqstp) * getting ECB mode. */ #ifdef BROKEN_DES - if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { + if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC_DES) { #else - if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB) { + if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB_DES) { #endif int i; char *dptr; From nobody Wed Jul 31 19:32:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2LD5Ps0z5RD0C; Wed, 31 Jul 2024 19:32: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2LD2CH1z4YcR; Wed, 31 Jul 2024 19:32:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8wmd5mMbUNNyAzxrp+6XysDFpUvmOAnYNWTCA9HuNtQ=; b=mCh5qsLTJAdwd1X28Ds57LX19rPZKmHPU1KWcwKWs3OP1MwNYAUq3ENsHolnoqRZQKCM21 QV/pw7z0eyXV4zjyQOa+alG2HWajZgaCQp/G+5ynOMkWnl926CJEHICgQBLXL5eVfmH/hx MwrUEBF21/hPZGLNOVTDnwP6Gd2xXjvzSeLMJQ4YmgaIoH7YiebNlTX4l8EzfWPQ/WRErV 8TNxKeWkVMl1uKA4MzCWivz1f9Jvu/8EHtAFGl+tHssfPsjQsSbSeFNxK2Be8VyZsOGxcY 5k8hlCWW/RO7r9TV47+fWX4R7F2BAr45EaRZ0p4VLHyhyetTt2PuMWyzjd3lsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722454356; a=rsa-sha256; cv=none; b=VFR8Ii1Xfa63wdsoMeSbJsmtrx839HHIq6A4vCzRZ831bRUXsJrYAF75B47Zz5Vaxw5yHl ONBzdm9wSZFkg+SniKdngoKXH+bpOB+LVYMoMN5M5snKPwgbKucDRhpVprpaK7sZR6U+I7 sN95PUonGQoNAKTnIhw/F/Q12zWRoqi3pdIHVccUa0u8PUsleeFo8+cadEavwhEEJt+BAE SrJVZQI4g8RRLoSEFSiSbTdBqQ3bWC6QPlIY+YErraCNCrwM4lnkNM1+JeVR71Z0jeKEc9 mQJQDlS/ren8GNJp6R03MZm1jkMiZizMXtBnIZi9fedMIbHYRayUZQspb0hHfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8wmd5mMbUNNyAzxrp+6XysDFpUvmOAnYNWTCA9HuNtQ=; b=AFM4Cuxg6DPsnVdAVX/GNxPAccU+Q6VglgeyXfurMxjj1bf+LCvJ91O01JUjs2O+C5+SLk SGP9ryDl1HLlA/wyd4wQphB6gc7dhyHcfIT37d3YgvHu8n3qDkfGpleALi68zOuF7vEk+c eKeaKpT3rILEqYWg8Wi9wUCBsdLcgZaypZj4k7+Y7tozmISbvscnUFPBcdsvLqAHw7Vzq+ NjGgO19/w+/625l3YWuChf3gBTQ0dFSbss1uyoKsq1y+EsOwJEgO3WLNmyaVeI1eA/f78P lMGmgsZZLrMyb9GLjJxj18tqD0ZcI0+/5CehlUGPLLp65fmnA8wED8ZhZqTjnA== 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 4WZ2LD1pkjz1Crj; Wed, 31 Jul 2024 19:32:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJWat0094544; Wed, 31 Jul 2024 19:32:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJWa6G094541; Wed, 31 Jul 2024 19:32:36 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:32:36 GMT Message-Id: <202407311932.46VJWa6G094541@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: 8ce3e489a5ee - main - Fix incorrect -I option in sys/conf/Makefile.arm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8ce3e489a5eec1b41bc5e08f43c5e95aa8115b93 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8ce3e489a5eec1b41bc5e08f43c5e95aa8115b93 commit 8ce3e489a5eec1b41bc5e08f43c5e95aa8115b93 Author: Dimitry Andric AuthorDate: 2024-07-31 19:23:41 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 19:31:21 +0000 Fix incorrect -I option in sys/conf/Makefile.arm In commit 8e53cd7099436 the intent was to add sys/dts/include to the compiler include path, but this was spelled incorrectly, leading to an error with clang 19: cc: error: no such include directory: '$/dts/include' [-Werror,-Wmissing-include-dirs] Use the spelling -I$S/dts/include instead. MFC after: 3 days --- sys/conf/Makefile.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index 36c412cfbb12..5416aff76666 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -27,7 +27,7 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include -I$$/dts/include +INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include -I$S/dts/include LINUX_DTS_VERSION!= awk '/freebsd,dts-version/ { sub(/;$$/,"", $$NF); print $$NF }' $S/dts/freebsd-compatible.dts CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" From nobody Wed Jul 31 19:32:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2LF6BPJz5RD2j; Wed, 31 Jul 2024 19:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2LF3DMwz4YrS; Wed, 31 Jul 2024 19:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ii39Mgbq/+hOqPJUixbAUBo7be7a3tmrpJ0D/c3Hrrg=; b=Hph2/2/++0DyKxctJXmTV7eqNKqaUOxPtswW90N+TA5c4DkMY/CfAYYffrAYYC84cBG8cY 8xnd5oh5DIrj1YIvBEJtWc8AD5H61W3aqYmuRYUAgnsKoq67NrCKqaCxaYtOYkcEyAPqus SrIVZApoVdz6a/67actBk13ztixt/72MKnO5zVjPiJR4OocrAmmDpziF9y0L6o3vu2j9Xk nOwLKB05/vaFPVic1nPtphoY9OsKIuaX+cHQyjqbVJezT/BfwHG63m4Z/mkCXhjxMP+vCE 6bcuyGar9AmHjKz6R5NDPW+T+f+A8GjGbNlBv74LoVDdvMXdEzgCwgh69FJaPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722454357; a=rsa-sha256; cv=none; b=Yz+i6SPRQraZYrRZQDE8Tis9T6le3hMVTpQ8KIS5pOfdnqpJqBGYQ6oWrgDETxyMOhPlz8 V16RfjoCMCl9Bryerk3DtF2A0TAZVdLRfygxXM+Gmw+IR9TYQ5GOhOPMmBCLs0NMT5QTqT yOaSk5NN3HjgDriN5LMSKOsfMjGpWzsvpdxeIfVGSmgqKWVdpQkBixAsOlfFpEWHgxsQhq IjanXXW9GKLhSmzbRdlw+hiufbZ7HA2zpe8QgMPloTzlqWuAx0Y76rBVjW8oSInt/KOXII WLYJvMy4MIvGarWzUTCJM62/o/evW49jRZUwcbZcc67wN8svUro+NQEDNP8Gag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ii39Mgbq/+hOqPJUixbAUBo7be7a3tmrpJ0D/c3Hrrg=; b=d3TnkgMx7v3z+Nkhz2WoO84X9pYiutkllZweGNTFPM99lQF0xPRYRV6oJ5y6f8+4FFraWx mA6Ck+moFhTq4FYsy6P4OiRhd1KUjLjhJhOVZXVaCa9/Aq1a98YGGl/EsprB+cOOWMeo+l S64OterUWKxNafT7crstr+xmsqm/4zhQH5+iWRfDUxEIAlbyPASIUpK7qXuNSM3uI7WhZ7 re8mlPfbt8XLE3KEWt97iQIUbQmYffgzXCa4dP/aCg9ltW7poQb/rwff4mGjH/UAjIHSwc eTa6DceHNCmpWad13j6zkWlQUIyDdz1BfZdx3fvq8ewjIdY6cyHQfmUGMCPo2w== 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 4WZ2LF2rPczDgL; Wed, 31 Jul 2024 19:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJWb7W094593; Wed, 31 Jul 2024 19:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJWbbC094590; Wed, 31 Jul 2024 19:32:37 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:32:37 GMT Message-Id: <202407311932.46VJWbbC094590@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: 67be1e195acf - main - Fix enum warning in iavf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 67be1e195acfaec99ce4fffeb17111ce085755f7 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=67be1e195acfaec99ce4fffeb17111ce085755f7 commit 67be1e195acfaec99ce4fffeb17111ce085755f7 Author: Dimitry Andric AuthorDate: 2024-07-31 11:01:20 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 19:31:46 +0000 Fix enum warning in iavf This fixes a clang 19 warning: sys/dev/iavf/iavf_lib.c:514:39: error: comparison of different enumeration types ('enum virtchnl_vsi_type' and 'enum iavf_vsi_type') [-Werror,-Wenum-compare] 514 | if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ The `vsi_type` field of `struct virtchnl_vsi_resource` is of type `enum virtchnl_vsi_type`, not `enum iavf_vsi_type`. In this case, we can seamlessly replace the value with `VIRTCHNL_VSI_SRIOV`, which is numerically equal to `IAVF_VSI_SRIOV`. MFC after: 3 days --- sys/dev/iavf/iavf_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iavf/iavf_lib.c b/sys/dev/iavf/iavf_lib.c index 883a722b3a03..f80e3765448f 100644 --- a/sys/dev/iavf/iavf_lib.c +++ b/sys/dev/iavf/iavf_lib.c @@ -511,7 +511,7 @@ iavf_get_vsi_res_from_vf_res(struct iavf_sc *sc) for (int i = 0; i < sc->vf_res->num_vsis; i++) { /* XXX: We only use the first VSI we find */ - if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV) + if (sc->vf_res->vsi_res[i].vsi_type == VIRTCHNL_VSI_SRIOV) sc->vsi_res = &sc->vf_res->vsi_res[i]; } if (!sc->vsi_res) { From nobody Wed Jul 31 19:32:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2LG6shYz5RD4g; Wed, 31 Jul 2024 19:32:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2LG4Hwtz4YkB; Wed, 31 Jul 2024 19:32:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4GBfYjH0KGWs5hy9VBwvTx/kIbyJcdTnd4y0FjCeyg=; b=IAD/N+rE5x3VRTWaBPT7Fqk/4g5njQzkUbbOJsmne+24mm7pKrLIoAkvPd1FWzdBJXDCa8 2AdaoJNjNXab8jQ1Lm3REK0DBqe4bgnqxW+NxsPeiCuRht4tz8Ehw8Ho6qx5/fVwq7r/B4 mGlw1toMgXkSXbe9iQfYGa0GQp7bzIOKqBQ05GZyh2ROhih/rue4s6Tqv7MVwUBDGLTZT7 zGDiH1PoCHLp+yXkkNDl8ixAah746hC1w6wdfry2qkjk31nyyZIBXKZzPJ+L/PSYeOBP+2 s8x/mYjUKDrVSfJgGlNrOzCy1BiqdArN4OGMNLX/fmcb6QBwHJ/+K6E4vMHY/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722454358; a=rsa-sha256; cv=none; b=BTGTmKdBR8VX/qlEQoxj5HKrfHnZ/N9SfL+XKUzwsfP4ycweNQLEmemxVF9ny3r6TQ+yOf lZ5qH/FLhfWpupaBsTlw/2HikI2yy0xIjXprJk5T7hh3idSJg9I8FZ+Cc7HD8Vsk5bZcgc CmoGYMYXLwJsjmc0w8RRTGFADiWIVJYb0CpBJgBndd6B2LEWmuoVvGUTOi4VB7dJBJj8yJ SGZ4lBHCIlx/Lx58Scl82COLoE3AxGp1+PRCn76euXc22hKDa9kd3Wyu/QJzWh/d2YUxXl 25cVdvMlhWCBhpMdfoscj1X5h6yjO0S473LRb7uAe6jLq75gfCwfwip/cRgnOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4GBfYjH0KGWs5hy9VBwvTx/kIbyJcdTnd4y0FjCeyg=; b=LXE9YMAwLizuMxM00Zk5+zXFuDacmSiFSmF9/ViBCJm+nnV2SVSEXGf+6O8nVUsKJnNlhV jS3QE1OPWM6VuCvqeYxs36ib1pOSF8UhD9yIpjaryTO8mdu3i70cPndjnXrljg5NuINauu nsyCA6mpQ2SEY//kbkC5AtTy04sHnLaRT2c5FnbFV+nZOmJ3zSKU4StjFhYXhKBzuOWAVQ NmpRerNEvYeuhsCgla8w5IhvaSaP5f9is2RlVul6Z3tWCm0kUuzPWA5sY43SSnbAn9J5QI +obBvZA3FnrdEADeS1ya4r6UmmE7ZnEPJbGcTRssljY+UCVFVesstNxoZaJ9Qw== 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 4WZ2LG3pW0zDhb; Wed, 31 Jul 2024 19:32:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJWcej094637; Wed, 31 Jul 2024 19:32:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJWc0K094634; Wed, 31 Jul 2024 19:32:38 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:32:38 GMT Message-Id: <202407311932.46VJWc0K094634@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: 1bd66fac35ec - main - Fix enum warning in isci List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1bd66fac35ec27fa64d6158f82fdcbdc26098679 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1bd66fac35ec27fa64d6158f82fdcbdc26098679 commit 1bd66fac35ec27fa64d6158f82fdcbdc26098679 Author: Dimitry Andric AuthorDate: 2024-07-31 11:14:17 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 19:31:50 +0000 Fix enum warning in isci This fixes a clang 19 warning: sys/dev/isci/scil/scif_sas_smp_remote_device.c:197:26: error: comparison of different enumeration types ('SCI_IO_STATUS' (aka 'enum _SCI_IO_STATUS') and 'enum _SCI_STATUS') [-Werror,-Wenum-compare] 197 | if (completion_status == SCI_FAILURE_RETRY_REQUIRED) | ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ The `completion_status` variable is of type `SCI_IO_STATUS`, not `SCI_STATUS`. In this case, we can seamlessly replace the value with `SCI_IO_FAILURE_RETRY_REQUIRED`, which is numerically equal to `SCI_FAILURE_RETRY_REQUIRED`. MFC after: 3 days --- sys/dev/isci/scil/scif_sas_smp_remote_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/scif_sas_smp_remote_device.c b/sys/dev/isci/scil/scif_sas_smp_remote_device.c index d6055adc13f9..c72402f66889 100644 --- a/sys/dev/isci/scil/scif_sas_smp_remote_device.c +++ b/sys/dev/isci/scil/scif_sas_smp_remote_device.c @@ -194,7 +194,7 @@ SCI_STATUS scif_sas_smp_remote_device_decode_smp_response( //if Core set the status of this io to be RETRY_REQUIRED, we should //retry the IO without even decode the response. - if (completion_status == SCI_FAILURE_RETRY_REQUIRED) + if (completion_status == SCI_IO_FAILURE_RETRY_REQUIRED) { scif_sas_smp_remote_device_continue_current_activity( fw_device, fw_request, SCI_FAILURE_RETRY_REQUIRED From nobody Wed Jul 31 19:32:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ2LJ1Zmrz5RD4h; Wed, 31 Jul 2024 19:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ2LH5WrJz4Ypv; Wed, 31 Jul 2024 19:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t94iEYGTlEAZek0OyefcwWr3WxkdDCULGqmUdOmQVaM=; b=JmtJKzY9ztbCyRmwDyyUTKKa6dZaJqDzqSa1IU9KqBJs3ByklubDUmFuaV3mC5z1CDKWFG XGC6iw2rnOCmAftLJ8Bmzff7BSKDMI5VsOhp8XI46pHkSRzYTwFfPfqPCd4zb7T4Fy/NJZ DNAQAeGWb5JuQoj2ViJE6d3f6AeIildkVRkqGbAH7dJBsdUuAyavjnHVv0Xq7LBFCF2++Y xa2lYUyT+EHf17BmDBz4dvVVcaZ2IBKBQCqvy3x0XUPLIwBOdYHtoEi3NB/DnXo6YAslOd unP+bikh08WhZkn2j0n2/LCMm3r20+fBvL4Wp9zmdHx6XERrK5tdiIT2lERGig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722454359; a=rsa-sha256; cv=none; b=on0NqO10dIkpHm06AE8uzonWCrCKKOUcdlRjigI4qwz2VRGCBDciPbQnORxZ93Mw1FRcED XaHevrnHnAlO+rRqb+KtCHXukgngC3ExAGsxgrLTbpE3H4B/OaTennDoQGBIEgJke5Q23+ /q4RnGISKsBptVUrTeNGvF99j2VGawg5MbCaIuGhDCJKCXF/3GtiYir/3HhN/sB5UoAdNd XO9X30CsKYRlGd8av++gTqAZI0maEl8tq7076ABs/aXteCJ3M4uMJ4G6Da/LwpOfl0+7Rd Gjp6QWgv7yQdev8crWMyT95OEMbhth/zAG4oIHdpPkf5civ9G3+xmvau08m86w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t94iEYGTlEAZek0OyefcwWr3WxkdDCULGqmUdOmQVaM=; b=vSzG+VIWqk7tWi5IHHoOErkQ9Er9U1F5wg7ieomZqrKtPifMFU74ttCHZC4vo6viHDWhVL npjBqcKjCbie/cuUGmSQ5XGQUVIyza4a0Nv6/O7ywx1gwhYCXehhZyM/itVJ0cJI0lWGsT pCbCyhWQZBB83qGiCkIfYqGe4JNxe5Qt96QoxgQ7FjHQxQqhvRK/XkhSfOaveN2WxJ7k3E xThbBRapNKP4bxWEPiUEsAZLRWdwTviFqliZMSvGNLZHaL95VWDNNdisYMnswGjYgwGmpN /+9br/O11PNJgPHYMmtD31Jd1MGrROjKCXv4X5SjU/B+STeAsrxMWmLlDG+6bA== 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 4WZ2LH4nZSzDst; Wed, 31 Jul 2024 19:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VJWdRU094681; Wed, 31 Jul 2024 19:32:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJWdeC094678; Wed, 31 Jul 2024 19:32:39 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:32:39 GMT Message-Id: <202407311932.46VJWdeC094678@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: 357378bbdedf - main - Fix enum warnings in qat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 357378bbdedf24ce2b90e9bd831af4a9db3ec70a Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=357378bbdedf24ce2b90e9bd831af4a9db3ec70a commit 357378bbdedf24ce2b90e9bd831af4a9db3ec70a Author: Dimitry Andric AuthorDate: 2024-07-31 12:21:25 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 19:31:55 +0000 Fix enum warnings in qat This fixes a number of clang 19 warnings: sys/dev/qat/qat_api/common/compression/dc_session.c:154:15: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare] 154 | if (CPA_TRUE == pService->comp_device_data.enableDmm) { | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/dev/qat/qat_api/common/compression/dc_session.c:285:17: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare] 285 | (CPA_TRUE == pService->comp_device_data.enableDmm) ? | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `enableDmm` field of variable `comp_device_data` is of type `icp_qat_hw_compression_delayed_match_t`, not `CpaBoolean`. In this case, we can seamlessly replace the value with `ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED`, which is numerically equal to `CPA_TRUE`. MFC after: 3 days --- sys/dev/qat/qat_api/common/compression/dc_session.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/qat/qat_api/common/compression/dc_session.c b/sys/dev/qat/qat_api/common/compression/dc_session.c index c92d6eebdc47..60f4410dac32 100644 --- a/sys/dev/qat/qat_api/common/compression/dc_session.c +++ b/sys/dev/qat/qat_api/common/compression/dc_session.c @@ -151,7 +151,8 @@ dcCompHwBlockPopulate(sal_compression_service_t *pService, } /* Set delay match mode */ - if (CPA_TRUE == pService->comp_device_data.enableDmm) { + if (ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED == + pService->comp_device_data.enableDmm) { dmm = ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED; } else { dmm = ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_DISABLED; @@ -282,7 +283,8 @@ dcCompHwBlockPopulateGen4(sal_compression_service_t *pService, hw_comp_lower_csr.hash_update = ICP_QAT_HW_COMP_20_SKIP_HASH_UPDATE_DONT_ALLOW; hw_comp_lower_csr.edmm = - (CPA_TRUE == pService->comp_device_data.enableDmm) ? + (ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED == + pService->comp_device_data.enableDmm) ? ICP_QAT_HW_COMP_20_EXTENDED_DELAY_MATCH_MODE_EDMM_ENABLED : ICP_QAT_HW_COMP_20_EXTENDED_DELAY_MATCH_MODE_EDMM_DISABLED; From nobody Wed Jul 31 20:35:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ3km4qDzz5RJdR; Wed, 31 Jul 2024 20:35:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ3km4JGGz4gsK; Wed, 31 Jul 2024 20:35:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722458128; h=from:from:reply-to:subject: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=Z+EPQOWkasEEDB1UxPXXHcubr+1b5AG9g8yp9bLpBKU=; b=jwTacciJDhnfwX91/i3nYnPTBDxh97HsHbWkhK+3pDVwsSEiB7Opz5GHNBNNjXe5O8LwpG w4X848k9aTXajCBSCL47vhc4jHCbqVxjBHfh9faa9+yuNNeaGVD2yCRyLwtUK35HSVDLMZ a0HtyHxiSxFPiS0TdDni1hgmnwXQubZi0cisaLZHcwLRgAZ0HB3wCYNByUWK3aRWJPm4eI YvGvGPXIOv7K2c2nvAtXhYGuZ5fuiqeIKZE0TwdoXNwIg2PiuShIpEyASGsZvbKPNkbRLu ErbFKIxt9qxZh1EoMU0E26Hhjbp+BVCqkxXR+OIss2xrw25lZt6G5YHlkdB0Hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722458128; a=rsa-sha256; cv=none; b=F/jaegXQXNJOU2Fjv8gqET4bO4MRq7VDMP2KWrHxqsm83sYllWFFZUJFMSKpjpMKlLBsEL P/HcKDsh3OowrUKGQD7ofOo2p0a6A9xnfT72jwED+nUejN10B3MPimMRFTRM9ED0ZeahzA sGkL03BEWAPWc8gHbs0Cf+5c+ray/71fOy2GnHHrDkUW1cCRQTSajgkk+y9LfnNBMprlxh 0KXG0Sh/rtEYVM4L2zYUaUfWeEq5yEFsAya+eA0Nn1x6uL6Y1dpGDwFJqDkxMI8e3US45+ Z0XlaFQLXGp4HY33epaL7aNkB+E+dyxJdxAnxkI7OGNsvReCCLYp2+S8Gy8dbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722458128; h=from:from:reply-to:subject: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=Z+EPQOWkasEEDB1UxPXXHcubr+1b5AG9g8yp9bLpBKU=; b=S489EjebDX5EbUinokaaHcdQgdbiTY+pXpRcA/Z0ngeukkww0ZxKmTPEjYcPr3UxfZKFev W5/H5dUTN2cUxRxUZ7Vn41JQWHAKI4JC6gOCPSC2RMbQETXErRrUsxnbAkwW81S/lo7/Lv DCbP68shnoCblY4jPFlLkwpRBuOPim4+ofvhT60gBBYJfAmA+BU01+LsuCEE/v6Vjv7n/M 6CQDPpKgR2dYChKcJNe8OMvpBVIuuTJczuLIKiiW5cne7wtht3qK+XMQL3vu09SspEd9uQ SwLewEn5iZpf3HuEUQfhOs288WXYpccnjc44b7idb9XSPpo2RIzcmtxz7cXsow== Received: from [IPV6:2601:5c0:4200:b830:a527:982d:44f2:7b0b] (unknown [IPv6:2601:5c0:4200:b830:a527:982d:44f2:7b0b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WZ3km2hGJz1JV5; Wed, 31 Jul 2024 20:35:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <2ea469e0-bea0-47b0-b203-a658006e0d35@FreeBSD.org> Date: Wed, 31 Jul 2024 16:35:27 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: c04ef1bfb461 - main - ObsoleteFiles.inc: Add missing .gz suffix to various manpage entries Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407311926.46VJQEIc078068@gitrepo.freebsd.org> In-Reply-To: <202407311926.46VJQEIc078068@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/31/24 15:26, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c04ef1bfb461a1c8d426b16532d85af5637727c9 > > commit c04ef1bfb461a1c8d426b16532d85af5637727c9 > Author: John Baldwin > AuthorDate: 2024-07-31 18:48:24 +0000 > Commit: John Baldwin > CommitDate: 2024-07-31 19:25:51 +0000 > > ObsoleteFiles.inc: Add missing .gz suffix to various manpage entries > > Reported by: Mark Millard There are a bunch of entries without .gz for OpenSSL manpages, but they seem to be dubious (e.g. in /usr/share/man instead of /usr/share/openssl/man, or removing list.1.gz for openssl-list that still seems valid). -- John Baldwin From nobody Wed Jul 31 21:16:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ4f762JXz5RMZw for ; Wed, 31 Jul 2024 21:16:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ4f73y2hz4klk for ; Wed, 31 Jul 2024 21:16:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2cb53da06a9so1076760a91.0 for ; Wed, 31 Jul 2024 14:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722460590; x=1723065390; 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=9Ir/4knIQkH6Cb7xTj/a5lrzbaBbMyDdxXivuGFjFg8=; b=utmLJCA4yFWNZKz6ZLAqc/nTgAUPkIyEXXb/Xur48zTg2DwwUl2UyFm89n1a/SaoMv o1okf4eOdUMvVJ7yY+aNIXurF31jDtjoEnZVRFPU7usVQRyWWpm6l1ghCJift/NzzRS6 PtN55DHKMpd7pHzA9s/JJd5bf9+Z6XPmY09BEPSfChXpkHJF4BQRBIQnK8HTByiNdPaj pDHQHF5TkWphJ/uIhWMMrOaS1OFoQvh1HYhPHMOSC5KjOUISmxHik1SD9U7maBvI0IFc UW3uBO8sQCXujq3QUa1dQmFaUjUjIyWmCv/59BimMwoj1S9ky/1pksupQVEAvqFqUvNX po5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722460590; x=1723065390; 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=9Ir/4knIQkH6Cb7xTj/a5lrzbaBbMyDdxXivuGFjFg8=; b=UPVNjX6u+Bqy6p9xqEaiDj9pHV7hY9j/Ba39qoz24Knv3VbrvmS6HkLpSVeEsWFdRy Fo9MKQqWp17XQs322O3UJn2FGdIHQ/yR3BN7biuxPCGIjpcndUZ09XAPMJlx8a2CkaHs hnewL3jzMGyWvAv6fnXb85MnD/JFez6a/wv2HMuvyfvX6GAUCMw5aWpvxIEGA2fDfc/B nAkSuXiT8Gh7BRGYsLbA8TQZmFFkio++2iNlQqLMeqnDsQS4bfyGckfnmjLlm0r89FaW lvYuLixBrsJmWTXUkkt2ZgRNjqnhJyaR4qf2kCf3pyFrz+KpejrY9djlKXVqeCpbcDwz HCsA== X-Forwarded-Encrypted: i=1; AJvYcCWs7tU3WoBYoUDfrlVLR2zkEwNMiph0kozcALHrXb+iSvhVYUDaUv5pRSW6/aNueqFnHaVMqOMaaViBWjoMWLfGdFmIfFiutJhVhv3Zwqa8 X-Gm-Message-State: AOJu0YyG1i73oLwXgbKE0zIPPR9mycuEiuFCLHKd5T/N1cpA0l+1vU9t 99joo6z9sLK/2scECkLdA1Qmzh89XtrIsPT/rFkwaNzBCv7OStyyjqc9G4GRcVNr3gfL77sZuTg CgQ1PvtKc82N3OWNDAwEChq9IvwNYoXiqyecCRQ== X-Google-Smtp-Source: AGHT+IFnICC3H63dOBUXcR84vQSFKhf6YoN/e9zrljr+b3sEee50w/ajeAdVPxQjZOy8mIWQss+p8bnBNJn4NbNFtRQ= X-Received: by 2002:a17:90b:3907:b0:2cb:50b8:e59d with SMTP id 98e67ed59e1d1-2cfcab119b5mr10968893a91.12.1722460590053; Wed, 31 Jul 2024 14:16:30 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202407311926.46VJQCOP077960@gitrepo.freebsd.org> In-Reply-To: <202407311926.46VJQCOP077960@gitrepo.freebsd.org> From: Warner Losh Date: Wed, 31 Jul 2024 15:16:18 -0600 Message-ID: Subject: Re: git: 66158bda905e - main - ObsoleteFiles.inc: Remove CAM.4 MLINK To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009c3743061e919b49" 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: 4WZ4f73y2hz4klk --0000000000009c3743061e919b49 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks! I'd thought about removing it, but didn't want to always remove CAM.4.gz on a filesystem that's case insensitive, which will remove cam.4.gz... Warner On Wed, Jul 31, 2024 at 1:26=E2=80=AFPM John Baldwin wrot= e: > The branch main has been updated by jhb: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D66158bda905eea447d2f8beef92556c= 090c41dbb > > commit 66158bda905eea447d2f8beef92556c090c41dbb > Author: John Baldwin > AuthorDate: 2024-07-31 16:12:25 +0000 > Commit: John Baldwin > CommitDate: 2024-07-31 19:25:40 +0000 > > ObsoleteFiles.inc: Remove CAM.4 MLINK > > Reported by: Mark Millard > Fixes: a00f9e4e8181 scsi: Stop installing both cam.4 and CAM= .4 > --- > ObsoleteFiles.inc | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > index 79d0f315b17b..eeea036390d0 100644 > --- a/ObsoleteFiles.inc > +++ b/ObsoleteFiles.inc > @@ -562,6 +562,9 @@ OLD_FILES+=3Dusr/include/c++/v1/setjmp.h > # 20240321: remove empty /usr/libdata/gcc directory > OLD_DIRS+=3Dusr/libdata/gcc > > +# 20240315: stop installing CAM.4 link to scsi.4 > +OLD_FILES+=3Dusr/share/man/man4/CAM.4.gz > + > # 20240307: Improperly installed awk tests removed > OLD_FILES+=3Dusr/tests/usr.bin/awk/bugs-fixed/missing-precision.ok > OLD_FILES+=3Dusr/tests/usr.bin/awk/bugs-fixed/negative-nf.ok > --0000000000009c3743061e919b49 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks!

I&#= 39;d thought about removing it, but didn't want to always remove CAM.4.= gz on a filesystem that's case insensitive, which will remove cam.4.gz.= ..

Warner

On Wed, Jul 31, 2024 at 1:2= 6=E2=80=AFPM John Baldwin <jhb@freebs= d.org> wrote:
The branch main has been updated by jhb:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D66158bda905eea447d2f8beef92556c090c41dbb
commit 66158bda905eea447d2f8beef92556c090c41dbb
Author:=C2=A0 =C2=A0 =C2=A0John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-07-31 16:12:25 +0000
Commit:=C2=A0 =C2=A0 =C2=A0John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-07-31 19:25:40 +0000

=C2=A0 =C2=A0 ObsoleteFiles.inc: Remove CAM.4 MLINK

=C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 Mark Millard <marklmi@yahoo.com>
=C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 a00f9e4e8181 scsi: S= top installing both cam.4 and CAM.4
---
=C2=A0ObsoleteFiles.inc | 3 +++
=C2=A01 file changed, 3 insertions(+)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 79d0f315b17b..eeea036390d0 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -562,6 +562,9 @@ OLD_FILES+=3Dusr/include/c++/v1/setjmp.h
=C2=A0# 20240321: remove empty /usr/libdata/gcc directory
=C2=A0OLD_DIRS+=3Dusr/libdata/gcc

+# 20240315: stop installing CAM.4 link to scsi.4
+OLD_FILES+=3Dusr/share/man/man4/CAM.4.gz
+
=C2=A0# 20240307: Improperly installed awk tests removed
=C2=A0OLD_FILES+=3Dusr/tests/usr.bin/awk/bugs-fixed/missing-precision.ok =C2=A0OLD_FILES+=3Dusr/tests/usr.bin/awk/bugs-fixed/negative-nf.ok
--0000000000009c3743061e919b49-- From nobody Wed Jul 31 22:31:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ6Js1JZZz5RTS4; Wed, 31 Jul 2024 22:31:41 +0000 (UTC) (envelope-from gallatin@fastmail.com) Received: from fhigh3-smtp.messagingengine.com (fhigh3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.3 with cipher TLS_AES_256_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 4WZ6Jr3qKPz4rT7; Wed, 31 Jul 2024 22:31:40 +0000 (UTC) (envelope-from gallatin@fastmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.com header.s=fm3 header.b=b+3nrmAx; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=b18bfhrL; dmarc=pass (policy=none) header.from=fastmail.com; spf=pass (mx1.freebsd.org: domain of gallatin@fastmail.com designates 103.168.172.154 as permitted sender) smtp.mailfrom=gallatin@fastmail.com Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id E9D61114709E; Wed, 31 Jul 2024 18:31:38 -0400 (EDT) Received: from wimap26 ([10.202.2.86]) by compute1.internal (MEProxy); Wed, 31 Jul 2024 18:31:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1722465098; x=1722551498; bh=BmVuavah/z JbB44Gmm00IrFnkYnKgkZn/JZi8q3riiw=; b=b+3nrmAxs05BafZ7NAiEqeNDS3 JohdTiWjo4sPeQIa9FD/M2cUvjHnfPnjIUghbse3KLcPoEDIGRXHB3dxhjiB3Qh9 ZTsqScXxbxnx/0CUB2NVFjhtiE3kJT4aKjqMItowmOLeZdFjCNzVvcTBJirSWZb4 mWoT9TJRajXSrACYhJIySk6Nh4Xpun2OUjACkt8wXZfpO3nklIm4xYPfuurrAXeJ aWQaCjzFdZpUUzqoKJJLSyZ8v9qqZy4pxWB5WjlDOj1l+w3tHp6v6YQMiygOyo3E vLp/gqtGSN/gSQjJ1mi0y0mIhn8CBdhfAAohhvSupBa+WOD7rWdI7MGBsuEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1722465098; x=1722551498; bh=BmVuavah/zJbB44Gmm00IrFnkYnK gkZn/JZi8q3riiw=; b=b18bfhrLed4nv7tlaQRWUbnvRaO11nbFu8ds90GMkO8o HO971uKWOyx13vWrzfrWOHm78eCUatzAzpG4NgXNibbB4mmOnlIXym8XZlHSYDpA btHn2ZIVqzDUc//sUiblHa/Ul8FcHrSmtGrPbCYVqAWu7Ef3XFVxz8PTwMA1rpn8 7MR+BTRU+mQnljo07WTY/tgrGbMAkj0rcmHsa3VC+zz4nY8wlxD1LLnIl0ul83Z0 SMg+CJ6zEmUSX3r17U5kPVWiZm4iq+vNVjw8QkPJicW7QpUFIkjSRCDH1k6ql0uH zM0gUX4FCxTuMDkVJpS8yKhRGI7Bv5eZ8eiwevy4qQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeejgdduudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofggfffhvffkjghfufgtsegrtderre ertddtnecuhfhrohhmpedfffhrvgifucfirghllhgrthhinhdfuceoghgrlhhlrghtihhn sehfrghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepjefgvdekffeggfffie efgeeigeehfeduffekvddtveevfeehudejgfduuedvgfeinecuffhomhgrihhnpehfrhgv vggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepghgrlhhlrghtihhnsehfrghsthhmrghilhdrtghomhdpnhgspghrtghpthht oheptd X-ME-Proxy: Feedback-ID: i2f014658:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 67D2019C0069; Wed, 31 Jul 2024 18:31:38 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Date: Wed, 31 Jul 2024 18:31:18 -0400 From: "Drew Gallatin" To: "Konstantin Belousov" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-Id: <01e60d3e-6564-4af1-874d-677ce68084a1@app.fastmail.com> In-Reply-To: <202407301500.46UF0r39092391@gitrepo.freebsd.org> References: <202407301500.46UF0r39092391@gitrepo.freebsd.org> Subject: Re: git: 2204a4829083 - main - mlx5en: limit reporting eeprom read failure due to unplugged module to verboseboot Content-Type: multipart/alternative; boundary=85761518925144bf89be2cd1c785142f X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.29 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[fastmail.com,none]; R_DKIM_ALLOW(-0.20)[fastmail.com:s=fm3,messagingengine.com:s=fm3]; R_SPF_ALLOW(-0.20)[+ip4:103.168.172.128/27]; RWL_MAILSPIKE_VERYGOOD(-0.20)[103.168.172.154:from]; RCVD_IN_DNSWL_LOW(-0.10)[103.168.172.154:from]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[fastmail.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FREEFALL_USER(0.00)[gallatin]; ASN(0.00)[asn:209242, ipnet:103.168.172.0/24, country:US]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim] X-Rspamd-Queue-Id: 4WZ6Jr3qKPz4rT7 --85761518925144bf89be2cd1c785142f Content-Type: text/plain Content-Transfer-Encoding: 7bit Thank you!! Drew On Tue, Jul 30, 2024, at 11:00 AM, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2204a4829083bf2a40304ea873d287a5498973d7 > > commit 2204a4829083bf2a40304ea873d287a5498973d7 > Author: Konstantin Belousov > AuthorDate: 2024-07-26 21:09:58 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-07-30 15:00:04 +0000 > > mlx5en: limit reporting eeprom read failure due to unplugged module to verboseboot > > Requested by: gallatin > Sponsored by: NVIDIA networking > MFC after: 1 week > --- > sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c > index 791e278daaf8..ccbdf11a1dd5 100644 > --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c > +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c > @@ -3687,9 +3687,11 @@ out: > /* Check if module is present before doing an access */ > module_status = mlx5_query_module_status(priv->mdev, module_num); > if (module_status != MLX5_MODULE_STATUS_PLUGGED_ENABLED) { > - mlx5_en_err(ifp, > - "Query module %d status: not plugged (%d), eeprom reading is not supported\n", > - module_num, module_status); > + if (bootverbose) > + mlx5_en_err(ifp, > + "Query module %d status: not plugged (%d), " > + "eeprom reading is not supported\n", > + module_num, module_status); > error = EINVAL; > goto err_i2c; > } > --85761518925144bf89be2cd1c785142f Content-Type: text/html Content-Transfer-Encoding: quoted-printable
Thank you!!
=

Drew

On Tue, Jul = 30, 2024, at 11:00 AM, Konstantin Belousov wrote:
The branch main has been updated = by kib:


commit 2204a4829083bf2a40304ea= 873d287a5498973d7
Author:     Konstant= in Belousov <kib@FreeBSD.org&g= t;
AuthorDate: 2024-07-26 21:09:58 +0000
Com= mit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-0= 7-30 15:00:04 +0000

    mlx5= en: limit reporting eeprom read failure due to unplugged module to verbo= seboot
    
  =   Requested by:   gallatin
  &nbs= p; Sponsored by:   NVIDIA networking
  = ;  MFC after:      1 week
--= -
sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/m= lx5/mlx5_en/mlx5_en_main.c
index 791e278daaf8..ccbdf11a1dd= 5 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -3687,= 9 +3687,11 @@ out:
/* Check if module is present before do= ing an access */
module_status =3D mlx5_query_module_statu= s(priv->mdev, module_num);
if (module_status !=3D MLX5_= MODULE_STATUS_PLUGGED_ENABLED) {
- mlx5_en_err(ifp,
<= /div>
-     "Query module %d status: not plugged (%= d), eeprom reading is not supported\n",
-   &n= bsp; module_num, module_status);
+ if (bootverbose)
<= /div>
+ mlx5_en_err(ifp,
+     "Q= uery module %d status: not plugged (%d), "
+  &nbs= p;  "eeprom reading is not supported\n",
+  &= nbsp;  module_num, module_status);
error =3D EINVAL;<= br>
goto err_i2c;
}

--85761518925144bf89be2cd1c785142f-- From nobody Wed Jul 31 23:44:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ7x35mktz5RZt1; Wed, 31 Jul 2024 23:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ7x34sq9z4x0R; Wed, 31 Jul 2024 23:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722469479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4UGc9p0pF1H8oBKsydarNfNGv48ZiaoKQd9hMHvk0vo=; b=ku/UbzhNGmjD+Bsw/mMouYst8CNOcFRqv9T7ymzuBRp2DtBG70tFIy/GSnufCf/XhzQBzf 5jeDhFVmY/wi41XCrubETCFhidXglT6tfHo9UX0sIEUg0GGvjScLl+eaTxMDdjgv+HyBaU K6iK4z/TKl/c9dhRTYDXQskndjj3lY7nXP+T2L8IPuwNJZKnhNaANOKPKRr705zuYQRL8U P8LGKvYH1XYCJpchKsaa8RWXhWKR44OyIugfrIGGbHM+FKl7ND4kv+7r6OSlC9ZHPCjNQn CoQQd4rFxk8wdi1nnI5m/QOh7j+4+I3KihaulpIGFIkIe+fhCFYhM6ZPP/8VNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722469479; a=rsa-sha256; cv=none; b=drXKrO/U2dhs47n+Rel/qPfjGpR98sdwa+ylRGyv4FqeV0RLwYoCMPDp7yvPbR1M9PnPzP 628et8Urjziq/8FdVL2iTgRo7BlG396+bDIwrEUfu7wtJ4AenVBnVRNQ485tlbz6M7CYtI RXtbDC/07yLZdn9WYp21K3Fd7/thU10Hm5OJq/rO2KINv8kumFC6ekFMEeXK6tZXkJaz8+ wm6m4oZsOOVms5bqRHIL94tVFX/abRdPjKRuLPgQAIe8nUEC8ri9UZgS4dzXAxHJXH7Tz4 mRDKqrobZW1kJiM/mW2Dx0q7HtRNLfQEdcE0WALnJAWm3KePTprDTOA+Uyjqdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722469479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4UGc9p0pF1H8oBKsydarNfNGv48ZiaoKQd9hMHvk0vo=; b=Drp8XVL91GWtc0ByhKUfC04xixivPrusnIeRntNNMOAAr8SS2TJi8BiPTGXMyeouP4sUtq 50q/+acTYPQLiB0vU9NypRGrK+WSFtzOYHHwThcc7qdFijwnfeyctmxGX47shMk7W0NUEN PmeoT8Cpr3mEW77vCMap6zmEUiS8LAFehTV9FPZ5f4Joi5VwoCKhyarHgQ9JnH7K6Bdut6 xs67rB4qybm8A9biRoo0sZG1w+Tp48f4f9URT2b4ySCgobOTqa4txhvsQ+rH07sKm9PFm4 v8Ii/R5X5LmO0n+ul2Wpgp/AKXSWuTfccsQfEa3lfkHgBJVxfZZPGB94rx5cdQ== 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 4WZ7x34TPdzLnr; Wed, 31 Jul 2024 23:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VNidYM016960; Wed, 31 Jul 2024 23:44:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VNidTN016957; Wed, 31 Jul 2024 23:44:39 GMT (envelope-from git) Date: Wed, 31 Jul 2024 23:44:39 GMT Message-Id: <202407312344.46VNidTN016957@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: b4fb947923b5 - main - bhyve: Escape binary data sent in reply packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b4fb947923b566a3a8a6ad8e5f8ea8dec0c68ee4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b4fb947923b566a3a8a6ad8e5f8ea8dec0c68ee4 commit b4fb947923b566a3a8a6ad8e5f8ea8dec0c68ee4 Author: Mark Johnston AuthorDate: 2024-07-31 22:41:13 +0000 Commit: Mark Johnston CommitDate: 2024-07-31 22:41:13 +0000 bhyve: Escape binary data sent in reply packets Per https://sourceware.org/gdb/current/onlinedocs/gdb.html/Overview.html#Binary-Data certain bytes must be escaped. The XML register definitions we have so far do not run afoul of that rule, but the stub should handle them anyway. Reviewed by: jhb MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D46194 --- usr.sbin/bhyve/gdb.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index a13166e1e2c8..7c04b0017c80 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -651,6 +651,28 @@ append_packet_data(const uint8_t *data, size_t len) } } +static void +append_binary_data(const uint8_t *data, size_t len) +{ + uint8_t buf[2]; + + for (; len > 0; data++, len--) { + switch (*data) { + case '}': + case '#': + case '$': + case '*': + buf[0] = 0x7d; + buf[1] = *data ^ 0x20; + append_packet_data(buf, 2); + break; + default: + append_packet_data(data, 1); + break; + } + } +} + static void append_string(const char *str) { @@ -1801,10 +1823,10 @@ gdb_query(const uint8_t *data, size_t len) append_char('l'); } else if (doff + dlen >= xmllen) { append_char('l'); - append_packet_data(xml + doff, xmllen - doff); + append_binary_data(xml + doff, xmllen - doff); } else { append_char('m'); - append_packet_data(xml + doff, dlen); + append_binary_data(xml + doff, dlen); } finish_packet(); (void)munmap(__DECONST(void *, xml), xmllen); From nobody Wed Jul 31 23:44:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ7x503LFz5Rb9L; Wed, 31 Jul 2024 23:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ7x45xgyz4x7r; Wed, 31 Jul 2024 23:44:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722469480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GyKl7sMGQXBzuMnmj76j8hzZ3kGstIi2osvh7lDt6s0=; b=jd1AmkBR78/y72CxfB9bsbvRPuhCky6mPeReONkmuDghfn37tMPfZJ3XKo9DrrBz9beWP8 muXuVuLTggRwaEEQDmJ2l2KM6idDnRa2Pp4Vd61bUVf1dlst0Iqp0GxZNWlr1FsBFdApv8 p9FcDBKIfAnp1L3UjYRBFlHsqHwSf2idi+suKqTZyok+Lkm0FfJC5v24BR+34IcLKyrODr Q9qIuRvvLTu1bq3s5+Z7RsY+xrI9E5rotCrcEpb/kfas40/4eWxJvJLCgCgiiOm/GGQRDN 5N1ljP1fodaS3Qezv4lyT29z9P8AxycKWHQV55jmJpfGw4ml75LoWWhaz2qCKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722469480; a=rsa-sha256; cv=none; b=P/SigIH+qSjeGhzX24/6EvJFwt/0qYh0P82eqbD1IROpaGb1GqYxLmiCyPATztKkeaCDxU D29wdLKQYcRtZ+Rb0f1ddfiiUWipEeaQ9hlJwos989GA2yv+FBYGd/grsD2QZlx+YwsdDB KCYTec066s2QI6cyKqCuaicrjJdi8qo7YfbUmvYPhWjQugJTGi5awDBoLyysTHMVhat/t/ EIw5qnzJH3RMCNLFjQNEndW4OtTtn3q4HkpwfQjPk25xYCvC0ZeawPkU7qpC6iiaMQfIiH ZiGawdG0E1Zi4emKuYv+sUSEQLBelgDVqFglD86uCYxDz5GaDxTmJudZmkeM6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722469480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GyKl7sMGQXBzuMnmj76j8hzZ3kGstIi2osvh7lDt6s0=; b=H0qjv4BhIRkwhXQ/t9FfLu0qmj/Lw8UY48MvTq6ZfejlIF6yzSfUiq0fLYf5AHL8JB7bYe 8GdlpgmcZFI2SK0mjfu4umlAqIyIrHFI4CUAQ9gqGD5Qs0wrSKSu5tZanA9Ep9fi5hrUry FntukYeEEKppsWAoAG5QSflIImfzXimjktU8CpYRDNUuw1mJBdSE/6M60Vw5TI3rZxDmvt xMswLmPXJqNkXJWVN2Es3kZiOE3bswz8yK0QCXnI/Fk+Pf9tEx0ygtfb0/H2FtDaBlcWD3 /ZT6u+ZHiO2V37wEpZRkDaNPgO5p6J9dQ/NxiB1utyNrZgwIsFCUcy5p6vXfAQ== 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 4WZ7x45VzmzM5p; Wed, 31 Jul 2024 23:44:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VNieaH017014; Wed, 31 Jul 2024 23:44:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VNiePr017011; Wed, 31 Jul 2024 23:44:40 GMT (envelope-from git) Date: Wed, 31 Jul 2024 23:44:40 GMT Message-Id: <202407312344.46VNiePr017011@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: 2e2b8afa52da - main - bhyve: Sleep for a short period after VM_EXITCODE_DEBUG exits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 2e2b8afa52da6e2cd08482bcd512e016aa264ddb Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e2b8afa52da6e2cd08482bcd512e016aa264ddb commit 2e2b8afa52da6e2cd08482bcd512e016aa264ddb Author: Mark Johnston AuthorDate: 2024-07-31 22:41:28 +0000 Commit: Mark Johnston CommitDate: 2024-07-31 22:41:28 +0000 bhyve: Sleep for a short period after VM_EXITCODE_DEBUG exits As on amd64, APs will repeatedly exit until they are brought online, so this hack helps avoid burning CPU time during guest bootup. Reviewed by: jhb MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D46195 --- usr.sbin/bhyve/aarch64/vmexit.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/bhyve/aarch64/vmexit.c b/usr.sbin/bhyve/aarch64/vmexit.c index a47df27e54fc..7f0cfe672c55 100644 --- a/usr.sbin/bhyve/aarch64/vmexit.c +++ b/usr.sbin/bhyve/aarch64/vmexit.c @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -132,6 +133,11 @@ vmexit_debug(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun __unused) { gdb_cpu_suspend(vcpu); + /* + * XXX-MJ sleep for a short period to avoid chewing up the CPU in the + * window between activation of the vCPU thread and the STARTUP IPI. + */ + usleep(1000); return (VMEXIT_CONTINUE); } From nobody Wed Jul 31 23:44:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ7x60tL3z5RZt4; Wed, 31 Jul 2024 23:44: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ7x56v2Tz4wll; Wed, 31 Jul 2024 23:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722469482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Un0H89iCzD0brYtqtR4f0X9a4T/qMpOzQnFEyFb6jZs=; b=uPM+ZdIHsAQZyQLJs94HcfGOb5n2XuzlBUERtyRUAIc3dP9bY9Yr5XtAonlpkoSVVZEof0 sL6IbRiIGPqX4bwIHYxjsL8w/t4DbIvhq1Z0CJuPkCETvo96cSU/kWpTGyNfNq6dz9+s8U +/ywgGOU4S24XjIBXT6WVSZC8E0dMy0psPzF0AHO8dlsT3MKOpNEjGd3gBHLtIQIe4WSY0 uJmug8AtL8B1i1ZcDxtCE8w0RE6nw4dsYm+EuWrA8K+vFe713rx3Z2AiLd05liKrMysegh gzDkRYOf/3yiLD/vdU46otsMjo7NccCKschefMKTMP9ox7taMVD96KqDmDIsqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722469482; a=rsa-sha256; cv=none; b=ZEbmxN5Hr+IGfy4qP3FGardYW/FkS+ziUkTMYCzTFV7BpAm5ffU2Ep3ukF+4CEdTthzNTY m++1kg8luhjYxcDKchFV/BnInerkAgchpVrnoqk7+pUHsmOkiAENW77YoK6yUwBqrHQzJY V9HB1qLHEyDKFeWFT+u3pkTamkHyfqoWaWUUdesPzwfhAsTuulfdh7og9arstSqr8vFHpS 2QxRQUKnIAdAYcXGzx5XVQkHrvRfcQ+vTnh941X7ihiuZlIKexH1qn+Pl2VGdEeIIQMlUF 7R7HS9aiZjOjNCD9G6wHmKfINUOFG4IWaoL5lRI8Nwa0tqTj6wLpb+p4kxCxYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722469482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Un0H89iCzD0brYtqtR4f0X9a4T/qMpOzQnFEyFb6jZs=; b=j6MH7NKhYu+Ukp0iGHpyWCevnkhh72o/5zskjWnmP1Z2m8EYMIuPsZzXSYTHerYv5tm7eG YXmXtlDBc+h6K5G8XopvXqouDjDkTsZZKGLrZ9l6+TWidlqS30/FSsezcYW2Xgn+yqIY6I g8ZEfHlGEbEkCsUNFtvx5qVWc2amQC1NlLeGQUsj/Um36LNE2RyEhqPC/+55Hxwb0nhQ8s ZQjXj95jKg7V/e6VdPyePSiZVDwAJ59KtiT5RfGV6POiLQ5OrFxXplu7kr6O/avbDFBPn8 KnKdCtMxUlRbmWnpEICnz1xvhJCzWqfMej2dEhPz9uLK2LFiWTQ8AaFpJmf1jw== 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 4WZ7x56GsDzLns; Wed, 31 Jul 2024 23:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46VNifZf017068; Wed, 31 Jul 2024 23:44:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VNifMW017065; Wed, 31 Jul 2024 23:44:41 GMT (envelope-from git) Date: Wed, 31 Jul 2024 23:44:41 GMT Message-Id: <202407312344.46VNifMW017065@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: 4c5188bbeb88 - main - bhyve: Assert success in a couple of libvmmapi calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4c5188bbeb88362112fa2891ccb6330f4c429ff3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4c5188bbeb88362112fa2891ccb6330f4c429ff3 commit 4c5188bbeb88362112fa2891ccb6330f4c429ff3 Author: Mark Johnston AuthorDate: 2024-07-31 22:40:51 +0000 Commit: Mark Johnston CommitDate: 2024-07-31 22:41:30 +0000 bhyve: Assert success in a couple of libvmmapi calls - In vmexit_smccc(), copy an assertion from amd64. - In fbsdrun_addcpu(), make sure that our vm_suspend_cpu() call is succesful. Reviewed by: jhb MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D46197 --- usr.sbin/bhyve/aarch64/vmexit.c | 3 ++- usr.sbin/bhyve/bhyverun.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/aarch64/vmexit.c b/usr.sbin/bhyve/aarch64/vmexit.c index 7f0cfe672c55..e1a9509d5d12 100644 --- a/usr.sbin/bhyve/aarch64/vmexit.c +++ b/usr.sbin/bhyve/aarch64/vmexit.c @@ -249,7 +249,8 @@ vmexit_smccc(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) how = VM_SUSPEND_POWEROFF; else how = VM_SUSPEND_RESET; - vm_suspend(ctx, how); + error = vm_suspend(ctx, how); + assert(error == 0 || errno == EALREADY); break; default: break; diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index aca770a92642..f844da90e76c 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -413,7 +413,8 @@ fbsdrun_addcpu(int vcpuid) CPU_SET_ATOMIC(vcpuid, &cpumask); - vm_suspend_cpu(vi->vcpu); + error = vm_suspend_cpu(vi->vcpu); + assert(error == 0); error = pthread_create(&thr, NULL, fbsdrun_start_thread, vi); assert(error == 0); From nobody Thu Aug 1 04:23:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZG6y1ttzz5S2jK; Thu, 01 Aug 2024 04:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZG6y1YT7z4GkT; Thu, 1 Aug 2024 04:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722486218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwA/2dLuLegGcr+UVhOy2S5eUFTNXizH8MrAvxCz0Vw=; b=m5RCkR4Rfncv0F3gXilhgwqPSmDbmDxJ148KgEBlVk3ld7OVsHhTHuCcQtSpsrwqq/vUGs 6dV7/rhq4VPZ2iCXwmwUvn4JdXKzgiZ+YdXPZywJkaYpZSXgsDFLKdoIDTN8d69cv35u01 xWQlENolj4xGnR3xMXv3FU8s6+WnMJqJvJRXZOnfgLfskScd79R1OfjdeC1WLvAsPJ8kWI sVB/mHUbEJRnIXac/Jlc/s++LGuslFcVtDTCMQl2yZWm7Rdyx2nFTnWXeyUEmpyraTheyt iMLka5OCugnQ7xYWebq1DcTQms2PYKGF/mmVCqdgwvAj3x8Y107uMudLRSDyig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722486218; a=rsa-sha256; cv=none; b=WVB9SS3gGrPj9ekGCVRN5Ih+EpPtXLm26lpFqyUb2OXpiPoPe5qwRBGwoyXB8HV3Pn60wU hQKo3ncj1/1Lp434J4YmHC6bTwCJoIhXFzrbw567chFt9V5rXy7vHuJJSiqULtxKoCmKTE 5pvxNl39CA2TUbWah7N0o/lSOdnQGZ9emFmZ3ur3uXKrdgA/0e8+pExIB6rY2OG+hrQU25 mKOooxnhFUlpQSdsCrw52vWYkH6l9taAhaPb9IoAed78oGGsajY23ykfu6BtjIddue9P1r huQL8y5dNDDD0XxatjQE6vfiNwqYZqGv+bcvX+iPXpPBFahLqUkHxStCCBA4Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722486218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwA/2dLuLegGcr+UVhOy2S5eUFTNXizH8MrAvxCz0Vw=; b=uVbI4E1N0RfbDji2+YkSVLgMWI3rXqYORNneGdnhwMXyX9xU7OAeah5LDNYgR3kTYt19Vq YWSh6hDRfWLx1NaCmO87nuUEz6QWpdMcbv0rV1pIzo5egsXUSzlcRbh3IM3kHVRqn4z8qh b45MAfR5E/ULUJWuMlhcSLb1LcdoUrK4HjYbBDHAV/9bGyuBhYXrjNq+/+vf+Igm5eTyTF +Sl1/ZbMPqlmtfr+kk9S43IXrETFKnZ/QJa73+kEywPHPJvRmnaxb+TkhZMyuDdALKJaYe OHefJbqfX1E1Tt0dhV/ieylpmDIokHczS0qHAvTECpVjJ7glRvIb/A8VoGzNyQ== 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 4WZG6y18q1zVBH; Thu, 1 Aug 2024 04:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4714Ncpn090192; Thu, 1 Aug 2024 04:23:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4714Ncu3090189; Thu, 1 Aug 2024 04:23:38 GMT (envelope-from git) Date: Thu, 1 Aug 2024 04:23:38 GMT Message-Id: <202408010423.4714Ncu3090189@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: 37d6d682af59 - main - kernel: Move the debug stuff into a common script List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 37d6d682af59ba8b868515c835e433ec85900f6d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=37d6d682af59ba8b868515c835e433ec85900f6d commit 37d6d682af59ba8b868515c835e433ec85900f6d Author: Warner Losh AuthorDate: 2024-08-01 04:21:11 +0000 Commit: Warner Losh CommitDate: 2024-08-01 04:23:24 +0000 kernel: Move the debug stuff into a common script Move a copy of amd64's debug code into debug.ldscript. Make all the kernels use this. This has the effect of modernizing the STABS for powerpc as the others were almost already in sync. For the ones that weren't this adds the DWARF 3 debug symbols from i386/amd64. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44071 --- sys/conf/debuginfo.ldscript | 36 ++++++++++++++++++++++++++++++++++++ sys/conf/kern.pre.mk | 2 +- sys/conf/ldscript.amd64 | 39 +++------------------------------------ sys/conf/ldscript.arm | 36 +++--------------------------------- sys/conf/ldscript.arm64 | 36 +++--------------------------------- sys/conf/ldscript.i386 | 39 +++------------------------------------ sys/conf/ldscript.powerpc | 31 +++---------------------------- sys/conf/ldscript.powerpc64 | 31 +++---------------------------- sys/conf/ldscript.powerpc64le | 31 +++---------------------------- sys/conf/ldscript.powerpcspe | 31 +++---------------------------- sys/conf/ldscript.riscv | 36 +++--------------------------------- 11 files changed, 64 insertions(+), 284 deletions(-) diff --git a/sys/conf/debuginfo.ldscript b/sys/conf/debuginfo.ldscript new file mode 100644 index 000000000000..1f7ede57ced0 --- /dev/null +++ b/sys/conf/debuginfo.ldscript @@ -0,0 +1,36 @@ + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* DWARF 3 */ + .debug_pubtypes 0 : { *(.debug_pubtypes) } + .debug_ranges 0 : { *(.debug_ranges) } diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 53b9862f2145..4d626cdd2aad 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -357,7 +357,7 @@ SYSTEM_OBJS+= embedfs_${MFS_IMAGE:T:R}.o .endif .endif SYSTEM_LD_BASECMD= \ - ${LD} -m ${LD_EMULATION} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} \ + ${LD} -m ${LD_EMULATION} -Bdynamic -L $S/conf -T ${LDSCRIPT} ${_LDFLAGS} \ --no-warn-mismatch --warn-common --export-dynamic \ --dynamic-linker /red/herring -X SYSTEM_LD= @${SYSTEM_LD_BASECMD} -o ${.TARGET} ${SYSTEM_OBJS} vers.o diff --git a/sys/conf/ldscript.amd64 b/sys/conf/ldscript.amd64 index 302f5cd2c4f8..b3286612b41a 100644 --- a/sys/conf/ldscript.amd64 +++ b/sys/conf/ldscript.amd64 @@ -177,42 +177,9 @@ SECTIONS } _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - /* DWARF 3 */ - .debug_pubtypes 0 : { *(.debug_pubtypes) } - .debug_ranges 0 : { *(.debug_ranges) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index 57ce8c068c44..0764c99f9042 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -120,39 +120,9 @@ SECTIONS . = ALIGN(32 / 8); _end = . ; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } diff --git a/sys/conf/ldscript.arm64 b/sys/conf/ldscript.arm64 index e9edbd8b7402..ea52a3128527 100644 --- a/sys/conf/ldscript.arm64 +++ b/sys/conf/ldscript.arm64 @@ -137,39 +137,9 @@ SECTIONS } _end = . ; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } diff --git a/sys/conf/ldscript.i386 b/sys/conf/ldscript.i386 index c7fe91c9d4d5..66bdbc4a80cb 100644 --- a/sys/conf/ldscript.i386 +++ b/sys/conf/ldscript.i386 @@ -162,42 +162,9 @@ SECTIONS . = ALIGN(32 / 8); _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - /* DWARF 3 */ - .debug_pubtypes 0 : { *(.debug_pubtypes) } - .debug_ranges 0 : { *(.debug_ranges) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } diff --git a/sys/conf/ldscript.powerpc b/sys/conf/ldscript.powerpc index 0fa3fc9b3fa7..0e11dd4459db 100644 --- a/sys/conf/ldscript.powerpc +++ b/sys/conf/ldscript.powerpc @@ -120,34 +120,9 @@ SECTIONS } _end = . ; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } diff --git a/sys/conf/ldscript.powerpc64 b/sys/conf/ldscript.powerpc64 index 3e418c3c1189..58a3dc69931b 100644 --- a/sys/conf/ldscript.powerpc64 +++ b/sys/conf/ldscript.powerpc64 @@ -145,34 +145,9 @@ SECTIONS } _end = . ; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } diff --git a/sys/conf/ldscript.powerpc64le b/sys/conf/ldscript.powerpc64le index 4fdfcb295ab7..a65b39b3d9eb 100644 --- a/sys/conf/ldscript.powerpc64le +++ b/sys/conf/ldscript.powerpc64le @@ -146,34 +146,9 @@ SECTIONS } _end = . ; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } diff --git a/sys/conf/ldscript.powerpcspe b/sys/conf/ldscript.powerpcspe index f35a15816108..66630aaabaae 100644 --- a/sys/conf/ldscript.powerpcspe +++ b/sys/conf/ldscript.powerpcspe @@ -121,34 +121,9 @@ SECTIONS } _end = . ; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } diff --git a/sys/conf/ldscript.riscv b/sys/conf/ldscript.riscv index 15f896112d04..b964a8739b7c 100644 --- a/sys/conf/ldscript.riscv +++ b/sys/conf/ldscript.riscv @@ -111,39 +111,9 @@ SECTIONS . = ALIGN(8); _end = . ; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } + + /* Debug */ + INCLUDE debuginfo.ldscript .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } From nobody Thu Aug 1 04:23:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZG6z3C1Zz5S2Rk; Thu, 01 Aug 2024 04:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZG6z2XTdz4GqZ; Thu, 1 Aug 2024 04:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722486219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uf77Y0KJ1v4OvFooUR3qsNYEmO348WRzyMLGyFEiMuY=; b=ed0V4OdZf9EAdHO2MQUrJI6DrrJYPm9/ObIITekIlzOE/yA+vfK06oEU8kVSUgJYkjw9VU TbIFKt6W4GbsS5CDVNfoQZbc5Dol6jc/b3qDiRSzVRUBFXFZv3PGBG6WOhOqkQXGRzWpHr IxrJNN9KWLbOON5otecQxnzghItbNTDTXiy+DGWEfRLM5eXfT/DakJ8BL+ex89FopUrN3S I5M4M9FHi8WiI40SaN4KXaMowHUj3QarZFfZtSPtGQiHIzP00MgnKkDPOtEMcPLigVkJcP zwXGho/g7RVWweJiBWshoGJOsKFDR10rnWepezR9tTrv+LusyKDos7qW/RquLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722486219; a=rsa-sha256; cv=none; b=Aa3oS888/6+4UgfMedZcF04fxz28ecmMinIaJ5OhhemjTucSXB1RecEQ3vMoQnWO5X7DKl 6QQT8uxCRCr1oYrbrW5MwFQQcYR30YNXGpddpKVahJbmW2W1DIXh49Jg7RfslCXLs+wDs+ KLVKf/aPQadyV97UrvhQ6g1D0tI6pdxFIAvjZAxmnE9KWSkHsw3K5pq/JTWlEz+QzgOmEQ hZVkHUfL9D3T+Lv3tiFcavN3jHXrWl1VXKcdOOFy77PikVhPUCGHn/+1nW0wUl0JC14pUp bYeBL5OpSdLxBaWG7BslFz1izczB6Ux5IfD3qYaHd4zgkkEy/TC489eEypLITA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722486219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uf77Y0KJ1v4OvFooUR3qsNYEmO348WRzyMLGyFEiMuY=; b=x3YjyuifIQL1NPt1R1h75Nca+1TvkPB5sWNq6mf8fA7x3kwWsi7oWpZDvHk8fcVVpbMvEu dGV/dnq//pWbZNFd11IcKhpnRdkK5JETbq3ms49Fz2o6azQWEiO5R7kAeGU0FgwcVXyrsp izTnM43PM5nC1TtiFBUnsBgkTAD0jybYULzrmdU+x7OY0RuFueH6ednqH626PjPWAPVFPY MHNd++JxcjLcP/3VD+0HoNk7Mppj1ftJvDEx6zIdzti8dlaSQtlSOz0vt6tXDCRBVtWrTI +EE+YWcR6TsA6qf1MKb8JZgIxveT7ErJfCWCGZfOgHHAV0jCRYzK3rd82SajCA== 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 4WZG6z271PzV6J; Thu, 1 Aug 2024 04:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4714Ndqn090234; Thu, 1 Aug 2024 04:23:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4714NdJK090231; Thu, 1 Aug 2024 04:23:39 GMT (envelope-from git) Date: Thu, 1 Aug 2024 04:23:39 GMT Message-Id: <202408010423.4714NdJK090231@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: a3c8c061e270 - main - kernel: Add new dwarf symbols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a3c8c061e270dd5f3061072f14249e4766bc752c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a3c8c061e270dd5f3061072f14249e4766bc752c commit a3c8c061e270dd5f3061072f14249e4766bc752c Author: Warner Losh AuthorDate: 2024-08-01 04:22:31 +0000 Commit: Warner Losh CommitDate: 2024-08-01 04:23:25 +0000 kernel: Add new dwarf symbols Add new symbols defined in dwarf 4 and dwarf 5. Submitted by: Matt Macy (in D17982, done differently) Sponsored by: Netflix Reviewed by: kib, markj, emaste Differential Revision: https://reviews.freebsd.org/D44072 --- sys/conf/debuginfo.ldscript | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/conf/debuginfo.ldscript b/sys/conf/debuginfo.ldscript index 1f7ede57ced0..a131afb1d4ad 100644 --- a/sys/conf/debuginfo.ldscript +++ b/sys/conf/debuginfo.ldscript @@ -34,3 +34,8 @@ /* DWARF 3 */ .debug_pubtypes 0 : { *(.debug_pubtypes) } .debug_ranges 0 : { *(.debug_ranges) } + /* DWARF 4 */ + .debug_types 0 : { *(.debug_types) } + /* DWARF 5 */ + .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } From nobody Thu Aug 1 05:49:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZJ2137CHz5S9TS; Thu, 01 Aug 2024 05:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZJ212Zygz4NN4; Thu, 1 Aug 2024 05:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722491369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzjPJSi2lZ4ED0il0YQrSLN4e5gnuFfC52yO1w71tYQ=; b=x+ZNKE25LycQuHvd9xj7x/v/d1kmdWJNcFKs1APLfAeKNUXSCI1SRHklQrR6cSOBzSZswX sQ5DT9MitVlegiCaAq2RVNIeKOUZrFBec4zSIyxxItv0Qf9LTu6g60DvqvaREOrPFwvXh2 J9WwYvycEM2yyQLO8Cbq/NK54MxtORPotQ5zRu9tPCsgxPRehxMaxLq2ldFRoqXYd/xqFo c5eCehg2yhJ9bSFo5BudTC8W+UjiK6WKVa70ZuXdFuLiYORgWY4mFp4CJMgBFKbq1qDAfz BwyFugWj2O8NDLSZlR9Svbva/fOUYf5RIdEu5K4Q0sINsMgrho7v3sLNcBsgSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722491369; a=rsa-sha256; cv=none; b=nShJOkAuSe7x4a2L0qhA5YKuiSN1Mv1hQ4pQEtBlQupv1wcvYfKd6RKmeVmUXDxhIk8R35 xOxaVpdMq56v6C+mUwWfSjwwt8fjVhcNMIX/h7zPkZa0iAbJVs9R1cYuJojiG8ztojMrzm DqWW3qLH8uaGCC+mdJelbCwSjyMo3Ft4NB9puwFqa0K8C/2oTYqab74Nyp86YcuM6f8Qul muSts1biDAo81nRbsA8WaZS3DOwFHgxvYM+6+pjS1VQK8kwHi6V8I5Vq7aAezs8+ywFx9/ HolfE6jS0Ew9aHtupy3hu9+zX/vRe2j8+2HHK15z14EC2bQtB/1Qs+S45HgTgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722491369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzjPJSi2lZ4ED0il0YQrSLN4e5gnuFfC52yO1w71tYQ=; b=k2p+GgyNjLVO1LhoLvx3WyfdN6igSsHSnggNP6WsFcA5yNUEHqcOPb8SZhp+LEYlM/KXFa HnuaUlS/5uJIvc+bn81P/g1GYQTlYsA80dbxPc3o7rRWeVKs0etst5YtocjtT0a9yRM2/C ez1pbAGTx1Oxo2QBvTHlGuH/w8x6JqWBXrz0o4kMKNmQ8UYB2ytvrjE7wFtHuCkqUvdD/0 CaGSLX4p/GFdAf+nB7t4ndSpZVKnl5OH9qbdtzcqmn0vmj/kt/2NVrRpAdmuh3WjW7zOFJ 4KyWzdVI308Ae1M8K0nviTZzj5amFSxpojQlGVHNzX30QMb6szlkr5bt+mgMBA== 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 4WZJ212B6PzY5K; Thu, 1 Aug 2024 05:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4715nT8r026893; Thu, 1 Aug 2024 05:49:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4715nTHG026890; Thu, 1 Aug 2024 05:49:29 GMT (envelope-from git) Date: Thu, 1 Aug 2024 05:49:29 GMT Message-Id: <202408010549.4715nTHG026890@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: f21a6a6a8fc5 - main - vmm: Build with proper ldscript on aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f21a6a6a8fc59393173d9a537ed8cebbdbd6343c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f21a6a6a8fc59393173d9a537ed8cebbdbd6343c commit f21a6a6a8fc59393173d9a537ed8cebbdbd6343c Author: Warner Losh AuthorDate: 2024-08-01 05:47:13 +0000 Commit: Warner Losh CommitDate: 2024-08-01 05:47:13 +0000 vmm: Build with proper ldscript on aarch64 A new instance of using ld with -T to bring in the kernel ld script crept into the tree after I originally did the refactoring. It too needs -L ${SYSDIR}/conf added. Fixes: 37d6d682af59 Sponsored by: Netflix --- sys/modules/vmm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index fc9340e9cd86..88586a39bf96 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -52,7 +52,7 @@ vmm_hyp.o: vmm_hyp.c ${.IMPSRC} -o ${.TARGET} -fpie vmm_hyp_blob.elf.full: vmm_hyp_exception.o vmm_hyp.o - ${LD} -m ${LD_EMULATION} -Bdynamic -T ${SYSDIR}/conf/ldscript.arm64 \ + ${LD} -m ${LD_EMULATION} -Bdynamic -L ${SYSDIR}/conf -T ${SYSDIR}/conf/ldscript.arm64 \ ${_LDFLAGS:N-zbti-report*} --no-warn-mismatch --warn-common --export-dynamic \ --dynamic-linker /red/herring -X -o ${.TARGET} ${.ALLSRC} \ --defsym=_start='0x0' --defsym=text_start='0x0' From nobody Thu Aug 1 09:27:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZNsG6sFgz5SSPb; Thu, 01 Aug 2024 09:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZNsG5yh5z4hZ3; Thu, 1 Aug 2024 09:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722504434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HM+JZ1srluMJdAblhXqK3bq7ce9BHi5Rl1HSUU35BZ4=; b=RDPlgafIP4GpUmCNmFAPM8oi06m0/9L+7FCMaKMfGtsUhzwkslhbbL/aE8Pk678CmRLJXR B8E6ZOFp1mYVgghYBmR3wgSfmeiYIJ6QxvkfK1gOi8tH1jAsO7tXR84Ft4CQzAhbiIy4o7 bPIoI7of7DWqSZOG39xsjoMd7CcR3EyTfR6rvjcVHiDifbtFszUyvYPB4NteEEYJbJa9vr EN0PlHxfkLARGOOjSWhQI/ALQPGLcdyt/aNsocJ4RjCh4RfrlC7X6uUenWsia9HsHo2a1F aGAOUtiLWu7td9sA04hUIkqjw4szztQkOxe4FwR3+v7HQMb1M8c8iQTmBsPLlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722504434; a=rsa-sha256; cv=none; b=rDwJ89D0ImQaEwMHKMP5fLNatHJwIdI4h7qLS6BmXGVHNX3uT3v/WS/6tNkjYFyx8nfhno p8zkPvondjIY5oh1fHMfwldhjO18wbqwSVkh2qSvn/1R8zaC6ewrSsnhL2zwYcimP2Hyn9 A11F7MmvXrxDlagQ1UQm3eLOx1oDUgFsZgXdwAc139GB3Ff2lgqOJFItsoEGg64EPR+BF0 BvQxgoGveOUSI5y/PFPgtHVRmdPq/5jL9UetYqT22AtQ0TX33O9q+3Kf3lTlbEwkw+pJgk O+BB7nOs2k7NSY8KzW4iCE5jiThV+yPxnqhbr75I1rX0c5DzSqXGPHBGxtnOBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722504434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HM+JZ1srluMJdAblhXqK3bq7ce9BHi5Rl1HSUU35BZ4=; b=KiaafAgu+8TeXC43JgPgmTm9gvVaW3utjygtvp2xHhPTdvz24BDbLUAzvubo+XreVPr/C6 nxlT7qP9M7NvyZkLH09avE+sztDekDuPeGOHVGHCkS4zJGYfNsxDlfOKr4L51G+wkc3l/u L9stF1JOvFOgzf1xjWBbkcMTQ2+JWEUIZ8M6LzrnjQoIsqpYSXluyY7joUACQEnpc2Qlux RGl9YVB5/ssXKKg5Lr5XdS/f/k9Mpi+Gqz9V1jYhIq9w8xYR5Yl458OYf7hzMolZ1GYt2f wO4CKVinsG/PizsYxmsYJQaAj2Rn/3pxxZ7Hmyc6EIYgCYBdt0ErRVtj5sZhhg== 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 4WZNsG5ZKwzftN; Thu, 1 Aug 2024 09:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4719REXh098243; Thu, 1 Aug 2024 09:27:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4719REj9098240; Thu, 1 Aug 2024 09:27:14 GMT (envelope-from git) Date: Thu, 1 Aug 2024 09:27:14 GMT Message-Id: <202408010927.4719REj9098240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michal Meloun Subject: git: 72a1920e73d1 - stable/14 - arm: Add evdev to the TEGRA124 config List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 72a1920e73d11bd73b85e8e13caa1d838f9dbd91 Auto-Submitted: auto-generated The branch stable/14 has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=72a1920e73d11bd73b85e8e13caa1d838f9dbd91 commit 72a1920e73d11bd73b85e8e13caa1d838f9dbd91 Author: Mark Johnston AuthorDate: 2024-07-11 19:19:42 +0000 Commit: Michal Meloun CommitDate: 2024-08-01 08:06:08 +0000 arm: Add evdev to the TEGRA124 config This is required for the kernel to link after commit 13d00a43cba4. Fixes: 13d00a43cba4 ("conf: Add usbhid and hidbus to GENERIC* kernel configs") (cherry picked from commit d68d124817780db5f98f65ae02a7ce286cd426eb) --- sys/arm/conf/TEGRA124 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/arm/conf/TEGRA124 b/sys/arm/conf/TEGRA124 index 16cb5f95d26f..b1c5be8af587 100644 --- a/sys/arm/conf/TEGRA124 +++ b/sys/arm/conf/TEGRA124 @@ -129,6 +129,11 @@ device drm2 #device sound #device snd_hda +# evdev interface +options EVDEV_SUPPORT # evdev support in legacy drivers +device evdev # input event device support +device uinput # install /dev/uinput cdev + # HID support device hid # Generic HID support device hidbus # Generic HID Bus From nobody Thu Aug 1 11:51:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZS4F061wz5Sdgc; Thu, 01 Aug 2024 11:51:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZS4D4Xjqz4vR5; Thu, 1 Aug 2024 11:51:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722513116; 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=Bln8Cb8Z0xbCva8dLHqFVw8lQUqdwfNYNtgGP90SR1c=; b=gZGRyIq1pzQUsTKE/y/8Y7k4QdkqMv7c/zj505LpF1o9r5eWuh+CYnXzchD76S9pKiLrPV FhxL1LUk34m+dF+tYZTzyV9cBbJ0N5qT7mves+3xSU9M9CuwOxDvsvxa3PDNWANq13MGD2 pXHXevasB7pAS9JFXm8ZZRPzG3TLWN2+scXWbrWOTOsyj2oN3JM3RqV9eZE4WhR+LIfQ+9 x9TmBagztGUlusWtLQKQTg1xc6RoKk8VFGEz2mPZ7C6mz6j/pX7eJjx5kMZwwxfpHKEz6j DONT2tHGoU47hAEExG23/cgWFJ9aQ/Kq7yRHM+nh2lVlR4I8NIMihEdkZiBdpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722513116; a=rsa-sha256; cv=none; b=AkJTpI4mb+r0bYMFyynoFDPVm+Xz4pYGAtlU3JVJJGlcJYimrW+5vWmJUtHMIiYfmujCTW nFUSuqcKlD0V11OfyFiMFYkL+JQlu6ZllB03gPPlWXxwYA+APckzm646U0PJKPxkExqDSk 7X59AoPfdRaC4q/cKHY2hShEn+cB6yPnjaonX2qMo3yHv2D3sDK5Rt2IcbsT+6R4powxo0 XzEh9rC//CU7n3cjLinAQ5J41dgw9wpffdcFeWlSMIOABul6fNf9zqJGs/H/rUXxGgRZhC FPwbmQOxTMHvDmBxBb49xGYHk6X+7tNwoFkYrgagfCU38wKh0xeisxP86jEtgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722513116; 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=Bln8Cb8Z0xbCva8dLHqFVw8lQUqdwfNYNtgGP90SR1c=; b=RXDr/7zPd91NshPss7Upb/FCuRhY6m3mttE3cqBBjxB0lj1R+JX9H1NRj8YyypFZyMDaOW ScfYG/UHNlzQEZsMfF6y+aSwoV62b5acISAQU30bbbMI7MWWiuAY5sw1ObG0G5FwpcAted mQuMv5iJS1qkkrncEI2vmvfdlm0CzZ2BZQ2lSRDPhbPm8CKlCsWdMZFsAbh3cUpn8RIC0I 7o4Ah048megPiN0WFSDZEnQsxyOfmP9B2sINmId4fTe5EDJGoy4WisCzTwH6+KKdUVllnK d9Y49odwwo4VFWvoN311MRnz9CbMWuMtATxmrC555mNPPG1r6N+VAw+9rq9Iag== Received: from [IPV6:2601:5c0:4200:b830:acf4:e2b:3120:f19] (unknown [IPv6:2601:5c0:4200:b830:acf4:e2b:3120:f19]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WZS4D2hvqzN9b; Thu, 1 Aug 2024 11:51:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Thu, 1 Aug 2024 07:51:55 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 66158bda905e - main - ObsoleteFiles.inc: Remove CAM.4 MLINK Content-Language: en-US To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202407311926.46VJQCOP077960@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/31/24 17:16, Warner Losh wrote: > Thanks! > > I'd thought about removing it, but didn't want to always remove CAM.4.gz on > a filesystem that's case insensitive, which will remove cam.4.gz... While true, I think that's the far less common case where 'make delete-old' is used. The only case I can think of where you would install a world onto a case sensitive filesystem and then do a delete-old is if you are cross-building images on a mac (and running makefs, etc. there as well). However, those cases don't always use make delete-old. cheribuild just installs a new DESTDIR each time for example. -- John Baldwin From nobody Thu Aug 1 14:47:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZWyX0rQdz5SswD; Thu, 01 Aug 2024 14:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZWyX0LHZz4HQc; Thu, 1 Aug 2024 14:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTCEcOZvw4mqPDYom5BdiBEADxh8JmYWY/gvI/Kl+wk=; b=Tz0pUw8e1CLHFtsAJvym7TFbuLsYsXFTeno/wVbwc1xFirdpFtb7XMjraF0IhnNLMgoi34 U0Im/m/JPvyBdLIfaSfRk3eWXFLnbus6T2ejX3NSIyC+9Fn5Gtxx/s03rIcZ1ZHeuf6YDM fa0sPirnm6m0owZAuVfDo6Bu1nt15BZ31h+72ITjSmFme7vIAbAi6bUtvHdB1Chs+5yqnv 1l4WA2OH+vppwRlx3Fxlu07AXYFxge6elueyrntN83eUoGKVYxUiITO9DFeA+Xei9l5Js7 CG+aSDFAWLEAJLZSJE3h80qbxixX6AAK5iNoIkaYC0tURFQuasCAfsmmh/d7vA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523636; a=rsa-sha256; cv=none; b=l057Dd7DplQ/QFsUoGs8KSr55S8rrMV9c6kuUJ4WteMtCJqoUeNhkW0NQ6yMkZ5eR1JY+/ QPuonXEOwAt3+uXpO1ndnoyP3vJtJ+nSuSm5Vw/UM9JRaybZQWKkX6aIqgF7HmnMGNOAsy UliUB5wE1cUTP9BgEU8Y37XHRZqFKojA3WmSxt6AkEHEv07ZfTLlwmH4WQ3r6jLH9gDxLG NznGYfT9bChGQXBUWLcH++bqRhrf+4u1s9FaQjzKtM7WK5NxrOF50UVfEYpivl16c6bsGU jNcUsYJqFSU9G121DHnSSccbQ53BL09ZrDLb/1brOmjq+Ci7swxn43x8iekqTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTCEcOZvw4mqPDYom5BdiBEADxh8JmYWY/gvI/Kl+wk=; b=sQE9+yZ+NYT9133ZIkrsjaIV6wdZFznj6B1LKLae2jQTy7ifvai6LWP1W96ODPtxGH/MCM tT2TIMJO5vCT5bUnrDMdpoiU0snrmJ95h+7Hbt0UlJP4vbWPKi/tpQCvWr5xaKIZMUNpn8 ZZKEug+w4463zrqevjz2IykRvTW8AoP+/po9+3d62Y6RsmUKmlXpbXAuxyWauZ2GgAW8DA EpW+WxQzJZH4g9tgcHZqRRBm0Aw1yZhflNGqoYRyBKpZdpfqU22a+QGi7y7nM9RRi79nSA I20EVflXoUAm+85e3BneoE3r/iAzfk48Zcud/8DjweRmk0GzQHPav0sb91bU9A== 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 4WZWyW73QZznc1; Thu, 1 Aug 2024 14:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471ElFvT039928; Thu, 1 Aug 2024 14:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471ElFkS039925; Thu, 1 Aug 2024 14:47:15 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:47:15 GMT Message-Id: <202408011447.471ElFkS039925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f8c73ba5981c - stable/14 - mitigations.7: mention supervisor mode memory access protections List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f8c73ba5981c6d66384d5c173b650906b9741ae8 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f8c73ba5981c6d66384d5c173b650906b9741ae8 commit f8c73ba5981c6d66384d5c173b650906b9741ae8 Author: Ed Maste AuthorDate: 2024-05-31 14:13:11 +0000 Commit: Ed Maste CommitDate: 2024-08-01 14:46:46 +0000 mitigations.7: mention supervisor mode memory access protections Reviewed by: imp (earlier), olce (earlier), kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45420 (cherry picked from commit 72ece341b42707af7837357dbb1f2c2fe17507fa) --- share/man/man7/mitigations.7 | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 index 950d84042c71..f68e3041c88f 100644 --- a/share/man/man7/mitigations.7 +++ b/share/man/man7/mitigations.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 6, 2023 +.Dd May 31, 2024 .Dt MITIGATIONS 7 .Os .Sh NAME @@ -234,8 +234,26 @@ and it is possible that some applications may not function correctly. .\" .\".Ss Stack Smashing Protection (SSP) .\" -.\".Ss Supervisor mode memory protection -.\" +.Ss Supervisor mode memory protection +Certain processors include features that prevent unintended access to memory +pages accessible to userspace (non-privileged) code, while in a privileged +mode. +One feature prevents execution, intended to mitigate exploitation of kernel +vulnerabilities from userland. +Another feature prevents unintended reads from or writes to user space memory +from the kernel. +This also provides effective protection against NULL pointer dereferences from +kernel. +.Bl -column -offset indent "Architecture" "Feature" "Access Type Prevented" +.It Sy Architecture Ta Sy Feature Ta Sy Access Type Prevented +.It amd64 Ta SMAP Ta Read / Write +.It amd64 Ta SMEP Ta Execute +.It arm64 Ta PAN Ta Read / Write +.It arm64 Ta PXN Ta Execute +.El +.Pp +These features are automatically used by the kernel. +There is no user-facing configuration. .Ss Hardware vulnerability controls See .Xr security 7 From nobody Thu Aug 1 14:47:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZWyY24ykz5Ssqt; Thu, 01 Aug 2024 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZWyY1f2Yz4HLM; Thu, 1 Aug 2024 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YfrEBTl6RFAk6HkJpDVLyDSTeUtgV0BHT0m1WK0OvPk=; b=m23/UOSECY+nNJhKU4WDIZcrlOQTm0zvA5YJinCboC1rH9gfrivRjMBjMX+mpPR0hrL6kC 0Ro7PFypxLDdHLtUkqZSjqGGyP1GQ9XHvRsopvDKLShzHAchPGdQTyDOm9mZ8sk39hUBjP T/x9gSaHDtPvy+Mm3nGXEKCjIq2zuCzhJ6zQFyAExZ0nCxALb6RYUTQ6DTfI7QcBUk9J6h Aw38HB7Ck4h6VUypS3TivR9MxhHpVMvRJVYHVSeykWwXFJOvm/acFD+gYqMJIY4FGCCDN/ Oyo2o85etzZx6hpRykwLNF3tG0L5DgPn4k8Bj7ZkDlMWWvlRpyyDTXTcjgqrKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523637; a=rsa-sha256; cv=none; b=LHY5BJFRRn0ULpMZ8UfAsEWVfDQ5738sr8MaCFGEvDYYPFFhIS6jOA7KS5jM0gCyHJ09fk YhCp5UbzmPQkMNL3kTy3mvYQnxJrUcPKiIXUUva8KatjR4i/cffordyWNZ15xn3eEBPbtz POuTS3jw2AVwgXy97ilLmpt6ZguVPW1OF65DBkZKIW+u8FPN1PIp7g5h+4mVQ/8yjOkAYB 30ad4vDNuLGWgL051D592ss/7kDPppvupbD9Tj+vpG5Id7k3wIDGXrGEZoYqF88AePomFx sEyrifiO0WMycbzMPRgnqSk01ZRydpbLmv+vqOVHt11Jq5dJS7BRgbJjHfCpHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YfrEBTl6RFAk6HkJpDVLyDSTeUtgV0BHT0m1WK0OvPk=; b=ZZ0vE1dBrYEWvvGHynCeT1VI9VbI9lckBP0vK3dwzaAd0gPq/x4eV7dzFC/GP9QtHufBE4 plV4MDnTtth9vcTrn/Cr4ZYTjKbS4UcRR6fMvNQrbowsMgfd5uT2KkKhnbvKWYHLlFhts5 8351BHngIQhT5dyZNPEPiyXcl/lqRnGLg5F+KIRKM/SiY1Y61E4lRipeFqUHmMfbVJWa9w hMDJgN1XzSwLHl1qidieQHA9122Zr8//Fx+I8V69+XdlQ+y8KqdsC0+nbokzMznz9KJelX B2bRxfrfR8vk0CbJcAXrY4ccMoo1WIpWpLB1h4VyliHV7/4BaUm2NHcKVthehg== 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 4WZWyY1Brqzpr6; Thu, 1 Aug 2024 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471ElH6Z039978; Thu, 1 Aug 2024 14:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471ElHca039975; Thu, 1 Aug 2024 14:47:17 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:47:17 GMT Message-Id: <202408011447.471ElHca039975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6f303355dca2 - stable/14 - mitigations.7: uncomment reference to recently added section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6f303355dca2a5619f0bcaa3b08621a06e0b1ba7 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6f303355dca2a5619f0bcaa3b08621a06e0b1ba7 commit 6f303355dca2a5619f0bcaa3b08621a06e0b1ba7 Author: Ed Maste AuthorDate: 2024-06-01 11:52:31 +0000 Commit: Ed Maste CommitDate: 2024-08-01 14:46:46 +0000 mitigations.7: uncomment reference to recently added section A brief description of supervisor mode memory access protection was added in 72ece341b427. Uncomment the existing reference to this section in the table of contents. Fixes: 72ece341b427 ("mitigations.7: mention supervisor mode memory...") Sponsored by: The FreeBSD Foundation (cherry picked from commit 166ec3e86aa4a48bdf2a56ee065f0173bbb8f745) --- share/man/man7/mitigations.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 index f68e3041c88f..db1b3244862b 100644 --- a/share/man/man7/mitigations.7 +++ b/share/man/man7/mitigations.7 @@ -56,8 +56,8 @@ Relocation Read-Only (RELRO) Bind Now .\".It .\"Stack Smashing Protection (SSP) -.\".It -.\"Supervisor Mode Memory Protection +.It +Supervisor Mode Memory Protection .It Hardware Vulnerability Mitigation Controls .It From nobody Thu Aug 1 14:47:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZWyZ5sfkz5SswJ; Thu, 01 Aug 2024 14:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZWyZ2Ww1z4H97; Thu, 1 Aug 2024 14:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UFQVIKFlMHbF8M15SGh0gpf1x0CvWpod1SnqqUvWszM=; b=ikauYvceQvCoyQboehBgzq55R8RI5JagL+AD4Zb7siMtHMX1rbFcuHwaOnMkgfTOG3AQ/8 6bzkaUZzK3EbF3QAUNXh2UgT9CtsBP/Nv1IjrWoZMWgQmvNivN3RLr2V9HsTtqIEEk69Lg wcnIsAIHV8mI5scdkY5XmQIE4f6q+YfOEeRKri7mMndQB34PZLwpKc9XIR+BwRLlaCUi+u DmjfL1UaljFkEdy7a7Zip9v51hmNp83WUIqHLa1Hd4aelzeDOVBHoFJIWMLqDoV+1Wsfya icRwybayl4EO9OqLn/YcCYBLooJrb72HAE8mgSx1s5kOn/Rckb9gGkzFa3l1fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523638; a=rsa-sha256; cv=none; b=R0jVOXzp+pYASDKbF2i0ZSaAZQQazDYomDFmv7IyeL8Qy0cW15M7MmLSUymqlzdvaVU1Al y4DsU2DZxGVoEPKnRrq7mlDN1zEUne8JN+mCToSKVQW3XAM5hcECvqw5oEtjzY8gGMRYiC ZaGNG0ClVUAJIpZAnfU2cs0Mw/Ap5FWkZNmTlLVCTqZnIquusbukrr0boGb0Pn5ZwQh+JS OMJ2IQ/nlKAZS/PcuqGyrWXt59b3+mV9hNj3MSj3D+UOlswYtQb0qP24MNsUeM4qgTeopO EounMZqs+slbbQy7w3pgRRyEVsbT1uUoElKH7qq7H0CbtGYnf9Yssp+jOsgeZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UFQVIKFlMHbF8M15SGh0gpf1x0CvWpod1SnqqUvWszM=; b=WS8yz4S7fltI1oAzvZgP88WekvJUi6kuhKmpBhdB4kHNgZt9kFt9mR7MnQjdNJT5bU0GjV qN74C6uuzItMHeydiwybYgxqcBj+8MoPO9A2kWw+xPZMHPlw+c2Nl6gFqyHE1K8FmQTrzl Zho7MVcXOXx3UC0frzMRHnypCn+HkT9RaXYXYI5iGXcBdn2bsYyos30+tB34sFYR5z39pH Z+LCWOwW+L6aOmYZurUlHJc+2OlPbwYE5nwgdglINl8cK8C0ZBD4LkO/uK4d7vYTJJ3CSl shmNq03p+m6sRPrUzIdkWuhbqnhlbway6+8286nTrALapfe9AjbTko56ZlAckQ== 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 4WZWyZ1wspzppN; Thu, 1 Aug 2024 14:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471ElI8D040031; Thu, 1 Aug 2024 14:47:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471ElIKB040026; Thu, 1 Aug 2024 14:47:18 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:47:18 GMT Message-Id: <202408011447.471ElIKB040026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8b5df7e36afb - stable/14 - mitigations.7: move SSP documentation from security.7 to here List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b5df7e36afb64617a0ff9e3692207537472a262 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8b5df7e36afb64617a0ff9e3692207537472a262 commit 8b5df7e36afb64617a0ff9e3692207537472a262 Author: Ed Maste AuthorDate: 2024-06-01 12:07:38 +0000 Commit: Ed Maste CommitDate: 2024-08-01 14:46:46 +0000 mitigations.7: move SSP documentation from security.7 to here Stack Smashing Protection (SSP) is a software vulnerability mitigation, and fits with this page. Add a note to the beginning of security.7 providing a more explicit cross reference to mitigations.7. Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45435 (cherry picked from commit 297bb39b6f0fcfc5d571dc77008eb7acf138d279) --- share/man/man7/mitigations.7 | 82 +++++++++++++++++++++++++++++++++++++++++--- share/man/man7/security.7 | 10 +++++- 2 files changed, 87 insertions(+), 5 deletions(-) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 index db1b3244862b..4beaa4c9f46c 100644 --- a/share/man/man7/mitigations.7 +++ b/share/man/man7/mitigations.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 31, 2024 +.Dd June 1, 2024 .Dt MITIGATIONS 7 .Os .Sh NAME @@ -54,8 +54,8 @@ Write XOR Execute page protection policy Relocation Read-Only (RELRO) .It Bind Now -.\".It -.\"Stack Smashing Protection (SSP) +.It +Stack Overflow Protection .It Supervisor Mode Memory Protection .It @@ -232,7 +232,81 @@ preventing attacks on the relocation table. Note that this results in a nonstandard Application Binary Interface (ABI), and it is possible that some applications may not function correctly. .\" -.\".Ss Stack Smashing Protection (SSP) +.Ss Stack Overflow Protection +.Fx +supports stack overflow protection using the Stack Smashing Protector +.Pq SSP +compiler feature. +In userland, SSP adds a per-process randomized canary at the end of every stack +frame which is checked for corruption upon return from the function. +In the kernel, a single randomized canary is used globally except on aarch64, +which has a +.Dv PERTHREAD_SSP +.Xr config 8 +option to enable per-thread randomized canaries. +If stack corruption is detected, then the process aborts to avoid potentially +malicious execution as a result of the corruption. +SSP may be enabled or disabled when building +.Fx +base with the +.Xr src.conf 5 +SSP knob. +.Pp +When +.Va WITH_SSP +is enabled, which is the default, world is built with the +.Fl fstack-protector-strong +compiler option. +The kernel is built with the +.Fl fstack-protector +option. +.Pp +In addition to SSP, a +.Dq FORTIFY_SOURCE +implementation is supported up to level 2 by defining +.Va _FORTIFY_SOURCE +to +.Dv 1 +or +.Dv 2 +before including any +.Fx +headers. +.Fx +world builds can set +.Va FORTIFY_SOURCE +to provide a default value for +.Va _FORTIFY_SOURCE . +When enabled, +.Dq FORTIFY_SOURCE +enables extra bounds checking in various functions that accept buffers to be +written into. +These functions currently have extra bounds checking support: +.Bl -column -offset indent "snprintf" "memmove" "strncpy" "vsnprintf" "readlink" +.It bcopy Ta bzero Ta fgets Ta getcwd Ta gets +.It memcpy Ta memmove Ta memset Ta read Ta readlink +.It snprintf Ta sprintf Ta stpcpy Ta stpncpy Ta strcat +.It strcpy Ta strncat Ta strncpy Ta vsnprintf Ta vsprintf +.El +.Pp +.Dq FORTIFY_SOURCE +requires compiler support from +.Xr clang 1 +or +.Xr gcc 1 , +which provide the +.Xr __builtin_object_size 3 +function that is used to determine the bounds of an object. +This feature works best at optimization levels +.Fl O1 +and above, as some object sizes may be less obvious without some data that the +compiler would collect in an optimization pass. +.Pp +Similar to SSP, violating the bounds of an object will cause the program to +abort in an effort to avoid malicious execution. +This effectively provides finer-grained protection than SSP for some class of +function and system calls, along with some protection for buffers allocated as +part of the program data. .\" .Ss Supervisor mode memory protection Certain processors include features that prevent unintended access to memory diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index 71107b29ba11..697d860a9836 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -26,13 +26,21 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 5, 2023 +.Dd June 1, 2024 .Dt SECURITY 7 .Os .Sh NAME .Nm security .Nd introduction to security under FreeBSD .Sh DESCRIPTION +See +.Xr mitigations 7 +for a description of vulnerability mitigations in +.Fx . +This man page documents other +.Fx +security related topics. +.Pp Security is a function that begins and ends with the system administrator. While all .Bx From nobody Thu Aug 1 14:47:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZWyb55nrz5Ssmy; Thu, 01 Aug 2024 14:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZWyb3WQ0z4H6R; Thu, 1 Aug 2024 14:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+pGZjI6zrea3SpA5W8tduDGrwyRyHDaMlQFd3H6uTh8=; b=APVJiHIKXFYUzDTMFoYClQXayE2sUyYimPV9u40Km81zsFsEmxhW+iLmtwxqRT9V692rAX fZfP9pqqzyb7BZ5aPV8fg4pWg2axVmWSCRbds6kINaIXkmU4hXH1gtU2CT0nI4P4ReYvGZ 9YhhIspZMTiwhfyRn709Z3KRAViVzxmoy/euJucKK7po+VR2+OBuqAZ+/5UU8jI7U9EXvA QudxKeMCRD8T9WrZjl0berkcnkumsLJ2V83III8Ju1fLJ3gp8g4S//iN1S0TFMf3GK0O0L 9bxdBw6h1pkfUjhutcajZDJ9dhBhWDDhy2bt2CYa/DM3m07gUfde9AWzdchl1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523639; a=rsa-sha256; cv=none; b=TmXOjCfmozxI737KmtciM8/M60Io6A6hR1Swq34vYQQR40VQpmzyev3Nwo0o8QDJQQ6TJm q7UCIqrcKkIJAtUGOaCVstv6xA38Zg4vxAMVJMY7xbkas+MnnCu5jPln99w238GLyWlyyc RrOQCthzrmQoPDuZIrxfvVCt8vPp2BVufIqeaHefosZaA8P1VBLECvWRuY1exvcPJIkU/m TuHvHxNFSPCN2yi8mArMdG7cB1/Rb+w/YDtTf842hDgnJ1j0pNDZxW70OOvjctjLmJy3Bi PI/OwB5YTUFxLxvYgKQH4MF2lJFsG1NlQp+OVte9MO+zTfmfFeHLya4MYgg+qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+pGZjI6zrea3SpA5W8tduDGrwyRyHDaMlQFd3H6uTh8=; b=VSzL3HiCjtN0aouzZANeINOKs81mTizubu8imRxsEg82aVnU/n/LKOChMRT15aeOgZ3jS3 LTjgcdTc9l7VOcpE5nHOAD3vjDSx5mM1Jqe8yDcrc7Slmb0rbB5cuG0cygtDXfAtuJ25YG cOZTMH2kgWSJvWiXz6BGVpxEAGVxDIXfRINDCOMxAx3E6EKYvobKIs4vEAMImSqUNem5w6 ky/YlSN9Pz0gXE452JavRB9mjzYh/exxVNh9RgrigVZbpgjahUmb36Dj4ocaXM1KLLQdOj vd7vhDF/dytHzBLEN2atmb0u8NzTgfCCLRxbxMP1WM7G23Yok26e3xwsVxBjxg== 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 4WZWyb33sRzpr7; Thu, 1 Aug 2024 14:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471ElJcQ040074; Thu, 1 Aug 2024 14:47:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471ElJpY040071; Thu, 1 Aug 2024 14:47:19 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:47:19 GMT Message-Id: <202408011447.471ElJpY040071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9420f5d40d11 - stable/14 - mitigations.7: Document riscv's SM[AE]P equivalents List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9420f5d40d11a84f4d26597b225802fc057e0430 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9420f5d40d11a84f4d26597b225802fc057e0430 commit 9420f5d40d11a84f4d26597b225802fc057e0430 Author: Jessica Clarke AuthorDate: 2024-05-31 19:54:59 +0000 Commit: Ed Maste CommitDate: 2024-08-01 14:46:46 +0000 mitigations.7: Document riscv's SM[AE]P equivalents Its base privileged architecture provides these. Read/write is toggleable via the SUM bit, so use that as its feature name. Execute is always-on so has no name. (cherry picked from commit a5ae2d2ab409834c28e71b1dcde4ebcd0d9b3671) --- share/man/man7/mitigations.7 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 index 4beaa4c9f46c..9dceffb368a9 100644 --- a/share/man/man7/mitigations.7 +++ b/share/man/man7/mitigations.7 @@ -324,6 +324,8 @@ kernel. .It amd64 Ta SMEP Ta Execute .It arm64 Ta PAN Ta Read / Write .It arm64 Ta PXN Ta Execute +.It riscv Ta SUM Ta Read / Write +.It riscv Ta - Ta Execute .El .Pp These features are automatically used by the kernel. From nobody Thu Aug 1 14:50:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX2814lwz5Ssyc; Thu, 01 Aug 2024 14:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX280TPgz4JSL; Thu, 1 Aug 2024 14:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X07Rmka7u9m+g8hY0pP9+2aBZH61ddjD5bUc08/fHhY=; b=a4vSJkSqjRHYVcSnd4fYzaugieBDeSiTLFgz9INDr7qRLpmJ+PBG283mTkXRGWLbdjbkzI QarSfHrxUgFoh0FcHN6nd4Vpeif+2hFPeKprtABfDl0AXk4JWGx8I74SLvNaKM+NhOmDC6 qJ1MrNdAlFyT383ACnovEwQAeOEA37dxZyjSVJSwZEtgcndSg5+KK8kqIRotckJpEfoH1v 4XI369qTTAU1R+Uae4nmKQIBe+cz3NIUx+KBcCqcE3QbTM5QZj5Ml93vELg3aH/+WXeSeU TfKSWo5b7rD9XJ7k69eO28cr7OYVF2eaPnx0V5lEmUCNxX8g5KUnei3u/Wjwnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523824; a=rsa-sha256; cv=none; b=eJ5TJfnX0fXQnsG6TOW5Houkt8AVwWm8BC5uoLCPeWvB44c/y/JlVysO26sNeV1qjrwq8v c+1g7snhGRhSKsgv/8ZU+LnFAeD6SAgfUmsMTMogVjlAm4ZKwdvwVIWtRacf59WCknMMt5 kH4Iv6hpwsR9r3fPotVAY3ruiFML27Mt4WhBQTEWybDDFaAvtxcz8aNEnOKd9BRDjmqEEW 6qnbhLkIYqf7IlZgFTP59/U8hSdX5jC0Yr76+GP7KDqOXp870nxBz0rUB62nYZFk13JGR+ Kh9QLAjatxY6T6pLeVpjjs5/+2ZgZH6mC1ycHNwAzxj1oh/y+kP+DjPKiTFtqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X07Rmka7u9m+g8hY0pP9+2aBZH61ddjD5bUc08/fHhY=; b=YtKylH+kg8o8iKc5P3LWDZXmWfIytw9en5NJO7h/zRyp0j481RQtdqAH9LaIknWmM45P/c a5ZRXgafvPCgTZVfHPWV0b+EYuWiJX9jPhZcP+mbiLqko/dVCDvjtjiD5IUt4QDfcdmRq6 t9j/mRgWilOHdDBoSa1cugVg+SaxDFQAVMmjmL+/Cv8AIpMuJHd+xrgcSdKHVePQAyTf1y f6YAz+OloCUKcuvryDa+TPSSaVFHTQ2f8t9B/WVM83dS8i2JDPqz5j+MJ5bYw2wIEEEbC9 DcWD4ojs3hEMMs8UfIvVu6wh9ZTe9+72uay7RpvX/3DyqWyh4xgsbyMRXFLoOQ== 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 4WZX280427zpfK; Thu, 1 Aug 2024 14:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoN4P049333; Thu, 1 Aug 2024 14:50:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoNql049330; Thu, 1 Aug 2024 14:50:23 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:23 GMT Message-Id: <202408011450.471EoNql049330@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: b56cb540dbfa - stable/14 - stand: Stop building in fat, ext2fs, gzip and bzip to BIOS /boot/loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b56cb540dbfa5d0d79240eb9f28f333d7d231e48 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b56cb540dbfa5d0d79240eb9f28f333d7d231e48 commit b56cb540dbfa5d0d79240eb9f28f333d7d231e48 Author: Warner Losh AuthorDate: 2024-07-25 03:15:28 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:53 +0000 stand: Stop building in fat, ext2fs, gzip and bzip to BIOS /boot/loader This saves space to allow pxeboot to work again. Users desiring these features can turn them on for their custom build. While these are useful for some specialized applications, they aren't needed to boot the typical system, and we're low on space. text data bss dec hex filename Before: 465866 20740 31612 518218 0x7e84a loader_lua.bin After: 441535 17484 31092 490111 0x77a7f loader_lua.bin Savings: 28,107 bytes Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42416 (cherry picked from commit 195a96f0b303345818e09ad1d79dc80122804de8) --- stand/i386/loader/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index ab446d67225b..a4aa3a3c4d45 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -4,11 +4,11 @@ LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes -LOADER_EXT2FS_SUPPORT?= yes -LOADER_MSDOS_SUPPORT?= yes +LOADER_EXT2FS_SUPPORT?= no +LOADER_MSDOS_SUPPORT?= no LOADER_UFS_SUPPORT?= yes -LOADER_GZIP_SUPPORT?= yes -LOADER_BZIP2_SUPPORT?= yes +LOADER_GZIP_SUPPORT?= no +LOADER_BZIP2_SUPPORT?= no .include From nobody Thu Aug 1 14:50:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX291yrCz5Ssr6; Thu, 01 Aug 2024 14:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX291RjKz4JHJ; Thu, 1 Aug 2024 14:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yOpedQ1gGCbAD8wS6jvft0W3NHYmUHiXsRDeRrsWfa0=; b=JnpaMZI5x1H9JlWJelZx3/rw7gOa//5mJljwIYIk6jSi4e/5qW5WSP8JpLL9Od3gzaBFuB ur3KCJwmp6JSXWq7wx/NZ63EzjU9m47YsZOChmT9WS0WUi2Hk8f22227zYalSz7uqcGhrm tdEFU9tppfJswTXeVZjf91B9lRNhUzBPQBQdJt0s4wIlItaxkPsLWoSgbaHU1GFUeYiN5v iegqaxcyOmhP/re4t+8tw4K1FEcI4RW4uzhrIo21XfwCU7RX35Pi8ucohBbW910dOx5O8N qqf9ABEFpTzykhW+1+IUIFFz7H4h7E34+a6yB1n6dQMjW5Xo4vbUiQnWTUTZLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523825; a=rsa-sha256; cv=none; b=fy1nLuXfS38RussjAH77bMg2XDr0o05LexFNa534EiDFZanP2AMMnejXuDQnx9Q8nUp3qa TkpKdSmicYzzK1H4yYiIwskRXn5NNlZu8rJIgtu72SSLGApeOiYKtTk+hNUPbOSF53oyUc ZED9lbqLTBpjaORp2vYKS6Ms8uHDZQA719LuA7i17uP6Zj80tBE2E3e79bWXzaLkJNmzkj CSNbPlx9V9AdfWhIZImRlw3byjZz8Xbe2JIR12e9e9OVCTYbdtn14q5X6i5AAMMmvShhiU Z+gj6ijhDfcvBlAXqK76YBxNZ/Fv25t5xE7ZtxvXKRNvbzF6FndJLN7ijKaryg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yOpedQ1gGCbAD8wS6jvft0W3NHYmUHiXsRDeRrsWfa0=; b=SEachAZWHN0ZiNbZGw11Zecq20cjJSdFgUeEBukUxWvXUWgy8uDuQ3JVxS6EimhGllihYx CU1ItzmHXFIYJNou0ep+/bwtfM7SW6lDzslEolEbtD0L63gqQPhEg22AmBz+vKMgzKE03m w53Qv0NU5u48mvF6hFXg3CT1+DyxM8DaWPMNgAoVN3BPYN0CfE7/ro0IgmGRaB5NweVw53 E7jk6pOuvQqp9usfJoI5htNoTUFjqvDSNsiIUoL1dGllfYMtoX8NFxFWsehjzbAKJF5DzJ byFkSlQCjZNImrFvdSR+Awi3GI0OdKJgXv1DYEBBPUcMU0f+fVMp3gWrbyQBFw== 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 4WZX291228zpfL; Thu, 1 Aug 2024 14:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoPYC049372; Thu, 1 Aug 2024 14:50:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoPkB049369; Thu, 1 Aug 2024 14:50:25 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:25 GMT Message-Id: <202408011450.471EoPkB049369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 384215cb9a3d - stable/14 - stand: Remove obsolete junk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 384215cb9a3d2b9c98cb81958612cb757883d0fd Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=384215cb9a3d2b9c98cb81958612cb757883d0fd commit 384215cb9a3d2b9c98cb81958612cb757883d0fd Author: Warner Losh AuthorDate: 2024-07-29 22:56:28 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:53 +0000 stand: Remove obsolete junk We long ago changed newvers.sh to make these comments bogus. Remove them since every single one of them is broken after the $FreeBSD$ removal. Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D45879 (cherry picked from commit 8165650389ba2d0a68cea6902ac3750055cad9da) --- stand/efi/loader/version | 4 ---- stand/efi/loader/version.veriexec | 3 --- stand/i386/loader/version | 4 ---- stand/kboot/kboot/version | 5 ----- stand/powerpc/ofw/version | 4 ---- stand/uboot/version | 4 ---- stand/userboot/userboot/version | 1 - 7 files changed, 25 deletions(-) diff --git a/stand/efi/loader/version b/stand/efi/loader/version index 2bed97c231d2..4d6c3592e10a 100644 --- a/stand/efi/loader/version +++ b/stand/efi/loader/version @@ -1,6 +1,2 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.1: Keep in sync with i386 version. 0.1: Initial i386 version. Derived from ia64. diff --git a/stand/efi/loader/version.veriexec b/stand/efi/loader/version.veriexec index 5c9292310c04..090267dfa9cb 100644 --- a/stand/efi/loader/version.veriexec +++ b/stand/efi/loader/version.veriexec @@ -1,6 +1,3 @@ -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 2.1: SMBIOS 3 support 2.0: Secure boot support 1.1: Keep in sync with i386 version. diff --git a/stand/i386/loader/version b/stand/i386/loader/version index ea8067efa243..e5fdb8976bf2 100644 --- a/stand/i386/loader/version +++ b/stand/i386/loader/version @@ -1,7 +1,3 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.1: New calling conventions for fopen. 1.0: New semantics for finding the kernel, new boot. 0.8: Set/getenv & cia, copyin/out. diff --git a/stand/kboot/kboot/version b/stand/kboot/kboot/version index b24d6ea8e47a..a142c2b0ce2c 100644 --- a/stand/kboot/kboot/version +++ b/stand/kboot/kboot/version @@ -1,6 +1 @@ -$FreeBSD: user/nwhitehorn/kboot/powerpc/kboot/version 224106 2011-07-16 19:01:09Z nwhitehorn $ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 0.1: Initial kboot/PowerPC version. diff --git a/stand/powerpc/ofw/version b/stand/powerpc/ofw/version index 145f69c28aa4..24bdc8254ce3 100644 --- a/stand/powerpc/ofw/version +++ b/stand/powerpc/ofw/version @@ -1,5 +1 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 0.1: Initial OFW/PowerPC version. diff --git a/stand/uboot/version b/stand/uboot/version index 71464740dcc9..e779e403e7ec 100644 --- a/stand/uboot/version +++ b/stand/uboot/version @@ -1,5 +1 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.5: Unified ubldr build diff --git a/stand/userboot/userboot/version b/stand/userboot/userboot/version index 3b86a26c72ae..f361513b2741 100644 --- a/stand/userboot/userboot/version +++ b/stand/userboot/userboot/version @@ -1,4 +1,3 @@ - 1.2: Userboot with lua or forth 1.1: Initial userland boot From nobody Thu Aug 1 14:50:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX2B4M1Yz5Sstf; Thu, 01 Aug 2024 14:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX2B29Y5z4JW2; Thu, 1 Aug 2024 14:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xwlm0OtKMVkmY24qkhmsEXpgA0e3ogvSwnQrINWo4hI=; b=bCA3Pry3QsNlwh+9gini23leERgeAPUlvWWrcBozoDBP94Iz8VPdVannpSkHyUfnzCpvd+ UqmWd+s1bFVLp1s3uUAHT8I2cRrWoLJYeFsiBrxkJr9fiwFDuN/ecSP9dmnmmaLWoVwJUn 4UMNBMcUdhuKrPnLJPGwyJCcm166Dz5x/KkzcvtdEZ4aU+/qPMZcNe+165EGZQonHYZnbI iUzwp306cZmXsHf/y/1L6myWJUyfN3OCAaHUPqmDTuYnNqKQKk5z77TSmcHEniU9UtOnqw kh3KN2A0s91ZUxCfS418Ro+ylQRlsUkYilWoEzQxgrsLHsogC7nLCsdEQ7hITw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523826; a=rsa-sha256; cv=none; b=BHejaN5LTvmNCIUpBRwxXAYXq7BCxw4Tx3CCSq6yCx6BjvLwgTg/1sS2rMoEc08Lr3S8Te 9YLU5NDCpY8U17ZYSdFnJGhXJt/GiVKCJ9u4e7ewSylGrVTXl4iqOCcG4Ac0Tr19i0aD3z P9gEZF4KWUxzl+PrEdLY2zCvzuK+yScEAg+g5see4mXsRiGPYLIcIpQa3h8xFvWPn2DmWK iqFBDpkWW6k+/9dcULx1itgLGu0O1rjOts0v9BN/lBM0bNtCfqjb/BSAWA7ZNPvbMxmrOK +Eo9nUyPD/Oq6lA8xz8jVmEN7eypJSOMWL81UsOmuiSD6+7BxFSjOH9DoM3h0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xwlm0OtKMVkmY24qkhmsEXpgA0e3ogvSwnQrINWo4hI=; b=tT3sai3J/tBf50Lb9oouCMR/PWPDv39eeXnsSQK1AHZH9acIR+6OzoCVghqj0UQGtVGDGz NRYVIDMq+LghBYucPkrJSr9+x1XEEILAduyk8PZyyth9Y018hs5rtrW2KDKGXgOB/Y0T9p X3gv3FZj4zOLXxusPazborDQl5VHGCFLC+G1mpIqmtxm3OGNB6FNb5x1fiAn6/k8ITjFBU ZXN7heIKFXJ622MBRUmo/WwLbpXfOYUEeRqU4s60VeevvcMymnCTZQdSvr+yfwrSlP2hCM lEaiS60MBhbdXIxb7mgbW1ZjTnKpZtqM1hjL0U7K14fDcZJoPcE1SBxPOt565w== 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 4WZX2B1hWLzptX; Thu, 1 Aug 2024 14:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoQkZ049421; Thu, 1 Aug 2024 14:50:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoQeO049418; Thu, 1 Aug 2024 14:50:26 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:26 GMT Message-Id: <202408011450.471EoQeO049418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7a50c3f63f54 - stable/14 - stand: Kill commented out line List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a50c3f63f542ba7a9b2d705591c6dbd47ad31d0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7a50c3f63f542ba7a9b2d705591c6dbd47ad31d0 commit 7a50c3f63f542ba7a9b2d705591c6dbd47ad31d0 Author: Warner Losh AuthorDate: 2024-07-29 22:56:48 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:54 +0000 stand: Kill commented out line This line is no longer needed as fallback, and should have been deleted in 7870a52598ad8 instead of commented out, but 26 years later, I have a high degree of confidence that old change was right and we won't need this line as a fallback. Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D45880 (cherry picked from commit 65300ca729452f62c201baedcbb4a67f2afc5ed5) --- stand/common/newvers.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh index 916fecb98334..369a1c7c76df 100755 --- a/stand/common/newvers.sh +++ b/stand/common/newvers.sh @@ -44,7 +44,6 @@ shift $((OPTIND - 1)) LC_ALL=C; export LC_ALL u=${USER-root} h=${HOSTNAME-`hostname`} t=`date` -#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '` r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` bootprog_info="FreeBSD/${3} ${2}, Revision ${r}\\n" From nobody Thu Aug 1 14:50:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX2D0bqWz5St2Z; Thu, 01 Aug 2024 14:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX2C3NKvz4JNQ; Thu, 1 Aug 2024 14:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6xXUZlDCtXy/HacouUME9z/sFdEDyiGUz/UepGlh9lQ=; b=XgPfaLTpPBzU82TyMlz9MZKBkIglW3WbgA8y4tUmT06bvpoxliBTAKTmb6F5/YZRUXsBGD h4E3R6UVxr+yb8jNiPIhLmQZgkNanhCYbawfIw4C59lWJEILWwOxccwZ0cS5zp3z+jkSbn Hg6Y7/gX7U3J5ImoGlnrTG5gNbiZWmwBItwpLjjsi9xXJrAm91w0P91+NSUBrrKbMM1Gqx rmyqlWp5qMBMmlN1L5kbZdw9Ch844IgX85teOV+3RXecW6kEha97XCULq3o6h6ABA/mosp S8iFj+69fJhSJZ9lysfJauHfFUZMLB7Bo9oKEVKdzb7klzg4MUUObFb1+tXK4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523827; a=rsa-sha256; cv=none; b=VO8SBXM2XMpcKgwBFhVtx5a62Z9fS6zZTKLyaogwip37QzHA/rQXJMHpRVXeo7+8KeaYl6 NUe15RnbL+kYckB4JBju72fg84borro/KnZOmdwZFasPKpxl55juJzv2ElHjIUL/b5QD0C ea8XE2Hd5cpeBNTqTxDLNCQbi5o6utamyX6+XHsu+/mlFjsl8LgisxaUl4FhBeIr5kAh+R tSnwXZYMsYdghxV+Li25p6nmTo7Rm7nk9LdxOLCqyGEtUkeIBHUlrggBO04Y4EOb3ukKCn k0s22bwkSG72xzdZN1+ALNuT/9M/TUUz6FGAIgiVlICtbU9F3qqpL9WBPXaMOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6xXUZlDCtXy/HacouUME9z/sFdEDyiGUz/UepGlh9lQ=; b=ZiJndwFHX/xVQwFoK/fao6AXiQ5VVuOo6hLmC8s3GdcUV+uyyoqj19y5plW8G24f+gVv+H ljMHUrPnT4vqtU9wyCWCT+i+JG7axOHoS/N7GeCuvbWp6+E3gWhxnjopEZJKyiDZ7LQX2J fJhP5V0FvVAH7tqLZgWEJ8QFt0sX0MMp7IgVCjowinjCSCBEcgPDQRQZmJWnpYZTF4C3kx ujZvW49ZcdkHNFOatUjYRAIQCLZNqLZ/TEVttpC9Gpf9D/C8boogSGzdpZzo5G430SzI8q FJBJNKiJsezOuoIPuSfFm2T7oJNQ7Fb0d8X3EuhZYqVszkA6cyCXSQyo2C8xvg== 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 4WZX2C2zJBzpKJ; Thu, 1 Aug 2024 14:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoRgd049463; Thu, 1 Aug 2024 14:50:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoRv5049460; Thu, 1 Aug 2024 14:50:27 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:27 GMT Message-Id: <202408011450.471EoRv5049460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 90ca43b5dcf0 - stable/14 - Revert "loader/lua: Remove pager shim" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 90ca43b5dcf0fbf6f28447a09aaee78ec3716d36 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=90ca43b5dcf0fbf6f28447a09aaee78ec3716d36 commit 90ca43b5dcf0fbf6f28447a09aaee78ec3716d36 Author: Warner Losh AuthorDate: 2024-07-29 22:56:55 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:54 +0000 Revert "loader/lua: Remove pager shim" This reverts commit 8b9178cd0d35ff2beafebdd51c8c44ba2b5aeb0f. Really old loader.efi files persist in the field. Revert this to support it. We need to support this through at least 14.2 now, alas. MFC After: 3 days Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45881 (cherry picked from commit b38a82c77ab90eace53c56151b191efd1f4a8439) --- stand/lua/cli.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stand/lua/cli.lua b/stand/lua/cli.lua index 596e55a8d1d8..6832da0a31a5 100644 --- a/stand/lua/cli.lua +++ b/stand/lua/cli.lua @@ -30,6 +30,18 @@ local core = require("core") local cli = {} +if not pager then + -- shim for the pager module that just doesn't do it. + -- XXX Remove after 12.2 goes EoL. + pager = { + open = function() end, + close = function() end, + output = function(str) + printc(str) + end, + } +end + -- Internal function -- Parses arguments to boot and returns two values: kernel_name, argstr -- Defaults to nil and "" respectively. From nobody Thu Aug 1 14:50:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX2D6lypz5Ssyj; Thu, 01 Aug 2024 14:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX2D4Rxrz4JT3; Thu, 1 Aug 2024 14:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=27DZwGuAeaKT2geGsUsoCxYsIpMlDTEDe31TdV5D0i8=; b=pfm/46bnsgIZRPkxXiaqfMYnErWRkp+wBtMFIiIqUwGHcOSmu+YvCjzN6/CWSvTP8lQ9Oo CMYj3QPtPGDRXUQkZa+n70sNK3gFWfnwsjA1hhUObeMJhvf6NLqOH0rf8t1etcYHwPBWB4 IVXfODkfUzVyGGntZo7Vd/51K1ZGOetPuSSuIqE0BpE7EWeuEi5EJ1iCZ3sFmVnILpIpju JrqY4sVe39djQnLpyYPLHPcEZcSJSv/DBefI55lTpl4U5B/FEos8A5md1+vxp/hjv1gZxK watpaPyLP4G0ImBw9yTdVd8TkWSEVcnJaczwj13OE66stjtU6dcdS8lGBo6Usw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523828; a=rsa-sha256; cv=none; b=UVxMad1jyPUXk/gXGkvY1deQGtbYblXB7ybH1Kh3DhlVGFbeZQRe5xuqdD1iDOOXcZSJot WSjZrzp0rx0eeXfROpQIUXAms7XCfaVvtRvBU2ZKgIQxgRucCHO0gff+yC48ZVJnmmDGyC EMF6VhoVpqgdPiJu9e+hCZ//cli6Y7DWLjxI8CndTY+fGF/d4+aEpPkK5KTSosN3Z505WD YyTcNDiAN5+rwM339ulIhbQZX3rTiEhw0qx0nVS4ZRR8Mz0YitLOWYry+xtavIQ1uyD5TV gMPMU2OfjO0R//WtWsnLMq7IkoRUmDXNhVK2OMd36IR8Rb/Gercb9P2NVmfLug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=27DZwGuAeaKT2geGsUsoCxYsIpMlDTEDe31TdV5D0i8=; b=TsNyO3g/EUqlW7dyi7QDfpvO1o1sscaidWIHOXdt35zUHr/TIEfaOnmL9kI9d4P8J2h2Wa v8jcEe5qRbh+KKdsrLFPkNK8t+O5moZeZlY7uVFxcvRDjw2drppncur3QZ2iHnhR/tcwuQ G26/1/stzmmyDaNqD9tEOYmA+Z4MspRisZ9OSw/bsK+DSyCC3Vw8lIjNffaspbPWfdBQsn BPJQ1VRSPL+2bFuh6CBBmWXtyH9RNRPtv22lW8wNT3aOp/9xW6JHg+TMLEKz9sRqTSUY7L mvszZXhnLgZpZBtQ624H+jh27qQBN8vSG6JIBcsXt1cYaffZ5muXUX1P+532qw== 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 4WZX2D40y7zptY; Thu, 1 Aug 2024 14:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoSWi049517; Thu, 1 Aug 2024 14:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoSEN049514; Thu, 1 Aug 2024 14:50:28 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:28 GMT Message-Id: <202408011450.471EoSEN049514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 598b9677b3e9 - stable/14 - Revert "loader/lua: Remove compat shim for loader.lua_path" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 598b9677b3e9ac01d81031d67426e49573b759d2 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=598b9677b3e9ac01d81031d67426e49573b759d2 commit 598b9677b3e9ac01d81031d67426e49573b759d2 Author: Warner Losh AuthorDate: 2024-07-29 22:57:04 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:54 +0000 Revert "loader/lua: Remove compat shim for loader.lua_path" This reverts commit ab97d42addae97a389c6f22d6bba62ed954bb8e7. There's too many people in the field with FreeBSD 12.0 loader.efi that stubbed their toe on upgrading to 14.1 since they'd not updated loader.efi. While we sort out that mess, add back this workaround. Can revisit after 14.2 maybe. MFC After: 3 days Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45882 (cherry picked from commit 522a65a8d97a0d6b634266f1b4a89aa8f374279c) --- stand/lua/core.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index eaabff6a7602..9226de564348 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -65,7 +65,13 @@ end -- message on failure. function try_include(module) if module:sub(1, 1) ~= "/" then - module = loader.lua_path .. "/" .. module + local lua_path = loader.lua_path + -- XXX Temporary compat shim; this should be removed once the + -- loader.lua_path export has sufficiently spread. + if lua_path == nil then + lua_path = "/boot/lua" + end + module = lua_path .. "/" .. module -- We only attempt to append an extension if an absolute path -- wasn't specified. This assumes that the caller either wants -- to treat this like it would require() and specify just the From nobody Thu Aug 1 14:50:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX2G0rTnz5Sswq; Thu, 01 Aug 2024 14:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX2F5GzJz4JTC; Thu, 1 Aug 2024 14:50:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7e+CJju8BIAuNmiVifPNYZFyPkCqhPITrwOS1nqaKA=; b=CZQ+I22cm/d+6HMPRE5aNFUbq3gmQlxCQhYs/2ASJqW68RB1tZySsA9lecyXshk/3XBnLW sZgCZVZUIwFE0jsxzAikhMcyLSDbd/qIA8KwFqdlp9VPVedFGWD/CgPFHt1zV8RKrqWMO8 tRSxOduPp3mrZA7tbQABNBSBWN8HKRn0DTcnAYoQnOdK0c6oGhBxlnd8t7yJmEWYWeBuYR AoaRSwcvjlrPQB6i1DauoACXApb6GSQNJA+kvkEbJF+PptWLxHC4vPZ5HJNdtCW8dixgdE CsfIFq3WCM4ja78ZQEnd++g2B/XEDOaIw1wuSVhTMTpzXIVgRDBcw1wlifyoiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523829; a=rsa-sha256; cv=none; b=kMLF5x82H3kiXTS6mkXeGudPofiKUUsWp4UZOKx7vqKJ9OhdtEi3SiZJkfXEElihz2vd0C gF/CLkhGjXWF2WayBMt+auOkMa9AONzHgAdxNe6qQQdMC/1hbpXNTIXcRW8/6G/AarM2xT /JStWNcymVPGh5p8IMcLVPx8QEIC/hZlhEKEHzy154nUqLck5g2sGWF5F4y6wEextKK5mF DjjWWgtfohCwFewyp/IEPo7/bxXK4DOLG9Gu0B3RDXMHY0X9aolWSeJ/YkcM5Av+M2ThlN Vug28uqPBGENrv9OQCzuS+XAmFJhd5HEkio1hYuhYZXCSZoZW4orGs9YO58Dtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7e+CJju8BIAuNmiVifPNYZFyPkCqhPITrwOS1nqaKA=; b=vL73AXXlhjFzwscN/J87vN/9ZjgGyBGXlQ+t2zvTL7j+OCSi+BYnhWox1X8MM1Z7jWHHON sENDnuOx9heYHR9WG6HxcTxKEPqQVM7l079KO8pXAtwc6Rqs8nj85IprlrxcDFTvMwBieH bXHZ8FdD1AwmSZgOHN0TAWXl/NlLpptRNN2AEPuKlXPMEr1nIZB1cHnJiYMw2FBViSgVBf G3sKqIbMPlgPHNFOC/TeANt4eXFerQTc2/JC7gjCvMiK8YPdUilJaBhMeOIWuRGyss94z4 RnTxoeGImh3yx758tMwp7ouQZJ1/nvC7k8nD5jzTVhZo4GfIDc+dopnXX99Ibw== 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 4WZX2F4rnxzpc4; Thu, 1 Aug 2024 14:50:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoTlo049562; Thu, 1 Aug 2024 14:50:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoToK049559; Thu, 1 Aug 2024 14:50:29 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:29 GMT Message-Id: <202408011450.471EoToK049559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7ffa3b0f69dc - stable/14 - Revert "loader/lua: Remove workaround for command_error" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ffa3b0f69dcd59dc16dd652744a0d52d84954ed Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7ffa3b0f69dcd59dc16dd652744a0d52d84954ed commit 7ffa3b0f69dcd59dc16dd652744a0d52d84954ed Author: Warner Losh AuthorDate: 2024-07-29 22:57:13 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:54 +0000 Revert "loader/lua: Remove workaround for command_error" This reverts commit 552f3072af54820cf1805f712e2567bc1b7f046d. loader.command_error was added just after 11.2, but appears to not have been back ported to 11.x. 11.0 was the first lua loader release, so keep this compat shim until we sort out what to do. MFC After: 3 days Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45883 (cherry picked from commit 809edb3636a5494ad7d3dfff910e0aab89d83442) --- stand/lua/config.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index ba6144364247..86f5ef6174a2 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -407,7 +407,12 @@ local function loadModule(mod, silent) end if cli_execute_unparsed(str) ~= 0 then - print(loader.command_error()) + -- XXX Temporary shim: don't break the boot if + -- loader hadn't been recompiled with this + -- function exposed. + if loader.command_error then + print(loader.command_error()) + end if not silent then print("failed!") end From nobody Thu Aug 1 14:50:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX2H1XpXz5Ssr8; Thu, 01 Aug 2024 14:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX2G6Qzcz4JRL; Thu, 1 Aug 2024 14:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BOCk6ulNhHmtH1POAX6UBRq9IeCDDyuIVhyMlcCkAO8=; b=tTgS98YQwMO8jhnSbuJmRokgmTKN/B4tDOWOyeRCtnqM5qRnmlut0hMPangUDr3NM6hO72 QAQAxFnU+evvciuXA6M6E6u6FokX2cCrJXvQrR5hMut5AM+4mzKpKJD5L/JncwEH//WfVM n7y4RO6GuS1xVGWLRhGQTxyC2mnP19RRyQKhjhEV3YeGLwNRzlC3O5cH/VP4eNbEWNHWw6 BEnUEAjdkg//Mu/txRqtWtUh8+JXrGag4pohiYngjZ277mb+D+zKaEfqLbuj7gX51WRoWP Ir0ZRfpw4HybUIqCCKXRKDnOaiBLZBAWsBWscUc7gH4U00jhd+w4LhUI3Pk8uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523830; a=rsa-sha256; cv=none; b=BsZjWLAXGnM64i7fxUzYaRwQae61OBZHPENqX5aL58zGii3muwiqPSLqpeLYIv/XT5P1re CyyyeM4i9yltWA9Oie0sLyVOFv+r4wH1BgYE/wXV0u8xAQciJyYRgWd+v4GPRupp/wZ+ZU MRvkEjS8qQ9BgYBXy6D5A0/xI6nd/ZEeVUqxx6NZgLyXHJBn8Jp2c/uHmLxQqKmhnL9vgh 3lJBwFFNT1/nfgjVU4daVCTkkJXwBOKLDnuGVebAZq/7eDvwqw1hlpXqINmD2Zd1Gk3R7K 71/mrrdv3coiEj+5A4fR/f8X8a4BgOfD9Vcan3dVddnYqupHS4t76G//BhscJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BOCk6ulNhHmtH1POAX6UBRq9IeCDDyuIVhyMlcCkAO8=; b=O15pLJcPLDp0r/bNehu2bEnXWwEI0wTDbDcab3iBtpCEPoMdPpArz9EJ7OFG4G+w0YjDdP qeXSU5Rn9fF1sX/vm+u+h7eBG1snerFXzwXTa981C2TGNZ6/Uy44GOQxRsI2pDbRXZswyC cRMetBT3ZNgZ8G/5p2flsJHhjuTI8+RHlOWAJl5TjE+qSJspYxs6x9/JoqYk0oUYYKO8s4 owLVnWAA8vCogq45t69kuo2ChMAQKhbe9yQUIZ1sEpIJ/DGmoaOuecCUjfNL4Ion5IBzPr mTBlpkEd8gbjqCcKg3FzRPXZqmOvdnmWI/Ti1zsMZvUmgK8uVTybvRawOQvYXg== 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 4WZX2G5gbYzpc5; Thu, 1 Aug 2024 14:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoUjc049609; Thu, 1 Aug 2024 14:50:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoUWH049606; Thu, 1 Aug 2024 14:50:30 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:30 GMT Message-Id: <202408011450.471EoUWH049606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: dd2cfed93331 - stable/14 - loader: Bump all versions to 3.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: dd2cfed93331272a624745ffa08c77ab9129384a Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dd2cfed93331272a624745ffa08c77ab9129384a commit dd2cfed93331272a624745ffa08c77ab9129384a Author: Warner Losh AuthorDate: 2024-07-29 22:57:22 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:54 +0000 loader: Bump all versions to 3.0 Each incompatible change we make, we bump the major version. We've not done the bump in a while, so sync everybody to 3.0. Anything older than 3.0 will be given a warning that their boot loader is too old. We check only the major version, though, so minor versions can still be bumped for individual loaders (though I honestly doubt we'll ever need to do that again). Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45888 (cherry picked from commit 9f7f90507528aaa9a2f54575c1d4f4010d01c2e5) --- stand/efi/loader/version | 1 + stand/efi/loader/version.veriexec | 1 + stand/i386/loader/version | 1 + stand/kboot/kboot/version | 1 + stand/powerpc/ofw/version | 1 + stand/uboot/version | 1 + stand/userboot/userboot/version | 1 + 7 files changed, 7 insertions(+) diff --git a/stand/efi/loader/version b/stand/efi/loader/version index 4d6c3592e10a..570796b66956 100644 --- a/stand/efi/loader/version +++ b/stand/efi/loader/version @@ -1,2 +1,3 @@ +3.0: Lua scripts API stability 1.1: Keep in sync with i386 version. 0.1: Initial i386 version. Derived from ia64. diff --git a/stand/efi/loader/version.veriexec b/stand/efi/loader/version.veriexec index 090267dfa9cb..529f3ef5544b 100644 --- a/stand/efi/loader/version.veriexec +++ b/stand/efi/loader/version.veriexec @@ -1,3 +1,4 @@ +3.0: Lua scripts API stability 2.1: SMBIOS 3 support 2.0: Secure boot support 1.1: Keep in sync with i386 version. diff --git a/stand/i386/loader/version b/stand/i386/loader/version index e5fdb8976bf2..82229ae6a06d 100644 --- a/stand/i386/loader/version +++ b/stand/i386/loader/version @@ -1,3 +1,4 @@ +3.0: Lua scripts API stability 1.1: New calling conventions for fopen. 1.0: New semantics for finding the kernel, new boot. 0.8: Set/getenv & cia, copyin/out. diff --git a/stand/kboot/kboot/version b/stand/kboot/kboot/version index a142c2b0ce2c..be162b693ada 100644 --- a/stand/kboot/kboot/version +++ b/stand/kboot/kboot/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 0.1: Initial kboot/PowerPC version. diff --git a/stand/powerpc/ofw/version b/stand/powerpc/ofw/version index 24bdc8254ce3..fd8b01228f46 100644 --- a/stand/powerpc/ofw/version +++ b/stand/powerpc/ofw/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 0.1: Initial OFW/PowerPC version. diff --git a/stand/uboot/version b/stand/uboot/version index e779e403e7ec..0293880a1f90 100644 --- a/stand/uboot/version +++ b/stand/uboot/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 1.5: Unified ubldr build diff --git a/stand/userboot/userboot/version b/stand/userboot/userboot/version index f361513b2741..2fba2c27eabc 100644 --- a/stand/userboot/userboot/version +++ b/stand/userboot/userboot/version @@ -1,3 +1,4 @@ +3.0: Lua scripts API stability 1.2: Userboot with lua or forth 1.1: Initial userland boot From nobody Thu Aug 1 14:50:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX2J2sRzz5Sswv; Thu, 01 Aug 2024 14:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX2J0JZzz4JZl; Thu, 1 Aug 2024 14:50:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qbt2WEJiwl9M9RuswbMUcl0dx5TP8kLYW9T9hTJYYcE=; b=pr77PAj/9lzT9MC6fOYEnrrUaB/zL29JWSmhY12bnOOEvFH5FHdhAkgqt/4wJCrBNLuTtO SiV7lUktsgaG+qvSCBj7DFuAmAXfAu/cGExBASigpSzbmFdGwfOSwyxvF4SiEmE0E/HMsZ OIin7XcUOOb3bo84QnReAan40XSCgUf9H89eJ5F1KkJOO3DjZOc7SbaNfBMoHD9fMOWwtS h8yVbnmBRL8Fpeays9Mi0Xev4NINc87IeHOX4CXFTU66X3KC9w7aw1/EknnPk0XeANYvol V1bYJxCCvdEX7pc0Fi+uPYzV+cjYCTufDV/c6l+Gj4wD+yOcUfHsgf0lvP8c+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523832; a=rsa-sha256; cv=none; b=JY/1wfVXnY2INIPImrLqqQm9+vNIIIXHuv9edprezMEdmrlObwqtKJcYkr0VGXd1ob24mf idpZWu1M6NgqfBV78uSUnZKOWABJ/pcc5D7Aaa5iROTaoRv2/V6APmCTv0gEVyY9c3YdAk 3um3AQWE7yK7Hbz/K7fapJOiDoaneGIRSSfAbhEabHAQ64LiQuaX8uUhbXuv8Nr1X8Li2Z nRvr1qKRJgsE4TY0tPKI+E25+GTFPF8aIhMF4HXgG7kyTvTVweADFNVuea6hI39G17g6N5 wjTzUnHaOX46oBGpzqGawy8V1xcEOhr4HxjZkdWpu+ODWx5BUexmy4FbAr1dww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qbt2WEJiwl9M9RuswbMUcl0dx5TP8kLYW9T9hTJYYcE=; b=r0SaP0k4ql/+VwOPE2hvuYh32K7j+Gm3SaSd04oCgQNnCzZnOJbtrf1yyJKVHyDn/S+/EA Rn/lFjbpBXfavSNYb+4Msvgyg+/vKoPwYYmpa7QUX1HXNpo1mqV2LAxQU6jV9PGMlnVZXO UTzhvovKN6pv7npOSe9lJbEidEHaJnp9xqMhPG10ddrkopsnOw0vyWooQMzhOjWgbskcA2 dcs8qzFJbTDANESoD4hv1chAga+qI+iMZNLB00dPCDTiF9yfeA2Ic1usnAXA5peDl0GagT PEZCSe68L6gwyAxYVvp5Z5T9PdsHNt1/KzHroaBZMhiojj7pWKVp8N9dmHqqpg== 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 4WZX2H6kgszpKK; Thu, 1 Aug 2024 14:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoVAi049672; Thu, 1 Aug 2024 14:50:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoVqW049669; Thu, 1 Aug 2024 14:50:31 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:31 GMT Message-Id: <202408011450.471EoVqW049669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 53a4bf76c57b - stable/14 - stand: Print a warning of the loader is too old List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 53a4bf76c57bc02dce7c521235d10dc7fec298a0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=53a4bf76c57bc02dce7c521235d10dc7fec298a0 commit 53a4bf76c57bc02dce7c521235d10dc7fec298a0 Author: Warner Losh AuthorDate: 2024-07-29 22:57:30 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:54 +0000 stand: Print a warning of the loader is too old If the loader is < 3.0, print a warning that it's too old and needs to be upgraded. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45889 (cherry picked from commit a2fd7ae87991044ca283974ced8f6ed635d1cb0c) --- stand/lua/core.lua | 21 +++++++++++++++++++++ stand/lua/core.lua.8 | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 9226de564348..7b7560ddc820 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -542,6 +542,27 @@ function core.nextConsoleChoice() end end +-- Sanity check the boot loader revision +-- Loaders with version 3.0 have everything that we need without backwards +-- compatible hacks. Warn users that still have old versions to upgrade so +-- that we can remove the backwards compatible hacks in the future since +-- they have been there a long time. +local loader_major = 3 + +function core.loaderTooOld() + return loader.version == nil or loader.version < loader_major * 1000 +end + +if core.loaderTooOld() then + print("**********************************************************************") + print("**********************************************************************") + print("***** *****") + print("***** BOOT LOADER IS TOO OLD. PLEASE UPGRADE. *****") + print("***** *****") + print("**********************************************************************") + print("**********************************************************************") +end + recordDefaults() hook.register("config.reloaded", core.clearCachedKernels) return core diff --git a/stand/lua/core.lua.8 b/stand/lua/core.lua.8 index e12f80671c00..208dbf5e12c9 100644 --- a/stand/lua/core.lua.8 +++ b/stand/lua/core.lua.8 @@ -218,6 +218,10 @@ If there are no elements, this returns nil and nil. If there is one element, this returns the front element and an empty table. This will not operate on truly associative tables; numeric indices are required. +.It Fn core.loaderTooOld +Returns true if the loader is too old. +Specifically, this means, is the loader old enough to require one or more +workarounds in the current lua base modules. .El .Sh SEE ALSO .Xr loader.conf 5 , From nobody Thu Aug 1 14:50:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX2K6VChz5St4f; Thu, 01 Aug 2024 14:50:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX2K196qz4JbC; Thu, 1 Aug 2024 14:50:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fyGG6cM93wHWFxw6c5lo6pB2QNNxbO7Y5BbRi4ASQyk=; b=pQpVUTV1uOI/oJx3slCs702jdVXqmVW585vpMSLXlVIogLp6niwkrxeV/g0gwrTU6Cotg1 bvfN0cBeDeRbpRne2M2p+8Z5ThfBaI6WbmBNx+ibz7aj4+L0sTTvbXABsoETQNR6G1DTTW JMTg9c4ajVOOgpAU0vp8O6vKE8dqUzRVMJUSNGTXyRzfTGrPF+umWy3qmlTcc73zZEG5h3 Q2XpyTW7ncGqjovohKh2oJ6g1rxUCtdMQd6t4UJEzvMSBTp9Xxq8woXjCIdS/7jwgrKXV3 H6eTXup/Z1r3uR2/Wn7e+hq508fViJ5VGhmOJP9rHKWS2RtweqoW3o7GKsX9fQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523833; a=rsa-sha256; cv=none; b=ahK9qksX9RlWK2pNSOomCdfrWeJspM8WcLSD1KKVMO5oG6suEMzgWfrdaEXrWOUtm9TbP+ BPNgqcKVUCnf8qjj4YChmg9AHdsuUspJDpFulKYILz/Dj6IN1B8rH5sAVByP0owhtl+Pv5 Ti0o5/TswzPbLJS0c3LfGnwwihyS9hCAwh8cZGMPqJuiwkuMMY2i912cWC8O6AU/JmEsSR jMXIULrF9oMru2fLGaW/0dMBgfNrSYTCppnBIqDOjUGkhCmeglmKlFuFcMJomYtKBbVWtq tvTIP9FglYEEZcW38wnCIkEPBZ7j6F9Ek1pMnPQ8JhSBbGPzqrgVfFlfb1EE4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fyGG6cM93wHWFxw6c5lo6pB2QNNxbO7Y5BbRi4ASQyk=; b=k+MasTMUh0L6U9D0xkihr7ni7XenetXqv3SUrp/jpc9UGFSM5rQeKfCtnDistDP976rHUk AOmXBufavJWqfYy5+uS6LH25ON7SWrm10HT9/8rWqXMRE9rYPLieMXRAGsZ1dp11OI9G7B qAatun0Z4XnlRJh1GSClEgDLzwJVjjDgA3XEy+IrTzUoTYiLLoOd1p6VPLnD806/3bIThW Qs8I3hcBTcWnW4VJcueJnXXhYGOJ1dqiA3ih/8QDWozrceje41dBcoUQhkf6AqRQIKie6u XW+tU+/ntd98o4uiD4OLxB6NsTSabR0lP7SAV19TMwtiCE0Jy7lqVApUFGV93Q== 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 4WZX2K0kxBzpYg; Thu, 1 Aug 2024 14:50:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoWs3049729; Thu, 1 Aug 2024 14:50:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoWaA049726; Thu, 1 Aug 2024 14:50:32 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:32 GMT Message-Id: <202408011450.471EoWaA049726@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 59bfc69490ea - stable/14 - stand: Add "Loader needs updating" to the first menu item" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 59bfc69490ea033d3c5eeb10c8ddd4aed4fbc4a9 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=59bfc69490ea033d3c5eeb10c8ddd4aed4fbc4a9 commit 59bfc69490ea033d3c5eeb10c8ddd4aed4fbc4a9 Author: Warner Losh AuthorDate: 2024-07-29 22:57:37 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:54 +0000 stand: Add "Loader needs updating" to the first menu item" When the boot loader version is too old, add a warning to the boot menu to maybe catch people's attention. Use the correct loader code that adds an inactive highlighted menu item indicating that an update is needed. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45890 (cherry picked from commit 0eac99f76ec31270f902cc2a0ff5ae4b5b606a65) (cherry picked from commit 7cb65be96d47cbe0b740266bc633d272fc4c5e6b) --- stand/lua/menu.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 4a948acf8241..0587e5ae6586 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -263,6 +263,10 @@ menu.welcome = { menu_entries.boot_envs, menu_entries.chainload, menu_entries.vendor, + { + entry_type = core.MENU_SEPARATOR, + }, + menu_entries.loader_needs_upgrade, } end, all_entries = { @@ -411,6 +415,15 @@ menu.welcome = { end, alias = {"l", "L"}, }, + loader_needs_upgrade = { + entry_type = core.MENU_SEPARATOR, + name = function() + return color.highlight("Loader needs to be updated") + end, + visible = function() + return core.loaderTooOld() + end + }, vendor = { entry_type = core.MENU_ENTRY, visible = function() From nobody Thu Aug 1 14:53:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZX5V0wzzz5StBC; Thu, 01 Aug 2024 14:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX5V03R5z4M05; Thu, 1 Aug 2024 14:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=etuLDvM/HV2/xu9tAx2MuIODLMx9n4va3XawOrA5rDA=; b=vGP5VB1E0nG1qvXlWTzNa9F2QBx3yxr1Ieabu8TAkomtxwo85dPm2ZHeoZdTLFqn1HLX/t iAEZ4ctkw+f+sBXgwM9xBlH6zMfP2PoHVuldpVHy6j8/T6v18keq76sZ6vTWnQJh5yeCPr DA/ppRPDJTGdeHp8ilH6skqkiqvktqfbCj+zSYuKuTHIETMtS41BrMeJGZQGCLZo9q60El EUFo16VpFoUkClRH8LYBfBFQAvSaWjDcEIGF/N9krUpE1sZLVge/eW7Sz/gV6I6Z46mpHG dlWwGJoFnlcfhismIFYd/8NZWQ+JU4wjJ616Y+lUkbtLViXSPFQ0fiVJ22crYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523998; a=rsa-sha256; cv=none; b=vWe+YHlfOWXNPPqhS3ag3lNt8K3s2Rf/4JiVjDLHd5D9K4J8sVDW1qt6EAMWpflFYY/3Du +pbjiZvt39DeRYC5X//Z6TWm2f7QaYO9DKxuDS3EfO/YByeWJM+9isAdDxdZ75dhqE/kQS vq1pz/IEzOf0ObAsjJKAfBe3kKWH1FQjZjUkdsF7ZgwLtcIBbDaVM2M3DJeZr6vKPPyBOR MQNMEA3806QxVt5DePmgJqmW1AVTK1gf5qWsNEZsSO78a2EPI4KjQN4FfI5Kf2Ya0Wd1xf sD3/8Wo2CIJmzA4Kz81Is3Mcm10cCLPFWozdG/qmZYgjYkwMfQcmTuzuYALNYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=etuLDvM/HV2/xu9tAx2MuIODLMx9n4va3XawOrA5rDA=; b=gnNJhg4PX2Z+uqDkYv/WloJmLH/3UEO6cxdmBHYstP3LzZDs2mmEX0VY+IRrxdXqOgp5qJ CkHMd+9nb607TXegw4YdveGRJAbvGQGARkJXeZObst5GJ1M1lpNu3xpwNcFn2RaqdMQpCj cy75sdHYODUvpuriHABvR7ah+yRdIDpSc8OSLILByPsgdu1vgb8AwDCs1PVTQ7rAAa87Bj s71JH4IOmjciYaCTXbgj+AIxYeJOFilrMNo7IDqEYiIlimLcU7FMyGC5JD/irF43PsPv6y GwzTKW9rFakeWdWP2yYFwNn1W0IEJj8J0Dos6ce+reyLee9x2p5n0RRyZcE+Ug== 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 4WZX5T6mKrzq1g; Thu, 1 Aug 2024 14:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471ErHjM056772; Thu, 1 Aug 2024 14:53:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471ErHTc056769; Thu, 1 Aug 2024 14:53:17 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:53:17 GMT Message-Id: <202408011453.471ErHTc056769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 4ad1f3143006 - stable/14 - splash(4): fix markup around cross-references List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ad1f3143006db61a6d2929ee42856e0967e00ec Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4ad1f3143006db61a6d2929ee42856e0967e00ec commit 4ad1f3143006db61a6d2929ee42856e0967e00ec Author: Ed Maste AuthorDate: 2024-07-15 12:53:52 +0000 Commit: Ed Maste CommitDate: 2024-08-01 14:53:03 +0000 splash(4): fix markup around cross-references Fixes: 7504e0e3e517 ("splash(4): Document how to use splash screen ...") Sponsored by: The FreeBSD Foundation (cherry picked from commit 004d5af853bfef1eb66394a15ac9e94e6dcebc0a) --- share/man/man4/splash.4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index 736703317a7f..af2ae2e4369a 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -204,8 +204,8 @@ have the following line in the kernel configuration file. .Dl device splash .Pp Next for -.Xr syscons 4 -, edit +.Xr syscons 4 , +edit .Pa /boot/loader.conf (see .Xr loader.conf 5 ) @@ -244,8 +244,8 @@ bitmap_name="/boot/splash.bin" .Ed .Pp For -.Xr vt 4 -, edit +.Xr vt 4 , +edit .Pa /boot/loader.conf (see .Xr loader.conf 5 ) From nobody Thu Aug 1 14:57:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXBP0tZjz5StfZ; Thu, 01 Aug 2024 14:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXBP0Jd3z4MHr; Thu, 1 Aug 2024 14:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VFZrt4T7SRcgSEvqZX0wKX9Xx8B8RxaPF76xz73b+2w=; b=I1596kKau7V+SsWMuiGVbgjxb3ybND1hYJ1O8h4NMkqJ2t4xI5z+62t/m7fDan/iU+lj+N EfnP+yU8NA4G3TJ4uEj0It4M52N5xRvjY2y2oG+SNrdrevoLpal5ll5sgS0Q+FgW0pzNup rR1JNVzltFLKHwwwOARIYxFulr41sT+c3eHE/w8YCtKwbn/SX4Qg+sNF+k8XJJkroCWx7q 5eCm/syZCXrbH/JwBBAXvU5Vf2DvA/LdolI4myp87hxDY9wtgMyRNrLmGxgAfcHFagCw5H FcdRcJ/Ag1ufMZB2wNjKqvYEG+QMT3CerSlCuG7Ses6Ix9MPSXUT1XopzoYGZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524253; a=rsa-sha256; cv=none; b=BBF8D+1d2zsncghaHvIS2Lntm2XxOFOaWljVwO0WQB/shiJCpFZzL1+DNobKzMOpi9rPlt h7aclBYMiF7CN59vIeOqRyzWeQLj/nSWjsmdyjHLhyDkgXSEglHJvdbKNK1HvadrKtmTyS Ml4OMh8INkHi46JlfjKDwxiGSf9XkvcB/rqINXjlXC5kjW3ILPvH0kYvfwGJ7DN7q0sfDo 4qPg+zv3pM5G48FYS47EiVeG8V4Rdinu9Z8ae9/EAZOwiyLMyhJuFSud9XwTp0h1w6ybhU 3um0CJDlXlXb/kxMqqXdwMY/AgmZazsUmYVag0E1YWRM3yMgwhY+h8zeK7bDVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VFZrt4T7SRcgSEvqZX0wKX9Xx8B8RxaPF76xz73b+2w=; b=FVH5Rnz20y5WhyyZN0c4WxVNbMdn5VziVPNbGbkxeT/jtIEZQQ7M11FisqSw/YgBGOZniy fLq3++rXf8xwv2xlIWEU1Ge2eukl55KkN9/aGe8k585pQV9zykDTbXhMx3rv74kRmnSD+u HGVJDnESZci69ii+xrV7OWic5UM3DX8BbOxmBlx8IiY7hhWVQpocrzNtAbWQ8DG3NYEukJ Rkl/E6pbvEildMHiopx+lAp4Vzmu0a7R9bvTO6gFdlCvbz94gJlkbUSAPArSW+8w4mPqNa EyrA4+o6HYDcO7LIylkhW1t7XAt2P4qU1/ttlIopxEAlsqtxnCr6ST7Yt2zGWg== 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 4WZXBN6z8jzpZW; Thu, 1 Aug 2024 14:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EvWAk057505; Thu, 1 Aug 2024 14:57:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EvW27057502; Thu, 1 Aug 2024 14:57:32 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:57:32 GMT Message-Id: <202408011457.471EvW27057502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 35d217ae021c - stable/13 - stand: Stop building in fat, ext2fs, gzip and bzip to BIOS /boot/loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 35d217ae021cbbde1e7e02dd7a8534235be5741a Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=35d217ae021cbbde1e7e02dd7a8534235be5741a commit 35d217ae021cbbde1e7e02dd7a8534235be5741a Author: Warner Losh AuthorDate: 2024-07-25 03:15:28 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:51:30 +0000 stand: Stop building in fat, ext2fs, gzip and bzip to BIOS /boot/loader This saves space to allow pxeboot to work again. Users desiring these features can turn them on for their custom build. While these are useful for some specialized applications, they aren't needed to boot the typical system, and we're low on space. text data bss dec hex filename Before: 465866 20740 31612 518218 0x7e84a loader_lua.bin After: 441535 17484 31092 490111 0x77a7f loader_lua.bin Savings: 28,107 bytes Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42416 (cherry picked from commit 195a96f0b303345818e09ad1d79dc80122804de8) --- stand/i386/loader/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index 6657b116be30..f76d33ff4499 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -5,11 +5,11 @@ LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes -LOADER_EXT2FS_SUPPORT?= yes -LOADER_MSDOS_SUPPORT?= yes +LOADER_EXT2FS_SUPPORT?= no +LOADER_MSDOS_SUPPORT?= no LOADER_UFS_SUPPORT?= yes -LOADER_GZIP_SUPPORT?= yes -LOADER_BZIP2_SUPPORT?= yes +LOADER_GZIP_SUPPORT?= no +LOADER_BZIP2_SUPPORT?= no .include From nobody Thu Aug 1 14:57:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXBQ1P5Lz5Stfc; Thu, 01 Aug 2024 14:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXBQ0r5Fz4MFg; Thu, 1 Aug 2024 14:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WaKZQc2oCXay7vLjkZADYu0BxSjIfWYfcxPCFlih0Ys=; b=igvossbXXmD7ABwOfwlHhE6nbAGaVhHpG/2jQauCFmZHCQuz7NZHvb3NFmzno6LVAGprlP 16bMLd5kUP3tZg5w3WnRodxz+B6a+FR6hbkRR4+5Q/PDnwA7MgY6FTvk2s6ftTWpkbPV1e KOxd+h9QmRy1tLDENw1F4WNebKrHyZ7ohD6y18KQTDuHlI5T5BaVB9KFftlTo6LlLIfX6t TitGV9x9ofYhhKWJz8iM87d+6akZWGT5r5Hd0w+6XozUE4wBSm6nD0z2V9gFOJzFsvWM1i tg4yLFp6TorlDBz3vSy+5c2z5gNMgdDYyZQXCsinUG9XkRjH46PsYClecXbPDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524254; a=rsa-sha256; cv=none; b=fR2GeoTaQv1eYLqAQFVJT5Jy8zzq6NuLM+bkQwBMwqyGcXw9thVHHAQjNLUP0zNNqkmPg1 HeYg+7jwdLMDhPqRdEC+YOcn48dgmhp517QmZrYRFC22D0/UkEqNTLhjlUaowY6nERlV7S SyDTQb9xHkryxpIhWS8F5GplgqCigqnuCEPGrkjYrlsa0c/ROY10A/zFXwl5bTBmsP6R2s NunfyUvtl81droIJnsYXHq4zMnRgvAsfLJWZW7rGDvekN9pBNq48Wjc+yBF7wl2zog7Tx8 zaaGVBxgNXoG6Jw3NhUgZrvxsHREX6ZO8arax4gjHaT6oSCxooxZjUx7GB9/6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WaKZQc2oCXay7vLjkZADYu0BxSjIfWYfcxPCFlih0Ys=; b=Sv1X5j6Qq9dwVUJGctA7D+evbpSj+ZZhSIpAyHVs8nrTs8ej/tzCU14ta64tgLazgiP267 qIPRj/ltvxUD0vA51+QQaTyfA2QNDdLzfdlue64M7TrikybwlLZfCYVozH1HyNyrmuba+c mEddWR928lQMwB2Yr5qBDY7g9gZ+/diaej7Y2wGNU1AySrFSq/KYBvQfO2bzf8AZdO+1aq yAZX0P1GXjq38v5qwIqR1y0zrvgCf4LdT/Z+5SxYojq2Ak8lyqiWu1YAHi+El35NYapOHY n6W+vNHJBJ4rzlMScMbN7cFlJBt6VCXKw4GyGTlFpfSaG47iOvoGNcQLPjW7gw== 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 4WZXBQ0Rcvzq4b; Thu, 1 Aug 2024 14:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EvYAM057544; Thu, 1 Aug 2024 14:57:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EvYOl057541; Thu, 1 Aug 2024 14:57:34 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:57:34 GMT Message-Id: <202408011457.471EvYOl057541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 4d66d691e35b - stable/13 - stand: Remove obsolete junk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4d66d691e35b59c5acd1ba14cb27859812d3e863 Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4d66d691e35b59c5acd1ba14cb27859812d3e863 commit 4d66d691e35b59c5acd1ba14cb27859812d3e863 Author: Warner Losh AuthorDate: 2024-07-29 22:56:28 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:52:08 +0000 stand: Remove obsolete junk We long ago changed newvers.sh to make these comments bogus. Remove them since every single one of them is broken after the $FreeBSD$ removal. MFC Note: veriexec loader not updates since not in 13 Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D45879 (cherry picked from commit 8165650389ba2d0a68cea6902ac3750055cad9da) --- stand/efi/loader/version | 4 ---- stand/i386/loader/version | 4 ---- stand/kboot/version | 5 ----- stand/powerpc/ofw/version | 4 ---- stand/uboot/version | 4 ---- stand/userboot/userboot/version | 1 - 6 files changed, 22 deletions(-) diff --git a/stand/efi/loader/version b/stand/efi/loader/version index 2bed97c231d2..4d6c3592e10a 100644 --- a/stand/efi/loader/version +++ b/stand/efi/loader/version @@ -1,6 +1,2 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.1: Keep in sync with i386 version. 0.1: Initial i386 version. Derived from ia64. diff --git a/stand/i386/loader/version b/stand/i386/loader/version index ea8067efa243..e5fdb8976bf2 100644 --- a/stand/i386/loader/version +++ b/stand/i386/loader/version @@ -1,7 +1,3 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.1: New calling conventions for fopen. 1.0: New semantics for finding the kernel, new boot. 0.8: Set/getenv & cia, copyin/out. diff --git a/stand/kboot/version b/stand/kboot/version index b24d6ea8e47a..a142c2b0ce2c 100644 --- a/stand/kboot/version +++ b/stand/kboot/version @@ -1,6 +1 @@ -$FreeBSD: user/nwhitehorn/kboot/powerpc/kboot/version 224106 2011-07-16 19:01:09Z nwhitehorn $ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 0.1: Initial kboot/PowerPC version. diff --git a/stand/powerpc/ofw/version b/stand/powerpc/ofw/version index 145f69c28aa4..24bdc8254ce3 100644 --- a/stand/powerpc/ofw/version +++ b/stand/powerpc/ofw/version @@ -1,5 +1 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 0.1: Initial OFW/PowerPC version. diff --git a/stand/uboot/version b/stand/uboot/version index 71464740dcc9..e779e403e7ec 100644 --- a/stand/uboot/version +++ b/stand/uboot/version @@ -1,5 +1 @@ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - 1.5: Unified ubldr build diff --git a/stand/userboot/userboot/version b/stand/userboot/userboot/version index 3b86a26c72ae..f361513b2741 100644 --- a/stand/userboot/userboot/version +++ b/stand/userboot/userboot/version @@ -1,4 +1,3 @@ - 1.2: Userboot with lua or forth 1.1: Initial userland boot From nobody Thu Aug 1 14:57:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXBR4cGNz5StZ9; Thu, 01 Aug 2024 14:57: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXBR1tzrz4MY7; Thu, 1 Aug 2024 14:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VXjzf+LRizZgckUsFisR1Vl3mtSTp97Wu5mRE7XlJEg=; b=rJ/l10KWlnnTCDUsR463GARnuMY2NaRXeIsW+ZoxQAKyLjnrfZORysU7bqpo9izcPa0LxD uuM0QzzZnyOnxOAvd8JC9y07p2IKaZ7j3CX8BPtOe1og7VCGvZ1RkJ5FHh/KWdIE1aVriw OhaB/+sE4hkBqvOkk+HbIn0ZB4XcMp5MWYVQNMVBqVWbg9E5u2gN7sTKtPIG1O8iFioso9 isNG7XKeP1c8SacaimjtodVtMbcvt9E56OT19/pz2ATRRYODh6Mx1D8cCKtz7AjH6t7xBV IZEsm+ye12HhfRVm3Vk3kcRYp8mUIjD0CIWPJyest3SSlrDF7Mnqx50pnTVnGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524255; a=rsa-sha256; cv=none; b=tJVH9qqHY6XTeUlg5Ymd7TpzQvhogDnAgn5CCrvAoMJEqi5S3dTzXz0k4cl+xcynx02yFp IXMK19fj5uB02JCWY5MImoaNYl1nkoOdT7bXjvDhHUGTry4/3KUyRWeVPHQDDV2zewkSHk TBMYYEcy6uYlJXk7EYXTaFNi8nImaPBjfvTZlR4Jj8/9Ejv1GB7gGxpfKZBgNzkdPAKSMV SbeAWCP8xtBNqaerPMshYIGIXuCjp20YRyjN0/6h+eqyGSuNCcFcXQ7Euylq8Gfh6YJswZ ftyVLVhkzFVUxM/U1HHkjQ1rJOEOgLmT3sO6NTDhV0hRmv1sug+aFd5XlZ4yzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VXjzf+LRizZgckUsFisR1Vl3mtSTp97Wu5mRE7XlJEg=; b=Q3SFD1xJ1iMaPIBpx2XsY8tyXb7+XjQ3/j0gIEJQzYJLv70RvnPZBhri6ISfuWkecm7N+X xxFL8O4/rGhRVVi3fOgMNSW0V5+qQvASRO80CPscWc5UNhpdx/KjMt9sQyx7Pswi3RZ+Dy lAxImmFVe+8OaquNtpa/zExQ/CXQBjSP5I1fohbK7Y7J8UQVM6cZc0agdeSFeTPebR53aQ L23RwBggkUvB4JgVfj1ltJEIn71VJQMaXL5oUtrmpdpwh/J+OCGtMp390BwZevPecl2F7y QK5D8rfprmqE4Vo03u9wbvqF53K+Di/36zoHNWUobGU6teMCYBT1vWv/VNxY2Q== 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 4WZXBR1TG8zpKb; Thu, 1 Aug 2024 14:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EvZZj057593; Thu, 1 Aug 2024 14:57:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EvZLB057590; Thu, 1 Aug 2024 14:57:35 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:57:35 GMT Message-Id: <202408011457.471EvZLB057590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 747ebeceee51 - stable/13 - stand: Kill commented out line List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 747ebeceee51d5756142231e693fb2fde60698d1 Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=747ebeceee51d5756142231e693fb2fde60698d1 commit 747ebeceee51d5756142231e693fb2fde60698d1 Author: Warner Losh AuthorDate: 2024-07-29 22:56:48 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:52:37 +0000 stand: Kill commented out line This line is no longer needed as fallback, and should have been deleted in 7870a52598ad8 instead of commented out, but 26 years later, I have a high degree of confidence that old change was right and we won't need this line as a fallback. Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D45880 (cherry picked from commit 65300ca729452f62c201baedcbb4a67f2afc5ed5) --- stand/common/newvers.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh index 9206f60841ce..ee7678597b7a 100755 --- a/stand/common/newvers.sh +++ b/stand/common/newvers.sh @@ -46,7 +46,6 @@ shift $((OPTIND - 1)) LC_ALL=C; export LC_ALL u=${USER-root} h=${HOSTNAME-`hostname`} t=`date` -#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '` r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` bootprog_info="FreeBSD/${3} ${2}, Revision ${r}\\n" From nobody Thu Aug 1 14:57:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXBS6mL2z5StjJ; Thu, 01 Aug 2024 14:57: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXBS3MWpz4Mc2; Thu, 1 Aug 2024 14:57:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRdh9sUbtuJglA+keHgNmkSaoc4GVyfF30+KIOGYcZo=; b=dVJfjMsq5Buum1IB1gSVAXAJ1E0t4/lcB59FmanDz+DZtczN5UpYnFp07u7QRZJvbGbr6u RNO6T3CxyDLgs4D0drptzRtbB73ltuFLcd7EFqVepKlxMzQGXYBMNt+Z3Pnc/hp3LcR9cp 83e9UqMD9iVp6N0q3KAAvRfpBVuThIZdpAsBkpjasZDSTMX5rYEkqpnP0DHgtM1YOTfh84 V58agMfU5xC+j2c84wQfgTd44y9gz5DA/L2W/At08C+3DNIlakEa8It728L9Qt/8F9KgSE 8J/OYlYpw3hV4xPD/QGPxuA3r3UeIZWOpyK9RQOouxobvlyALh4mWrACEn+yvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524256; a=rsa-sha256; cv=none; b=rec/gCVfaCJiX0VDI1J1Tk02oiq2KZuhSm8mx2GKm6k0RrmZFFaG7gQftqhlJhu0S5/AgU ScoEEwGLKGe6JJ2Hq3purMafFKxWdaI5apJ+Y4CNPOo5CsT6N6/WtGo5yBF1yKv3tP0osf FcN98SrJ1sseUXjP+58ZEocjqpC6h9xANwF4r21QKkD0gcSz3ro5SXmMNzjFZIxrIHwqZu 3N48/NhDe6l7Gcw4fKfiTcZTklN31U8z53vlBAPzGZcHYZQ+yyYN5ZCDA83gjka4oqK9oe SGLl7o6RWkCrxVg1I58f1451WAXgO+pzvU1dzUEJFAWYEgoSdUZI9EjBQgu4Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRdh9sUbtuJglA+keHgNmkSaoc4GVyfF30+KIOGYcZo=; b=IRaddRETkN5RjgYfYFZKn2VN66obkowbYlAQRcmpB/8WyL+nVDim6LssSFWw3Z54u3rilN 2tKN027abYdwgrwSpGSfpnHpQC0NB5E3HGtrVsFoWiX3NOTthT+Y3QiUfz1EUcuFwZVXMc LKshtkiQqJK4sL/0gGrpI6lJUEAGsUB4Pmpa17DzPLsRYM0TADUG71+YaDDz0BnMzHVDt7 9HJyIJBYsihbU5Fzf724GEgwVSqIox63p4AdQ456N9gBXLC2t0NB/SVwwc4c4aox6bHpIt tDwbz5MFp9IGL9/sq2Tigr8faSA+/L/rqN2txrdKeXJ0UqaeUvqqpbnlhxDUaw== 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 4WZXBS2SWxzpxq; Thu, 1 Aug 2024 14:57:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EvaEq057641; Thu, 1 Aug 2024 14:57:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Eva5v057638; Thu, 1 Aug 2024 14:57:36 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:57:36 GMT Message-Id: <202408011457.471Eva5v057638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 661db7ce611a - stable/13 - loader: Bump all versions to 3.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 661db7ce611a83745312edd1a7b3ade62d2273b4 Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=661db7ce611a83745312edd1a7b3ade62d2273b4 commit 661db7ce611a83745312edd1a7b3ade62d2273b4 Author: Warner Losh AuthorDate: 2024-07-29 22:57:22 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:53:29 +0000 loader: Bump all versions to 3.0 Each incompatible change we make, we bump the major version. We've not done the bump in a while, so sync everybody to 3.0. Anything older than 3.0 will be given a warning that their boot loader is too old. We check only the major version, though, so minor versions can still be bumped for individual loaders (though I honestly doubt we'll ever need to do that again). MFC Note: veriexec version not update as not in 13 Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45888 (cherry picked from commit 9f7f90507528aaa9a2f54575c1d4f4010d01c2e5) --- stand/efi/loader/version | 1 + stand/i386/loader/version | 1 + stand/kboot/version | 1 + stand/powerpc/ofw/version | 1 + stand/uboot/version | 1 + stand/userboot/userboot/version | 1 + 6 files changed, 6 insertions(+) diff --git a/stand/efi/loader/version b/stand/efi/loader/version index 4d6c3592e10a..570796b66956 100644 --- a/stand/efi/loader/version +++ b/stand/efi/loader/version @@ -1,2 +1,3 @@ +3.0: Lua scripts API stability 1.1: Keep in sync with i386 version. 0.1: Initial i386 version. Derived from ia64. diff --git a/stand/i386/loader/version b/stand/i386/loader/version index e5fdb8976bf2..82229ae6a06d 100644 --- a/stand/i386/loader/version +++ b/stand/i386/loader/version @@ -1,3 +1,4 @@ +3.0: Lua scripts API stability 1.1: New calling conventions for fopen. 1.0: New semantics for finding the kernel, new boot. 0.8: Set/getenv & cia, copyin/out. diff --git a/stand/kboot/version b/stand/kboot/version index a142c2b0ce2c..be162b693ada 100644 --- a/stand/kboot/version +++ b/stand/kboot/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 0.1: Initial kboot/PowerPC version. diff --git a/stand/powerpc/ofw/version b/stand/powerpc/ofw/version index 24bdc8254ce3..fd8b01228f46 100644 --- a/stand/powerpc/ofw/version +++ b/stand/powerpc/ofw/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 0.1: Initial OFW/PowerPC version. diff --git a/stand/uboot/version b/stand/uboot/version index e779e403e7ec..0293880a1f90 100644 --- a/stand/uboot/version +++ b/stand/uboot/version @@ -1 +1,2 @@ +3.0: Lua scripts API stability 1.5: Unified ubldr build diff --git a/stand/userboot/userboot/version b/stand/userboot/userboot/version index f361513b2741..2fba2c27eabc 100644 --- a/stand/userboot/userboot/version +++ b/stand/userboot/userboot/version @@ -1,3 +1,4 @@ +3.0: Lua scripts API stability 1.2: Userboot with lua or forth 1.1: Initial userland boot From nobody Thu Aug 1 14:57:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXBT668Qz5StZD; Thu, 01 Aug 2024 14:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXBT3l2bz4MPB; Thu, 1 Aug 2024 14:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZwvKrVtVDvvMVry9GBEBwpYaPIhfYc31fYiRigfoUY=; b=kKLWqBzu7boYcvlC8XrSqUEG5A6pA7Cn9XIZmnKTXBem/bEXwpWDEG6fTiN+CH3O5dO296 Zpi6GmRswGAHItK4ineQqYfkXUnVfkbzJVIFWt8mYA78v5olA+CeVPVS187c9jSwjsvDy+ mS4XcIIPr2SR+VXmMEdiPHOypUhbMlwO+xUjjOeHkUwongRwde5AWRPI3j4l9htPS8G+sP yWaSAQPdYc3J5/o0rKBG1P0LQ1bOBHGX9r6kdwnwlZCxWn5qDH81bcJ6IbiTsJP4nClNJ/ iJVq+oUk1aQACfn0JjbI+8jaxKEpiqDOrIy+GLxvSMdAsBxCM2Bogapqfcc9Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524257; a=rsa-sha256; cv=none; b=hQ1FnlAvESpVPN3EP7pTmQId2DCN1BMbrh5LfdIx8HTCaodkfwh8Ps9U5R1ZeKivxXY2c4 9uUDBYdqwyNSquwgKRPVMgqYEoQ7YT1wXzZALN77rxJ0ZtL92O0fP+I1ZNsWwj24koGrhM pArP3APvpZyhv9sOC8hXlHCWKv614uA4Xf5z5QHx/86FK0YSflc+8rE1EFEnLTSq25WKJT zNSJD/c5c127m9MrwXuiRP76XOyq9OPe/mDjkotU3ud1oTJ9iwvjROEIkcd7fx0N4Q60nM qnogrnl430+btbm5/EYY0APFTYQhH9mPHXVwQAf2VD5iMUFjPQa3vpnqkD9PHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZwvKrVtVDvvMVry9GBEBwpYaPIhfYc31fYiRigfoUY=; b=DYwGOLVmc6CcAiRyDiTC5BE211oVfzJDAPvhw3H/eEQidtAGN4rJJeNhUHQlLlK/g4tqc6 c/dul1T9MJK/nUN47rvtE76OYl29fexHkLPjyor22QOpGe3GKznTacyngMhZ/dZ3+RVeBU H7gjnuDmI2IGmkfJqCms80X6jxDXnaDXv5YPPcOJUlGo3mxl3ZAjP0CXdFrJNK2ttZHkSL elithp/rwL/jW+1QZ1ccVjUs8RmlpdialonzBF9uWH8+WQx6OXdCg8g3PpuMlT7OMEPMyu cv5g/FgxPgAMlFBIAVbUSDLBwmqpI3TnBItzR5En6dk2BubGw7uUjC36HBpdqg== 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 4WZXBT3JmRzpZX; Thu, 1 Aug 2024 14:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471Evb9u057703; Thu, 1 Aug 2024 14:57:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Evboq057700; Thu, 1 Aug 2024 14:57:37 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:57:37 GMT Message-Id: <202408011457.471Evboq057700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 6b0a2b19c845 - stable/13 - stand: Print a warning of the loader is too old List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6b0a2b19c84551251336efdde40f96848b199050 Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6b0a2b19c84551251336efdde40f96848b199050 commit 6b0a2b19c84551251336efdde40f96848b199050 Author: Warner Losh AuthorDate: 2024-07-29 22:57:30 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:53:46 +0000 stand: Print a warning of the loader is too old If the loader is < 3.0, print a warning that it's too old and needs to be upgraded. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45889 (cherry picked from commit a2fd7ae87991044ca283974ced8f6ed635d1cb0c) --- stand/lua/core.lua | 21 +++++++++++++++++++++ stand/lua/core.lua.8 | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 747f8c1f0fcf..81ba5d561442 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -549,6 +549,27 @@ function core.nextConsoleChoice() end end +-- Sanity check the boot loader revision +-- Loaders with version 3.0 have everything that we need without backwards +-- compatible hacks. Warn users that still have old versions to upgrade so +-- that we can remove the backwards compatible hacks in the future since +-- they have been there a long time. +local loader_major = 3 + +function core.loaderTooOld() + return loader.version == nil or loader.version < loader_major * 1000 +end + +if core.loaderTooOld() then + print("**********************************************************************") + print("**********************************************************************") + print("***** *****") + print("***** BOOT LOADER IS TOO OLD. PLEASE UPGRADE. *****") + print("***** *****") + print("**********************************************************************") + print("**********************************************************************") +end + recordDefaults() hook.register("config.reloaded", core.clearCachedKernels) return core diff --git a/stand/lua/core.lua.8 b/stand/lua/core.lua.8 index e1752475f942..7ab3f6e4ff12 100644 --- a/stand/lua/core.lua.8 +++ b/stand/lua/core.lua.8 @@ -224,6 +224,10 @@ If there are no elements, this returns nil and nil. If there is one element, this returns the front element and an empty table. This will not operate on truly associative tables; numeric indices are required. +.It Fn core.loaderTooOld +Returns true if the loader is too old. +Specifically, this means, is the loader old enough to require one or more +workarounds in the current lua base modules. .El .Sh SEE ALSO .Xr loader.conf 5 , From nobody Thu Aug 1 14:57:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXBV73hBz5StNW; Thu, 01 Aug 2024 14:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXBV4KcGz4MWf; Thu, 1 Aug 2024 14:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HvaBEiIJuErzIiJPAczDTHvDgG+ub++zlMPGpvfQnIY=; b=RBacljfPHng9LGeCYSWs/tuXu7c9s9iPv2pAuEYLxgl/BEUH/X5T4Mpws7/Ni66M0Fkm9i 9w29GrGqwb8X15kz0v0DDgveYB7VvkNC09uO5CdWKDM3H4uLc7sBpqfZtP6juP/Lpex2VV u+/UwZIrmhayQVT//7qmKf22zyHFwC5R8lYZd0EbSXX86NbwObU1An8lP0DZs1M5s09Ut+ c08M5+/vD4ssCPc63zgaZ1pHmRrjBDQv+Dev67+PB0QLIj/dR/pqoHkUgb8JLqxgud8MMW 4st0AFMKjrsEHm8APSZqkeWQl0Qz2g6hPGSJG1eadBbpj77RjAHOKNBES1GhbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524258; a=rsa-sha256; cv=none; b=wLWPTjKtvCC9oPb8MNPqrzrCAcgyzYd+ixiMnJkPoeJ6+eloxJ3i32TaUOTGbt/GQE2+Pi kshIX1FH7+p7DWxxlL3qVvUDKTMr3TSMgD5zZq+UHSQOi3IgfKY21lwiqG4pzw0YrQfcKy WtqrpCkAEPcS2Wkx1d8CWw1OpiZLSqbCgxnIwGvDRpYOOOn+xPpDxuptSjvhnemu2p8CYZ s8f/HTcVZ3W8LtAiAm2k9jZhR6P+vwPSa04lqcdY+yHkZRpZ1jsZ1usK253ZxycTg/FcL4 08LcfeMXGbouv0MZH4kFTJiFiK+IGGEhQV2HK5RbjfNQ7KvOTgI0PUDxiqQ1cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HvaBEiIJuErzIiJPAczDTHvDgG+ub++zlMPGpvfQnIY=; b=NOPaXUjeENJyIcT9965Z7eNFgkXQ2efjJtn2t0X9AUOrXGjgjpn20FMjAvzhG5kvuzWuDT WsRqIW4Nbktmq6fbVeNlwBVQYSR0I3QzoMRyHw+WJ1EmDEyKOTefzpcUkM0SLAiY3yllSp /RY9oOrkgKIpM9GDP4oxRa8lVj3SlVlpZfEkPv5tatvUypUNdFrKGcDsj66oA7wY6eMFEp KLa5ApBhGnh1dE+OjoK/C5aTQ3wKDL2NfX1NAxSZVPwgsdbQ2xx4EVyBHEkv0+D333SqUB lImGz3xDUJkvqlx6PHiksT9+VJPMp9xAR4uCAAa3r6JI2PH9s6qkDg6OH9W73A== 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 4WZXBV3xq4zpxr; Thu, 1 Aug 2024 14:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EvcMm057763; Thu, 1 Aug 2024 14:57:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EvcOQ057760; Thu, 1 Aug 2024 14:57:38 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:57:38 GMT Message-Id: <202408011457.471EvcOQ057760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 934691dbf34d - stable/13 - stand: Add "Loader needs updating" to the first menu item" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 934691dbf34daaf193451ad9bae978803f813de8 Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=934691dbf34daaf193451ad9bae978803f813de8 commit 934691dbf34daaf193451ad9bae978803f813de8 Author: Warner Losh AuthorDate: 2024-07-29 22:57:37 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:57:14 +0000 stand: Add "Loader needs updating" to the first menu item" When the boot loader version is too old, add a warning to the boot menu to maybe catch people's attention. Use the correct loader code that adds an inactive highlighted menu item indicating that an update is needed. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45890 (cherry picked from commit 0eac99f76ec31270f902cc2a0ff5ae4b5b606a65) (cherry picked from commit 7cb65be96d47cbe0b740266bc633d272fc4c5e6b) --- stand/lua/menu.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 7da03ad9e673..d74c7cd68791 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -263,6 +263,10 @@ menu.welcome = { menu_entries.boot_envs, menu_entries.chainload, menu_entries.vendor, + { + entry_type = core.MENU_SEPARATOR, + }, + menu_entries.loader_needs_upgrade, } end, all_entries = { @@ -411,6 +415,15 @@ menu.welcome = { end, alias = {"l", "L"}, }, + loader_needs_upgrade = { + entry_type = core.MENU_SEPARATOR, + name = function() + return color.highlight("Loader needs to be updated") + end, + visible = function() + return core.loaderTooOld() + end + }, vendor = { entry_type = core.MENU_ENTRY, visible = function() From nobody Thu Aug 1 14:59:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXD54S74z5Stfy; Thu, 01 Aug 2024 14:59:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXD53vX8z4Nww; Thu, 1 Aug 2024 14:59:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g5jj5GrbVe3nC4gWbTKyXd8sxW75KOjuqNFv3laxer4=; b=jGy4dTaPSLLrCCS2dDYJayv2cRxdvnX9606wTYGEeDusZ2jUssNLR9XVHQG2ukF5aNUjFc 8atEJ2PSCnoFPf7I/cC+KrSc86V7n+z+WKEciJuXdyfqexm4ANK9M7OVkFlMo8qQ2g36Qh Xgn6kH5Sno06G2eh6vLgXTgcEwyvE/3/3Uplv3LdtK8zJ+KVZ1oRlJVnlpClT5IPk/j7Nx v4FF5w589odkeDe5r9biwnSvDjjP42FH87zW1tuVVz6Xvh2eYdYxIv7NGc8OaPBd2z3wcn oPyXO9+IwCxr/LO532HvpFdzTqedZncS5WkFMqNYgMypCKmga2N6Sp0EBYUbLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524341; a=rsa-sha256; cv=none; b=aLM+JVbuedfr+eY6mAGjmbeZbQTclhEtQmqSE74QwyCxToDzhPZ5MFWpZmEsbexEiYpzUf YUkCqgpcHdawW+Rx5pAP88OXJTWqhQl0uiL8MGmVWDi8mTh61fGSNpAY3agD1DR/zJzJUa AzLuRP1BZ6BnuT+yJl9zM3GyxAewY9iFJBV0bgSiJl8sukWmAzJhjPAZKWt3W1hzrd7uYt XNbIGbUccbQtvyrXREr/iOfjKWmza+8M0lACBQ1gaeUa1NnzRsNx5m4awa7N6ew3KyBGHE eQlssRu1UCZeyPfi1uJkP5cx41z1gHIy8I/D6vEQSGxZ6zhajUHpaonSis3mkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g5jj5GrbVe3nC4gWbTKyXd8sxW75KOjuqNFv3laxer4=; b=FZwaAOkEGaRoenqtAMpPzZiKIUjIga40vlctoINAs+qvQDr0Q0xfmI+hDVwHSpItQEClB8 iKMkzo2PP5nmqDtIQb0ToAWUN7Qokd33BMP7Dfh5LsVhttbjYPFReoNsnNKyuciNLgCdWM zq4nBscHWTFLUdZM6yd8wRlx7krS1ozYXyTPoupwHyIyqlHm67lkquNleWN745fBdIMAH1 NGTc/AjRPLwzqsW1bn76hvzvBl58ImLpUlTVQ855Zn/lQ/W0j3q/0xH5H7x3cwEm2swkiG UPn44kJtc03Q6BkR+3S4os4ZpaiEbrHg6nb118GfurF3ldcj3U6+IWuPlgKIFw== 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 4WZXD53Vtfzq5c; Thu, 1 Aug 2024 14:59:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471Ex1Ti058118; Thu, 1 Aug 2024 14:59:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Ex1Nw058115; Thu, 1 Aug 2024 14:59:01 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:59:01 GMT Message-Id: <202408011459.471Ex1Nw058115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5dd58282db16 - stable/14 - mptutil: correct man page date List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5dd58282db165cf9ccc05bf78f44a5d406654ca8 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5dd58282db165cf9ccc05bf78f44a5d406654ca8 commit 5dd58282db165cf9ccc05bf78f44a5d406654ca8 Author: Ed Maste AuthorDate: 2024-05-25 18:00:54 +0000 Commit: Ed Maste CommitDate: 2024-08-01 14:55:29 +0000 mptutil: correct man page date PR: 279201 Fixes: 9a49a3792940 ("mptutil: document that disabled/enab...") Sponsored by: The FreeBSD Foundation (cherry picked from commit b128bedfb95c1fefe10e3375b07e200eff8c3664) --- usr.sbin/mptutil/mptutil.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mptutil/mptutil.8 b/usr.sbin/mptutil/mptutil.8 index 47eb9e43d2b9..1aeaafbfa12e 100644 --- a/usr.sbin/mptutil/mptutil.8 +++ b/usr.sbin/mptutil/mptutil.8 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 24, 2024 +.Dd May 24, 2023 .Dt MPTUTIL 8 .Os .Sh NAME From nobody Thu Aug 1 14:59:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXD66L9Hz5Stg0; Thu, 01 Aug 2024 14:59: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXD64xYwz4P2V; Thu, 1 Aug 2024 14:59:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLYB+snWTNL6IHLP8NcPgp5pUejZ+M/GEtfiTOoc5Pg=; b=TNN0lepqBz0opBD1g2oNNLZUSvKKB645AgF8MhqRrz+kYtohNHkcGitE4tc9nDGeLc7/5C /5kWaEBxOJRTXsxqw7Y5vua03awfaKKFqQ2exsWpIF+3pzSVOGNdr3qJ2jB9Kpm/ibn8kX 1MuGYpifBnbEYuj6jGKO/Xn6h7wa+hzQH55D3nhvwflzN3EceeVxekJVefNv0c6XuEVcMY buiWgK3LtycLxFaWmYqn1OEUOca8VSY8HGvpApB6zLLfe5+ZFG6LN4oHmfywjbc11cQsWI tF8cLmIXiRfopw/tYLyaSNxwAIoTo/itcNzq4j3nPgt5qsOlUtOql1ueV+/UvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524342; a=rsa-sha256; cv=none; b=Z0VaRlklXLtkXgUs2CcR+A7Ny+OQQvnQpvsxyi7iia7dvpZAnD/lDJbDXjQzMkR3Y0/qKM dxfNKhDHO1eU9lb5UeCGoZbiG4FuvVeeA4qOuFrxJj8BQJ+MqZ6hEG3b/wkFX5cRgkf8rc g+BMqyIMk3zlwMt2waO2kR2V5VTiU5lv2c7tW0B3pyG3oNC+hlY/NgYaJrUgopBDGnFS/j sXoG3sAh8m7xqlfJgE8qFGIBg82Q1LiWzQjP3crwpivAIF1s0zR70Now5gG4Oq57MRl3Dm Owje91VEZbwI/3hnoJopPiptxOAY0reHjv7CmO5NaBrj17WunCLISZSfK0JYnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLYB+snWTNL6IHLP8NcPgp5pUejZ+M/GEtfiTOoc5Pg=; b=Z1m9s1wj44tnljyxx0Vc2OuJBEJZq4wZVcGlUL0KhZrfgcE92sCX3+Xg92bNwrb8vlhwY3 zezJZWuR3D9W2gXSRgq2zfCGxEQKJuuswy6ZVIVzu1iT4ww0XSqUpuJ97aokEXy8kH1Ol/ DwD4mW/0XVdYmxv62QF59bh/JcIGG2q9JuE6eqHq5uwuzKFbdbclumjBMtHd48imrmpm7i lItN5BFDNnwFUgxRR/C9mG+084/HICXZHNdShNUzQXukbBrWe3NEmPIp+S7NR5CuX8ZMAt 1hWEO5nECNYUOH9sV/cj/4zAsKJauNCpacoY61FpWpaxEX+CTP23lDIkMPToVw== 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 4WZXD64Ctczq1p; Thu, 1 Aug 2024 14:59:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471Ex26B058160; Thu, 1 Aug 2024 14:59:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Ex2ST058157; Thu, 1 Aug 2024 14:59:02 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:59:02 GMT Message-Id: <202408011459.471Ex2ST058157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ecd0ead0635b - stable/14 - ktrace(1): add xref to namei(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ecd0ead0635b3d220ecf600f9136f12077dd0fca Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ecd0ead0635b3d220ecf600f9136f12077dd0fca commit ecd0ead0635b3d220ecf600f9136f12077dd0fca Author: Ed Maste AuthorDate: 2024-06-10 12:51:01 +0000 Commit: Ed Maste CommitDate: 2024-08-01 14:57:48 +0000 ktrace(1): add xref to namei(9) namei was mistaken for a typo (see GitHub pull request #1284). Add an xref to make it clear. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45546 (cherry picked from commit a87651e2ff189cec4c26cb220354f1bc93794f31) --- usr.bin/ktrace/ktrace.1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 1b287af7a611..162706c65e6e 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 -.\" -.Dd April 20, 2024 +.Dd June 10, 2024 .Dt KTRACE 1 .Os .Sh NAME @@ -50,7 +48,8 @@ The utility enables kernel trace logging for the specified processes. Kernel trace data is logged to the file .Pa ktrace.out . -The kernel operations that are traced include system calls, namei +The kernel operations that are traced include system calls, +.Xr namei 9 translations, signal processing, and .Tn I/O . .Pp @@ -201,7 +200,8 @@ Disable tracing of all user-owned processes: .Xr truss 1 , .Xr ktrace 2 , .Xr utrace 2 , -.Xr capsicum 4 +.Xr capsicum 4 , +.Xr namei 9 .Sh HISTORY The .Nm From nobody Thu Aug 1 14:59:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXD81DMxz5StZd; Thu, 01 Aug 2024 14:59:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXD75vKYz4P2X; Thu, 1 Aug 2024 14:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=beyhOwCwOF/eZJpK0OmAxnwb1HRZRZpmjfu+nsuR7F4=; b=NOSVQtInAdzzZ1s/rAd4RuJ/XMJvJUs3voqdXNVrh9uNOon/5Jt3B9zO8IoF1M0D/OCKj5 Kl3GdZmzXv0xseZRjRVEY4GeSGi6cERl/eFJy5fCvVAFXHn25kEEh/F2SvfOKeVEXabrEi IFOzz8Zy8q3CMUYQDe6+YVXT2wp4YcGazUQBMyYnbxFTdibGxqESfWtUozpR6j3CTNbhHe +o78l2jlypw4vBWlgnRQhaNT6j2FuKCTIgv1p0fG/IGEjhKit7LFxhJb8eEWq6wgzEyg36 BXppeKhY55pDOS/TaArxCFC2hW6dPjlt39wYZa1QaiBNv6CffAm7jYbgB+AsxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524343; a=rsa-sha256; cv=none; b=wCY7rvQrlIVDGeypGZcdIJIMbzre4LkrRYyvhJcRrGWCSwYu8KcxTGncuZnHYiytIa1UR3 KrcwpAK+xHpXlKFQ11cu083NkPLz0hg6bADg+dzs1F8VvzGieF69tqWJsd8ZyopsFdpUii 1WtWCLEhI3W6znhqrEWgMuit7OiNkOFIA4wpxiPJpRq6o/PEk9m71d8RAWBVfgExC5OBP9 ieQXNhu8dtf6wfUZFjcMTGV1N2nZvtmaSvIa3zVPCzIm8YletIDgYAbH+PD1mZJrdBJTlW 9U15oZIfExnbfJlxBilsyiUWDCKkCg8I7yo45rsjsReePsJeijY+kz0Kd7d+fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=beyhOwCwOF/eZJpK0OmAxnwb1HRZRZpmjfu+nsuR7F4=; b=DIKju3ZJGtZe8jPfur3VCAmwUfwKF3JLVrztsn/UMJ2P5SmXtf8V+wghc1kXvxm3hhWVCf DTgpUTeNS9y7Y3oRA9W2gyKFfcpoOS8FPPIaElZ9F22VWJh8TGLVx8wpdD58yeFM8GdnNX j3Mu+KQHucESN1j+XoINq1De9YQG56N32tTf2e6JhZZb37NwNSrN4ssBTHG41/o4ecVn+7 uHVSyk4saA+brR0qbiNttsOrog2KD2S8Fj1p/K9wZPeN+IyItAri8ksZKLppLuiUtapivg mrBgGly9HSeXjEJbJxn8Dp+bDGR5YAFH3PND2zSrMNB6inKOosGGXCyFT5Mo6w== 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 4WZXD75V7bzpqR; Thu, 1 Aug 2024 14:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471Ex3ft058199; Thu, 1 Aug 2024 14:59:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Ex3Or058196; Thu, 1 Aug 2024 14:59:03 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:59:03 GMT Message-Id: <202408011459.471Ex3Or058196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 7110def1b1db - stable/14 - ktrace(1): add more xrefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7110def1b1dbf33d5f9e4505c0d646495f91acb6 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7110def1b1dbf33d5f9e4505c0d646495f91acb6 commit 7110def1b1dbf33d5f9e4505c0d646495f91acb6 Author: Ed Maste AuthorDate: 2024-06-11 00:31:08 +0000 Commit: Ed Maste CommitDate: 2024-08-01 14:57:48 +0000 ktrace(1): add more xrefs Following commit a87651e2ff18 add xrefs to intro(2) and sigaction(2), and use a consistent form. Suggested by: kib, arrowd Reviewed by: kib (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45555 (cherry picked from commit 0277c0c6f72a964bf0439db1f4558551052e4f3b) --- usr.bin/ktrace/ktrace.1 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 162706c65e6e..5cc6df52d69a 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -48,9 +48,13 @@ The utility enables kernel trace logging for the specified processes. Kernel trace data is logged to the file .Pa ktrace.out . -The kernel operations that are traced include system calls, -.Xr namei 9 -translations, signal processing, and +The kernel operations that are traced include system calls +.Pq see Xr intro 2 , +file system path lookups +.Pq Xr namei 9 , +signal processing +.Pq Xr sigaction 2 , +and .Tn I/O . .Pp Once tracing is enabled on a process, trace data will be logged until @@ -120,7 +124,9 @@ trace page faults trace .Tn I/O .It Cm n -trace namei translations +trace +.Xr namei 9 +translations .It Cm p trace capability check failures .It Cm s @@ -198,7 +204,9 @@ Disable tracing of all user-owned processes: .Xr dtrace 1 , .Xr kdump 1 , .Xr truss 1 , +.Xr intro 2 , .Xr ktrace 2 , +.Xr sigaction 2 , .Xr utrace 2 , .Xr capsicum 4 , .Xr namei 9 From nobody Thu Aug 1 15:04:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXL00JbNz5StnP; Thu, 01 Aug 2024 15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXKz6x5Bz4QMT; Thu, 1 Aug 2024 15:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgfl0exzEH0uqT6531klkkfU3qKatu+Xia4LJN80bX4=; b=nJ4RsI7RQynlblN1U+tMbocusobvOcQO2/buvU2MtbTs1n5Goe2SbOSNQBZ6321rqS7CR+ sVEw6yQAIrUP+JCrti9nDq4se0+w5/Wqz/RU4anzIR8YzZxe6u6Yq7nns6YWavi6sPIyOj kDBgZ66s1eZf2nPkZ8IcsFl+ECQScArAnnzoJRPfk+FTIRWBaXKKizRNmTW22m8wgjt5bW j4i2Q92NS6hoi3o8n+bCnFLX/GsnDZAJFoTC4dS6pnLnCW/FhM6SFKfbWab9fSLEtufR5R 8oPeCo5by0OK9wdWyg2hebUqsIZLrL7E2TG+7MMF41FIbKCnzjPwmmdyRQU9jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524648; a=rsa-sha256; cv=none; b=U88IzI3UNAFt/T+YqA1snfOdK5jERiz4AAIyKnmE4NdaDP7ehHgnEx14VT6TrV+16XilK5 V4BzWgBi/eRbolQe6OivG6QTWSXKWSpQpGO9+BMGUITMrsWzCFthhkG2LGb+E7ZFaPcqmp Z+aGuXKwmrbBJtFsVEAE+odAPUbRLj+al8velfSk2vQPdUKzEyG0krE789P25Rr1NSnEhv T9qmE7PR5maYx8Q0yJb3uosGaUB6qkJTqlz0djVKn7AaW73kJkqGPrpzI2885B0m4y4das vX8DIncfGuLrXO8X/lNdGk3o8/6kJcNeHDcyJNz9S+AK+/ZPytG2S9xXpKV6Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgfl0exzEH0uqT6531klkkfU3qKatu+Xia4LJN80bX4=; b=WlWrIrh4D0dYg29YYZETAMz1nto+7nCJW8mtY345aFZWTHW8qu3WACz+dchYA9H1YyN/UB CJoADpOAjaZKbwEkNnF/hLYfT23aBViNhiMceS2BgNJUbvtQX9Xemn+gWOSZiK1umhbW3Z pzyb7g85VrrdKJ3FNit4PFFgGMIl9t3FfDPFSQgZrsqcwElD01qcJZIGaLexvsRal+n+tC BjQNAHgK6eswqXGJRaghVzBEtdqPXQMuscyxClxoMrjyv8bnLI7Voe43kTIkNTdUv25Kj1 Xk1IX8dmdkf35907T+bAif+rLX0DJC9s2wy6kQAf2grpt0XEBoVRsUDTl++yDw== 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 4WZXKz6Wp6zpLD; Thu, 1 Aug 2024 15:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471F47kc075047; Thu, 1 Aug 2024 15:04:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471F475l075044; Thu, 1 Aug 2024 15:04:07 GMT (envelope-from git) Date: Thu, 1 Aug 2024 15:04:07 GMT Message-Id: <202408011504.471F475l075044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 79853e40abd8 - stable/13 - OpenSSH: correct logic error in ObscureKeystrokeTiming List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 79853e40abd8a63bd53cbf4059032d7143c69300 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=79853e40abd8a63bd53cbf4059032d7143c69300 commit 79853e40abd8a63bd53cbf4059032d7143c69300 Author: Ed Maste AuthorDate: 2024-07-01 13:14:15 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:03:50 +0000 OpenSSH: correct logic error in ObscureKeystrokeTiming Cherry-pick fix: upstream: when sending ObscureKeystrokeTiming chaff packets, we can't rely on channel_did_enqueue to tell that there is data to send. This flag indicates that the channels code enqueued a packet on _this_ ppoll() iteration, not that data was enqueued in _any_ ppoll() iteration in the timeslice. ok markus@ OpenBSD-Commit-ID: 009b74fd2769b36b5284a0188ade182f00564136 Obtained from: openssh-portable 146c420d29d0 Reviewed by: gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45823 (cherry picked from commit b81424adf7181d816c10b1345aaa3305ab0ec304) (cherry picked from commit bf9a275b24f6655616cc691555fe1a36ed5e4338) --- crypto/openssh/clientloop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/clientloop.c b/crypto/openssh/clientloop.c index 8ec36af94b3f..6dcd6c8535aa 100644 --- a/crypto/openssh/clientloop.c +++ b/crypto/openssh/clientloop.c @@ -608,8 +608,9 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout, if (timespeccmp(&now, &chaff_until, >=)) { /* Stop if there have been no keystrokes for a while */ stop_reason = "chaff time expired"; - } else if (timespeccmp(&now, &next_interval, >=)) { - /* Otherwise if we were due to send, then send chaff */ + } else if (timespeccmp(&now, &next_interval, >=) && + !ssh_packet_have_data_to_write(ssh)) { + /* If due to send but have no data, then send chaff */ if (send_chaff(ssh)) nchaff++; } From nobody Thu Aug 1 15:04:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXL115WMz5Sv4N; Thu, 01 Aug 2024 15:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXL10GD3z4QLK; Thu, 1 Aug 2024 15:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bptEJ8+ox8wdbrR+JCrnoJEx2YTpYSkjI79GnWrSlq4=; b=OOIQoG+mWOB4HdVSmrgE5YwiSwpizSk3W5QXgUT2AqxV2096OLNImc2mL06GoYoVcZtUJh NYGfPHFulrWS+DE95j7RRB6tabRP/H865X6p5JNuHrxuuKDtUbm13ANPz6aVnkcwPSy4tn MhJiFZsk36Y7pMK1b2zCQ1E7kiHlqyS6qwQOUJNtS2PJgPE6Sq7Op75F4OKLUOPafxwkdS TR+b1wgeyGHZ807HD1QY9TL4wsM/Nep2r3lzdJEHcBT90m93y5qejiCmHvXdJtBHAeNtjW 09VFbE25CQBKAeYpeFAsP+1z9gzZqSSE7/mhC3E4x3j1upEcaxrRoM9SHyMAIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722524649; a=rsa-sha256; cv=none; b=JuRumlmLpN3NFTqWN4fdpAgQRPE9NyVUSJI78rcITReblwokT5+uX8glGfzQI8HE46ecSb 5Sb3qLEDQLrAFiwVYkQXNFbgkwXZj15W1KIivtIaxLildYbWJPSFbE5ZzCInoxu6GU6YD6 XgkFcfsdOCF/TWUVoWCRQawtfBVcGv78XlKxsj60FYsYn0ITq3Wp+Hu1DAA/2Lstb7p0u7 yAhhk1+EXy4vT/3aEW8mzr7cE47bgnLPHr85sD3cuv1fZkTIsrW+N/TJo1rliXXOMW1qY/ nUH6CcVkcNw7MWpffLsA/3bjjn6ecEmgnhBy2FGyKMzOJZqdoL6FvoPGpbvncg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722524649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bptEJ8+ox8wdbrR+JCrnoJEx2YTpYSkjI79GnWrSlq4=; b=mv5mbflP5zeyT2eJB3oAydoFs7FxPcBFSgVR5C1jv9te/gKZmipDw2/dOJYJGjdOyhlz9J TTBxNBS3kjhZQFvXWz4qm3wU8tVf9RcFF4XbeOJTji3q6hLG7gqyuHoScsq+B2LSxn4UrP D2Da33hJK4gDvcyYpCr+IUwKkJ7gXI4gOJByh/unXHrVLXONNPuI5XgH6sm00xJWaY752E qXLhk1Tobby7/FC2UZVWsvm/Bqf+NxJYUOflnTW6HqExNuteB4UmX+yIT6MUMkMUytaXCl ngazahrutCsjda9LUkgoky0SxhS2M7V9UApBKP718a2TDBmjhh+8ZVWXFmufwQ== 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 4WZXL06yy8zq6Q; Thu, 1 Aug 2024 15:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471F48iK075098; Thu, 1 Aug 2024 15:04:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471F48qG075095; Thu, 1 Aug 2024 15:04:08 GMT (envelope-from git) Date: Thu, 1 Aug 2024 15:04:08 GMT Message-Id: <202408011504.471F48qG075095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: fa492c77a95f - stable/13 - openssh: use '' instead of `' in config.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: fa492c77a95f86c91be9e55a73fac05bd41e5fbc Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fa492c77a95f86c91be9e55a73fac05bd41e5fbc commit fa492c77a95f86c91be9e55a73fac05bd41e5fbc Author: Ed Maste AuthorDate: 2024-07-01 14:45:43 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:03:50 +0000 openssh: use '' instead of `' in config.h Autoconf 2.72 uses '' rather tha `' in comments in config.h, from autoconf commit 64df9b4523fe ("Autoconf now quotes 'like this' instead of `like this'"). Switch quoting style now to minimize diffs on the next OpenSSH update and config.h regen. Reviewed by: gordon, philip Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45840 (cherry picked from commit 94416c6939f431b29286a71bb2797e749df9645c) (cherry picked from commit 60f78f8ed14d5e66ce689532e18282a09a1a4e72) --- crypto/openssh/config.h | 614 ++++++++++++++++++++++++------------------------ 1 file changed, 307 insertions(+), 307 deletions(-) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 9f5cb1800951..78bd4280818a 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -196,19 +196,19 @@ /* Define if you have ut_addr_v6 in utmpx.h */ /* #undef HAVE_ADDR_V6_IN_UTMPX */ -/* Define to 1 if you have the `arc4random' function. */ +/* Define to 1 if you have the 'arc4random' function. */ #define HAVE_ARC4RANDOM 1 -/* Define to 1 if you have the `arc4random_buf' function. */ +/* Define to 1 if you have the 'arc4random_buf' function. */ #define HAVE_ARC4RANDOM_BUF 1 -/* Define to 1 if you have the `arc4random_stir' function. */ +/* Define to 1 if you have the 'arc4random_stir' function. */ /* #undef HAVE_ARC4RANDOM_STIR */ -/* Define to 1 if you have the `arc4random_uniform' function. */ +/* Define to 1 if you have the 'arc4random_uniform' function. */ #define HAVE_ARC4RANDOM_UNIFORM 1 -/* Define to 1 if you have the `asprintf' function. */ +/* Define to 1 if you have the 'asprintf' function. */ #define HAVE_ASPRINTF 1 /* OpenBSD's gcc has bounded */ @@ -220,52 +220,52 @@ /* OpenBSD's gcc has sentinel */ /* #undef HAVE_ATTRIBUTE__SENTINEL__ */ -/* Define to 1 if you have the `aug_get_machine' function. */ +/* Define to 1 if you have the 'aug_get_machine' function. */ /* #undef HAVE_AUG_GET_MACHINE */ -/* Define to 1 if you have the `auth_hostok' function. */ +/* Define to 1 if you have the 'auth_hostok' function. */ #define HAVE_AUTH_HOSTOK 1 -/* Define to 1 if you have the `auth_timeok' function. */ +/* Define to 1 if you have the 'auth_timeok' function. */ #define HAVE_AUTH_TIMEOK 1 -/* Define to 1 if you have the `b64_ntop' function. */ +/* Define to 1 if you have the 'b64_ntop' function. */ /* #undef HAVE_B64_NTOP */ -/* Define to 1 if you have the `b64_pton' function. */ +/* Define to 1 if you have the 'b64_pton' function. */ /* #undef HAVE_B64_PTON */ /* Define if you have the basename function. */ #define HAVE_BASENAME 1 -/* Define to 1 if you have the `bcopy' function. */ +/* Define to 1 if you have the 'bcopy' function. */ #define HAVE_BCOPY 1 -/* Define to 1 if you have the `bcrypt_pbkdf' function. */ +/* Define to 1 if you have the 'bcrypt_pbkdf' function. */ /* #undef HAVE_BCRYPT_PBKDF */ -/* Define to 1 if you have the `bindresvport_sa' function. */ +/* Define to 1 if you have the 'bindresvport_sa' function. */ #define HAVE_BINDRESVPORT_SA 1 -/* Define to 1 if you have the `blf_enc' function. */ +/* Define to 1 if you have the 'blf_enc' function. */ /* #undef HAVE_BLF_ENC */ /* Define to 1 if you have the header file. */ /* #undef HAVE_BLF_H */ -/* Define to 1 if you have the `Blowfish_expand0state' function. */ +/* Define to 1 if you have the 'Blowfish_expand0state' function. */ /* #undef HAVE_BLOWFISH_EXPAND0STATE */ -/* Define to 1 if you have the `Blowfish_expandstate' function. */ +/* Define to 1 if you have the 'Blowfish_expandstate' function. */ /* #undef HAVE_BLOWFISH_EXPANDSTATE */ -/* Define to 1 if you have the `Blowfish_initstate' function. */ +/* Define to 1 if you have the 'Blowfish_initstate' function. */ /* #undef HAVE_BLOWFISH_INITSTATE */ -/* Define to 1 if you have the `Blowfish_stream2word' function. */ +/* Define to 1 if you have the 'Blowfish_stream2word' function. */ /* #undef HAVE_BLOWFISH_STREAM2WORD */ -/* Define to 1 if you have the `BN_is_prime_ex' function. */ +/* Define to 1 if you have the 'BN_is_prime_ex' function. */ #define HAVE_BN_IS_PRIME_EX 1 /* Define to 1 if you have the header file. */ @@ -277,7 +277,7 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_BSTRING_H */ -/* Define to 1 if you have the `bzero' function. */ +/* Define to 1 if you have the 'bzero' function. */ #define HAVE_BZERO 1 /* calloc(0, x) returns NULL */ @@ -289,10 +289,10 @@ /* Define to 1 if you have the header file. */ #define HAVE_CAPSICUM_HELPERS_H 1 -/* Define to 1 if you have the `cap_rights_limit' function. */ +/* Define to 1 if you have the 'cap_rights_limit' function. */ #define HAVE_CAP_RIGHTS_LIMIT 1 -/* Define to 1 if you have the `clock' function. */ +/* Define to 1 if you have the 'clock' function. */ #define HAVE_CLOCK 1 /* Have clock_gettime */ @@ -301,10 +301,10 @@ /* define if you have clock_t data type */ #define HAVE_CLOCK_T 1 -/* Define to 1 if you have the `closefrom' function. */ +/* Define to 1 if you have the 'closefrom' function. */ #define HAVE_CLOSEFROM 1 -/* Define to 1 if you have the `close_range' function. */ +/* Define to 1 if you have the 'close_range' function. */ #define HAVE_CLOSE_RANGE 1 /* Define if gai_strerror() returns const char * */ @@ -313,7 +313,7 @@ /* Define if your system uses ancillary data style file descriptor passing */ #define HAVE_CONTROL_IN_MSGHDR 1 -/* Define to 1 if you have the `crypt' function. */ +/* Define to 1 if you have the 'crypt' function. */ #define HAVE_CRYPT 1 /* Define to 1 if you have the header file. */ @@ -328,111 +328,111 @@ /* Define if your libraries define daemon() */ #define HAVE_DAEMON 1 -/* Define to 1 if you have the declaration of `AI_NUMERICSERV', and to 0 if +/* Define to 1 if you have the declaration of 'AI_NUMERICSERV', and to 0 if you don't. */ #define HAVE_DECL_AI_NUMERICSERV 1 -/* Define to 1 if you have the declaration of `authenticate', and to 0 if you +/* Define to 1 if you have the declaration of 'authenticate', and to 0 if you don't. */ /* #undef HAVE_DECL_AUTHENTICATE */ -/* Define to 1 if you have the declaration of `bzero', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'bzero', and to 0 if you don't. */ #define HAVE_DECL_BZERO 1 -/* Define to 1 if you have the declaration of `ftruncate', and to 0 if you +/* Define to 1 if you have the declaration of 'ftruncate', and to 0 if you don't. */ #define HAVE_DECL_FTRUNCATE 1 -/* Define to 1 if you have the declaration of `getentropy', and to 0 if you +/* Define to 1 if you have the declaration of 'getentropy', and to 0 if you don't. */ #define HAVE_DECL_GETENTROPY 1 -/* Define to 1 if you have the declaration of `getpeereid', and to 0 if you +/* Define to 1 if you have the declaration of 'getpeereid', and to 0 if you don't. */ #define HAVE_DECL_GETPEEREID 1 -/* Define to 1 if you have the declaration of `GLOB_NOMATCH', and to 0 if you +/* Define to 1 if you have the declaration of 'GLOB_NOMATCH', and to 0 if you don't. */ #define HAVE_DECL_GLOB_NOMATCH 1 -/* Define to 1 if you have the declaration of `GSS_C_NT_HOSTBASED_SERVICE', +/* Define to 1 if you have the declaration of 'GSS_C_NT_HOSTBASED_SERVICE', and to 0 if you don't. */ /* #undef HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE */ -/* Define to 1 if you have the declaration of `howmany', and to 0 if you +/* Define to 1 if you have the declaration of 'howmany', and to 0 if you don't. */ #define HAVE_DECL_HOWMANY 1 -/* Define to 1 if you have the declaration of `h_errno', and to 0 if you +/* Define to 1 if you have the declaration of 'h_errno', and to 0 if you don't. */ #define HAVE_DECL_H_ERRNO 1 -/* Define to 1 if you have the declaration of `loginfailed', and to 0 if you +/* Define to 1 if you have the declaration of 'loginfailed', and to 0 if you don't. */ /* #undef HAVE_DECL_LOGINFAILED */ -/* Define to 1 if you have the declaration of `loginrestrictions', and to 0 if +/* Define to 1 if you have the declaration of 'loginrestrictions', and to 0 if you don't. */ /* #undef HAVE_DECL_LOGINRESTRICTIONS */ -/* Define to 1 if you have the declaration of `loginsuccess', and to 0 if you +/* Define to 1 if you have the declaration of 'loginsuccess', and to 0 if you don't. */ /* #undef HAVE_DECL_LOGINSUCCESS */ -/* Define to 1 if you have the declaration of `MAXSYMLINKS', and to 0 if you +/* Define to 1 if you have the declaration of 'MAXSYMLINKS', and to 0 if you don't. */ #define HAVE_DECL_MAXSYMLINKS 1 -/* Define to 1 if you have the declaration of `memmem', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'memmem', and to 0 if you don't. */ #define HAVE_DECL_MEMMEM 1 -/* Define to 1 if you have the declaration of `NFDBITS', and to 0 if you +/* Define to 1 if you have the declaration of 'NFDBITS', and to 0 if you don't. */ #define HAVE_DECL_NFDBITS 1 -/* Define to 1 if you have the declaration of `offsetof', and to 0 if you +/* Define to 1 if you have the declaration of 'offsetof', and to 0 if you don't. */ #define HAVE_DECL_OFFSETOF 1 -/* Define to 1 if you have the declaration of `O_NONBLOCK', and to 0 if you +/* Define to 1 if you have the declaration of 'O_NONBLOCK', and to 0 if you don't. */ #define HAVE_DECL_O_NONBLOCK 1 -/* Define to 1 if you have the declaration of `passwdexpired', and to 0 if you +/* Define to 1 if you have the declaration of 'passwdexpired', and to 0 if you don't. */ /* #undef HAVE_DECL_PASSWDEXPIRED */ -/* Define to 1 if you have the declaration of `readv', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'readv', and to 0 if you don't. */ #define HAVE_DECL_READV 1 -/* Define to 1 if you have the declaration of `setauthdb', and to 0 if you +/* Define to 1 if you have the declaration of 'setauthdb', and to 0 if you don't. */ /* #undef HAVE_DECL_SETAUTHDB */ -/* Define to 1 if you have the declaration of `SHUT_RD', and to 0 if you +/* Define to 1 if you have the declaration of 'SHUT_RD', and to 0 if you don't. */ #define HAVE_DECL_SHUT_RD 1 -/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you +/* Define to 1 if you have the declaration of 'UINT32_MAX', and to 0 if you don't. */ #define HAVE_DECL_UINT32_MAX 1 -/* Define to 1 if you have the declaration of `writev', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'writev', and to 0 if you don't. */ #define HAVE_DECL_WRITEV 1 -/* Define to 1 if you have the declaration of `_getlong', and to 0 if you +/* Define to 1 if you have the declaration of '_getlong', and to 0 if you don't. */ #define HAVE_DECL__GETLONG 0 -/* Define to 1 if you have the declaration of `_getshort', and to 0 if you +/* Define to 1 if you have the declaration of '_getshort', and to 0 if you don't. */ #define HAVE_DECL__GETSHORT 0 -/* Define to 1 if you have the `DES_crypt' function. */ +/* Define to 1 if you have the 'DES_crypt' function. */ #define HAVE_DES_CRYPT 1 /* Define if you have /dev/ptmx */ @@ -444,40 +444,40 @@ /* Define to 1 if you have the header file. */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dirfd' function. */ +/* Define to 1 if you have the 'dirfd' function. */ #define HAVE_DIRFD 1 -/* Define to 1 if you have the `dirname' function. */ +/* Define to 1 if you have the 'dirname' function. */ #define HAVE_DIRNAME 1 -/* Define to 1 if you have the `dlopen' function. */ +/* Define to 1 if you have the 'dlopen' function. */ #define HAVE_DLOPEN 1 -/* Define to 1 if you have the `DSA_generate_parameters_ex' function. */ +/* Define to 1 if you have the 'DSA_generate_parameters_ex' function. */ #define HAVE_DSA_GENERATE_PARAMETERS_EX 1 -/* Define to 1 if you have the `EC_KEY_METHOD_new' function. */ +/* Define to 1 if you have the 'EC_KEY_METHOD_new' function. */ #define HAVE_EC_KEY_METHOD_NEW 1 /* Define to 1 if you have the header file. */ #define HAVE_ELF_H 1 -/* Define to 1 if you have the `endgrent' function. */ +/* Define to 1 if you have the 'endgrent' function. */ #define HAVE_ENDGRENT 1 /* Define to 1 if you have the header file. */ #define HAVE_ENDIAN_H 1 -/* Define to 1 if you have the `endutent' function. */ +/* Define to 1 if you have the 'endutent' function. */ /* #undef HAVE_ENDUTENT */ -/* Define to 1 if you have the `endutxent' function. */ +/* Define to 1 if you have the 'endutxent' function. */ #define HAVE_ENDUTXENT 1 -/* Define to 1 if you have the `err' function. */ +/* Define to 1 if you have the 'err' function. */ #define HAVE_ERR 1 -/* Define to 1 if you have the `errx' function. */ +/* Define to 1 if you have the 'errx' function. */ #define HAVE_ERRX 1 /* Define to 1 if you have the header file. */ @@ -486,73 +486,73 @@ /* Define if your system has /etc/default/login */ /* #undef HAVE_ETC_DEFAULT_LOGIN */ -/* Define to 1 if you have the `EVP_chacha20' function. */ +/* Define to 1 if you have the 'EVP_chacha20' function. */ #define HAVE_EVP_CHACHA20 1 -/* Define to 1 if you have the `EVP_CIPHER_CTX_get_iv' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_get_iv' function. */ /* #undef HAVE_EVP_CIPHER_CTX_GET_IV */ -/* Define to 1 if you have the `EVP_CIPHER_CTX_get_updated_iv' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_get_updated_iv' function. */ /* #undef HAVE_EVP_CIPHER_CTX_GET_UPDATED_IV */ -/* Define to 1 if you have the `EVP_CIPHER_CTX_iv' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_iv' function. */ #define HAVE_EVP_CIPHER_CTX_IV 1 -/* Define to 1 if you have the `EVP_CIPHER_CTX_iv_noconst' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_iv_noconst' function. */ #define HAVE_EVP_CIPHER_CTX_IV_NOCONST 1 -/* Define to 1 if you have the `EVP_CIPHER_CTX_set_iv' function. */ +/* Define to 1 if you have the 'EVP_CIPHER_CTX_set_iv' function. */ /* #undef HAVE_EVP_CIPHER_CTX_SET_IV */ -/* Define to 1 if you have the `EVP_DigestFinal_ex' function. */ +/* Define to 1 if you have the 'EVP_DigestFinal_ex' function. */ #define HAVE_EVP_DIGESTFINAL_EX 1 -/* Define to 1 if you have the `EVP_DigestInit_ex' function. */ +/* Define to 1 if you have the 'EVP_DigestInit_ex' function. */ #define HAVE_EVP_DIGESTINIT_EX 1 -/* Define to 1 if you have the `EVP_MD_CTX_cleanup' function. */ +/* Define to 1 if you have the 'EVP_MD_CTX_cleanup' function. */ /* #undef HAVE_EVP_MD_CTX_CLEANUP */ -/* Define to 1 if you have the `EVP_MD_CTX_copy_ex' function. */ +/* Define to 1 if you have the 'EVP_MD_CTX_copy_ex' function. */ #define HAVE_EVP_MD_CTX_COPY_EX 1 -/* Define to 1 if you have the `EVP_MD_CTX_init' function. */ +/* Define to 1 if you have the 'EVP_MD_CTX_init' function. */ /* #undef HAVE_EVP_MD_CTX_INIT */ -/* Define to 1 if you have the `EVP_PKEY_get_raw_private_key' function. */ +/* Define to 1 if you have the 'EVP_PKEY_get_raw_private_key' function. */ #define HAVE_EVP_PKEY_GET_RAW_PRIVATE_KEY 1 -/* Define to 1 if you have the `EVP_PKEY_get_raw_public_key' function. */ +/* Define to 1 if you have the 'EVP_PKEY_get_raw_public_key' function. */ #define HAVE_EVP_PKEY_GET_RAW_PUBLIC_KEY 1 -/* Define to 1 if you have the `EVP_sha256' function. */ +/* Define to 1 if you have the 'EVP_sha256' function. */ #define HAVE_EVP_SHA256 1 -/* Define to 1 if you have the `EVP_sha384' function. */ +/* Define to 1 if you have the 'EVP_sha384' function. */ #define HAVE_EVP_SHA384 1 -/* Define to 1 if you have the `EVP_sha512' function. */ +/* Define to 1 if you have the 'EVP_sha512' function. */ #define HAVE_EVP_SHA512 1 /* Define if you have ut_exit in utmp.h */ /* #undef HAVE_EXIT_IN_UTMP */ -/* Define to 1 if you have the `explicit_bzero' function. */ +/* Define to 1 if you have the 'explicit_bzero' function. */ #define HAVE_EXPLICIT_BZERO 1 -/* Define to 1 if you have the `explicit_memset' function. */ +/* Define to 1 if you have the 'explicit_memset' function. */ /* #undef HAVE_EXPLICIT_MEMSET */ -/* Define to 1 if you have the `fchmod' function. */ +/* Define to 1 if you have the 'fchmod' function. */ #define HAVE_FCHMOD 1 -/* Define to 1 if you have the `fchmodat' function. */ +/* Define to 1 if you have the 'fchmodat' function. */ #define HAVE_FCHMODAT 1 -/* Define to 1 if you have the `fchown' function. */ +/* Define to 1 if you have the 'fchown' function. */ #define HAVE_FCHOWN 1 -/* Define to 1 if you have the `fchownat' function. */ +/* Define to 1 if you have the 'fchownat' function. */ #define HAVE_FCHOWNAT 1 /* Use F_CLOSEM fcntl for closefrom */ @@ -561,109 +561,109 @@ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if the system has the type `fd_mask'. */ +/* Define to 1 if the system has the type 'fd_mask'. */ #define HAVE_FD_MASK 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_FEATURES_H */ -/* Define to 1 if you have the `fido_assert_set_clientdata' function. */ +/* Define to 1 if you have the 'fido_assert_set_clientdata' function. */ /* #undef HAVE_FIDO_ASSERT_SET_CLIENTDATA */ -/* Define to 1 if you have the `fido_cred_prot' function. */ +/* Define to 1 if you have the 'fido_cred_prot' function. */ /* #undef HAVE_FIDO_CRED_PROT */ -/* Define to 1 if you have the `fido_cred_set_clientdata' function. */ +/* Define to 1 if you have the 'fido_cred_set_clientdata' function. */ /* #undef HAVE_FIDO_CRED_SET_CLIENTDATA */ -/* Define to 1 if you have the `fido_cred_set_prot' function. */ +/* Define to 1 if you have the 'fido_cred_set_prot' function. */ /* #undef HAVE_FIDO_CRED_SET_PROT */ -/* Define to 1 if you have the `fido_dev_get_touch_begin' function. */ +/* Define to 1 if you have the 'fido_dev_get_touch_begin' function. */ /* #undef HAVE_FIDO_DEV_GET_TOUCH_BEGIN */ -/* Define to 1 if you have the `fido_dev_get_touch_status' function. */ +/* Define to 1 if you have the 'fido_dev_get_touch_status' function. */ /* #undef HAVE_FIDO_DEV_GET_TOUCH_STATUS */ -/* Define to 1 if you have the `fido_dev_is_winhello' function. */ +/* Define to 1 if you have the 'fido_dev_is_winhello' function. */ /* #undef HAVE_FIDO_DEV_IS_WINHELLO */ -/* Define to 1 if you have the `fido_dev_supports_cred_prot' function. */ +/* Define to 1 if you have the 'fido_dev_supports_cred_prot' function. */ /* #undef HAVE_FIDO_DEV_SUPPORTS_CRED_PROT */ /* Define to 1 if you have the header file. */ #define HAVE_FLOATINGPOINT_H 1 -/* Define to 1 if you have the `flock' function. */ +/* Define to 1 if you have the 'flock' function. */ #define HAVE_FLOCK 1 -/* Define to 1 if you have the `fmt_scaled' function. */ +/* Define to 1 if you have the 'fmt_scaled' function. */ /* #undef HAVE_FMT_SCALED */ -/* Define to 1 if you have the `fnmatch' function. */ +/* Define to 1 if you have the 'fnmatch' function. */ #define HAVE_FNMATCH 1 /* Define to 1 if you have the header file. */ #define HAVE_FNMATCH_H 1 -/* Define to 1 if you have the `freeaddrinfo' function. */ +/* Define to 1 if you have the 'freeaddrinfo' function. */ #define HAVE_FREEADDRINFO 1 -/* Define to 1 if you have the `freezero' function. */ +/* Define to 1 if you have the 'freezero' function. */ /* #undef HAVE_FREEZERO */ -/* Define to 1 if the system has the type `fsblkcnt_t'. */ +/* Define to 1 if the system has the type 'fsblkcnt_t'. */ #define HAVE_FSBLKCNT_T 1 -/* Define to 1 if the system has the type `fsfilcnt_t'. */ +/* Define to 1 if the system has the type 'fsfilcnt_t'. */ #define HAVE_FSFILCNT_T 1 -/* Define to 1 if you have the `fstatfs' function. */ +/* Define to 1 if you have the 'fstatfs' function. */ #define HAVE_FSTATFS 1 -/* Define to 1 if you have the `fstatvfs' function. */ +/* Define to 1 if you have the 'fstatvfs' function. */ #define HAVE_FSTATVFS 1 -/* Define to 1 if you have the `futimes' function. */ +/* Define to 1 if you have the 'futimes' function. */ #define HAVE_FUTIMES 1 -/* Define to 1 if you have the `gai_strerror' function. */ +/* Define to 1 if you have the 'gai_strerror' function. */ #define HAVE_GAI_STRERROR 1 -/* Define to 1 if you have the `getaddrinfo' function. */ +/* Define to 1 if you have the 'getaddrinfo' function. */ #define HAVE_GETADDRINFO 1 -/* Define to 1 if you have the `getaudit' function. */ +/* Define to 1 if you have the 'getaudit' function. */ /* #undef HAVE_GETAUDIT */ -/* Define to 1 if you have the `getaudit_addr' function. */ +/* Define to 1 if you have the 'getaudit_addr' function. */ /* #undef HAVE_GETAUDIT_ADDR */ -/* Define to 1 if you have the `getcwd' function. */ +/* Define to 1 if you have the 'getcwd' function. */ #define HAVE_GETCWD 1 -/* Define to 1 if you have the `getentropy' function. */ +/* Define to 1 if you have the 'getentropy' function. */ #define HAVE_GETENTROPY 1 -/* Define to 1 if you have the `getgrouplist' function. */ +/* Define to 1 if you have the 'getgrouplist' function. */ #define HAVE_GETGROUPLIST 1 -/* Define to 1 if you have the `getgrset' function. */ +/* Define to 1 if you have the 'getgrset' function. */ /* #undef HAVE_GETGRSET */ -/* Define to 1 if you have the `getlastlogxbyname' function. */ +/* Define to 1 if you have the 'getlastlogxbyname' function. */ /* #undef HAVE_GETLASTLOGXBYNAME */ -/* Define to 1 if you have the `getline' function. */ +/* Define to 1 if you have the 'getline' function. */ #define HAVE_GETLINE 1 -/* Define to 1 if you have the `getluid' function. */ +/* Define to 1 if you have the 'getluid' function. */ /* #undef HAVE_GETLUID */ -/* Define to 1 if you have the `getnameinfo' function. */ +/* Define to 1 if you have the 'getnameinfo' function. */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the `getopt' function. */ +/* Define to 1 if you have the 'getopt' function. */ #define HAVE_GETOPT 1 /* Define to 1 if you have the header file. */ @@ -675,73 +675,73 @@ /* Define if your libraries define getpagesize() */ #define HAVE_GETPAGESIZE 1 -/* Define to 1 if you have the `getpeereid' function. */ +/* Define to 1 if you have the 'getpeereid' function. */ #define HAVE_GETPEEREID 1 -/* Define to 1 if you have the `getpeerucred' function. */ +/* Define to 1 if you have the 'getpeerucred' function. */ /* #undef HAVE_GETPEERUCRED */ -/* Define to 1 if you have the `getpgid' function. */ +/* Define to 1 if you have the 'getpgid' function. */ #define HAVE_GETPGID 1 -/* Define to 1 if you have the `getpgrp' function. */ +/* Define to 1 if you have the 'getpgrp' function. */ #define HAVE_GETPGRP 1 -/* Define to 1 if you have the `getpwanam' function. */ +/* Define to 1 if you have the 'getpwanam' function. */ /* #undef HAVE_GETPWANAM */ -/* Define to 1 if you have the `getrandom' function. */ +/* Define to 1 if you have the 'getrandom' function. */ #define HAVE_GETRANDOM 1 -/* Define to 1 if you have the `getrlimit' function. */ +/* Define to 1 if you have the 'getrlimit' function. */ #define HAVE_GETRLIMIT 1 /* Define if getrrsetbyname() exists */ /* #undef HAVE_GETRRSETBYNAME */ -/* Define to 1 if you have the `getseuserbyname' function. */ +/* Define to 1 if you have the 'getseuserbyname' function. */ /* #undef HAVE_GETSEUSERBYNAME */ -/* Define to 1 if you have the `getsid' function. */ +/* Define to 1 if you have the 'getsid' function. */ #define HAVE_GETSID 1 -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have the 'gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 -/* Define to 1 if you have the `getttyent' function. */ +/* Define to 1 if you have the 'getttyent' function. */ #define HAVE_GETTTYENT 1 -/* Define to 1 if you have the `getutent' function. */ +/* Define to 1 if you have the 'getutent' function. */ /* #undef HAVE_GETUTENT */ -/* Define to 1 if you have the `getutid' function. */ +/* Define to 1 if you have the 'getutid' function. */ /* #undef HAVE_GETUTID */ -/* Define to 1 if you have the `getutline' function. */ +/* Define to 1 if you have the 'getutline' function. */ /* #undef HAVE_GETUTLINE */ -/* Define to 1 if you have the `getutxent' function. */ +/* Define to 1 if you have the 'getutxent' function. */ #define HAVE_GETUTXENT 1 -/* Define to 1 if you have the `getutxid' function. */ +/* Define to 1 if you have the 'getutxid' function. */ #define HAVE_GETUTXID 1 -/* Define to 1 if you have the `getutxline' function. */ +/* Define to 1 if you have the 'getutxline' function. */ #define HAVE_GETUTXLINE 1 -/* Define to 1 if you have the `getutxuser' function. */ +/* Define to 1 if you have the 'getutxuser' function. */ #define HAVE_GETUTXUSER 1 -/* Define to 1 if you have the `get_default_context_with_level' function. */ +/* Define to 1 if you have the 'get_default_context_with_level' function. */ /* #undef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL */ -/* Define to 1 if you have the `glob' function. */ +/* Define to 1 if you have the 'glob' function. */ #define HAVE_GLOB 1 /* Define to 1 if you have the header file. */ #define HAVE_GLOB_H 1 -/* Define to 1 if you have the `group_from_gid' function. */ +/* Define to 1 if you have the 'group_from_gid' function. */ #define HAVE_GROUP_FROM_GID 1 /* Define to 1 if you have the header file. */ @@ -765,7 +765,7 @@ /* Define if HEADER.ad exists in arpa/nameser.h */ #define HAVE_HEADER_AD 1 -/* Define to 1 if you have the `HMAC_CTX_init' function. */ +/* Define to 1 if you have the 'HMAC_CTX_init' function. */ /* #undef HAVE_HMAC_CTX_INIT */ /* Define if you have ut_host in utmp.h */ @@ -789,22 +789,22 @@ /* Define to 1 if you have the header file. */ #define HAVE_IFADDRS_H 1 -/* Define to 1 if you have the `inet_aton' function. */ +/* Define to 1 if you have the 'inet_aton' function. */ #define HAVE_INET_ATON 1 -/* Define to 1 if you have the `inet_ntoa' function. */ +/* Define to 1 if you have the 'inet_ntoa' function. */ #define HAVE_INET_NTOA 1 -/* Define to 1 if you have the `inet_ntop' function. */ +/* Define to 1 if you have the 'inet_ntop' function. */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have the `innetgr' function. */ +/* Define to 1 if you have the 'innetgr' function. */ #define HAVE_INNETGR 1 /* define if you have int64_t data type */ #define HAVE_INT64_T 1 -/* Define to 1 if the system has the type `intmax_t'. */ +/* Define to 1 if the system has the type 'intmax_t'. */ #define HAVE_INTMAX_T 1 /* Define to 1 if you have the header file. */ @@ -813,25 +813,25 @@ /* define if you have intxx_t data type */ #define HAVE_INTXX_T 1 -/* Define to 1 if the system has the type `in_addr_t'. */ +/* Define to 1 if the system has the type 'in_addr_t'. */ #define HAVE_IN_ADDR_T 1 -/* Define to 1 if the system has the type `in_port_t'. */ +/* Define to 1 if the system has the type 'in_port_t'. */ #define HAVE_IN_PORT_T 1 /* Define if you have isblank(3C). */ #define HAVE_ISBLANK 1 -/* Define to 1 if you have the `killpg' function. */ +/* Define to 1 if you have the 'killpg' function. */ #define HAVE_KILLPG 1 -/* Define to 1 if you have the `krb5_cc_new_unique' function. */ +/* Define to 1 if you have the 'krb5_cc_new_unique' function. */ /* #undef HAVE_KRB5_CC_NEW_UNIQUE */ -/* Define to 1 if you have the `krb5_free_error_message' function. */ +/* Define to 1 if you have the 'krb5_free_error_message' function. */ /* #undef HAVE_KRB5_FREE_ERROR_MESSAGE */ -/* Define to 1 if you have the `krb5_get_error_message' function. */ +/* Define to 1 if you have the 'krb5_get_error_message' function. */ /* #undef HAVE_KRB5_GET_ERROR_MESSAGE */ /* Define to 1 if you have the header file. */ @@ -846,10 +846,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBAUDIT_H */ -/* Define to 1 if you have the `bsm' library (-lbsm). */ +/* Define to 1 if you have the 'bsm' library (-lbsm). */ /* #undef HAVE_LIBBSM */ -/* Define to 1 if you have the `dl' library (-ldl). */ +/* Define to 1 if you have the 'dl' library (-ldl). */ #define HAVE_LIBDL 1 /* Define to 1 if you have the header file. */ @@ -858,25 +858,25 @@ /* Define if system has libiaf that supports set_id */ /* #undef HAVE_LIBIAF */ -/* Define to 1 if you have the `network' library (-lnetwork). */ +/* Define to 1 if you have the 'network' library (-lnetwork). */ /* #undef HAVE_LIBNETWORK */ -/* Define to 1 if you have the `pam' library (-lpam). */ +/* Define to 1 if you have the 'pam' library (-lpam). */ #define HAVE_LIBPAM 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBPROC_H */ -/* Define to 1 if you have the `socket' library (-lsocket). */ +/* Define to 1 if you have the 'socket' library (-lsocket). */ /* #undef HAVE_LIBSOCKET */ /* Define to 1 if you have the header file. */ #define HAVE_LIBUTIL_H 1 -/* Define to 1 if you have the `xnet' library (-lxnet). */ +/* Define to 1 if you have the 'xnet' library (-lxnet). */ /* #undef HAVE_LIBXNET */ -/* Define to 1 if you have the `z' library (-lz). */ +/* Define to 1 if you have the 'z' library (-lz). */ #define HAVE_LIBZ 1 /* Define to 1 if you have the header file. */ @@ -894,65 +894,65 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_SECCOMP_H */ -/* Define to 1 if you have the `llabs' function. */ +/* Define to 1 if you have the 'llabs' function. */ #define HAVE_LLABS 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 -/* Define to 1 if you have the `localtime_r' function. */ +/* Define to 1 if you have the 'localtime_r' function. */ #define HAVE_LOCALTIME_R 1 -/* Define to 1 if you have the `login' function. */ +/* Define to 1 if you have the 'login' function. */ /* #undef HAVE_LOGIN */ /* Define to 1 if you have the header file. */ #define HAVE_LOGIN_CAP_H 1 -/* Define to 1 if you have the `login_getcapbool' function. */ +/* Define to 1 if you have the 'login_getcapbool' function. */ #define HAVE_LOGIN_GETCAPBOOL 1 -/* Define to 1 if you have the `login_getpwclass' function. */ +/* Define to 1 if you have the 'login_getpwclass' function. */ #define HAVE_LOGIN_GETPWCLASS 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_LOGIN_H */ -/* Define to 1 if you have the `logout' function. */ +/* Define to 1 if you have the 'logout' function. */ /* #undef HAVE_LOGOUT */ -/* Define to 1 if you have the `logwtmp' function. */ +/* Define to 1 if you have the 'logwtmp' function. */ /* #undef HAVE_LOGWTMP */ -/* Define to 1 if the system has the type `long double'. */ +/* Define to 1 if the system has the type 'long double'. */ #define HAVE_LONG_DOUBLE 1 -/* Define to 1 if the system has the type `long long'. */ +/* Define to 1 if the system has the type 'long long'. */ #define HAVE_LONG_LONG 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_MAILLOCK_H */ -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and +/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise. */ #define HAVE_MALLOC 1 -/* Define to 1 if you have the `mblen' function. */ +/* Define to 1 if you have the 'mblen' function. */ #define HAVE_MBLEN 1 -/* Define to 1 if you have the `mbtowc' function. */ +/* Define to 1 if you have the 'mbtowc' function. */ #define HAVE_MBTOWC 1 -/* Define to 1 if you have the `memmem' function. */ +/* Define to 1 if you have the 'memmem' function. */ #define HAVE_MEMMEM 1 -/* Define to 1 if you have the `memmove' function. */ +/* Define to 1 if you have the 'memmove' function. */ #define HAVE_MEMMOVE 1 -/* Define to 1 if you have the `memset_s' function. */ +/* Define to 1 if you have the 'memset_s' function. */ #define HAVE_MEMSET_S 1 -/* Define to 1 if you have the `mkdtemp' function. */ +/* Define to 1 if you have the 'mkdtemp' function. */ #define HAVE_MKDTEMP 1 /* define if you have mode_t data type */ @@ -979,50 +979,50 @@ /* Define if you are on NeXT */ /* #undef HAVE_NEXT */ -/* Define to 1 if the system has the type `nfds_t'. */ +/* Define to 1 if the system has the type 'nfds_t'. */ #define HAVE_NFDS_T 1 -/* Define to 1 if you have the `ngetaddrinfo' function. */ +/* Define to 1 if you have the 'ngetaddrinfo' function. */ /* #undef HAVE_NGETADDRINFO */ -/* Define to 1 if you have the `nl_langinfo' function. */ +/* Define to 1 if you have the 'nl_langinfo' function. */ #define HAVE_NL_LANGINFO 1 -/* Define to 1 if you have the `nsleep' function. */ +/* Define to 1 if you have the 'nsleep' function. */ /* #undef HAVE_NSLEEP */ -/* Define to 1 if you have the `ogetaddrinfo' function. */ +/* Define to 1 if you have the 'ogetaddrinfo' function. */ /* #undef HAVE_OGETADDRINFO */ /* Define if you have an old version of PAM which takes only one argument to pam_strerror */ /* #undef HAVE_OLD_PAM */ -/* Define to 1 if you have the `openlog_r' function. */ +/* Define to 1 if you have the 'openlog_r' function. */ /* #undef HAVE_OPENLOG_R */ -/* Define to 1 if you have the `openpty' function. */ +/* Define to 1 if you have the 'openpty' function. */ #define HAVE_OPENPTY 1 /* as a macro */ #define HAVE_OPENSSL_ADD_ALL_ALGORITHMS 1 -/* Define to 1 if you have the `OpenSSL_version' function. */ +/* Define to 1 if you have the 'OpenSSL_version' function. */ #define HAVE_OPENSSL_VERSION 1 -/* Define to 1 if you have the `OpenSSL_version_num' function. */ +/* Define to 1 if you have the 'OpenSSL_version_num' function. */ #define HAVE_OPENSSL_VERSION_NUM 1 /* Define if you have Digital Unix Security Integration Architecture */ /* #undef HAVE_OSF_SIA */ -/* Define to 1 if you have the `pam_getenvlist' function. */ +/* Define to 1 if you have the 'pam_getenvlist' function. */ #define HAVE_PAM_GETENVLIST 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_PAM_PAM_APPL_H */ -/* Define to 1 if you have the `pam_putenv' function. */ +/* Define to 1 if you have the 'pam_putenv' function. */ #define HAVE_PAM_PUTENV 1 /* Define to 1 if you have the header file. */ @@ -1034,74 +1034,74 @@ /* define if you have pid_t data type */ #define HAVE_PID_T 1 -/* Define to 1 if you have the `pledge' function. */ +/* Define to 1 if you have the 'pledge' function. */ /* #undef HAVE_PLEDGE */ -/* Define to 1 if you have the `poll' function. */ +/* Define to 1 if you have the 'poll' function. */ #define HAVE_POLL 1 /* Define to 1 if you have the header file. */ #define HAVE_POLL_H 1 -/* Define to 1 if you have the `ppoll' function. */ +/* Define to 1 if you have the 'ppoll' function. */ #define HAVE_PPOLL 1 -/* Define to 1 if you have the `prctl' function. */ +/* Define to 1 if you have the 'prctl' function. */ /* #undef HAVE_PRCTL */ -/* Define to 1 if you have the `priv_basicset' function. */ +/* Define to 1 if you have the 'priv_basicset' function. */ /* #undef HAVE_PRIV_BASICSET */ /* Define to 1 if you have the header file. */ /* #undef HAVE_PRIV_H */ -/* Define to 1 if you have the `procctl' function. */ +/* Define to 1 if you have the 'procctl' function. */ #define HAVE_PROCCTL 1 /* Define if you have /proc/$pid/fd */ /* #undef HAVE_PROC_PID */ *** 594 LINES SKIPPED *** From nobody Thu Aug 1 15:10:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXTH2Ty0z5SvTy; Thu, 01 Aug 2024 15:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXTH1Fgzz4SHx; Thu, 1 Aug 2024 15:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722525027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zhvkn5VVSXYKvQ6t8zjKJs3UDyl41KoXiKv5tIcbcgE=; b=aOW8AA267mNv3hqGdVbNF7nbvLhAu3qOjAk2xfkr0i9yy3XWsAD8Eshs1sC2C3zMRuUVfJ GwB040A0mA7G+qsrFhCDJimdoEOkDSBwX8Iti6UZvy9K2E+KraugnjfW7suJ0Cv33q8xbu 50SbORA5u/nmd2WmWUj3HVxEFYanCPDZZP33WwjlaN7/Kq+jDqPRbt3w5rysM+oYm+CNUe nxs52PI0ksNvIgA+AZnX7IovEthL+Vb0w8YAGQ1qnSDqwxZXsWEUZekIz1mX2ojqObNHk1 yFcZu1znjUnj+cnmEfTbnfUCAHej3pdau9ODtsxPHMG7vTNC4Fk7OQr9pWmFWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722525027; a=rsa-sha256; cv=none; b=sGe1ri2lL7h3pCNc8dGBe/SR+QKldO6p6VXwzEkRjz2VlxL2A5SewLACj0Ehttok2Ihll7 EgqIYpG3uBbhXDiDXHTwbEWgq5D4/EZa+rh7PWgBfWuJzXm8ptzo+Vdy9CTtKM5PbCMhK4 2UeXrgLwhjHK5lz6CwazSTSdLRtfm4mXZU4hjlF7vbm9AguI+JGaxF0UF8FNEZPJSDFQ5s XsDYqTjC7ZQj8bLqPP9uv6/Nwgu/5Bo1Q/zFsBi6JU1yVns3y0XhK2TEksubIZmMyAELUp bjSF6VnO0QBOjggrn5eY7XUubw7dsKuckUwOoGW/e/yt4mt3zclYDBSzH3Evuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722525027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zhvkn5VVSXYKvQ6t8zjKJs3UDyl41KoXiKv5tIcbcgE=; b=HbefpoJ8XxipQVDX+UF61Fqa6hjDtCEJhxQz9xxlICuuj+lHvqAM3q23G8J2LpTrMjWcnk OjkqSs/bWR9ZEEgwW611XYaL8IZoBN1i43lVyjS4NAhRI21iOPnJhq2pJDYNYHKz3lCGvB DnrSV8WsN8EbukrWD0FCFVB97x9lPf78jqNNs0AI0LgvDegI4dcPm3WBaMmb0EhUqDkYLb LjM0GSEVUKVV9vVcFSAiCijLeyoOp3HV4tTvrus21sqJ7wSrt8hW5w44gwlomWuns19v0S hIeeUVCI4JSUXi2kXKE4phxZnT3zwe3pIHWF3arXsD8lGPR+SCEyuY2VEGeLag== 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 4WZXTH0P8tzqHl; Thu, 1 Aug 2024 15:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471FAQfn084835; Thu, 1 Aug 2024 15:10:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471FAQOa084832; Thu, 1 Aug 2024 15:10:26 GMT (envelope-from git) Date: Thu, 1 Aug 2024 15:10:26 GMT Message-Id: <202408011510.471FAQOa084832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c9294b873683 - stable/13 - ktrace(1): add xref to namei(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c9294b873683669819d2a37ba2fa9d3559b6774d Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c9294b873683669819d2a37ba2fa9d3559b6774d commit c9294b873683669819d2a37ba2fa9d3559b6774d Author: Ed Maste AuthorDate: 2024-06-10 12:51:01 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:09:05 +0000 ktrace(1): add xref to namei(9) namei was mistaken for a typo (see GitHub pull request #1284). Add an xref to make it clear. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45546 (cherry picked from commit a87651e2ff189cec4c26cb220354f1bc93794f31) (cherry picked from commit ecd0ead0635b3d220ecf600f9136f12077dd0fca) --- usr.bin/ktrace/ktrace.1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index a6a07bb93caf..6fe8afbb3d0c 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 -.\" -.Dd August 26, 2019 +.Dd June 10, 2024 .Dt KTRACE 1 .Os .Sh NAME @@ -50,7 +48,8 @@ The utility enables kernel trace logging for the specified processes. Kernel trace data is logged to the file .Pa ktrace.out . -The kernel operations that are traced include system calls, namei +The kernel operations that are traced include system calls, +.Xr namei 9 translations, signal processing, and .Tn I/O . .Pp @@ -185,7 +184,8 @@ Disable tracing of all user-owned processes: .Xr kdump 1 , .Xr truss 1 , .Xr ktrace 2 , -.Xr utrace 2 +.Xr utrace 2 , +.Xr namei 9 .Sh HISTORY The .Nm From nobody Thu Aug 1 15:10:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZXTJ4K4Wz5SvMP; Thu, 01 Aug 2024 15:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZXTJ1qtlz4SQW; Thu, 1 Aug 2024 15:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722525028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rFv+PF7Bix6xwwE3eNBvnaB8PluMiwmXpVj7KcTpUmM=; b=m9Oc+f2rNgt14mNI3Tu0qoLIptD4jsln8/J3ixm5LCoHU9dgvQngXua4PFE1gjJkSpPZ1T lPaymAvyT6W4KzxwiQJ5AsxQGcOa8hyyTUyPl0cEqo9zhhc4UZjcGTGduEd4LVtmE3FbNJ fMeL9tqJDg2KRXuE6iDpda8S4OaJEn+T7p0DxsuK85ieeHcOuqircUJE5q9qc158lH5Kk+ UOTIlt0h7nrkHcsFqqwtuu3uR05KswiJddITZBKzUz+yNBoTAEWr3cSiciMs1KBVX3I+F6 YZc3UUcNuiSizvHza5bEluXqW+NmIIDX9r8sBkAW802Ic+LC/z24U6h06GA4Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722525028; a=rsa-sha256; cv=none; b=WxOQckM7c+7TV8I98HFNype+7HS6Xh0BDJ0qs98qLvYNPx1XZ9bUlDf5kHfh32GTOlm6bD a3R5iixw3dnmR2/iBsJgA9WTVsdKVPs3Kfy3JnB4Ufw4ncLXICTMRcwIpF/KBwXoAxoVlF jbb7zWQ+O0fVZcYCbsdzQWkN2O1deOY3y22PRkAMf8kVXqsBgNQgCchw/xL6yelrHEMfdL +s1nfLRuvkqfKuJAmE+G8TctYx5zDoA9OX+7WyVR4qbjxR2N24sii0WrJ1H3NzxtTnvR2i UMRxKo4RP4wIdHyM6pmypBJYf4oUxMeOE5/Gs1jXbFx2BhFBtEoVRgNhB0yq6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722525028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rFv+PF7Bix6xwwE3eNBvnaB8PluMiwmXpVj7KcTpUmM=; b=KGBHJqvf8jJ8YV5V18R2X7mzpZufElGbYirv7dJtFBes3jU2Fx+CFLHSo50QIm1wvufU9s +D9UmPNGgvgbsfqSYFww8QFrlhIBP/fFHZLxSs/YFbGn8F4LKInMypwt+PXH2FO5inPdQO GChHmpK2MIOoXoqZRA0fv3YqRaFaSijwbtommpv77Dk7nUdSYTJqucW+qMDnGsNd3fku6D nhnj6Fnf8MpGBcEZUylEodhn8w/J9QQYQJNEBZB2X3P3ik8itaFfy0z4ejpJ7ahhDLW2pw VIsevsuIHuirwlZy1aM92ojijeZU6pap1ZveunUkRz9jh/IP72XgaWoY6ZUsSw== 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 4WZXTJ1MnFzq6W; Thu, 1 Aug 2024 15:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471FASVi084874; Thu, 1 Aug 2024 15:10:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471FASDG084871; Thu, 1 Aug 2024 15:10:28 GMT (envelope-from git) Date: Thu, 1 Aug 2024 15:10:28 GMT Message-Id: <202408011510.471FASDG084871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 0e678b79d7b0 - stable/13 - ktrace(1): add more xrefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0e678b79d7b03e7d58e528bed1d87b39eef02c60 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0e678b79d7b03e7d58e528bed1d87b39eef02c60 commit 0e678b79d7b03e7d58e528bed1d87b39eef02c60 Author: Ed Maste AuthorDate: 2024-06-11 00:31:08 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:09:22 +0000 ktrace(1): add more xrefs Following commit a87651e2ff18 add xrefs to intro(2) and sigaction(2), and use a consistent form. Suggested by: kib, arrowd Reviewed by: kib (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45555 (cherry picked from commit 0277c0c6f72a964bf0439db1f4558551052e4f3b) (cherry picked from commit 7110def1b1dbf33d5f9e4505c0d646495f91acb6) --- usr.bin/ktrace/ktrace.1 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 6fe8afbb3d0c..4a7aec8c4cfa 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -48,9 +48,13 @@ The utility enables kernel trace logging for the specified processes. Kernel trace data is logged to the file .Pa ktrace.out . -The kernel operations that are traced include system calls, -.Xr namei 9 -translations, signal processing, and +The kernel operations that are traced include system calls +.Pq see Xr intro 2 , +file system path lookups +.Pq Xr namei 9 , +signal processing +.Pq Xr sigaction 2 , +and .Tn I/O . .Pp Once tracing is enabled on a process, trace data will be logged until @@ -120,7 +124,9 @@ trace page faults trace .Tn I/O .It Cm n -trace namei translations +trace +.Xr namei 9 +translations .It Cm p trace capability check failures .It Cm s @@ -183,7 +189,9 @@ Disable tracing of all user-owned processes: .Xr dtrace 1 , .Xr kdump 1 , .Xr truss 1 , +.Xr intro 2 , .Xr ktrace 2 , +.Xr sigaction 2 , .Xr utrace 2 , .Xr namei 9 .Sh HISTORY From nobody Thu Aug 1 15:38:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZY5Q0nDDz5SxFZ; Thu, 01 Aug 2024 15:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZY5P5Kddz4WdX; Thu, 1 Aug 2024 15:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722526697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=628kL9PCjNhE7YPeg5yLI2QtjVVff+ftYAXb42foNrU=; b=lHSoGW5DqeV121GQ7q4y+FQGX/7NWFSJKNJjQVKCHGVavMvvPXxeXDyQlt1hrVuuo++mY2 F0KPFwO7JSoDdWbvNP6OYnGwC+5tKmj6q9PZSQQbVBD/OeZH5WylFpHE3gNkPFROxD12mL pXoAX0OOMiJgV0nRhaz2Ou0AY1yDUwUm08R6NZhu4yWaSMg53Y4Tz+BpfcIAZpB5KOGukl Jl2BcGVp9pDAod2/bTI9iQKhWr3jUJdG4H+n1OxUdJYVIsRV7q64pfjLAQ8DZqJK6P01r+ pjd39uSPl0s6jJgt1EsUuxN8Zzk3K1MzEtBWhCbLY8XH3onXS0HQqNejG0e7zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722526697; a=rsa-sha256; cv=none; b=wzUYA4kVjV3a+V5wskMv+iOqXnaxPKdvWOyJaW4dB0ufg0d16KCbrr0IcScYAG4Fza/6K1 BRh5oF4/VJ6bm8ZfPUnJHTOukI+D1F4WFmIqxpIbgTaw9MJE5jYYvkRO81yklbavSYplVO dtEumGfuYFTfr2EdBFkuwxrXzcSKoFDs+bGsT63f0TQbOZHt3kGTH8z6EzJXB38L7Sn1Oz 3ijDdtWXM0ps4KjU75/xg2NT45J/0C9wXYvT67Ovx6rl4iHCfJtRQa5saizlaleJYwUOas f3AHFmgaNt+Je4i5yFKC9+vbkByGI0oHz0Mc2P5JUeHBSTkpl0tOBFRWGxh4lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722526697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=628kL9PCjNhE7YPeg5yLI2QtjVVff+ftYAXb42foNrU=; b=cQV1lo8KsbIii10dZaF6051MYvIGIym1XdmJTj3pLxTMHoVNvz37Ct2l9j1EcZInXE5gBW Jbr1PC+bMrGMCyQEoabGsH1mpnJqPjFtm7bPpmlFfa//FHnI8KtEFK8pflwz5L3PrCMOjU bJTmp72S5U1bfVXQlV5t1EgqTK7P8RtckRV5+szGsOvZbU0gxjC21A4b0rQDO+0IOkrO+W CUAZJYaSa5rwcUXOYmrvIVo81vA1w7QP439Vi+HPFQ8LvjEskzvvBVvNBE7+rCcmjpqBuK /sLcqJ3yHkMR+0ebBfZ/PjavvkrAKH5njHsq+bjKYBQc3y3/VAxn4Rl7vBncRA== 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 4WZY5P4jSkzqnQ; Thu, 1 Aug 2024 15:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471FcHKs026793; Thu, 1 Aug 2024 15:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471FcHTV026790; Thu, 1 Aug 2024 15:38:17 GMT (envelope-from git) Date: Thu, 1 Aug 2024 15:38:17 GMT Message-Id: <202408011538.471FcHTV026790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: af20990e9dc1 - stable/14 - tzsetup: add detail for -s option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: af20990e9dc110adcb36d5774c4b2394a844ac5f Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=af20990e9dc110adcb36d5774c4b2394a844ac5f commit af20990e9dc110adcb36d5774c4b2394a844ac5f Author: Ed Maste AuthorDate: 2024-06-13 15:23:26 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:44 +0000 tzsetup: add detail for -s option Skipping the UTC question via -s will not create or delete /etc/wall_cmos_clock. Reported by: Tomoaki AOKI Reviewed by: imp, allanjude, jrm Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45576 (cherry picked from commit 70e3e1bde9bf0ddf7fc18b97487fe2d23d4fc5ed) --- usr.sbin/tzsetup/tzsetup.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/tzsetup/tzsetup.8 b/usr.sbin/tzsetup/tzsetup.8 index 109a52beb164..bfa625a1af3a 100644 --- a/usr.sbin/tzsetup/tzsetup.8 +++ b/usr.sbin/tzsetup/tzsetup.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2023 +.Dd June 14, 2024 .Dt TZSETUP 8 .Os .Sh NAME @@ -59,6 +59,10 @@ The name is obtained from .Pa /var/db/zoneinfo . .It Fl s Skip the initial question about adjusting the clock if not set to UTC. +.Nm +will neither create nor delete +.Pa /etc/wall_cmos_clock . +On a newly installed system the hardware clock will keep UTC. .El .Pp It is possible to short-circuit the menu system by specifying the From nobody Thu Aug 1 15:38:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZY5R0Qrzz5SxSR; Thu, 01 Aug 2024 15:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZY5Q67PSz4Wjh; Thu, 1 Aug 2024 15:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722526698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mxB7w1QgB74XJ1wYlQrPYfLkj4ogv4Dgub6TPdUSeKk=; b=M0wKxFpVe1x48G7TBh9BlqGN32eTuruaJ8ISQjNkKIn73hDfc2lKD5X4mOF44Bi/j3AVe+ 980MR3XTsq0e1Yve9Ml4sfaOrngTnrD3XkQNhiHby1y2O+GnCAGUAU05dIm+V3IJn6qqLU 8u7GVRnXvBa2sjROCUIeoe2KRlp8PtTBPSqXS95fNfUcOKdsUcBq24TxXRLktKG4XjnAbc Suh81NBViNPP0hjC/T4nCN4Wl53rNmMuFdObxK0LwzaSH3Qyvzo4WcLJIFMXD7jW1ZD22M Rm6F5qtZqaQQJUvAs7RjcrF4NDftOjpXd6P1FYKnwryTKaZgsr20WKJyk49Isw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722526698; a=rsa-sha256; cv=none; b=lgHcT+j/VIw63Oi7XncI+oOlGN7idHbfeBEqsfIjL+FUkoy024ZDxKnU0QtKGxE/83NZSP vS9r7slqNktBDNiAa95rlwnqfHV8oc3BeHjdiwxzv7+HHL6Qbwlnou5ffP7Dv21Ix8ZwUs B/2ZT/2x8AufZlHwoQCF02gnQOnm3W7zR6EwJjGONWvOf+lbhKrObGiPWnu07VN5zinRGG RxPMGvhSqNOO1oYXCL5IN/lHSIWLiay/iaHaqYDpCYoMO/53MKio91fA/yEjzqO3JzzLTH tr2smZUB9SBJvm7bTn9nzYEjpO3NLGiXUvnelkM6KBXXaVyHvzFvIkzfvM4gdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722526698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mxB7w1QgB74XJ1wYlQrPYfLkj4ogv4Dgub6TPdUSeKk=; b=Hh+/W+KKkuK22OpcsvzizZbqunDKaDgapNe7pMIXaiLMA/yi/p2BS+7gwrvP5XkrjoIisi 371vvcaS5yF4X9LJPX4upvNiOn9sJ6mIMD5FY/ZAky3AmGZyxTI7ZLBGHWthIZGV7AeQ0I lpqV27SpCWsCHopSkBx8URRfYKqmzaxSf4XBZil30uI0x2wJGtv6P7oICylDhOQtK18A5/ UMt5CEHFljyx89XMe94JQea2lQUkyrUkAJh1o5FPIwHOZXXt67agnLdkZEwK7/DnGs3OT5 q8shTCqIfZyS0ethVO6W3iviGxnTmHxohqQtxhbx/ntfSYrxpdRf17mH3r3BnA== 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 4WZY5Q5NMXzr3V; Thu, 1 Aug 2024 15:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471FcITc026840; Thu, 1 Aug 2024 15:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471FcIfF026837; Thu, 1 Aug 2024 15:38:18 GMT (envelope-from git) Date: Thu, 1 Aug 2024 15:38:18 GMT Message-Id: <202408011538.471FcIfF026837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 0673e7e370cb - stable/14 - tzsetup: Correct UTC description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0673e7e370cb95baca8c7132b72f29cf1840c165 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0673e7e370cb95baca8c7132b72f29cf1840c165 commit 0673e7e370cb95baca8c7132b72f29cf1840c165 Author: Ed Maste AuthorDate: 2024-06-13 00:08:04 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:44 +0000 tzsetup: Correct UTC description UTC is Coordinated Universal Time, not Greenwich Mean Time. Reviewed by: imp, allanjude MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45573 (cherry picked from commit a16cb8709de7ddc6dd6ab71918af9fc5fd96f377) --- usr.sbin/tzsetup/tzsetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index eca7358df1df..6cd2e16b607c 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -1024,7 +1024,7 @@ main(int argc, char **argv) "If it is set to local time,\n" "or you don't know, please choose NO here!"); - conf.title = "Select local or UTC (Greenwich Mean Time) clock"; + conf.title = "Select local or UTC (Coordinated Universal Time) clock"; if (bsddialog_yesno(&conf, prompt, 7, 73) == BSDDIALOG_YES) { if (reallydoit) unlink(path_wall_cmos_clock); From nobody Thu Aug 1 15:38:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZY5S3jM6z5SxQY; Thu, 01 Aug 2024 15:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZY5R6yGNz4WbS; Thu, 1 Aug 2024 15:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722526700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=agLmIo2naQmVPh2Gg2CCWatUzRKj4Yt/2CiIBj2DpbQ=; b=ONb+1g50jSrBRR7J9zEPCK5teN/5meadKnXnGKFXEakUfF8M+dYKS1BDtwUBHD3sPnkxW9 CZSfhOChl5zMBKNt3xwYjzxJ7Bj0GisHtmMUK+8OgEx6gCiYBYlVrzYi/xoyP8ro0pvyxK s/Ew+yJF44mUlAbw+BUpmkYAxNFa89hrSW+IvL+C7YJ3HSWZu0Kwi7TClzy6bCf7whrx2Y oKL9xhu6PycINiXO70igBFOV8BMudiphSxBApMks+XCDGSQWqrRyxkj5+uXkOHBdnIv3lo 24dawM2hWbq3rt2nTg0hZKdWZY1vyGHOoyRvgyTV7eh9b59NcrR/gjkFGCCOzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722526700; a=rsa-sha256; cv=none; b=OrGaOE0m0HnsO5uZYdyHiMRgWkJOj59YKw58AoMsdM6UV8yc2f8HJJq240EVQWrV2lVxDQ K8EkH2qJyIlfCU4hdOl3oImQV5z8I/SE9yuOQU1Ye2DSVnAASfIagEa0Wpi08I612b2YUH f0XBkXI2HpEuV74vY0+lNLBRlBoZRk2F5AMP5HBrZ/39cdcJpSe16f5QKbTqQ/YXe56nAL vKCC1RfOJ7L1i4pV0cS0iakfesyu9Dz/Wq1y38QCCuIv+7ZTBGFuXj8XhkqJF9beHkvhQV C/z999WBbd30g7pY/Bhvu5ZfRFPrvcTwxi+pZNUElPbwJ76ZkZRYe20hM1K8AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722526700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=agLmIo2naQmVPh2Gg2CCWatUzRKj4Yt/2CiIBj2DpbQ=; b=wAiy35sQYos4b6Xl+6KDWCx1+vKN0qkvpDkFDuE+YKpBRRyk9wdDZCpa2Cj2TRcr8qmUp6 tz8BQZZbTIwGLcn9l/B64UvlDuC/l3cU9IhLm4NqpLdkbOQXdKxizfepjLjPvD+6bj6QcX pSiGZeBFdMit/7RIW09Qd27ne0XibGXzg+ckmmOJKqsOMULGpKCNZ95V2ZPgt0fJJGVhBu rFa37Ncp7li7yFFbW87t7wQldgJLvX+tefr01YEiGVUws7d0VWq0ZoP77HrZSggvhfHemA h8gcE18gpNK26/BZby5YoiE41O3JjzzXkXY3W502slW3h3/4EYR5QfaJT42Ceg== 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 4WZY5R6XGDzqQY; Thu, 1 Aug 2024 15:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471FcJ9e026888; Thu, 1 Aug 2024 15:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471FcJDS026885; Thu, 1 Aug 2024 15:38:19 GMT (envelope-from git) Date: Thu, 1 Aug 2024 15:38:19 GMT Message-Id: <202408011538.471FcJDS026885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: fc43a1b6842a - stable/14 - tzsetup: symlink /etc/localtime instead of copying List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: fc43a1b6842afa806dfd7ba48de5bece63d04456 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fc43a1b6842afa806dfd7ba48de5bece63d04456 commit fc43a1b6842afa806dfd7ba48de5bece63d04456 Author: Ed Maste AuthorDate: 2022-10-14 16:44:35 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:45 +0000 tzsetup: symlink /etc/localtime instead of copying Using a symlink means that new timezone data (installed by an errata update, say) will be usable without having to be copied again. Reviewed by: bapt, kevans, philip Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37005 (cherry picked from commit 5e16809c953f4cd19fadb1767469dec319de0353) --- usr.sbin/tzsetup/tzsetup.8 | 2 +- usr.sbin/tzsetup/tzsetup.c | 119 ++++++++++----------------------------------- 2 files changed, 27 insertions(+), 94 deletions(-) diff --git a/usr.sbin/tzsetup/tzsetup.8 b/usr.sbin/tzsetup/tzsetup.8 index bfa625a1af3a..499d25765541 100644 --- a/usr.sbin/tzsetup/tzsetup.8 +++ b/usr.sbin/tzsetup/tzsetup.8 @@ -52,7 +52,7 @@ The following options are available: Open all files and directories relative to .Ar chroot_directory . .It Fl n -Do not create or copy files. +Do not create or symlink files. .It Fl r Reinstall the zoneinfo file installed last time. The name is obtained from diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 6cd2e16b607c..617de4efb765 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -744,109 +744,42 @@ static void message_zoneinfo_file(const char *title, char *prompt) static int install_zoneinfo_file(const char *zoneinfo_file) { - char buf[1024]; char prompt[SILLY_BUFFER_SIZE]; - struct stat sb; - ssize_t len; - int fd1, fd2, copymode; - - if (lstat(path_localtime, &sb) < 0) { - /* Nothing there yet... */ - copymode = 1; - } else if (S_ISLNK(sb.st_mode)) - copymode = 0; - else - copymode = 1; #ifdef VERBOSE - if (copymode) - snprintf(prompt, sizeof(prompt), - "Copying %s to %s", zoneinfo_file, path_localtime); - else - snprintf(prompt, sizeof(prompt), - "Creating symbolic link %s to %s", - path_localtime, zoneinfo_file); + snprintf(prompt, sizeof(prompt), "Creating symbolic link %s to %s", + path_localtime, zoneinfo_file); message_zoneinfo_file("Info", prompt); #endif if (reallydoit) { - if (copymode) { - fd1 = open(zoneinfo_file, O_RDONLY, 0); - if (fd1 < 0) { - snprintf(prompt, sizeof(prompt), - "Could not open %s: %s", zoneinfo_file, - strerror(errno)); - message_zoneinfo_file("Error", prompt); - return (DITEM_FAILURE | DITEM_RECREATE); - } - - if (unlink(path_localtime) < 0 && errno != ENOENT) { - snprintf(prompt, sizeof(prompt), - "Could not delete %s: %s", - path_localtime, strerror(errno)); - message_zoneinfo_file("Error", prompt); - return (DITEM_FAILURE | DITEM_RECREATE); - } - - fd2 = open(path_localtime, O_CREAT | O_EXCL | O_WRONLY, - S_IRUSR | S_IRGRP | S_IROTH); - if (fd2 < 0) { - snprintf(prompt, sizeof(prompt), - "Could not open %s: %s", - path_localtime, strerror(errno)); - message_zoneinfo_file("Error", prompt); - return (DITEM_FAILURE | DITEM_RECREATE); - } - - while ((len = read(fd1, buf, sizeof(buf))) > 0) - if ((len = write(fd2, buf, len)) < 0) - break; - - if (len == -1) { - snprintf(prompt, sizeof(prompt), - "Error copying %s to %s %s", zoneinfo_file, - path_localtime, strerror(errno)); - message_zoneinfo_file("Error", prompt); - /* Better to leave none than a corrupt one. */ - unlink(path_localtime); - return (DITEM_FAILURE | DITEM_RECREATE); - } - close(fd1); - close(fd2); - } else { - if (access(zoneinfo_file, R_OK) != 0) { - snprintf(prompt, sizeof(prompt), - "Cannot access %s: %s", zoneinfo_file, - strerror(errno)); - message_zoneinfo_file("Error", prompt); - return (DITEM_FAILURE | DITEM_RECREATE); - } - if (unlink(path_localtime) < 0 && errno != ENOENT) { - snprintf(prompt, sizeof(prompt), - "Could not delete %s: %s", - path_localtime, strerror(errno)); - message_zoneinfo_file("Error", prompt); - return (DITEM_FAILURE | DITEM_RECREATE); - } - if (symlink(zoneinfo_file, path_localtime) < 0) { - snprintf(prompt, sizeof(prompt), - "Cannot create symbolic link %s to %s: %s", - path_localtime, zoneinfo_file, - strerror(errno)); - message_zoneinfo_file("Error", prompt); - return (DITEM_FAILURE | DITEM_RECREATE); - } + if (access(zoneinfo_file, R_OK) != 0) { + snprintf(prompt, sizeof(prompt), + "Cannot access %s: %s", zoneinfo_file, + strerror(errno)); + message_zoneinfo_file("Error", prompt); + return (DITEM_FAILURE | DITEM_RECREATE); } - -#ifdef VERBOSE - if (copymode) + if (unlink(path_localtime) < 0 && errno != ENOENT) { snprintf(prompt, sizeof(prompt), - "Copied timezone file from %s to %s", - zoneinfo_file, path_localtime); - else + "Could not delete %s: %s", + path_localtime, strerror(errno)); + message_zoneinfo_file("Error", prompt); + return (DITEM_FAILURE | DITEM_RECREATE); + } + if (symlink(zoneinfo_file, path_localtime) < 0) { snprintf(prompt, sizeof(prompt), - "Created symbolic link from %s to %s", - zoneinfo_file, path_localtime); + "Cannot create symbolic link %s to %s: %s", + path_localtime, zoneinfo_file, + strerror(errno)); + message_zoneinfo_file("Error", prompt); + return (DITEM_FAILURE | DITEM_RECREATE); + } + +#ifdef VERBOSE + snprintf(prompt, sizeof(prompt), + "Created symbolic link from %s to %s", zoneinfo_file, + path_localtime); message_zoneinfo_file("Done", prompt); #endif } /* reallydoit */ From nobody Thu Aug 1 15:38:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZY5T399hz5SxNP; Thu, 01 Aug 2024 15:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZY5T0wD2z4WbY; Thu, 1 Aug 2024 15:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722526701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GEOO/6uB7Oy1xc6byhDktdulNzO2vVh/aaRiTEzed3M=; b=g0M0M2eBRN94aEWcQM8LpzqSaosUfURIJALFUKBCAIl63FzySAPxKqFmUxDSbfXFhzul3n Fars/6boqUNBqFx9pWXkJImUM4jki0welNQPrOUvbZEw1ZE/jC6dHlYR5k4IxSckGDOFjn 2jQI5GJ1xqKw81zEndAh6uBqxAUAXvccgol53eyrFcpuTnpebX2O+dYINbLqSo6re0zzG5 Als53rHbaRs0rdUKdJkB7apG/StyDMj60z5eSOOlJxlwMZKxj7K655UQ1BLAfQn5KBVj/y cSb9t/ghBOiDvgAlSDZzzjFuOcftLhJZQuggQg+1ibraQoKVfDG9tFn5gkgXsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722526701; a=rsa-sha256; cv=none; b=XIfa8d3u52DeVOECaZbNElsLdhkmG4mZcBVFUD70a8zJyY8biGxKo6Hk44QV5C5Sk/kR1H Bt5mFcBH0DXZW0erPXG84mjrpFB9+XjBVA6H+lTp4wd4uaWYek6o+quKHpWXM0T2ENu6zw 3ZHdfQCEfiUzHf5+4xUrBKyWBbXzTofStRzbVwa3GJ5X7B7cX0i0FcxaUmYWa1AVHrPhEL B0eWjBZRG7D8XM2QmbzpR60Urm7qDUdCl4fio4taOVWqWfVsvcXHX8FtxhcJKeKgwY29vR ywPH7vmk7NqqwOvpO+vNgeB4vNfn8DZ7HHQUNVvuFUgFfWYKytdy/QNsbcoo5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722526701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GEOO/6uB7Oy1xc6byhDktdulNzO2vVh/aaRiTEzed3M=; b=smyk+XNOQNaMMYHSNIJnJeNH/c8lkwMcRBPSyC9SeZL1UITF7qw457NFkbaW4vDYtuM+E+ SL2hqysDN/VEr/tnFm4Vx+RRRVRbWHvRlnMRNYZoSE97c97lzVQll1Id0oqaoUJwIC2GG1 TrR6OKf1tF6khqPUe+O+PbDbBXO8/hc9DHKzDISoMJucB63TPhoZLBa4JEKcFGCA8DrnuL /4ap75zxG5jMkqMn1LmB3g2eY5Vh4k/1t+99Xv1Uto+EjpV4hn0iAPRwveEIfsHoLtkfPx Ue2ikdwtGEIDGXgF2Mdwg/miL5PK+pymZRwO1eCheFxIWCg2m45oAh3tzSwEXA== 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 4WZY5T02BRzqQZ; Thu, 1 Aug 2024 15:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471FcKEv026937; Thu, 1 Aug 2024 15:38:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471FcKWr026934; Thu, 1 Aug 2024 15:38:20 GMT (envelope-from git) Date: Thu, 1 Aug 2024 15:38:20 GMT Message-Id: <202408011538.471FcKWr026934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 87f7f0389f8b - stable/14 - etcupdate: temporarily comment out one tzsetup test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 87f7f0389f8b7bf30ef12df5c0d337cb2789883e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=87f7f0389f8b7bf30ef12df5c0d337cb2789883e commit 87f7f0389f8b7bf30ef12df5c0d337cb2789883e Author: Ed Maste AuthorDate: 2023-11-24 22:28:31 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:45 +0000 etcupdate: temporarily comment out one tzsetup test This test fails after tzsetup was changed to symlink rather than copy the zoneinfo file (5e16809c953f). (cherry picked from commit f72b4f7e149d82ef5b8ed7a3aa415fcd7603b350) --- usr.sbin/etcupdate/tests/tzsetup_test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/etcupdate/tests/tzsetup_test.sh b/usr.sbin/etcupdate/tests/tzsetup_test.sh index dd76884e13eb..155830bddae7 100644 --- a/usr.sbin/etcupdate/tests/tzsetup_test.sh +++ b/usr.sbin/etcupdate/tests/tzsetup_test.sh @@ -232,7 +232,8 @@ echo "Differences for real update:" diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out \ || FAILED=yes -file /etc/localtime "foo" -file /var/db/zoneinfo "foo" +# XXX tzsetup installs a symlink as of 5e16809c953f +#file /etc/localtime "foo" +#file /var/db/zoneinfo "foo" [ "${FAILED}" = no ] From nobody Thu Aug 1 15:39:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZY7D4NX0z5SxLk; Thu, 01 Aug 2024 15:39:52 +0000 (UTC) (envelope-from joe.marcus@gmail.com) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZY7D29FRz4XZb; Thu, 1 Aug 2024 15:39:52 +0000 (UTC) (envelope-from joe.marcus@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-6b795574f9dso38604726d6.0; Thu, 01 Aug 2024 08:39:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722526791; x=1723131591; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=crEH8dP4ZkppT0t1GUulzIk5Ljdz8HTiIB1f8JfHW1s=; b=xLuucJtEbscq+dNpS5qw5JmmM4B7+Z/WMoeCEHx8l1p7HeA+b4VVOG3UGGhTyxXTOj Em0xhsXi2F0BrqS5nHOyLD5CL/VmlR4xQ0D7fY9WunnR0btQHpJwc+RtneNASimchMoo X+518e1cDc2hCUbQ6A057B8AlAGzlLYDgQaQt7p1RWjrpOmkLtvCu4RI/L7kXSZgu5oF Mjk+0InfIKevSF0rTDMDb82q2z/nSyhsQ4DVFu/1clhFkKtyVXd3OZzoNoigWT1CXZGe Wn8rAT4Fm3PR6/mUn6X8dRa+gwjNAunoQ0QEoZNl1DGRvO/ojLQhAniJ/GSrBtPBv4xy mz5Q== X-Forwarded-Encrypted: i=1; AJvYcCVm5ODk/qaHi3nvtfpxy0vEKSAEzPD4OSYIShjaF7TYQn1PJS/TNVAkBmDWh66E9rREtHRZsGOMbRSaHFuYRLBbXsMYCXZkd4gG3MInup8wyjFHe6sDGhXctqXBMYB7xWzp94e3Xk3vVdcGrldx45pM6EL62YrrOhXvdA82Gab9RpOfrn+zcwAOVlycD+OVV20F X-Gm-Message-State: AOJu0Yz89tPnBoLP7yTC28Ql9S6+XPkiarCGS5IDs5EyZaxiyOZPG032 oZJkrsLiQaQI6unleHBRQWSjeecOOyNttZHGWXKTD8S5NMKEdpXBmuxb X-Google-Smtp-Source: AGHT+IFB0KqXeiaFlBeRkJPhllSGASTcUrTPD/5j7v+RDGex92pKi4Bj804Exzm8ZbZzNqhyiIPLJg== X-Received: by 2002:a05:6214:2b95:b0:6b7:a3f3:8b68 with SMTP id 6a1803df08f44-6bb983744d5mr4804536d6.31.1722526790784; Thu, 01 Aug 2024 08:39:50 -0700 (PDT) Received: from creme-brulee.marcuscom.com (creme-brulee.marcuscom.com. [2607:fc50:1:f300::2]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bb3f8d80b6sm85254236d6.23.2024.08.01.08.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 08:39:50 -0700 (PDT) Received: from [10.50.0.248] (wsip-98-173-86-21.lv.lv.cox.net [98.173.86.21]) (authenticated bits=0) by creme-brulee.marcuscom.com (8.18.1/8.18.1) with ESMTPSA id 471Fdl62010502 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 1 Aug 2024 11:39:48 -0400 (EDT) (envelope-from jclarke@marcuscom.com) X-Authentication-Warning: creme-brulee.marcuscom.com: Host wsip-98-173-86-21.lv.lv.cox.net [98.173.86.21] claimed to be [10.50.0.248] Message-ID: Date: Thu, 1 Aug 2024 11:39:47 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6b0a2b19c845 - stable/13 - stand: Print a warning of the loader is too old To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202408011457.471Evboq057700@gitrepo.freebsd.org> Content-Language: en-US From: Joe Clarke In-Reply-To: <202408011457.471Evboq057700@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.4 required=5.0 tests=KHOP_HELO_FCRDNS,RDNS_DYNAMIC autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on creme-brulee.marcuscom.com 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]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4WZY7D29FRz4XZb On 8/1/24 10:57, Warner Losh wrote: > +if core.loaderTooOld() then > + print("**********************************************************************") > + print("**********************************************************************") > + print("***** *****") > + print("***** BOOT LOADER IS TOO OLD. PLEASE UPGRADE. *****") > + print("***** *****") > + print("**********************************************************************") > + print("**********************************************************************") > +end > + Hey, Warner. I know this is an MFC, but could the message be updated with a pointer on _how_ to do that upgrade? I always find myself re-learning the process as FreeBSD has evolved, and a current man pointer would always help. Joe From nobody Thu Aug 1 15:43:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYCK3bRYz5SxVH for ; Thu, 01 Aug 2024 15:43:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0: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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYCK1WVJz4YDF for ; Thu, 1 Aug 2024 15:43:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1ff3d5c6e9eso25840105ad.1 for ; Thu, 01 Aug 2024 08:43:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722527003; x=1723131803; 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=G/ILJNR2Iy43n0L188MPo0oewSepmp/JC4TJoVMSgLU=; b=wKQC+VVER0pGYtyLaS/NoOCt9PEA2Bx0s68QoMv2UNuuBiUxj5u/JMRlPx5s2AFZ9S 1CtRmdqYAPGH1lMHjfa+Fz2/9MiIfhaAqz2lMDyCkpd4jUDUqjb+3Z5ChBfPE8Pcv+ZG C+E5gP0swHVeMw3ulckf4nO28yEM9w7tjjbs2cF0219u2A4EoaaOtLz5jdnVR/kcpWoh hSqqPXQ97MuSX8R1LKmQcC0GJ0q3y1VvBogk3JtzQeeurDmsHRBj810En7ab3CCXju3n 4GGyJbRA184ZC1IyLNea7rjL8YCnTFlwoBSTRvdT9Z2yFfk4wgzVGE1Mv6KhRzGPIrWg Oosg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722527003; x=1723131803; 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=G/ILJNR2Iy43n0L188MPo0oewSepmp/JC4TJoVMSgLU=; b=d1mh9bwJI6+1Y0wd+lw3XPo8mFqXt8N5yfpQTOfxxy7h4WUWrSUywqpa5+DYa0dd3D 7M0wspkTmgDlJ2gB0n91oYY1UEMASBur89BJXA39ktMI+64Kc5Faf64QeWFPuQzk/jeo nuJQFpYPnDPUl2282JdDdNFH90OKvunPijRQIN3uWNr5GgSemeWKtJLZJoSX5MbME7gk vVvd+lXl4072I29uX3WG8rP1vzn45rPyLMOv0ixvw33GYIBUMRhoyJer1YX61JLikSPQ GBLM24FC7iB8QgPRA+gWFS1NHMAlLk9pTVXlnFbutftmNdTescU+mZAoEznwvX3mZTWR MIEg== X-Forwarded-Encrypted: i=1; AJvYcCVS29HTt1fN8mDW+MWyEGRsZy53gkqGFhCrK2atX63hlZ1cA/oXA2TgaU8O6fOKnLpkTEEBa7LazgXod6tZ0xSzYR7YNw/g/7KPjZZYD9An X-Gm-Message-State: AOJu0Yw0XcCqjEJrP8ba8qQpa21lEQ2OW++ORSMYQMFyB6bqWE3f4rCC /qX8kCIzySobJxRCw0Ot3Q31mStlOkeGL/dAIiSDHYgZ4L9dDE9Yrvm2ru6geaXSOPj/5u+V9KU MkKx7zlI6RNd0lQMFZ7MxCOT5DN2v125IBawmZA== X-Google-Smtp-Source: AGHT+IHtmSRh8hv4GrM/RlXoOhpMShc43eMysi0iyFRCryWLFN2HFHlxpRDGgpTQKwvKh1ScTQvyX6Z7GDdRCeDEn30= X-Received: by 2002:a17:902:edd3:b0:1fc:4aff:5b46 with SMTP id d9443c01a7336-1ff574911a6mr5469785ad.47.1722527002907; Thu, 01 Aug 2024 08:43:22 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202408011457.471Evboq057700@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 1 Aug 2024 09:43:11 -0600 Message-ID: Subject: Re: git: 6b0a2b19c845 - stable/13 - stand: Print a warning of the loader is too old To: Joe Clarke Cc: Warner Losh , src-committers , "" , dev-commits-src-branches@freebsd.org Content-Type: multipart/alternative; boundary="0000000000001ff157061ea112f6" 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: 4WZYCK1WVJz4YDF --0000000000001ff157061ea112f6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 1, 2024, 9:39=E2=80=AFAM Joe Clarke wro= te: > On 8/1/24 10:57, Warner Losh wrote: > > > +if core.loaderTooOld() then > > + > print("*****************************************************************= *****") > > + > print("*****************************************************************= *****") > > + print("***** > *****") > > + print("***** BOOT LOADER IS TOO OLD. PLEASE UPGRADE. > *****") > > + print("***** > *****") > > + > print("*****************************************************************= *****") > > + > print("*****************************************************************= *****") > > +end > > + > > Hey, Warner. I know this is an MFC, but could the message be updated > with a pointer on _how_ to do that upgrade? I always find myself > re-learning the process as FreeBSD has evolved, and a current man > pointer would always help. > We have a man page for this already, but it's not very good. I'd hoped to do something with release notes for this release. I was racing the freeze deadline with the actual change and was going to chase it with the new / improved docs. Warner > --0000000000001ff157061ea112f6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Aug 1, 2024, 9:39=E2=80=AFAM Joe Clarke <jclarke@marcuscom.com> wrote:=
On 8/1/24 10:57, Warner Losh wrote= :

> +if core.loaderTooOld() then
> +=C2=A0 =C2=A0 =C2=A0print("*************************************= *********************************")
> +=C2=A0 =C2=A0 =C2=A0print("*************************************= *********************************")
> +=C2=A0 =C2=A0 =C2=A0print("*****=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *****")
> +=C2=A0 =C2=A0 =C2=A0print("*****=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0BOOT LOADER IS TOO OLD. PLEASE UPGRADE.=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 *****")
> +=C2=A0 =C2=A0 =C2=A0print("*****=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *****")
> +=C2=A0 =C2=A0 =C2=A0print("*************************************= *********************************")
> +=C2=A0 =C2=A0 =C2=A0print("*************************************= *********************************")
> +end
> +

Hey, Warner.=C2=A0 I know this is an MFC, but could the message be updated =
with a pointer on _how_ to do that upgrade?=C2=A0 I always find myself
re-learning the process as FreeBSD has evolved, and a current man
pointer would always help.
We have a man page for this already, but it's= not very good. I'd hoped to do something with release notes for this r= elease. I was racing the freeze deadline with the actual change and was goi= ng to chase it with the new / improved docs.

Warner
--0000000000001ff157061ea112f6-- From nobody Thu Aug 1 16:07:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYks4QWpz5T0CB; Thu, 01 Aug 2024 16:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYks2WcJz4bRb; Thu, 1 Aug 2024 16:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rmcqxz8A1X2jlPgajF3Ks7HlMXoJvUEhr75ZNvRL7Pg=; b=d1KFLH88+sl0z2S/ycNlFR+yK10qTMxdXVsRggkO7gDGxrlMSb8A8I+1jwWPwPJQYcbOXm 1ohIpmO4dkqfNHgGj15O0rA92Wn2XHZpTxh2bLO/wglzDqSxUQOCcKXE9Z0bj9Qk7hmuhx kF4Myd694QgWa8d8BE4/mTKVnrFh4+Hxamw97oV/ylDoTZE7gtAMo3nCDisYq1vmEZ1Ni7 xb9HItz/n2+rVw/UeO25gkLvJ0u2GV73cVxQfBX/QJYV/QmMxvhI4vu7bnrRd+gdGeC8DT 9e7b136+sEIkBGhz0Pf8VNbSJjJVKxbZiKrw+6pXWsOqFSRj4lgl4Tf96wsSqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722528437; a=rsa-sha256; cv=none; b=bHUm9bcMxN+8rNXHH9UKHCV2JIQlQM1HVetVnd3lC/IdqglUH+UZ4e4HoPgI4rC/YObpSZ l/JgQ/sb/uTDmgKO3UFfrPjtfIxhU96v00Lizb1UBuabpdpGoFqz8YxtdWm0BmbwjYmcOy gYmSUwz4OjFdFWpXA6cXY5qhGwyu93eZYPBoyc5o6cCAXEx00JJcwPKwjHGuo2o9cZdTuV DbpGfEqRwmD1ezh/XkeTuF2ZVN1CThkVGZlSPOlYArwaE/E8Tm+M6t5LeXMPYfb53YDDtc FDFLr+xvxTW5rFoPVk8c3QR5FnGqYN1e3Tyb2VmDm94M15YzsMl+rVhnhbVLow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rmcqxz8A1X2jlPgajF3Ks7HlMXoJvUEhr75ZNvRL7Pg=; b=lCBtW6fq4lwKlT0DsYsgDFsXUxcJtC3OoliMKIizuFAQxjZECuwA1c/QeV+me4dopUVS6d FVYGTkSrtzV0anxTww39XM78FXyyKQpDvrHbqo5Y8t0Dsvdiia9FZh9sDPqi/iSSipUovH Lo0nDNwCZYkUeyaCaqwqvhdz7kxImW/ceM+fbTUwbfqaaN6oO07dMQnuQY40BW4XPNQ+gR 7jWvxEQeL4zR5zJXJaevPqby1RX7lQ55Ej1QIjMknGDyT7gfnz3AoG96QlHpjtW/8i3wot fFcQwR2CigU2DMjC1dy+aPZk4ErL1inNg9PsK6qJ7hr/Y6SeG9AnFIYX/kcHPw== 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 4WZYks27mNzrm4; Thu, 1 Aug 2024 16:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471G7HI8078884; Thu, 1 Aug 2024 16:07:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471G7HZV078881; Thu, 1 Aug 2024 16:07:17 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:07:17 GMT Message-Id: <202408011607.471G7HZV078881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 63cd0ebe4be8 - stable/14 - mfc-candidates: fix output order with incorrect commit dates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 63cd0ebe4be8dde0e0cec23920ed40f7618042d3 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=63cd0ebe4be8dde0e0cec23920ed40f7618042d3 commit 63cd0ebe4be8dde0e0cec23920ed40f7618042d3 Author: Ed Maste AuthorDate: 2024-04-16 15:41:05 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:45 +0000 mfc-candidates: fix output order with incorrect commit dates Previously we obtained the list of MFC candidate hashes (i.e., those commits only in the mfc-from branch), removed the already-merged commits based on "cherry picked from" commit message entries, and then printed the list sorted by commit time. This is usually the correct order, but it is not when commits have non-monotonically-increasing commit times. This is unfortunately the case for a number of commits in our tree. This made it difficult to merge some groups of dependent commits in the correct order. Instead, leave the from-list in git rev-parse order, and move the matching logic to a new lua script. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44808 (cherry picked from commit d51c590023675ca20a7da74d75a3b5a5dcfdfddc) --- tools/tools/git/candidatematch.lua | 66 ++++++++++++++++++++++++++++++++++++++ tools/tools/git/mfc-candidates.sh | 19 ++++------- 2 files changed, 72 insertions(+), 13 deletions(-) diff --git a/tools/tools/git/candidatematch.lua b/tools/tools/git/candidatematch.lua new file mode 100755 index 000000000000..98c247fca339 --- /dev/null +++ b/tools/tools/git/candidatematch.lua @@ -0,0 +1,66 @@ +#!/usr/libexec/flua + +-- MFC candidate script utility - $0 from-file to-file +-- +-- from-file specifies hashes that exist only in the "MFC from" branch and +-- to-file specifies the original hashes of commits already merged to the +-- "MFC to" branch. + +-- SPDX-License-Identifier: BSD-2-Clause +-- Copyright 2024 The FreeBSD Foundation + +-- Read a file and return its content as a table +local function read_file(filename) + local file = assert(io.open(filename, "r")) + local content = {} + for line in file:lines() do + table.insert(content, line) + end + file:close() + return content +end + +-- Remove hashes from 'set1' list that are present in 'set2' list +local function set_difference(set1, set2) + local set2_values = {} + for _, value in ipairs(set2) do + set2_values[value] = true + end + + local result = {} + for _, value in ipairs(set1) do + if not set2_values[value] then + table.insert(result, value) + end + end + return result +end + +-- Main function +local function main() + local from_file = arg[1] + local to_file = arg[2] + local exclude_file = arg[3] + + if not from_file or not to_file then + print("Usage: flua $0 from-file to-file") + return + end + + local from_hashes = read_file(from_file) + local to_hashes = read_file(to_file) + + local result_hashes = set_difference(from_hashes, to_hashes) + + if exclude_file then + exclude_hashes = read_file(exclude_file) + result_hashes = set_difference(result_hashes, exclude_hashes) + end + + -- Print the result + for _, hash in ipairs(result_hashes) do + print(hash) + end +end + +main() diff --git a/tools/tools/git/mfc-candidates.sh b/tools/tools/git/mfc-candidates.sh index 6610f539fef0..dd88710a4a4a 100644 --- a/tools/tools/git/mfc-candidates.sh +++ b/tools/tools/git/mfc-candidates.sh @@ -124,16 +124,14 @@ fi # Commits in from_branch after branch point commits_from() { - git rev-list --first-parent $authorarg $to_branch..$from_branch "$@" |\ - sort + git rev-list --first-parent --reverse $authorarg $to_branch..$from_branch "$@" } # "cherry picked from" hashes from commits in to_branch after branch point commits_to() { git log $from_branch..$to_branch --grep 'cherry picked from' "$@" |\ - sed -E -n 's/^[[:space:]]*\(cherry picked from commit ([0-9a-f]+)\)[[:space:]]*$/\1/p' |\ - sort + sed -E -n 's/^[[:space:]]*\(cherry picked from commit ([0-9a-f]+)\)[[:space:]]*$/\1/p' } # Turn a list of short hashes (and optional descriptions) into a list of full @@ -161,16 +159,11 @@ fi commits_from "$@" > $from_list commits_to "$@" > $to_list -comm -23 $from_list $to_list > $candidate_list +/usr/libexec/flua $(dirname $0)/candidatematch.lua \ + $from_list $to_list $exclude_list > $candidate_list -if [ -n "$exclude_file" ]; then - mv $candidate_list $candidate_list.bak - comm -23 $candidate_list.bak $exclude_list > $candidate_list -fi - -# Sort by (but do not print) commit time while read hash; do - git show --pretty='%ct %h %s' --no-patch $hash -done < $candidate_list | sort -n | cut -d ' ' -f 2- + git show --pretty='%h %s' --no-patch $hash +done < $candidate_list rm -rf "$workdir" From nobody Thu Aug 1 16:07:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYkt4cTWz5T074; Thu, 01 Aug 2024 16:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYkt3pJFz4bPY; Thu, 1 Aug 2024 16:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KQvoWa++mP4pxho0lsth7x2SuiLmdrlo1or05j2qTmw=; b=YBCURWTJj8MF54m01cjq6bWbERpvV91t+2qTu5qYI+gtKHuVbGYZxsxYbt8tH193/PUBLj 1WFLzfVuOuE1jge1eMxBuJEh9aQ+mde0UhXUOKNu3ZFnbyJNqQINxGe156QGG7ezOF0FDz ZDY+OSbmsszYMJ/l6wBhB0E51jvFQvUQOqAu2mMybZCGx5h+7gIgna0TGCpEFCr1mBV0F9 2k7VyOrqlT89JVPU4FdZoCcFQOdMw05rxCXHvfz01KHBda2aNmgkuS2mLeOIGaJbb76rcF HOVSP0mqKSgV1osOSigD05Hdl7wK0PkFd3mnsOR3+dD1Xm2h/IwODpnPr0Zw0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722528438; a=rsa-sha256; cv=none; b=O05cnquS4Eb2AG9CfhqyWv2BY+Ld606yYOgZiquwhI7Cx5UixMeHt5Kx5FiGsjv9TCEwLG OXoiR9IyhqWw26XDCupzm0a2bYS4ZPnpimCkwfvwW+Ygxnmn8JMNtkwd61aekcYej9hZBW c///bn+3ApCNci5slpjCiVc/Hplk0RlG6Ji9Hsc9m7cIqMjvhj3Dyg5LnQA0BzlNRIBj9t dl3x9Ddl4ajNDKl+xgTopVVyNWyd0JilyfqNd0QITJny2fcAFWE2dfG3B9SqUD7Uc8Vas+ AGmNUCS5nMvYrG7vMQnCU4Vm/UAw8WvtDN70/Ur1EjgOOkbjA3N1kRnPXHv7Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KQvoWa++mP4pxho0lsth7x2SuiLmdrlo1or05j2qTmw=; b=HZQCq+Kv1HN25cjDmPC/pe6E+1Zgvhmj6qm27obpXaLQhUbvCtuCB+jhPvORXIgvcf1JuH ChON1mR/atdiG1NrQnRof5gIF+Cf+RPMWzIrtzoTSMgQdSv1RWlPibA6VW7iqazMlmwFqI SutgtRxEhRFD3jYIN+npuwSVh+N6OdUW6ToHEDbKXRrf08DIR2So7E3znidjLzsGvkwee2 UrBQPeqeZ+AbI7FRNZkxpIs2K94zH+1J8gY3DGe/Y2H5fxqxeQSZ843z5PEsHsJ0vOATkA zgxw6jrhPzfQQfcoJmjjBuyTqYus3U5U8LvmqRtSOCPRpcpKKJ83eeeOemTlKw== 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 4WZYkt3Pb3zrm5; Thu, 1 Aug 2024 16:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471G7IdS078929; Thu, 1 Aug 2024 16:07:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471G7Ina078926; Thu, 1 Aug 2024 16:07:18 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:07:18 GMT Message-Id: <202408011607.471G7Ina078926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 311f95ce3d41 - stable/14 - mfc-candidates: move pretty printing into lua List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 311f95ce3d4111eff1a6242be55adf52283b3e5e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=311f95ce3d4111eff1a6242be55adf52283b3e5e commit 311f95ce3d4111eff1a6242be55adf52283b3e5e Author: Ed Maste AuthorDate: 2024-04-16 16:49:05 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:45 +0000 mfc-candidates: move pretty printing into lua d51c59002367 moved the MFC hash matching logic into a lua utility script but left the output formatting in the shell script. Simplify this slightly by just printing the formatted output from lua. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44836 (cherry picked from commit 793745fad866f65863ab3b16a17bdf18dc779efd) --- tools/tools/git/candidatematch.lua | 10 +++++++++- tools/tools/git/mfc-candidates.sh | 7 +------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/tools/git/candidatematch.lua b/tools/tools/git/candidatematch.lua index 98c247fca339..481c1f38fea1 100755 --- a/tools/tools/git/candidatematch.lua +++ b/tools/tools/git/candidatematch.lua @@ -36,6 +36,14 @@ local function set_difference(set1, set2) return result end +-- Execute a command and print to stdout +local function exec_command(command) + local handle = io.popen(command) + local output = handle:read("a") + handle:close() + io.write(output) +end + -- Main function local function main() local from_file = arg[1] @@ -59,7 +67,7 @@ local function main() -- Print the result for _, hash in ipairs(result_hashes) do - print(hash) + exec_command("git show --pretty='%h %s' --no-patch " .. hash) end end diff --git a/tools/tools/git/mfc-candidates.sh b/tools/tools/git/mfc-candidates.sh index dd88710a4a4a..bc1ad602cb1c 100644 --- a/tools/tools/git/mfc-candidates.sh +++ b/tools/tools/git/mfc-candidates.sh @@ -149,7 +149,6 @@ canonicalize_hashes() workdir=$(mktemp -d /tmp/find-mfc.XXXXXXXXXX) from_list=$workdir/commits-from to_list=$workdir/commits-to -candidate_list=$workdir/candidates if [ -n "$exclude_file" ]; then exclude_list=$workdir/commits-exclude @@ -160,10 +159,6 @@ commits_from "$@" > $from_list commits_to "$@" > $to_list /usr/libexec/flua $(dirname $0)/candidatematch.lua \ - $from_list $to_list $exclude_list > $candidate_list - -while read hash; do - git show --pretty='%h %s' --no-patch $hash -done < $candidate_list + $from_list $to_list $exclude_list rm -rf "$workdir" From nobody Thu Aug 1 16:07:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYkw0Mh0z5T075; Thu, 01 Aug 2024 16:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYkv5Fjtz4bFJ; Thu, 1 Aug 2024 16:07:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BcBwPpaiMbfM+S+Bw9kij8fCpqiy9uX7LLkqhO4QlZk=; b=xz6gPGbx6eLOYWYAgLDX4sjVVeebjGNYOcbpnNNg8Ag9jGT7LyZrmbXvibcC73SrnlNL8f WoCzFotGuK4GR36EtHT9rt8f/NBLrny/pN7KdxC1UzAernHDz7zXF8hbLJBIXjfuEUQT0v JLZaear6lc1SBgqRMzwDmMcp7Dq+yLV26a9kKk3vz6ibXv5Ci9lkhD2vuX+b8okX6u2D8Y xSWWtEHTr8kHKR0JPktlPSOCxKbMTpN8+4Tlyq0kxkBWDxqdNJakFhHRiKeY6uWWtnPMq0 UXOHVnsWgTOa2l8m0QH6gWQmfqC1sxBzyAEXeT3ZFn9jRJW6zP4fAsYZCCcQxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722528439; a=rsa-sha256; cv=none; b=BlWBoP56AAqI8W3dMHrhp06fquhP5JrHjJ2BaBDl/TEfL/1LgyK8Y9dQlwGby01JkLviXw piR74uPqfuDzJiceYFza4E0lqvbT8L2kJKGlQnA5j7eglLj6lk1tmTyFJreTqq8eWtouR3 DpMxR3s7O5bRGWjWinYTOTFsAEs8cQo3HErm1XOxEvq6fBKvlobqoFTrouqND/AtyXbd7c qAnaSgAy/okQDhTV102hkKUzqLteIJD8UY/Cj6VCWU/cLs3+A4T7LsGmmEAHU1/8g51AaW RETbeB8LR6U+9eamHHZJkJei07bfiNWt9BmxKSEIZUVElj3ywMFq37kKzo+UVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BcBwPpaiMbfM+S+Bw9kij8fCpqiy9uX7LLkqhO4QlZk=; b=Bk2mnqZXjAdbcQmCPskMqMrrjZFQ07cc7nlen55bOIaYteHbmYlVGelT7i0u2lnpdWnIpP PgNBExB1KRSidibwq8R7M2ggbpDh9jJ0ZJueoDIJUh/ZBowuSuoO51AKr74FymeMElPu4V inW/9M0WqDv8cyilVW/K/jq81mYiei28eEf2C/JN+9xOL9XoBkoLsplEbBGPEWw1YqilI3 7Yr/5YyNn53oXI1d6UDxn79Rv64qIYtjw6m5kdf7ZyNoKaHb5JsZCPnV2UBSBEXoNZNYzD UXFdHm/+PNonQxmSqSIveD9sR0tObi4i/IdFuV+1ed8gJVVK/Kx+dZFkhJ9gzg== 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 4WZYkv4HKCzrZj; Thu, 1 Aug 2024 16:07:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471G7Jg4078973; Thu, 1 Aug 2024 16:07:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471G7JO0078970; Thu, 1 Aug 2024 16:07:19 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:07:19 GMT Message-Id: <202408011607.471G7JO0078970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 1755b9daa693 - stable/14 - libcbor: vendor update to 0.11.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1755b9daa6938fa549abbe7f99d53bf504ea48c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1755b9daa6938fa549abbe7f99d53bf504ea48c7 commit 1755b9daa6938fa549abbe7f99d53bf504ea48c7 Author: Ed Maste AuthorDate: 2024-05-03 23:33:50 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:45 +0000 libcbor: vendor update to 0.11.0 Sponsored by: The FreeBSD Foundation (cherry picked from commit abd872540f24cfc7dbd1ea29b6918c7082a22108) --- contrib/libcbor/.circleci/config.yml | 30 ++-- contrib/libcbor/.cirrus.yml | 26 +++ contrib/libcbor/.readthedocs.yaml | 21 +++ contrib/libcbor/CHANGELOG.md | 15 +- contrib/libcbor/CMakeLists.txt | 18 +- contrib/libcbor/CONTRIBUTING.md | 2 +- contrib/libcbor/Doxyfile | 2 +- contrib/libcbor/README.md | 7 +- contrib/libcbor/appveyor.yml | 14 -- contrib/libcbor/doc/source/api/item_types.rst | 2 +- contrib/libcbor/doc/source/conf.py | 18 +- contrib/libcbor/doc/source/development.rst | 6 +- contrib/libcbor/doc/source/index.rst | 8 +- contrib/libcbor/doc/source/internal.rst | 4 +- contrib/libcbor/doc/source/requirements.txt | 52 +++--- ...fc_conformance.rst => standard_conformance.rst} | 6 +- contrib/libcbor/examples/CMakeLists.txt | 4 + .../bazel/third_party/libcbor/cbor/configuration.h | 4 +- contrib/libcbor/examples/cbor2cjson.c | 123 +++++++++++++ contrib/libcbor/examples/cjson2cbor.c | 4 +- contrib/libcbor/examples/data/all_types.cbor | Bin 0 -> 354 bytes contrib/libcbor/examples/readfile.c | 2 +- contrib/libcbor/oss-fuzz/build.sh | 2 +- contrib/libcbor/src/CMakeLists.txt | 21 ++- contrib/libcbor/src/cbor.c | 82 +++++---- contrib/libcbor/src/cbor/common.h | 2 +- .../libcbor/src/cbor/internal/builder_callbacks.c | 27 +-- contrib/libcbor/src/cbor/internal/loaders.c | 2 +- contrib/libcbor/src/cbor/internal/memory_utils.h | 2 +- contrib/libcbor/src/cbor/internal/unicode.c | 6 +- contrib/libcbor/src/cbor/internal/unicode.h | 6 +- contrib/libcbor/src/cbor/maps.c | 1 + contrib/libcbor/src/cbor/streaming.c | 43 ++--- contrib/libcbor/src/cbor/strings.c | 10 ++ contrib/libcbor/src/cbor/strings.h | 19 +- contrib/libcbor/src/libcborConfig.cmake.in | 8 + contrib/libcbor/test/callbacks_test.c | 25 +++ contrib/libcbor/test/cbor_serialize_test.c | 32 ++++ contrib/libcbor/test/cbor_stream_decode_test.c | 8 +- contrib/libcbor/test/float_ctrl_test.c | 6 +- contrib/libcbor/test/pretty_printer_test.c | 197 +++++++++++++++++++-- contrib/libcbor/test/string_test.c | 67 +++++++ contrib/libcbor/test/tag_test.c | 23 +++ contrib/libcbor/test/test_allocator.c | 2 +- 44 files changed, 746 insertions(+), 213 deletions(-) diff --git a/contrib/libcbor/.circleci/config.yml b/contrib/libcbor/.circleci/config.yml index 69371b67d624..4391ad8d1e9c 100644 --- a/contrib/libcbor/.circleci/config.yml +++ b/contrib/libcbor/.circleci/config.yml @@ -4,12 +4,14 @@ commands: linux-setup: steps: - run: sudo apt-get update - - run: sudo apt-get install -y cmake ${TOOLCHAIN_PACKAGES} - - run: sudo apt install libcmocka-dev + # NEEDRESTART_MODE prevents automatic restarts which seem to hang. + - run: sudo NEEDRESTART_MODE=l apt-get install -y cmake ${TOOLCHAIN_PACKAGES} + - run: sudo NEEDRESTART_MODE=l apt-get install -y libcmocka-dev libcjson-dev build: steps: - run: > cmake -DWITH_TESTS=ON \ + -DWITH_EXAMPLES=ON \ -DCMAKE_BUILD_TYPE=Debug \ -DSANITIZE=OFF \ -DCOVERAGE="${CMAKE_COVERAGE:='OFF'}" \ @@ -31,14 +33,14 @@ orbs: jobs: static-test: - machine: - image: ubuntu-2204:2022.10.2 + machine: &default-machine + image: ubuntu-2204:2023.07.2 environment: TOOLCHAIN_PACKAGES: g++ steps: - checkout - linux-setup - - run: sudo apt-get install -y clang-format doxygen cppcheck + - run: sudo NEEDRESTART_MODE=l apt-get install -y clang-format doxygen cppcheck - run: cppcheck --inline-suppr --error-exitcode=1 . - run: bash clang-format.sh --verbose - run: > @@ -60,14 +62,14 @@ jobs: build-and-test: machine: - image: ubuntu-2204:2022.10.2 + <<: *default-machine environment: TOOLCHAIN_PACKAGES: g++ CMAKE_COVERAGE: ON steps: - checkout - linux-setup - - run: sudo apt-get install -y valgrind + - run: sudo NEEDRESTART_MODE=l apt-get install -y valgrind - build - test - run: ctest -T Coverage @@ -81,7 +83,7 @@ jobs: build-and-test-clang: machine: - image: ubuntu-2204:2022.10.2 + <<: *default-machine environment: TOOLCHAIN_PACKAGES: clang CC: clang @@ -94,11 +96,11 @@ jobs: build-and-test-32b: machine: - image: ubuntu-2204:2022.10.2 + <<: *default-machine steps: - checkout - run: sudo apt-get update - - run: sudo apt-get install -y cmake gcc-multilib g++-multilib libc6-dev-i386 + - run: sudo NEEDRESTART_MODE=l apt-get install -y cmake gcc-multilib g++-multilib libc6-dev-i386 # Make cmocka from source w/ 32b setup - run: git clone https://git.cryptomilk.org/projects/cmocka.git ~/cmocka - run: > @@ -117,7 +119,7 @@ jobs: build-and-test-release-clang: machine: - image: ubuntu-2204:2022.10.2 + <<: *default-machine environment: TOOLCHAIN_PACKAGES: clang CC: clang @@ -130,7 +132,7 @@ jobs: llvm-coverage: machine: - image: ubuntu-2204:2022.10.2 + <<: *default-machine environment: TOOLCHAIN_PACKAGES: clang CC: clang @@ -145,7 +147,7 @@ jobs: build-and-test-arm: machine: - image: ubuntu-2204:2022.10.2 + <<: *default-machine environment: TOOLCHAIN_PACKAGES: g++ resource_class: arm.medium @@ -157,7 +159,7 @@ jobs: build-bazel: machine: - image: ubuntu-2204:2022.10.2 + image: ubuntu-2204:2023.07.2 environment: TOOLCHAIN_PACKAGES: g++ steps: diff --git a/contrib/libcbor/.cirrus.yml b/contrib/libcbor/.cirrus.yml new file mode 100644 index 000000000000..948ae23b4a98 --- /dev/null +++ b/contrib/libcbor/.cirrus.yml @@ -0,0 +1,26 @@ +freebsd_task: + install_script: + - ASSUME_ALWAYS_YES=yes pkg bootstrap -f && pkg install -y cmocka cmake ninja + build_script: + - mkdir build + - cd build + - cmake -GNinja -DWITH_TESTS=ON + -DCBOR_CUSTOM_ALLOC=ON + -DCMAKE_BUILD_TYPE=Debug + -DSANITIZE=OFF + .. + - ninja -j $(sysctl -n hw.ncpu) + test_script: + - cd build + - ctest -VV + matrix: + # From gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images + - name: freebsd-13-2 + freebsd_instance: + image_family: freebsd-13-2 + - name: freebsd-14-0 + freebsd_instance: + image_family: freebsd-14-0 + - name: freebsd-15-0-snap + freebsd_instance: + image_family: freebsd-15-0-snap diff --git a/contrib/libcbor/.readthedocs.yaml b/contrib/libcbor/.readthedocs.yaml new file mode 100644 index 000000000000..f2514ffae113 --- /dev/null +++ b/contrib/libcbor/.readthedocs.yaml @@ -0,0 +1,21 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +sphinx: + configuration: doc/source/conf.py + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: doc/source/requirements.txt diff --git a/contrib/libcbor/CHANGELOG.md b/contrib/libcbor/CHANGELOG.md index f2475f308c7a..3c331f9266ab 100644 --- a/contrib/libcbor/CHANGELOG.md +++ b/contrib/libcbor/CHANGELOG.md @@ -4,6 +4,19 @@ Template: Next --------------------- +0.11.0 (2024-02-04) +--------------------- +- [Updated documentation to refer to RFC 8949](https://github.com/PJK/libcbor/issues/269) +- Improvements to `cbor_describe` + - [Bytestring data will now be printed as well](https://github.com/PJK/libcbor/pull/281) by [akallabeth](https://github.com/akallabeth) + - [Formatting consistency and clarity improvements](https://github.com/PJK/libcbor/pull/285) +- [Fix `cbor_string_set_handle` not setting the codepoint count](https://github.com/PJK/libcbor/pull/286) +- BREAKING: [`cbor_load` will no longer fail on input strings that are well-formed but not valid UTF-8](https://github.com/PJK/libcbor/pull/286) + - If you were relying on the validation, please check the result using `cbor_string_codepoint_count` instead +- BREAKING: [All decoders like `cbor_load` and `cbor_stream_decode` will accept all well-formed tag values](https://github.com/PJK/libcbor/pull/308) (bug discovered by [dskern-github](https://github.com/dskern-github)) + - Previously, decoding of certain values would fail with `CBOR_ERR_MALFORMATED` or `CBOR_DECODER_ERROR` + - This also makes decoding symmetrical with serialization, which already accepts all values + 0.10.2 (2023-01-31) --------------------- - [Fixed minor test bug causing failures for x86 Linux](https://github.com/PJK/libcbor/pull/266) (discovered by [trofi](https://github.com/PJK/libcbor/issues/263)) @@ -117,7 +130,7 @@ Next Breaks build & header compatibility due to: - Improved build configuration and feature check macros -- Endianess configuration fixes (by Erwin Kroon and David Grigsby) +- Endianness configuration fixes (by Erwin Kroon and David Grigsby) - pkg-config compatibility (by Vincent Bernat) - enable use of versioned SONAME (by Vincent Bernat) - better fuzzer (wasn't random until now, ooops) diff --git a/contrib/libcbor/CMakeLists.txt b/contrib/libcbor/CMakeLists.txt index 5c0a7846cfa3..16b9f0875d33 100644 --- a/contrib/libcbor/CMakeLists.txt +++ b/contrib/libcbor/CMakeLists.txt @@ -1,14 +1,18 @@ cmake_minimum_required(VERSION 3.0) + project(libcbor) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/") include(CTest) +include(GNUInstallDirs) # Provides CMAKE_INSTALL_ variables SET(CBOR_VERSION_MAJOR "0") -SET(CBOR_VERSION_MINOR "10") -SET(CBOR_VERSION_PATCH "2") +SET(CBOR_VERSION_MINOR "11") +SET(CBOR_VERSION_PATCH "0") SET(CBOR_VERSION ${CBOR_VERSION_MAJOR}.${CBOR_VERSION_MINOR}.${CBOR_VERSION_PATCH}) -set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true) +option(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "cmake --build --target install does not depend on cmake --build" true) +option(BUILD_SHARED_LIBS "Build as a shared library" false) + include(CheckIncludeFiles) include(TestBigEndian) @@ -19,10 +23,10 @@ endif() option(CBOR_CUSTOM_ALLOC "Custom, dynamically defined allocator support" OFF) if(CBOR_CUSTOM_ALLOC) - message(WARNING + message(WARNING "CBOR_CUSTOM_ALLOC has been deprecated. Custom allocators are now enabled by default." "The flag is a no-op and will be removed in the next version. " - "Please remove CBOR_CUSTOM_ALLOC from your build configuation.") + "Please remove CBOR_CUSTOM_ALLOC from your build configuration.") endif(CBOR_CUSTOM_ALLOC) option(CBOR_PRETTY_PRINTER "Include a pretty-printing routine" ON) @@ -138,12 +142,10 @@ if (COVERAGE) endif() endif (COVERAGE) - # We want to generate configuration.h from the template and make it so that it is accessible using the same # path during both library build and installed header use, without littering the source dir. -# Using cbor/configuration.h in the build dir works b/c headers will be installed to /cbor configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/cbor/configuration.h.in ${PROJECT_BINARY_DIR}/cbor/configuration.h) -install(FILES ${PROJECT_BINARY_DIR}/cbor/configuration.h DESTINATION include/cbor) +install(FILES ${PROJECT_BINARY_DIR}/cbor/configuration.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cbor) # Make the header visible at compile time include_directories(${PROJECT_BINARY_DIR}) diff --git a/contrib/libcbor/CONTRIBUTING.md b/contrib/libcbor/CONTRIBUTING.md index cc834d21a46b..9bd42a06b6dc 100644 --- a/contrib/libcbor/CONTRIBUTING.md +++ b/contrib/libcbor/CONTRIBUTING.md @@ -2,7 +2,7 @@ libcbor is maintained by [@PJK](https://github.com/PJK) in his spare time on a best-effort basis. -Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described belows. +Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described below. ## Principles diff --git a/contrib/libcbor/Doxyfile b/contrib/libcbor/Doxyfile index 2571057646d7..67df45cfbb94 100644 --- a/contrib/libcbor/Doxyfile +++ b/contrib/libcbor/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = libcbor # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.10.2 +PROJECT_NUMBER = 0.11.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/contrib/libcbor/README.md b/contrib/libcbor/README.md index 6d34ba9d4dcb..ea54bed9437b 100644 --- a/contrib/libcbor/README.md +++ b/contrib/libcbor/README.md @@ -1,16 +1,15 @@ # [libcbor](https://github.com/PJK/libcbor) [![CircleCI](https://circleci.com/gh/PJK/libcbor/tree/master.svg?style=svg)](https://circleci.com/gh/PJK/libcbor/tree/master) -[![Build status](https://ci.appveyor.com/api/projects/status/8kkmvmefelsxp5u2?svg=true)](https://ci.appveyor.com/project/PJK/libcbor) [![Documentation Status](https://readthedocs.org/projects/libcbor/badge/?version=latest)](https://readthedocs.org/projects/libcbor/?badge=latest) [![latest packaged version(s)](https://repology.org/badge/latest-versions/libcbor.svg)](https://repology.org/project/libcbor/versions) [![codecov](https://codecov.io/gh/PJK/libcbor/branch/master/graph/badge.svg)](https://codecov.io/gh/PJK/libcbor) -**libcbor** is a C library for parsing and generating [CBOR](https://tools.ietf.org/html/rfc7049), the general-purpose schema-less binary data format. +**libcbor** is a C library for parsing and generating [CBOR](https://cbor.io/), the general-purpose schema-less binary data format. ## Main features - - Complete RFC conformance - - Robust C99 implementation + - Complete [IETF RFC 8949 (STD 94)](https://www.rfc-editor.org/info/std94) conformance + - Robust platform-independent C99 implementation - Layered architecture offers both control and convenience - Flexible memory management - No shared global state - threading friendly diff --git a/contrib/libcbor/appveyor.yml b/contrib/libcbor/appveyor.yml deleted file mode 100644 index 6a0cca219b92..000000000000 --- a/contrib/libcbor/appveyor.yml +++ /dev/null @@ -1,14 +0,0 @@ -image: Visual Studio 2022 -version: '{build}' -platform: x64 - -skip_branch_with_pr: true - -before_build: -- cmake -H. -Bbuild - -build_script: -- if "%APPVEYOR_REPO_TAG%"=="true" (set CONFIGURATION=RelWithDebInfo) else (set CONFIGURATION=Debug) -- cmake --build build --config "%CONFIGURATION%" - -# TODO enable CMocka tests, maybe package the binaries diff --git a/contrib/libcbor/doc/source/api/item_types.rst b/contrib/libcbor/doc/source/api/item_types.rst index 1452b3e5f90e..1051b97ded7b 100644 --- a/contrib/libcbor/doc/source/api/item_types.rst +++ b/contrib/libcbor/doc/source/api/item_types.rst @@ -1,7 +1,7 @@ Types of items =============================================== -Every :type:`cbor_item_t` has a :type:`cbor_type` associated with it - these constants correspond to the types specified by the `CBOR standard `_: +Every :type:`cbor_item_t` has a :type:`cbor_type` associated with it - these constants correspond to the types specified by the `CBOR standard `_: .. doxygenenum:: cbor_type diff --git a/contrib/libcbor/doc/source/conf.py b/contrib/libcbor/doc/source/conf.py index 585efc8a436f..0eee7103bb5a 100644 --- a/contrib/libcbor/doc/source/conf.py +++ b/contrib/libcbor/doc/source/conf.py @@ -33,7 +33,8 @@ extensions = [ 'breathe', 'sphinx.ext.mathjax', 'sphinx.ext.autodoc', - 'sphinx.ext.ifconfig' + 'sphinx.ext.ifconfig', + 'sphinx_rtd_theme' ] import subprocess, os @@ -76,8 +77,8 @@ copyright = '2014 - 2020, Pavel Kalvoda' # built documents. # # The short X.Y version. -version = '0.10' -release = '0.10.2' +version = '0.11' +release = '0.11.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -127,7 +128,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -285,12 +286,3 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False - - -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# otherwise, readthedocs.org uses their theme by default, so no need to specify it - diff --git a/contrib/libcbor/doc/source/development.rst b/contrib/libcbor/doc/source/development.rst index 13e91ef25762..0b0ac21007ed 100644 --- a/contrib/libcbor/doc/source/development.rst +++ b/contrib/libcbor/doc/source/development.rst @@ -22,15 +22,15 @@ everywhere. Goals ~~~~~~~~~~~~~~~~~~~~~~ -RFC-conformance and full feature support -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Standard conformance and full feature support +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Anything the standard allows, libcbor can do. **Why?** Because conformance and interoperability is the point of defining standards. Clients expect the support to be feature-complete and there is no significant complexity reduction that can be achieved by slightly -cutting corners, which means that the incremental cost of full RFC support is +cutting corners, which means that the incremental cost of full [CBOR standard](https://www.rfc-editor.org/info/std94) support is comparatively small over "almost-conformance" seen in many alternatives. diff --git a/contrib/libcbor/doc/source/index.rst b/contrib/libcbor/doc/source/index.rst index 79293e798c3b..d3d62cf75c41 100644 --- a/contrib/libcbor/doc/source/index.rst +++ b/contrib/libcbor/doc/source/index.rst @@ -9,7 +9,7 @@ Overview Main features - - Complete RFC conformance [#]_ + - Complete `IETF RFC 8949 (STD 94) `_ conformance [#]_ - Robust C99 implementation - Layered architecture offers both control and convenience - Flexible memory management @@ -19,7 +19,7 @@ Main features - Extensive documentation and test suite - No runtime dependencies, small footprint -.. [#] See :doc:`rfc_conformance` +.. [#] See :doc:`standard_conformance` .. [#] With the exception of custom memory allocators (see :doc:`api/item_reference_counting`) @@ -31,9 +31,9 @@ Contents using api tests - rfc_conformance + standard_conformance internal changelog development -.. _CBOR: http://tools.ietf.org/html/rfc7049 +.. _CBOR: https://www.rfc-editor.org/info/std94 diff --git a/contrib/libcbor/doc/source/internal.rst b/contrib/libcbor/doc/source/internal.rst index 2c62a82b2329..e30cb11dffa1 100644 --- a/contrib/libcbor/doc/source/internal.rst +++ b/contrib/libcbor/doc/source/internal.rst @@ -6,7 +6,7 @@ Internal workings of *libcbor* are mostly derived from the specification. The pu Terminology --------------- === ====================== ======================================================================================================================================== -MTB Major Type Byte http://tools.ietf.org/html/rfc7049#section-2.1 +MTB Major Type Byte https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1 --- ---------------------- ---------------------------------------------------------------------------------------------------------------------------------------- DST Dynamically Sized Type Type whose storage requirements cannot be determined @@ -32,7 +32,7 @@ and also borrowing from General notes on the API design -------------------------------- -The API design has two main driving priciples: +The API design has two main driving principles: 1. Let the client manage the memory as much as possible 2. Behave exactly as specified by the standard diff --git a/contrib/libcbor/doc/source/requirements.txt b/contrib/libcbor/doc/source/requirements.txt index a82e34e58ad2..502d79cc62e6 100644 --- a/contrib/libcbor/doc/source/requirements.txt +++ b/contrib/libcbor/doc/source/requirements.txt @@ -1,31 +1,31 @@ -alabaster==0.7.12 -Babel==2.9.1 -breathe==4.33.1 -certifi==2022.12.7 -charset-normalizer==2.0.12 -colorama==0.4.4 -docutils==0.17.1 -idna==3.3 -imagesize==1.3.0 -importlib-metadata==4.11.3 -Jinja2==3.0.3 +alabaster==0.7.13 +Babel==2.13.1 +breathe==4.35.0 +certifi==2023.11.17 +charset-normalizer==3.3.2 +colorama==0.4.6 +docutils==0.18.1 +idna==3.4 +imagesize==1.4.1 +importlib-metadata==6.8.0 +Jinja2==3.1.2 livereload==2.6.3 -MarkupSafe==2.1.1 -packaging==21.3 -Pygments==2.11.2 -pyparsing==3.0.7 +MarkupSafe==2.1.3 +packaging==23.2 +Pygments==2.16.1 +pyparsing==3.1.1 pytz==2021.3 -requests==2.27.1 +requests==2.31.0 snowballstemmer==2.2.0 -Sphinx==4.4.0 +Sphinx==7.2.6 sphinx-autobuild==2021.3.14 -sphinx-rtd-theme==1.0.0 -sphinxcontrib-applehelp==1.0.2 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.0 +sphinx-rtd-theme==1.3.0 +sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-htmlhelp==2.0.4 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 -tornado==6.1 -urllib3==1.26.9 -zipp==3.7.0 +sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-serializinghtml==1.1.9 +tornado==6.3.3 +urllib3==2.1.0 +zipp==3.17.0 diff --git a/contrib/libcbor/doc/source/rfc_conformance.rst b/contrib/libcbor/doc/source/standard_conformance.rst similarity index 73% rename from contrib/libcbor/doc/source/rfc_conformance.rst rename to contrib/libcbor/doc/source/standard_conformance.rst index 6848fbacd464..62965f0c4493 100644 --- a/contrib/libcbor/doc/source/rfc_conformance.rst +++ b/contrib/libcbor/doc/source/standard_conformance.rst @@ -1,13 +1,13 @@ -RFC conformance +IETF standard conformance ========================= -*libcbor* is, generally speaking, very faithful implementation of `RFC 7049 `_. There are, however, some limitations imposed by technical constraints. +*libcbor* is, generally speaking, a very faithful implementation of `IETF RFC 8949 (STD 94) `_. There are, however, some limitations related to the numerical range and precision available in portable C99. Bytestring length ------------------- There is no explicit limitation of indefinite length byte strings. [#]_ *libcbor* will not handle byte strings with more chunks than the maximum value of :type:`size_t`. On any sane platform, such string would not fit in the memory anyway. It is, however, possible to process arbitrarily long strings and byte strings using the streaming decoder. -.. [#] https://tools.ietf.org/html/rfc7049#section-2.2.2 +.. [#] https://www.rfc-editor.org/rfc/rfc8949.html#section-3.2.3 "Half-precision" IEEE 754 floats --------------------------------- diff --git a/contrib/libcbor/examples/CMakeLists.txt b/contrib/libcbor/examples/CMakeLists.txt index eaf985ba32cd..b1f2ec290e7a 100644 --- a/contrib/libcbor/examples/CMakeLists.txt +++ b/contrib/libcbor/examples/CMakeLists.txt @@ -22,6 +22,10 @@ if(CJSON_FOUND) add_executable(cjson2cbor cjson2cbor.c) target_include_directories(cjson2cbor PUBLIC ${CJSON_INCLUDE_DIRS}) target_link_libraries(cjson2cbor cbor ${CJSON_LIBRARY}) + + add_executable(cbor2cjson cbor2cjson.c) + target_include_directories(cbor2cjson PUBLIC ${CJSON_INCLUDE_DIRS}) + target_link_libraries(cbor2cjson cbor ${CJSON_LIBRARY}) endif() file(COPY data DESTINATION .) diff --git a/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h b/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h index 3472cf49d8fe..ddf6b9dc5f2b 100644 --- a/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h +++ b/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h @@ -2,8 +2,8 @@ #define LIBCBOR_CONFIGURATION_H #define CBOR_MAJOR_VERSION 0 -#define CBOR_MINOR_VERSION 10 -#define CBOR_PATCH_VERSION 2 +#define CBOR_MINOR_VERSION 11 +#define CBOR_PATCH_VERSION 0 #define CBOR_BUFFER_GROWTH 2 #define CBOR_MAX_STACK_SIZE 2048 diff --git a/contrib/libcbor/examples/cbor2cjson.c b/contrib/libcbor/examples/cbor2cjson.c new file mode 100644 index 000000000000..99ddc9ee09e1 --- /dev/null +++ b/contrib/libcbor/examples/cbor2cjson.c @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2014-2020 Pavel Kalvoda + * + * libcbor is free software; you can redistribute it and/or modify + * it under the terms of the MIT license. See LICENSE for details. + */ + +#include +#include +#include + +#include "cbor.h" + +void usage(void) { + printf("Usage: cbor2cjson [input file]\n"); + exit(1); +} + +cJSON* cbor_to_cjson(cbor_item_t* item) { + switch (cbor_typeof(item)) { + case CBOR_TYPE_UINT: + return cJSON_CreateNumber(cbor_get_int(item)); + case CBOR_TYPE_NEGINT: + return cJSON_CreateNumber(-1 - cbor_get_int(item)); + case CBOR_TYPE_BYTESTRING: + // cJSON only handles null-terminated string -- binary data would have to + // be escaped + return cJSON_CreateString("Unsupported CBOR item: Bytestring"); + case CBOR_TYPE_STRING: + if (cbor_string_is_definite(item)) { + // cJSON only handles null-terminated string + char* null_terminated_string = malloc(cbor_string_length(item) + 1); + memcpy(null_terminated_string, cbor_string_handle(item), + cbor_string_length(item)); + null_terminated_string[cbor_string_length(item)] = 0; + cJSON* result = cJSON_CreateString(null_terminated_string); + free(null_terminated_string); + return result; + } + return cJSON_CreateString("Unsupported CBOR item: Chunked string"); + case CBOR_TYPE_ARRAY: { + cJSON* result = cJSON_CreateArray(); + for (size_t i = 0; i < cbor_array_size(item); i++) { + cJSON_AddItemToArray(result, cbor_to_cjson(cbor_array_get(item, i))); + } + return result; + } + case CBOR_TYPE_MAP: { + cJSON* result = cJSON_CreateObject(); + for (size_t i = 0; i < cbor_map_size(item); i++) { + char* key = malloc(128); + snprintf(key, 128, "Surrogate key %zu", i); + // JSON only support string keys + if (cbor_isa_string(cbor_map_handle(item)[i].key) && + cbor_string_is_definite(cbor_map_handle(item)[i].key)) { + size_t key_length = cbor_string_length(cbor_map_handle(item)[i].key); + if (key_length > 127) key_length = 127; + // Null-terminated madness + memcpy(key, cbor_string_handle(cbor_map_handle(item)[i].key), + key_length); + key[key_length] = 0; + } + + cJSON_AddItemToObject(result, key, + cbor_to_cjson(cbor_map_handle(item)[i].value)); + free(key); + } + return result; + } + case CBOR_TYPE_TAG: + return cJSON_CreateString("Unsupported CBOR item: Tag"); + case CBOR_TYPE_FLOAT_CTRL: + if (cbor_float_ctrl_is_ctrl(item)) { + if (cbor_is_bool(item)) return cJSON_CreateBool(cbor_get_bool(item)); + if (cbor_is_null(item)) return cJSON_CreateNull(); + return cJSON_CreateString("Unsupported CBOR item: Control value"); + } + return cJSON_CreateNumber(cbor_float_get_float(item)); + } + + return cJSON_CreateNull(); +} + +/* + * Reads CBOR data from a file and outputs JSON using cJSON + * $ ./examples/cbor2cjson examples/data/nested_array.cbor + */ + +int main(int argc, char* argv[]) { + if (argc != 2) usage(); + FILE* f = fopen(argv[1], "rb"); + if (f == NULL) usage(); + fseek(f, 0, SEEK_END); + size_t length = (size_t)ftell(f); + fseek(f, 0, SEEK_SET); + unsigned char* buffer = malloc(length); + fread(buffer, length, 1, f); + + /* Assuming `buffer` contains `length` bytes of input data */ + struct cbor_load_result result; + cbor_item_t* item = cbor_load(buffer, length, &result); + free(buffer); + + if (result.error.code != CBOR_ERR_NONE) { + printf( + "There was an error while reading the input near byte %zu (read %zu " + "bytes in total): ", + result.error.position, result.read); + exit(1); + } + + cJSON* cjson_item = cbor_to_cjson(item); + char* json_string = cJSON_Print(cjson_item); + printf("%s\n", json_string); + free(json_string); + fflush(stdout); + + /* Deallocate the result */ + cbor_decref(&item); + cJSON_Delete(cjson_item); + + fclose(f); +} diff --git a/contrib/libcbor/examples/cjson2cbor.c b/contrib/libcbor/examples/cjson2cbor.c index eae78e1cf7a6..b67439902442 100644 --- a/contrib/libcbor/examples/cjson2cbor.c +++ b/contrib/libcbor/examples/cjson2cbor.c @@ -7,7 +7,7 @@ /** * This code demonstrates how cJSON (https://github.com/DaveGamble/cJSON) - * callbacks can be used in conjuction with the streaming parser to translate + * callbacks can be used in conjunction with the streaming parser to translate * JSON to CBOR. Please note that cbor_builder_* APIs are internal and thus * subject to change. * @@ -111,7 +111,7 @@ void cjson_cbor_stream_decode(cJSON *source, } void usage(void) { - printf("Usage: cjson [input JSON file]\n"); + printf("Usage: cjson2cbor [input JSON file]\n"); exit(1); } diff --git a/contrib/libcbor/examples/data/all_types.cbor b/contrib/libcbor/examples/data/all_types.cbor new file mode 100644 index 000000000000..00d66a0e667e Binary files /dev/null and b/contrib/libcbor/examples/data/all_types.cbor differ diff --git a/contrib/libcbor/examples/readfile.c b/contrib/libcbor/examples/readfile.c index 3f8db6152800..c6f4a3342d08 100644 --- a/contrib/libcbor/examples/readfile.c +++ b/contrib/libcbor/examples/readfile.c @@ -58,7 +58,7 @@ int main(int argc, char* argv[]) { case CBOR_ERR_SYNTAXERROR: { printf( "Syntactically malformed data -- see " - "http://tools.ietf.org/html/rfc7049\n"); + "https://www.rfc-editor.org/info/std94\n"); break; } case CBOR_ERR_NONE: { diff --git a/contrib/libcbor/oss-fuzz/build.sh b/contrib/libcbor/oss-fuzz/build.sh index 10853a398734..e7b1df3ada0a 100755 --- a/contrib/libcbor/oss-fuzz/build.sh +++ b/contrib/libcbor/oss-fuzz/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash -eu +#!/bin/bash -eux # Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/contrib/libcbor/src/CMakeLists.txt b/contrib/libcbor/src/CMakeLists.txt index 72a0c901556d..e9312395db25 100644 --- a/contrib/libcbor/src/CMakeLists.txt +++ b/contrib/libcbor/src/CMakeLists.txt @@ -1,6 +1,5 @@ set(SOURCES cbor.c allocators.c cbor/streaming.c cbor/internal/encoders.c cbor/internal/builder_callbacks.c cbor/internal/loaders.c cbor/internal/memory_utils.c cbor/internal/stack.c cbor/internal/unicode.c cbor/encoding.c cbor/serialization.c cbor/arrays.c cbor/common.c cbor/floats_ctrls.c cbor/bytestrings.c cbor/callbacks.c cbor/strings.c cbor/maps.c cbor/tags.c cbor/ints.c) -include(GNUInstallDirs) include(JoinPaths) include(CheckFunctionExists) set(CMAKE_SKIP_BUILD_RPATH FALSE) @@ -49,3 +48,23 @@ install(FILES cbor.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcbor.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + +include(CMakePackageConfigHelpers) +configure_package_config_file( + libcborConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/libcborConfig.cmake + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libcbor + PATH_VARS CMAKE_INSTALL_INCLUDEDIR +) +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/libcborConfigVersion.cmake + VERSION ${CBOR_VERSION} + COMPATIBILITY SameMajorVersion +) +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/libcborConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/libcborConfigVersion.cmake + DESTINATION + ${CMAKE_INSTALL_LIBDIR}/cmake/libcbor + ) diff --git a/contrib/libcbor/src/cbor.c b/contrib/libcbor/src/cbor.c index 626ddddaecfc..a8b4bcd7a080 100644 --- a/contrib/libcbor/src/cbor.c +++ b/contrib/libcbor/src/cbor.c @@ -9,6 +9,7 @@ #include "cbor/internal/builder_callbacks.h" #include "cbor/internal/loaders.h" +#pragma clang diagnostic push cbor_item_t *cbor_load(cbor_data source, size_t source_size, struct cbor_load_result *result) { /* Context stack */ @@ -289,7 +290,6 @@ cbor_item_t *cbor_copy(cbor_item_t *item) { #include #include -#include #include #define __STDC_FORMAT_MACROS @@ -301,89 +301,105 @@ static int _pow(int b, int ex) { return res; } +static void _cbor_type_marquee(FILE *out, char *label, int indent) { + fprintf(out, "%*.*s[%s] ", indent, indent, " ", label); +} + static void _cbor_nested_describe(cbor_item_t *item, FILE *out, int indent) { - setlocale(LC_ALL, ""); + const int indent_offset = 4; switch (cbor_typeof(item)) { case CBOR_TYPE_UINT: { - fprintf(out, "%*s[CBOR_TYPE_UINT] ", indent, " "); + _cbor_type_marquee(out, "CBOR_TYPE_UINT", indent); fprintf(out, "Width: %dB, ", _pow(2, cbor_int_get_width(item))); fprintf(out, "Value: %" PRIu64 "\n", cbor_get_int(item)); break; } case CBOR_TYPE_NEGINT: { - fprintf(out, "%*s[CBOR_TYPE_NEGINT] ", indent, " "); + _cbor_type_marquee(out, "CBOR_TYPE_NEGINT", indent); fprintf(out, "Width: %dB, ", _pow(2, cbor_int_get_width(item))); - fprintf(out, "Value: -%" PRIu64 " -1\n", cbor_get_int(item)); + fprintf(out, "Value: -%" PRIu64 " - 1\n", cbor_get_int(item)); break; } case CBOR_TYPE_BYTESTRING: { - fprintf(out, "%*s[CBOR_TYPE_BYTESTRING] ", indent, " "); + _cbor_type_marquee(out, "CBOR_TYPE_BYTESTRING", indent); if (cbor_bytestring_is_indefinite(item)) { - fprintf(out, "Indefinite, with %zu chunks:\n", + fprintf(out, "Indefinite, Chunks: %zu, Chunk data:\n", cbor_bytestring_chunk_count(item)); for (size_t i = 0; i < cbor_bytestring_chunk_count(item); i++) _cbor_nested_describe(cbor_bytestring_chunks_handle(item)[i], out, - indent + 4); + indent + indent_offset); } else { - fprintf(out, "Definite, length %zuB\n", cbor_bytestring_length(item)); + const unsigned char *data = cbor_bytestring_handle(item); + fprintf(out, "Definite, Length: %zuB, Data:\n", + cbor_bytestring_length(item)); + fprintf(out, "%*s", indent + indent_offset, " "); + for (size_t i = 0; i < cbor_bytestring_length(item); i++) + fprintf(out, "%02x", (int)(data[i] & 0xff)); + fprintf(out, "\n"); } break; } case CBOR_TYPE_STRING: { - fprintf(out, "%*s[CBOR_TYPE_STRING] ", indent, " "); + _cbor_type_marquee(out, "CBOR_TYPE_STRING", indent); if (cbor_string_is_indefinite(item)) { - fprintf(out, "Indefinite, with %zu chunks:\n", + fprintf(out, "Indefinite, Chunks: %zu, Chunk data:\n", cbor_string_chunk_count(item)); for (size_t i = 0; i < cbor_string_chunk_count(item); i++) _cbor_nested_describe(cbor_string_chunks_handle(item)[i], out, - indent + 4); + indent + indent_offset); } else { - fprintf(out, "Definite, length %zuB, %zu codepoints\n", + fprintf(out, "Definite, Length: %zuB, Codepoints: %zu, Data:\n", cbor_string_length(item), cbor_string_codepoint_count(item)); - /* Careful - this doesn't support multibyte characters! */ - /* Printing those is out of the scope of this demo :) */ - /* libICU is your friend */ - fprintf(out, "%*s", indent + 4, " "); - /* XXX: no null at the end -> confused vprintf */ - fwrite(cbor_string_handle(item), (int)cbor_string_length(item), 1, out); + fprintf(out, "%*s", indent + indent_offset, " "); + // Note: The string is not escaped, whitespace and control character + // will be printed in verbatim and take effect. + fwrite(cbor_string_handle(item), sizeof(unsigned char), + cbor_string_length(item), out); fprintf(out, "\n"); } break; } case CBOR_TYPE_ARRAY: { - fprintf(out, "%*s[CBOR_TYPE_ARRAY] ", indent, " "); + _cbor_type_marquee(out, "CBOR_TYPE_ARRAY", indent); if (cbor_array_is_definite(item)) { - fprintf(out, "Definite, size: %zu\n", cbor_array_size(item)); + fprintf(out, "Definite, Size: %zu, Contents:\n", cbor_array_size(item)); } else { - fprintf(out, "Indefinite, size: %zu\n", cbor_array_size(item)); + fprintf(out, "Indefinite, Size: %zu, Contents:\n", + cbor_array_size(item)); } for (size_t i = 0; i < cbor_array_size(item); i++) - _cbor_nested_describe(cbor_array_handle(item)[i], out, indent + 4); + _cbor_nested_describe(cbor_array_handle(item)[i], out, + indent + indent_offset); break; } case CBOR_TYPE_MAP: { - fprintf(out, "%*s[CBOR_TYPE_MAP] ", indent, " "); + _cbor_type_marquee(out, "CBOR_TYPE_MAP", indent); if (cbor_map_is_definite(item)) { - fprintf(out, "Definite, size: %zu\n", cbor_map_size(item)); + fprintf(out, "Definite, Size: %zu, Contents:\n", cbor_map_size(item)); } else { - fprintf(out, "Indefinite, size: %zu\n", cbor_map_size(item)); *** 885 LINES SKIPPED *** From nobody Thu Aug 1 16:07:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYkw6Sgpz5T0F6; Thu, 01 Aug 2024 16:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYkw5WN7z4bj3; Thu, 1 Aug 2024 16:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahnXYhWJRuJtr8xB1yzJDN1qEk5EmTukzv4GTC6hQrw=; b=I1kusCWH9IAx8571UhniVY9UNbQ3qQ3v4ldsbbZOj5eBSntTKpnxI0Evlb0niz+wl7nP3S XvqVJW+LMaZjpgzr0RintgZ08uNxrgNY1ZmoGU1+QOfCgfLsX+6P8JWjQf+p/1Jp9yPigN sSWr1d8ELdbESQ6f9hhO1wwnhFCC6R5FC8ENAY2Au+HbiFe3LUGsQej6pqwnf4pRgLjpet 7ZFmQq0/ZXb56V9hYP9TsZyY2Q7KRbWH92MmYFdl2ONaICmugymDqL0dHu5HBCxWiBzekZ id5EZWtl8UCtyoQFawl85R9j7toYxvcVmKktoEuJwxkDsyUov04bpBFzdtvewQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722528440; a=rsa-sha256; cv=none; b=weRrRRyluvIKN+N0EXpBgcQWraNzYZnqhWEf76bd4aecnTRzU4POOhDeTPStyJfaK2wryS DEEgH1qj5CGJEWJP0UnIEeq98g1iR0yD0wW3u1iLNIR92/dlQYLCiH8M6vHDY4Wnapdj8v hpyDv4gCqcUi5g3QO0vNkO6T9Ep6xLiAqCA0bMy8Ad5GtQQ7IUDr89/AT54X9CxxNNFO0R l0Vtq3Nwn0tkCT3zrZdnU/JC5t9tdJWtJEtg+1S4pu7Rg/c6EDu1ohvJL7qoEiI+rbGoLJ VoL/RBBa4WpJ6jfIbHKlpm9VIQ1BS47WvZREcYNkWXC4GGtASHrDYxmgmDOO1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahnXYhWJRuJtr8xB1yzJDN1qEk5EmTukzv4GTC6hQrw=; b=Z+L2ueV7LZqS2dPzBNdZ3C0oiiqX2fXIW1H1YTuWr7jtPTrx4f6uT5VsEoCIF7mBu4Ud38 m2GRPdK7NjzH1C6rv9AJ1X9dpxz3qaS++fjJm27IqpbG9kBpmdXI4F2Y/TrFAvNXY/Qycs SPgCkWomhaKz842Nb5F0iXnbcmWWsUjYqQMfc/VmfFLkxistyUxYqY8YyYPEhcRYLHPpv0 xFHkmHzaSoN/eW1QQCdNICl2G2Rl7lXzXQGt1ZUtePyxJsdpLpG9rCwADu44ByxkrXDyQZ Btz61Iyl0KSZQwyY3g0M6TFfzAt2MQ9MQvsKgpLbdzUhMxpH6Matd9vFRnc0sA== 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 4WZYkw540CzrZk; Thu, 1 Aug 2024 16:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471G7KAB079012; Thu, 1 Aug 2024 16:07:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471G7KWL079009; Thu, 1 Aug 2024 16:07:20 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:07:20 GMT Message-Id: <202408011607.471G7KWL079009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 128bace5102e - stable/14 - libfido2: update to 1.14.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 128bace5102e5871fc0a139bb0a3448a08ea3c13 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=128bace5102e5871fc0a139bb0a3448a08ea3c13 commit 128bace5102e5871fc0a139bb0a3448a08ea3c13 Author: Ed Maste AuthorDate: 2024-05-04 16:51:08 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:45 +0000 libfido2: update to 1.14.0 Sponsored by: The FreeBSD Foundation (cherry picked from commit 60a517b66a69b8c011b04063ef63a938738719bd) --- contrib/libfido2/.actions/build-bsd | 97 +++++++++++ contrib/libfido2/.actions/build-linux-clang | 21 +++ contrib/libfido2/.actions/build-linux-gcc | 23 +++ .../.actions/build-linux-i686-w64-mingw32-gcc | 58 +++++++ .../libfido2/.actions/build-linux-openssl3-clang | 33 ++++ contrib/libfido2/.actions/build-linux-openssl3-gcc | 28 ++++ .../build-linux-openssl3-i686-w64-mingw32-gcc | 59 +++++++ contrib/libfido2/.actions/build-osx-clang | 19 +++ contrib/libfido2/.actions/fuzz-linux | 93 +++++++++++ contrib/libfido2/.actions/llvm.gpg | 52 ++++++ contrib/libfido2/.actions/setup_clang | 17 ++ contrib/libfido2/.gitattributes | 1 + .../libfido2/.github/ISSUE_TEMPLATE/bug_report.md | 80 ++++++++++ contrib/libfido2/.github/ISSUE_TEMPLATE/config.yml | 8 + .../libfido2/.github/workflows/alpine_builds.yml | 39 +++++ contrib/libfido2/.github/workflows/bsd_builds.yml | 32 ++++ contrib/libfido2/.github/workflows/cifuzz_oss.yml | 46 ++++++ .../libfido2/.github/workflows/codeql-analysis.yml | 42 +++++ .../libfido2/.github/workflows/cygwin_builds.yml | 30 ++++ .../libfido2/.github/workflows/linux_builds.yml | 57 +++++++ contrib/libfido2/.github/workflows/linux_fuzz.yml | 41 +++++ .../libfido2/.github/workflows/macos_builds.yml | 32 ++++ contrib/libfido2/.github/workflows/openssl3.yml | 51 ++++++ .../libfido2/.github/workflows/windows_builds.yml | 32 ++++ contrib/libfido2/.gitignore | 9 ++ contrib/libfido2/CMakeLists.txt | 4 +- contrib/libfido2/NEWS | 10 ++ contrib/libfido2/README.adoc | 2 +- contrib/libfido2/examples/README.adoc | 5 +- contrib/libfido2/examples/cred.c | 30 +++- contrib/libfido2/fuzz/Dockerfile | 2 +- contrib/libfido2/fuzz/Makefile | 2 +- contrib/libfido2/fuzz/export.gnu | 2 + contrib/libfido2/fuzz/functions.txt | 63 ++++---- contrib/libfido2/fuzz/fuzz_assert.c | 4 +- contrib/libfido2/fuzz/report.tgz | Bin 357005 -> 361946 bytes contrib/libfido2/fuzz/summary.txt | 18 +-- contrib/libfido2/man/CMakeLists.txt | 3 + contrib/libfido2/man/fido2-assert.1 | 13 +- contrib/libfido2/man/fido2-cred.1 | 13 +- contrib/libfido2/man/fido_assert_new.3 | 14 +- contrib/libfido2/man/fido_assert_set_authdata.3 | 59 ++++++- contrib/libfido2/regress/assert.c | 50 +++++- contrib/libfido2/regress/cred.c | 18 ++- contrib/libfido2/regress/eddsa.c | 2 +- contrib/libfido2/src/assert.c | 68 +++++++- contrib/libfido2/src/export.gnu | 3 + contrib/libfido2/src/export.llvm | 3 + contrib/libfido2/src/export.msvc | 3 + contrib/libfido2/src/fido.h | 4 + contrib/libfido2/src/fido/types.h | 2 + contrib/libfido2/src/webauthn.h | 177 +++++++++++++++++++-- contrib/libfido2/src/winhello.c | 63 +++++++- contrib/libfido2/tools/assert_get.c | 19 ++- contrib/libfido2/tools/cred_make.c | 20 ++- contrib/libfido2/tools/extern.h | 19 +-- contrib/libfido2/tools/fido2-assert.c | 4 +- contrib/libfido2/tools/fido2-cred.c | 4 +- contrib/libfido2/udev/70-u2f.rules | 32 +++- contrib/libfido2/udev/fidodevs | 16 +- contrib/libfido2/windows/build.ps1 | 1 + contrib/libfido2/windows/const.ps1 | 16 +- lib/libfido2/Makefile | 2 +- 63 files changed, 1646 insertions(+), 124 deletions(-) diff --git a/contrib/libfido2/.actions/build-bsd b/contrib/libfido2/.actions/build-bsd new file mode 100755 index 000000000000..66fc4e3ba281 --- /dev/null +++ b/contrib/libfido2/.actions/build-bsd @@ -0,0 +1,97 @@ +#!/bin/sh -eux + +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +BASE_URL="https://builds.sr.ht" +MANIFEST="$(mktemp)" +LOGFILE="$(mktemp)" +trap '[ -f "${LOGFILE}" ] && cat -- "${LOGFILE}"' EXIT + +# construct the sourcehut build manifest +cat > "${MANIFEST}" <<- EOF +image: ${IMAGE} +packages: + - cmake + - llvm + - pcsc-lite +EOF + +case "${IMAGE}" in + freebsd*) +cat >> "${MANIFEST}" <<- EOF + - libcbor + - pkgconf +EOF + ;; +esac + +cat >> "${MANIFEST}" <<- EOF +sources: + - ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}#$(git rev-parse HEAD) +tasks: + - build: | + if [ "\$(uname)" = "OpenBSD" ]; then + SUDO="doas -u root" + else + SUDO=sudo + fi + SCAN="/usr/local/bin/scan-build --use-cc=/usr/bin/cc --status-bugs" + cd libfido2 + for T in Debug Release; do + mkdir build-\$T + (cd build-\$T && \${SCAN} cmake -DCMAKE_BUILD_TYPE=\$T ..) + \${SCAN} make -j"\$(sysctl -n hw.ncpu)" -C build-\$T + make -C build-\$T regress + \${SUDO} make -C build-\$T install + done +EOF + +q() { + curl \ + --silent \ + --oauth2-bearer "${SOURCEHUT_TOKEN}" \ + --header "Content-Type: application/json" \ + --data @- -- \ + "${BASE_URL}/query" \ + | tee -a -- "${LOGFILE}" +} + +submit_job() { + local manifest="$1" + jq \ + --compact-output --null-input \ + '{ query: $body, variables: { var: $var } }' \ + --arg body 'mutation($var: String!) { submit(manifest: $var) { id } }' \ + --rawfile var "${manifest}" \ + | q \ + | jq --exit-status --raw-output '.data.submit.id' +} + +job_status() { + local id="$1" + jq \ + --compact-output --null-input \ + '{ query: $body, variables: { var: $var } }' \ + --arg body 'query($var: Int!) { job(id: $var) { status } }' \ + --argjson var "${id}" \ + | q \ + | jq --exit-status --raw-output '.data.job.status' +} + +JOB_ID="$(submit_job "${MANIFEST}")" || exit 1 +[ -z "${JOB_ID}" ] && exit 1 +echo "Job '${JOB_ID}' running at ${BASE_URL}/~yubico-libfido2/job/${JOB_ID}" + +while true; do + JOB_STATUS="$(job_status "${JOB_ID}")" || exit 1 + case "${JOB_STATUS}" in + SUCCESS) exit 0;; + FAILED) exit 1;; + PENDING|QUEUED|RUNNING) ;; + *) exit 1;; + esac + sleep 60 +done diff --git a/contrib/libfido2/.actions/build-linux-clang b/contrib/libfido2/.actions/build-linux-clang new file mode 100755 index 000000000000..ba20f1279ec9 --- /dev/null +++ b/contrib/libfido2/.actions/build-linux-clang @@ -0,0 +1,21 @@ +#!/bin/sh -eux + +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +${CC} --version +SCAN=scan-build${CC#clang} + +# Check exports. +(cd src && ./diff_exports.sh) + +# Build, analyze, and install libfido2. +for T in Debug Release; do + mkdir build-$T + (cd build-$T && ${SCAN} --use-cc="${CC}" cmake -DCMAKE_BUILD_TYPE=$T ..) + ${SCAN} --use-cc="${CC}" --status-bugs make -j"$(nproc)" -C build-$T + make -C build-$T regress + sudo make -C build-$T install +done diff --git a/contrib/libfido2/.actions/build-linux-gcc b/contrib/libfido2/.actions/build-linux-gcc new file mode 100755 index 000000000000..cd42b5eb7bed --- /dev/null +++ b/contrib/libfido2/.actions/build-linux-gcc @@ -0,0 +1,23 @@ +#!/bin/sh -eux + +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +${CC} --version + +# Build and install libfido2. +for T in Debug Release; do + mkdir build-$T + (cd build-$T && cmake -DCMAKE_BUILD_TYPE=$T ..) + make -j"$(nproc)" -C build-$T + make -C build-$T regress + sudo make -C build-$T install +done + +# Check udev/fidodevs. +[ -x "$(which update-alternatives)" ] && { + sudo update-alternatives --set awk "$(which original-awk)" +} +udev/check.sh udev/fidodevs diff --git a/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc b/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc new file mode 100755 index 000000000000..a89578da0886 --- /dev/null +++ b/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc @@ -0,0 +1,58 @@ +#!/bin/sh -eux + +# Copyright (c) 2022-2023 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +# XXX defining CC and cross-compiling confuses OpenSSL's build. +unset CC + +sudo mkdir /fakeroot +sudo chmod 755 /fakeroot + +cat << EOF > /tmp/mingw.cmake +SET(CMAKE_SYSTEM_NAME Windows) +SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc) +SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) +SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres) +SET(CMAKE_FIND_ROOT_PATH /fakeroot) +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +EOF + +# Build and install libcbor. +git clone --depth=1 https://github.com/pjk/libcbor -b v0.10.1 +cd libcbor +mkdir build +(cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \ + -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/fakeroot ..) +make -j"$(nproc)" -C build +sudo make -C build install +cd .. + +# Build and install OpenSSL 1.1.1w. +git clone --depth=1 https://github.com/openssl/openssl -b OpenSSL_1_1_1w +cd openssl +./Configure mingw --prefix=/fakeroot --openssldir=/fakeroot/openssl \ + --cross-compile-prefix=i686-w64-mingw32- +make -j"$(nproc)" +sudo make install_sw +cd .. + +# Build and install zlib. +git clone --depth=1 https://github.com/madler/zlib -b v1.3 +cd zlib +make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- +sudo make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- DESTDIR=/fakeroot \ + INCLUDE_PATH=/include LIBRARY_PATH=/lib BINARY_PATH=/bin install +cd .. + +# Build and install libfido2. +export PKG_CONFIG_PATH=/fakeroot/lib/pkgconfig +mkdir build +(cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \ + -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/fakeroot ..) +make -j"$(nproc)" -C build +sudo make -C build install diff --git a/contrib/libfido2/.actions/build-linux-openssl3-clang b/contrib/libfido2/.actions/build-linux-openssl3-clang new file mode 100755 index 000000000000..2383e51ad8f5 --- /dev/null +++ b/contrib/libfido2/.actions/build-linux-openssl3-clang @@ -0,0 +1,33 @@ +#!/bin/sh -eux + +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +${CC} --version +SCAN=scan-build${CC#clang} +FAKEROOT="$(mktemp -d)" + +# Check exports. +(cd src && ./diff_exports.sh) + +# Build and install OpenSSL 3.0.12. +git clone --branch openssl-3.0.12 \ + --depth=1 https://github.com/openssl/openssl +cd openssl +./Configure linux-x86_64-clang --prefix="${FAKEROOT}" \ + --openssldir="${FAKEROOT}/openssl" --libdir=lib +make install_sw +cd .. + +# Build, analyze, and install libfido2. +for T in Debug Release; do + mkdir build-$T + export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig" + (cd build-$T && ${SCAN} --use-cc="${CC}" \ + cmake -DCMAKE_BUILD_TYPE=$T ..) + ${SCAN} --use-cc="${CC}" --status-bugs make -C build-$T + make -C build-$T regress + sudo make -C build-$T install +done diff --git a/contrib/libfido2/.actions/build-linux-openssl3-gcc b/contrib/libfido2/.actions/build-linux-openssl3-gcc new file mode 100755 index 000000000000..344fc12bce8c --- /dev/null +++ b/contrib/libfido2/.actions/build-linux-openssl3-gcc @@ -0,0 +1,28 @@ +#!/bin/sh -eux + +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +${CC} --version +FAKEROOT="$(mktemp -d)" + +# Build and install OpenSSL 3.0.12. +git clone --branch openssl-3.0.12 \ + --depth=1 https://github.com/openssl/openssl +cd openssl +./Configure linux-x86_64 --prefix="${FAKEROOT}" \ + --openssldir="${FAKEROOT}/openssl" --libdir=lib +make install_sw +cd .. + +# Build and install libfido2. +for T in Debug Release; do + mkdir build-$T + export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig" + (cd build-$T && cmake -DCMAKE_BUILD_TYPE=$T ..) + make -j"$(nproc)" -C build-$T + make -C build-$T regress + sudo make -C build-$T install +done diff --git a/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc b/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc new file mode 100755 index 000000000000..3bbb141dad0d --- /dev/null +++ b/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc @@ -0,0 +1,59 @@ +#!/bin/sh -eux + +# Copyright (c) 2022-2023 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +# XXX defining CC and cross-compiling confuses OpenSSL's build. +unset CC + +sudo mkdir /fakeroot +sudo chmod 755 /fakeroot + +cat << EOF > /tmp/mingw.cmake +SET(CMAKE_SYSTEM_NAME Windows) +SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc) +SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) +SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres) +SET(CMAKE_FIND_ROOT_PATH /fakeroot) +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +EOF + +# Build and install libcbor. +git clone --depth=1 https://github.com/pjk/libcbor -b v0.10.1 +cd libcbor +mkdir build +(cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \ + -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/fakeroot ..) +make -j"$(nproc)" -C build +sudo make -C build install +cd .. + +# Build and install OpenSSL 3.0.11. +git clone --branch openssl-3.0.12 \ + --depth=1 https://github.com/openssl/openssl +cd openssl +./Configure mingw --prefix=/fakeroot --openssldir=/fakeroot/openssl \ + --cross-compile-prefix=i686-w64-mingw32- --libdir=lib +make -j"$(nproc)" +sudo make install_sw +cd .. + +# Build and install zlib. +git clone --depth=1 https://github.com/madler/zlib -b v1.3 +cd zlib +make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- +sudo make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- DESTDIR=/fakeroot \ + INCLUDE_PATH=/include LIBRARY_PATH=/lib BINARY_PATH=/bin install +cd .. + +# Build and install libfido2. +export PKG_CONFIG_PATH=/fakeroot/lib/pkgconfig +mkdir build +(cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \ + -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/fakeroot ..) +make -C build 2>&1 +sudo make -C build install diff --git a/contrib/libfido2/.actions/build-osx-clang b/contrib/libfido2/.actions/build-osx-clang new file mode 100755 index 000000000000..b4beea221315 --- /dev/null +++ b/contrib/libfido2/.actions/build-osx-clang @@ -0,0 +1,19 @@ +#!/bin/sh -eux + +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +export PKG_CONFIG_PATH="$(brew --prefix openssl@3.0)/lib/pkgconfig" +SCAN="$(brew --prefix llvm)/bin/scan-build" + +# Build, analyze, and install libfido2. +for T in Debug Release; do + mkdir build-$T + (cd build-$T && ${SCAN} cmake -DCMAKE_BUILD_TYPE=$T ..) + ${SCAN} --status-bugs make -j"$(sysctl -n hw.ncpu)" -C build-$T + make -C build-$T man_symlink_html + make -C build-$T regress + sudo make -C build-$T install +done diff --git a/contrib/libfido2/.actions/fuzz-linux b/contrib/libfido2/.actions/fuzz-linux new file mode 100755 index 000000000000..3f57ac40ff4b --- /dev/null +++ b/contrib/libfido2/.actions/fuzz-linux @@ -0,0 +1,93 @@ +#!/bin/sh -eux + +# Copyright (c) 2020-2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +LIBCBOR_URL="https://github.com/pjk/libcbor" +LIBCBOR_TAG="v0.10.2" +LIBCBOR_ASAN="address alignment bounds" +LIBCBOR_MSAN="memory" +OPENSSL_URL="https://github.com/openssl/openssl" +OPENSSL_TAG="openssl-3.0.12" +ZLIB_URL="https://github.com/madler/zlib" +ZLIB_TAG="v1.3" +ZLIB_ASAN="address alignment bounds undefined" +ZLIB_MSAN="memory" +FIDO2_ASAN="address bounds fuzzer-no-link implicit-conversion leak" +FIDO2_ASAN="${FIDO2_ASAN} pointer-compare pointer-subtract undefined" +FIDO2_MSAN="fuzzer-no-link memory" +COMMON_CFLAGS="-g2 -fno-omit-frame-pointer" +COMMON_CFLAGS="${COMMON_CFLAGS} -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" +UBSAN_OPTIONS="halt_on_error=1:print_stacktrace=1:strict_string_checks=1" +ASAN_OPTIONS="${UBSAN_OPTIONS}:detect_invalid_pointer_pairs=2:detect_leaks=1" +MSAN_OPTIONS="${UBSAN_OPTIONS}" + +case "$1" in +asan) + LIBCBOR_CFLAGS="-fsanitize=$(echo "${LIBCBOR_ASAN}" | tr ' ' ',')" + ZLIB_CFLAGS="-fsanitize=$(echo "${ZLIB_ASAN}" | tr ' ' ',')" + FIDO2_CFLAGS="-fsanitize=$(echo "${FIDO2_ASAN}" | tr ' ' ',')" + FIDO2_CFLAGS="${FIDO2_CFLAGS} -fsanitize-address-use-after-scope" + ;; +msan) + LIBCBOR_CFLAGS="-fsanitize=$(echo "${LIBCBOR_MSAN}" | tr ' ' ',')" + ZLIB_CFLAGS="-fsanitize=$(echo "${ZLIB_MSAN}" | tr ' ' ',')" + FIDO2_CFLAGS="-fsanitize=$(echo "${FIDO2_MSAN}" | tr ' ' ',')" + FIDO2_CFLAGS="${FIDO2_CFLAGS} -fsanitize-memory-track-origins" + ;; +*) + echo "unknown sanitiser \"$1\"" 1>&2 && exit 1 +esac + +${CC} --version +WORKDIR="${WORKDIR:-$(pwd)}" +FAKEROOT="${FAKEROOT:-$(mktemp -d)}" +cd "${FAKEROOT}" + +# libcbor +git clone --depth=1 "${LIBCBOR_URL}" -b "${LIBCBOR_TAG}" +cd libcbor +patch -p0 -s < "${WORKDIR}/fuzz/README" +mkdir build +(cd build && cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_FLAGS_DEBUG="${LIBCBOR_CFLAGS} ${COMMON_CFLAGS}" \ + -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX="${FAKEROOT}" \ + -DSANITIZE=OFF ..) +make VERBOSE=1 -j"$(nproc)" -C build all install +cd - + +# openssl +git clone --depth=1 "${OPENSSL_URL}" -b "${OPENSSL_TAG}" +cd openssl +./Configure linux-x86_64-clang "enable-$1" --prefix="${FAKEROOT}" \ + --openssldir="${FAKEROOT}/openssl" --libdir=lib +make install_sw +cd - + +# zlib +git clone --depth=1 "${ZLIB_URL}" -b "${ZLIB_TAG}" +cd zlib +CFLAGS="${ZLIB_CFLAGS}" LDFLAGS="${ZLIB_CFLAGS}" ./configure \ + --prefix="${FAKEROOT}" +make install +cd - + +# libfido2 +mkdir build +export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig" +(cd build && cmake -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_FLAGS_DEBUG="${FIDO2_CFLAGS} ${COMMON_CFLAGS}" -DFUZZ=ON \ + -DFUZZ_LDFLAGS="-fsanitize=fuzzer" "${WORKDIR}") +make -j"$(nproc)" -C build + +# fuzz +mkdir corpus +curl -s https://storage.googleapis.com/yubico-libfido2/corpus.tgz | + tar -C corpus -zxf - +export UBSAN_OPTIONS ASAN_OPTIONS MSAN_OPTIONS +for f in assert bio cred credman hid largeblob mgmt netlink pcsc; do + build/fuzz/fuzz_${f} -use_value_profile=1 -reload=30 -print_pcs=1 \ + -print_funcs=30 -timeout=10 -runs=1 corpus/fuzz_${f} +done diff --git a/contrib/libfido2/.actions/llvm.gpg b/contrib/libfido2/.actions/llvm.gpg new file mode 100644 index 000000000000..aa6b105aa3d7 --- /dev/null +++ b/contrib/libfido2/.actions/llvm.gpg @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.12 (GNU/Linux) + +mQINBFE9lCwBEADi0WUAApM/mgHJRU8lVkkw0CHsZNpqaQDNaHefD6Rw3S4LxNmM +EZaOTkhP200XZM8lVdbfUW9xSjA3oPldc1HG26NjbqqCmWpdo2fb+r7VmU2dq3NM +R18ZlKixiLDE6OUfaXWKamZsXb6ITTYmgTO6orQWYrnW6ckYHSeaAkW0wkDAryl2 +B5v8aoFnQ1rFiVEMo4NGzw4UX+MelF7rxaaregmKVTPiqCOSPJ1McC1dHFN533FY +Wh/RVLKWo6npu+owtwYFQW+zyQhKzSIMvNujFRzhIxzxR9Gn87MoLAyfgKEzrbbT +DhqqNXTxS4UMUKCQaO93TzetX/EBrRpJj+vP640yio80h4Dr5pAd7+LnKwgpTDk1 +G88bBXJAcPZnTSKu9I2c6KY4iRNbvRz4i+ZdwwZtdW4nSdl2792L7Sl7Nc44uLL/ +ZqkKDXEBF6lsX5XpABwyK89S/SbHOytXv9o4puv+65Ac5/UShspQTMSKGZgvDauU +cs8kE1U9dPOqVNCYq9Nfwinkf6RxV1k1+gwtclxQuY7UpKXP0hNAXjAiA5KS5Crq +7aaJg9q2F4bub0mNU6n7UI6vXguF2n4SEtzPRk6RP+4TiT3bZUsmr+1ktogyOJCc +Ha8G5VdL+NBIYQthOcieYCBnTeIH7D3Sp6FYQTYtVbKFzmMK+36ERreL/wARAQAB +tD1TeWx2ZXN0cmUgTGVkcnUgLSBEZWJpYW4gTExWTSBwYWNrYWdlcyA8c3lsdmVz +dHJlQGRlYmlhbi5vcmc+iQI4BBMBAgAiBQJRPZQsAhsDBgsJCAcDAgYVCAIJCgsE +FgIDAQIeAQIXgAAKCRAVz00Yr090Ibx+EADArS/hvkDF8juWMXxh17CgR0WZlHCC +9CTBWkg5a0bNN/3bb97cPQt/vIKWjQtkQpav6/5JTVCSx2riL4FHYhH0iuo4iAPR +udC7Cvg8g7bSPrKO6tenQZNvQm+tUmBHgFiMBJi92AjZ/Qn1Shg7p9ITivFxpLyX +wpmnF1OKyI2Kof2rm4BFwfSWuf8Fvh7kDMRLHv+MlnK/7j/BNpKdozXxLcwoFBmn +l0WjpAH3OFF7Pvm1LJdf1DjWKH0Dc3sc6zxtmBR/KHHg6kK4BGQNnFKujcP7TVdv +gMYv84kun14pnwjZcqOtN3UJtcx22880DOQzinoMs3Q4w4o05oIF+sSgHViFpc3W +R0v+RllnH05vKZo+LDzc83DQVrdwliV12eHxrMQ8UYg88zCbF/cHHnlzZWAJgftg +hB08v1BKPgYRUzwJ6VdVqXYcZWEaUJmQAPuAALyZESw94hSo28FAn0/gzEc5uOYx +K+xG/lFwgAGYNb3uGM5m0P6LVTfdg6vDwwOeTNIExVk3KVFXeSQef2ZMkhwA7wya +KJptkb62wBHFE+o9TUdtMCY6qONxMMdwioRE5BYNwAsS1PnRD2+jtlI0DzvKHt7B +MWd8hnoUKhMeZ9TNmo+8CpsAtXZcBho0zPGz/R8NlJhAWpdAZ1CmcPo83EW86Yq7 +BxQUKnNHcwj2ebkCDQRRPZQsARAA4jxYmbTHwmMjqSizlMJYNuGOpIidEdx9zQ5g +zOr431/VfWq4S+VhMDhs15j9lyml0y4ok215VRFwrAREDg6UPMr7ajLmBQGau0Fc +bvZJ90l4NjXp5p0NEE/qOb9UEHT7EGkEhaZ1ekkWFTWCgsy7rRXfZLxB6sk7pzLC +DshyW3zjIakWAnpQ5j5obiDy708pReAuGB94NSyb1HoW/xGsGgvvCw4r0w3xPStw +F1PhmScE6NTBIfLliea3pl8vhKPlCh54Hk7I8QGjo1ETlRP4Qll1ZxHJ8u25f/ta +RES2Aw8Hi7j0EVcZ6MT9JWTI83yUcnUlZPZS2HyeWcUj+8nUC8W4N8An+aNps9l/ +21inIl2TbGo3Yn1JQLnA1YCoGwC34g8QZTJhElEQBN0X29ayWW6OdFx8MDvllbBV +ymmKq2lK1U55mQTfDli7S3vfGz9Gp/oQwZ8bQpOeUkc5hbZszYwP4RX+68xDPfn+ +M9udl+qW9wu+LyePbW6HX90LmkhNkkY2ZzUPRPDHZANU5btaPXc2H7edX4y4maQa +xenqD0lGh9LGz/mps4HEZtCI5CY8o0uCMF3lT0XfXhuLksr7Pxv57yue8LLTItOJ +d9Hmzp9G97SRYYeqU+8lyNXtU2PdrLLq7QHkzrsloG78lCpQcalHGACJzrlUWVP/ +fN3Ht3kAEQEAAYkCHwQYAQIACQUCUT2ULAIbDAAKCRAVz00Yr090IbhWEADbr50X +OEXMIMGRLe+YMjeMX9NG4jxs0jZaWHc/WrGR+CCSUb9r6aPXeLo+45949uEfdSsB +pbaEdNWxF5Vr1CSjuO5siIlgDjmT655voXo67xVpEN4HhMrxugDJfCa6z97P0+ML +PdDxim57uNqkam9XIq9hKQaurxMAECDPmlEXI4QT3eu5qw5/knMzDMZj4Vi6hovL +wvvAeLHO/jsyfIdNmhBGU2RWCEZ9uo/MeerPHtRPfg74g+9PPfP6nyHD2Wes6yGd +oVQwtPNAQD6Cj7EaA2xdZYLJ7/jW6yiPu98FFWP74FN2dlyEA2uVziLsfBrgpS4l +tVOlrO2YzkkqUGrybzbLpj6eeHx+Cd7wcjI8CalsqtL6cG8cUEjtWQUHyTbQWAgG +5VPEgIAVhJ6RTZ26i/G+4J8neKyRs4vz+57UGwY6zI4AB1ZcWGEE3Bf+CDEDgmnP +LSwbnHefK9IljT9XU98PelSryUO/5UPw7leE0akXKB4DtekToO226px1VnGp3Bov +1GBGvpHvL2WizEwdk+nfk8LtrLzej+9FtIcq3uIrYnsac47Pf7p0otcFeTJTjSq3 +krCaoG4Hx0zGQG2ZFpHrSrZTVy6lxvIdfi0beMgY6h78p6M9eYZHQHc02DjFkQXN +bXb5c6gCHESH5PXwPU4jQEE7Ib9J6sbk7ZT2Mw== +=j+4q +-----END PGP PUBLIC KEY BLOCK----- diff --git a/contrib/libfido2/.actions/setup_clang b/contrib/libfido2/.actions/setup_clang new file mode 100755 index 000000000000..be06709c88b6 --- /dev/null +++ b/contrib/libfido2/.actions/setup_clang @@ -0,0 +1,17 @@ +#!/bin/sh -eu + +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +CC="$1" +APT="http://apt.llvm.org" +CODENAME="$(lsb_release -cs)" +VERSION="${CC#*-}" +apt-get install -q -y software-properties-common +apt-key add ./.actions/llvm.gpg +add-apt-repository \ + "deb ${APT}/${CODENAME}/ llvm-toolchain-${CODENAME}-${VERSION} main" +apt-get update -q +apt-get install -q -y "${CC}" "clang-tools-${VERSION}" diff --git a/contrib/libfido2/.gitattributes b/contrib/libfido2/.gitattributes new file mode 100644 index 000000000000..998f601da4d0 --- /dev/null +++ b/contrib/libfido2/.gitattributes @@ -0,0 +1 @@ +.* export-ignore diff --git a/contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md b/contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000000..6e88c1ff8006 --- /dev/null +++ b/contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,80 @@ +--- +name: Bug report +labels: 'bug report' +about: Report a bug in libfido2 + +--- + + + +**What version of libfido2 are you using?** + +**What operating system are you running?** + +**What application are you using in conjunction with libfido2?** + +**How does the problem manifest itself?** + +**Is the problem reproducible?** + +**What are the steps that lead to the problem?** + +**Does the problem happen with different authenticators?** + + + +**Please include the output of `fido2-token -L`.** + +
+fido2-token -L +
+
+$ fido2-token -L
+
+
+
+ +**Please include the output of `fido2-token -I`.** + +
+fido2-token -I +
+
+$ fido2-token -I <device>
+
+
+
+ + + +**Please include the output of `FIDO_DEBUG=1`.** + +
+FIDO_DEBUG=1 +
+
+$ export FIDO_DEBUG=1
+$ <command1>
+$ <command2>
+(...)
+$ <commandn>
+
+
+
diff --git a/contrib/libfido2/.github/ISSUE_TEMPLATE/config.yml b/contrib/libfido2/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000000..3ecb227ffeb0 --- /dev/null +++ b/contrib/libfido2/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Feature Request + url: https://github.com/Yubico/libfido2/discussions/new + about: Share ideas for new features + - name: Ask a question about libfido2 + url: https://github.com/Yubico/libfido2/discussions/new + about: Ask the community for help diff --git a/contrib/libfido2/.github/workflows/alpine_builds.yml b/contrib/libfido2/.github/workflows/alpine_builds.yml new file mode 100644 index 000000000000..c6d826f39835 --- /dev/null +++ b/contrib/libfido2/.github/workflows/alpine_builds.yml @@ -0,0 +1,39 @@ +# Copyright (c) 2022-2023 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +name: alpine + +on: + pull_request: + branches: + - main + push: + branches: + - main + - '*-ci' + +jobs: + build: + runs-on: ubuntu-20.04 + container: alpine:latest + strategy: + fail-fast: false + matrix: + cc: [ gcc, clang ] + steps: + - name: dependencies + run: | + apk -q update + apk add build-base clang clang-analyzer cmake coreutils eudev-dev + apk add git linux-headers openssl-dev sudo zlib-dev pcsc-lite-dev \ + libcbor-dev + - name: fix permissions on workdir + run: chown root:wheel "${GITHUB_WORKSPACE}" + - name: checkout libfido2 + uses: actions/checkout@v4 + - name: build libfido2 + env: + CC: ${{ matrix.cc }} + run: ./.actions/build-linux-${CC} diff --git a/contrib/libfido2/.github/workflows/bsd_builds.yml b/contrib/libfido2/.github/workflows/bsd_builds.yml new file mode 100644 index 000000000000..366ea2141aca --- /dev/null +++ b/contrib/libfido2/.github/workflows/bsd_builds.yml @@ -0,0 +1,32 @@ +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +name: bsd + +on: + push: + branches: + - main + - '*-ci' + +jobs: + build: + if: github.repository == 'Yubico/libfido2' + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + image: [freebsd/13.x, openbsd/7.2] + steps: + - uses: actions/checkout@v4 + - name: dependencies + run: | + sudo apt -q update + sudo apt install -q -y curl jq + - name: build + env: + IMAGE: ${{ matrix.image }} + SOURCEHUT_TOKEN: ${{ secrets.SOURCEHUT_TOKEN }} + run: ./.actions/build-bsd diff --git a/contrib/libfido2/.github/workflows/cifuzz_oss.yml b/contrib/libfido2/.github/workflows/cifuzz_oss.yml new file mode 100644 index 000000000000..556d5ad36f7c --- /dev/null +++ b/contrib/libfido2/.github/workflows/cifuzz_oss.yml @@ -0,0 +1,46 @@ +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +name: cifuzz + +on: + pull_request: + branches: + - main + push: + branches: + - main + - '*-ci' + +jobs: + fuzzing: + if: github.repository == 'Yubico/libfido2' + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + sanitizer: [address, undefined, memory] + steps: + - name: build fuzzers (${{ matrix.sanitizer }}) + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'libfido2' + language: c + sanitizer: ${{ matrix.sanitizer }} + dry-run: false + - name: run fuzzers (${{ matrix.sanitizer }}) + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'libfido2' + language: c + sanitizer: ${{ matrix.sanitizer }} + fuzz-seconds: 600 + dry-run: false + - name: upload crash + uses: actions/upload-artifact@v3 + if: failure() + with: + name: ${{ matrix.sanitizer }}-artifacts + path: ./out/artifacts diff --git a/contrib/libfido2/.github/workflows/codeql-analysis.yml b/contrib/libfido2/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000000..a3a8d54d2daa --- /dev/null +++ b/contrib/libfido2/.github/workflows/codeql-analysis.yml @@ -0,0 +1,42 @@ +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +name: "codeql" + +on: + pull_request: + branches: + - main + push: + branches: + - main + - '*-ci' + schedule: + - cron: '0 0 * * 0' + +permissions: + security-events: write + +jobs: + codeql-build: + if: github.repository == 'Yubico/libfido2' + runs-on: ubuntu-22.04 + steps: + - name: checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + - name: init codeql + uses: github/codeql-action/init@v2 + - name: build + env: + CC: gcc + run: | + sudo apt -q update + sudo apt install -q -y libcbor-dev libudev-dev libz-dev original-awk \ + libpcsclite-dev + ./.actions/build-linux-gcc + - name: perform codeql analysis + uses: github/codeql-action/analyze@v2 diff --git a/contrib/libfido2/.github/workflows/cygwin_builds.yml b/contrib/libfido2/.github/workflows/cygwin_builds.yml new file mode 100644 index 000000000000..d8146c54904e --- /dev/null +++ b/contrib/libfido2/.github/workflows/cygwin_builds.yml @@ -0,0 +1,30 @@ +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +name: cygwin + +on: + pull_request: + branches: + - main + push: + branches: + - main + - '*-ci' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ windows-2022 ] + arch: [ x64 ] + config: [ "Debug", "Release" ] + steps: + - uses: actions/checkout@v4 + - name: build + run: | + .\windows\cygwin.ps1 -Config ${{ matrix.config }} diff --git a/contrib/libfido2/.github/workflows/linux_builds.yml b/contrib/libfido2/.github/workflows/linux_builds.yml new file mode 100644 index 000000000000..ec911cb92d92 --- /dev/null +++ b/contrib/libfido2/.github/workflows/linux_builds.yml @@ -0,0 +1,57 @@ +# Copyright (c) 2022 Yubico AB. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +name: linux + +on: *** 2233 LINES SKIPPED *** From nobody Thu Aug 1 16:07:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYky2138z5Sysf; Thu, 01 Aug 2024 16:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYkx6RG5z4bcg; Thu, 1 Aug 2024 16:07:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ug9qVoRPzeG6QOc6zNtcleh/71bNmKaePaYeDKMwXaE=; b=txK0LaKuYybNq0oNS+v1gDhmnZXtvcV5J9UXu8pjjOUqlCl5L2++YXdfaSluknYL3eh23c VKRr7sosh+MRZP/sNTf3HlWC8dM1bMsUGkC7IsHhRpw2FSBheAD8etO0lWQ53DiAsbZIxo oBypyndcJQN3BtfBtheTqjChjfdWG2B1TqnbSvFnDUfMPS+pNFEKLPYrjf63ddyYcmugKF 8yx5V/+iBo6RSHmZom/FEfl5oJHQS3xm6znjyVX29Ln5d7EeA+GG2tgFEo/+YBErlO8kxY B3GzQU/kUYbrDqoh/eGinfYXNYHSJcKNpL+DiBMC2D6skRTt+NQTgStfatAktA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722528441; a=rsa-sha256; cv=none; b=CPF0JmOg7PLzE/zX/ENOuq1vvYlGY58pfS6mUsDh80KOT3HmNUyrc0zwNnx1XmmM7BbDBT hndACF/XOwG3bcxDUXGarplLvHIA8xL+15BzBt4u1+U5eE7KkCQvbu6p+bdIlwRRq4ziAG ZnWgGYpBP6zvNxzqtkGSDu9YwSw2FMBsH6Tx8Wxx+4jlYejEdz/2ZgWIA9tkDQg0nCnK2q /eQfVoYGDVFXe+fbvCJQ5lXUKI2H0wuVKwx0jdcp3kNUjywScepELXvrQ+SjjkgZZ1WmHC OcK+vKffMG0DONVwrA9JV25YmjjdjZo4YEbYDBaOQY0uh/Vg6lYZka75ubXs7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ug9qVoRPzeG6QOc6zNtcleh/71bNmKaePaYeDKMwXaE=; b=wpC7bkC5cFxNcFmXujiPP1NAEicByL6jhpyArfGz1ohe6TP/BaNtzQV/BDMDuhsfyqtgS2 Sw39lhSaPrChft+3dPju1fi5oMwMOZB1H12JhzsuRMKIyBqsf4s0I7XTL5/KtF0z/tFTbi GOSpovi3ypx7W56jpwWiAz/Pg96FDbgqfv9CBxxsBu34BxsOzg2kPHp/3jqSBScc6gK/fk M6NUVhltrp4Pk3ZGXwy41IkWTybA9omYhMMuSk2EFynbYOPku4pyRFeyP58crsoc80eMbw fVzH6+in7w71b7x9/hZnNgSsUwk8zu8cLCYdYmjlQsEdthpqIcqwOQq6QkZIWg== 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 4WZYkx62pNzr98; Thu, 1 Aug 2024 16:07:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471G7L7G079067; Thu, 1 Aug 2024 16:07:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471G7Lsf079064; Thu, 1 Aug 2024 16:07:21 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:07:21 GMT Message-Id: <202408011607.471G7Lsf079064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a357bacb86a0 - stable/14 - madt: print CPU APIC ID as signed int List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a357bacb86a0ad2a88dec01df6fa07fc29f956de Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a357bacb86a0ad2a88dec01df6fa07fc29f956de commit a357bacb86a0ad2a88dec01df6fa07fc29f956de Author: Ed Maste AuthorDate: 2024-05-10 18:57:22 +0000 Commit: Ed Maste CommitDate: 2024-08-01 15:11:45 +0000 madt: print CPU APIC ID as signed int Instead of printing something like "MADT: Found CPU APIC ID 4294967295 ACPI ID 512: disabled" print the APIC ID as a singed int for a more user-friendly -1. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45158 (cherry picked from commit 0b272e0926b3c4b1961131119e22ed5791be7230) --- sys/x86/acpica/madt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index 200eec1fbb28..bff70b0fecfc 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -368,8 +368,8 @@ madt_add_cpu(u_int acpi_id, u_int apic_id, u_int flags) * MP code figure out which CPU is the BSP on its own. */ if (bootverbose) - printf("MADT: Found CPU APIC ID %u ACPI ID %u: %s\n", - apic_id, acpi_id, flags & ACPI_MADT_ENABLED ? + printf("MADT: Found CPU APIC ID %d ACPI ID %u: %s\n", + (int)apic_id, acpi_id, flags & ACPI_MADT_ENABLED ? "enabled" : "disabled"); if (!(flags & ACPI_MADT_ENABLED)) return; From nobody Thu Aug 1 16:11:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYqY5DYQz5T0jg; Thu, 01 Aug 2024 16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYqY4knqz4fHh; Thu, 1 Aug 2024 16: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=1722528681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBiKQp637oH+cssm5U/ZQikbpuGi9IBWkaFr8LTBFOE=; b=NcMk0c/HY5I987iwbSqaJTYonaHlJ2PTxuo4BXIBJERB4O+864hpr5Zc9NCJAn/N3zijor kK0vaAKC5nMUVrd9OLUV60D+PqdfAenMjkVcBR1qfH0T6h1u8T4G502WuWpmzt+smm1wvu W0JLrRHJrEt4T3uSfoJERfyRoZHtLd2BFIMyXcHIEdIXAmxH97pRMIYmEPV9StPjRLoL7S X2eYiMDXwSXGopICacXdff/foMKB2Oyf2etMQUwwoKwG/PsWRGamfd04nrb+7nKYy3Z0w1 fsAyD8MUUHETgMrMVnMzthWu+1l8Fv4tX7NeFCh/xOW/gFEXrmEKBv2ZIn2R0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722528681; a=rsa-sha256; cv=none; b=w5u40g0FyEd/atpi8KBnk8LrfnVxDt0FNfQPPcRw965TmSQNyhz0GNiMxwhIp7OBjp8ZVH orXkm8iHPhx0ioNq315LmahI9beKBtfc60i/OFV5ddnmGXPjFJ/fQV69bAdwAhj6SDvMag tkeNsSqqCfbKmjDk+Bw3Cc7UEbGtx3J1hxmEh/vUAn3G5c+CflWLC6OeOnVnxOnBkN2iAb vhr1futeM6yMylfoA3ErNAsDYvoyTQwwGYbPHBmDN8MojMZHVlYVL5V0s0kgVN956m06Ab USa85TfZ5lBggX/mZ/KySzMiJvPMHR14em8xc+G78j6h9F7td2BJxeWwcRUGyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBiKQp637oH+cssm5U/ZQikbpuGi9IBWkaFr8LTBFOE=; b=q4LZv7RfyaosvDR2rV/zHHJYxapzpjzxH6wNEsECcecSiztxKmu4Libn1PSNBgedR1je1G lZfwZpLdVYNd9hkPMkgY2YWdgzM1ZFA7WbR/i1Fkd+z+DfUvON5AO9ainvhEuhOntg4Xzu XnjRqokASkCOYkG3m9syaLBFpZ02ixy2LoaX8EohFRnF6w7PxPnjlUrt1TGxiQCdAkHuRf yViQWPYB3//6tXF29XQcn9ppQNEJx+eru+VRVUztRJgV0c+J4JHS1yiZhbVs79BhCKG9kv DlomE0ZcFOvhAKdGIPzBRjchzREp/kYpSxlJ42I0+wMBLixgsNJfiJEH+9ERVQ== 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 4WZYqY4LWYzr6q; Thu, 1 Aug 2024 16:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GBLSq092773; Thu, 1 Aug 2024 16:11:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GBL2A092770; Thu, 1 Aug 2024 16:11:21 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:11:21 GMT Message-Id: <202408011611.471GBL2A092770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 1f645823e0ea - stable/14 - etcupdate(8): improve phrasing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1f645823e0ea70d606853fd9043eae1729e94313 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1f645823e0ea70d606853fd9043eae1729e94313 commit 1f645823e0ea70d606853fd9043eae1729e94313 Author: Ed Maste AuthorDate: 2024-07-16 01:44:11 +0000 Commit: Ed Maste CommitDate: 2024-08-01 16:10:26 +0000 etcupdate(8): improve phrasing Reported by: igor(1) (cherry picked from commit afd67a1677999b0f9d82d29bfd7c767f665e76e8) --- usr.sbin/etcupdate/etcupdate.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index 82c36fc9cb68..5eb2aa644037 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -485,7 +485,7 @@ as additional parameters to when building a .Dq current tree. -This can be used for to set the +This can be used to set the .Dv TARGET or .Dv TARGET_ARCH From nobody Thu Aug 1 16:11:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYqZ6Gkbz5T0V6; Thu, 01 Aug 2024 16:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYqZ5jxtz4f8M; Thu, 1 Aug 2024 16:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M11Df93j0EPwOdW0faSfkEdk7LmCHBzufetCe+xvsBM=; b=njLpJxxMgvY3McWfbOXCZpJ8wkYydt7UCYUcNMG2hmQeHHZ0EcY1EMLer3goGZAXhlolJL fkdHBXOtvF+5WCWAcghTkR+AM/2Cj2+YA9BXuzj/XQIMUrgZSk/3+FOZumkw9CSZI/9mqL aGrdLXQCVDEVhEUVfwtOsOcqfiFufdj27RiDyG0xLTFCaBEUlGTQxs31nlH2tFieVWZV4l jT2aOP+3Y0zA/Kp5VucPL0Y2hTUa9etiX6JCrK6UT17mn2YRcftrkuNQPa80lHTEAzqbW8 P/5g7NSxJM+p+Y5fA4CwmDpScSTWH3bAk35s5w625b8XwgicHs4qMhLPf2f58A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722528682; a=rsa-sha256; cv=none; b=cEWuF5ZKVvQJ3zi8jOvkjEuHjYAWcKX5qIcbH+Qb7RkK8cWpTAP9c1wiC/CVd+R7Q8zcJl ht0UdGtkDXxxBs7Sf1fBip+QfpAGZCNzaNvFgrT6KiXIqPYIqPNja53pxHxe9JOWr3WcYw 9HKQWaezUXFzoz7ZX5gINDqogHYjvZBbMAef0wia1qAr0BNvN3RMRehSTSWm0ze+mnfkl5 /i/BkLEhyIgI+GCVYqkJCW9UbJhsso+qSknAa/V2wsKBxW57+nPf7ZL2G54HS3ywhMnJpf Mi14y7F+gpZgvzid4s9/+Z9+Z71/4/8r3WQpUq3ICdYJIvPEsXJje6kRIJjwOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M11Df93j0EPwOdW0faSfkEdk7LmCHBzufetCe+xvsBM=; b=T1/7v3bAu6ISLO7nAUEOgEtsV2NScnpbcskbq8xKtqDrkMtjuv+mmWop3KSDSgCeoscA6D 3EhDgb3cDSg7vzChfa4SMYx71uKnLodn8CyvXzxsnhIdhX/zrFs5FQ/N48RNLZyPLwc5hc pPsIxc0vA/wUzbOp3PSgsLK8Uwdz34Udc+sxgdUdVzDBHvOek8EYQc4ats03nTKVA89XxK 2+KycMblMIwnB0r7gDhdndo/e5oBFq1+EdTSKpdo5eD0pUQnpYoUfjCQJQfD3lXh1KQua0 MoxuJZPtHX2uf4i9DBrh7tMz6NZeud7rxKIxS9fcR5/NVZqHYM6yYiuRkvPU9g== 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 4WZYqZ5Htxzrb0; Thu, 1 Aug 2024 16:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GBMrs092821; Thu, 1 Aug 2024 16:11:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GBMnF092818; Thu, 1 Aug 2024 16:11:22 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:11:22 GMT Message-Id: <202408011611.471GBMnF092818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 35957d27eab4 - stable/14 - iichid: Soften "Interrupt setup failed" message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 35957d27eab4eea77b0daf70b2ee5f636d69a484 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=35957d27eab4eea77b0daf70b2ee5f636d69a484 commit 35957d27eab4eea77b0daf70b2ee5f636d69a484 Author: Ed Maste AuthorDate: 2024-07-23 17:37:15 +0000 Commit: Ed Maste CommitDate: 2024-08-01 16:10:26 +0000 iichid: Soften "Interrupt setup failed" message Users may interpret the message as a possible hardware error, but the issue is in fact unimplemented functionality. Reword the message to avoid implying it is an error. Reviewed by: wulf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46092 (cherry picked from commit 0ac6cc3fd7473a7a8596fa73322a67fc1d78df53) --- sys/dev/iicbus/iichid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 222f20842a04..1e0dac2ee5dd 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -1154,7 +1154,7 @@ iichid_attach(device_t dev) if (sc->irq_res == NULL || error != 0) { #ifdef IICHID_SAMPLING device_printf(sc->dev, - "Interrupt setup failed. Fallback to sampling\n"); + "Using sampling mode\n"); sc->sampling_rate_slow = IICHID_SAMPLING_RATE_SLOW; #else device_printf(sc->dev, "Interrupt setup failed\n"); From nobody Thu Aug 1 16:11:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYqc45sXz5T0jk; Thu, 01 Aug 2024 16:11:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYqc0Zb3z4fKm; Thu, 1 Aug 2024 16:11:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uuh2tGpCPyIrQ1ABhHpoQ4oo+CfzeISmaDeN1XOgOvM=; b=G9dKkUMnI4yWp89pmrVlyM7WONtdE8YXMNSE4/Uwmm5jr3L+pIEk1xvybQu5I3ruGsroLs ZxweN1XCnpz+h/ZKG2hUpT/ZuKqG2LzCb3Lk8MgrPmxAPWa6oesksaImjc95nJ+FlyVKnH w9ALyFviiMfrbaqkHFMHuidpPdC68uqEdTy6ID1gkMkvxWx9igSGL5lzv+odx3eAksMcGV nRbH1ZxylDmi5dQ7SSkjpPGgCHGa43EyK5XT9rBtUKfqOW+SsQdJ9SCFJg4R3n4ddkoxhF Jao3ox91Nn7nE9vl0v2zJ7eMW2OBJZD64X9nLpWO3OyKbzYdImneXU7stQQZBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722528684; a=rsa-sha256; cv=none; b=vZa+1rqmJdD9GTxRb0mktNHp9i9MZPZXkUO0qE4xC38v3z5EtotGYvzAassVx6QN25JFRS azr8BSXEhfYlneqnaxM+gXJvm4DIwUp97h5v5Cx2yp+zDb52kKl8Gd9DJaDeb1kM4u0X/g iw8w3Ihg+27Xa3mJTEYbiN/3Fw11xGxWDb01pRzehPHpGMyk6jzWSrSPoyCDjVi4Ujt/2e natnP3dllVLyi7/VpyRgPfKmv+Tois8IbBiz38dSEiTceVNMLbczO1vfBFXUSBrcxnhiuT cRf7v/Qfsst0p+qj+WoMYFNmvvoohXXh0YNTUCzuYEaYzn8VDWGMc/JQ/B4XGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722528684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uuh2tGpCPyIrQ1ABhHpoQ4oo+CfzeISmaDeN1XOgOvM=; b=xX7P/O5zUtgMETdzVytsF0cLbfO7wwudRkVz/q/IkT6nOIJa+1+G1u+/eXHKdmH6C/cArp l8Wb7isxkGTGAXxqZEBYA0FLq1YiF/oUh0QAH4piZiembk+a6XmBhhM+DtRnr431b/YtA0 lI/GywaOj5s/inS8WqnVWzaNorD56PpGO5a2HeJ7NxOKVwF09ArTRY3KbOIsVJ7OLrLrng yGpcnqeqcI2N0roVRJuHUsJr4XxgdSL0QR7uY+JnWuLrEt3FRG+JCEuJzrCEazJk9Hp8nx XOwAkw1lNezfUC/WL+yw48D8wYy4rP38VmSWSQF4RMFx+gmjW9JLG7MCdN7s/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 4WZYqb6MDqzr9L; Thu, 1 Aug 2024 16:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GBNQ6092886; Thu, 1 Aug 2024 16:11:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GBNEl092883; Thu, 1 Aug 2024 16:11:23 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:11:23 GMT Message-Id: <202408011611.471GBNEl092883@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 34f7ebd56319 - stable/14 - vt/sc: retire logic to select vt(4) by default for UEFI boot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 34f7ebd56319c909f6b05ce0273b688074345c66 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=34f7ebd56319c909f6b05ce0273b688074345c66 commit 34f7ebd56319c909f6b05ce0273b688074345c66 Author: Ed Maste AuthorDate: 2024-05-24 21:36:09 +0000 Commit: Ed Maste CommitDate: 2024-08-01 16:10:26 +0000 vt/sc: retire logic to select vt(4) by default for UEFI boot We previously defaulted to using sc(4) with a special case to prefer vt(4) when booted via UEFI. As vt(4) is now always the default we can simplify this. Reviewed by: imp, kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45356 (cherry picked from commit 9b1de7e4844d951a7d7335cbde75a86a2380e220) --- sys/amd64/amd64/machdep.c | 9 --------- sys/kern/kern_cons.c | 18 ------------------ sys/sys/cons.h | 1 - 3 files changed, 28 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index ea440f46a12f..f5c49c6ca243 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1465,15 +1465,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) r_idt.rd_base = (long) idt; lidt(&r_idt); - /* - * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) - * transition). - * Once bootblocks have updated, we can test directly for - * efi_systbl != NULL here... - */ - if (efi_boot) - vty_set_preferred(VTY_VT); - TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable); TUNABLE_INT_FETCH("machdep.mitigations.ibrs.disable", &hw_ibrs_disable); diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 24952561449b..2b28c51984e1 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -715,7 +715,6 @@ sysbeep(int pitch __unused, sbintime_t duration __unused) /* * Temporary support for sc(4) to vt(4) transition. */ -static unsigned vty_prefer; static char vty_name[16]; SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, vty_name, 0, "Console vty driver"); @@ -740,10 +739,6 @@ vty_enabled(unsigned vty) break; } #endif - if (vty_prefer != 0) { - vty_selected = vty_prefer; - break; - } #if defined(DEV_VT) vty_selected = VTY_VT; #elif defined(DEV_SC) @@ -758,16 +753,3 @@ vty_enabled(unsigned vty) } return ((vty_selected & vty) != 0); } - -void -vty_set_preferred(unsigned vty) -{ - - vty_prefer = vty; -#if !defined(DEV_SC) - vty_prefer &= ~VTY_SC; -#endif -#if !defined(DEV_VT) - vty_prefer &= ~VTY_VT; -#endif -} diff --git a/sys/sys/cons.h b/sys/sys/cons.h index 5ad85a516dc5..75dc66aa252f 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -145,7 +145,6 @@ int constty_clear(struct tty *tp); #define VTY_SC 0x01 #define VTY_VT 0x02 int vty_enabled(unsigned int); -void vty_set_preferred(unsigned int); #endif /* _KERNEL */ From nobody Thu Aug 1 16:16:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYxr510Hz5T0fJ; Thu, 01 Aug 2024 16:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYxr4NPxz4gSK; Thu, 1 Aug 2024 16:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Skpaka0IWCpg08LV2qy8Dz5484PCXwhFkA6cBPE4NYg=; b=aq3kqYiuvnWs2V8b6sZk1wuIp9RIfPgujqyG0JBkYHJN2kI14j2Y9j7kAM4FdhdN29Hapc RPyj0F6oQuiTscJMbdnvw72h8nWFlttnrfDAzpRHHmRQV4OqxanxdRkxqG+0Q5MFpI/783 QxhVuHfoZK1dAxkWU+65HGmUvYOkMrjqIs0tcsNymzMApSJpbMhaKnZhUgMpwo0OgyBxWI gkaD0noqraHWUmfyeyPz5Mp31B05FdrwisDQgYJMumSxVO8mz2nNZuVlFJ8ewbUaQADemO 9Ma1wETKM788XTuJU0VJfPTRkGLraIdvUtqv3zavsWeH8URoKPHLGdjL6BooTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722529008; a=rsa-sha256; cv=none; b=iSDQP/hQAI2mOXB0uVCIjdEKoWvlXknBj9hULqb5l6g3tQ5WTNUpJGAGeO0R9vOY5EarwX i2E5tpBpOc842Fvm45KrugRUaSsu9GuzWR88S77AwydceMehgoaq44OyxXtKlWM3Xiac5B yRJNQNs3YI5/QJ+bJOFzOynz6w+9YPqkzHQF36Az6vbLnwjcIIB/xPJxQR1JhOiM9quxhi /r/ORoCpZbh1Kk9Uwqe9CXAWrA3evTvtmG4fVhtlX2VdLhOdUId15zqHFhCQYYQRTaIcBW pzxsIMra3h0sztB4zQMDdpggVxIsBF/iEzoIuc72FvPYk6Wz7Fz0BQvh2sBIpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Skpaka0IWCpg08LV2qy8Dz5484PCXwhFkA6cBPE4NYg=; b=mJcKWBKltBNo2yZ0nDZ5OzTbgfLDu9KgGHVBnQ9DmdeSUbOvkxqHLhL0T07gDeemGdwC8r A28dbjxKbfNVGdvt+Kt95rB44PBHU9/SDy6SiIFUWgJcMzOYC6tHNhEvRGg1RTIpG+7GH4 lBjteBmuqx6e8t9IyCJcxMUq08+WkTkkhRIqp9ZonpS3DARHd+SLhUMP+1HBQkgZU69wNC jePNAvuZFyucK3CKNaunh8OQvoQE/m4S6Dui/hBb9LHVPB8mOJ8iSnrM/Vx7wzwUDb+J4l KzHcHFMImUjK3X+YW2UnNsIYbCPhbizmE8HLPXGPl2lswQgrTjUUDDo0iz+Rlg== 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 4WZYxr3nV3zs96; Thu, 1 Aug 2024 16:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GGms0095623; Thu, 1 Aug 2024 16:16:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GGm7m095620; Thu, 1 Aug 2024 16:16:48 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:16:48 GMT Message-Id: <202408011616.471GGm7m095620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 1a34a8f57f0a - stable/14 - tarfs: Fix typo. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a34a8f57f0a7e6b2fa4217f7988044171b09436 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1a34a8f57f0a7e6b2fa4217f7988044171b09436 commit 1a34a8f57f0a7e6b2fa4217f7988044171b09436 Author: Trond Endrestøl AuthorDate: 2024-07-24 11:30:32 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:15:57 +0000 tarfs: Fix typo. MFC after: 3 days PR: 280354 (cherry picked from commit 124ae0e8af8fbc8384a660583f47f112f392395e) --- share/man/man5/tarfs.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man5/tarfs.5 b/share/man/man5/tarfs.5 index 56c56ac43287..ed76d2b4b2b8 100644 --- a/share/man/man5/tarfs.5 +++ b/share/man/man5/tarfs.5 @@ -72,7 +72,7 @@ When using to create the tar file, this can be achieved using the .Cm zstd:max-frame-size and -.Cm ztsd:frame-per-file +.Cm zstd:frame-per-file options. Sensible frame sizes are powers of 2 between the system's base page size (see From nobody Thu Aug 1 16:16:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYxs5m3Kz5T0cG; Thu, 01 Aug 2024 16:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYxs52X8z4gDm; Thu, 1 Aug 2024 16:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SbTU3FdbcVFwTx5z78Ds81uGnNHuGWupdZNKZdppCh8=; b=i8lsH5GKN/HM3M1VEGYejHxa8Kke3c4Xnf1Zlla7mJfv7Vmx9FyPjIyB+u2rwlM2HDZK4l +q1mFZ3bM2p9Y0Ly5y+A7doyZMIWu8tT9UtFIfUEoJWiz5k4dmYspdWnYABNHh/J16zzyn qUXGCM20QFumSTkhHH1QrOAEW4a+QsEkxm+RUnzEIyPVvGFiPHX8F7LPqwAeBEgY3DO21+ /DDdudAu6dPowA8FoqxVGqcz/SaElBXafY9v/cux0+dxEGizKLtgrSmBYe+c3pVaF9gzC8 BdcijKjQoGAv0exkZYRpU3fDJbTCvABt8WarU/uhwq4ZdlXMwfZdFY+Eo6J6Fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722529009; a=rsa-sha256; cv=none; b=tY/A36zJPGvU3xzyUtMhjUPnnXviRwQI5f3lB/itELUm3yxIgFgLj1VUuQ8Xw0pDhR5GrT mZ2ijbjcwSjJMqKcKQyIgOj7DYDDQnh9TiXgFWneodCsJSF7gcmRlPuSL/wRzJsh2rBPJ1 V4cgFS/FSnZKqEgH/fEXokBHWMpCQgEi7ZyWnWMTsh0zcV4lFrdqAxnmWVdfzUJ3tt6goO hGT6xZ6RgmNlqHFDkvjrxbeddi9+mRGp1IfwXNwl7dRrmZXXFlQjmCGlrN8cKba8BsBJOI do922ig9RJk8khmhDo/uqEibEJ6m83MBeP1B36cH/IuEozRq3JmoQ+xUaAHWhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SbTU3FdbcVFwTx5z78Ds81uGnNHuGWupdZNKZdppCh8=; b=YJidV8vwNTAtcq6AQL9a+adK/40M/RXGIIhs+Ix4lWpOXKunMHUwaPK4nKdBDrq6qyPGPt 7yJOw/WSfRF8aQQsPw5Y3qWIltBGUocnL+RkFA3qUAEclnK7BEAyoSt3hIubscmUW2Ufr4 EavFR+5NdBdVFAXIpSYQdQ2wz7gyhtGArB/s0/A5q8kTb3ItSYFtE4cy2ySSirkjOqeOO0 qkS8eCqtWUdf8WOUUffSEWTuwPq2YlRE0qEEXCcFlbY/ZDcII2962TjCaCDf+NIv+SLmef /u/xCt16T3Pfi8BiQWguquK/0RvKhzS8vXBE9siKFbJiIfa9ISwlJFAHe1O5ug== 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 4WZYxs4L2hzs97; Thu, 1 Aug 2024 16:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GGnuj095683; Thu, 1 Aug 2024 16:16:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GGnTe095680; Thu, 1 Aug 2024 16:16:49 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:16:49 GMT Message-Id: <202408011616.471GGnTe095680@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: e6d9c11666f7 - stable/14 - ls: Make -, apply to -s as well as -l. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e6d9c11666f785ec45cb6f7e05fc87012d6bb4d5 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e6d9c11666f785ec45cb6f7e05fc87012d6bb4d5 commit e6d9c11666f785ec45cb6f7e05fc87012d6bb4d5 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-24 20:06:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:15:57 +0000 ls: Make -, apply to -s as well as -l. While here, remove a bogus comment about a gcc bug. The bug was in ls, which used an incorrect format string, and in libc, which accepted it. MFC after: 1 week Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D46067 (cherry picked from commit 647d4a8cafd2c9b291cab388191bc7fcfe12a66b) --- bin/ls/ls.1 | 4 +++- bin/ls/ls.c | 3 ++- bin/ls/print.c | 14 ++++++-------- bin/ls/tests/ls_tests.sh | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/bin/ls/ls.1 b/bin/ls/ls.1 index 1b0f24593adc..4d20f02261c9 100644 --- a/bin/ls/ls.1 +++ b/bin/ls/ls.1 @@ -31,7 +31,7 @@ .\" .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" -.Dd February 21, 2024 +.Dd July 22, 2024 .Dt LS 1 .Os .Sh NAME @@ -436,6 +436,8 @@ output is not to a terminal. .It Fl , (Comma) When the .Fl l +or +.Fl s option is set, print file sizes grouped and separated by thousands using the non-monetary separator returned by .Xr localeconv 3 , diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 59ff12547787..1ad346440f02 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -981,7 +981,8 @@ label_out: d.maxlen = maxlen; if (needstats) { d.btotal = btotal; - d.s_block = snprintf(NULL, 0, "%lu", howmany(maxblock, blocksize)); + d.s_block = snprintf(NULL, 0, f_thousands ? "%'ld" : "%ld", + howmany(maxblock, blocksize)); d.s_flags = maxflags; d.s_label = maxlabelstr; d.s_group = maxgroup; diff --git a/bin/ls/print.c b/bin/ls/print.c index 16c4f48624d0..417586665eb1 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -227,7 +227,7 @@ printlong(const DISPLAY *dp) (void)printf("%*ju ", dp->s_inode, (uintmax_t)sp->st_ino); if (f_size) - (void)printf("%*jd ", + (void)printf(f_thousands ? "%'*jd " : "%*jd ", dp->s_block, howmany(sp->st_blocks, blocksize)); strmode(sp->st_mode, buf); aclmode(buf, p); @@ -406,7 +406,7 @@ printaname(const FTSENT *p, u_long inodefield, u_long sizefield) chcnt += printf("%*ju ", (int)inodefield, (uintmax_t)sp->st_ino); if (f_size) - chcnt += printf("%*jd ", + chcnt += printf(f_thousands ? "%'*jd " : "%*jd ", (int)sizefield, howmany(sp->st_blocks, blocksize)); #ifdef COLORLS if (f_color) @@ -759,12 +759,10 @@ printsize(size_t width, off_t bytes) humanize_number(buf, sizeof(buf), (int64_t)bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); (void)printf("%*s ", (u_int)width, buf); - } else if (f_thousands) { /* with commas */ - /* This format assignment needed to work round gcc bug. */ - const char *format = "%*j'd "; - (void)printf(format, (u_int)width, bytes); - } else - (void)printf("%*jd ", (u_int)width, bytes); + } else { + (void)printf(f_thousands ? "%'*jd " : "%*jd ", + (u_int)width, bytes); + } } /* diff --git a/bin/ls/tests/ls_tests.sh b/bin/ls/tests/ls_tests.sh index c82b4e8c8851..c732b60b21a4 100755 --- a/bin/ls/tests/ls_tests.sh +++ b/bin/ls/tests/ls_tests.sh @@ -800,6 +800,21 @@ s_flag_body() done } +atf_test_case scomma_flag +scomma_flag_head() +{ + atf_set "descr" "Verify that -s, prints out the size with ',' delimiters" +} + +scomma_flag_body() +{ + export LC_ALL=en_US.UTF-8 + atf_check -e ignore dd if=/dev/urandom of=file bs=65536 count=64 + blocks=$(stat -f "%b" file) + cblocks=$(printf "%'d" $blocks) + atf_check -e empty -o match:"$cblocks[[:space:]]+file" ls -s, file +} + atf_test_case t_flag t_flag_head() { @@ -972,6 +987,7 @@ atf_init_test_cases() atf_add_test_case q_flag_and_w_flag atf_add_test_case r_flag atf_add_test_case s_flag + atf_add_test_case scomma_flag atf_add_test_case t_flag atf_add_test_case u_flag atf_add_test_case v_flag From nobody Thu Aug 1 16:16:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYxv1Ctwz5T0Yk; Thu, 01 Aug 2024 16:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYxt5m11z4gDs; Thu, 1 Aug 2024 16:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IKhvyNAtOuuVyEug2Y2JomZOqPIaBpDgqIvzDQX2zcY=; b=LjlqCGUVP4LpbBd1s7PJZhZYnZFq2EflAqDVIM571PKeMbGMzbAX1cZNAm1oqeKWU5VGsC iRjW34upQGqR2IbDTjFFx5SxxEH40OdztkmXck/ipvE0S2qclG/HEL3hSrmlXa//Gb64E8 aDjoBJ/XXIrYm3UBZsczgp1EZIA59MfOgFjv63JPlPVLh9afCsjNkAvlFQheThA3BunbAq JW9Td+DrhrqTmm938n+kQlSPkc4TZquDF/SmrHnk0ywiFg5wIkG7NowK0dt2TSOBgQNjQl PRh66Yx7pduJhX3kettlkeLAUonPdDNSxowS5Jq8WBrecWGACJKoBfvj74sNEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722529010; a=rsa-sha256; cv=none; b=jHBlZUa1sycc7Yc89w009lb7Ijy4ezRbPuFPJ0FQYxHtOA7RbgrKCGoqOXlF2B0vGwxDIn WnrnZksEyaaX2deNLYqfaXt0zww1GwzjTIrtG1evNBXCUnfDNwMyARjB1JCcYMBNhmI7ff 69KT2ZztiCt4CnS+8eQ/0zPMaYo8Rwd13d8j3wVNsl9cTZ+QLFd6AuieZC1RqFc+xIeWJj rnSoZhOx0oHpTUPOiZQ52Hj6HXxHzQjNhrM2SBad15Txi0zDPc7/9uMlQFtWAt3Y58EveQ YY32tkdiKCOqow5QdbxUyjOgruJzjHRJP2GOmBl06Wh2uJX8beN+D5ztQYihXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IKhvyNAtOuuVyEug2Y2JomZOqPIaBpDgqIvzDQX2zcY=; b=M1am7npredFewiwkYmTQEC7oC/2tbai/0tThfwA52TF6nMhFBuTsBkOrvjkq478pRR9k/i okKNfv+lZZb5A/UuYCeOi1hpGQwYXBPjLnan+9zwse5EKMFgVxN32AS9uSLEioa1kmEFok ss+7Hrim62MD52TNBrQ08kR8C7h4KJzjw4BVpXDLunBEns3QCtz+c4T3wqeJ45yObLaHWH TmLplznsLBu4NEqQrdlKTKUnbMMn7wj9/wkehA7qL2v5XYrPZkZ7nM3rdpIRt/TgPzUCtT m9biMecKVnEHQmiTxT+yjo9jBAa1WdrHVT+Ll/GqMTPFZFUr/tYV8V0riOHhrw== 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 4WZYxt5Mwtzrbg; Thu, 1 Aug 2024 16:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GGo7t095742; Thu, 1 Aug 2024 16:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GGoO5095739; Thu, 1 Aug 2024 16:16:50 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:16:50 GMT Message-Id: <202408011616.471GGoO5095739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ece4e05f4bf9 - stable/14 - pax: Clear arcn in each read function. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ece4e05f4bf96a5bd2dad61ad057aa076ae5dc36 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ece4e05f4bf96a5bd2dad61ad057aa076ae5dc36 commit ece4e05f4bf96a5bd2dad61ad057aa076ae5dc36 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-24 20:06:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:15:57 +0000 pax: Clear arcn in each read function. Instead of initializing individual fields to zero, clear the entire struct prior to populating it. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D46097 (cherry picked from commit f890020d43bf2070f12ffec37bcd9579f6fb1347) --- bin/pax/cpio.c | 12 +++--------- bin/pax/tar.c | 20 ++------------------ 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c index 76edca3c6f91..0b5b95bb5ef5 100644 --- a/bin/pax/cpio.c +++ b/bin/pax/cpio.c @@ -280,13 +280,13 @@ cpio_rd(ARCHD *arcn, char *buf) */ if (cpio_id(buf, sizeof(HD_CPIO)) < 0) return(-1); + memset(arcn, 0, sizeof *arcn); hd = (HD_CPIO *)buf; /* * byte oriented cpio (posix) does not have padding! extract the octal * ascii fields from the header */ - arcn->pad = 0L; arcn->sb.st_dev = (dev_t)asc_ul(hd->c_dev, sizeof(hd->c_dev), OCT); arcn->sb.st_ino = (ino_t)asc_ul(hd->c_ino, sizeof(hd->c_ino), OCT); arcn->sb.st_mode = (mode_t)asc_ul(hd->c_mode, sizeof(hd->c_mode), OCT); @@ -315,8 +315,6 @@ cpio_rd(ARCHD *arcn, char *buf) /* * no link name to read for this file */ - arcn->ln_nlen = 0; - arcn->ln_name[0] = '\0'; return(com_rd(arcn)); } @@ -561,8 +559,8 @@ vcpio_rd(ARCHD *arcn, char *buf) return(-1); } + memset(arcn, 0, sizeof *arcn); hd = (HD_VCPIO *)buf; - arcn->pad = 0L; /* * extract the hex ascii fields from the header @@ -609,8 +607,6 @@ vcpio_rd(ARCHD *arcn, char *buf) /* * we have a valid header (not a link) */ - arcn->ln_nlen = 0; - arcn->ln_name[0] = '\0'; arcn->pad = VCPIO_PAD(arcn->sb.st_size); return(com_rd(arcn)); } @@ -857,7 +853,7 @@ bcpio_rd(ARCHD *arcn, char *buf) if (bcpio_id(buf, sizeof(HD_BCPIO)) < 0) return(-1); - arcn->pad = 0L; + memset(arcn, 0, sizeof *arcn); hd = (HD_BCPIO *)buf; if (swp_head) { /* @@ -919,8 +915,6 @@ bcpio_rd(ARCHD *arcn, char *buf) /* * we have a valid header (not a link) */ - arcn->ln_nlen = 0; - arcn->ln_name[0] = '\0'; arcn->pad = BCPIO_PAD(arcn->sb.st_size); return(com_rd(arcn)); } diff --git a/bin/pax/tar.c b/bin/pax/tar.c index cbe2dbab64f8..785dd32c4838 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -373,9 +373,9 @@ tar_rd(ARCHD *arcn, char *buf) */ if (tar_id(buf, BLKMULT) < 0) return(-1); + memset(arcn, 0, sizeof *arcn); arcn->org_name = arcn->name; arcn->sb.st_nlink = 1; - arcn->pat = NULL; /* * copy out the name and values in the stat buffer @@ -402,8 +402,6 @@ tar_rd(ARCHD *arcn, char *buf) * to encode this as a directory */ pt = &(arcn->name[arcn->nlen - 1]); - arcn->pad = 0; - arcn->skip = 0; switch(hd->linkflag) { case SYMTYPE: /* @@ -440,8 +438,6 @@ tar_rd(ARCHD *arcn, char *buf) arcn->type = PAX_DIR; arcn->sb.st_mode |= S_IFDIR; arcn->sb.st_nlink = 2; - arcn->ln_name[0] = '\0'; - arcn->ln_nlen = 0; break; case AREGTYPE: case REGTYPE: @@ -449,8 +445,6 @@ tar_rd(ARCHD *arcn, char *buf) /* * If we have a trailing / this is a directory and NOT a file. */ - arcn->ln_name[0] = '\0'; - arcn->ln_nlen = 0; if (*pt == '/') { /* * it is a directory, set the mode for -v printing @@ -727,10 +721,9 @@ ustar_rd(ARCHD *arcn, char *buf) */ if (ustar_id(buf, BLKMULT) < 0) return(-1); + memset(arcn, 0, sizeof *arcn); arcn->org_name = arcn->name; arcn->sb.st_nlink = 1; - arcn->pat = NULL; - arcn->nlen = 0; hd = (HD_USTAR *)buf; /* @@ -777,15 +770,6 @@ ustar_rd(ARCHD *arcn, char *buf) if (uid_name(hd->uname, &(arcn->sb.st_uid)) < 0) arcn->sb.st_uid = (uid_t)asc_ul(hd->uid, sizeof(hd->uid), OCT); - /* - * set the defaults, these may be changed depending on the file type - */ - arcn->ln_name[0] = '\0'; - arcn->ln_nlen = 0; - arcn->pad = 0; - arcn->skip = 0; - arcn->sb.st_rdev = (dev_t)0; - /* * set the mode and PAX type according to the typeflag in the header */ From nobody Thu Aug 1 16:16:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYxw0yzcz5T0jG; Thu, 01 Aug 2024 16:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYxv6f32z4gL8; Thu, 1 Aug 2024 16:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GACh6Jc8COdoLgBKBwre3JyS+NaQTbzbGAxB2hz7ce8=; b=Tz4IV8gCeb4Krz3MMExf9+ngfYWoRmmZbN6IIZnkCwkLFCjLTGIYBG0/t93E+syQwgtBRC dXxpe8kFRt95oeuN0Tu1ownotyFPS+SXuajFMkiyq4HZTiL1Q42CWhY56ta4R+TuLtw6xS 9V/01N06GqYhev8fo4m8pUJ9aAqLcfDy3kG0EA5xssgsqBE+yFpsOl2Mhqi0VTpJXw9LKj rfnTasdgofWydwAwOsjBBKU0ykkSI9i8CnpQkYxveQ8yv4zj21DNA9fL7hyFveV4jC1KuM ImSmY/pjHfiUqe8eWRd5ymI9Rz+rvy1+4FPgSbC/FXejLgceff6gqRxDlTZh0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722529011; a=rsa-sha256; cv=none; b=vTv1b4hgpdmUDyE5t+Eu6H0ipcHIfoG9At+7T8NXdwRwisMXUigxRnHBN6cOgQG9gKgk8J Jq+RXvCI8tDFS/MSsem+dCyZ5wZO1kQMgBBHcDJgLxapJUQQq449KueLBQb5ZOw41oBcdB q/urHPxyhihozhgG7A0ZblkHxrHssKlxz5ACPd4qU6dfyP+PkQ1NoT+8c+bR6Du/1jSpAz ZSEZrOCJcM0qFXlTgxtje8HAFJafdV17UR9L5AZ8rpNujqv4uEMxWfv57EmvNMcSMIiczp 37FiwWNCmzdb4QahiSjzhWWq+3L7Bj/o38QfxfDRTPAW/a6Owcz/1rBi6tcPeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GACh6Jc8COdoLgBKBwre3JyS+NaQTbzbGAxB2hz7ce8=; b=KAmND36qz6FMlUdf2pQUFUO9VnPtx0MwKUTO/Vt1d+p3SusW9A1pfGE2KTlzDkIWe1aLsH twv36BYXXMxHmj43M1bkbeD80zMftbeJrFN2meDy1ht7ZouibaleKO6uDFPM1Rc5HbAcJ2 fStTdKhsyiD0JgvaSreto+w7X0LGhagzSCzJNsr9bieyZRWtOkeeNNNTCjPuv8h2jbJWqb 80R6unOu2mQwKCPTrMpITU4QYJpYTgeoT/vIxoPg8BDKi9iBfKR6smOSwtYuC1btNkCc2h 6el2B5Yqa9B/pUNdtCbCUOB2iYPk+Mpa0ASWGEsRWMmH8tc9p5h+zvkf3LMehw== 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 4WZYxv6G35zs98; Thu, 1 Aug 2024 16:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GGpBa095790; Thu, 1 Aug 2024 16:16:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GGpvn095787; Thu, 1 Aug 2024 16:16:51 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:16:51 GMT Message-Id: <202408011616.471GGpvn095787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 45fc37334d07 - stable/14 - diff: Fix usage message and documentation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 45fc37334d077d635dbfdd13f5e085513bf09d49 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=45fc37334d077d635dbfdd13f5e085513bf09d49 commit 45fc37334d077d635dbfdd13f5e085513bf09d49 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:15:57 +0000 diff: Fix usage message and documentation. The `--ignore-all-space` option was incorrectly documented as `--ignore-all-blanks` in some (but not all) places. MFC after: 3 days PR: 280434 Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D46160 (cherry picked from commit ab830de9f58c1b257e42b4fbdd46b3ca6a837ee6) --- usr.bin/diff/diff.1 | 6 +++--- usr.bin/diff/diff.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index c10b130a2d72..3996f0388665 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -29,7 +29,7 @@ .\" .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" -.Dd June 29, 2024 +.Dd July 26, 2024 .Dt DIFF 1 .Os .Sh NAME @@ -199,7 +199,7 @@ .Op Fl aBbditwW .Op Fl -color Ns = Ns Ar when .Op Fl -expand-tabs -.Op Fl -ignore-all-blanks +.Op Fl -ignore-all-space .Op Fl -ignore-blank-lines .Op Fl -ignore-case .Op Fl -minimal @@ -422,7 +422,7 @@ output adds character(s) to the front of each line which may screw up the indentation of the original source lines and make the output listing difficult to interpret. This option will preserve the original source's indentation. -.It Fl w -ignore-all-blanks +.It Fl w -ignore-all-space Is similar to .Fl b -ignore-space-change but causes whitespace (blanks and tabs) to be totally ignored. diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index 24e851ae9dbf..ba88964ca131 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -592,7 +592,7 @@ usage(void) " diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--tabsize] [-I pattern] [-L label]\n" " [-F pattern] [-S name] [-X file] [-x pattern] dir1 dir2\n" - " diff [-aBbditwW] [--expand-tabs] [--ignore-all-blanks]\n" + " diff [-aBbditwW] [--expand-tabs] [--ignore-all-space]\n" " [--ignore-blank-lines] [--ignore-case] [--minimal]\n" " [--no-ignore-file-name-case] [--strip-trailing-cr]\n" " [--suppress-common-lines] [--tabsize] [--text] [--width]\n" From nobody Thu Aug 1 16:16:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYxx2Ksdz5T0x8; Thu, 01 Aug 2024 16:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYxx0hzMz4gJ1; Thu, 1 Aug 2024 16:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TSIps5iR5gL4KUQ8BymwAHA4mPJrmTxy6f0VkPhqMug=; b=A3t5d8aMT7bmKFKF/SWvCnkD4hogoBWqVjj8ijSFogvoMKpICt4uQFjhEl4aNZn104eEEx YscwwIipfnZAoeXNI/t0uOPD2eRxDRdD3swTG9UpHYtQWqJvKghNoi6fPmGZcnqlSaZotl twj+i1ehg20tT1+pPcP+Vu6CbDD1MqWRs8u+5PBStN+yzpA/xLTXbxkf+gjPZmNpg2DWXy D9qWP75IrLb7sXQYy9z1bYk3lmJ8icdxddWvk7TZpkKIqw/rAWBTDD6RjrIz4bCU0kSr4y /YvVqup7aPTrdXM8QcnT8SYZaYff04artL2/ZoZ2Zo5NzW8/EQ2UaMjxjLiuyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722529013; a=rsa-sha256; cv=none; b=PdZWAbDy4/kIimjc1OrrdxD/9IdNzi0cxixfbf9IJcCAxO0E9mzu3THbm16L32kJ/bqw0t 2PRvFEo2CcI+V44oiP+YqRaFS1oIAAkI19BAGUZ8qqlV8c/TxdYko+QqUu4Hfp8ZwR52ej FglfOKafwHlmpc0aqUls8CJWt62Cpefs7TSkj5LlTDENyuv0oNjthIctkQ7PrXNKw+7rpv dfshi4t65CRafIAKdFOAdL5kcjrnEa1GNSmH6sACm2bKJsTJv9NShVWnY2cOber9XP0Zqv 0yBx3tF0crpAwnoEAaacq0+pLm3R4WZRgbSKC9g70m3+6cI6PLVgxFslRIiWJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TSIps5iR5gL4KUQ8BymwAHA4mPJrmTxy6f0VkPhqMug=; b=XVzQycUgbOWFMAPAJpNnhXlfJ29qvswUQ0FrphEUBxBj7U3THekMwiGFthj2SQjnH+m+Ag Bt0U3obMZ+KL5T2DkgTbLiaaoy6J04BSjORuOyaWNgiEAWkRaZq/6LXg8PN4+l0aO06nrK tKvsBg99Z+BMi0X5XBSpD5aDLPyqJMZiy0dPeWZ3yGSLk3TtpTfhUAlwfG/zjTBNSob6xF Ua46XYY4kq+pp5Z9eikMm1D/InTmbMVC8QjhkWh/tNaWiFiTzQM9qweqoEErEHeWauN3Ys QLQyAbFwojQn9D+RZ5cy08S8DrnwpNvvGBQz3VgzHJt5foHbHqXISJGEg0H3Cw== 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 4WZYxw6pkzzrws; Thu, 1 Aug 2024 16:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GGqrf095832; Thu, 1 Aug 2024 16:16:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GGqb8095829; Thu, 1 Aug 2024 16:16:52 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:16:52 GMT Message-Id: <202408011616.471GGqb8095829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 094f58809682 - stable/14 - sdiff: Fix usage message. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 094f58809682a693918efe6aba5d33d6dae33c25 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=094f58809682a693918efe6aba5d33d6dae33c25 commit 094f58809682a693918efe6aba5d33d6dae33c25 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:25 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:15:57 +0000 sdiff: Fix usage message. The `--ignore-all-space` option was incorrectly documented as `--ignore-all-spaces`. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D46161 (cherry picked from commit ca75b7dac886de66fc06fd31facfa2c561f7567e) --- usr.bin/sdiff/sdiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index 6402b85017a7..daa0f43e0b0e 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -130,7 +130,7 @@ static const char *help_msg[] = { "\t-I RE, --ignore-matching-lines=RE: ignore changes whose line matches RE.", "\t-i, --ignore-case: do a case-insensitive comparison.", "\t-t, --expand-tabs: expand tabs to spaces.", - "\t-W, --ignore-all-spaces: ignore all spaces.", + "\t-W, --ignore-all-space: ignore all whitespace.", "\t--speed-large-files: assume large file with scattered changes.", "\t--strip-trailing-cr: strip trailing carriage return.", "\t--ignore-file-name-case: ignore case of file names.", From nobody Thu Aug 1 16:16:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYxy2fChz5T0fR; Thu, 01 Aug 2024 16:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYxy15PZz4gFY; Thu, 1 Aug 2024 16:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GguIuc8y9/UBYa+kXNalwtMz3IxrUWM4HGbbrm63sQ8=; b=I52+DjtdWjGG/XDIKCmhMDLi9sP1Mjplm/qg4S/nZnOWfZUmz36HSkUQIUn7w3mlG8Sxc6 Q+AtefAQnFoD+Xpb+utQ70pNW9m/l6jl0nN2fAZv4yiz5/XRM6ekDEk/bWYQopW9el7hXW 8ldcy/KgvDxSEgPMk1SAONtQOLy2yGpO/ThSSJpNY7KtWEvr9Np3yXGBG1tLA5UQRL8IW5 5rfxkSTzqUZmHm7rrpBBMYqG+/3t8A/T6thfGEwezJlV0ybSue3wGQBfG8PBzrZ3Rgy/gW czUaa7EOWER+Kcrk6KG86RMmSPvCPK117W8sLDLu5J/TmX8VO/njVzaoGKhxyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722529014; a=rsa-sha256; cv=none; b=ctiFhsIranvVzrfhmVmwLaFnEcrOQ0aSRIelR3wZYY6Dw9u8qfdsge0yzoLCvD9LZq0JYN e7JK/jnP6B7FiV1rOLnufGgTmN935wWODHwm6c+ZUcKci+ri+upR9TR1JN6xA+L9yIUkL4 i6i3QZoAQImJxNHqYPeDXGiSC/1tAnKXDZI3P8hIQa8bVBNvo9g+6tHSfQNK9ZRxL+WZ9b QItLRsp9gFLAgzquHhuNW32qiWtHdDtfTWMuvVqa2jQ/Ur17fyrVixpCTQg8wjBwt94Y9U GHoIfBZ8FYPlJHdpMZntu+e2B67Z8BFp03yHEKeYJbw08c0FeSjl4SWqtSbeYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GguIuc8y9/UBYa+kXNalwtMz3IxrUWM4HGbbrm63sQ8=; b=ZhW9ccDz5e7GECOCXzDqVwAk8ZCwAXVOxWXLwtp2kI1vg7Bpnxvm6y0T+J3BOi3EaXUdxs c3AXn6PP3FBiS1kA2RsbyYbiEenfK3+Gf/5ImbUxZHxFy+vetASGeTCw7tN919B/HF6oE0 WuECOANjJ9K0mD0gAryxtiJRVY5HSp8ajWyWcx+bFJo4T/oG4QsOC5AClnqM2NwQFjeYnm +hlFeGvXQpYOb0qy7aehBKSmvm4Rb+WqPse0bCTQVslzD7f/rB+d9CaE4AHZswKzkdbF7h +hzZAywHtOiHUvWrdLeatxGRoOMrv3x0xLHNSoG8gKGclLPgJMLTbrLw7SI+QQ== 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 4WZYxy0Sv4zrs3; Thu, 1 Aug 2024 16:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GGrE3095874; Thu, 1 Aug 2024 16:16:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GGrOk095871; Thu, 1 Aug 2024 16:16:53 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:16:53 GMT Message-Id: <202408011616.471GGrOk095871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ea68175b07e0 - stable/14 - diff: Fix integer overflow. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ea68175b07e0cd8e51249d2858749481352aa553 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ea68175b07e0cd8e51249d2858749481352aa553 commit ea68175b07e0cd8e51249d2858749481352aa553 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:15:57 +0000 diff: Fix integer overflow. The legacy Stone algorithm uses `int` to represent line numbers, array indices, and array lengths. If given inputs approaching `INT_MAX` lines, it would overflow and attempt to allocate ridiculously large amounts of memory. To avoid this without penalizing non-pathological inputs, switch a few variables to `size_t` and add checks while and immediately after reading both inputs. MFC after: 3 days PR: 280371 Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D46169 (cherry picked from commit 9317242469f1ca682626d9806f8caf65d143c09a) --- usr.bin/diff/diffreg.c | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index ffb3f90beede..2635c95daf6e 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -204,9 +204,9 @@ static int *klist; /* will be overlaid on file[0] after class */ static int *member; /* will be overlaid on file[1] */ static int clen; static int inifdef; /* whether or not we are in a #ifdef block */ -static int len[2]; -static int pref, suff; /* length of prefix and suffix */ -static int slen[2]; +static size_t len[2]; /* lengths of files in lines */ +static size_t pref, suff; /* lengths of prefix and suffix */ +static size_t slen[2]; /* lengths of files minus pref / suff */ static int anychange; static int hw, lpad, rpad; /* half width and padding */ static int edoffset; @@ -400,6 +400,10 @@ diffreg(char *file1, char *file2, int flags, int capsicum) status |= 1; goto closem; } + if (len[0] > INT_MAX - 2) + errc(1, EFBIG, "%s", file1); + if (len[1] > INT_MAX - 2) + errc(1, EFBIG, "%s", file2); prune(); sort(sfile[0], slen[0]); @@ -525,18 +529,17 @@ prepare(int i, FILE *fd, size_t filesize, int flags) sz = 100; p = xcalloc(sz + 3, sizeof(*p)); - while ((r = readhash(fd, flags, &h)) != RH_EOF) - switch (r) { - case RH_EOF: /* otherwise clang complains */ - case RH_BINARY: + while ((r = readhash(fd, flags, &h)) != RH_EOF) { + if (r == RH_BINARY) return (false); - case RH_OK: - if (j == sz) { - sz = sz * 3 / 2; - p = xreallocarray(p, sz + 3, sizeof(*p)); - } - p[++j].value = h; + if (j == SIZE_MAX) + break; + if (j == sz) { + sz = sz * 3 / 2; + p = xreallocarray(p, sz + 3, sizeof(*p)); } + p[++j].value = h; + } len[i] = j; file[i] = p; @@ -547,7 +550,7 @@ prepare(int i, FILE *fd, size_t filesize, int flags) static void prune(void) { - int i, j; + size_t i, j; for (pref = 0; pref < len[0] && pref < len[1] && file[0][pref + 1].value == file[1][pref + 1].value; @@ -685,7 +688,7 @@ static void unravel(int p) { struct cand *q; - int i; + size_t i; for (i = 0; i <= len[0]; i++) J[i] = i <= pref ? i : @@ -712,7 +715,7 @@ check(FILE *f1, FILE *f2, int flags) ixold[0] = ixnew[0] = 0; /* jackpot = 0; */ ctold = ctnew = 0; - for (i = 1; i <= len[0]; i++) { + for (i = 1; i <= (int)len[0]; i++) { if (J[i] == 0) { ixold[i] = ctold += skipline(f1); continue; @@ -812,7 +815,7 @@ check(FILE *f1, FILE *f2, int flags) ixnew[j] = ctnew; j++; } - for (; j <= len[1]; j++) { + for (; j <= (int)len[1]; j++) { ixnew[j] = ctnew += skipline(f2); } /* @@ -1474,9 +1477,9 @@ dump_context_vec(FILE *f1, FILE *f2, int flags) b = d = 0; /* gcc */ lowa = MAX(1, cvp->a - diff_context); - upb = MIN(len[0], context_vec_ptr->b + diff_context); + upb = MIN((int)len[0], context_vec_ptr->b + diff_context); lowc = MAX(1, cvp->c - diff_context); - upd = MIN(len[1], context_vec_ptr->d + diff_context); + upd = MIN((int)len[1], context_vec_ptr->d + diff_context); printf("***************"); if (flags & (D_PROTOTYPE | D_MATCHLAST)) { @@ -1577,9 +1580,9 @@ dump_unified_vec(FILE *f1, FILE *f2, int flags) b = d = 0; /* gcc */ lowa = MAX(1, cvp->a - diff_context); - upb = MIN(len[0], context_vec_ptr->b + diff_context); + upb = MIN((int)len[0], context_vec_ptr->b + diff_context); lowc = MAX(1, cvp->c - diff_context); - upd = MIN(len[1], context_vec_ptr->d + diff_context); + upd = MIN((int)len[1], context_vec_ptr->d + diff_context); printf("@@ -"); uni_range(lowa, upb); From nobody Thu Aug 1 16:16:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYxz6wkYz5T0fS; Thu, 01 Aug 2024 16:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYxz3Cg8z4gYM; Thu, 1 Aug 2024 16:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=edN+VRywm4BO+TK2TUXv4BUfERDaN2p3JWHoOHVg2Jo=; b=dyrTp+HQVuo8B6d75AUNBw3aXG69vjUEgm79SnpMeQsydyLK7cSa+NB/w9XvxXgL7fcBn1 rQMiAyMZvJhc6SoF2bEJLeaDX9ZerfDsOagZqlLwbKcDg6owstRcD0ijOQY1kYDqrq0PW8 nIGU9PIXPrbtplMGWL7feJtLhc8QwhjTMPgJYrXsfOuFPyOfUoyanISd+xB1fzdhPVjOi9 s0l9W24m9SM4mRkx04bzOugz3+yOamsOM1zRwYEWCCHK0v7VXFVhGXndaCNu59czlGFA/W s7Gqi5vppUSOeA8WdpZW5B4k3CvsK7ZE2fBs32JB2x0l9lHskkMZmaEyR7cB5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722529015; a=rsa-sha256; cv=none; b=UNwORUU6W7P8uOKE/hzld+PHXYwmqTn83SXaKopMIlr0ibhAGMWG2ULECan7x7KOPkqh+W RxjkbbsQwL9IN0dUrbbqOTr7mQdexYOi7U1jdb7L+24TclBPXSlHy9CHlU+z4WaD+C3q6f bOO46dGoHVk1Eilmcpbz8ATpHptrqkkU8qQUg0LW02r9e5L4Z+5Kbwvat+upSTDV2yUPRP oVgnDrBIuT3OKzTlwWm8UIXS/cEk8zRBz8LveWlB6iwfqnOrDvKLfoSPx2VgMHoY57XEQs D6mSHzzgLUripN05PJHw36ryk/+6j3+pJiuHPafG8kIULlEUTcEVadHNlesn/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=edN+VRywm4BO+TK2TUXv4BUfERDaN2p3JWHoOHVg2Jo=; b=Ge7TKA1nIqJxxG+iZV0myM5pGXK/hzqyLFpVXwfWXdcr4Qr6/XVnxYkw9P0l9yHlFwHOBu mcOhB/ypJCjEQKMCMsoI3fO+A7gKR2r3KssBfkrcT9RwLDvbJJ47px+foZ+KNItijXvELC VHKwQpIaZ7XsAjV/QHDiccIpFdwGYTOB/TxMq1cw8Ly7R9oUgMK7Bt8r145xyDynkKQBQ+ a14GLO0xOh5w2z5rHNjZy5MCK5R0/j+J/wcUXGrIHUCLP8nOhiXZBDCvOUIeO8tY9Ez6pZ I6QwfsgiUS2cpeJ7sfti2FxG8OMX5Ez5QSBeFQBCUxy5yj5qDK1I0VpXamVdGA== 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 4WZYxz1fWvzrpw; Thu, 1 Aug 2024 16:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GGtCD095922; Thu, 1 Aug 2024 16:16:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GGtPs095919; Thu, 1 Aug 2024 16:16:55 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:16:55 GMT Message-Id: <202408011616.471GGtPs095919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 91b21801e817 - stable/14 - ifnet(9): Remove mention of defunct ifaddr_byindex(9). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 91b21801e817a1de85cf98a931e01e45b5e0a22b Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=91b21801e817a1de85cf98a931e01e45b5e0a22b commit 91b21801e817a1de85cf98a931e01e45b5e0a22b Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:15:57 +0000 ifnet(9): Remove mention of defunct ifaddr_byindex(9). Fixes: 964b8f8b993d MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46174 (cherry picked from commit 9f080f17a6a740ce9c1fa45862fb689263908c90) --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 1 - share/man/man9/ifnet.9 | 12 +----------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index b99bd4f890e5..4ae15082cdfd 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240801: retire ifaddr_byindex +OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz + # 20240509: Remove remnants of portsnap(8) OLD_DIRS+=var/db/portsnap diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index eff555170276..c2e145eaeb08 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1334,7 +1334,6 @@ MLINKS+=ifnet.9 if_addmulti.9 \ ifnet.9 ifa_ifwithnet.9 \ ifnet.9 ifa_ref.9 \ ifnet.9 ifaddr.9 \ - ifnet.9 ifaddr_byindex.9 \ ifnet.9 ifaof_ifpforaddr.9 \ ifnet.9 ifioctl.9 \ ifnet.9 ifpromisc.9 \ diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index b835c51c546f..41cbfd8dad42 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -75,8 +75,6 @@ .\" .Ss "Interface Address Functions" .Ft "struct ifaddr *" -.Fn ifaddr_byindex "u_short idx" -.Ft "struct ifaddr *" .Fn ifa_ifwithaddr "struct sockaddr *addr" .Ft "struct ifaddr *" .Fn ifa_ifwithdstaddr "struct sockaddr *addr" "int fib" @@ -196,8 +194,6 @@ address .Xr link_addr 3 ) describing the link layer implemented by the interface (if any) is accessed by the -.Fn ifaddr_byindex -function or .Va if_addr structure. (Some trivial interfaces do not provide any link layer addresses; @@ -1183,9 +1179,7 @@ structure to be the first element in that list. (A pointer to this address structure is saved in the .Vt ifnet -structure and is accessed by the -.Fn ifaddr_byindex -function.) +structure.) The .Fa ifp must have been allocated by @@ -1502,10 +1496,6 @@ precisely .Fa addr will be returned. .Pp -.Fn ifaddr_byindex -returns the link-level address of the interface with the given index -.Fa idx . -.Pp All of these functions return a null pointer if no such address can be found. .Ss "Interface Multicast Address Functions" From nobody Thu Aug 1 16:16:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZYy06Nvkz5T0Yq; Thu, 01 Aug 2024 16:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZYy0375mz4gbt; Thu, 1 Aug 2024 16:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1gS7VD8toQ2nXJey5pLT0os98h09z3BY54yhITRmVQ=; b=tQVVrz4BngPh3NgGTLP6qsxaSMKAtw1Y9R3Om8HkmDkmO2af5xPR2+YxdbvIkcgv8wtg4C k0MJoQVGCQLHC8NSxIJYS7pxbEn3g9tYPdzit+8Z7aMZwmQjOvoWXj0jxMOs0//7Px5rCC SOpN+aU4YQqdksBVNzJFZW0dIIvPo3PD+OkWcJbUjgLmjmT8ErW+u8jJOzx/CCp/QbuWKn SYkcEIwvuPJOqDa5CWpBKWnvcXlKXmug47OS4BIWUOFSJMFqsYk4EEEEsl3B1n3YHbaKEX NCV5yhpPbBlfyBkU2PYoC+mq/hxlK+ro88qRUKFXgod+RyM1VuSZIUS+47Piug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722529016; a=rsa-sha256; cv=none; b=y4wHj+zyXvmgZXWoxo0DnivYsUbfqbWJ7VCnMeqKdKizG6f7w99GXfj6eFCv9ZOo9r/dyk vXMgltq9Nak5re9alNVS/If7tJZq5FbESDvW09n8ikfjYIJDGQDl5XXUo5yj5VTaCG4fcY qD1MNonPmab1UxHtTNxoSQ9MtldEhiMlZkveKWkDex5Lo6dr1i5IR3/310Rb2AkkSjGrLg nYVp2RuRZ5cK2GZTgWLdv0zhZLuJhVGIgQXCJtZcizzKeLFq82fdC1V2ylQLTN0fVFcg6x 8ITqnDCdHxReFK7CIeHvNe72ImtjwKBWyU/H/fcEPdBBdIOxP8RQqYxqYtlTwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722529016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1gS7VD8toQ2nXJey5pLT0os98h09z3BY54yhITRmVQ=; b=NR9n9H660t0MeMruHpG7dYwtGY9J5ki13gYxBYjXDlpPSR2WSiGl/GNGINHKXChKeSeHVV tKBXNa7AZ6TNndkozs/WDv86JGCN3U0hYseQZg4SBbzru5dMC0uYBN7jTY3Mh2YimH1GyC E8Q70nxxw6xskEps8WJe5zr9PzxWBL+kZP14/Y5JYX32SiUMSPV6YRJgHoiJWGQoOU9oaj /eTW0hd0c5EpRKbPs//ldsRnxvEy37qRiZSJS97z5/llko32xnWniZ7hDqzpFIKHSs7b32 4v+cDudSXxdWMCsr80gWx+anqGXfQ/IjzISDQmiax6/xOAP0hkhRt9c2AAgqlQ== 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 4WZYy02dZ3zrs4; Thu, 1 Aug 2024 16:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GGu9A095983; Thu, 1 Aug 2024 16:16:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GGuhE095980; Thu, 1 Aug 2024 16:16:56 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:16:56 GMT Message-Id: <202408011616.471GGuhE095980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2495f56913fb - stable/14 - filemon: Document how to build into the kernel. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2495f56913fb90d48f7f1bf3d2617f260c977844 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2495f56913fb90d48f7f1bf3d2617f260c977844 commit 2495f56913fb90d48f7f1bf3d2617f260c977844 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-30 19:04:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:15:58 +0000 filemon: Document how to build into the kernel. MFC after: 3 days Reviewed by: olce, imp Differential Revision: https://reviews.freebsd.org/D46184 (cherry picked from commit 057453ffdf57bdfcbadb5d1834d425812e01ff43) filemon: Not an option. MFC after: 3 days (cherry picked from commit b4e4512d4669267fb220b7c1a2844c506673a3ce) --- share/man/man4/filemon.4 | 4 +++- sys/conf/NOTES | 3 +++ sys/conf/options | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4 index 2561e1e89bf5..b6755494e432 100644 --- a/share/man/man4/filemon.4 +++ b/share/man/man4/filemon.4 @@ -29,13 +29,15 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 1, 2023 +.Dd July 30, 2024 .Dt FILEMON 4 .Os .Sh NAME .Nm filemon .Nd the filemon device .Sh SYNOPSIS +.Cd device filemon +.Pp .In dev/filemon/filemon.h .Sh DESCRIPTION The diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 2011f8edcc74..20465d9aaf32 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2859,3 +2859,6 @@ device xz # xz_embedded LZMA de-compression library # Kernel support for stats(3). options STATS + +# File system monitoring +device filemon # file monitoring for make(1) meta-mode diff --git a/sys/conf/options b/sys/conf/options index 37f09dc7ff3b..1d156ca41a49 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -105,7 +105,6 @@ CY_PCI_FASTINTR DEADLKRES opt_watchdog.h EXPERIMENTAL opt_global.h DIRECTIO -FILEMON opt_dontuse.h FFCLOCK FULL_PREEMPTION opt_sched.h GZIO opt_gzio.h From nobody Thu Aug 1 16:46:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZZcX564Rz5T32F; Thu, 01 Aug 2024 16:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZZcX48r0z4nJc; Thu, 1 Aug 2024 16:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n+/vAr0wWjpFHUSQtqipWFB4FQXreiZolpZdB+LsHvM=; b=gA2RZRIfFpjj4/gnM0jRmlZMcPnSlAMOZPh6/F12RleQHArlFbIXQRwODKQQHAUdcLoroH rmE0IbuqNTyOW71vHOm7dogUhctZcAQHGEjNIvGsLndaMm8S0UzSdCZx24c3O2Tn5kYKiO nqXV6/NuRVqh87Z5vPu2aQgdK9aYy0b+rE6+4vNz/Bcqgif/MqXhrdDsKC1l0TiOlg0/LN H5jj1MYLV5hj1yCY/lifwJyy0i6FobRrd+mmAI7XkDsIsJbwKNGGBJsTg5ylOBjGq5nIoS afzRK5VStTALaZBPtX4NnHmqwDPzfKfb+bEgxZauz27K2UzjWPmX92YsgwE/ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722530812; a=rsa-sha256; cv=none; b=Ae4I2QvKMH1g7IymhZzjFqoGkMw2wWzGQbEZWIu61Gj0fy3UUVDa2tpmizcC2lWCNZi9xW WqwrBDRMOAaqOjDIIojI3qjn27dbL9fnnxkCr+To1cHaFRyQ82mOmc2bOit+4lAJv7Fq2h aSBx5gv8zPdNCkNo541muWN5hMfgH7f7y3tSiOSOhUkcUOiDIMwewTmNYirB7y2dkwpDuq nmp0OFNZjVNrEPXkhkQdHSYQfA0M8yeAM2g/HXPYSACFxckz57yCc6L65OFbbLTqTpiqbY sAwcOV6gtRjObXyUbCIKluwOeSM50flQhGSDnYXMGGS6jty4Vu5COYd+of2mBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n+/vAr0wWjpFHUSQtqipWFB4FQXreiZolpZdB+LsHvM=; b=Q2E78QRuOHNd49RdzVkeV9y4v6L3iFw9fM8oRMW51hbu8Id9Rf+aAYoLQFOpnsUaESWoSn UuTIzuUCteRfv7gOJDO7v+meS5KZE/D/NUb8v8yEYvGuuPk11CjGiMO7DUGLnr6NTV5xBt WfpwxQGuIF6oWpKiLLtT3v1IvY0rERm9Gm36PhMuTVtto/T1+NVOuOaNutZdZrYHdjXZQ1 gDfCbF5UrCVyqqm7TvwD+5Dq+z3ZLO3dfe0uJsvOOcK6pl2A/r806Wt0Nacu0hBhUoCy/8 wl8RAXFEvkmTYUXBHsHdjXHXn4wNMuD8gdkjkHYImYRnkzqF/ZsY0H5I+vicCA== 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 4WZZcX3f5SzsSn; Thu, 1 Aug 2024 16:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GkqL9046463; Thu, 1 Aug 2024 16:46:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GkqPB046460; Thu, 1 Aug 2024 16:46:52 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:46:52 GMT Message-Id: <202408011646.471GkqPB046460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 600504767528 - stable/13 - ls: Make -, apply to -s as well as -l. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 600504767528cce6b0e4f9eb44e9d4cec856abc8 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=600504767528cce6b0e4f9eb44e9d4cec856abc8 commit 600504767528cce6b0e4f9eb44e9d4cec856abc8 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-24 20:06:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:42:33 +0000 ls: Make -, apply to -s as well as -l. While here, remove a bogus comment about a gcc bug. The bug was in ls, which used an incorrect format string, and in libc, which accepted it. MFC after: 1 week Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D46067 (cherry picked from commit 647d4a8cafd2c9b291cab388191bc7fcfe12a66b) --- bin/ls/ls.1 | 4 +++- bin/ls/ls.c | 3 ++- bin/ls/print.c | 14 ++++++-------- bin/ls/tests/ls_tests.sh | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/bin/ls/ls.1 b/bin/ls/ls.1 index e8b9835e6038..ccb9087dd764 100644 --- a/bin/ls/ls.1 +++ b/bin/ls/ls.1 @@ -31,7 +31,7 @@ .\" .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" -.Dd October 31, 2022 +.Dd July 22, 2024 .Dt LS 1 .Os .Sh NAME @@ -439,6 +439,8 @@ output is not to a terminal. .It Fl , (Comma) When the .Fl l +or +.Fl s option is set, print file sizes grouped and separated by thousands using the non-monetary separator returned by .Xr localeconv 3 , diff --git a/bin/ls/ls.c b/bin/ls/ls.c index a04e455e8b06..6338e8c19581 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -968,7 +968,8 @@ label_out: d.maxlen = maxlen; if (needstats) { d.btotal = btotal; - d.s_block = snprintf(NULL, 0, "%lu", howmany(maxblock, blocksize)); + d.s_block = snprintf(NULL, 0, f_thousands ? "%'ld" : "%ld", + howmany(maxblock, blocksize)); d.s_flags = maxflags; d.s_label = maxlabelstr; d.s_group = maxgroup; diff --git a/bin/ls/print.c b/bin/ls/print.c index 3d6feff1fdb7..e67596c198ba 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -227,7 +227,7 @@ printlong(const DISPLAY *dp) (void)printf("%*ju ", dp->s_inode, (uintmax_t)sp->st_ino); if (f_size) - (void)printf("%*jd ", + (void)printf(f_thousands ? "%'*jd " : "%*jd ", dp->s_block, howmany(sp->st_blocks, blocksize)); strmode(sp->st_mode, buf); aclmode(buf, p); @@ -404,7 +404,7 @@ printaname(const FTSENT *p, u_long inodefield, u_long sizefield) chcnt += printf("%*ju ", (int)inodefield, (uintmax_t)sp->st_ino); if (f_size) - chcnt += printf("%*jd ", + chcnt += printf(f_thousands ? "%'*jd " : "%*jd ", (int)sizefield, howmany(sp->st_blocks, blocksize)); #ifdef COLORLS if (f_color) @@ -757,12 +757,10 @@ printsize(size_t width, off_t bytes) humanize_number(buf, sizeof(buf), (int64_t)bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); (void)printf("%*s ", (u_int)width, buf); - } else if (f_thousands) { /* with commas */ - /* This format assignment needed to work round gcc bug. */ - const char *format = "%*j'd "; - (void)printf(format, (u_int)width, bytes); - } else - (void)printf("%*jd ", (u_int)width, bytes); + } else { + (void)printf(f_thousands ? "%'*jd " : "%*jd ", + (u_int)width, bytes); + } } /* diff --git a/bin/ls/tests/ls_tests.sh b/bin/ls/tests/ls_tests.sh index 682682691b7a..780376b9de3c 100755 --- a/bin/ls/tests/ls_tests.sh +++ b/bin/ls/tests/ls_tests.sh @@ -799,6 +799,21 @@ s_flag_body() done } +atf_test_case scomma_flag +scomma_flag_head() +{ + atf_set "descr" "Verify that -s, prints out the size with ',' delimiters" +} + +scomma_flag_body() +{ + export LC_ALL=en_US.UTF-8 + atf_check -e ignore dd if=/dev/urandom of=file bs=65536 count=64 + blocks=$(stat -f "%b" file) + cblocks=$(printf "%'d" $blocks) + atf_check -e empty -o match:"$cblocks[[:space:]]+file" ls -s, file +} + atf_test_case t_flag t_flag_head() { @@ -971,6 +986,7 @@ atf_init_test_cases() atf_add_test_case q_flag_and_w_flag atf_add_test_case r_flag atf_add_test_case s_flag + atf_add_test_case scomma_flag atf_add_test_case t_flag atf_add_test_case u_flag atf_add_test_case v_flag From nobody Thu Aug 1 16:46:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZZcY690jz5T32J; Thu, 01 Aug 2024 16:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZZcY54h4z4mlZ; Thu, 1 Aug 2024 16:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=02f/17IhFAxoxDiz+/DnJ3ykvOggx4A6+nZicqaWZAc=; b=PKzGfAMrCzdfNNxCY73pYSNO9GLSFJZ7ibtkFaVTFJVE6SHb99GhXSlu50yOueKN4pCIv/ cH9MihAL+S1GN1in7NKjCA/kS+o30XDQMHw6qW+0LHnAj8KptDl1cY2brT1pZqyuYBhOGs 8QgtvoLm8GWd0ioRTJjAAvaX0eO6rcBGSjqpkPk3EAYYemH1UoQVmr0/sgatHJmgbNaOns DMJ95Ewdfu1jn+dySwRtSeuqehKtt9TBujschRhO3+RL5n7mXjNaZKtzlXtO4/7c8+yJcx XBj4wETDDBzTFXsa+2eSfxLnxJ49SuxscNzQm9fS8OlkmS1HvGEs0oFJKxTniQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722530813; a=rsa-sha256; cv=none; b=fzil5S4vSnoLRbZqxnHJqsXVFZYPzCWNxvz5bV5f17EAxfRlthZ9IUcZyQFTtegd+sWsNt IYpzhJQlXyEHftCuAGsH1DAOSvGIII2BEtSMBaBInMFeF3jUYDqrMgJB0Nc4eLick08bgX VNzd6jNv8v5TqEtiGA6TjdaaHKYTYneKe4WaFQC2AFxYZ9CVSt3wRUTvCC1ZtWtoDBYsFX D4nfun5Cf3OPeTZlgxzusJZeiNG/Pg5DHJf2WsehxeSNeEiaY2aPU3RrkOHBcLJrdIDcnU Cq+Tf+WJbWPt/O00JCGDWNFpuewhP9L9DLmP9hrLJmG3c8/HqvEiGlqYtdObUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=02f/17IhFAxoxDiz+/DnJ3ykvOggx4A6+nZicqaWZAc=; b=WudgGcJMzfk0etramTKWPmHEGHRVFHTLFL+yVNMoerZgq4jW2Bpxl/H4HtrJnkFk7Y5Csx 22t1qgmKMeEud8HmdSMj9NjqICdpS3RPel8PInzUDa4jX+hyJIgLPkiyEL3ycG4q0QqxvM poW0PaodvvN3rTYi5oxONUMHRGp07EtorAM2vqCROXCx5vf9goB9jEhNTbfyNI+iuKe/d2 h7D+VNIcXi4KnSzUaD3+9rVGx2GsyVKsbWK3nwV1a2kIGSZk4l+oeR/FX3ENYihY52pWho hHvCHPGYWwtkuihqgCq5Yfd+5fAlhkP+sJiRxtaUdulpexKJKtKkGu38UFkWhQ== 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 4WZZcY4PtjzsFN; Thu, 1 Aug 2024 16:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GkrKc046514; Thu, 1 Aug 2024 16:46:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Gkrwp046511; Thu, 1 Aug 2024 16:46:53 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:46:53 GMT Message-Id: <202408011646.471Gkrwp046511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b7834095749d - stable/13 - pax: Clear arcn in each read function. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: b7834095749d56d7d35871918ed371f133fcb624 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b7834095749d56d7d35871918ed371f133fcb624 commit b7834095749d56d7d35871918ed371f133fcb624 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-24 20:06:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:42:34 +0000 pax: Clear arcn in each read function. Instead of initializing individual fields to zero, clear the entire struct prior to populating it. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D46097 (cherry picked from commit f890020d43bf2070f12ffec37bcd9579f6fb1347) --- bin/pax/cpio.c | 12 +++--------- bin/pax/tar.c | 20 ++------------------ 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c index 76edca3c6f91..0b5b95bb5ef5 100644 --- a/bin/pax/cpio.c +++ b/bin/pax/cpio.c @@ -280,13 +280,13 @@ cpio_rd(ARCHD *arcn, char *buf) */ if (cpio_id(buf, sizeof(HD_CPIO)) < 0) return(-1); + memset(arcn, 0, sizeof *arcn); hd = (HD_CPIO *)buf; /* * byte oriented cpio (posix) does not have padding! extract the octal * ascii fields from the header */ - arcn->pad = 0L; arcn->sb.st_dev = (dev_t)asc_ul(hd->c_dev, sizeof(hd->c_dev), OCT); arcn->sb.st_ino = (ino_t)asc_ul(hd->c_ino, sizeof(hd->c_ino), OCT); arcn->sb.st_mode = (mode_t)asc_ul(hd->c_mode, sizeof(hd->c_mode), OCT); @@ -315,8 +315,6 @@ cpio_rd(ARCHD *arcn, char *buf) /* * no link name to read for this file */ - arcn->ln_nlen = 0; - arcn->ln_name[0] = '\0'; return(com_rd(arcn)); } @@ -561,8 +559,8 @@ vcpio_rd(ARCHD *arcn, char *buf) return(-1); } + memset(arcn, 0, sizeof *arcn); hd = (HD_VCPIO *)buf; - arcn->pad = 0L; /* * extract the hex ascii fields from the header @@ -609,8 +607,6 @@ vcpio_rd(ARCHD *arcn, char *buf) /* * we have a valid header (not a link) */ - arcn->ln_nlen = 0; - arcn->ln_name[0] = '\0'; arcn->pad = VCPIO_PAD(arcn->sb.st_size); return(com_rd(arcn)); } @@ -857,7 +853,7 @@ bcpio_rd(ARCHD *arcn, char *buf) if (bcpio_id(buf, sizeof(HD_BCPIO)) < 0) return(-1); - arcn->pad = 0L; + memset(arcn, 0, sizeof *arcn); hd = (HD_BCPIO *)buf; if (swp_head) { /* @@ -919,8 +915,6 @@ bcpio_rd(ARCHD *arcn, char *buf) /* * we have a valid header (not a link) */ - arcn->ln_nlen = 0; - arcn->ln_name[0] = '\0'; arcn->pad = BCPIO_PAD(arcn->sb.st_size); return(com_rd(arcn)); } diff --git a/bin/pax/tar.c b/bin/pax/tar.c index cbe2dbab64f8..785dd32c4838 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -373,9 +373,9 @@ tar_rd(ARCHD *arcn, char *buf) */ if (tar_id(buf, BLKMULT) < 0) return(-1); + memset(arcn, 0, sizeof *arcn); arcn->org_name = arcn->name; arcn->sb.st_nlink = 1; - arcn->pat = NULL; /* * copy out the name and values in the stat buffer @@ -402,8 +402,6 @@ tar_rd(ARCHD *arcn, char *buf) * to encode this as a directory */ pt = &(arcn->name[arcn->nlen - 1]); - arcn->pad = 0; - arcn->skip = 0; switch(hd->linkflag) { case SYMTYPE: /* @@ -440,8 +438,6 @@ tar_rd(ARCHD *arcn, char *buf) arcn->type = PAX_DIR; arcn->sb.st_mode |= S_IFDIR; arcn->sb.st_nlink = 2; - arcn->ln_name[0] = '\0'; - arcn->ln_nlen = 0; break; case AREGTYPE: case REGTYPE: @@ -449,8 +445,6 @@ tar_rd(ARCHD *arcn, char *buf) /* * If we have a trailing / this is a directory and NOT a file. */ - arcn->ln_name[0] = '\0'; - arcn->ln_nlen = 0; if (*pt == '/') { /* * it is a directory, set the mode for -v printing @@ -727,10 +721,9 @@ ustar_rd(ARCHD *arcn, char *buf) */ if (ustar_id(buf, BLKMULT) < 0) return(-1); + memset(arcn, 0, sizeof *arcn); arcn->org_name = arcn->name; arcn->sb.st_nlink = 1; - arcn->pat = NULL; - arcn->nlen = 0; hd = (HD_USTAR *)buf; /* @@ -777,15 +770,6 @@ ustar_rd(ARCHD *arcn, char *buf) if (uid_name(hd->uname, &(arcn->sb.st_uid)) < 0) arcn->sb.st_uid = (uid_t)asc_ul(hd->uid, sizeof(hd->uid), OCT); - /* - * set the defaults, these may be changed depending on the file type - */ - arcn->ln_name[0] = '\0'; - arcn->ln_nlen = 0; - arcn->pad = 0; - arcn->skip = 0; - arcn->sb.st_rdev = (dev_t)0; - /* * set the mode and PAX type according to the typeflag in the header */ From nobody Thu Aug 1 16:46:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZZcb11vsz5T2ph; Thu, 01 Aug 2024 16:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZZcZ5s5jz4nB0; Thu, 1 Aug 2024 16:46:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6vAWTzOtJ/4H/I0MpqcSShSJsGWtRRS2dymQJDgWpS0=; b=Nk5Sw2ArGw3GLcqp74slB80NiOpzD2A7tE8I2WI4rPUJYubeXGQCY+ZLt8/Q09PVd/pOrv wJ72RYLANTcRvubvoueH9c9mu575eX8gK6EdQUn42X/hzwrZtSnIKsu55/kZoUkjOVl703 OByRrkces4opd/nrBviUgSNpNG9jPL0qdrQWfhqwq8C/s34detNxOW3KoypNBMqjdFRbzR BO25xYHrHWZcW8MNQ/Z00A/dubyy8ysYaakwLUXeL6WmsWVLZODU3vG9T7BOgAXK6E1OuC sOkvu3fvu6+8fU4NfsSv3/QJtk34RbtiyQQTal7cQ/NFfNTLGUZroLM25yxSHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722530814; a=rsa-sha256; cv=none; b=vRHpDw5opqluxrJr/tVlGzakviKtLd1DjK0sPpV6zDVXrKbefiLAkC8+WcZ1iWXo/ZNep+ Oe0F/Q0ljnKkZBfwEzFk/uaOeyHsqD/1CpJA1SBmm/+ZdmhsXdQjQxN3sm/BLuZ1e+Ydot 1OpjgEKD2lodsNYF3y7vORM5ok8DW08cuUInN5SvY3rhIFR8QbYiBNLsr+l8rPOwUlvjWC YJ4m0T59D0xKxsNGsEjUkbtf0MFdKNAX8ohy8eKu/QZ9oTL31583EKhpgnhzRK9x7dZDTt 7hv3UQqgr3s7SyJeCDb1Q8hGpfc19h/S1pgxUw7QVVN2Ugqymq86pq4jyT0XcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6vAWTzOtJ/4H/I0MpqcSShSJsGWtRRS2dymQJDgWpS0=; b=bknKrObx/RdDAQ9UHntW1yC3pDQ3ykRhxww1TDobYnCkQ012AL39e7U2Vlt3ARtzlXEm9m OfIFc1ra4q6+UX/dKM3EtOoRLWuq+r5rpEcyQYhTkICuLSTcC23ww5948OK1asD/p29QTW I93mLxRcepbwR5lAhW50Pji9OXl0TLc1o23sxfvRf2Ks8AN1+oGSeccMMJFh6eYDZ4JXwh MdWL+L9bjpgpgjsiqX9I3H+Ef2B2V0VWO0wXNeLnVzj/kYqjgHQ3p+It8e7WVC8JpO82KV JJPyhwoccq9yJx+Szbf4ypYdHv9vbPia2Qcsh9b5xKyPGJhPmNiwio09wuTJkg== 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 4WZZcZ5R6czsps; Thu, 1 Aug 2024 16:46:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471Gksw2046562; Thu, 1 Aug 2024 16:46:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GksoO046559; Thu, 1 Aug 2024 16:46:54 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:46:54 GMT Message-Id: <202408011646.471GksoO046559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ae8b85ac1125 - stable/13 - diff: Fix usage message and documentation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: ae8b85ac11257f1166dfe25c354bf0d4bd64b98d Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ae8b85ac11257f1166dfe25c354bf0d4bd64b98d commit ae8b85ac11257f1166dfe25c354bf0d4bd64b98d Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:43:02 +0000 diff: Fix usage message and documentation. The `--ignore-all-space` option was incorrectly documented as `--ignore-all-blanks` in some (but not all) places. MFC after: 3 days PR: 280434 Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D46160 (cherry picked from commit ab830de9f58c1b257e42b4fbdd46b3ca6a837ee6) --- usr.bin/diff/diff.1 | 6 +++--- usr.bin/diff/diff.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index 19c4fa0579f3..c75e2ec95de0 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -29,7 +29,7 @@ .\" .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" -.Dd June 19, 2020 +.Dd July 26, 2024 .Dt DIFF 1 .Os .Sh NAME @@ -184,7 +184,7 @@ .Nm diff .Op Fl aBbditwW .Op Fl -expand-tabs -.Op Fl -ignore-all-blanks +.Op Fl -ignore-all-space .Op Fl -ignore-blank-lines .Op Fl -ignore-case .Op Fl -minimal @@ -380,7 +380,7 @@ output adds character(s) to the front of each line which may screw up the indentation of the original source lines and make the output listing difficult to interpret. This option will preserve the original source's indentation. -.It Fl w -ignore-all-blanks +.It Fl w -ignore-all-space Is similar to .Fl b -ignore-space-change but causes whitespace (blanks and tabs) to be totally ignored. diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index a5128944674b..71f0ac94c7ab 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -532,7 +532,7 @@ usage(void) " diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--tabsize] [-I pattern] [-L label]\n" " [-S name] [-X file] [-x pattern] dir1 dir2\n" - " diff [-aBbditwW] [--expand-tabs] [--ignore-all-blanks]\n" + " diff [-aBbditwW] [--expand-tabs] [--ignore-all-space]\n" " [--ignore-blank-lines] [--ignore-case] [--minimal]\n" " [--no-ignore-file-name-case] [--strip-trailing-cr]\n" " [--suppress-common-lines] [--tabsize] [--text] [--width]\n" From nobody Thu Aug 1 16:46:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZZcc2rmGz5T2pk; Thu, 01 Aug 2024 16:46: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZZcb6nTcz4n7c; Thu, 1 Aug 2024 16:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XQrfM/hoT8fBy7MwgXsM1202z82jDcrsr6nLTLDlMtg=; b=xfFubXf8AtXHMRt4QnMcq+iz/wNMwb48UB6EZYjC5F8W3VKYambm73mRvSPgL+urldM3wQ xkJAlTvQA3fHYie27kGYaaK5BlTKMKrLD6lkyKYY2e3/gEv/w43Nnb0ajJ3AGv0b0D6A7y aBshqxg8/c8PZ8Ncf/h32VRXhKc+DhdNC+gqQaYM6w+Dx7rRQezIADSvr7qHHgA2DCcVLX q3/dzT1ge/JdRS+YgTnY9DdhYCepe6Z/H8Tec8TnbOqnY+4waRMHsiq7Jpbi0lyu/bKY6O kBeNlIkeYYHUOAQcj0hLvnWG1VCA1eALU9SiphaE52rnk8yrc/KWx+16JRcUtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722530816; a=rsa-sha256; cv=none; b=L52ulct4KjNv7eTnmRGlYkHCMmFL7wP5pehq7m4P9t5V1CWBOyDgiWwNoLQiYnQBe77B3i 0jomJVWezUr/q1nI34HuepWC26iWu1BoOjASJFQUK08hdRn80d89nYa/NGihQqQr4geSB8 WVJbqbhcZFXJmjeoKQLUX0ho64C+LETzbxqE2ow/KAZRkq7PPhstzXyxJ1SsLW2nPOQqq7 lWwunm3nRuUKpZjruDLUdZCib376kbw+tLJ/a78OD4yfdBzIRJEedPXD61VSq33xSacDvw ZCoHmcUr/Clvy+JoDLrCmPlkARhBUVFeFPhLxy40MgbkLLWxWixQ2QpNW9iVJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XQrfM/hoT8fBy7MwgXsM1202z82jDcrsr6nLTLDlMtg=; b=XYJ0dIyISLKSLDIId1HT3zuRjFFy4ND7Iss/qk2h23ad26ZaXJGKqmiTxIUGwy15uhamEz spQ7F5FE1OqNyePIjJ3U6HqhF8B8fp7TaXBV6GU5imb4le6m0ORMAumM5Masxre8FvQwbb LcvULKU5tcNg/h5PpkKzVZZMZaiU1Kjx1Lt0uUSBDJZNkikffgQEpRyT0qmQqZMBOGGwD8 hhlRYJyzX8K57j7ITLDWazCICFKrDZisfim6MSghtgkDyl51k60jRmKLki9RAmfrMldxgx OpJTKwyV5pgvFoXlQUNq0R040liw5MNDSHN/ejY837BeGRiteOei4YE8f+pFMw== 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 4WZZcb6Q2BzsSp; Thu, 1 Aug 2024 16:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GktWj046607; Thu, 1 Aug 2024 16:46:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GktLi046604; Thu, 1 Aug 2024 16:46:55 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:46:55 GMT Message-Id: <202408011646.471GktLi046604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 9c2b6778b2f1 - stable/13 - sdiff: Misc cleanup. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9c2b6778b2f1f7e7355846ce28c80a88ae462cb4 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9c2b6778b2f1f7e7355846ce28c80a88ae462cb4 commit 9c2b6778b2f1f7e7355846ce28c80a88ae462cb4 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-18 17:39:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:43:03 +0000 sdiff: Misc cleanup. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43943 (cherry picked from commit 3cc86989bfbe27c91b5db592c2af33fef153e230) --- usr.bin/sdiff/sdiff.c | 102 +++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 52 deletions(-) diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index b863d5875db6..3dcf18caed0c 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include @@ -19,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -69,11 +69,11 @@ static STAILQ_HEAD(, diffline) diffhead = STAILQ_HEAD_INITIALIZER(diffhead); static size_t line_width; /* width of a line (two columns and divider) */ static size_t width; /* width of each column */ static size_t file1ln, file2ln; /* line number of file1 and file2 */ -static int Iflag = 0; /* ignore sets matching regexp */ -static int lflag; /* print only left column for identical lines */ -static int sflag; /* skip identical lines */ -FILE *outfp; /* file to save changes to */ -const char *tmpdir; /* TMPDIR or /tmp */ +static bool Iflag; /* ignore sets matching regexp */ +static bool lflag; /* print only left column for identical lines */ +static bool sflag; /* skip identical lines */ +FILE *outfp; /* file to save changes to */ +const char *tmpdir; /* TMPDIR or /tmp */ enum { HELP_OPT = CHAR_MAX + 1, @@ -206,14 +206,13 @@ FAIL: int main(int argc, char **argv) { - FILE *diffpipe=NULL, *file1, *file2; - size_t diffargc = 0, wflag = WIDTH; - int ch, fd[2] = {-1}, status; - pid_t pid=0; - const char *outfile = NULL; - char **diffargv, *diffprog = diff_path, *filename1, *filename2, - *tmp1, *tmp2, *s1, *s2; - int i; + FILE *diffpipe, *file1, *file2; + size_t diffargc = 0, flagc = 0, wval = WIDTH; + int ch, fd[2], i, status; + pid_t pid; + const char *errstr, *outfile = NULL; + char **diffargv, *diffprog = diff_path, *flagv; + char *filename1, *filename2, *tmp1, *tmp2, *s1, *s2; char I_arg[] = "-I"; char speed_lf[] = "--speed-large-files"; @@ -228,20 +227,21 @@ main(int argc, char **argv) * waste some memory; however we need an extra space for the * NULL at the end, so it sort of works out. */ - if (!(diffargv = calloc(argc, sizeof(char **) * 2))) - err(2, "main"); + if ((diffargv = calloc(argc, sizeof(char *) * 2)) == NULL) + err(2, NULL); /* Add first argument, the program name. */ diffargv[diffargc++] = diffprog; - /* create a dynamic string for merging single-switch options */ - if ( asprintf(&diffargv[diffargc++], "-") < 0 ) - err(2, "main"); + /* create a dynamic string for merging single-character options */ + if ((flagv = malloc(flagc + 2)) == NULL) + err(2, NULL); + flagv[flagc] = '-'; + flagv[flagc + 1] = '\0'; + diffargv[diffargc++] = flagv; while ((ch = getopt_long(argc, argv, "aBbdEHI:ilo:stWw:", longopts, NULL)) != -1) { - const char *errstr; - switch (ch) { /* only compatible --long-name-form with diff */ case FCASE_IGNORE_OPT: @@ -259,14 +259,13 @@ main(int argc, char **argv) case 'i': case 't': case 'W': - diffargv[1] = realloc(diffargv[1], sizeof(char) * strlen(diffargv[1]) + 2); + flagc++; + flagv = realloc(flagv, flagc + 2); /* * In diff, the 'W' option is 'w' and the 'w' is 'W'. */ - if (ch == 'W') - sprintf(diffargv[1], "%sw", diffargv[1]); - else - sprintf(diffargv[1], "%s%c", diffargv[1], ch); + flagv[flagc] = ch == 'W' ? 'w' : ch; + flagv[flagc + 1] = '\0'; break; case 'H': diffargv[diffargc++] = speed_lf; @@ -275,21 +274,21 @@ main(int argc, char **argv) diffargv[0] = diffprog = optarg; break; case 'I': - Iflag = 1; + Iflag = true; diffargv[diffargc++] = I_arg; diffargv[diffargc++] = optarg; break; case 'l': - lflag = 1; + lflag = true; break; case 'o': outfile = optarg; break; case 's': - sflag = 1; + sflag = true; break; case 'w': - wflag = strtonum(optarg, WIDTH_MIN, + wval = strtonum(optarg, WIDTH_MIN, INT_MAX, &errstr); if (errstr) errx(2, "width is %s: %s", errstr, optarg); @@ -305,13 +304,12 @@ main(int argc, char **argv) } } - /* no single switches were used */ - if (strcmp(diffargv[1], "-") == 0 ) { - for ( i = 1; i < argc-1; i++) { - diffargv[i] = diffargv[i+1]; - } - diffargv[diffargc-1] = NULL; + /* no single-character options were used */ + if (flagc == 0) { + memmove(diffargv + 1, diffargv + 2, + sizeof(char *) * (diffargc - 2)); diffargc--; + free(flagv); } argc -= optind; @@ -356,7 +354,7 @@ main(int argc, char **argv) diffargv[diffargc++] = NULL; /* Subtract column divider and divide by two. */ - width = (wflag - 3) / 2; + width = (wval - 3) / 2; /* Make sure line_width can fit in size_t. */ if (width > (SIZE_MAX - 3) / 2) errx(2, "width is too large: %zu", width); @@ -365,21 +363,18 @@ main(int argc, char **argv) if (pipe(fd)) err(2, "pipe"); - switch (pid = fork()) { - case 0: + if ((pid = fork()) < 0) + err(1, "fork()"); + if (pid == 0) { /* child */ /* We don't read from the pipe. */ close(fd[0]); - if (dup2(fd[1], STDOUT_FILENO) == -1) - err(2, "child could not duplicate descriptor"); + if (dup2(fd[1], STDOUT_FILENO) != STDOUT_FILENO) + _exit(2); /* Free unused descriptor. */ close(fd[1]); execvp(diffprog, diffargv); - err(2, "could not execute diff: %s", diffprog); - break; - case -1: - err(2, "could not fork"); - break; + _exit(2); } /* parent */ @@ -453,6 +448,9 @@ main(int argc, char **argv) processq(); /* Return diff exit status. */ + free(diffargv); + if (flagc > 0) + free(flagv); return (WEXITSTATUS(status)); } @@ -552,7 +550,7 @@ prompt(const char *s1, const char *s2) const char *p; /* Skip leading whitespace. */ - for (p = cmd; isspace(*p); ++p) + for (p = cmd; isspace((unsigned char)*p); ++p) ; switch (*p) { case 'e': @@ -578,10 +576,10 @@ prompt(const char *s1, const char *s2) /* End of command parsing. */ break; case 's': - sflag = 1; + sflag = true; goto PROMPT; case 'v': - sflag = 0; + sflag = false; /* FALLTHROUGH */ default: /* Interactive usage help. */ @@ -702,7 +700,7 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) p = line; /* Go to character after line number. */ - while (isdigit(*p)) + while (isdigit((unsigned char)*p)) ++p; c = *p; *p++ = 0; @@ -714,7 +712,7 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) if (c == ',') { q = p; /* Go to character after file2end. */ - while (isdigit(*p)) + while (isdigit((unsigned char)*p)) ++p; c = *p; *p++ = 0; @@ -733,7 +731,7 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) q = p; /* Go to character after line number. */ - while (isdigit(*p)) + while (isdigit((unsigned char)*p)) ++p; c = *p; *p++ = 0; From nobody Thu Aug 1 16:46:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZZcf42Xnz5T3H6; Thu, 01 Aug 2024 16:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZZcf1hYKz4n7r; Thu, 1 Aug 2024 16:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vCD7Zlialsq9M0AjRyXeu7R6M2dbi6toK6kc112ISnU=; b=h2apHqto7fWwxlRCKl8NaVThpZCPCQzT+7Xx9YCEaEsgGt4xI4sDH6wB3L3MieYlCoFjmN Yk2AUZetvhxpQNVvsQS89HVX2I/XXn6HsSXiknCDvIc2PpKJHWcTAU/37oI/4MVq1nctcr lDY1bqh7mruEymIDOz2fdSnqH5Ri1foaB4OOJ4GmvtKq1nyw6lJLw86bkCwo70UKiGbsnx xux0KGr7B1vYsCD8uS0wa43vwL1S0mSVHaIDPKsbec4PCpWlhQssY+vNgW5hA05mFJP78Q zDQ34UVJV5DDYqTkVueyBXux105qpFbLbjgv9Dxteb52dasop9yca0rY1qnXfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722530818; a=rsa-sha256; cv=none; b=JlF0fIYSL4X2DeF7DggZYFpS0UE/R7ZtF83ryDIGfVhe3Tj9BEXc9Fpg7MN3FfuYxqFZ2+ Q3KyNqRCbRvUDxisKF3dNquG4kOiePmSUuUmztEkvOtIYdB3KrqWdg2+5DNLlavDOKypuP /RgmExif71uuD7AW83I60V8f0rlbMefMmsTlfnf1KIsanOfkmrIu+7EDw99p+REuU6fpyo E8q5+aIttADfiIeyNemvSK0w+1VGwQAJAu364OwX0lELs2PJcK9r2aYfCOd0Dxmn+e3HHr zjZzv1aeEWSjKbW1w7FvUS5DhVbgU+FUnQMwq1nspTOLR/q/pgw+JeCnvYeYuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vCD7Zlialsq9M0AjRyXeu7R6M2dbi6toK6kc112ISnU=; b=tMTGs4BKb7ivxCiE4Ufji6O8hSuR+J04gNWnzFQ2BGEkGh9Hp0GIn/rWIuyIGIJY0fW2Pj kwnauiIAGmldPulroIKfFTZ8MgX+J4veK4ssGcVSCWlizRkxK5fP2zmopfwNYrLz/7NsJ7 VZSVDuTu0+vXQIkYyrkWVciIGm8QGO8px3h72dxTLHjzAbPnf61+HSqSZRROp0N5ij2HpJ SMAo93c499kE6m1/cYGDOCRMaSirNJTAY+K+34VMTGJC9Eyz4zvBRVnOlOKd/Ok9IWc2nb fAsJFvsgZVnemq3WfijTJc4tLq4WAEgW9wmWHMFch8E4ItGm+/XjQGuRlZ+jYA== 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 4WZZcf1Ftszrnt; Thu, 1 Aug 2024 16:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GkwEg046696; Thu, 1 Aug 2024 16:46:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471GkwrN046693; Thu, 1 Aug 2024 16:46:58 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:46:58 GMT Message-Id: <202408011646.471GkwrN046693@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c14665b4aee7 - stable/13 - diff: Fix integer overflow. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c14665b4aee7e1594467bac4a9d9cc5c66173975 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c14665b4aee7e1594467bac4a9d9cc5c66173975 commit c14665b4aee7e1594467bac4a9d9cc5c66173975 Author: Dag-Erling Smørgrav AuthorDate: 2024-07-29 14:02:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:46:19 +0000 diff: Fix integer overflow. The legacy Stone algorithm uses `int` to represent line numbers, array indices, and array lengths. If given inputs approaching `INT_MAX` lines, it would overflow and attempt to allocate ridiculously large amounts of memory. To avoid this without penalizing non-pathological inputs, switch a few variables to `size_t` and add checks while and immediately after reading both inputs. MFC after: 3 days PR: 280371 Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D46169 (cherry picked from commit 9317242469f1ca682626d9806f8caf65d143c09a) --- usr.bin/diff/diffreg.c | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index a73020c44a80..fb01fa24a281 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -217,9 +217,9 @@ static int *klist; /* will be overlaid on file[0] after class */ static int *member; /* will be overlaid on file[1] */ static int clen; static int inifdef; /* whether or not we are in a #ifdef block */ -static int len[2]; -static int pref, suff; /* length of prefix and suffix */ -static int slen[2]; +static size_t len[2]; /* lengths of files in lines */ +static size_t pref, suff; /* lengths of prefix and suffix */ +static size_t slen[2]; /* lengths of files minus pref / suff */ static int anychange; static int hw, padding; /* half width and padding */ static int edoffset; @@ -391,6 +391,10 @@ diffreg(char *file1, char *file2, int flags, int capsicum) status |= 1; goto closem; } + if (len[0] > INT_MAX - 2) + errc(1, EFBIG, "%s", file1); + if (len[1] > INT_MAX - 2) + errc(1, EFBIG, "%s", file2); prune(); sort(sfile[0], slen[0]); @@ -529,18 +533,17 @@ prepare(int i, FILE *fd, size_t filesize, int flags) sz = 100; p = xcalloc(sz + 3, sizeof(*p)); - while ((r = readhash(fd, flags, &h)) != RH_EOF) - switch (r) { - case RH_EOF: /* otherwise clang complains */ - case RH_BINARY: + while ((r = readhash(fd, flags, &h)) != RH_EOF) { + if (r == RH_BINARY) return (false); - case RH_OK: - if (j == sz) { - sz = sz * 3 / 2; - p = xreallocarray(p, sz + 3, sizeof(*p)); - } - p[++j].value = h; + if (j == SIZE_MAX) + break; + if (j == sz) { + sz = sz * 3 / 2; + p = xreallocarray(p, sz + 3, sizeof(*p)); } + p[++j].value = h; + } len[i] = j; file[i] = p; @@ -551,7 +554,7 @@ prepare(int i, FILE *fd, size_t filesize, int flags) static void prune(void) { - int i, j; + size_t i, j; for (pref = 0; pref < len[0] && pref < len[1] && file[0][pref + 1].value == file[1][pref + 1].value; @@ -708,7 +711,7 @@ static void unravel(int p) { struct cand *q; - int i; + size_t i; for (i = 0; i <= len[0]; i++) J[i] = i <= pref ? i : @@ -735,7 +738,7 @@ check(FILE *f1, FILE *f2, int flags) ixold[0] = ixnew[0] = 0; jackpot = 0; ctold = ctnew = 0; - for (i = 1; i <= len[0]; i++) { + for (i = 1; i <= (int)len[0]; i++) { if (J[i] == 0) { ixold[i] = ctold += skipline(f1); continue; @@ -835,7 +838,7 @@ check(FILE *f1, FILE *f2, int flags) ixnew[j] = ctnew; j++; } - for (; j <= len[1]; j++) { + for (; j <= (int)len[1]; j++) { ixnew[j] = ctnew += skipline(f2); } /* @@ -1488,9 +1491,9 @@ dump_context_vec(FILE *f1, FILE *f2, int flags) b = d = 0; /* gcc */ lowa = MAX(1, cvp->a - diff_context); - upb = MIN(len[0], context_vec_ptr->b + diff_context); + upb = MIN((int)len[0], context_vec_ptr->b + diff_context); lowc = MAX(1, cvp->c - diff_context); - upd = MIN(len[1], context_vec_ptr->d + diff_context); + upd = MIN((int)len[1], context_vec_ptr->d + diff_context); printf("***************"); if ((flags & D_PROTOTYPE)) { @@ -1591,9 +1594,9 @@ dump_unified_vec(FILE *f1, FILE *f2, int flags) b = d = 0; /* gcc */ lowa = MAX(1, cvp->a - diff_context); - upb = MIN(len[0], context_vec_ptr->b + diff_context); + upb = MIN((int)len[0], context_vec_ptr->b + diff_context); lowc = MAX(1, cvp->c - diff_context); - upd = MIN(len[1], context_vec_ptr->d + diff_context); + upd = MIN((int)len[1], context_vec_ptr->d + diff_context); printf("@@ -"); uni_range(lowa, upb); From nobody Thu Aug 1 16:46:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZZcd5vRCz5T3Dc; Thu, 01 Aug 2024 16:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZZcd0nnYz4nGy; Thu, 1 Aug 2024 16:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0fA4c8UaMAsp/+qjhBS0mKdb9bCLrrRCsnP+rZGunoQ=; b=LN7HAjeFOfOZo80d0gTG7kSbFmXb/kk9pIMcvGQOzwAQRZZhTgqObhD3JSa+Q2wMenXwgp VCoViqZQx8KlQU3fFr1LRpcJvQFAVbptvXJnrIEplRUHwwGFfODo41ogBOjpvcvfx+qANW X9h3gSnDtRzC0rlBPKAmnZ64MBqqEK546JON7ClD9sa5w5c0E6I7pP0thp8VT5MXIIGY0C zeoZvQlh8RS9TEGbJpxke8v6otmaAL6sfXC0UY9fCtcmbYRlYwUJzy6CuQdtwGsb8zRrSK ByMRyggishrHe12O8a/vKB5WsFFgLiog8XhorV3y8anad8kGOgA8oUvVhXPIvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722530817; a=rsa-sha256; cv=none; b=ZoSAGIP+YeycL+v1HpcSxQBEg98t/DEqsoT/LrshNAn5PmaPnmWOlQb8ljZ2pXzByC6Gcr Sc/SR8c5CeXruKVDa/4nRi/d+zGXv495LmT92Hn6iNTn0tBxm4nWmAOwKoJfUTbkfe8RGN jTMrGIE6p363vkUTpAMXINwwb52N+o+qEVOBEsvL50fc56NHvv1+VyMrFI7dw4kvPPEHwW GD/U89Ken7CR9wGI3aF0j5WKsW6IJ9TabEtQeWFFquZiVdLXdwlBoUutmS8j495mWLV30v pY+sY5vtLUDGyKkog3dz/nP5JlxLhVsJjmt4uecy54pGCwvySTfoLcgewwce6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722530817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0fA4c8UaMAsp/+qjhBS0mKdb9bCLrrRCsnP+rZGunoQ=; b=iNIgcfPaX2Nyz2qhmxFnlMd95oa2bK4s9QTlYegqp+fCnGl0RkXQt5cCAS/RatWbgDMx8D zc7Qd2or4Fy2Owino73UtHbd7fg4+agPpGDNAug2DjNcfpTq7iPX1Tc3sGTsyW6jJj4sLf ojZ2DJaRpPbOpb5mEYZBuGY7ocLT3qJGxvPtFKJ5iay0hLSxDcLoELfTkuC3cYZ5cpYN7V jsbwI5pLekuqdi8afdLtD3YqK/mY65XpO5WHe5FsLEqMlJztyFKsGP+ehOv3E6CCW23DiI DS7aeiTer+TXRrK7jrsxr5KchbVjTx/m6bT/n1nGUgNrjm+7Sj6VTB1QvRIPbQ== 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 4WZZcd0Gt8zsSq; Thu, 1 Aug 2024 16:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471GkuSo046654; Thu, 1 Aug 2024 16:46:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Gku6i046651; Thu, 1 Aug 2024 16:46:56 GMT (envelope-from git) Date: Thu, 1 Aug 2024 16:46:56 GMT Message-Id: <202408011646.471Gku6i046651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 174337b9eca0 - stable/13 - sdiff: Fix --expand-tabs and --tabsize. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 174337b9eca0d28b96f2749b44ff4e29d201c144 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=174337b9eca0d28b96f2749b44ff4e29d201c144 commit 174337b9eca0d28b96f2749b44ff4e29d201c144 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-18 17:39:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:46:18 +0000 sdiff: Fix --expand-tabs and --tabsize. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43941 (cherry picked from commit a834edfccd14a8c0f152a3b0078469af8e05f3fd) sdiff: Fix binary case. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43942 (cherry picked from commit ad7bef8b890768e68a48bbfa6b92ebf635068504) sdiff: Fix usage message. The `--ignore-all-space` option was incorrectly documented as `--ignore-all-spaces`. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D46161 (cherry picked from commit ca75b7dac886de66fc06fd31facfa2c561f7567e) --- usr.bin/sdiff/sdiff.1 | 4 +- usr.bin/sdiff/sdiff.c | 134 ++++++++++++++++++++++---------------- usr.bin/sdiff/tests/sdiff_test.sh | 36 ++++++++++ 3 files changed, 116 insertions(+), 58 deletions(-) diff --git a/usr.bin/sdiff/sdiff.1 b/usr.bin/sdiff/sdiff.1 index ef9bb95a0990..ca6594c6479a 100644 --- a/usr.bin/sdiff/sdiff.1 +++ b/usr.bin/sdiff/sdiff.1 @@ -3,7 +3,7 @@ .\" Written by Raymond Lai . .\" Public domain. .\" -.Dd April 8, 2017 +.Dd February 16, 2024 .Dt SDIFF 1 .Os .Sh NAME @@ -117,8 +117,6 @@ Ignore all spaces. Ignore blank lines. .It Fl E -ignore-tab-expansion Treat tabs and eight spaces as the same. -.It Fl t -ignore-tabs -Ignore tabs. .It Fl H -speed-large-files Assume scattered small changes in a large file. .It Fl -ignore-file-name-case diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index 3dcf18caed0c..daa0f43e0b0e 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -51,7 +51,7 @@ static void astrcat(char **, const char *); static void enqueue(char *, char, char *); static char *mktmpcpy(const char *); static int istextfile(FILE *); -static void binexec(char *, char *, char *) __dead2; +static int bindiff(FILE *, char *, FILE *, char *); static void freediff(struct diffline *); static void int_usage(void); static int parsecmd(FILE *, FILE *, FILE *); @@ -72,6 +72,8 @@ static size_t file1ln, file2ln; /* line number of file1 and file2 */ static bool Iflag; /* ignore sets matching regexp */ static bool lflag; /* print only left column for identical lines */ static bool sflag; /* skip identical lines */ +static bool tflag; /* expand tabs */ +static int tabsize = 8; /* tab size */ FILE *outfp; /* file to save changes to */ const char *tmpdir; /* TMPDIR or /tmp */ @@ -127,8 +129,8 @@ static const char *help_msg[] = { "\t-d, --minimal: minimize diff size.", "\t-I RE, --ignore-matching-lines=RE: ignore changes whose line matches RE.", "\t-i, --ignore-case: do a case-insensitive comparison.", - "\t-t, --expand-tabs: sxpand tabs to spaces.", - "\t-W, --ignore-all-spaces: ignore all spaces.", + "\t-t, --expand-tabs: expand tabs to spaces.", + "\t-W, --ignore-all-space: ignore all whitespace.", "\t--speed-large-files: assume large file with scattered changes.", "\t--strip-trailing-cr: strip trailing carriage return.", "\t--ignore-file-name-case: ignore case of file names.", @@ -208,7 +210,7 @@ main(int argc, char **argv) { FILE *diffpipe, *file1, *file2; size_t diffargc = 0, flagc = 0, wval = WIDTH; - int ch, fd[2], i, status; + int ch, fd[2], i, ret, status; pid_t pid; const char *errstr, *outfile = NULL; char **diffargv, *diffprog = diff_path, *flagv; @@ -247,7 +249,6 @@ main(int argc, char **argv) case FCASE_IGNORE_OPT: case FCASE_SENSITIVE_OPT: case STRIPCR_OPT: - case TSIZE_OPT: case 'S': break; /* combine no-arg single switches */ @@ -257,7 +258,6 @@ main(int argc, char **argv) case 'd': case 'E': case 'i': - case 't': case 'W': flagc++; flagv = realloc(flagv, flagc + 2); @@ -287,6 +287,9 @@ main(int argc, char **argv) case 's': sflag = true; break; + case 't': + tflag = true; + break; case 'w': wval = strtonum(optarg, WIDTH_MIN, INT_MAX, &errstr); @@ -298,6 +301,11 @@ main(int argc, char **argv) printf("%s\n", help_msg[i]); exit(0); break; + case TSIZE_OPT: + tabsize = strtonum(optarg, 1, INT_MAX, &errstr); + if (errstr) + errx(2, "tabsize is %s: %s", errstr, optarg); + break; default: usage(); break; @@ -348,6 +356,15 @@ main(int argc, char **argv) filename2 = tmp2; } + if ((file1 = fopen(filename1, "r")) == NULL) + err(2, "could not open %s", filename1); + if ((file2 = fopen(filename2, "r")) == NULL) + err(2, "could not open %s", filename2); + if (!istextfile(file1) || !istextfile(file2)) { + ret = bindiff(file1, filename1, file2, filename2); + goto done; + } + diffargv[diffargc++] = filename1; diffargv[diffargc++] = filename2; /* Add NULL to end of array to indicate end of array. */ @@ -385,26 +402,6 @@ main(int argc, char **argv) if ((diffpipe = fdopen(fd[0], "r")) == NULL) err(2, "could not open diff pipe"); - if ((file1 = fopen(filename1, "r")) == NULL) - err(2, "could not open %s", filename1); - if ((file2 = fopen(filename2, "r")) == NULL) - err(2, "could not open %s", filename2); - if (!istextfile(file1) || !istextfile(file2)) { - /* Close open files and pipe, delete temps */ - fclose(file1); - fclose(file2); - if (diffpipe != NULL) - fclose(diffpipe); - if (tmp1) - if (unlink(tmp1)) - warn("Error deleting %s.", tmp1); - if (tmp2) - if (unlink(tmp2)) - warn("Error deleting %s.", tmp2); - free(tmp1); - free(tmp2); - binexec(diffprog, filename1, filename2); - } /* Line numbers start at one. */ file1ln = file2ln = 1; @@ -416,20 +413,10 @@ main(int argc, char **argv) /* Wait for diff to exit. */ if (waitpid(pid, &status, 0) == -1 || !WIFEXITED(status) || WEXITSTATUS(status) >= 2) - err(2, "diff exited abnormally."); + errx(2, "diff exited abnormally"); + ret = WEXITSTATUS(status); - /* Delete and free unneeded temporary files. */ - if (tmp1) - if (unlink(tmp1)) - warn("Error deleting %s.", tmp1); - if (tmp2) - if (unlink(tmp2)) - warn("Error deleting %s.", tmp2); - free(tmp1); - free(tmp2); - filename1 = filename2 = tmp1 = tmp2 = NULL; - - /* No more diffs, so print common lines. */ + /* No more diffs, so enqueue common lines. */ if (lflag) while ((s1 = xfgets(file1))) enqueue(s1, ' ', NULL); @@ -447,26 +434,55 @@ main(int argc, char **argv) /* Process unmodified lines. */ processq(); +done: + /* Delete and free unneeded temporary files. */ + if (tmp1 != NULL) { + if (unlink(tmp1) != 0) + warn("failed to delete %s", tmp1); + free(tmp1); + } + if (tmp2 != NULL) { + if (unlink(tmp2) != 0) + warn("failed to delete %s", tmp2); + free(tmp2); + } + /* Return diff exit status. */ free(diffargv); if (flagc > 0) free(flagv); - return (WEXITSTATUS(status)); + return (ret); } /* - * When sdiff detects a binary file as input, executes them with - * diff to maintain the same behavior as GNU sdiff with binary input. + * When sdiff detects a binary file as input. */ -static void -binexec(char *diffprog, char *f1, char *f2) +static int +bindiff(FILE *f1, char *fn1, FILE *f2, char *fn2) { - - char *args[] = {diffprog, f1, f2, (char *) 0}; - execv(diffprog, args); - - /* If execv() fails, sdiff's execution will continue below. */ - errx(1, "could not execute diff process"); + int ch1, ch2; + + flockfile(f1); + flockfile(f2); + do { + ch1 = getc_unlocked(f1); + ch2 = getc_unlocked(f2); + } while (ch1 != EOF && ch2 != EOF && ch1 == ch2); + funlockfile(f2); + funlockfile(f1); + if (ferror(f1)) { + warn("%s", fn1); + return (2); + } + if (ferror(f2)) { + warn("%s", fn2); + return (2); + } + if (ch1 != EOF || ch2 != EOF) { + printf("Binary files %s and %s differ\n", fn1, fn2); + return (1); + } + return (0); } /* @@ -512,11 +528,11 @@ printcol(const char *s, size_t *col, const size_t col_max) * If rounding to next multiple of eight causes * an integer overflow, just return. */ - if (*col > SIZE_MAX - 8) + if (*col > SIZE_MAX - tabsize) return; /* Round to next multiple of eight. */ - new_col = (*col / 8 + 1) * 8; + new_col = (*col / tabsize + 1) * tabsize; /* * If printing the tab goes past the column @@ -524,12 +540,20 @@ printcol(const char *s, size_t *col, const size_t col_max) */ if (new_col > col_max) return; - *col = new_col; + + if (tflag) { + do { + putchar(' '); + } while (++*col < new_col); + } else { + putchar(*s); + *col = new_col; + } break; default: - ++(*col); + ++*col; + putchar(*s); } - putchar(*s); } } diff --git a/usr.bin/sdiff/tests/sdiff_test.sh b/usr.bin/sdiff/tests/sdiff_test.sh index 100fa1b123b0..83ed93503f18 100755 --- a/usr.bin/sdiff/tests/sdiff_test.sh +++ b/usr.bin/sdiff/tests/sdiff_test.sh @@ -191,6 +191,40 @@ short_body() $(atf_get_srcdir)/d_input2 >/dev/null ; cat merge.out" } +atf_test_case tflag +tflag_head() +{ + atf_set "descr" "Checks tab expansion" +} +tflag_body() +{ + printf "a\tb\n" >a + printf "b\ta\n" >b + atf_check -s exit:1 -o match:$'a\tb' \ + sdiff a b + atf_check -s exit:1 -o match:"a {7}b" \ + sdiff -t a b + atf_check -s exit:1 -o match:"a {3}b" \ + sdiff -t --tabsize 4 a b +} + +atf_test_case binary +binary_head() +{ + atf_set "descr" "Checks binary file handling" +} +binary_body() +{ + printf "a\0\n" >a + printf "b\0\n" >b + atf_check -o empty sdiff a a + atf_check -o empty sdiff a - To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 4d7c715bd954 - stable/13 - filemon: Document how to build into the kernel. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4d7c715bd954eda85fbfff410f448fe3d816deec Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4d7c715bd954eda85fbfff410f448fe3d816deec commit 4d7c715bd954eda85fbfff410f448fe3d816deec Author: Dag-Erling Smørgrav AuthorDate: 2024-07-30 19:04:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-08-01 16:46:19 +0000 filemon: Document how to build into the kernel. MFC after: 3 days Reviewed by: olce, imp Differential Revision: https://reviews.freebsd.org/D46184 (cherry picked from commit 057453ffdf57bdfcbadb5d1834d425812e01ff43) filemon: Not an option. MFC after: 3 days (cherry picked from commit b4e4512d4669267fb220b7c1a2844c506673a3ce) --- share/man/man4/filemon.4 | 4 +++- sys/conf/NOTES | 3 +++ sys/conf/options | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4 index c2b077059ef2..6e7d05aeea13 100644 --- a/share/man/man4/filemon.4 +++ b/share/man/man4/filemon.4 @@ -29,13 +29,15 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 1, 2022 +.Dd July 30, 2024 .Dt FILEMON 4 .Os .Sh NAME .Nm filemon .Nd the filemon device .Sh SYNOPSIS +.Cd device filemon +.Pp .In dev/filemon/filemon.h .Sh DESCRIPTION The diff --git a/sys/conf/NOTES b/sys/conf/NOTES index c688f7947123..46800301657a 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2847,3 +2847,6 @@ device xz # xz_embedded LZMA de-compression library # Kernel support for stats(3). options STATS + +# File system monitoring +device filemon # file monitoring for make(1) meta-mode diff --git a/sys/conf/options b/sys/conf/options index 6a45645c376a..a62380b1efe2 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -100,7 +100,6 @@ DEADLKRES opt_watchdog.h EXPERIMENTAL opt_global.h EXT_RESOURCES opt_global.h DIRECTIO -FILEMON opt_dontuse.h FFCLOCK FULL_PREEMPTION opt_sched.h GZIO opt_gzio.h From nobody Thu Aug 1 17:35:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZbj84Bk0z5T62M; Thu, 01 Aug 2024 17:35: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZbj82GHtz4tpY; Thu, 1 Aug 2024 17:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722533756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6k+ba46Z1iR4fQeJeje63CYPhbVP2fGT7I6AJ4Octc4=; b=ReT6irlou7RYmQaN0o5iWK/ti0Z5Qj76vtyeUkJxzGXIaTp/KVOZxu8n5EQJeOBCGd34fV GaIfv9sz9mnCCnYx95GE6AgHiggnIFTDK6iqHZ9M1DhAqFkXR34HYCqLrfUajhdZBMOYIA AoP69DgFoD+f7hh8368AjLXiN68+yCXVWxV48fS9O1pviUXG3u2p7dimbfHd6H08WDzvU2 ybgNR+N6xHRoCWJKUtHUebMYob+jLu032wyem5nx6hk20HdpJ5watafnkQTWDbpY5YzLZR TBozdF+wVUuzVeaB8XAhRL/VaRva2it3pgaMMrPtoaFiWlFMwOcLK/XTfnhI3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722533756; a=rsa-sha256; cv=none; b=lfsD2QufYwSqd0evsnF7isVks6tm49bZTpbLQ7fSIOBQbiaZHLIdCpupP/xNSQfODav+gt jofkjch0yqEptCtp6CCygnccyHyNf2z3yVd/2PzqFrKHmtZllHiLnQ7k7W0okafJAAT/j2 QIztlfIhT1TQ6h9kv23OWyRyx59vMJoZ+iqdAe2je6kRAMHfTz8mF2zez2wEZ+oeniVR09 NBHIH8PR7G6xbMLS3YkEG1nJyqWmx4+ggebZy08fREDRworgLr+t69pLGBib0Py79kMeL/ /KYDtP2eo0oZ4mXW6JrDVFRr3aJVySEVZl+U2K3YT2aqQ/LWyyj+PxjLlr2Jrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722533756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6k+ba46Z1iR4fQeJeje63CYPhbVP2fGT7I6AJ4Octc4=; b=n076fY3HXc55sInEMKeRYh/oTzCQsBdyNXdRFhc9NsLWloWfw49kyDT0qLFo8kRxzgEAJJ EsrXxFok4a51Uh8civgMKNKKkggIo2EQQVNpStpzX/ThYM8uxdeWe+jkHE33q3s459LpFZ 888csTA3IYg+mdaE2SkCi20ljdOcjmfjCHgiv6LJtRwX3rJZnw822d+/YDMs+H9PwEfekR MgKHsRUhn/cvXJ7RefkpXYDodpJjbm4kqEKlE8hprmR2MnqYb/n1wlgzf3fY9ajEq+Nebw Ad8idg74vcaXpg834noBCSmOEhh18+tOU3IA0mbcV2P4MYnKfC8PLPPS50o0tQ== 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 4WZbj81lZvzv2Z; Thu, 1 Aug 2024 17:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471HZu5r031685; Thu, 1 Aug 2024 17:35:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471HZuXa031682; Thu, 1 Aug 2024 17:35:56 GMT (envelope-from git) Date: Thu, 1 Aug 2024 17:35:56 GMT Message-Id: <202408011735.471HZuXa031682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: dbb6f488df6e - stable/14 - hda: add support for Tiger Lake-H List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: dbb6f488df6e890a5946390b235c1f36c4ce5f77 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dbb6f488df6e890a5946390b235c1f36c4ce5f77 commit dbb6f488df6e890a5946390b235c1f36c4ce5f77 Author: Adam Retter AuthorDate: 2024-06-14 15:57:15 +0000 Commit: Ed Maste CommitDate: 2024-08-01 17:34:50 +0000 hda: add support for Tiger Lake-H PR: 272682 Reported by: Miguel Salcedo Reviewed by: emaste (cherry picked from commit fb1028dcd4aedc4d48dbd97314f008c663b2e711) --- sys/dev/sound/pci/hda/hdac.c | 1 + sys/dev/sound/pci/hda/hdac.h | 2 ++ sys/dev/sound/pci/hda/hdacc.c | 1 + 3 files changed, 4 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index f3dff2052b51..64243e9d6227 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -109,6 +109,7 @@ static const struct { { HDA_INTEL_CMLKLP, "Intel Comet Lake-LP", 0, 0 }, { HDA_INTEL_CMLKH, "Intel Comet Lake-H", 0, 0 }, { HDA_INTEL_TGLK, "Intel Tiger Lake", 0, 0 }, + { HDA_INTEL_TGLKH, "Intel Tiger Lake-H", 0, 0 }, { HDA_INTEL_GMLK, "Intel Gemini Lake", 0, 0 }, { HDA_INTEL_ALLK, "Intel Alder Lake", 0, 0 }, { HDA_INTEL_ALLKM, "Intel Alder Lake-M", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 191c835595ef..abb6148c3369 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -98,6 +98,7 @@ #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) #define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) +#define HDA_INTEL_TGLKH HDA_MODEL_CONSTRUCT(INTEL, 0x43c8) #define HDA_INTEL_MTL HDA_MODEL_CONSTRUCT(INTEL, 0x7e28) #define HDA_INTEL_ARLS HDA_MODEL_CONSTRUCT(INTEL, 0x7f50) #define HDA_INTEL_ARL HDA_MODEL_CONSTRUCT(INTEL, 0x7728) @@ -910,6 +911,7 @@ #define HDA_CODEC_INTELGMLK1 HDA_CODEC_CONSTRUCT(INTEL, 0x280d) #define HDA_CODEC_INTELICLK HDA_CODEC_CONSTRUCT(INTEL, 0x280f) #define HDA_CODEC_INTELTGLK HDA_CODEC_CONSTRUCT(INTEL, 0x2812) +#define HDA_CODEC_INTELTGLKH HDA_CODEC_CONSTRUCT(INTEL, 0x2814) #define HDA_CODEC_INTELALLK HDA_CODEC_CONSTRUCT(INTEL, 0x2815) #define HDA_CODEC_INTELJLK HDA_CODEC_CONSTRUCT(INTEL, 0x281a) #define HDA_CODEC_INTELELLK HDA_CODEC_CONSTRUCT(INTEL, 0x281b) diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index 009c9098ac3b..81395a1a9ae7 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -393,6 +393,7 @@ static const struct { { HDA_CODEC_INTELGMLK1, 0, "Intel Gemini Lake" }, { HDA_CODEC_INTELICLK, 0, "Intel Ice Lake" }, { HDA_CODEC_INTELTGLK, 0, "Intel Tiger Lake" }, + { HDA_CODEC_INTELTGLKH, 0, "Intel Tiger Lake-H" }, { HDA_CODEC_INTELALLK, 0, "Intel Alder Lake" }, { HDA_CODEC_SII1390, 0, "Silicon Image SiI1390" }, { HDA_CODEC_SII1392, 0, "Silicon Image SiI1392" }, From nobody Thu Aug 1 17:35:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZbj94jcPz5T5yY; Thu, 01 Aug 2024 17:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZbj935yTz4tpZ; Thu, 1 Aug 2024 17:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722533757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bGByeNjqhJj9cFwsFNq44akymCAGtt8zkh3zy82tkso=; b=Q1ADoShHffqwmXVvTh4uPCAFODvreB3fHVI6yO5//3CYSHwsjinAjcn+LJoaIpG+qzTFJK HpbwPxNR/5YAW6c6UPVKFz0vVHifuSmu7G8tUxpgP4sJA9mEcRDo53NmbX+jg3sJXY8Val Fb6QaWIh62Yeiy0CISPQlvsAGMmXWHsvlK17efHgE4VMRCHF8AxeA5PBE6PT+7ZVHacVit bLSMd8Z/QOi+pgHHsGVBHeJIlo2KelLLTUA3YI4fBzTNt19ncQjqQH3TlPyJb6onpz3t4Z BHDtuS3jHby1NYGwpWTnJhnraZCi+/NPF80g8Hq0GEaV8lxDAb8AaiooA/JbuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722533757; a=rsa-sha256; cv=none; b=X6EBP3NfgCPuVxPZfNEv2sXlSmQFsZ+ciL+qj5KZb/aHQNr2nn4Acos2BGU+4juArpbysq j/DfBlu2gz6XWQa9RnOUirWAI0tXY8/joMMq08updiTkcHsMMytc6qDrbHgycGSKAro2ZH Xel3E8PGJ73YFYyjL398zvDU65w8esrk/xs9qYWHUEalNhn7qW4DtTlgPLEgZGrdh/ihhC D7hCG0iWwnjQ5cHeKqMPbNd0PyiSNB0a7+zhp41pTJovkkwwl3UbSx17AVz1FtX5R1JEkX PQCKlWdWPr0a2oFDI3U4z1MT/vsAVD1reQ1IlonDI6h+i4YmqjvOB/4TxfM56A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722533757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bGByeNjqhJj9cFwsFNq44akymCAGtt8zkh3zy82tkso=; b=W7N7sBd7Le4y/IOkQ7M+ynyDLf6n8aM5vCA2G7WfEfE25+igiOFNZYTg7BreKGm6JxDZra ZCkX1dFLaZx7//X2EE3fvtTxLxmOoyLE1ZDtRoEhYMZFvNFzoQr/IwHguS9NnNUxA2Jk3/ hpJvVFggCVQL39A6PbWI6niNFw43i1bAVWnejgv+SWAJJjX050ndfRZw9kqf6pNZabeDK2 ztdHv9kpizqAgrySleJ5wbaswVheHhQsOvX5fUG132CoP4mWCXoA66vxtY/ZpEPofxSYiW rrQhrrpwokq4bB0FRaivam60NkI5mXJGkzqu3HIW6/06JeIW2VHDrleZWrorGQ== 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 4WZbj92j3gzt5B; Thu, 1 Aug 2024 17:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471HZvbw031739; Thu, 1 Aug 2024 17:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471HZvWk031736; Thu, 1 Aug 2024 17:35:57 GMT (envelope-from git) Date: Thu, 1 Aug 2024 17:35:57 GMT Message-Id: <202408011735.471HZvWk031736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 88069992b210 - stable/14 - bhyve: avoid resource leak in error path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 88069992b210f659327024babb80589d86a2c119 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=88069992b210f659327024babb80589d86a2c119 commit 88069992b210f659327024babb80589d86a2c119 Author: Pierre Pronchery AuthorDate: 2024-05-16 16:55:54 +0000 Commit: Ed Maste CommitDate: 2024-08-01 17:34:50 +0000 bhyve: avoid resource leak in error path In e820_finalize(), the e820_fwcfg_item variable, containing the etc/e820 file (for the e820 table from the BIOS) is not free()'d when it could not be added to the QEMU firmware configuration device (fw_cfg). Reported by: Coverity Scan CID: 1522761 Reviewed by: corvink, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45223 (cherry picked from commit e9806d21282d3d5486b99b5c7062b490b00d8323) --- usr.sbin/bhyve/amd64/e820.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/bhyve/amd64/e820.c b/usr.sbin/bhyve/amd64/e820.c index 456ce0330b50..9d95ec8ce688 100644 --- a/usr.sbin/bhyve/amd64/e820.c +++ b/usr.sbin/bhyve/amd64/e820.c @@ -483,6 +483,8 @@ e820_finalize(void) e820_fwcfg_item->size, e820_fwcfg_item->data); if (error != 0) { warnx("could not add qemu fwcfg etc/e820"); + free(e820_fwcfg_item->data); + free(e820_fwcfg_item); return (error); } free(e820_fwcfg_item); From nobody Thu Aug 1 17:35:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZbjC0Dmvz5T6M6; Thu, 01 Aug 2024 17:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZbjB4K3jz4tXy; Thu, 1 Aug 2024 17:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722533758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zZttNOnFtI0o6f2wvh+HLVQdwyXBnC5PabCKmP/wC8M=; b=VbjTe+Z88QMiqfSEtSLcH5o7dRtHDY/5ITSUnTf7urfMcjemMlSYx0+TSwGAiy8W4ikce4 tP9laYy/AqmC4wYod9XJYx8FJ3e2bAyolMZTZ3u6rAkeiiS1RSXwAgxAzFT2JCki8W3oCH 5l4nA6gptD1N4urSvNMxPaov3Q54YN0oXu8ej2+XHiiqTLqbSO2wjhwg0StDzxDYKAbnyo yMgdHh1YtrWLZyAiEyDR140gWFSDdCEXWYBMOxPrJjWNXUu3cbe5A1VFamB6/qUhVmjEun 13eHzQAidnMm96++R1pDqP41JvWPqCetxuQ68wPxG/gjrYqjHbz+OPj7bMh+1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722533758; a=rsa-sha256; cv=none; b=y4r2mog6wljiedX9PLdCP9JMtm+p/5jdFuAK4dvGC4xv1GwWxv5hGW0jisov0WUChn7bd8 rbCr93cvJ18NDsdQs1Dx+GvaKuBpD6gzainDSQt9k1p9Q1plgcxmG5KDB9SF8QBfy4tTXq L+QI+c+ncOpUJOVpVQTXysv4ojgEid9G/a19wbBrKoO5gj9coZjJEnvdMsqxOnIkmoc84c i2roY4n/2PyDkRe/Ght6e3VWFKQoqGdJuErPhTL5LmU9u69VtZ1U3ji/9n3XIF8k9/UPqs c1+pdXRDqh5YISlNksV+K8mdhCrXO0EGav/HJPSM/bs9GcnJsPQY8xQkpr8+Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722533758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zZttNOnFtI0o6f2wvh+HLVQdwyXBnC5PabCKmP/wC8M=; b=TUDrVay6WUyREUwe5571CVgKeZ4eOmTVQStEu4ogXCE3j/c5c+LP6+dFmg5A/oG53GPb2M m4fiKudx3xORFCZiUkqRmwO7dLn9W6GvqYiHShi+GkkPjufyll5CuJbxKCAtWb0lUdDxIy 7BL9j9rG2Tkv/6eicd8y15edDuKIdF09QEXg3qUisijNkdA7F/QlwR3TQ2dfu187XDexIA OcgbeZitbIF23zGEl75RYikCwAofcD1cdrGo4XrMiVYqhl1yjdkKVzCDu8Rmx4TO5tpAAh 133NH00vsHLreHEesqkB9mdg8jSXNGBP0UpXP8ZovtOTNtGIUropnllSMZcBkQ== 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 4WZbjB3k33ztnw; Thu, 1 Aug 2024 17:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471HZwEf031787; Thu, 1 Aug 2024 17:35:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471HZwi2031784; Thu, 1 Aug 2024 17:35:58 GMT (envelope-from git) Date: Thu, 1 Aug 2024 17:35:58 GMT Message-Id: <202408011735.471HZwi2031784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: bd208ed0ab94 - stable/14 - uipc_shm: Fix double check for shmfd->shm_path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bd208ed0ab94d92443feff6eea2240f498deed65 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=bd208ed0ab94d92443feff6eea2240f498deed65 commit bd208ed0ab94d92443feff6eea2240f498deed65 Author: Ricardo Branco AuthorDate: 2024-05-20 13:09:08 +0000 Commit: Ed Maste CommitDate: 2024-08-01 17:34:50 +0000 uipc_shm: Fix double check for shmfd->shm_path Reviewed by: emaste, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1250 (cherry picked from commit 7975f57b7e14b146ca730421ef9e2094c242e9c0) --- sys/kern/uipc_shm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 0bfbc636e405..20dbe59e2a96 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1909,21 +1909,19 @@ shm_fill_kinfo_locked(struct shmfd *shmfd, struct kinfo_file *kif, bool list) kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; kif->kf_un.kf_file.kf_file_size = shmfd->shm_size; if (shmfd->shm_path != NULL) { - if (shmfd->shm_path != NULL) { - path = shmfd->shm_path; - pr_path = curthread->td_ucred->cr_prison->pr_path; - if (strcmp(pr_path, "/") != 0) { - /* Return the jail-rooted pathname. */ - pr_pathlen = strlen(pr_path); - visible = strncmp(path, pr_path, pr_pathlen) - == 0 && path[pr_pathlen] == '/'; - if (list && !visible) - return (EPERM); - if (visible) - path += pr_pathlen; - } - strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); + path = shmfd->shm_path; + pr_path = curthread->td_ucred->cr_prison->pr_path; + if (strcmp(pr_path, "/") != 0) { + /* Return the jail-rooted pathname. */ + pr_pathlen = strlen(pr_path); + visible = strncmp(path, pr_path, pr_pathlen) == 0 && + path[pr_pathlen] == '/'; + if (list && !visible) + return (EPERM); + if (visible) + path += pr_pathlen; } + strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); } return (0); } From nobody Thu Aug 1 17:35:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZbjD0h31z5T69f; Thu, 01 Aug 2024 17:36: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZbjC54gVz4tVZ; Thu, 1 Aug 2024 17:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722533759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wW5htx+nWVFZvdyCkq6lx2qj+nsblTv/MyxSjxKsDjs=; b=oG/lbGJx3uLEDai8FMH21OHdAIMJB2D45sMj47GOSUjl450U7tZ89qrhhocCkYinxUyiY1 N2gIA5mbSSmkzrSEttfI539HhkpqKVOF6zFYJNCvF/S1Ii1Mhi2jeRNepTfxF7XGnZuN4P 6KCPmBPQsxOaPKgs985n799RUwJRbVKg3CRPao2UvIHuPGYTU0R9AlIRZptz2mOHuZbal+ tnhSZpLx2CYDUvAy+Dpvec45FVWBnGaHC9myohrVuSmcKN3qD//aKvMD/2Mi4qNu9NlWF9 /X16owyscJpZpEBpBeCrX5lCu5XgwScSskdc7rUJHTkSi/UEoNTG1OANiUHVNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722533759; a=rsa-sha256; cv=none; b=rwXYtr8dK77H4VCoWk3aIBbHv3Oa4Uvyem6ObpHBEoj6ted4lj7zWwD64nocYoqb1AXaBf SJoD43AIBv/LJJmX8KnqpLWC8prULTLUzHPyYUE7cNSFbl7FXFcD/qaIRgZ7sn58crfWrj ayDydxaOLVwDBRngNF6Sq7VbndDd7+gvplmuHvXDUe6s/usXG8r7v9x2F82NEvf2AryCai zQ53S154J6UDn3rUco0+ut/cCQM/tdi1QsI/YPI48i4oFGEXU/dvWTDxb4lmZrNyRWCzU1 TIiwr8ebdqUJGCF3icOlxl44DEHa3HOAq1V5pmHuO4YkKSVhh3C7N7oST+xb6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722533759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wW5htx+nWVFZvdyCkq6lx2qj+nsblTv/MyxSjxKsDjs=; b=FXY9MYB76ILCT6NP5O60AvyktoccqSRJBK+OyIqFFL9Qm1EwZ0fmlc5jeXSdI9HvqnJ2GU RXkHJN1ge1H6S6ORODKy2QKfolFtCyCN4EHNJ0hIfuSnHxz+6K4O4Z+vRr52TNiCs+4WBZ MM/dzlWFovtJXVE74l0nZLYS3N7FotltPGB+VrdjVSQP21vvBSTsakuv99L/BUDnT+Q2Fx vVFk3D7ilEDzEBsXAdot59tmGzLEZoZ/PASLi+imY7Ng2YY+wadIuLwlPYg44aZtR8YEl9 /0Q8sOxz5IdIArL2WzrODEdxf5EFUrF3hTXfd2iLZlftmBAyb9w29OG53JqjjQ== 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 4WZbjC4hk8zv53; Thu, 1 Aug 2024 17:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471HZxHU031842; Thu, 1 Aug 2024 17:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471HZx3b031839; Thu, 1 Aug 2024 17:35:59 GMT (envelope-from git) Date: Thu, 1 Aug 2024 17:35:59 GMT Message-Id: <202408011735.471HZx3b031839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 25114e7dd759 - stable/14 - newsyslog: Fix case of the 'P' flag in newsyslog.conf(5) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 25114e7dd75958a4ce844b2f86f7a9a6c9950de8 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=25114e7dd75958a4ce844b2f86f7a9a6c9950de8 commit 25114e7dd75958a4ce844b2f86f7a9a6c9950de8 Author: Joshua Kinard AuthorDate: 2024-05-25 20:52:11 +0000 Commit: Ed Maste CommitDate: 2024-08-01 17:34:50 +0000 newsyslog: Fix case of the 'P' flag in newsyslog.conf(5) PR: 279303 Reviewed-by: emaste Signed-off-by: Joshua Kinard (cherry picked from commit a8f86ecd6104b1f127b426be278a9031789b4413) --- usr.sbin/newsyslog/newsyslog.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5 index f0823303e1c1..b9fdb47fd712 100644 --- a/usr.sbin/newsyslog/newsyslog.conf.5 +++ b/usr.sbin/newsyslog/newsyslog.conf.5 @@ -316,7 +316,7 @@ log file using .It Cm N indicates that there is no process which needs to be signaled when this log file is rotated. -.It Cm p +.It Cm P indicates that the zero-th rotated file should not be compressed. .It Cm R if this flag is set the From nobody Thu Aug 1 17:50:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZc1c1vlwz5R8fL; Thu, 01 Aug 2024 17:50:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZc1c0tZWz3wtZ; Thu, 1 Aug 2024 17:50:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722534612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEZyZroGUUd8zkIsg0O110H5K0tYKAqvlfiS/TxtE5Y=; b=nQsqKvHZDspqRKaTJ8iHhhZ/0oHuYf+v66gDK/oeKWn9mPdoZz6yl/ZZbKZWNOzlgSxauz 7BAT7heAWGcV73zfAlDsemF0mRlGekZK8ytHPmLejci32njJmFq63y5jZ8UYM9BMpr5l5w I2kG39sTmd7YpXVHkmjwlyLgikWos/G0GEWb++Af0L9q7vwqzXNicurw8p+1nSycJ1yZDi 6YKKCB1uRbxYdFItoX62m0u4P0zRIIXtFR1kCQbT0tA9WZQvyy+imKcpakHsw+D7zIyZ5h F6EmW/FTPf3tmv+v3zS/lmgfi9pvmVU8/E/h4FzdK4btsNG+9HsMD8lC7x1kwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722534612; a=rsa-sha256; cv=none; b=dV86CRLocV9U3iRPb/sKsZTm4j+I2JdfQIw+6Fy/HHXv7aa3FxYmQ2gbcNiZd9xl/CrC+G 5o0LfdVbpktQJo6QKnf9d/DKGWCM+VatdCLKxRQN3gUP9qRSHKZNb6utl1D2DNDwSWd4+h Uhcir8+iJPehPPabv2ViOtnBdojWxTjLdr8qbq9NWeLfAgvyX34ROpVgtTsY8EBYfTpuii 5h76xdY8YmHKdVUTb0OQ2+Z1mWTV+IR1lVPLbOIQQWzgZYLyslyYQy0u/I1/RAO0kYFyDX p0bMg0mQ0KI7/onFgeQgfy81VkTcX7eCr03JCmv0ZVuYz673dCJF0q7uWLezYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722534612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEZyZroGUUd8zkIsg0O110H5K0tYKAqvlfiS/TxtE5Y=; b=i4HEW/PR8A482A/YYzqNuuYpXtSR490cqgASUvOkGvyDLD4CBtZykcQNBCie4eYmJ+UbUr ZeqaePv3j7j93Z6bPptYHJ6MQvijFkL32aBdtyOcD8txOumwHdyHri8L5/ME+2y9VQGBZn sLusHpCpWs5kXwJ552hwaWbniU3SAqyWOrqs+MadG46j8oAksS+oj3ht1Xflt/Qvjgc17c 21QbLbCW8fVGXCrCxlGdv++7zKv9H3YV3Y0+dD1ND0LgyjQe9KXpMjhimOSd3Zp2fvtoAp XPB6dFn4Ctzh29fpGjqbgUANAbMPFb9Seuu4UHb342/AKgOFTW43Ckqc1Ks0mw== 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 4WZc1b74sLztrF; Thu, 1 Aug 2024 17:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471HoBpa054317; Thu, 1 Aug 2024 17:50:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471HoBMG054309; Thu, 1 Aug 2024 17:50:11 GMT (envelope-from git) Date: Thu, 1 Aug 2024 17:50:11 GMT Message-Id: <202408011750.471HoBMG054309@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: a48f7a2eb90b - main - fibs: Suppress the WARNING message for setups with multiple fibs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a48f7a2eb90b0812281e6d69bb05eb61433ea247 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a48f7a2eb90b0812281e6d69bb05eb61433ea247 commit a48f7a2eb90b0812281e6d69bb05eb61433ea247 Author: Zhenlei Huang AuthorDate: 2024-08-01 17:48:58 +0000 Commit: Zhenlei Huang CommitDate: 2024-08-01 17:48:58 +0000 fibs: Suppress the WARNING message for setups with multiple fibs Change 2d3982419593 switched net.add_addr_allfibs default to 0. The warning message is for potential users of the feature. Well since all supported releases have 0 as default, those potential users may have already gotten the notification, emitting this WARNING every time increasing the fib number is less useful but rather confusing to other users. So let's suppress it right now. PR: 280097 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45971 --- sys/net/route/route_tables.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c index fd211bcd5dda..da829503b846 100644 --- a/sys/net/route/route_tables.c +++ b/sys/net/route/route_tables.c @@ -231,11 +231,6 @@ grow_rtables(uint32_t num_tables) new_rt_tables = mallocarray(num_tables * (AF_MAX + 1), sizeof(void *), M_RTABLE, M_WAITOK | M_ZERO); - if ((num_tables > 1) && (V_rt_add_addr_allfibs == 0)) - printf("WARNING: Adding ifaddrs to all fibs has been turned off " - "by default. Consider tuning %s if needed\n", - "net.add_addr_allfibs"); - #ifdef FIB_ALGO fib_grow_rtables(num_tables); #endif From nobody Thu Aug 1 18:02:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZcHN0L7vz5R9cq; Thu, 01 Aug 2024 18:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZcHM6zWxz417g; Thu, 1 Aug 2024 18:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722535328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NJ1VjSvEfY/G657RpNy88wL9Egr2u8aDSW9/6p0gWbE=; b=uP6rAuikXY1HOC6v1sn82nKdaYT26rSE1fvnKlSm39IuZNAHlrRfChJLOYLijJerMX9V3t /MMgAmZW9l6+a7UPPgs/b6P/+q9fNXShVozFqAGHJgwo5lXoeNCwsuSvPxdsIMabRnB/8H DUXNygJFcS20b0dUhkOfzM730JsRngjGfzSBQdwAA96r3Qi2R8Fea+dEC97IK0BQPr8si1 +/hL9NJ41qcJKZVYpXE0rA9zVNIHVsIvOTgnd79ZB+kSlM88O1K3ItLUbHxRv16qCgzXMK fZwx1gT6HooaZp18H9JQp+coqmJxRogJ655SR1aiZy/f84tI1oeaVb7Kj/t92g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722535328; a=rsa-sha256; cv=none; b=ktSFMmoxNDRU95Xrk6q6vKLmP8sd3WObxhcEFAqvrZky7sLUzzHvSq5+svwZuYDLolHKnd EKltpCITyMxDrTK8NBBLq8fMZZWPSjqj+oXYC8aQovRJSTL5Jnzc71ut1qHS+WJLv+C3Ey 66r/OWVA/RNTJmMxNio17VXmZUpJha4fQvLY0FLRv9/t1ATmxpeP63+anmpVsz/fxoHjP7 42dTBZT6V7/m0gqQeVSBk4vqSKjtwj8oQCvemdfZGQONbL7mJ3STSCVWILjab6w27lpVob FjrfaLhkmZD3z7be/Oq6VxJb2/QMmdJpDV8+sVsQMhx7ZpUBVZ1frd3yLzwoJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722535328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NJ1VjSvEfY/G657RpNy88wL9Egr2u8aDSW9/6p0gWbE=; b=CquZ2k9PFb6RiIOr9fTtV/DhFhEwrjLPF95h1kmoETzCrolhsg6v1xD7Rb2WFTUox8bnfp x/+hbFsWqoJfdxMYVZMSxS3WDafe5p2x9W2bbnYQi45hlqDWCuyS06/83pSN3uWZvNhsHw MwPkoPqs8mRn9qduoaj2pTDRX+fLCIt8zFSw/rM5kJrF8QBCoMzr4CeUaC4sJOQxBH5ytk NXbTsIRQv6Znryxm3hpZmbhQD4SDJSlXLjUU1EWru4LnchZXSevAZiVLmFuqwXGdX+NpPO gygrgrgdahkjF2+hahqsAFx1eaClfI5u/AL1jW7vW38upMIHs8333DtpGwYnKg== 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 4WZcHM6bbSzvNn; Thu, 1 Aug 2024 18:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471I27Ku081237; Thu, 1 Aug 2024 18:02:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471I27CE081234; Thu, 1 Aug 2024 18:02:07 GMT (envelope-from git) Date: Thu, 1 Aug 2024 18:02:07 GMT Message-Id: <202408011802.471I27CE081234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 352dd826ffdd - stable/14 - fibs: Limit the WARNING message to only once when setting up with multiple fibs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 352dd826ffdd88d26744023fe8bcff795bdf64d8 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=352dd826ffdd88d26744023fe8bcff795bdf64d8 commit 352dd826ffdd88d26744023fe8bcff795bdf64d8 Author: Zhenlei Huang AuthorDate: 2024-08-01 18:00:45 +0000 Commit: Zhenlei Huang CommitDate: 2024-08-01 18:00:45 +0000 fibs: Limit the WARNING message to only once when setting up with multiple fibs In main [1] this warning message is suppressed but no plans to MFC the change as the message may be still useful for users that upgrade from older releases to 14.x or 13.x. Well emitting this warning message every time increasing the fib number is confusing for users not for the feature `net.add_addr_allfibs`, let's limit it to be printed only once. 1. a48f7a2eb90b fibs: Suppress the WARNING message for setups with multiple fibs This is a direct commit to stable/14 and stable/13. PR: 280097 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46204 --- sys/net/route/route_tables.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c index fd211bcd5dda..f1c96f813d91 100644 --- a/sys/net/route/route_tables.c +++ b/sys/net/route/route_tables.c @@ -218,6 +218,7 @@ populate_kernel_routes(struct rib_head **new_rt_tables, struct rib_head *rh) static void grow_rtables(uint32_t num_tables) { + static bool printedonce; struct domain *dom; struct rib_head **prnh, *rh; struct rib_head **new_rt_tables, **old_rt_tables; @@ -231,10 +232,12 @@ grow_rtables(uint32_t num_tables) new_rt_tables = mallocarray(num_tables * (AF_MAX + 1), sizeof(void *), M_RTABLE, M_WAITOK | M_ZERO); - if ((num_tables > 1) && (V_rt_add_addr_allfibs == 0)) + if (num_tables > 1 && V_rt_add_addr_allfibs == 0 && !printedonce) { + printedonce = true; printf("WARNING: Adding ifaddrs to all fibs has been turned off " "by default. Consider tuning %s if needed\n", "net.add_addr_allfibs"); + } #ifdef FIB_ALGO fib_grow_rtables(num_tables); From nobody Thu Aug 1 18:21:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZcjZ65pjz5RCLG; Thu, 01 Aug 2024 18:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZcjZ5fSxz42tk; Thu, 1 Aug 2024 18:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722536482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l26naueaE8y3r0MHEeuXQwjiqsSawRyANDzrAk1qP5s=; b=E+W/irIckVXuFTG0H5vGLMtvyCGTUHffWUkpQxgmHzVo6hon+4va/ln3GjDn0+/nNaW+4q Vc6QEoWvC2t9mKVK98dz6l1hJqzDcCx0LlDOtfG+GBBQA22qbhJ+nDmn/MciN3pqiMGAKQ 5pF2jnvmRPAmJ98iNhMJ3h5B9hHHGlB9qb492e0DpfroP5vTCp7sw/E+FXYzAStgUNmfQY z8WWLwBFfTEwc/f8Unom6QZjBYseDOcRE6pUMSJZTlZLF7ahGatnKUzDaDiKVHFyf1ckmd EqwdzwvQb8R7Mc5jQ1vcBgjZQ52JuLBRWBbQRq5qC33VKCLo776bTtg1zKYQsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722536482; a=rsa-sha256; cv=none; b=ksJHcHmFcAcP5oSX/yQdR8uZMKtOpU+oczj5U/uFOXXNUzUqyjmg3vANht/HiHJ2+2Xgiw mSWy062Kn3mse1iqBIwMahQdXUi47ywUqxxJ5nxTeioepoqTklxaE+npyY8fTQNDwfl/9g s0kiAGH/yEzk3hAMNznCwFps/0ZtR8gCLKDjQtkK6XQi9lNgcZIeSfYbsAw9HvNp1IXS8I 9v3SJyXuy88WXUosFUAhq4FaP7hIfnBdku6ZTPgZDxJihcduNoQQCSZS2QB2DWtuVaVkMe yw38DQdStSbuyVrb7veQT8vT79OoXzoW3qB0ipGWyEYBWK/QXyKLwi9QM2GOcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722536482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l26naueaE8y3r0MHEeuXQwjiqsSawRyANDzrAk1qP5s=; b=H9bm9tV8bP+NbRjKOmmC+2D9kNGzeWQmlCrnKwa5Lb6Ho3+Wa6AxScbVQWvYKmsJO+NfuX JbqzVeuEnoqtm50OL/GHxuQwkoaGHCM3qUBLHPJiqCn8OVRaZc9zS0c4dvOrUkHZ62WBkk V1NBAdIuZf18e8eFZT750tiMfe0mtVL6BvgSpIVNwomTioNLVVL0HbfXWJ8vegOdhn/C// DKAKNdRuCMRQcYYWq6ML01ZIfxIKxJNs8NkBv7taPiqlbEKjGPh9ES8h4ErJlUtRLfHbEI JsqWRGe9Bl3WX7Vkrdd9T+eKJythEYUE3LpD7ghr2D1XLo4sZVXxAGpgT8+rhQ== 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 4WZcjZ5GDBzvJl; Thu, 1 Aug 2024 18:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471ILMMa010387; Thu, 1 Aug 2024 18:21:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471ILMYb010369; Thu, 1 Aug 2024 18:21:22 GMT (envelope-from git) Date: Thu, 1 Aug 2024 18:21:22 GMT Message-Id: <202408011821.471ILMYb010369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7797719d3a8b - stable/13 - fibs: Limit the WARNING message to only once when setting up with multiple fibs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7797719d3a8b1eb50e57c6652f744a6bffc91599 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7797719d3a8b1eb50e57c6652f744a6bffc91599 commit 7797719d3a8b1eb50e57c6652f744a6bffc91599 Author: Zhenlei Huang AuthorDate: 2024-08-01 18:00:45 +0000 Commit: Zhenlei Huang CommitDate: 2024-08-01 18:04:54 +0000 fibs: Limit the WARNING message to only once when setting up with multiple fibs In main [1] this warning message is suppressed but no plans to MFC the change as the message may be still useful for users that upgrade from older releases to 14.x or 13.x. Well emitting this warning message every time increasing the fib number is confusing for users not for the feature `net.add_addr_allfibs`, let's limit it to be printed only once. 1. a48f7a2eb90b fibs: Suppress the WARNING message for setups with multiple fibs This is a direct commit to stable/14 and stable/13. PR: 280097 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46204 (cherry picked from commit 352dd826ffdd88d26744023fe8bcff795bdf64d8) --- sys/net/route/route_tables.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c index 45c1b6cab8ed..47fe5cfae1dd 100644 --- a/sys/net/route/route_tables.c +++ b/sys/net/route/route_tables.c @@ -217,6 +217,7 @@ populate_kernel_routes(struct rib_head **new_rt_tables, struct rib_head *rh) static void grow_rtables(uint32_t num_tables) { + static bool printedonce; struct domain *dom; struct rib_head **prnh, *rh; struct rib_head **new_rt_tables, **old_rt_tables; @@ -230,10 +231,12 @@ grow_rtables(uint32_t num_tables) new_rt_tables = mallocarray(num_tables * (AF_MAX + 1), sizeof(void *), M_RTABLE, M_WAITOK | M_ZERO); - if ((num_tables > 1) && (V_rt_add_addr_allfibs == 0)) + if (num_tables > 1 && V_rt_add_addr_allfibs == 0 && !printedonce) { + printedonce = true; printf("WARNING: Adding ifaddrs to all fibs has been turned off " "by default. Consider tuning %s if needed\n", "net.add_addr_allfibs"); + } #ifdef FIB_ALGO fib_grow_rtables(num_tables); From nobody Thu Aug 1 20:04:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZg0l2cnMz5RMNN; Thu, 01 Aug 2024 20:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZg0l1zhFz4G5K; Thu, 1 Aug 2024 20:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722542679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L94Mi/ESuybUXyb7CbsBvfgnQlrSGqXQWRUJ8jqvHtg=; b=L6GbciaKI0avm1eSF4p6lUJa5mzm+hIk8ix8d9ecZ7XVWOkMhwLsks2j1PIFIWNpgDgYV9 hapT/bPMqCRn5HCoRgXsNC4ro2PtOfVALOuLW3Y7uvpfVsInW2HJ7r2V9YOJw6coGBa00W AIWwOv4m+XhT7nEhTa7CbD3H99wOrc9nn4IvhR3F+YKQESdT7WwIv0dBgtOIgW4wbiwHdh NluqBXfg8kTfIipiWSd+odkVL6ZQ33mX8FOhJZhxUA3ATCpPNhL/PE8wgcvsY2gIuLmJZ7 CYqX4prsEVlMrIflqQqJQUUG9S5EQp0+dW5uuNQwoDduO2A8kqsm9aRUUVdmgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722542679; a=rsa-sha256; cv=none; b=ydT9eNJZl161EStGzTX0JNUaEuY5yTiwHWe8eV3EdPp7R0OwYbS0K4y53oo+l3aDcTFYcQ PJ74cK712zSMSLlI+PqTXK4rx6a8XOXhHn6pB5lOCJxE7BReBGsZ0WIgPsB9aTgo5EMCvc YMXnPwRKjPYtzN/ronE/2kvjBZcE4WBh2L/qYkmS2QwD5Jo+Y3KtzTk6vuPgc67+evFjnL XF/y7LZ1Y6T+Th4BgOGUDgI9Lo797YMoo73EvKFAdBeeKvn6PTb58pk4VdBGgJ6H37mufj nWrZuDt2biQDAvstulHgmHmJWV8z/LqpWsAcmkLCMc1xgAu9lHztLN8wJF6Ekg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722542679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L94Mi/ESuybUXyb7CbsBvfgnQlrSGqXQWRUJ8jqvHtg=; b=IHnWb284ZP/bXbBanx1EtQoOuFY+15U30Qobs8FVQ7DU/S5NxqQTK+D3/u70jPoB2N6QZy 1UWDF/k9Af49FaA6F7WYxx8wP9f4TzXhIackDcS09ohZQyuLfSaA+dv2r7Sv+NXJJCSiJQ zE4ZYjAtWPPVkfydUyzM92Fpryy40tIjiW4MVVnacqk74BbueLcSxLrTVwZoHG8voIHxCZ sP3Rv1JneIyl3I5b6LSbLiA+C6WVLmgnmTAlu8wTjCdkwWNG/Uc7gIVesPvNqN/uWLFKiw JKpD+0PcoPX5oELRJ08vZyYNhTHNbyTJ5k29Ig4vpao2PPeG/zla6n2iMV+h3Q== 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 4WZg0l1Dz5zykj; Thu, 1 Aug 2024 20:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471K4dbf086334; Thu, 1 Aug 2024 20:04:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471K4dKx086331; Thu, 1 Aug 2024 20:04:39 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:04:39 GMT Message-Id: <202408012004.471K4dKx086331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 78de1d02e0ce - stable/13 - vnic: fix compilation of an IPv6 only kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 78de1d02e0cebc2009e0dcb04b7b7309f326133a Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=78de1d02e0cebc2009e0dcb04b7b7309f326133a commit 78de1d02e0cebc2009e0dcb04b7b7309f326133a Author: Michael Tuexen AuthorDate: 2024-02-06 21:47:16 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:02:55 +0000 vnic: fix compilation of an IPv6 only kernel Sponsored by: Netflix, Inc. (cherry picked from commit 1d3d30c8d2e41052796c5bdd9220d7e3daabccad) --- sys/dev/vnic/nicvf_queues.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/vnic/nicvf_queues.c b/sys/dev/vnic/nicvf_queues.c index 4410bd4998dd..e1f434d0eb18 100644 --- a/sys/dev/vnic/nicvf_queues.c +++ b/sys/dev/vnic/nicvf_queues.c @@ -1744,10 +1744,15 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qentry, struct ether_vlan_header *eh; #ifdef INET struct ip *ip; +#endif +#if defined(INET6) || defined(INET) struct tcphdr *th; #endif +#ifdef INET + int iphlen; +#endif + int ehdrlen, poff, proto; uint16_t etype; - int ehdrlen, iphlen, poff, proto; nic = sq->nic; From nobody Thu Aug 1 20:18:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgJB1yQQz5RNkx; Thu, 01 Aug 2024 20:18: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgJB1KRZz4H8J; Thu, 1 Aug 2024 20:18:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFZxlBZFXed0QYjBS87mMAVFnF0nGQTxXraeDnr/p40=; b=d1RESzsmNi8uMC3cUbEezzocw5A88JTlWDyj55fgN/lTBE5q1WnaBK4vx8jguHrE8boNxe cqu8eU+QK+sc8CPURuWAGNo9EvVHlXln5jzsYvYvT1ABCVVbbzQyLRp9sbI/YrsoMYwdTR KVAHDk9ShQFk3U9DotgeMdVdMKald3GwJkEvKf2HT6XO68Gzdd6aFhkhdQO+Yf0wvSiX8J z3FLAGINBlqbvCWybtak6NuKMzn9jR30EOUs2j7v3SfcJNtjqiIPUTkXcvLvKeBoRBQygX GGtjRgzYXUFkJVslynESFKxj1SV7p9Whx1L6Xi64owkYl2Yo6rWkHe21uiS4gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722543482; a=rsa-sha256; cv=none; b=p++g53NCTX2q2YYfLVX/hVFJu0iE+z4GWPM3Jj14AVu/uEDOlwe/xFEMkn0pnqJAbbNdjQ 4ZYtcaRVS/QZpuAx8OUoXj4dnihEiBhTw8IIRBGP/43rEzLIxvcEZ33ELK9BOCpmOoKvDq QCP0O2tlj42zm0ZIL1E4TEtphr9OKoA0b7uBvbDQqsmKI82R2BL6XKizinAcAfzs+032ep SVYkdsbGrlPLXo0En4BL5iVqRhak8zgtim1tobAf2OGDMsb/KgwR/HBPAChTIERrOaRw+v qYzyos1mQ+a10vApr04rBw6N5qTvEliOVHpi0kdhTyZSZEo/2jpcGrB+E9vkcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFZxlBZFXed0QYjBS87mMAVFnF0nGQTxXraeDnr/p40=; b=jaXgLidY/lm0aoMx924QnMQMBgfZxI5wv9oNc4HdWDVQvGasO15KtwAJ80XdjqwfmxRTbt v2j3aOMQiQJEjbB9J/jsNeeA5ecPFlNpgPKDTGkxB4QDOxBBPaMKGXIRjyhju7AzQSvCQZ 1mRtByQX87x8NLou1OiNi3PIRc/Ku+MDOQhrHiC5hoQOQcxWQiCyf2o+y1OE65AaJp5Ba7 vw9hYQMtiHanDQoCck1617YKUtg+G1hFRX/mSPjLAma3w6z55mkCtFsp1n6NgBE5oj/lI8 Psbl8v1KUHhtS9Eo7FCn2ON87TF4XVlqy9x243sTWvGOFvV8Md0xvz2SfWTSgQ== 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 4WZgJB0pLVzybZ; Thu, 1 Aug 2024 20:18:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KI1N7003986; Thu, 1 Aug 2024 20:18:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KI15j003983; Thu, 1 Aug 2024 20:18:01 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:18:01 GMT Message-Id: <202408012018.471KI15j003983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: bf28627b71c6 - stable/13 - sctp: improve consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bf28627b71c6feae3f3fdf614c7b65d71d682bac Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bf28627b71c6feae3f3fdf614c7b65d71d682bac commit bf28627b71c6feae3f3fdf614c7b65d71d682bac Author: Michael Tuexen AuthorDate: 2024-02-23 20:40:46 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:15:42 +0000 sctp: improve consistency (cherry picked from commit 533faf21c19d0fa4bc3c0a986c67667991f90883) --- sys/netinet/sctp_output.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 7626e4ec066c..ab97d9b13e5d 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -5019,11 +5019,20 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, at += padded_size; break; case SCTP_HAS_NAT_SUPPORT: + if (padded_size != sizeof(struct sctp_paramhdr)) { + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error nat support %d\n", plen); + goto invalid_size; + } *nat_friendly = 1; +<<<<<<< HEAD /* fall through */ +======= + at += padded_size; + break; +>>>>>>> 533faf21c19d (sctp: improve consistency) case SCTP_PRSCTP_SUPPORTED: if (padded_size != sizeof(struct sctp_paramhdr)) { - SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp/nat support %d\n", plen); + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp %d\n", plen); goto invalid_size; } at += padded_size; From nobody Thu Aug 1 20:19:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgKc1gbnz5RNqR; Thu, 01 Aug 2024 20:19: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgKc0mW3z4HcZ; Thu, 1 Aug 2024 20:19:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KJRhr1jh3kdWUY/PHJW+SB3FoRc1FVuvXxfs4HZDc0g=; b=G89At2X2KqO1GKBgAAn7iAuWsYctbJxwMexRzgxWlkkWpcvZ1lrov0oRhTZVxZk7FNlQ1c cd/oVXwYeAp1GiIC1aItTYDuu2KrJnJso/HF0ogdTo7Lc053WX4ErQz5nx/87Sg3yQUjQ4 hoJsRTFeTACD1tTiruYI4JrJWGvpJNcg7WcQKydXFWCxwTdIgQ1i9/TmyJaRTcF+4lRWif tmQLqGNXzQXHhOF/ociyw3SR5glYNDSQnXeiSpzdznBeJSR92a0W3XSjuAdoLWPXqwOsSs FLEs7Zep4wUF0p6Ihh3m9tJT6uqujWS0MbJ5fDi1hqa9LeMXaww/5qwRqBrw5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722543556; a=rsa-sha256; cv=none; b=d+/YCpJMbNMcJXaADSpX8y+WHZUYmyY7Qm3hgebbnupwaK59Nk7lddIstWiy3pVhu0dTXn XHkxQeIjbhyjBTYMLWzdnk3UmEQbZ7vitee97pAKGbhcPTgtYHlEJ9ia1D1TxmVfZBg9t/ hoLWebfAVhMYdbuU8W8ryyT/Yl8WH6chklIJK4jz8WT9dLchdU158/Bfa2ptpMiphLHKHO SrIRsF/B6eA4M2ZrDfN/e9+QHe/chHvhV5Mpc+2NJoWzLRlLf22Mt0wMx/M8FLizzdT+nv uwhCFjy/0Fab7wPG2dXk/Pp5gg44g+pYg5O5QJTUuj3UfkdpFF45MoH8GL2xnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KJRhr1jh3kdWUY/PHJW+SB3FoRc1FVuvXxfs4HZDc0g=; b=WIEeRXw9YaQF39Pi9VjUm9wp+zbyPukNfxDzb6IWbAzait10jG4RQ6KuePsSYUEbJSTpWq BZNJIFEjxJzsnI9mcmMUyrsqEozNR0Tu2YnnH0lLAQ3hzKP7HaBTdXjBZxz87Zktu4zu0d QbXMyy5IQkzqTniFJtQPvvVQILsbuhPXbmMrcUaeDVO/Y0JUkjp2J2oj7Q+d3zP7qcxvDo DY4AN1B2h8R+t2pCUf8W2nWkwXp7UemL/VcGcWNv54RbK0m04N8IafIo0KPKt2kNMYTwI/ 0DCSPcRfqAkLV6MDlVu2edntqBK/45Aa9GjF11M8gnZEH8llYQGQjis9fJvfpQ== 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 4WZgKc0Mctz101f; Thu, 1 Aug 2024 20:19:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KJF8u004338; Thu, 1 Aug 2024 20:19:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KJFUK004335; Thu, 1 Aug 2024 20:19:15 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:19:15 GMT Message-Id: <202408012019.471KJFUK004335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 25152e8f1a37 - stable/13 - Revert "sctp: improve consistency" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 25152e8f1a37fbb785bfc56a83a68860fe75f8ea Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=25152e8f1a37fbb785bfc56a83a68860fe75f8ea commit 25152e8f1a37fbb785bfc56a83a68860fe75f8ea Author: Michael Tuexen AuthorDate: 2024-08-01 20:19:05 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:19:05 +0000 Revert "sctp: improve consistency" This reverts commit bf28627b71c6feae3f3fdf614c7b65d71d682bac. --- sys/netinet/sctp_output.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index ab97d9b13e5d..7626e4ec066c 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -5019,20 +5019,11 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, at += padded_size; break; case SCTP_HAS_NAT_SUPPORT: - if (padded_size != sizeof(struct sctp_paramhdr)) { - SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error nat support %d\n", plen); - goto invalid_size; - } *nat_friendly = 1; -<<<<<<< HEAD /* fall through */ -======= - at += padded_size; - break; ->>>>>>> 533faf21c19d (sctp: improve consistency) case SCTP_PRSCTP_SUPPORTED: if (padded_size != sizeof(struct sctp_paramhdr)) { - SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp %d\n", plen); + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp/nat support %d\n", plen); goto invalid_size; } at += padded_size; From nobody Thu Aug 1 20:21:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgMz6rDWz5RNjQ; Thu, 01 Aug 2024 20:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgMz6N6dz4Hqb; Thu, 1 Aug 2024 20:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kr8lLOsHyQN+2JEMlXnnU6hLDz1MpGuMK1vwvLh/mgA=; b=nF/ZovXanF3upXGUseQ+KGJqRxQTY/74RhVm5WnXNdQgJJ50IfWHfZ6dUU86r82R7jQ77f l6DkYqBPHKelsoLry0x8PEwfdWv3LKghGR2b7MKFDTRd02YEKOOj0JBDSl9HHFjg2BH16w hQpxE8fMMDnhoh+twa24ium9y5pRELIb0LtY6wYyOeU43h2L2fNUU80MxY1CFyJ4NRohYr LXN5OoVgBN0eco9ASBvpPO/GuRDYruFp/c7mOJ5yF3A69YNE5a7lmrGvO1ml10VFiiFkI9 CRx6tRtB728bbFNsTZwH2em5SSRctn0g2T4ORqAEVn92QoEc+NYxcZqXFLIZyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722543679; a=rsa-sha256; cv=none; b=kaUwO2a6JFKmeqxOO98A0k/b1jl72F99dCOSKdi3PXyzyhm2sAGc1VMnyDmmrCCNg2iUl5 Qq3kYK3utkTRm5LK/Z123iwfOX1YGxRzQlUfCiEwSRcMzp79nzULzSslvXshUgYxF2SRcq sbb9+V7w1JQIo1CYp51GlshJpLGtbMgiurufqJ5nYqu8gxKTMAkZLlz8sTE4uji8ZxeLGn cFBAVms/1g3zsC3/xMEfkHk4B4r5EUXhWS2cWcVDYfqLSDMkIg4G5ZTmmQdDGL5fLHkkl4 E17b8QFecZNdBtTEcTyfPmMmlZPirCjmqfAOvhxmqng/xBuPaaa/2Poxp9w+mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kr8lLOsHyQN+2JEMlXnnU6hLDz1MpGuMK1vwvLh/mgA=; b=az5HqW34umZGdZ9aNmvcrn6rCivZ2KpOJilgTjDMsrohgobXSgF6VjW8jtkrPi0W/olGH5 IixiF+j2lddWfKpkFGJ/Z4sUDn46i3iSIetLHrVERmeatg3D/80uUgNYYn80SQGElsnHBp Pw7T4kv3LmJFCFg+pJWV1At5l5DL+IOPvIwLE9ZJ72aDaJLCN2jvbOd5OU/y5AWYRPPMkV TcRKyhXTO/RAOE6qVdFVZDOHc6w8pSTbROC2Dr7hWMsbCSaBbykKu5Iodyt7TxqOY/oJi2 g8/ek4M+513sT6Jllpw5CGC/GWJbXJpgvkYyEt2+vpwo0IBJmu+JsezEvJ6thQ== 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 4WZgMz5zGwzybr; Thu, 1 Aug 2024 20:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KLJQU015274; Thu, 1 Aug 2024 20:21:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KLJ7L015271; Thu, 1 Aug 2024 20:21:19 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:21:19 GMT Message-Id: <202408012021.471KLJ7L015271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: af08cafda0d1 - stable/13 - sctp: improve consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: af08cafda0d10a64bae8328126868c527171963b Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=af08cafda0d10a64bae8328126868c527171963b commit af08cafda0d10a64bae8328126868c527171963b Author: Michael Tuexen AuthorDate: 2024-02-23 20:40:46 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:20:46 +0000 sctp: improve consistency (cherry picked from commit 533faf21c19d0fa4bc3c0a986c67667991f90883) --- sys/netinet/sctp_output.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 7626e4ec066c..f13010e54521 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -5019,11 +5019,16 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, at += padded_size; break; case SCTP_HAS_NAT_SUPPORT: + if (padded_size != sizeof(struct sctp_paramhdr)) { + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error nat support %d\n", plen); + goto invalid_size; + } *nat_friendly = 1; - /* fall through */ + at += padded_size; + break; case SCTP_PRSCTP_SUPPORTED: if (padded_size != sizeof(struct sctp_paramhdr)) { - SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp/nat support %d\n", plen); + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp %d\n", plen); goto invalid_size; } at += padded_size; From nobody Thu Aug 1 20:24:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgS45L1qz5RPMy; Thu, 01 Aug 2024 20:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgS44l81z4JRB; Thu, 1 Aug 2024 20:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TvjOHRxTNj3WC31n3rXPb2d3efGu+WImTFaVP0M8xvg=; b=l9pzAdjq8jpcIR9TZ1P44k4P0WE7LYJ/hTSPe9685KsQu3NmrdSWL8YP00+aK744WAQ7er ICGSUGmkokQHmJC3mpP9rP83cQHAvqt7m6UAhbISeLwUZPj+m2B3pZEIYf3z5TMZUCDaRt fuVqSsVKY306Z4nSUBvsrG8ui/HXPJER4uy71JMvw8tb42cI5sFWwNfilDetdbJ0v0flXk vN/kicI1/nSwl5BnwudNMLE4M6QYknVM9Ylj7RTMlzZB7x0LakWyl26KQkP9gsShlcUUu4 JKveKHeMQhD0gZKK/qLX66cOr9KhmOEk2cx449UVn3zID3f8r9CZ34cQ4sppqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722543892; a=rsa-sha256; cv=none; b=hojjk7bacX92y+Eam14oMeaoQYd3N4nMO2w3vzFtHmWJmXlnJU2J7+yuiIq2R94U0uo7XE 27ITPKMKeTRq4qgL7LnuYcSDB+N8H5XmT9HUr/0IHuzLYxqWnnoA9OrjkJeQks0BBr4Tbd 32Eakq2Jj6AiB635/Ms9jqL3ttqD7UUM/7tJWGeYLCrHzqvOmED6g0fir/F6Q9ZVoek+CP DV6JQqIgcfeWNXPcHHF7LmA+d6/MQLM33nkecEuyU9exy9JCtHjvjxPP3AS0J98Yko8vkM 7GGq4kjJANjaFFiaKrzuhWbHZxt4+j0XlBteqtmQ7dLqeBalw3cD4bPDvu7ycg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TvjOHRxTNj3WC31n3rXPb2d3efGu+WImTFaVP0M8xvg=; b=drNIasiJbdrsRUnD//HOpRJtDTyc1w06m6aYtqXxV9uDBXsEbd2xeJG2eG6ATWjVi6C3NU iw4YAz2iByrEtBhBB9kSbwn6VxvcLyYa0pFfl5Q2rHMtUZ6P9zhL3TZMDOExvWmY69HSqf HK7rgLMJg9fzaBMny1NUEAJ/bOLbhQQ0s8FdeAGFHf4z4xQdD+CLI41hcg2qcSzdFBkX6t NEmcO0ZpHHWUDllNfJvPG+dtAbRhMDvCAw4aOgv0Vf8Khym7dG+Kj682E7pEaB8cxVT0o5 G9qD+YtNF35zCeY+Jct1cyc+G+m0e+olBSIcZIplnY87TrKlyjFweL6/d8rGZg== 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 4WZgS44KvTz10G2; Thu, 1 Aug 2024 20:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KOqD2020455; Thu, 1 Aug 2024 20:24:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KOq5k020451; Thu, 1 Aug 2024 20:24:52 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:24:52 GMT Message-Id: <202408012024.471KOq5k020451@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 2290185085ee - stable/13 - tcp: no data on SYN segments unless doing TFO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2290185085eecbaecefa70cc9b3769b7518c9bb2 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2290185085eecbaecefa70cc9b3769b7518c9bb2 commit 2290185085eecbaecefa70cc9b3769b7518c9bb2 Author: Michael Tuexen AuthorDate: 2024-03-22 10:12:56 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:24:18 +0000 tcp: no data on SYN segments unless doing TFO Ensure that there is no data on SYN segments unless doing TFO. This check is already in RACK and BBR. Reported by: glebius Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44384 (cherry picked from commit af700f430fd86ba3eae63e587985a12436db8f69) --- sys/netinet/tcp_output.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index ba559500552b..d95174e53789 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -482,6 +482,12 @@ after_sack_rexmit: (tp->t_tfo_client_cookie_len == 0)) || (flags & TH_RST))) len = 0; + + /* Without fast-open there should never be data sent on a SYN. */ + if ((flags & TH_SYN) && !(tp->t_flags & TF_FASTOPEN)) { + len = 0; + } + if (len <= 0) { /* * If FIN has been sent but not acked, From nobody Thu Aug 1 20:27:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgWQ72p1z5RPQ2; Thu, 01 Aug 2024 20:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgWQ6TyXz4Jfy; Thu, 1 Aug 2024 20:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmujPb6JfKT5k2reTYdTZNX2kcqmhpQUYcZQ1tGCFYA=; b=JqgR3IhXDI+W1M30MjuZtZe8MQ080l9JcC6OG1JnPHZ6NPDwBFhxSDhIIYGuWBz+hyaq4A SoZhbwZnAByCtXgagZEzLXf+/6+/p2BN+rn7otM7cuWx649cEn+Zl+o4slK9cStW0QU4VT cVu07gJsI3k1zYt6reLqvYsIqbAWNnus/QyPFlYz9KYLdaqaYJPpAJynrBIwpdV+lhOB4b ASE18MfI/r64DJG+pG6ikuBN536MNThy8InfrqIKEgGnC+YsyjC4ELMFhstFOtT8TzTcmz r7Y8Wmt/VI3zKFL6Dw6iq3btF1yTcX0WiFjtIjiWYA8rg8jckoNPe46yebKTDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544066; a=rsa-sha256; cv=none; b=K9VSM/wCCW7ajI6DtyomoWS/MbGk5Q4A+ZXLKusvkbaSXMZ65ZPTVemju35T5vOfJPQ/n4 38rgh4KOihuSBjX7j2XgfrH240GkVK3BSvVKuEPwVuQy8KYJRI6yFDvGa2Fs2UB+mUpftm EliE1AsaCy/7afqDleTIIf/rQ/l1Kq+p9zSO1s25cB2qkKLU8BBEEwZYJx/N7LRWfKPDAm 3X/ueodQkVYRWHWYdXFoa0WcFdAyD9TWOarESm6VypCSdRs1Tud9KaJJxbJaw/DcJkzmRc rP2Up8xqMJXmE7DkAyZp8+HwzURDdQVMAd3YIGStuShnR07IstWR4R8xl+uzZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmujPb6JfKT5k2reTYdTZNX2kcqmhpQUYcZQ1tGCFYA=; b=vm6VLDWoGdVC2GPVk9qxAmTitDzyrIcZCzZ9mQmsylbNUjhIUK2UX9PdoC6KhecXzbHtV8 5xOS38B7dri7A+BFKzKbeBpSEIDIFfGWUKQ6nxR8XQWkV2GS0FBIsc9PVxPHJpBiPr5O1O Ls3TIZfJcMxmG2raAA8fiZrGU13GfdTR4DcWXmiG2Rr+8TllCAsOXkb62gb0Y1MHvP940Q h/WA9CimVRzEGgbWGdsOEcZAuFuy9kc+g68PINQNRa7GBTNoQOjybJTYrfglWu5jF/Ga5f oSKZRQo5jiZOYjiETN/k78kM4sJt1IuESQKFUcAWy39zZEXb4KU/i+fUDlZWvA== 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 4WZgWQ5ysTz10G3; Thu, 1 Aug 2024 20:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KRkns020935; Thu, 1 Aug 2024 20:27:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KRk5t020932; Thu, 1 Aug 2024 20:27:46 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:27:46 GMT Message-Id: <202408012027.471KRk5t020932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: bbd1d17ff339 - stable/13 - tcp bblog: use correct length List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bbd1d17ff339f43159f79fce9bd68a85520b81a7 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bbd1d17ff339f43159f79fce9bd68a85520b81a7 commit bbd1d17ff339f43159f79fce9bd68a85520b81a7 Author: Michael Tuexen AuthorDate: 2024-03-27 13:31:48 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:27:09 +0000 tcp bblog: use correct length The length of tldl_reason is TCP_LOG_REASON_LEN, not TCP_LOG_ID_LEN. No functional change intended. Reported by: Coverity Scan CID: 1418074 CID: 1418276 Reviewed by: glebius, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44510 (cherry picked from commit ed505f893ab08aa61e2a1046ae54df357a108260) --- sys/netinet/tcp_log_buf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c index 27b587f6ec9a..f51adf09391a 100644 --- a/sys/netinet/tcp_log_buf.c +++ b/sys/netinet/tcp_log_buf.c @@ -2234,7 +2234,7 @@ tcp_log_dump_tp_logbuf(struct tcpcb *tp, char *reason, int how, bool force) if (reason != NULL) strlcpy(entry->tldl_reason, reason, TCP_LOG_REASON_LEN); else - strlcpy(entry->tldl_reason, "UNKNOWN", TCP_LOG_ID_LEN); + strlcpy(entry->tldl_reason, "UNKNOWN", TCP_LOG_REASON_LEN); entry->tldl_ie = inp->inp_inc.inc_ie; if (inp->inp_inc.inc_flags & INC_ISIPV6) entry->tldl_af = AF_INET6; @@ -2324,7 +2324,7 @@ tcp_log_dump_node_logbuf(struct tcp_log_id_node *tln, char *reason, int how) if (reason != NULL) strlcpy(entry->tldl_reason, reason, TCP_LOG_REASON_LEN); else - strlcpy(entry->tldl_reason, "UNKNOWN", TCP_LOG_ID_LEN); + strlcpy(entry->tldl_reason, "UNKNOWN", TCP_LOG_REASON_LEN); entry->tldl_ie = tln->tln_ie; entry->tldl_entries = tln->tln_entries; entry->tldl_count = tln->tln_count; From nobody Thu Aug 1 20:28:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgXV4MXpz5RPV3; Thu, 01 Aug 2024 20:28: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgXV3rCjz4Jvr; Thu, 1 Aug 2024 20:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jVtFfNHYFCErao+3L6HmDmCr1NsScuX+QtNpOihPOas=; b=hyjubZoPuXiOzp2vaMGYWfo8voHXvBDuDxRQdwmnFrBSr3SqFCLsrbxIhNxfnPh7CYTuI4 DB5zq34vUU/jFy9r/ayKrtBWrvkzCnpFX8hSudUBqZfd2BjoII0uKX9ywUEOheacVky7wf Pt1YA40AFkhOiy5L8iqcTpgYPXKDUZ+p68ok1AsbMz8PB/tjxXvbWuJM8Y+sJ30vex9aC8 gDvX2AjOX7ed6pNxu8G24O9z/rLqTgVgxS9Dj+jDU5deyu2Ch45GMldbNUqCrNAxvoJL/1 HWIlXoNwTPJgUwrGbrkoz2QWjf+4PSYuVs+577iqD7B1BOCDHdAYE0Q7cuoSoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544122; a=rsa-sha256; cv=none; b=G0CpfJnQ0vT9rc72hhz0sLVtT5PCaN5OZL+TZ3a7RFlXeygfEf8Yi4s6BX1KKBx897sHFC lseW9WlN82zzhk74HWTNOAHKiy/HLEXVh2eByKywYt/pYZsiCX7aEW8pEOZRfSaNeVub/I 3iL8SAKXr0xeT3SwGw9bpK+D+Zj8tT4yjUcCWoQRThhVC4C1X9zUNjzAKk8F+Qwz4YqyL8 VIs+p2W+nhFOAY09GNCScrp0aZcEq0pTxQv20m4HuGR6guRWRrIrysSO1QSL6ccD/gIY29 iaWS8R+EMMYVJtZzckugim/3JoizsyymntYjRm5JdHV2p0vTpOip6EwgskiqJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jVtFfNHYFCErao+3L6HmDmCr1NsScuX+QtNpOihPOas=; b=yEz5Mc3f61A03XKFqQu2rpcbaVU9QaZFmFuZKAstMDGcBdj/4bwMEuBYyPxh6CuYevmDmn vppQ1jYOUS5+CZpJjPS261NQSN5aqSWHm5tiTPM0EnWTILkcj/+tdlBWZbfX+o+NT93gNR uSKvI2nfx/v8aQRlMk8chcYnvlvoPzYyJMz00/TLxJnRrq2Q4stKXlAM4KCyVXotfQyGpP 515lg8dSwmfkwg5Vwyh5548MHXGyrp3ZEvr0RuH9dOGQvGT1FnRZVst3w2768l9Wo3MtKo QJHqnCa0wU94kWsfDeJzBhDuG4WiUotC0yjujIt9SEM651/ODXOG/oQAEhuvIA== 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 4WZgXV3Rb5z10Jn; Thu, 1 Aug 2024 20:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KSg8R021175; Thu, 1 Aug 2024 20:28:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KSgte021172; Thu, 1 Aug 2024 20:28:42 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:28:42 GMT Message-Id: <202408012028.471KSgte021172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: d341a5645144 - stable/13 - tcp hpts: improve consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d341a5645144da014cb800dc98ed5c785df504f4 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d341a5645144da014cb800dc98ed5c785df504f4 commit d341a5645144da014cb800dc98ed5c785df504f4 Author: Michael Tuexen AuthorDate: 2024-04-01 19:51:59 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:28:16 +0000 tcp hpts: improve consistency The target_slot argument of max_slots_available() can be NULL. Therefore, check for this in all places. Right now, all callers provide non-NULL pointer. Reported by: Coverity Scan CID: 1527732 Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44527 (cherry picked from commit b600644fdd6cefb1b90d76fdd5aa595946611a7d) --- sys/netinet/tcp_hpts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 18576e181b6f..4c177367a7ea 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -796,7 +796,8 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t * * "0". */ counter_u64_add(combined_wheel_wrap, 1); - *target_slot = hpts->p_nxt_slot; + if (target_slot) + *target_slot = hpts->p_nxt_slot; return (0); } else { /* From nobody Thu Aug 1 20:30:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgZ63xLYz5RPX5; Thu, 01 Aug 2024 20:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgZ63WPyz4K4r; Thu, 1 Aug 2024 20:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyvWQnXF+Fbk5u0OwYTc1oYZJuuX8CI3xvxGQovv0JQ=; b=GUCI6SWM+AnPiaf0CU61svpvj0nb3DMWRCnx6hCa3eiW0Py1ikxojNv6VJcYYW3yRVZ8mP tTd8RwKldfmuQVj6QYrCyMKET9KcEz3vjHRoiPQvq/ISAdf/OZ0Zc8mBLWAzLMVnjbXalR 38xreguYDKPqQMxSlyaI/QdMVE8x1O0TSnoOCe9B+ob/0q6PQ3J4PXb2An47nPwFffIa/w RNuUWOEtfaN47jMOjiQwBaJvakHH9Ar8hkhRBTbZfnelRhGLfhD93omnUWDadZTqm7d31v 94VSCKWPqWwC6oQUzDgaSgIENSXx25ToVblV8Mx9FLxHriu7egQoSkLAlJCgbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544206; a=rsa-sha256; cv=none; b=s/tBrn2doMTRQ8ZcPnBga3F19ntnotC4eFXvb0KNzxm3J/9t9+aYnE3ovG4xAzMvghbnn0 /XaGs3xx3AnGCWw8vBmDG1xWkApf4L+0XBUlO2wlhroKjR0FJa2oXI+lPi7aeeFuAhd/l7 yTfFsgLpDKuiqhNFP12MsGxQQpqsDcSL7M2dYPxkL2+YVZmv98SGNHm8Tb//k1VdiYKk5t KjzVLfdoUSZoEPECH6XkBbTL2DTqMjr5wv/Dl8qZ6cFZ4juulE/7O8zOqx70X3i3LrWY45 oXNoX71ie5TadlyxpGuyzW9TUCFORPFNfLFcACmgcbp52ekM2iLQXqMsG9StTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyvWQnXF+Fbk5u0OwYTc1oYZJuuX8CI3xvxGQovv0JQ=; b=VI323y2+paB/6nKXzu++QXpAzFKznlKNnx88l91UySSDM0JvF4fho5x/kYcdYt2t+wbLZt WXVwIqMrFhNp4+oZW1uuRN3ZZjnY05kLQcMvspvBFaF5TQ6ylHkZlp92ta9mPvYFClxD66 kGe32HgYsp0jfjd9ToSw3cqtttR3hwQUJ/ehF6Fw2CfGfcAyL60ZeNehbF9A5g6AfEeYYv nYTyq3lsNOVGIJ8BXCMRY7MZf/xBoWja7aobpc8Ocgcijh2WRMycWyA+zuCk8zwM8ZvHJw 2JIjFz2qXcmuhcU35KReN+PU+1RoYner25ws/bAmYr9NQr2mkC0LVUD38tQHhg== 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 4WZgZ637hcz100G; Thu, 1 Aug 2024 20:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KU6Hf024436; Thu, 1 Aug 2024 20:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KU6HR024431; Thu, 1 Aug 2024 20:30:06 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:30:06 GMT Message-Id: <202408012030.471KU6HR024431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 0cf2b6fe97fb - stable/13 - tcp: fix comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0cf2b6fe97fbb6920aeb5e51068063a457b0bb56 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=0cf2b6fe97fbb6920aeb5e51068063a457b0bb56 commit 0cf2b6fe97fbb6920aeb5e51068063a457b0bb56 Author: Michael Tuexen AuthorDate: 2024-04-03 16:21:19 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:29:24 +0000 tcp: fix comment Make the comment consistent with the code. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44611 (cherry picked from commit 5a268d868890dbbfe96361906be20d01cc252b2f) --- sys/netinet/tcp_var.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 6815c6533073..e2578a9bc892 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -553,10 +553,10 @@ struct tcptw { * and thus an "ALPHA" of 0.875. rttvar has 2 bits to the right of the * binary point, and is smoothed with an ALPHA of 0.75. */ -#define TCP_RTT_SCALE 32 /* multiplier for srtt; 3 bits frac. */ -#define TCP_RTT_SHIFT 5 /* shift for srtt; 3 bits frac. */ -#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 2 bits */ -#define TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 2 bits */ +#define TCP_RTT_SCALE 32 /* multiplier for srtt; 5 bits frac. */ +#define TCP_RTT_SHIFT 5 /* shift for srtt; 5 bits frac. */ +#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 4 bits */ +#define TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 4 bits */ #define TCP_DELTA_SHIFT 2 /* see tcp_input.c */ /* From nobody Thu Aug 1 20:32:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgd90lHwz5RPsb; Thu, 01 Aug 2024 20:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgd873Njz4Kf4; Thu, 1 Aug 2024 20:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uFMT6dzHJOSrrm/OWMNzfCdSmuFxcnNN9shIkTeoT60=; b=GOeOAhnkVKng6QGRX8lmmGjfyna6hfqmKmOC4yJtf2WAV5TCwURPPeRsthqE6LfB49n1hb xUJwEUIYkMxY7AJZhtmv/95ijqblk2uqKyEUearjDMrI5WltyWva81X5ZCe2g2Oo+OvhOc KNvRSQWNsPnYhnBi5Uo6m2HIUk97a1npK72Jfyt65jCE4guy7zeSDynAzzJObbR/lBN54F d2YLEGr7ikuLeIglf2h/3EsliZIrgPhI8b8Tw+xH5gBrL3Tu8+Sd/F2ucpXxoirQkZM700 U0coiJmJZKAKbdeLk8JHzLlSVBWAA9iDwEIzhW9XpG5qp/kYNXX9OU3+nCdPFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544365; a=rsa-sha256; cv=none; b=sLZezbuozQAjAkJUOAMfzWb47vL4SPB37w2T12wn3bO8jyXb8EJQ5JLDPa3b7Aw9snGP0h ZBEhcy++wHurL3M5sbqDNiBHy1bSHPUhtXexU6FvwfySkgT6RBvle4gZjnTGjpelwdfbxI lDtkjGGt+BtcooNjQ8dG+AKIx2X4EcJASUH49MEBVZxFmb11OZfj3rGNh8C2f7fY2A1o5/ 4yBPWS4P9IwF9SNDLkCS8koDdjsvBdNoiNRzvN2y1HOz0+W6UhVQLeyQtf2A3KWCeSuzsw Q91SPBIOmpngTKAyZ9TcNzDUmyd7z7JdXaStpUvDopdq8Y6JC35U/NmXtW+szQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uFMT6dzHJOSrrm/OWMNzfCdSmuFxcnNN9shIkTeoT60=; b=Qp98zzl56Ja+Qi0nxVb7H3Viz3146fiuSqqA5Kj1k35CcVbp5t6OAKu30Mp5O5Mz2Vw1I6 OKa8TshVlzJeCbtVRcKTWvEXmVp5wR6ESg/90J9NQvVsVKIMPJh9ur4wxhIeRjepeCubYp AIAmiFDBh1tg6lkVeiI2ZK5VW67AOY0fE6mKlr4eB/fcpSukRgEz39a8zD2rErwYtGVmkV Mvw1DL0w//OaCI+8bOdf+wt8s9Nhqnq/nCOktbRv2YCescjQz5Mm2hO4QuMsYUqyGj6ACq ZbewzhDNplGhjGHdKvIwPh455R2e7+d3sJc20c29rodRotukW4UAu3FKyvws8w== 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 4WZgd86frdz10XP; Thu, 1 Aug 2024 20:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KWiUX037319; Thu, 1 Aug 2024 20:32:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KWiNB037316; Thu, 1 Aug 2024 20:32:44 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:32:44 GMT Message-Id: <202408012032.471KWiNB037316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 7f328eb439a3 - stable/13 - tcp hpts: initialize variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7f328eb439a32176b4e6d00c0d4d3fdff53a06ee Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=7f328eb439a32176b4e6d00c0d4d3fdff53a06ee commit 7f328eb439a32176b4e6d00c0d4d3fdff53a06ee Author: Michael Tuexen AuthorDate: 2024-04-05 15:30:31 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:32:02 +0000 tcp hpts: initialize variable Ensure that tv.tv_sec is zero in all code paths. Reported by: Coverity Scan CID: 1527724 Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44584 (cherry picked from commit aaaa01c0c858fd703194c6cbd515dd514574381f) --- sys/netinet/tcp_hpts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 4c177367a7ea..ee4e68572c47 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1995,6 +1995,7 @@ tcp_hpts_thread(void *ctx) * enough activity in the system that we don't need to * run as often (if we were not directly woken). */ + tv.tv_sec = 0; if (hpts->p_direct_wake == 0) { counter_u64_add(hpts_back_tosleep, 1); if (hpts->p_on_queue_cnt >= conn_cnt_thresh) { @@ -2019,7 +2020,6 @@ tcp_hpts_thread(void *ctx) * Directly woken most likely to reset the * callout time. */ - tv.tv_sec = 0; tv.tv_usec = hpts->p_mysleep.tv_usec; } goto back_to_sleep; From nobody Thu Aug 1 20:35:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZghQ0sm5z5RPsm; Thu, 01 Aug 2024 20:35:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZghP5XxWz4L3K; Thu, 1 Aug 2024 20:35:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2PcRil+nEEM3khN7Uvv17dW+kPToLeJ5ks627W6rfKk=; b=p8MTRc0D91OHCIG0WwuMtToLW4dPeOrW8ngXNubzn8aehYwE370oF8yh4XFqdII3/m6tsQ QCudmaN0PH3c9/NY0GGm5s5Cza3pynF6nRjkjYJDdwHTUlUcA50HuYKrNd91vPVMziilVt FIwTJ+IN/qcovDeZ7BQl0RqC5+pN6uVm3X/Xpn3aoRuxjav+9WmgJKtTQz4PughdjRmGnF yxdWjZeC9lrbD2SgTPgSGA7runyFxhZKn+DHG9dE+j2+ty00uia82lWpoZR06hp/Q0v3v8 jH7CpoVecr7BFm0PnrRSjAT905LixKvvF6Rk0Gv6gPPVcQyh2FVTVm1tnmaX8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544533; a=rsa-sha256; cv=none; b=DaMd/fuJPvBLAlH2dpfNgwCKJmyth7RmrQWpd5NcJGtAvtH5nE423l4bCjnFQHWmQcU4bl +Umx9QMKTPhuhJMwhsIyGtY8hdql4vS7ArYnPrS0cAdjdGik2Q6PjRXri9u4Xrc0SDYOtl Hvve9CjG4/7f5TjxiyREBH8WRzkqwxDgQNNJ0RahVjxdCCPiuTV0/QOf3V3jlqVZgjVhLF rEvfwhPi9jyKSxJMZByK/okqazmobv3LJvn41SheNicGcv0rwfH6/PKuX/yTv/uaWf1w/T jH5Pam6IGMlPBe6iQABMAYuE4RFPf9WJUj/uYiS/H5QnQRP48LM0zsMWZenmMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2PcRil+nEEM3khN7Uvv17dW+kPToLeJ5ks627W6rfKk=; b=MZvgosca6xd5VP5H6YGGQrR8xRCRuFXe1UL3Iza3zvpuYv1th2l+7mXoFcehORh6YxGZrd ZuNCOE1Xo3pXK2g3i0dmBkiV+L3WW0YaIg1vtqwP4nb8Y1txTKY5cJ4tbsH0BNRzJwg0Ls gKW3iCY0ziOWZf/zrCgOFF2KixvP9c46JaUdxQarKKTCmluRJGilIw0A83tvNEzf7X3GqO SkQ5QFE1xnhPzoeyWHnc97w18HSxaWful9G6LQA0YsNKdAKy1splyv7DR7t8K1+aGoMFFf TcMjl4VWO1u5E4Ng9DbDI9RN357qsJhXWU+Ku5jlNQFru++bcw5UFhsbwp50Pg== 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 4WZghP587Qz10Gc; Thu, 1 Aug 2024 20:35:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KZXp4037896; Thu, 1 Aug 2024 20:35:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KZXFm037893; Thu, 1 Aug 2024 20:35:33 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:35:33 GMT Message-Id: <202408012035.471KZXFm037893@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 28391f188ca1 - main - kern_malloc: Restore working KASAN runtime after free() and zfree() folding List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28391f188ca18b6251ba46040adf81946b0ccb03 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=28391f188ca18b6251ba46040adf81946b0ccb03 commit 28391f188ca18b6251ba46040adf81946b0ccb03 Author: Olivier Certner AuthorDate: 2024-08-01 19:22:56 +0000 Commit: Olivier Certner CommitDate: 2024-08-01 20:35:14 +0000 kern_malloc: Restore working KASAN runtime after free() and zfree() folding In the zfree() case, the explicit_bzero() calls zero all the allocation, including the redzone which malloc() has marked as invalid. So calling kasan_mark() before those is in fact necessary. This fixes a crash at boot when 'ldconfig' is run and tries to get random bytes through getrandom() (relevant part of the stack is read_random_uio() -> zfree() -> explicit_bzero()) for kernels with KASAN compiled in. Approved by: markj (mentor) Fixes: 4fab5f005482 ("kern_malloc: fold free and zfree together into one __always_inline func") MFC after: 10 days MFC with: 4fab5f005482 Sponsored by: The FreeBSD Foundation --- sys/kern/kern_malloc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index ebdd00808f22..3c4cb63003c4 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -940,14 +940,18 @@ _free(void *addr, struct malloc_type *mtp, bool dozero) #if defined(INVARIANTS) && !defined(KASAN) free_save_type(addr, mtp, size); #endif - if (dozero) + if (dozero) { + kasan_mark(addr, size, size, 0); explicit_bzero(addr, size); + } uma_zfree_arg(zone, addr, slab); break; case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); - if (dozero) + if (dozero) { + kasan_mark(addr, size, size, 0); explicit_bzero(addr, size); + } free_large(addr, size); break; case SLAB_COOKIE_CONTIG_MALLOC: From nobody Thu Aug 1 20:40:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgnx1D7vz5RPqn; Thu, 01 Aug 2024 20:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgnx0N2zz4LPD; Thu, 1 Aug 2024 20:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EaNK8BfW8ETXIDIxaFuX8KqxBil9yBwLhKOJv10XUVo=; b=g3flY9uIDTvuOOe+YM1+IQo5nNnmVR0aDG41uyuK1JfbJEsEO6IJH2UGPzhcB9c/uOVs07 a7lpFKJo1lZoNUezlRI5F6vAcdhLTElhzkzPT9KKR6Olm9iYEr19PNCf5Ki5RkRydMdHPq lPrHq5beU8gF62uUROo0xsXZB1C0MLlb4dmQ7mafPJjgt6Tg0o7s3jGHZ/r8aR+L/tPVWB eX0q7+1oAwnl2f84xKTTljMEP9IxcQcXiiNMQqBedbtbSWbxNGhA0c25PcIc06uE/Kq6xu iBwOEsUrJN8xsgDllfih8uPRUH9iFut64tOtq5c0Joc/dnx79IBr9REMem8SeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544821; a=rsa-sha256; cv=none; b=pKlaE0fc0LfDGNFRXdwskRJKxo1zyOPqIPfS4YRKYxzN/SffM0Buv+sQtK78TLtVd6kP69 ZwMTL+MvVODAzfyFEzOHiPxc/6ksPRIS91Gpox3TepVqBI51raUbtLnmB00eDf6zvPoWzd tBMnW3DEllZoZEeDO/3p7CgWF0bWiQtx1+sSy0T+phtmVcwUeKVdX5sum5GADVswwaG1cR oyFPz1KGFbmc7QaknLBCFykjL+Bo7DbwrfLjDS4tC/MOLNLiag8KOmyJJrh4EOIX0xxrDi i1hqJ/7fMsFmbBrVFU1TVJFsgneHXtieWb6PrSU6OX0V5yvQLmDFeVhYHR7p4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EaNK8BfW8ETXIDIxaFuX8KqxBil9yBwLhKOJv10XUVo=; b=YYb9d9tNXyqz2BqFM9gRCXU0kWUaFwvz8RkhGeXFWnAvwkgA/umFnC2tu5afEKgYBHyhVf Iq6p19gZqtkXdUKbqY4qdjUmkLJ3fb3W0GhBCsNC3H4MT5SQ0qk/qAzNrtqC+A188Eycgv 8vm8hVx8k9jQrhY6uwSu12bOKHItHPGUpgtQliljzlQrezmnB9HDxAQzejxK7oeSVxCvyr K6JWk9B+CwL8XDDZP1OJScLijCxqODuWGc6vfl/Wy8kg6fWs4ZOVdBbq9aOX+vBXwDvZHP U3Zlet9QTvwDOWuBq0yttfYj7KCQofPGwwbcq+RkLKF2oPJ+wAt6oNJ/y1IfvQ== 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 4WZgnw74t5z102Z; Thu, 1 Aug 2024 20:40:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KeKx1047159; Thu, 1 Aug 2024 20:40:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KeKTW047156; Thu, 1 Aug 2024 20:40:20 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:40:20 GMT Message-Id: <202408012040.471KeKTW047156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f6599909ba6e - stable/13 - tcp rack: fix memory corruption List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f6599909ba6ec846883e6142b909590b6dfdb6f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f6599909ba6ec846883e6142b909590b6dfdb6f9 commit f6599909ba6ec846883e6142b909590b6dfdb6f9 Author: Michael Tuexen AuthorDate: 2024-04-06 07:55:46 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:35:33 +0000 tcp rack: fix memory corruption When in rack_output() jumping to the label out, don't write errno into the log buffer, since the pointer is not initialized. Reported by: Coverity Scan CID: 1523773 Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44647 (cherry picked from commit d902c8f55b8da6902ab45e67ed756cc99f5a9d5a) --- sys/netinet/tcp_stacks/rack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 3e3900844989..7429dcac5d5b 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -18324,12 +18324,12 @@ send: mtu = inp->inp_route.ro_nh->nh_mtu; } #endif /* INET */ - -out: if (lgb) { lgb->tlb_errno = error; lgb = NULL; } + +out: /* * In transmit state, time the transmission and arrange for the * retransmit. In persist state, just set snd_max. From nobody Thu Aug 1 20:41:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgqp6MMZz5RQP0; Thu, 01 Aug 2024 20:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgqp5x6bz4LnV; Thu, 1 Aug 2024 20:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PKG9ZWmRBIX8WubKNWouQd4sQB5oe+zMcWQGWM/iCbI=; b=koSomKvILEV/3T+Gh6VBmeFgNwp56QE8fTddDKNz9kXnGTtSL6n/5CTE9bsBV3bu7a448m 4cd5uqVP3g91Q4OmyYAIVySH5UnaqbB9VSqQFqjRcVcYcxAlIVAkh5alvHdlO//QLqF8sD LwBoNx9QYmLsrKrice6dPh/SWZIUb7aVEsSNYwJCVJIt55eB5TX1bHTy+e7KeLglvKA+mh JgsofBXJa5fwli81l6JZ0wki3+qhvXkNVgy5DaBU9ZWmyBOSqwEaeowLFheaTPrsseu5q9 kzfAleK+ahogEhJtw0iquv+w+B6cQI1VDpPMdC75PZ0+9RgGqJ0mOrY4vmYf8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544918; a=rsa-sha256; cv=none; b=I4TU7SLjIsGAAnmKIUlfnefp7SxDmz7XdLUq6Z6W0ItKHknN2bJfMvCZX7U1tf8YR2ZnVN CZEdQG8l2d3TXYRPrqEbEsKRAxhRa6ckqOhUX/QlJvbnuAeGP9/zfQg0xo4w/UydEw2aHC AwpmU0PQx9uT9cZE5oZuzZf3UaoAtqIIa7XeTJzIs4PgyRdlHEydAiz/KQFXxlZVNB/Rto szLjT25loZsBfRcmjoCjq/pFVhvFQzIpr6WXaUjGNHww8l5e39zKOWsEWp8jy/FA4fNsEo gqYsbDsOvLfk40MrJqUmeu1b+peGLJfXNUkBk3u0BKIB74bQnF7RV2jQ7LMWWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PKG9ZWmRBIX8WubKNWouQd4sQB5oe+zMcWQGWM/iCbI=; b=NjGLKUkQQ3qn8kKyvXsun0x7CXhraJ93bAm2zE7gkoVL7Y1MGTWxkoyb4SSoKZL/sO0UfA yD0rzJV72GBje1aWqhx75Xpm9k7l5n8FGK5kIqlPJx5y1rWfD3asgaLGrCfTBD3TmqgE10 PZ4vpBwpebLcCpamxnBGtb6ZN8NxLcvJox1Ev+TyYhKhLn5UY3ICKuCNXGuzhY2ZYsJCLj LvBjOuUhkQsqXhjJGeiqwsoma1olKvMiNxR6bgq/lsn7jppXPn3/IcnHDEBbjoy+85qsyH octeRUHtxx3Sh1QdJdwQIAf2MqG0Y2uUk8Le59Y1VRz0uu9Pgbrt8MUmAmy0AA== 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 4WZgqp5XP0z10hh; Thu, 1 Aug 2024 20:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KfwJI054416; Thu, 1 Aug 2024 20:41:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471Kfwp2054413; Thu, 1 Aug 2024 20:41:58 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:41:58 GMT Message-Id: <202408012041.471Kfwp2054413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 5b1ebb6ef6b1 - stable/13 - tcp: add some debug output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5b1ebb6ef6b187f3b7a9de58164d69ff2e09e2b8 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5b1ebb6ef6b187f3b7a9de58164d69ff2e09e2b8 commit 5b1ebb6ef6b187f3b7a9de58164d69ff2e09e2b8 Author: Michael Tuexen AuthorDate: 2024-04-07 20:41:24 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:41:21 +0000 tcp: add some debug output Also log, when dropping text or FIN after having received a FIN. This is the intended behavior described in RFC 9293. A follow-up patch will enforce this behavior for the base stack and the RACK stack. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44669 (cherry picked from commit e8c149ab85c7834f76325864f22ca89298e65f75) --- sys/netinet/tcp_input.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index af6afbd271bb..df4205ef84e1 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3298,6 +3298,35 @@ dodata: /* XXX */ len = so->so_rcv.sb_hiwat; #endif } else { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + if (tlen > 0) { + if ((thflags & TH_FIN) != 0) { + log(LOG_DEBUG, "%s; %s: %s: " + "Received %d bytes of data and FIN " + "after having received a FIN, " + "just dropping both\n", + s, __func__, + tcpstates[tp->t_state], tlen); + } else { + log(LOG_DEBUG, "%s; %s: %s: " + "Received %d bytes of data " + "after having received a FIN, " + "just dropping it\n", + s, __func__, + tcpstates[tp->t_state], tlen); + } + } else { + if ((thflags & TH_FIN) != 0) { + log(LOG_DEBUG, "%s; %s: %s: " + "Received FIN " + "after having received a FIN, " + "just dropping it\n", + s, __func__, + tcpstates[tp->t_state]); + } + } + free(s, M_TCPLOG); + } m_freem(m); thflags &= ~TH_FIN; } From nobody Thu Aug 1 20:43:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgsL6zRTz5RQmn; Thu, 01 Aug 2024 20:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgsL6QHKz4MBp; Thu, 1 Aug 2024 20:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4jneHdxRaFsL/2fJGLq6FSUgWBMSY1wJuOv3jKwKg5M=; b=JiWkT931MHWIAGuFW3Y/GcgmOWrdA+pDkHjMXL2YmrfzEgvmK6ylu0J/ICgxxsKLUzYGjs wcpGR8vN1Kb9D6TF+ntiLIquPu0diWXvYC0dKfp60TZPhxgJqklxdTXodDLC4ExXHnTVWk 0Lm5HCDfutsNduDgxUY5Q1g7g3yTtA0T+k/QFLK9Xn1N791EnMBTyr1pXMGtLJfC+8/zPM PJFVERCNFCcMbL6Z0ma2hHlJIstyd2/mD6wnMbJv53M+tRuRX8iq9K16BU/w7yR30WqTqZ gmlCliWnM9OaZNZzrvgxTUkei0VQU8Iu6pg5zvquF4dGjknzvxn9ddfqNtlmlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544998; a=rsa-sha256; cv=none; b=KYlxt9BsAwjaDxqe1M2hs/5wxG6EoSh+gwsatCY18g4NX8SrL5wFhu583zVFG6zDukIm7S hLD2kEHKF6qN5ZA84PQaqaxIfmkFjOgTrQblVZ9Tq7g00DdWarVSUB0wE00CXf7nuypmtV GziBvEqBWzjg63vkh9DG953Xici/RDdxADomZPeEOD/Z+ayQD51H3aozQkaPW1ygl6tXLe cXPzaMGzNfS2bIXIGkBz1dniZdQY2CUVJlqP+nBHEcXs+pyy7ZZbJ0M+IWwBjawtiUyNf9 py4fMk7Ha9TTlopmnWO/FWojvfjIqVWF43twE4TIvAtkVuqYz/NgGtvIogSnsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4jneHdxRaFsL/2fJGLq6FSUgWBMSY1wJuOv3jKwKg5M=; b=Ife+fUf0mYDi8jw3qVgB1SsB5YDbTFhJep3hiBmcSrwpyB4jhPxIA5wXYLYUNTDc+eXrKu I/PB1j0ufpTaHh4Hr1CKTqFIXbG4N6zlpeIiXaek/83i5x4AX2u0Yv2H8SVaQxdMZRSOwy P4SAWtknLhQU04FWVGrorZKXcFg6lbmpFAWx8uJO1RsDsh8tCKtNkZBg2ER3uLJ6AABAbf lySGKgPcZTOdOcGCTb8aCkEE/wyrziFdRK3tcvkXPSF7elGc+EoVp4VEzsRS5s5zP104+X qt7Qp+Z++r9GWk60IrjUj0SDw1eIOlgxd3qNM59JF6aWLvA5NO9jMm9D11hT7A== 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 4WZgsL61hzz10LX; Thu, 1 Aug 2024 20:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KhIAW054726; Thu, 1 Aug 2024 20:43:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KhIYh054723; Thu, 1 Aug 2024 20:43:18 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:43:18 GMT Message-Id: <202408012043.471KhIYh054723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e5555583b0cf - stable/13 - tcp bbr: improve code consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e5555583b0cf71c506fdf8d121beca79c38477c9 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e5555583b0cf71c506fdf8d121beca79c38477c9 commit e5555583b0cf71c506fdf8d121beca79c38477c9 Author: Michael Tuexen AuthorDate: 2024-04-15 21:52:08 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:42:52 +0000 tcp bbr: improve code consistency Improve code consistency with the RACK stack. Reviewed by: gallatin, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44800 (cherry picked from commit 605a00660eadb210ed76d49df551f3f33bbb4da7) --- sys/netinet/tcp_stacks/bbr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 805ffa492c56..8fde062c0dc7 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -11920,7 +11920,7 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv) uint32_t recwin, sendwin; int32_t sb_offset; int32_t flags, abandon, error = 0; - struct tcp_log_buffer *lgb = NULL; + struct tcp_log_buffer *lgb; struct mbuf *m; struct mbuf *mb; uint32_t if_hw_tsomaxsegcount = 0; @@ -13732,12 +13732,12 @@ send: mtu = inp->inp_route.ro_nh->nh_mtu; } #endif /* INET */ -out: - if (lgb) { lgb->tlb_errno = error; lgb = NULL; } + +out: /* * In transmit state, time the transmission and arrange for the * retransmit. In persist state, just set snd_max. From nobody Thu Aug 1 20:43:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZgsN0QbBz5RQq8; Thu, 01 Aug 2024 20:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgsM5b2wz4MDt; Thu, 1 Aug 2024 20:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZnYWYe+xSsTlfJYU60bEpFoNchrztNzgUl+67zK/Ns=; b=o1Hf4m8IbQ5W3Smhms6Ij+DA20B93T0N6UbhmrHuFgyqY3BhdA9fqRhO8GCTo+i3q62/zf Q6lZagZYQYn9qDIo2638KeLB56HQ471Jra+6Z9y4LPEXL9AOfqokUNT9J7qtlMdHZLZ+LZ 6P6U1BMvZx3Po7fEVeLLiXNZ759Th/kwx24irefNAtqmN8mSGWwcKcK0JVOraIFepoST1i Wtc362UERQrFsjJrFHZnMQsiQVhri/pqpqBurz86d9qJLtol33ll4J2J/CFNX7HzBzo2mp oQU8AcpCdDhZYQOfO0duT4mDZ54IKDxZT7ly8bOMo8u+geARQB5DvWSxQBaOIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544999; a=rsa-sha256; cv=none; b=PthkhcDr3m6fj0I5yGKexnmHi/CpVf0juafPUoFR8KDjZw/XWif10BESRfLB5/2Av3jnFS g2nN8RZPnG3qHg4nnWnWfG0JBZ5zfmYpp8hvkdk9FV+3xdwg4CvmCJ0HY+y/6plS1PEDc/ F303DU9oHVKkVXfpxgE1wi6E1csUlh2q+CAogyJ81/necOyN5XuI/0WiXGpZzL755m46jh EvO3l7UDN3AqAuXvuc+t+EZRNO6jehrHkHSsaXoHAv5Z5iA5ty3LKXc6aPdamyK0W2O0zf aW9WR8L49OiO/Lo4K8TiXJ1JxBnMO3J6/IX+/DmtQ5vFOcDo5nviBDBaNIEP9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZnYWYe+xSsTlfJYU60bEpFoNchrztNzgUl+67zK/Ns=; b=OG36PbGt7ukyR/R6IhlhmBWqIkZ28BisnPAMXKbc+q+0cjHdUXrrsgsHNLaEMNzgFvVm/+ BoHx6c9AqtOiGOYyq1zWoESQyg2NxuetHVHlMkNJeVesmjUvesPL/pm+qcH08YbPe1QjmI J+7MrNNpunK3XGSa9OJFB+eG41FhEdbSh88fvHtquTbZYx0c+6UD/Vy/0WDmEaKGt66ELj 4Mv7akwCM3I4ZPQxJIvGOyrHJuQp4Vu1cpQ3sanze+d5sHhkgoZ2qhBjYoDzSHnZIrKCzW k1Sg+idn1vj6Qlim9l7V+11HG9R8NrdDGZ11zlcbbUrtnQT5EyL+P5QtKk4HDA== 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 4WZgsM4hL5z10hy; Thu, 1 Aug 2024 20:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KhJHM054843; Thu, 1 Aug 2024 20:43:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KhJSq054840; Thu, 1 Aug 2024 20:43:19 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:43:19 GMT Message-Id: <202408012043.471KhJSq054840@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: de866aa35240 - main - ssp: switch to _limits.h for the upper bound of size_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: de866aa35240856bf3b0d89f253b8dc2796b11f9 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=de866aa35240856bf3b0d89f253b8dc2796b11f9 commit de866aa35240856bf3b0d89f253b8dc2796b11f9 Author: Kyle Evans AuthorDate: 2024-08-01 20:09:20 +0000 Commit: Kyle Evans CommitDate: 2024-08-01 20:42:17 +0000 ssp: switch to _limits.h for the upper bound of size_t The definitions in _stdint.h has some complications around visibility that _limits.h does not have. Switch to __SIZE_T_MAX to avoid those. This fixes the devel/gperf, devel/glib20 and math/mpfr builds with _FORTIFY_SOURCE enabled to unlock a large fraction of the ports tree to build. Reported by: Shawn Webb (HardenedBSD) Sponsored by: Klara, Inc. Sponsored by: Stormshield --- include/ssp/ssp.h | 6 +++--- include/ssp/wchar.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h index a161df31d3d4..6856c5ce6961 100644 --- a/include/ssp/ssp.h +++ b/include/ssp/ssp.h @@ -87,7 +87,7 @@ __ssp_redirect_raw_impl(rtype, fun, symbol, args) { \ #define __ssp_redirect0(rtype, fun, args, call) \ __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0, __len) -#include +#include __ssp_inline int __ssp_overlap(const void *leftp, const void *rightp, __size_t sz) @@ -96,9 +96,9 @@ __ssp_overlap(const void *leftp, const void *rightp, __size_t sz) __uintptr_t right = (__uintptr_t)rightp; if (left <= right) - return (SIZE_MAX - sz < left || right < left + sz); + return (__SIZE_T_MAX - sz < left || right < left + sz); - return (SIZE_MAX - sz < right || left < right + sz); + return (__SIZE_T_MAX - sz < right || left < right + sz); } #include diff --git a/include/ssp/wchar.h b/include/ssp/wchar.h index bbc84d379e56..7ed84e087f5d 100644 --- a/include/ssp/wchar.h +++ b/include/ssp/wchar.h @@ -35,7 +35,7 @@ __ssp_inline int __ssp_wchar_overlap(const void *leftp, const void *rightp, size_t len) { - if (len > SIZE_MAX / sizeof(wchar_t)) + if (len > __SIZE_T_MAX / sizeof(wchar_t)) return (1); return (__ssp_overlap(leftp, rightp, len * sizeof(wchar_t))); } From nobody Thu Aug 1 20:53:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZh5R5Ywjz5RRQc; Thu, 01 Aug 2024 20:53:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZh5R2dHRz4NSJ; Thu, 1 Aug 2024 20:53:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722545627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UCYAm6xKBM+RWXr5MJ6ntazcGVqmkRGyrJzCGtCmjhQ=; b=i6iksyvTHy5cDyd2t51ypQWOxHS10yH/q5GAkurXWpM1z02tYAY4mOS3Hmn54tQUT/mJQM 7HTvRP8EKR04Cmd6g4kDgLRPrFdXwWgnO3bNhhI+mTL1r73nTQNR8MQxghHRUkGD85eF3H IN0P0iKkdbgYy3Qz7wvB/AZoplJFPTA1JcK4baVLhE7jMxv3A/lP3nsx3SrcK+H8aVKfWw 8faPJ03RaxLas/RwzBn46AuL9GAViSym9UAKT4i8uy23kRRUGEMhhv0UKjPVl3bbmmZQBW 7rDb4L5XUC+EzrZ2fAgP2/iNExwIb3GtvbCYIQEvU7LX9j96MHuYNm3eHPz0rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722545627; a=rsa-sha256; cv=none; b=rGySP4xeAnNchu311WIYr1ORPbpdiMz7Vjrld8F47eji0Jb7QsDAq6cSV1wsoCQ96rDrYj RHJXCV4cQjKTPKRtKqKEKFDeVWV+SXjdRYreQpexO8wT1J9A/g3nxw6/xAWZ8lQpgbm8sy /pVYlPRS+WgmrdlTaUk0Ubfw+vrkaJZIzPW7UlAz3S8GOO+0h+j7+ukuv8YLWDnQeNieyu jrcoZ/wgh/4W9S1yQHuMpsz7TVK/C3lbBukNrbpBGRb/RP82Goic0zmJgC9XKoSeZSJY9B rnq3OR5CaWtJ2SidiIGwhpwE2dGN3gUmoueohAcuwvI3bzs4Tr3iXqZHzRo+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=1722545627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UCYAm6xKBM+RWXr5MJ6ntazcGVqmkRGyrJzCGtCmjhQ=; b=xl5295GmyB8Vpciw00HxUINEVgkMo3T1zhg15YXkKNdZDW9Y4paTf4dEpan1zQ9ke5dwG1 3PolcHpvjXB8zCeaS14wtDszNyizajkKS6LBCOG+dvuVD1WbAEvlOHHucvWrbl5Hb2yAqL 4Ef0d1rBOlPR0dwwVxF4d7PHT2G2IkGka68/LjbAGflJgeaI2hzwlsA1DtJwUTcP+77juY 1V/gpjTHneX+wT+b7EZJd3kVt90Xna2yACDlopGmf1xtRr6fzXF+yN5OfJRXTnCiXblgLZ ATn9piCykM2PSY2i7U73q8VPGu3kapwzM4+wLjxWQ1nEh2bu7nPVSRajt+koLg== 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 4WZh5R2F6Lz10pD; Thu, 1 Aug 2024 20:53:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KrlTm071672; Thu, 1 Aug 2024 20:53:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KrlVf071669; Thu, 1 Aug 2024 20:53:47 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:53:47 GMT Message-Id: <202408012053.471KrlVf071669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: dd718119f202 - stable/13 - sctp: document sctp_recvmsg as implemented List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dd718119f202503826311c9455d625671f944155 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=dd718119f202503826311c9455d625671f944155 commit dd718119f202503826311c9455d625671f944155 Author: Michael Tuexen AuthorDate: 2024-05-02 13:17:43 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:52:09 +0000 sctp: document sctp_recvmsg as implemented PR: 275990 (cherry picked from commit eee88ef45f78d7f9996a740c2a554bc6e8496114) --- lib/libc/net/sctp_recvmsg.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/net/sctp_recvmsg.3 b/lib/libc/net/sctp_recvmsg.3 index a5f794743f53..a529fc29110a 100644 --- a/lib/libc/net/sctp_recvmsg.3 +++ b/lib/libc/net/sctp_recvmsg.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 23, 2015 +.Dd May 2, 2024 .Dt SCTP_RECVMSG 3 .Os .Sh NAME @@ -39,8 +39,8 @@ .In netinet/sctp.h .Ft ssize_t .Fo sctp_recvmsg -.Fa "int s" "void *msg" "size_t len" "struct sockaddr * restrict from" -.Fa "socklen_t * restrict fromlen" "struct sctp_sndrcvinfo *sinfo" "int *flags" +.Fa "int s" "void *msg" "size_t len" "struct sockaddr *from" +.Fa "socklen_t *fromlen" "struct sctp_sndrcvinfo *sinfo" "int *flags" .Fc .Sh DESCRIPTION The From nobody Thu Aug 1 20:57:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZh9T46bFz5RRnv; Thu, 01 Aug 2024 20:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZh9T2sM2z4P4r; Thu, 1 Aug 2024 20:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722545837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5g+pHC5XhKz9Lv8gJL9nOuYEyZPgua7BxbEYq3dEgk4=; b=oYevxK4aec9KXMl2ch1LmIY3nje/8gypsdVF9NnCEUUnBCAXM87HmU5UDN54Z7zN5yvUWH y1Q8JCnmfxhM7LM4tmIvSckHLRzlJTUrfrcScAQH6q8PisQhx8pRfkqefG+AcJQ8785YHR rkMYRu5Jl/rhbMp6GbA1ss2ylgyhwZhJ59m8yQUUXKxps1t1VTFGY+xp/S598Va76iXHvY k/9Qi4BqkMXfQhw4blDgA01LRIhAjU5L7rKAClyhHP3XFqQXJ4dCFFCP1yNseG8b1hiN5M WGwDCT3z++IvilTPYPkdJpoJzeFyunsExyr47NiAHd9zw+9BlihkdkuhVlOOiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722545837; a=rsa-sha256; cv=none; b=mC445JkBGW85gQqqW0pveKbmScjwqx9qKZlHziFpfHt6cQHbNvjjDLLI2cnICerBcv/gbq Jwm1ext/liXFi1okGQ308qj8gYWBr8rgxVdxN9NIfUv0FASOhr8wevtTaekBlmzlzNGUQw jh9MhwcK/7NTn4HjhsOOu8JGU78ggH/aRQRj6mJ4U9O3zMCOaP4/jZRX07vLBkI9XOnELS d8UaKye/7XSUOJYl1pJ9wno3p+2mDV5D6wQ00tZJdJeZ4B/mQAphc1grKXOHxPhmGN3SO8 Cu9+/Tq1am+pGJ6S9lRlil+vnhIb5YZMX49s9L2X0D1Rdmnnidhm3wLqMY/Pcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722545837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5g+pHC5XhKz9Lv8gJL9nOuYEyZPgua7BxbEYq3dEgk4=; b=Wbc7w5DXDUY4TYYQahr0RXnWt9H0O2RO89iKjXj2kpz/OEcxbsFHsii5TjaH958j+MkvWL yIXreROQfbWS36w+EK0ClDr8nawdPsjFF4Y1Zm12327PJJpCby5B+n1exS+U+vT0Fc/AhR hHaOae90KWaaWuZ0pLz+EiyCiHYT6rjGXaFtplb1cbedBfB5Yfpv4m2mSDHWrumtqmZMRP Hk0913kn1oDvtv/iMiL9cDyKuh6nUNh5nrXKNNbsDBtgiCOj814mHWX8pEuni5OIFkN4AD BGMuTsWhmlETRev+/fJZ9iR1G9d/2S57o3+uEE7OuU/pkSyM1Qmj9pwQiFf+zw== 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 4WZh9T25PPz103b; Thu, 1 Aug 2024 20:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KvHXV072286; Thu, 1 Aug 2024 20:57:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KvHPq072283; Thu, 1 Aug 2024 20:57:17 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:57:17 GMT Message-Id: <202408012057.471KvHPq072283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 75ee09cf628c - stable/13 - sctp: add missing check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 75ee09cf628c6cfb58a26283fcf1c05b5c97306f Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=75ee09cf628c6cfb58a26283fcf1c05b5c97306f commit 75ee09cf628c6cfb58a26283fcf1c05b5c97306f Author: Michael Tuexen AuthorDate: 2024-05-08 21:01:06 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:56:27 +0000 sctp: add missing check If memory allocation fails, m is NULL. Since this is possible, check for it. Reported by: Coverity Scan CID: 1086866 (cherry picked from commit 3d40cc7ab888a37a3ba085f377a057396a7d2476) --- sys/netinet/sctp_output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index f13010e54521..13a9a65da9eb 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -6635,7 +6635,9 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, } else { m = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_NOWAIT, 1, MT_DATA); - SCTP_BUF_LEN(m) = sizeof(struct sctp_paramhdr); + if (m != NULL) { + SCTP_BUF_LEN(m) = sizeof(struct sctp_paramhdr); + } } if (m != NULL) { struct sctp_paramhdr *ph; From nobody Thu Aug 1 20:58:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhBm68Zgz5RRpB; Thu, 01 Aug 2024 20:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhBm5Yg1z4P6W; Thu, 1 Aug 2024 20: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=1722545904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7p8Fr/tx5A1PLkjBSMHaZIFbxoVoQGoxwTQaCWh/Z0=; b=ZOF8Qr9lfN1ixTVmzGciHwe3PTVaWGGYyUK4pvaGx5OnmaXd6ctZjyS8R91z9Xczn6GI7j ieiweJ8FOjyrH4i3SSn5wVueV242LudOppXM4N0IyS8+u4f80S2ihaCN7AONDT2AjoWEnx ZNkJR4Umkw24m8FxWRLwhQc3sj98QQSrjYaY3COtI+e8XE6AT2fUK1NyT6PsIdCEyORGVY dh/CyiGJ6y0Rgbgt37liP5gX5DarSqOe0yba6WIfK3a6cFeWswzUrN7F5tduy1TQKWJIKs 3ipV9/u+RpkUEI85We45GTrB5ldwZF+7O17vQeDdup1kBrE/IwieFpMGWIY2Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722545904; a=rsa-sha256; cv=none; b=h321XdX1A7s2Jp/lnyX+25T8xfHBb+Ond/uof6b8Ac3VPYpdizUjRvleakHayGYerlijl3 LVJcXRiw6vpRUUpivbkFEwsMUAqwM3eWoHgbb55ONB6sm1yndSyz4gbYzn7M2Uzbf6TvUW U3mE1/PXhs7os/2yN4OZ6fSYU7Y3wpoi18Y47ExYKRvwgj20CnKOYC6hMCZyiY+IQkvTXW rHssUf/Det9bD6npkvtbq56CTdjWpEhj1PN0cJYQmgATzsS09GwEgYvuzS5LyKrRDD292E AG9Z2JQwjOQmiI0I2cnToO2xVYasgW+jPzz/BeB4hQt6bmfGf1tBnh/y8hQQmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722545904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7p8Fr/tx5A1PLkjBSMHaZIFbxoVoQGoxwTQaCWh/Z0=; b=UmTFBtYQUG3AL/vZKx+uX6iB/2HNc5fxJYSQlpZbP7EqbbB2jJ6TpFqhLnbTMCJ06CU7A2 QmNCCXFJ926VDfyVl7S1MSttc1jpqF6RUNzJ8IJT/1eKWmI2D7oG+/MmyMYASgnTYhGNBl Zzmymmpg5JDvjhwOrDAmON2F1Yrdf8OyPKWjpynYvtSHjeC67nhHjiWkaHLurS5b+OwOZz 2YrYyCDEslaL0kvMbRkSlJNQ3aFjYmpeLDJX/2OJyJo99AX7ffmkmslefMnDRTxlGPOFEH CK9+YAKDX6Eq2ATBZzpACSJNK3zheQGGQfwGMJUSSRMl9Lfq7IXTLN6SJ/fotg== 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 4WZhBm55qhz10m2; Thu, 1 Aug 2024 20:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KwOn3072570; Thu, 1 Aug 2024 20:58:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KwO7N072568; Thu, 1 Aug 2024 20:58:24 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:58:24 GMT Message-Id: <202408012058.471KwO7N072568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 27f782e804a0 - stable/13 - sctp: fix sctp_sendall() when an mbuf chain is provided List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 27f782e804a00e15e40e28efea6aa88450838e13 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=27f782e804a00e15e40e28efea6aa88450838e13 commit 27f782e804a00e15e40e28efea6aa88450838e13 Author: Michael Tuexen AuthorDate: 2024-05-08 21:41:17 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:57:54 +0000 sctp: fix sctp_sendall() when an mbuf chain is provided In this case uio is NULL, which needs to be checked and m must be copied into the sctp_copy_all structure. Reported by: Coverity Scan CID: 1400449 (cherry picked from commit e187fa56904712cb4dac9e14c81c88821582aeb4) --- sys/netinet/sctp_output.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 13a9a65da9eb..e719a5706f3b 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -6841,10 +6841,20 @@ static int sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, struct sctp_nonpad_sndrcvinfo *srcv) { - int ret; struct sctp_copy_all *ca; + struct mbuf *mat; + ssize_t sndlen; + int ret; - if (uio->uio_resid > (ssize_t)SCTP_BASE_SYSCTL(sctp_sendall_limit)) { + if (uio != NULL) { + sndlen = uio->uio_resid; + } else { + sndlen = 0; + for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { + sndlen += SCTP_BUF_LEN(mat); + } + } + if (sndlen > (ssize_t)SCTP_BASE_SYSCTL(sctp_sendall_limit)) { /* You must not be larger than the limit! */ return (EMSGSIZE); } @@ -6856,12 +6866,10 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, return (ENOMEM); } memset(ca, 0, sizeof(struct sctp_copy_all)); - ca->inp = inp; if (srcv != NULL) { memcpy(&ca->sndrcv, srcv, sizeof(struct sctp_nonpad_sndrcvinfo)); } - /* Serialize. */ SCTP_INP_WLOCK(inp); if ((inp->sctp_flags & SCTP_PCB_FLAGS_SND_ITERATOR_UP) != 0) { @@ -6872,15 +6880,14 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, } inp->sctp_flags |= SCTP_PCB_FLAGS_SND_ITERATOR_UP; SCTP_INP_WUNLOCK(inp); - /* * take off the sendall flag, it would be bad if we failed to do * this :-0 */ ca->sndrcv.sinfo_flags &= ~SCTP_SENDALL; /* get length and mbuf chain */ - if (uio) { - ca->sndlen = uio->uio_resid; + ca->sndlen = sndlen; + if (uio != NULL) { ca->m = sctp_copy_out_all(uio, ca->sndlen); if (ca->m == NULL) { SCTP_FREE(ca, SCTP_M_COPYAL); @@ -6892,20 +6899,14 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, return (ENOMEM); } } else { - /* Gather the length of the send */ - struct mbuf *mat; - - ca->sndlen = 0; - for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { - ca->sndlen += SCTP_BUF_LEN(mat); - } + ca->m = m; } ret = sctp_initiate_iterator(NULL, sctp_sendall_iterator, NULL, SCTP_PCB_ANY_FLAGS, SCTP_PCB_ANY_FEATURES, SCTP_ASOC_ANY_STATE, (void *)ca, 0, sctp_sendall_completes, inp, 1); - if (ret) { + if (ret != 0) { SCTP_INP_WLOCK(inp); inp->sctp_flags &= ~SCTP_PCB_FLAGS_SND_ITERATOR_UP; SCTP_INP_WUNLOCK(inp); From nobody Thu Aug 1 20:59:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhD05bGvz5RRjx; Thu, 01 Aug 2024 20:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhD055hMz4PM7; Thu, 1 Aug 2024 20:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722545968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b1cT5MBtnUs1dxYvpz1nxY6w7qZqZf5APKg4EtKt+rg=; b=DjigQnTR+mFpqVAXCuOArzz9uQyGEou68F5rE8six81MckjAmGARvcGzrIiwi31Y24n0t3 op6/7pQNd+teQxAK8lXo1XKhYbpGGySqiX4cki2TCkrCIX7JyNIdURic0IZTrFPOx/oqmw wD5IUVTv1GbiIq36SpybBKxCVabd1TLUix2R/DnipYnvoWquU/ZliJs6AdJm7J7fdWMCqr TKyi6vSDvUNkGoq0aJx4h4rMYev0lwsSNkDdNmKpWsL3eGfRA7jPFA6RIZxB0hDEtRG0Sv knAfXYlmjILPJdPpByyyC0l6Aw81qz/G4mU3esv4XJqtrbAL3hKra+pCHg9oaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722545968; a=rsa-sha256; cv=none; b=bkGDEbRdTTtoRJqibs389FPte07+Cy20QYgAX7vtDN2VJYGfUsmwaRG/aLhE/Y0bbmBLL3 68zYNwZ2Ob5v2daZq6XOrHYiETBIMF9yQUrGB+7ckJ8u7OY2iaGXuOStXuirJSLajc3DXo +AA93KMs+hlNEW+K8je2wFBnWVQqpv/f6Lc60fUqkpYgHE92kdtp4uXK7GtE4ezhN0+/tJ AnY1ITynPGwPFN5Ftx+gW/S/B9E5mYM3XmQx0pmkDuFRamqFrA3B/6vsnNYHRnR97+iNak InoBXI9rg6PkTny9vXUF5GhTqP7syfJfZOpkMrmRdIkpLzNsoNxxz1mf+X6MXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722545968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b1cT5MBtnUs1dxYvpz1nxY6w7qZqZf5APKg4EtKt+rg=; b=m2WJXuFKr08bJh7wvXqvtPRdtNrrzFEKjHgKA0PwNvbRv+nBouEGbQTj3pCLGbnzBJ0OYZ /PUjOIj8ZAgaWSOiP8LwleQiGUXbs25KlkpvKhK+UU1ZA51OvvVB96BUD2/GJmU6YGNgx1 UqypFZBvf0z2XmsE7ndJTDIpnCFp2LglHJTW7aXsPQV7vEtsGX3nIG8nFsBXIw79DrFfFV jDYtb+tHYrS1t+zIKitKAOM54VytTG76yjz2EvRY5GVRBVTSS+KsvhauMisG+VY3J6GAi/ vmBy2cU1WEIeTisYodA0ynJ+Q8k5V+FPbemInrijfaKNIqRYVjVSij6k9w/YTw== 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 4WZhD04f2Pz10jY; Thu, 1 Aug 2024 20:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KxS1L072870; Thu, 1 Aug 2024 20:59:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KxSKP072867; Thu, 1 Aug 2024 20:59:28 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:59:28 GMT Message-Id: <202408012059.471KxSKP072867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 1de31f53f9e4 - stable/13 - sctp: don't provide uninitialized memory to process_chunk_drop() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1de31f53f9e4f3fd9e3cf72f2cfc7d62d17bf1e7 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1de31f53f9e4f3fd9e3cf72f2cfc7d62d17bf1e7 commit 1de31f53f9e4f3fd9e3cf72f2cfc7d62d17bf1e7 Author: Michael Tuexen AuthorDate: 2024-05-08 22:17:13 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:58:51 +0000 sctp: don't provide uninitialized memory to process_chunk_drop() Right now, the code in process_chunk_drop() does not look the the corresponding fields. Therefore, no functional change intended. Reported by: Coverity Scan CID: 1472476 (cherry picked from commit 83dcc7790b11e605c32ec9a091c6bba3bc921083) --- sys/netinet/sctp_input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 7ad9eec07897..b6239b0d9ad6 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -4229,6 +4229,8 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *cp, SCTP_STAT_INCR(sctps_pdrpmbda); } } else { + desc.tsn_ifany = htonl(0); + memset(desc.data_bytes, 0, SCTP_NUM_DB_TO_VERIFY); if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpmbct); } From nobody Thu Aug 1 21:05:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhM130cFz5RS2H; Thu, 01 Aug 2024 21:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhM128ZBz4Q7Q; Thu, 1 Aug 2024 21:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v7DXbapQQs5fVltH4+rxX4UKSwxbGVShnK+jxlMrur0=; b=gzyk3OsNJbxta2hDJMJlniBjEpmkxYzU/HDFSBIl2mRlB+gSR5xoaK50FNpW2VSPARZi2z UHjuZf1citSU3t0WK8IRhjP5j/aCoNHbBTcWDjE1AKBaO8UIBo2dp7aWPessjDQ6jEE9in DsVCl00ImxHbDsPymjY0HNVkiM/PgIZo5QddC7zk+yMqFEy+mwdJVlHYVQ9WxtwHm1TOqQ 6CypShCED9Ke2dvCZAxqGbhVj9/rDVJu/bq2Lcxo/L6Sqy5vINnEpqDc9eHBqVW2KFChdt ff8ULQCgHwiqrv/EJ8j98V59QI6A8R5qTQpy3Inex8TOeI6oNOKpRUYkP7vfqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722546333; a=rsa-sha256; cv=none; b=l6800jdZB+dqmRUUYDc0enLc7+nhh1UklYvl7AVZCjTl2DDdiJKaqNazu5HZmcyJn7AmUh Ai3CAZXHjBq3x6hgiKpi1riWG2RYgeVWYgOIFpxsJUX80FUOsQdkJtHQ+uiSv6MKSWDHll i9AkIDIRM3+eGQJ5hWKS51uQ8kYMT72cFrm0m/XkpZXAvOo54cTCUPaLS83s8vTCnyyK6h M0aKe0MNkHDP1l+0/KYaEuP9Jd0si4rOCPmh0ucR3dvHZ8xpR18RqkIW5K4wnvIUC9cmaa ZE4n7CV8OHl08hCwkukWA00EbM1DBlBtSg0AIX4aiPf2kaFDGUdpmsFwkws3ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v7DXbapQQs5fVltH4+rxX4UKSwxbGVShnK+jxlMrur0=; b=Gq1MckTc/3JywGB+m7LtW1J7GIAWkNUklhh2CcF2z6vPJhDs9ioYn1/NvxNomQvCA4ZL15 xl3NbJTq76+cfwL73eJ++9eBDilLZM9bX6jtME1AM3NRp4UiytzwpJSDei85a+XiEKU6Dp N8Jrv1ialRYNQLQc0Z98e9NqfpCxKYnTWvcjqqkbW+8UF818N5GHqMLHex63UMf5VXkEFo zcOByYEI5/foTpWGxQp374T5Gc3jRUZrhtkAvaE/LZRqw9qFOIXXWk5y6QYgRBFMbpweSx eVOljPnIlbEIi668e7jhl5cFUagoBheTdv/g1E+2M56fr/bCtYNJidxYaJKM+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 4WZhM11kmbz10pp; Thu, 1 Aug 2024 21:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471L5XQn090569; Thu, 1 Aug 2024 21:05:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471L5Xfq090566; Thu, 1 Aug 2024 21:05:33 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:05:33 GMT Message-Id: <202408012105.471L5Xfq090566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 8dca32bcccaa - stable/13 - sctp: minor cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8dca32bcccaa02f1dceb20944a74c7bf1623241b Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8dca32bcccaa02f1dceb20944a74c7bf1623241b commit 8dca32bcccaa02f1dceb20944a74c7bf1623241b Author: Michael Tuexen AuthorDate: 2024-05-08 22:51:09 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 21:04:57 +0000 sctp: minor cleanup No functional chnage intended. (cherry picked from commit 0d15140d6d3470db45d823e4f3a5ec05693b097d) --- sys/netinet/sctp_indata.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index a30fd95fef30..4c40e0de4326 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -5241,6 +5241,10 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb, uint32_t mid; int need_reasm_check = 0; + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + asoc = &stcb->asoc; mid = strmin->last_mid_delivered; /* @@ -5278,11 +5282,9 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb, /* deliver it to at least the delivery-q */ if (stcb->sctp_socket) { sctp_mark_non_revokable(asoc, control->sinfo_tsn); - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, - 1, SCTP_READ_LOCK_HELD, - SCTP_SO_NOT_LOCKED); + sctp_add_to_readq(stcb->sctp_ep, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); } } else { /* Its a fragmented message */ @@ -5352,8 +5354,7 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb, strmin->last_mid_delivered = control->mid; if (stcb->sctp_socket) { sctp_mark_non_revokable(asoc, control->sinfo_tsn); - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, + sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); } @@ -5394,6 +5395,11 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, * it can be delivered... But for now we just dump everything on the * queue. */ + + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + if (!asoc->idata_supported && !ordered && control->first_frag_seen && SCTP_TSN_GT(control->fsn_included, cumtsn)) { From nobody Thu Aug 1 21:06:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhNB3cKWz5RS0f; Thu, 01 Aug 2024 21:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhNB35bTz4Qj6; Thu, 1 Aug 2024 21:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJFbDbI6wvaknenLeTXwzJW23t8soN4h+ZaRsLBny0o=; b=veMMeik6Lm1Nmnq1weuRFQkaqRtKoViUlrduiAIOcWd9uAIF3TQJbPIAHmTpQNP82G8a/9 MlH6p3zexKaamQmbgoJNo3h300IB3xWC5CNbtQpS+9dc74tkqKfN+tfB5p1NaJktRussK5 dqL/aqrTXPySbkz8kiXD42EFGwO+Uultcbb3DbpxXI5w1tL1TX//uh6En9eMf2M5O0+vyq tU4hmdQKylvw0sw2yuDXSzAEwmiaujIva0k8piW9aCnTr4ag47vH+Nit7Tdu6Rz2u5Sai1 6CDhWX9nRukiSMm8YXpPxQJSVnEEG+vcoZUZmCzm2Fcs7zcc4fB5TpRYXRstag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722546394; a=rsa-sha256; cv=none; b=FyoS1uAdc7i3eOS64VvAw3+cl5FrmLBYgKbrE4Tf7RG9fbtM13QWBEPu/OR6g+SYlDbWwi V5pGrzvvF2r9ePumivLAwjOYGs/TmejmVksMUkbbQA14PqwU7D1mPdeYtV2KNRUl9c3Kml 3BckLGZCjqAh+PgXyeZlBukp0uVbISnJ3uCJxNiaencKpNabzpkN8xvPNvWGU4AwtuQfYZ Wvv6PeOtc3Qh194NVb7BpA+r3/SfOz+0+oO3wCBUTgOAODS0d/FgCJyEPRTLs00a0vayKv Dz7GsqqHL8zWqQeBtFsXiEGz6mBnxkgV07iGDRBXTQPW4rEncqX1Ymz3xuDyrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJFbDbI6wvaknenLeTXwzJW23t8soN4h+ZaRsLBny0o=; b=gghtRo/pL1fyVUY7BblHzZklKIEf7vVu8DAGg1f1cKmsWmxxnEG8gYjb1mwiLYER/aIbbX 3bIOA5n7XDAuqKfpKf5TTlKHGCVgNuvSxJwJrJcSAfhyvUJ+7bJmfQRjzY6uWh65oVNDFN h8zGbRTUu/KRC4qtRgree0TaflnlIQjmEH1dDqenEWnEdfdBlHv0ybs7jyGv1u0nYGPQvi x/5k+7SVstiEP0ZKGolusS3Q6sEWiPUsPmDoj9WQ95jAxbJ3jlVxgGDdj0LlZGGkR2Enmr b5PNnUeR42Ti180lKwGHBR4G7a78TQxkvlQFvzZmNuvD3F4KluBYvId+CRxNqg== 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 4WZhNB2hvTz10pr; Thu, 1 Aug 2024 21:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471L6YxW091120; Thu, 1 Aug 2024 21:06:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471L6YMn091117; Thu, 1 Aug 2024 21:06:34 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:06:34 GMT Message-Id: <202408012106.471L6YMn091117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e25611e85841 - stable/13 - sctp: store cookie secret change time as time_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e25611e8584178822a6587d74591db5557b5db69 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e25611e8584178822a6587d74591db5557b5db69 commit e25611e8584178822a6587d74591db5557b5db69 Author: Michael Tuexen AuthorDate: 2024-05-10 18:09:06 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 21:05:57 +0000 sctp: store cookie secret change time as time_t Reported by: Coverity Scan CID: 1492349 CID: 1493281 (cherry picked from commit 9d8a3718e24c9ec1ffca6efba64aba3e308aee96) --- sys/netinet/sctp_input.c | 4 ++-- sys/netinet/sctp_pcb.c | 2 +- sys/netinet/sctp_pcb.h | 4 ++-- sys/netinet/sctputil.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index b6239b0d9ad6..65a60d539a5e 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -2327,7 +2327,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, } ep = &(*inp_p)->sctp_ep; /* which cookie is it? */ - if ((cookie->time_entered.tv_sec < (long)ep->time_of_secret_change) && + if ((cookie->time_entered.tv_sec < ep->time_of_secret_change) && (ep->current_secret_number != ep->last_secret_number)) { /* it's the old cookie */ (void)sctp_hmac_m(SCTP_HMAC, @@ -2350,7 +2350,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* compare the received digest with the computed digest */ if (timingsafe_bcmp(calc_sig, sig, SCTP_SIGNATURE_SIZE) != 0) { /* try the old cookie? */ - if ((cookie->time_entered.tv_sec == (long)ep->time_of_secret_change) && + if ((cookie->time_entered.tv_sec == ep->time_of_secret_change) && (ep->current_secret_number != ep->last_secret_number)) { /* compute digest with old */ (void)sctp_hmac_m(SCTP_HMAC, diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 3435377e1064..5d603a3f26d0 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2569,7 +2569,7 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) /* Setup the initial secret */ (void)SCTP_GETTIME_TIMEVAL(&time); - m->time_of_secret_change = (unsigned int)time.tv_sec; + m->time_of_secret_change = time.tv_sec; for (i = 0; i < SCTP_NUMBER_OF_SECRETS; i++) { m->secret_key[0][i] = sctp_select_initial_TSN(m); diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index ca51f519a24d..4334595f208f 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -263,8 +263,8 @@ struct sctp_base_info { * access /dev/random. */ struct sctp_pcb { - unsigned int time_of_secret_change; /* number of seconds from - * timeval.tv_sec */ + time_t time_of_secret_change; /* number of seconds from + * timeval.tv_sec */ uint32_t secret_key[SCTP_HOW_MANY_SECRETS][SCTP_NUMBER_OF_SECRETS]; unsigned int size_of_a_cookie; diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 8b2e95158ebc..68484409d038 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1942,7 +1942,7 @@ sctp_timeout_handler(void *t) type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timosecret); (void)SCTP_GETTIME_TIMEVAL(&tv); - inp->sctp_ep.time_of_secret_change = (unsigned int)tv.tv_sec; + inp->sctp_ep.time_of_secret_change = tv.tv_sec; inp->sctp_ep.last_secret_number = inp->sctp_ep.current_secret_number; inp->sctp_ep.current_secret_number++; From nobody Thu Aug 1 21:07:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhPN5Sqxz5RSPb; Thu, 01 Aug 2024 21:07: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhPN4rK2z4R8H; Thu, 1 Aug 2024 21:07:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ZojAjUHU8xUWg0dqyEuYQ398v6D0z0s5HLJK4mtiI4=; b=VN08NU4GmCjqRaIHkQausUmQaoofLiwHVFNe76vZ05t7c4DTJwg8i3XCw4S01bKX1fjRDN hnGyxU7HNR+3LaBeaE1VXfGqFB2hdC6hw2jORbbOxasCRncRbJ7SyoTVlbNYIoPUw7eCvN rGZQgxDzcy1BpTYYA8ebuAJRg7Yxmzi2JOUyjBKWZv12cMed/7tmVdabN62zkZGrXOVepZ xt5K+Umy2LdHTU1sCLgBc9R4ND0elxrd3XH22vVFBmgpmzw0fpC8dqhs3ayGNVEQMQd1Cr ziBQ3sEO2GrB3nDRvyonaiqa981qpSxxNA5o5fYentQ81Ol0tJztLmER24cBPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722546456; a=rsa-sha256; cv=none; b=VQTH4ShP8/nYMRtAcIb2+iT+5IFbrs0qjXvCn8vq34EnYQ4dArkXYIx67etNBvt4QdxG7x JdN8UlRs6Xwx6nzKyTqDx+XyDc3yhq6LnZa4/3UdG41N8HdFFjgJexBo32cBkmyEsfgUus CvhT2OhUsiNbB3/cqZH0GuWmvzccYzLpj50akn1zPh6fs+z9jpsoIkg6guMoT3V3khnZRi PYISMxyhfm1x6nGA72Ic8EpqDMwTmQgVkLBWNAO7ihyqHwOxj8TkjGiPFhO/gOhmFlhyBH HIP0uEv5qLkSvZprH65k0rRqfYaqOUO2Cp+Frn9XtLN/+cBrTpeiM8rqW82+Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ZojAjUHU8xUWg0dqyEuYQ398v6D0z0s5HLJK4mtiI4=; b=p0GxjGDxWKN3gkk6fFvwTwpKLBOuR4w9pRLWTeshaxQFo4ZMNOZd78Fxq0XgHehl7oczhB Vw2iy0UE1tpVhgwRmC/CbmRNXtuHacDeCf2YKO+bsm5S96Ka5ZbLgQad1WVE/wFSwa2yxb zH9Dg4b2jcqdx5a51Zuj7xhoNglfPCC4ekRhpPYOSPoK7/xdHXek17BIyHAUswcQjVz4W6 cF2hFkb8yEACpJeOvi7x5kHF+j90tW/nqJWniyHmZUgZNggkeVD24a6iIdWnccfDxxDJig JpZN/zEYr8B4w+QxaZ/1CyC35cRoM7GQ2hVUhjGKWrDYy+B62aTElYoeFgx7+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 4WZhPN4RR4z11DR; Thu, 1 Aug 2024 21:07:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471L7aAQ091400; Thu, 1 Aug 2024 21:07:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471L7asV091397; Thu, 1 Aug 2024 21:07:36 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:07:36 GMT Message-Id: <202408012107.471L7asV091397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 90f47ea0d6a5 - stable/13 - sctp: store vtag expire time as time_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 90f47ea0d6a5fe56953ecc8749a11126b874b51d Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=90f47ea0d6a5fe56953ecc8749a11126b874b51d commit 90f47ea0d6a5fe56953ecc8749a11126b874b51d Author: Michael Tuexen AuthorDate: 2024-05-10 18:25:04 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 21:06:50 +0000 sctp: store vtag expire time as time_t Reported by: Coverity Scan CID: 1492525 CID: 1493239 (cherry picked from commit 42aeb8d490fb7e8f4c9d27b3797179b861bd85e3) --- sys/netinet/sctp_pcb.c | 12 ++++++------ sys/netinet/sctp_pcb.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 5d603a3f26d0..f3b51b796df0 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4540,7 +4540,7 @@ sctp_del_remote_addr(struct sctp_tcb *stcb, struct sockaddr *remaddr) } static bool -sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, uint32_t now) +sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, time_t now) { struct sctpvtaghead *chain; struct sctp_tagblock *twait_block; @@ -4562,7 +4562,7 @@ sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, uint32_t now) } static void -sctp_set_vtag_block(struct sctp_timewait *vtag_block, uint32_t time, +sctp_set_vtag_block(struct sctp_timewait *vtag_block, time_t time, uint32_t tag, uint16_t lport, uint16_t rport) { vtag_block->tv_sec_at_expire = time; @@ -4577,13 +4577,13 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint16_t lport, uint16_t rport) struct sctpvtaghead *chain; struct sctp_tagblock *twait_block; struct timeval now; - uint32_t time; + time_t time; int i; bool set; SCTP_INP_INFO_WLOCK_ASSERT(); (void)SCTP_GETTIME_TIMEVAL(&now); - time = (uint32_t)now.tv_sec + SCTP_BASE_SYSCTL(sctp_vtag_time_wait); + time = now.tv_sec + SCTP_BASE_SYSCTL(sctp_vtag_time_wait); chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; set = false; LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { @@ -4595,7 +4595,7 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint16_t lport, uint16_t rport) continue; } if ((twait_block->vtag_block[i].v_tag != 0) && - (twait_block->vtag_block[i].tv_sec_at_expire < (uint32_t)now.tv_sec)) { + (twait_block->vtag_block[i].tv_sec_at_expire < now.tv_sec)) { if (set) { /* Audit expires this guy */ sctp_set_vtag_block(twait_block->vtag_block + i, 0, 0, 0, 0); @@ -6726,7 +6726,7 @@ sctp_is_vtag_good(uint32_t tag, uint16_t lport, uint16_t rport, struct timeval * return (false); } } - return (!sctp_is_in_timewait(tag, lport, rport, (uint32_t)now->tv_sec)); + return (!sctp_is_in_timewait(tag, lport, rport, now->tv_sec)); } static void diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index 4334595f208f..ae062c553a57 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -130,7 +130,7 @@ struct sctp_block_entry { }; struct sctp_timewait { - uint32_t tv_sec_at_expire; /* the seconds from boot to expire */ + time_t tv_sec_at_expire; /* the seconds from boot to expire */ uint32_t v_tag; /* the vtag that can not be reused */ uint16_t lport; /* the local port used in vtag */ uint16_t rport; /* the remote port used in vtag */ From nobody Thu Aug 1 21:08:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhQL3JcQz5RSbN; Thu, 01 Aug 2024 21:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhQL2Vcyz4RGZ; Thu, 1 Aug 2024 21:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ptE438r/kB/5FjMHObr2Id2T/JcN1nbh6yFgD9y554=; b=LtFehEFfOsxHzNQX4ojIE8Nmf1SJ0RhrhRHqbzta0Qic2b/O+pSxHzaCYOTqMbNvZ5y/S6 H4Nz3BoPWL46Mbl8pPfAaWlVKoN+5QUdKjCLP6kJkA8usfIUatO4vch144rRxBE0RjQijw 1RbExgfRg0alP7r3wVNswtUWbJTeEUhF6xmbZGtRBx/vcdUZrtYD8m+f8t6riBEWaYPYmV dRLjyI9FzuEByIrP2Q90lL+Cbe+vyeN4cVXx/tinp4ZwOR9//xAvQIiMC7aOwwdxnZEZGf IcnSmHHJCrWRGAZO+c+pp13zdexSQVve2zGAFVZu3JQKkT/X2GvcNQtuZ5MV7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722546506; a=rsa-sha256; cv=none; b=TobscA513Oq7980SG7PwrSP7U5T5dXL5rBEq9lhExOwFkXSEKthzEbm1C55ZmZLiACRkxX o1pzaOwIQhFSnrMvqlxWn7aKhhojWoJwUD5YUm4mIGW7wRY5H197AefpxO0n7wsjBZgV4t g3G3hh3TB+KtMMyRYQcsTQPhizHcZS6H1I1+pj/Ghhsw84sBoDIlhAoqtebG8PKjKW21Yb K/hFlMz2rPo62r5KvPDra8X6chFMyyNBO77eR2Q1f2Ma+J8smQsTczH6utHTTSXhBs+DIa pR+rqw1QXWOc/RV8SQ8brNUNONLUwj+UrwFk5k9DBgi6Pm4worlDGduAmiQ+dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ptE438r/kB/5FjMHObr2Id2T/JcN1nbh6yFgD9y554=; b=REQ07uZDq92rjJbJSkRWV+6wYCJxDCBv4vWpk36lOOAQ/dgaN9cZVy1rE9z2sCaky5fZhQ s93C4xNcJN51pwJz+LvVZInBw6TYyeIQkpRSSz9P3hvjG81e9hABO9cMhD3QkvjJVLkpTn eKOi0CcC1tZQy69AX/+TJtBNj/TQP4aVQaXLrKxFVX7wF0U5gstYSirC/yPEGbFHmven+g IC+pFmWPivH7zY17oq/396yGUPz8ce/WbPhUdMOoOblv0eLqCfXYMohFO/Tu/aN6hqk3oM 9Ou6ypoXG5lwg5FNI5G8/Vi76K5Q6gwynsr+UvnHpgI+iVRxElXSUr6X3yh5HA== 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 4WZhQL25Gtz111s; Thu, 1 Aug 2024 21:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471L8QRa091656; Thu, 1 Aug 2024 21:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471L8Q9b091653; Thu, 1 Aug 2024 21:08:26 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:08:26 GMT Message-Id: <202408012108.471L8Q9b091653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 8d9cdf264e43 - stable/13 - sctp: store heartbeat creation time as time_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d9cdf264e43209a367d519b9443888dd0bccdf4 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8d9cdf264e43209a367d519b9443888dd0bccdf4 commit 8d9cdf264e43209a367d519b9443888dd0bccdf4 Author: Michael Tuexen AuthorDate: 2024-05-10 18:40:15 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 21:07:52 +0000 sctp: store heartbeat creation time as time_t Reported by: Coverity Scan CID: 1493087 (cherry picked from commit b67716dd58b93f373523cf35373c56fcfad44b12) --- sys/netinet/sctp_header.h | 2 +- sys/netinet/sctp_output.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h index 811cb8bab158..0fbfbd213eed 100644 --- a/sys/netinet/sctp_header.h +++ b/sys/netinet/sctp_header.h @@ -83,7 +83,7 @@ struct sctp_supported_addr_param { /* heartbeat info parameter */ struct sctp_heartbeat_info_param { struct sctp_paramhdr ph; - uint32_t time_value_1; + time_t time_value_1; uint32_t time_value_2; uint32_t random_value1; uint32_t random_value2; diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index e719a5706f3b..bf4d383d732c 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -11286,7 +11286,7 @@ sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked) /* Fill out hb parameter */ hb->heartbeat.hb_info.ph.param_type = htons(SCTP_HEARTBEAT_INFO); hb->heartbeat.hb_info.ph.param_length = htons(sizeof(struct sctp_heartbeat_info_param)); - hb->heartbeat.hb_info.time_value_1 = (uint32_t)now.tv_sec; + hb->heartbeat.hb_info.time_value_1 = now.tv_sec; hb->heartbeat.hb_info.time_value_2 = now.tv_usec; /* Did our user request this one, put it in */ hb->heartbeat.hb_info.addr_family = (uint8_t)net->ro._l_addr.sa.sa_family; From nobody Thu Aug 1 21:09:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhRg0sk9z5RSWB; Thu, 01 Aug 2024 21:09: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhRg0L2Qz4RPq; Thu, 1 Aug 2024 21:09:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8y/cGIMK/sUmlju4uAv2a7BKaWrszcgTDpt0WyQVd4=; b=wrcoucqQbph2ajbYxnuiLrLoZak/lJ/1iykjCMLEGHL7S3ydJrmmfe3Z27dA2M6yI3wboo aqP91h4nL2IjN4rPyGNKJ34CxW5dlFzElHRHUR075SsU/vCNOta/T+rKV6fjxXAKKTCMLK 1k09WJLV02PEZPFkJOz+MDRkuitStgcvOkjfwW2pb2udOdnyWqEONaNBlE9DCC99GBGvuv AfkzKgijiGQDu2yh9qzm/iqNq9nCdBgMzCbJ9kqICi/zdrTmVtMoQ8MjidtDaWahns06cl Nzd6zQOXI6JJ25dcTFXsX+HYohzb7IeCz7aV8R4z5aFbkfyR8GhIeASBkcndhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722546575; a=rsa-sha256; cv=none; b=CD+U2VzOwMzmFpJMlRl2oXDzh1OEkpHwxZ98mq5x2Lf7Xf/n93p2QrPM+9bZCVAjaHqt3M XR378MbD0yRFbma79BINfssyffodN6/7HPUPT9FF7vpjSGZdlJB9mgI4Wy8J+WzAA36xqV 3deB+FnSa4Lv794YNPcGlwnwH2xhDUlTcK9to+AdQ/VEfWqtNHeR9wgd6puyaEBbnV7dXz GzPsw/qvTiOLruVxiLTB0pFXUxKzUenHZ2+KAiP9mcJ8pJcVWCZdf5fgZJ1+1EJYzztavS 1joObbG5BJuP0268GcEWULp+dYBW2Juakvk/w1jzLADG2PNiAI2CdzUkguGTSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8y/cGIMK/sUmlju4uAv2a7BKaWrszcgTDpt0WyQVd4=; b=uDpo5jKiphZr2XmlN0EI/zcccO5ZhndjweGwk12gHAORJoklXsXhmQBjjpfieZCu5+9yz1 492yeB73AluTHdRYv+JIaXRSRxNMD0aXu6bLoUCuzqncBCqcQXK/kw/LRE+4pfKC4i6RjC wQcrqFyrwQ3prBMZ5SbrHmlTLG2mhlS7H8dlsuzCL7V0cNYOEYZeK7dnS2n044ca60ssX8 9/SsVvF4t/rKw/2o7iRreRvx/OTDLRIsL3P2tbKgV+u/wuOfW+qnRdM71VyXK6/wUrByte CP9RyT9eI6kpSMXR+Sbn8dPQI7lu0y145GLXQwJVN7Rjix+Cv73vlonv4c6T3A== 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 4WZhRf73xGz11DS; Thu, 1 Aug 2024 21:09:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471L9Y8S091957; Thu, 1 Aug 2024 21:09:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471L9Y4m091954; Thu, 1 Aug 2024 21:09:34 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:09:34 GMT Message-Id: <202408012109.471L9Y4m091954@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 162c10990fdd - stable/13 - sctp: improve heartbeat timer computation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 162c10990fdd2f82d479598f39af250191928453 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=162c10990fdd2f82d479598f39af250191928453 commit 162c10990fdd2f82d479598f39af250191928453 Author: Michael Tuexen AuthorDate: 2024-05-10 18:58:01 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 21:09:03 +0000 sctp: improve heartbeat timer computation PR: 278666 Reviewed by: Albin Hellqvist Pull Request: https://reviews.freebsd.org/D45107 (cherry picked from commit 5120ea0d8871fd5d56a8fb70117b727b9d8a4e62) --- sys/netinet/sctputil.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 68484409d038..40a7500fc69c 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -2287,19 +2287,19 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, } else { to_ticks = net->RTO; } - rndval = sctp_select_initial_TSN(&inp->sctp_ep); - jitter = rndval % to_ticks; - if (to_ticks > 1) { - to_ticks >>= 1; - } - if (jitter < (UINT32_MAX - to_ticks)) { - to_ticks += jitter; - } else { - to_ticks = UINT32_MAX; - } if (!((net->dest_state & SCTP_ADDR_UNCONFIRMED) && (net->dest_state & SCTP_ADDR_REACHABLE)) && ((net->dest_state & SCTP_ADDR_PF) == 0)) { + if (to_ticks > 1) { + rndval = sctp_select_initial_TSN(&inp->sctp_ep); + jitter = rndval % to_ticks; + to_ticks >>= 1; + if (jitter < (UINT32_MAX - to_ticks)) { + to_ticks += jitter; + } else { + to_ticks = UINT32_MAX; + } + } if (net->heart_beat_delay < (UINT32_MAX - to_ticks)) { to_ticks += net->heart_beat_delay; } else { From nobody Thu Aug 1 21:12:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhVs1WwTz5RT9S; Thu, 01 Aug 2024 21:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhVs15FBz4Rjt; Thu, 1 Aug 2024 21:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EmhD9BE9DmTQXbQaLfdSo2IvpCgVFzyOPEJ5VmwUf9I=; b=HX2SLh19DA5LiD++s1hrGae3L5+Sc8OgFapngRiH1Yiv9/ZNRnEUYR/ZVdjsjq10Zq6/vE bbcJnwPjg7ouS6yCNJF8WQyHWH4go09pDK8wNJPMMXi3X4LhtXB2zBVfVhoxLdOVCPD4Zh DU5iDD/0UnKGpBS8wUU/M+3T1lcY/x1OcJsFpHUIwRdsuagy5oNQGiHY9roUBxb9PyuQ3Z TXk3eBQmzaMJEoqCwpCGl4EziWoNLOfRaU3NkqrUo2JpcogXiZBAo4A4nOrqGKxrAVRz2+ o8B4RGjV4k9ZyL3VhhNnqFfnnxEf5JszTkdtJhu5jaw56eJMTlavXNsV0m2x9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722546741; a=rsa-sha256; cv=none; b=IDSwYiyPW4xHyKadEiBYUs4wQSCMymkAFF+Aej/0WyeIsMgyCtK5HhEGPgu7AW1IRpxeQa O5lJZCtQcgDZlGexG1sycdSMAIqcG2YG0x0Dc9hspXoqKtQkLQfxMSdw/3K+g/CBlF3H9D QmGI/nwNKouHGIgpni2jRDikQkSiGyUiasXWDCcB2Ko5/0NwPvalwLZ095r+TJ4aZ1Dkt5 NydyGa3jPm6O4wcW6Fw9LHDf1pGYeBkdCRYs56o33WkKZ9MjIK3lnFYXtgDghEpWinTa9H 4M53B6byPQLd3zphBL+QsxbB9Upffs37iBHt6RJBl5tMQsDyhhzHBhWTFkvOSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EmhD9BE9DmTQXbQaLfdSo2IvpCgVFzyOPEJ5VmwUf9I=; b=Hkl86fEkT0N9rvLlCnX04iM5n6lrjRpou/vPtcUPuUOTaW3PArGZzw1hyIhSLCrqMw2eSg b+QS1a8L6agdT0JkNiktghivDGDmPPL6WRZ7CcrHzEfCUBfwEQSpBGtD/dRfJKlAj2aie2 8punPjjbp2o+iNfkyqsDBa9RcvzXamuH6mJEd4tssbIvzKMJDT7rg1nu1kYw+CL54iZJQa 6eTkhNERq/yRoOFiOauTb4XNuoo0+5y/l4ASajjAKVL90AUpduXCSW3BUWtiPBhXRdKORk Bqjf1SD3lTIAPjLEzsTO81j7ocB7zeV8bCkwyc9/ByyoQuE8L+CsQCjVV5Yx2g== 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 4WZhVs0hvTz114m; Thu, 1 Aug 2024 21:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471LCL7M007964; Thu, 1 Aug 2024 21:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471LCL0X007961; Thu, 1 Aug 2024 21:12:21 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:12:21 GMT Message-Id: <202408012112.471LCL0X007961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: c4dbe6976bd7 - stable/13 - blackhole.4: improve man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c4dbe6976bd725b9e69290aa017e0ef18b5d7880 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c4dbe6976bd725b9e69290aa017e0ef18b5d7880 commit c4dbe6976bd725b9e69290aa017e0ef18b5d7880 Author: Michael Tuexen AuthorDate: 2024-05-22 18:36:24 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 21:11:54 +0000 blackhole.4: improve man page Not the connection is dropped, but the incoming SYN segment. Reviewed by: concussious.bugzilla_runbox.com Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45296 (cherry picked from commit a45a9e61b498393b05f3e1e2e3e6131c7b484dc4) --- share/man/man4/blackhole.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 00c8e3d7a2b6..090f330a6ed8 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd November 3, 2021 +.Dd May 22, 2024 .Dt BLACKHOLE 4 .Os .Sh NAME @@ -51,7 +51,7 @@ when unexpected packets are received. .Ss TCP Normal behaviour, when a TCP SYN segment is received on a port where there is no socket accepting connections, is for the system to return -a RST segment, and drop the connection. +a RST segment, and drop the incoming SYN segment. The connecting system will see this as a .Dq Connection refused . From nobody Thu Aug 1 21:16:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhbs56sxz5RScJ; Thu, 01 Aug 2024 21:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhbs4YTcz4S4R; Thu, 1 Aug 2024 21:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722547001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xwE7B6elp+L0aD2w/I/ZMGun8AfyzcP1ubaLXBJsfck=; b=Rmcl6KqMVNXdjJxkLdHnW96BCshr7wt0wSQReDQnlaUil4jFtwBITTnDHFtJ6hb+onxFYL xOOQ7hHjOhL7zaMC28JD5mkQVGrwN/otgt8/A2OtZpNbkbnQ6Ys3ENPpnebfTEufx5SZaF gpEPPCu1BDzyRwXGEIYUQmzXz0BWa0lIYKdVGhHoawJaUf3M/p5++SXQjsB9Un1i0v2inA 5MxySquPRiwfqcie5e1NA/Bv0Dena3FKain8Xln8fgSrjcuEJADXkcD0Rn2kBfe+Em90GC FowCv4x0uwFlpDc/Op9wdpTsYYu4XpQWYDPS2rmS95TsZ2yiptO+Aogd+ZzxEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722547001; a=rsa-sha256; cv=none; b=n9VYKGzzKAyrtWVs5Hbl2rZB0HJdFXQwZN0wE62PB0gsAdgDfuE7Tn76EBDDRZbRST4z4q 50IVixy67lpjegC6zrkqDa+h7Te7CwJEwbUWXBMqrTn+ApjPp2hFY1eJagAVz6hv8nOLEV LWfaMADEgCoQhdn7+rNTF8C8Rqf0nwLrtidZKVWo9LZjtM7TuoYHW9bI9aFPL53HQQ1dwS yWFCpzjt9LTddwnEFM+4uVmYdIxDYNe+IKLLmCs4WCTxPjqmFNP6asXfqmv8w/zs8c4ogX kXrWOPq0vZU1wFHx1jlHTi4WZuU1upc4zknGw6Dm2ONrpGfwArdeJ45R+JeR3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722547001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xwE7B6elp+L0aD2w/I/ZMGun8AfyzcP1ubaLXBJsfck=; b=gXnR4UB8T4tbiwCNOZrPLq7rmOA/e+bVNck9/4t6uWV/TpP06lCJy9nfbmJkIjcsOMRZcD 5vy7DI5BHmk/ZRTDlga5EXRkhQhEPtGLyF2l//V1hcbdqaIKdfHPfzX3aXhqfnFg8D4afR L1geie2ceFZ7KHZT85Hblvf4OSY6DTYYh0xqBJHQb2smUocRVz5raS9yd+lXDNDsL7fBsp 1Ulhl0acIk7JG0H0Sw35T8dJm84w2WB51tTzvwV/TEq+H7aQMxXwpDCjndwaJHXoxHIr2a w11ShSKKnhyzOlqlziqCsEsg4qdRASRR8acf0aplipmDYjbw40CPmsSpvkFkzg== 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 4WZhbs49b9z11Gp; Thu, 1 Aug 2024 21:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471LGfCg008660; Thu, 1 Aug 2024 21:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471LGfEr008657; Thu, 1 Aug 2024 21:16:41 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:16:41 GMT Message-Id: <202408012116.471LGfEr008657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 8f31e64ca336 - stable/13 - lo: update man page since SCTP checksum offloading is supported List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8f31e64ca336e90b7fdfee4d185773f677341626 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8f31e64ca336e90b7fdfee4d185773f677341626 commit 8f31e64ca336e90b7fdfee4d185773f677341626 Author: Michael Tuexen AuthorDate: 2024-06-23 11:27:54 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 21:16:21 +0000 lo: update man page since SCTP checksum offloading is supported The loopback interface supports SCTP checksum offloading in addition to TCP and UDP. Reviewed by: gbe Differential Revision: https://reviews.freebsd.org/D45698 (cherry picked from commit 60117f9ee58e202be55a8af5bb6b6c768e7a940e) --- share/man/man4/lo.4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/lo.4 b/share/man/man4/lo.4 index 7bc806e5a005..f1ac67c7d7db 100644 --- a/share/man/man4/lo.4 +++ b/share/man/man4/lo.4 @@ -29,7 +29,7 @@ .\" .\" @(#)lo.4 8.1 (Berkeley) 6/5/93 .\" -.Dd January 25, 2012 +.Dd June 23, 2024 .Dt LO 4 .Os .Sh NAME @@ -57,11 +57,11 @@ be configured first unless no hardware interfaces exist. .Pp If the transmit checksum offload capability flag is enabled on a loopback -interface, checksums will not be generated by IP, UDP, or TCP for packets +interface, checksums will not be generated by IP, UDP, TCP, or SCTP for packets sent on the interface. .Pp If the receive checksum offload capability flag is enabled on a loopback -interface, checksums will not be validated by IP, UDP, or TCP for packets +interface, checksums will not be validated by IP, UDP, TCP, or SCTP for packets received on the interface. .Pp By default, both receive and transmit checksum flags will be enabled, in From nobody Thu Aug 1 21:31:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZhwr2nRbz5RVCT; Thu, 01 Aug 2024 21:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhwr25fxz4T6X; Thu, 1 Aug 2024 21:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722547884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pa4LAnl1s60CD/Edol1cgjszJQMS8L48xoGn5RTNLXU=; b=LyXgmKioMa524VLqHPoQdou7ITZjIoKyjXCF5df6QidjXFM9WygnN2D4Jaq2+4S6whwTi/ GMaeG+p2A4mnC1gBMIEZ9iDXOFAK5T6ORvKDKla+KvflwnZePQW8XGvJ09ECRZeOZvi4PP FmMK9LIzISwhpkfNjr6wFmlnrcFYtPb0PYPRjmrEbJEcb07YyBPdgIKkuBlcCiqBl8lcyL 8lzDBC++2ATQXufeDyusFdmUAysHU0lvSUqj6YlT2Yx12pFkN6H4zsrnFk+Mg/ZopEZg6R V0CihrKNff9iaJc1FTNBirq+e9nikwHFYxHepT3iqzYPD9C7jL5CLNhZBSjvyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722547884; a=rsa-sha256; cv=none; b=JTA8WF17ABUXIzrVNbhW6NcafdoOwMN+lhKQMXb3ra0gGd8EpHU2bM71HOrM6bycetIbe/ WJXwrpnPSYegW40fLIdUAydQssNR4TannX0KBi+B+6OQhr3Oeisr8Ny00Sqf++VaY69kvp AJFkyAR3VeqRfCCJCGAEcVV543e+UhhpujIlva7rsLQP3qccb40d0GpBQwo6IgjX7ie0U9 xy5CQ3knT3GL6X9kf9KB5089cIITKkzyZJaMpf3wJPJZW64s7EPw2AnDtBSzSNCbAPGyJw XCUorQRkPGrH8jeBOEqdxZ/H0eekltwS44faSeeJTdwNL3yPk81ylWFgLRNjxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722547884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pa4LAnl1s60CD/Edol1cgjszJQMS8L48xoGn5RTNLXU=; b=oIDmFxHGcQQT70+0BfrQO4bUiaVJd+BWjIuDWOBV0EEA2ErtR2H/1Z8tnkKyrsO/Zm7ami BPPr1gutFM20kbQSrInxR20CMVORWEFURQ7RO931DqWyFj+Gujm+BJ6HotrjRzjFnAZTVX kInKhwCxCSZ45o8umTVV2he/L0Zyl0Wow+RLgyKIV5vu8se2DRZ7bo/vs0e+EK0KRf97hI d3sPWY/vwgx+uTt1WQp/IotYCT/7xzoptCSz/k5j+StkFNVp3iHL/qSMxBM7Q+VnzdxCo6 8JgGyOS3I0V/sKRcY9n/x0KjmUW2znYwjl8H3qEz/xO1aaV3W3n3tjk3WMZoIA== 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 4WZhwr1jKcz11bb; Thu, 1 Aug 2024 21:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471LVOlQ039272; Thu, 1 Aug 2024 21:31:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471LVOGC039269; Thu, 1 Aug 2024 21:31:24 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:31:24 GMT Message-Id: <202408012131.471LVOGC039269@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: 46ea2ffc3fbc - main - stand: Reduce limit to 500k for x86 loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 Author: Warner Losh AuthorDate: 2024-08-01 21:24:51 +0000 Commit: Warner Losh CommitDate: 2024-08-01 21:30:26 +0000 stand: Reduce limit to 500k for x86 loader The largest loader that works for PXE boot is about 500k. PXE needs low memory for packets and other driver state, so the largest safe size for the loader is about 500k. Reduce the size from 560k to 500k so we don't accidentally break PXE in the future. Add a comment for people with special needs. If you control the hardware, it can be safe to have boot loaders as large as 580k or 600k in some cases. Since the BIOS loader is becoming more and more of a legacy item, the build variable LOADERSIZE isn't documented. This change doesn't change that: there's been little demand for this documentation and in general, users shouldn't change it lightly. PR: 257018 Sponsored by: Netflix --- stand/i386/loader/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index a4aa3a3c4d45..efd442977780 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -32,7 +32,12 @@ VERSION_FILE= ${.CURDIR}/../loader/version # # will tell you how many kiB of lomem are available. # -LOADERSIZE?= 560000 # Largest known safe size for loader.bin +# We further reduce this to 500k, though, to give PXE an additional 64k of space +# so pxeloader will fit. If you have special needs that do not include pxeboot, +# you can safely set this as high as 560000 generally, or a bit higher if you +# have tight control over the machines you are booting on. +# +LOADERSIZE?= 500000 # Largest known safe size for loader.bin .PATH: ${BOOTSRC}/i386/loader From nobody Thu Aug 1 21:44:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZjDG0t9cz5RWKy for ; Thu, 01 Aug 2024 21:44:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZjDF5yxqz4VMC for ; Thu, 1 Aug 2024 21:44:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-70eb73a9f14so5615177b3a.2 for ; Thu, 01 Aug 2024 14:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722548684; x=1723153484; 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=oB9h3F7+fBVUFCKhi8bzleRgRO7OSDw9sN3n8ykihhA=; b=Y92Vjsf6bGu5Xe2mG67i8sJPRGjzgCyIuwHIeeyOlSaBdAfsesoMpX0ihE4zrebZCH 63caRj7vVjXtbTuPrkzwKewlZgnRKZfWkRCbMx6lZt15DOZfsKNcXI2TKWezlWPSCcII m4+uvxB7nNL0XgJDCf1DYdcGdO5k2Cwv0jwrU+ua5qxiGAARnKU0JLoVOVX9BKQIQxzH J9aRRVB9ixYE4A6KhVWTcUEB/c8MrZQM7x0F0wLGAb6xR0SbIPdYznsBCRlsE77JzHpM u/tV4ly2/OGsnZbcgs1wPoXVGgkOQ5NQF/J7+CZ2fsHkSKz3KHpwPwQr5xpKcVvPuNAd 3AaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722548684; x=1723153484; 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=oB9h3F7+fBVUFCKhi8bzleRgRO7OSDw9sN3n8ykihhA=; b=qv0yKYS+yK/r3KMdPVTE6Vb9gzpWtfEZiaHAaFr3OFfnOKnZvVhetTh7BNAz2yrwv5 UccSY5G0hqeex3YHoKYr6xzbwpL0kN36yDYW0JbjG2p/e8nLpSFkTcJZqgDLUm5jXEMk aQJVAqqfi28/AahlqPujSQJrYTicFoVfsPAj7+4agHmk+hsMm7tQzcb9x3m0MZRGpe9o RMv3U+oumjr8I172AwKQXbCO6Rkoxr+TX/968Zhv8myeZCC2lFz8o1JAwR4S/qp67/Ny LibU9qz35kwj+TbTCR23qBZru1MDxWJAc2TW3G8I3O94h3EY49TD+jCwIILndBViOmTN lWBQ== X-Forwarded-Encrypted: i=1; AJvYcCXb9ZGJMCw55VPTM7zxWGbBfysvsS7CsIGLC4olHx5VI+vognHMRgP8epIX9yKYRTY5tH5xnCnMOVMRzFQTR8CmBkNNYqSbnHWa5rfCGB/f X-Gm-Message-State: AOJu0YzfchWV9LwmGx5eeSK0WdfKiFeN8QdB9eA2i5ocwlyfpf1m5uvH vCp6mnh0uUP4fDQhT928KhjRSLt2VRUFWk60IUwLO6JSmmZyiT9AURk/UVOZ/vCbjdJ+2it+G+S XqKC+QAdDeDqETSLyMjRmd00JYTao3ibTufWf4g== X-Google-Smtp-Source: AGHT+IFK+qtDxbvYfDR1IdVQRpM01mJPioSWFp20zC2VjYPrbOUmgbVMsk0EY8hfD6pK8Y+kmc9/B+Oqmt2WgoZoqPk= X-Received: by 2002:a05:6a21:3393:b0:1c3:a63a:cee3 with SMTP id adf61e73a8af0-1c6995a01ddmr2542681637.13.1722548684091; Thu, 01 Aug 2024 14:44:44 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202407311926.46VJQCOP077960@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 1 Aug 2024 15:44:33 -0600 Message-ID: Subject: Re: git: 66158bda905e - main - ObsoleteFiles.inc: Remove CAM.4 MLINK To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000006c8e3a061ea61e06" 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: 4WZjDF5yxqz4VMC --0000000000006c8e3a061ea61e06 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey John, On Thu, Aug 1, 2024 at 5:51=E2=80=AFAM John Baldwin wrote= : > On 7/31/24 17:16, Warner Losh wrote: > > Thanks! > > > > I'd thought about removing it, but didn't want to always remove CAM.4.g= z > on > > a filesystem that's case insensitive, which will remove cam.4.gz... > > While true, I think that's the far less common case where 'make delete-ol= d' > is used. The only case I can think of where you would install a world > onto a case sensitive filesystem and then do a delete-old is if you are > cross-building images on a mac (and running makefs, etc. there as well). > However, those cases don't always use make delete-old. cheribuild just > installs a new DESTDIR each time for example. > OK. Makes sense. There's so few of these... I like this tradeoff and comin= g down on the side of 'traditional use of selfhosting' which is all ZFS or UFS. Warner --0000000000006c8e3a061ea61e06 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey John,

On 7/31/24 17:16, Warner Losh wrote:
> Thanks!
>
> I'd thought about removing it, but didn't want to always remov= e CAM.4.gz on
> a filesystem that's case insensitive, which will remove cam.4.gz..= .

While true, I think that's the far less common case where 'make del= ete-old'
is used.=C2=A0 The only case I can think of where you would install a world=
onto a case sensitive filesystem and then do a delete-old is if you are
cross-building images on a mac (and running makefs, etc. there as well). However, those cases don't always use make delete-old.=C2=A0 cheribuild= just
installs a new DESTDIR each time for example.

OK. Makes sense. There's so few of these...=C2=A0 I like this tr= adeoff and coming
down on the side of 'traditional use of sel= fhosting' which is all ZFS or UFS.

Warner=C2= =A0
--0000000000006c8e3a061ea61e06-- From nobody Thu Aug 1 22:00:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZjZL1HtBz5RXKV; Thu, 01 Aug 2024 22:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZjZL0qHcz4WMs; Thu, 1 Aug 2024 22:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722549626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L3gcV/OjzMiG4XGjYpHxglZrHn0xy7ta6z+AVfqyAoA=; b=pnWSu9OEGpReWPYSXo94Xe7AOqoI8x9mKEsxbRe1MNsjG+fPmgvl4obwdGeRVv+cUQc5pU 32gR3RTM65fYe/UB2H5IBU0G6wvC371+doFDu/08BL+DYybn4xK3Wpk9d0D2HPEZKOcKic Q8KyjqdTO3hN20UcV8G6vASm6V3eFC51zwrefsKnqo6nw1xy3EtTtlE4vcSxnIXoBaaVEr ksS4lNml52JUX/Ccc3P944Sm43YvnKWc5N4rV0zSzLV1iwQp/oiM/sd6XOdIWf6MYQLH3b 1eT7Fdp6D6plY426aAV7Js4T5rxxx1XjIvl0qzfKa5oxv7QHjAslxd/L4QDVAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722549626; a=rsa-sha256; cv=none; b=DoIVtQHHhAreeZ1VpxVlqEtkV+oN4yoQkGhLiLJ6QHUeXgHsjxFMh46tk7RBZ2DRQ8AhIA wnOh/dw0P/GoeRG+FWYCWtMvQKHyVcrgeQMttiTPdXnu3l5QN3AtX7icYjlgR6l3MO7Pjr Zv7TOZHP0MVc1kHfK2W9ATs5haXk7qnikLO4EQ2Ea7hmDJcehHQHr53tLNVubnV9g77/2J tfS2gglpUlk632ERCHWntS2y1+QtFLmXlkR+MRF9zlHJ6OeRLMrHoEnYNqznuGdNGQbe/v 9r7+pEPMV9RUH1KVwJsQLVKoYzdmBM6wgmOhwR85XGK9DMXMHLGwBQgNjV9YWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722549626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L3gcV/OjzMiG4XGjYpHxglZrHn0xy7ta6z+AVfqyAoA=; b=PUopnrY972OgpKClonhAWurzF6u8DBZ28x/xqoxTEc2einhINhpTxvCeu2u15SlPUwtfo2 8aNaY2er7tJjEgiY35SEqFuAsEhU0sb7SXbx7Cp/oiU48h3YuFMQLR9Go5chpwrXKj3NZX snQrl22wKrxpzIQLjkOJEFvePFTm+e+TXlJktPsVw/ctevTVeXXc0XW4UsK+stqBNYNNAm FlawGaYyf0YPEMs4BJEc112aMWBJGlKl4C1anvR7lEbrE2IvdCC0IPNAeq+iUFdLHaOmNa iRriOGl+2iIrVgYzllaELpOO9ChI6f7cYWi126eU5QFoOJAuRLmrqbcK6xsFNQ== 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 4WZjZL0QX2z12Q3; Thu, 1 Aug 2024 22:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471M0PYa085608; Thu, 1 Aug 2024 22:00:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471M0P7R085605; Thu, 1 Aug 2024 22:00:25 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:00:25 GMT Message-Id: <202408012200.471M0P7R085605@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: b77f618568f2 - main - Add examples to veriexec(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b77f618568f252da3a6c69e8aff25f6b1bada1fd Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b77f618568f252da3a6c69e8aff25f6b1bada1fd commit b77f618568f252da3a6c69e8aff25f6b1bada1fd Author: Simon J. Gerraty AuthorDate: 2024-08-01 21:59:52 +0000 Commit: Simon J. Gerraty CommitDate: 2024-08-01 21:59:52 +0000 Add examples to veriexec(8) Add missing flags to veriexec(8) as well as some examples to help explain usage. Also add veriexec.4 Sponsored by: Juniper Networks, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D46207 --- sbin/veriexec/veriexec.8 | 84 ++++++++++++++++++++++++++++++++++++----- share/man/man4/Makefile | 1 + share/man/man4/veriexec.4 | 96 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 9 deletions(-) diff --git a/sbin/veriexec/veriexec.8 b/sbin/veriexec/veriexec.8 index 2e476f327b14..3c85957357f5 100644 --- a/sbin/veriexec/veriexec.8 +++ b/sbin/veriexec/veriexec.8 @@ -1,7 +1,7 @@ .\"- .\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2018-2023, Juniper Networks, Inc. +.\" Copyright (c) 2018-2024, Juniper Networks, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,7 +24,7 @@ .\" (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 August 8, 2023 +.Dd August 1, 2024 .Dt VERIEXEC 8 .Os .Sh NAME @@ -97,7 +97,7 @@ The possible states are: .Bl -tag -width enforce .It Ar loaded -set automatically when first +set automatically when the first .Pa manifest has been loaded. .It Ar active @@ -137,10 +137,11 @@ The manifest contains a mapping of relative pathnames to fingerprints with optional flags. For example: .Bd -literal -offset indent -sbin/veriexec sha256=f22136...c0ff71 no_ptrace +sbin/veriexec sha256=f22136...c0ff71 no_ptrace trusted usr/bin/python sha256=5944d9...876525 indirect sbin/somedaemon sha256=77fc2f...63f5687 label=mod1/val1,mod2/val2 .Ed +.Pp The supported flags are: .Bl -tag -width indirect .It Ql indirect @@ -149,16 +150,31 @@ but can be used as an interpreter for example via: .Bd -literal -offset indent #!/usr/bin/python .Ed +.It Ql no_fips +If the system has a notion of running in FIPS mode, +a file marked with this flag will not be allowed to +exec. .It Ql no_ptrace do not allow running executable under a debugger. Useful for any application critical to the security state of system. +.It Ql trusted +this flag is required for a process to use +.Xr veriexec 4 +to interact with +.Xr mac_veriexec 4 . +Generally only +.Nm +should need this flag. +Implies +.Ql no_ptrace . + .El .Pp The .Ql label argument allows associating a .Xr maclabel 7 -with the executable. +with a file. Neither .Nm nor @@ -167,10 +183,60 @@ nor pay any attention to the content of the label they are provided for the use of other .Xr mac 4 -modules. +modules or indeed other applications. +.Sh EXAMPLES +Load the manifest for a +.Xr tarfs 5 +package mounted on +.Pa /mnt +and be strict about enforcing certificate validity: +.Bd -literal -offset indent +# veriexec -S -C /mnt /mnt/manifest + +.Ed +.Nm +will look for a detatched signature that it recognizes, such as +.Pa manifest.asc +(OpenPGP) or +.Pa manifest.*sig +(X.509). +In the case of an X.509 signature we also need a matching certificate chain +.Pa manifest.*certs . +In either case there needs to be a suitable trust anchor in the trust store. +.Pp +We can now activate: +.Bd -literal -offset indent +# veriexec -z active + +.Ed +Any user can check if +.Xr mac_veriexec 4 +is +.Ql active : +.Bd -literal -offset indent +$ veriexec -i active + +.Ed +Any user can check that +.Pa /mnt/bin/app +is verified: +.Bd -literal -offset indent +$ veriexec -x /mnt/bin/app + +.Ed +If it is not, we will get an Authentiaction error, +but unless +.Xr mac_veriexec 4 +is enforcing we would still be able to run it. +.Sh NOTES +It is only safe to set +.Xr mac_veriexec 4 +to +.Ql enforce +state, if sufficient manifests have been loaded +to cover all the applications that might need to be run. .Sh HISTORY The Verified Exec system first appeared in .Nx . -This utility derives from the one found in Junos. -The key difference is the requirement that manifest files -be digitally signed. +This utility derives from the one found in Junos, +which requires that manifest files be digitally signed. diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index b4a8e484b137..4e685cac3ecf 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1054,6 +1054,7 @@ MAN+= \ uslcom.4 \ uvisor.4 \ uvscom.4 \ + veriexec.4 \ zyd.4 MLINKS+=otus.4 if_otus.4 diff --git a/share/man/man4/veriexec.4 b/share/man/man4/veriexec.4 new file mode 100644 index 000000000000..14e4aeae0d10 --- /dev/null +++ b/share/man/man4/veriexec.4 @@ -0,0 +1,96 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024, Juniper Networks, Inc. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd August 1, 2024 +.Dt VERIEXEC 4 +.Os +.Sh NAME +.Nm veriexec +.Nd the veriexec device +.Sh SYNOPSIS +.In dev/veriexec/veriexec_ioctl.h +.Sh DESCRIPTION +The +.Nm +device is used by +.Xr veriexec 8 +to query and modify the state of +.Xr mac_veriexec 4 . +.Pp +Once +.Xr mac_veriexec 4 +is active, only a process which is marked as +.Ql trusted +(normally only +.Xr veriexec 8 ) +is able to more than the +.Dv VERIEXEC_GETSTATE +ioctl. +.Sh IOCTLS +The supported ioctls are described below. +.Bl -tag +.It Dv VERIEXEC_SIGNED_LOAD Vt struct verified_exec_params +Pass file information to +.Xr mac_veriexec 4 . +.Bd -literal +struct verified_exec_params { + unsigned char flags; + char fp_type[VERIEXEC_FPTYPELEN]; /* type of fingerprint */ + char file[MAXPATHLEN]; + unsigned char fingerprint[MAXFINGERPRINTLEN]; +}; +.Ed +.It Dv VERIEXEC_LABEL_LOAD Vt struct verified_exec_label_params +Pass file information and a label to +.Xr mac_veriexec 4 . +.Bd -literal +struct verified_exec_label_params { + struct verified_exec_params params; + char label[MAXLABELLEN]; +}; +.Ed +.It Dv VERIEXEC_ACTIVE +.It Dv VERIEXEC_DEBUG_OFF +.It Dv VERIEXEC_DEBUG_ON Vt int level +.It Dv VERIEXEC_ENFORCE +.It Dv VERIEXEC_GETSTATE +.It Dv VERIEXEC_GETVERSION +.It Dv VERIEXEC_LOCK +.It Dv VERIEXEC_VERIFIED_FILE Vt int fd +Rarely needed. +Tells +.Xr mac_veriexec 4 +that the file associated with +.Va fd +is verified. +.El +.Sh HISTORY +A +.Nm +device first appeared in +.Nx . +It was added to +.Fx 13.1 . From nobody Thu Aug 1 22:27:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9J4rGFz5RZ6l; Thu, 01 Aug 2024 22:27: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9J4K4rz4YGL; Thu, 1 Aug 2024 22:27:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cL5mD39Qwp+RiObkHgQb/z3c+Q4lM5LNd5CgCYBSbVA=; b=yow694EUW7iD2welhv3KFtBg1ygBydCbUeR8IHQjnuzKcxsrWqkrt2uMYiXgsjyvPixOtQ lUQvkqcBsveqsDxdKpPLwMUVSxnTE0IhBQLm22BbUs3ArYFZgNE6reDIEQjiRFCCEr0ekv JhWnncyQHmpWyKaWEGUQDD6i4dsS9H1GV8xZhYabuqA/YnuG7LW3EqIX1xD7dmyCl8azbG tESMzvzL+k0bhYPIhegZ81bXmInOSH7ULZ7Hs+cRhu0DlExEWTfAvxuy3ANkRxhz2mh84u jyKuXJQAH641vqJo6Tl8dNoj/LqLMfBBjCrRxMn9QLSNJyH764HMI9o0P19KgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551236; a=rsa-sha256; cv=none; b=jPKkUfi20zYObIWZzEG38rL8nTUbqPxOVv28qiEMOM8cVCS5b2x/pESn2gbK63k9+V6gyR F3iJewzTR66ZEVv1FvTPOj5RDIye/Fa5sLNljjZcTy9yqf+o7Pz+z/sMSRoO3udt8Q3zp9 +XVi6TNW+gX10o2+3GkUnu0hqv5lqoEPYM77qVRQthIL8KCPa9vRQuafBJ2dUhDkUpk9aP tgr0FOUdSui0ncgJr17ftx5vgND8f/OBtgtNI4XRZe93Nq1uD8xZ6XhtFm4uERc6nDUfBO NnT1RigiE9hXxLHu3kNfJ5UR2Gl8pqMMUsD1bgC/YjJoMAi1JPXkARD1Tr53cQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cL5mD39Qwp+RiObkHgQb/z3c+Q4lM5LNd5CgCYBSbVA=; b=oTKes1oTlG6Cv1KaQwckbzpHFTm65XUM0F35GSVC1XcWJl5UKXRH+W0t7bOefM+ScuqPYn GZxq7JQGQQP8ZaLw+4zlN7UphOdM04L4Ro98Iqw7lECp68wwqSO/duM6E4R9Sv4qkmgOZv O0ipR/D4q+soiUJYB/l0f/G6PEqk1xWSjG+poBhPHqZ3g0xQYzwQG5yUB/e/kau2epVBk7 oV/zKC6EKuF8ASTdD81m/hzvY7wywf6CLmXTFdZ0l+GvqgW7lhVlhentvVmR/f1iKgMgpe qeiPhHayYhFHG7C7B/sFc4uV2ePEHuQqQvM2aMo1yvmOaiZFoxXAj4CX93u+7w== 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 4WZk9J3wKLz12Wd; Thu, 1 Aug 2024 22:27:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRGNv026673; Thu, 1 Aug 2024 22:27:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRG3h026670; Thu, 1 Aug 2024 22:27:16 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:16 GMT Message-Id: <202408012227.471MRG3h026670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 73b587e2ee99 - stable/14 - LinuxKPI: Set suspend type on syspend/resume cycle enter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 73b587e2ee993512f37fc6ec754ab59d7357ea41 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=73b587e2ee993512f37fc6ec754ab59d7357ea41 commit 73b587e2ee993512f37fc6ec754ab59d7357ea41 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:41 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:37 +0000 LinuxKPI: Set suspend type on syspend/resume cycle enter Recent amdgpu depends on pm_suspend_target_state value to separate S3 and S0ix support. Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu (in bugzilla) MFC after: 1 week (cherry picked from commit 8ace984e477b0ee1fcc317752603ec4fe9c7f636) --- sys/compat/linuxkpi/common/src/linux_acpi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c b/sys/compat/linuxkpi/common/src/linux_acpi.c index e7b6854ecf13..60ec838e9da7 100644 --- a/sys/compat/linuxkpi/common/src/linux_acpi.c +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c @@ -109,12 +109,14 @@ linux_handle_power_suspend_event(void *arg __unused) * TODO: Make acpi_sleep_event consistent */ linux_acpi_target_sleep_state = ACPI_STATE_S3; + pm_suspend_target_state = PM_SUSPEND_MEM; } static void linux_handle_power_resume_event(void *arg __unused) { linux_acpi_target_sleep_state = ACPI_STATE_S0; + pm_suspend_target_state = PM_SUSPEND_ON; } static void From nobody Thu Aug 1 22:27:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9K632cz5RZP2; Thu, 01 Aug 2024 22:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9K5Ryjz4YRW; Thu, 1 Aug 2024 22:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vEhQ8M/VVVATLh2DXY8UERgCU3BS3vCRSM+dpZEhOT4=; b=JDi+viH/6Qv0xRr1oVZnqM/ifBWXbdhhxjygC4wST8X8aBljg6qN3/p3urhoFIfrnn577Z 4ANsQ5QyxRRZGmh+AzSRIl+UKsgzPF77y1W10GukW8EWlcXtVYVkOIpYA/rkGnAuBL58fb N+GtQ5DeIDbYC/w0aZWkegRxgr4ZCMo9KoY3L08PoeRX3V4SeWSAuPEVRpi6NkCgDo+kyP G28GA/Qyi1EtR5C1m/uRiycddewEUpSeLv2ImFI0lYptl/2A7Zimsc/C9+88Ss5b3zI6TF FqRqI3iO9EdzWsD2qbl92CnzjSTM3gtWst/XyCHR8G/KWx0b0s+50TLI7U28EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551237; a=rsa-sha256; cv=none; b=sTMTDtlgDCZMa2jwMTPGXD5Jhw0euUFpqrOwcmjaJ8AuNHIiHA5k+JapI85fsX55kPR3JC imqoGVUa0Gc/WSlxSvOT4hx8scnjIlCgnAqUAZ1FHp6kv2ZT46xYB0VBl+elN30Z7v1m4n 5YY0LLhsKxXgTLTk21Qhbcjq0jyNYEeXNyGToOzGz7VOcIb9chDwxAd8uEzwLhg02zIMpa eGYKNDqNHPRFJ25Sl/zYgaA7otpfqLCseZ61EW0T0vtm9m6sHURZRjt5BWdQ9oSSlihLPU O3EXtDTvzzIw+lq0hkTGTJlV+rMjJopd0fX7j97t6ZtUibLfpmwyIC8PagB0IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vEhQ8M/VVVATLh2DXY8UERgCU3BS3vCRSM+dpZEhOT4=; b=eJVx8+NgBlkxM3qBslmvJyk8ok4JAhqpKgq5k2UuIYaaCe4oJ4zKvyeQu1gWI+ROuKvV0g Ku5UjGySRQ+nk5N9dkzz//7FKnX+8x6DoPPw3H/yIAq/xNgOYYpkKEi1sYWhxKeRedC7+X miJBONM/E3ETtgeQqTHT8wW+far1hx2ieEy2L7QlYinh/XQoW2YDXpMDifCZd7qLeaeIEm 6espapO00WV4zANlweKsP7wShh9ghFohMV0mFsjmlFlhtZXh4idRxr1mr+sNFsDkFPLQmi 0bUkjgqgAnFZ31+v/MTZB7rELwwkY0maR7nglwfuCky8Wkklxs0H6TJp6EqDtA== 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 4WZk9K53HNz12l6; Thu, 1 Aug 2024 22:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRH7b026713; Thu, 1 Aug 2024 22:27:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRHXg026710; Thu, 1 Aug 2024 22:27:17 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:17 GMT Message-Id: <202408012227.471MRHXg026710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 9c67525fc362 - stable/14 - LinuxKPI: Add ms_to_ktime List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9c67525fc36260e5ada6902a96c81bb36805e395 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=9c67525fc36260e5ada6902a96c81bb36805e395 commit 9c67525fc36260e5ada6902a96c81bb36805e395 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:37 +0000 LinuxKPI: Add ms_to_ktime Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit aafe4126f7942daef5b7d522bd4fafc5deddb0bf) --- sys/compat/linuxkpi/common/include/linux/ktime.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h index b13c7182bc61..53c2abd64fc6 100644 --- a/sys/compat/linuxkpi/common/include/linux/ktime.h +++ b/sys/compat/linuxkpi/common/include/linux/ktime.h @@ -69,6 +69,12 @@ ktime_to_ms(ktime_t kt) return (ktime_divns(kt, NSEC_PER_MSEC)); } +static inline ktime_t +ms_to_ktime(uint64_t ms) +{ + return (ms * NSEC_PER_MSEC); +} + static inline struct timeval ktime_to_timeval(ktime_t kt) { From nobody Thu Aug 1 22:27:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9M1ctlz5RYyw; Thu, 01 Aug 2024 22:27:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9L6QwJz4YGh; Thu, 1 Aug 2024 22:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fvw/L8ZQc8tbjkbEK+qeE8+9obEbRkmv0n1cBv18pa4=; b=sYDvSRPsQOAHLfiV/de0r1G3a4CZKaaGdBeltGRbIDW6G3uMPgFlH8Sceg0DZr+HWRgRwh pikA2EN3o2/cNQDrFuST0zszyO+68W+XihXFOYo2UYkIrok+whM9pxm6EhsU0xhbOknHfo QbBBJIkySkSdA6At/ig483kUqzB1RzL4r5wpUz39s6mvBHsbLZvrrDLzljIMHgrSdri2Ih A2AFkq/Eb0WfkiNh+opI3R50q+lgaRgt71jxSvprAxVe7RehOqKeSIdsS1bYPf2Ro2P8UU qWIJNMP25BxZ2PqdrA/KeyazkQ/k65XbrZ0cXrnni2t+e6CWHcOmaUOWBgjm0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551238; a=rsa-sha256; cv=none; b=MwOHV4725AUXpzTj7uOTpNSHsUn3V9v5PnYfkyAOdJP1fZTRx6ctFPh/aYqHl+QRY1sxVk 7k0jaSEHX+SDYlMD53BO8vtUDroGBFo66K+68QEGqppvs6Mr970T9292J/ZWEQmJ0T3i68 B++vc3xo8qKzD18cjBJSluQJgdgpmIEaW3U7ZFq7RAR/HOLedBYvMy7kM1LmDbVZu0VQ6u /+8h143fQNNqI993D7ylsgOnnXmQ2oyP2aURpYGYdrUl+Km78pZSX/gVdUFFxmkI+xFfx0 PFIivUzhAdmw+4JPFGJqLwCswFDWLgTB9QnsqdeonPiBUu3TyvfaQHlmIxl7KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fvw/L8ZQc8tbjkbEK+qeE8+9obEbRkmv0n1cBv18pa4=; b=lSQR7koaDfSNm//xmx8Uh5xubGDFPmsq1sTlebzL/s7vtTlNG4rYnvl2sUOKNf+AUJ4JA0 4KGN+gLME0XgT+bAsL+2ks/3yYxQlz1QBcq5pf0BUx0ZqaY0YbLzicuzd/nuFjwnEbVtrz Ug2JiJNojS/2JqF96nvxxC35415s7v34Rl6jObtI3dT6hXfLmTCQjig4LNKdV+xFhzL/wU vAZ3wlZ38NBAC7A8sv6CIRCjFe1uSuz6kre/+1iJVPdUf/1y5r+4uhzc1WJSCcLgU8Xq3M xKiZk6+FlL7c0JFGt1Xtx9zixoFGGSE0mC8daH0DnvkECInOCersv9ulFTwtoA== 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 4WZk9L5jstz12nl; Thu, 1 Aug 2024 22:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRIXD026755; Thu, 1 Aug 2024 22:27:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRIgW026752; Thu, 1 Aug 2024 22:27:18 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:18 GMT Message-Id: <202408012227.471MRIgW026752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 9319e47c1ab5 - stable/14 - LinuxKPI: Add strnchr function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9319e47c1ab562d577d4359599aecb80a3dd7dbf Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=9319e47c1ab562d577d4359599aecb80a3dd7dbf commit 9319e47c1ab562d577d4359599aecb80a3dd7dbf Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:37 +0000 LinuxKPI: Add strnchr function strnchr() finds a character in a length limited string. Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 month (cherry picked from commit 19703887666da09c79c571bc78f0923bae62be91) --- sys/compat/linuxkpi/common/include/linux/string.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 9302c95e8636..1fae23ad902a 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -226,6 +226,21 @@ strscpy_pad(char* dst, const char* src, size_t len) return (strscpy(dst, src, len)); } +static inline char * +strnchr(const char *cp, size_t n, int ch) +{ + char *p; + + for (p = __DECONST(char *, cp); n--; ++p) { + if (*p == ch) + return (p); + if (*p == '\0') + break; + } + + return (NULL); +} + static inline void * memset32(uint32_t *b, uint32_t c, size_t len) { From nobody Thu Aug 1 22:27:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9N228Gz5RZ6n; Thu, 01 Aug 2024 22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9N0Vnyz4YS5; Thu, 1 Aug 2024 22: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=1722551240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rQXUMEj3fmkLhJ+vxn62Fbif4U+r48G/RlcaIQh13wQ=; b=GvjkgZ8HKTdwWs1aiQ8uYB+ce79o22EdnvBTDujqMleWcqbZ1zdMHZhUUZMWf82Z21wcDg duza163AgHbs+no6vZryhheCVwoEJhVQtvNA1M0SLo6ofvDgRNezv1RNUWD/Z2+tcsax/J BRcgOuCNQQEbkIHzWhljY++flv916pcH1M2IyNo+F6hiCz/BqiIo1vUWDVxWxLIYthGpxX F/qbP9L7PiCWzvKFDkwxdGnXTJLhUkWJA7aCZnpCAQ8J0dI6IbFRbHb9zV144M4Pk70UsJ uzUrNDWFRbEvVeBovA2yFhJAmAlhNQRzwtrsWoTQ3e2CFpH4MOj1tHo64yvOJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551240; a=rsa-sha256; cv=none; b=LIRL5Q7uZbYJZvqD/WRXiGoJM475k9vatVaBCUm9NUtuVHo1nxi7GOt0Mwtbux8Xr+MxoF wPUi49NzpDTzP9qjzXxgJenpTt2x5leqQh0d3QAKRvRuCtprc76eK8q0SnES14dXWBg5cC q4ptFFNOoNzF0a3RwXjvYt4OEmHepWStBNTZC/I0uSN+7FRqsBUC24JIelw+aMVnOvhzsU +/Ssa3zrL/m6Ksaacdc+CfYVsc6UD53D6WZeXsX92w797cs9VtvD54ItQHuRPa8V5D8Y9q BKgdxTPDge3BOeeB175hPasbFhrDc6MZHf+16Oemx1ZhbTBi5FZzaRiSjPLCvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rQXUMEj3fmkLhJ+vxn62Fbif4U+r48G/RlcaIQh13wQ=; b=b0nLVZkwxUazFPwFZ/VTOXTe9mEMiAa8TF1w0Yn5waAwTmyhOaABVGS12FGjF+ynHOaxZx DjgqqIHXL8225eKsCCh2kX4S0mC/VR/THrsas8iqIH9SKinOPxvxB/oy0F4BBH3hbzIIpV M4ePzYmodmb0bWulzMmCdGK+ZdVsT3ERfekWsbn0t0X2e9ocZbiEJdUCIpoAL/STcylEXs uXh2Y2Eqf2LnvKIBEg+RN192ny3URPGnpR2nDuM13Z4HgAjxUdKDwhS/LwSuvAR+ggc+hr jiPgoXxmzLpLS0uc9p2337XV/M79VSrCpBvQjyHrvGOzfoWmGG+HSnrOncCdaA== 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 4WZk9M71z4z12tF; Thu, 1 Aug 2024 22:27:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRJvk026800; Thu, 1 Aug 2024 22:27:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRJMA026797; Thu, 1 Aug 2024 22:27:19 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:19 GMT Message-Id: <202408012227.471MRJMA026797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 265b5c165756 - stable/14 - LinuxKPI: Move [SU](8|16|32|64)_(MAX|MIN) defines to linux/limits.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 265b5c165756c09d044e3239ca83a9857ebfb27b Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=265b5c165756c09d044e3239ca83a9857ebfb27b commit 265b5c165756c09d044e3239ca83a9857ebfb27b Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:37 +0000 LinuxKPI: Move [SU](8|16|32|64)_(MAX|MIN) defines to linux/limits.h Some source files get them from linux/limits.h directly rather than from linux/kernel.h. While here replace Linux constant values with sys/stdint.h provided ones. Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 8cfd1dd821bd8102dd91971c6ac88a64e25057d1) --- sys/compat/linuxkpi/common/include/linux/kernel.h | 14 +------ sys/compat/linuxkpi/common/include/linux/limits.h | 47 +++++++++++++++++++++++ sys/compat/linuxkpi/dummy/include/linux/limits.h | 0 3 files changed, 48 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index c8fbacedc561..ab264d3896de 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -71,19 +72,6 @@ #define KERN_INFO "<6>" #define KERN_DEBUG "<7>" -#define U8_MAX ((u8)~0U) -#define S8_MAX ((s8)(U8_MAX >> 1)) -#define S8_MIN ((s8)(-S8_MAX - 1)) -#define U16_MAX ((u16)~0U) -#define S16_MAX ((s16)(U16_MAX >> 1)) -#define S16_MIN ((s16)(-S16_MAX - 1)) -#define U32_MAX ((u32)~0U) -#define S32_MAX ((s32)(U32_MAX >> 1)) -#define S32_MIN ((s32)(-S32_MAX - 1)) -#define U64_MAX ((u64)~0ULL) -#define S64_MAX ((s64)(U64_MAX >> 1)) -#define S64_MIN ((s64)(-S64_MAX - 1)) - #define S8_C(x) x #define U8_C(x) x ## U #define S16_C(x) x diff --git a/sys/compat/linuxkpi/common/include/linux/limits.h b/sys/compat/linuxkpi/common/include/linux/limits.h new file mode 100644 index 000000000000..716366033bb3 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/limits.h @@ -0,0 +1,47 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Serenity Cyber Security, LLC. + * + * 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 _LINUXKPI_LINUX_LIMITS_H +#define _LINUXKPI_LINUX_LIMITS_H + +#include +#include + +#define U8_MAX UINT8_MAX +#define S8_MAX INT8_MAX +#define S8_MIN INT8_MIN +#define U16_MAX UINT16_MAX +#define S16_MAX INT16_MAX +#define S16_MIN INT16_MIN +#define U32_MAX UINT32_MAX +#define S32_MAX INT32_MAX +#define S32_MIN INT32_MIN +#define U64_MAX UINT64_MAX +#define S64_MAX INT64_MAX +#define S64_MIN INT64_MIN + +#endif diff --git a/sys/compat/linuxkpi/dummy/include/linux/limits.h b/sys/compat/linuxkpi/dummy/include/linux/limits.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Thu Aug 1 22:27:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9P2x0Nz5RZTt; Thu, 01 Aug 2024 22:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9P15Bdz4YPw; Thu, 1 Aug 2024 22:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YcJA7DJICx0watMfoVOFpkyAie1kRaF9H7mJpqAf0UM=; b=pTkA2w2Xgh4yHtmOVuih5reoWVBK5esYoV0hLinbIZk8aKRReXXnRBSG5dFeTgO37fMlZl 7WHuwXASx2NZfAro/uSWkBGgMcNvO3wPEKJGIiB/ODGsC83S9I8S9uEQvTOktXgsE6Icg/ UT5R0V24vfVOf6ps5ncNCAZvF2uG9xynXFEJJWczXNDG6VQsmC0A91Ue5duuMGxpimT05z rUhkncQ89y5oueMB6uPtnbdw3N9B/7024QyCjv8VTcDrmlELEoIN1K3suTVJOdsVbILdJa nJX0u04/KdvL9kNhBMgigX0qD0L8HOvtFfPy0/bs43xkhTDUbqkBGeAi65Vv3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551241; a=rsa-sha256; cv=none; b=KccfA/XSYA9EGQ7UJHwVUclkrCdoSGc4cLvgUTDik9DdqVbqDJtfGydjVM8KR7+HD68dJs 2jzD1+1WHx5Q0c8OZavmA44iytlEMhGMai0gG/dP9obOK5nW/z8WffqG3Pp/X2J3727FC5 zCBIU0raMqgOhd3uVL4a7Ri1KqnMrXvI97RV4rYafGxT/BiE2c2qniIgtWSw4oE4vHFxSp o7U9gxK9RSau0ErQHeB6HRemZAp2E383Qnd7sBF/DvySPNUgOFLHKjLM5vYMVPr5/LeHDU kQKNSbmcvx0dnb61y2VTYxrPWs+6QdmkdJq0dqsE4i13IXmDiLpZ9HeV5C3yTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YcJA7DJICx0watMfoVOFpkyAie1kRaF9H7mJpqAf0UM=; b=ibtNgEIJTlIB7FJv7wIgpg0H8M13ZbR2wLtt6t3Sy+AR09N5j7Aqaku72BVXczt0OUl6/7 ckZagH8DvT/0uEOi2d87pjKbQLMRifesAFWzVkxQpvgUNtGaH58ws9/t8BEtCvMiMWYhHB 0CZaxwEpiEGeHeJ4mHLVovvFRCli6wcG7Brl20SHP3T97yw8HTbEuSD28CUmt5f/QFLBAH EpJsfEQ1R9B8+WQyaJp3haV3fVFJgQXh/kSeTJlclaa1b9rm0HZ+nZsXz5HQ76JRqZap3g nkrWyCjHHkn/jt0KDVUoqX5Mei+Qrp2GZi7KYsYTyTUIeVZI7Gi51YKLGu4oDA== 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 4WZk9P0g3pz13Cr; Thu, 1 Aug 2024 22:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRL94026839; Thu, 1 Aug 2024 22:27:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRLhL026836; Thu, 1 Aug 2024 22:27:21 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:21 GMT Message-Id: <202408012227.471MRLhL026836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: e180ccb095a9 - stable/14 - LinuxKPI: Import vanilla linux/overflow.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e180ccb095a9ad6393946b2f8e20d66f61433f10 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e180ccb095a9ad6393946b2f8e20d66f61433f10 commit e180ccb095a9ad6393946b2f8e20d66f61433f10 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Import vanilla linux/overflow.h It is dual-licensed (GPLv2 & MIT) and self-contained header file. No need to reimplement it. Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 3208d4ad2b8320a24af4a8293f7fd3ef9c35caa6) --- .../linuxkpi/common/include/linux/compiler.h | 3 + sys/compat/linuxkpi/common/include/linux/device.h | 1 + sys/compat/linuxkpi/common/include/linux/kernel.h | 29 -- sys/compat/linuxkpi/common/include/linux/mm.h | 1 + .../linuxkpi/common/include/linux/overflow.h | 392 ++++++++++++++++++--- sys/compat/linuxkpi/common/include/linux/string.h | 1 + sys/compat/linuxkpi/common/include/linux/vmalloc.h | 1 + 7 files changed, 352 insertions(+), 76 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 59c7d3cc04e7..d59e6faed12d 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -121,4 +121,7 @@ #define sizeof_field(_s, _m) sizeof(((_s *)0)->_m) +#define is_signed_type(t) ((t)-1 < (t)1) +#define is_unsigned_type(t) ((t)-1 > (t)1) + #endif /* _LINUXKPI_LINUX_COMPILER_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 4ac041298ab7..770c5c334c9a 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -45,6 +45,7 @@ #include #include #include +#include #include /* via linux/dev_printk.h */ #include #include diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index ab264d3896de..254b7729b96c 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -594,12 +594,6 @@ linux_ratelimited(linux_ratelimit_t *rl) return (ppsratecheck(&rl->lasttime, &rl->counter, 1)); } -#define struct_size(ptr, field, num) ({ \ - const size_t __size = offsetof(__typeof(*(ptr)), field); \ - const size_t __max = (SIZE_MAX - __size) / sizeof((ptr)->field[0]); \ - ((num) > __max) ? SIZE_MAX : (__size + sizeof((ptr)->field[0]) * (num)); \ -}) - #define __is_constexpr(x) \ __builtin_constant_p(x) @@ -609,29 +603,6 @@ linux_ratelimited(linux_ratelimit_t *rl) */ #define is_signed(datatype) (((datatype)-1 / (datatype)2) == (datatype)0) -/* - * The type_max() macro below returns the maxium positive value the - * passed data type can hold. - */ -#define type_max(datatype) ( \ - (sizeof(datatype) >= 8) ? (is_signed(datatype) ? INT64_MAX : UINT64_MAX) : \ - (sizeof(datatype) >= 4) ? (is_signed(datatype) ? INT32_MAX : UINT32_MAX) : \ - (sizeof(datatype) >= 2) ? (is_signed(datatype) ? INT16_MAX : UINT16_MAX) : \ - (is_signed(datatype) ? INT8_MAX : UINT8_MAX) \ -) - -/* - * The type_min() macro below returns the minimum value the passed - * data type can hold. For unsigned types the minimum value is always - * zero. For signed types it may vary. - */ -#define type_min(datatype) ( \ - (sizeof(datatype) >= 8) ? (is_signed(datatype) ? INT64_MIN : 0) : \ - (sizeof(datatype) >= 4) ? (is_signed(datatype) ? INT32_MIN : 0) : \ - (sizeof(datatype) >= 2) ? (is_signed(datatype) ? INT16_MIN : 0) : \ - (is_signed(datatype) ? INT8_MIN : 0) \ -) - #define TAINT_WARN 0 #define test_taint(x) (0) #define add_taint(x,y) do { \ diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 8c50a2bbb3bc..1356d64dde28 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include diff --git a/sys/compat/linuxkpi/common/include/linux/overflow.h b/sys/compat/linuxkpi/common/include/linux/overflow.h index bb9ac5bc5ffd..9ba9b9500f11 100644 --- a/sys/compat/linuxkpi/common/include/linux/overflow.h +++ b/sys/compat/linuxkpi/common/include/linux/overflow.h @@ -1,51 +1,349 @@ -/*- - * Copyright (c) 2020 The FreeBSD Foundation - * - * This software was developed by Emmanuel Vadot under sponsorship - * from the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef __LINUXKPI_LINUX_OVERFLOW_H__ -#define __LINUXKPI_LINUX_OVERFLOW_H__ - -#include -#include - -#define check_add_overflow(a, b, c) \ - __builtin_add_overflow(a, b, c) - -#define check_mul_overflow(a, b, c) \ - __builtin_mul_overflow(a, b, c) - -static inline size_t -array_size(size_t x, size_t y) +/* SPDX-License-Identifier: GPL-2.0 OR MIT */ +#ifndef _LINUXKPI_LINUX_OVERFLOW_H +#define _LINUXKPI_LINUX_OVERFLOW_H + +#include +#include +#ifdef __linux__ +#include +#endif + +/* + * We need to compute the minimum and maximum values representable in a given + * type. These macros may also be useful elsewhere. It would seem more obvious + * to do something like: + * + * #define type_min(T) (T)(is_signed_type(T) ? (T)1 << (8*sizeof(T)-1) : 0) + * #define type_max(T) (T)(is_signed_type(T) ? ((T)1 << (8*sizeof(T)-1)) - 1 : ~(T)0) + * + * Unfortunately, the middle expressions, strictly speaking, have + * undefined behaviour, and at least some versions of gcc warn about + * the type_max expression (but not if -fsanitize=undefined is in + * effect; in that case, the warning is deferred to runtime...). + * + * The slightly excessive casting in type_min is to make sure the + * macros also produce sensible values for the exotic type _Bool. [The + * overflow checkers only almost work for _Bool, but that's + * a-feature-not-a-bug, since people shouldn't be doing arithmetic on + * _Bools. Besides, the gcc builtins don't allow _Bool* as third + * argument.] + * + * Idea stolen from + * https://mail-index.netbsd.org/tech-misc/2007/02/05/0000.html - + * credit to Christian Biere. + */ +#define __type_half_max(type) ((type)1 << (8*sizeof(type) - 1 - is_signed_type(type))) +#define type_max(T) ((T)((__type_half_max(T) - 1) + __type_half_max(T))) +#define type_min(T) ((T)((T)-type_max(T)-(T)1)) + +/* + * Avoids triggering -Wtype-limits compilation warning, + * while using unsigned data types to check a < 0. + */ +#define is_non_negative(a) ((a) > 0 || (a) == 0) +#define is_negative(a) (!(is_non_negative(a))) + +/* + * Allows for effectively applying __must_check to a macro so we can have + * both the type-agnostic benefits of the macros while also being able to + * enforce that the return value is, in fact, checked. + */ +static inline bool __must_check __must_check_overflow(bool overflow) { - size_t retval; + return unlikely(overflow); +} + +/** + * check_add_overflow() - Calculate addition with overflow checking + * @a: first addend + * @b: second addend + * @d: pointer to store sum + * + * Returns 0 on success. + * + * *@d holds the results of the attempted addition, but is not considered + * "safe for use" on a non-zero return value, which indicates that the + * sum has overflowed or been truncated. + */ +#define check_add_overflow(a, b, d) \ + __must_check_overflow(__builtin_add_overflow(a, b, d)) + +/** + * check_sub_overflow() - Calculate subtraction with overflow checking + * @a: minuend; value to subtract from + * @b: subtrahend; value to subtract from @a + * @d: pointer to store difference + * + * Returns 0 on success. + * + * *@d holds the results of the attempted subtraction, but is not considered + * "safe for use" on a non-zero return value, which indicates that the + * difference has underflowed or been truncated. + */ +#define check_sub_overflow(a, b, d) \ + __must_check_overflow(__builtin_sub_overflow(a, b, d)) + +/** + * check_mul_overflow() - Calculate multiplication with overflow checking + * @a: first factor + * @b: second factor + * @d: pointer to store product + * + * Returns 0 on success. + * + * *@d holds the results of the attempted multiplication, but is not + * considered "safe for use" on a non-zero return value, which indicates + * that the product has overflowed or been truncated. + */ +#define check_mul_overflow(a, b, d) \ + __must_check_overflow(__builtin_mul_overflow(a, b, d)) + +/** + * check_shl_overflow() - Calculate a left-shifted value and check overflow + * @a: Value to be shifted + * @s: How many bits left to shift + * @d: Pointer to where to store the result + * + * Computes *@d = (@a << @s) + * + * Returns true if '*@d' cannot hold the result or when '@a << @s' doesn't + * make sense. Example conditions: + * + * - '@a << @s' causes bits to be lost when stored in *@d. + * - '@s' is garbage (e.g. negative) or so large that the result of + * '@a << @s' is guaranteed to be 0. + * - '@a' is negative. + * - '@a << @s' sets the sign bit, if any, in '*@d'. + * + * '*@d' will hold the results of the attempted shift, but is not + * considered "safe for use" if true is returned. + */ +#define check_shl_overflow(a, s, d) __must_check_overflow(({ \ + typeof(a) _a = a; \ + typeof(s) _s = s; \ + typeof(d) _d = d; \ + u64 _a_full = _a; \ + unsigned int _to_shift = \ + is_non_negative(_s) && _s < 8 * sizeof(*d) ? _s : 0; \ + *_d = (_a_full << _to_shift); \ + (_to_shift != _s || is_negative(*_d) || is_negative(_a) || \ + (*_d >> _to_shift) != _a); \ +})) + +#define __overflows_type_constexpr(x, T) ( \ + is_unsigned_type(typeof(x)) ? \ + (x) > type_max(typeof(T)) : \ + is_unsigned_type(typeof(T)) ? \ + (x) < 0 || (x) > type_max(typeof(T)) : \ + (x) < type_min(typeof(T)) || (x) > type_max(typeof(T))) + +#define __overflows_type(x, T) ({ \ + typeof(T) v = 0; \ + check_add_overflow((x), v, &v); \ +}) + +/** + * overflows_type - helper for checking the overflows between value, variables, + * or data type + * + * @n: source constant value or variable to be checked + * @T: destination variable or data type proposed to store @x + * + * Compares the @x expression for whether or not it can safely fit in + * the storage of the type in @T. @x and @T can have different types. + * If @x is a constant expression, this will also resolve to a constant + * expression. + * + * Returns: true if overflow can occur, false otherwise. + */ +#define overflows_type(n, T) \ + __builtin_choose_expr(__is_constexpr(n), \ + __overflows_type_constexpr(n, T), \ + __overflows_type(n, T)) - if (__builtin_mul_overflow(x, y, &retval)) - retval = SIZE_MAX; - return (retval); +/** + * castable_to_type - like __same_type(), but also allows for casted literals + * + * @n: variable or constant value + * @T: variable or data type + * + * Unlike the __same_type() macro, this allows a constant value as the + * first argument. If this value would not overflow into an assignment + * of the second argument's type, it returns true. Otherwise, this falls + * back to __same_type(). + */ +#define castable_to_type(n, T) \ + __builtin_choose_expr(__is_constexpr(n), \ + !__overflows_type_constexpr(n, T), \ + __same_type(n, T)) + +/** + * size_mul() - Calculate size_t multiplication with saturation at SIZE_MAX + * @factor1: first factor + * @factor2: second factor + * + * Returns: calculate @factor1 * @factor2, both promoted to size_t, + * with any overflow causing the return value to be SIZE_MAX. The + * lvalue must be size_t to avoid implicit type conversion. + */ +static inline size_t __must_check size_mul(size_t factor1, size_t factor2) +{ + size_t bytes; + + if (check_mul_overflow(factor1, factor2, &bytes)) + return SIZE_MAX; + + return bytes; +} + +/** + * size_add() - Calculate size_t addition with saturation at SIZE_MAX + * @addend1: first addend + * @addend2: second addend + * + * Returns: calculate @addend1 + @addend2, both promoted to size_t, + * with any overflow causing the return value to be SIZE_MAX. The + * lvalue must be size_t to avoid implicit type conversion. + */ +static inline size_t __must_check size_add(size_t addend1, size_t addend2) +{ + size_t bytes; + + if (check_add_overflow(addend1, addend2, &bytes)) + return SIZE_MAX; + + return bytes; +} + +/** + * size_sub() - Calculate size_t subtraction with saturation at SIZE_MAX + * @minuend: value to subtract from + * @subtrahend: value to subtract from @minuend + * + * Returns: calculate @minuend - @subtrahend, both promoted to size_t, + * with any overflow causing the return value to be SIZE_MAX. For + * composition with the size_add() and size_mul() helpers, neither + * argument may be SIZE_MAX (or the result with be forced to SIZE_MAX). + * The lvalue must be size_t to avoid implicit type conversion. + */ +static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend) +{ + size_t bytes; + + if (minuend == SIZE_MAX || subtrahend == SIZE_MAX || + check_sub_overflow(minuend, subtrahend, &bytes)) + return SIZE_MAX; + + return bytes; } -#endif /* __LINUXKPI_LINUX_OVERFLOW_H__ */ +/** + * array_size() - Calculate size of 2-dimensional array. + * @a: dimension one + * @b: dimension two + * + * Calculates size of 2-dimensional array: @a * @b. + * + * Returns: number of bytes needed to represent the array or SIZE_MAX on + * overflow. + */ +#define array_size(a, b) size_mul(a, b) + +/** + * array3_size() - Calculate size of 3-dimensional array. + * @a: dimension one + * @b: dimension two + * @c: dimension three + * + * Calculates size of 3-dimensional array: @a * @b * @c. + * + * Returns: number of bytes needed to represent the array or SIZE_MAX on + * overflow. + */ +#define array3_size(a, b, c) size_mul(size_mul(a, b), c) + +/** + * flex_array_size() - Calculate size of a flexible array member + * within an enclosing structure. + * @p: Pointer to the structure. + * @member: Name of the flexible array member. + * @count: Number of elements in the array. + * + * Calculates size of a flexible array of @count number of @member + * elements, at the end of structure @p. + * + * Return: number of bytes needed or SIZE_MAX on overflow. + */ +#define flex_array_size(p, member, count) \ + __builtin_choose_expr(__is_constexpr(count), \ + (count) * sizeof(*(p)->member) + __must_be_array((p)->member), \ + size_mul(count, sizeof(*(p)->member) + __must_be_array((p)->member))) + +/** + * struct_size() - Calculate size of structure with trailing flexible array. + * @p: Pointer to the structure. + * @member: Name of the array member. + * @count: Number of elements in the array. + * + * Calculates size of memory needed for structure of @p followed by an + * array of @count number of @member elements. + * + * Return: number of bytes needed or SIZE_MAX on overflow. + */ +#define struct_size(p, member, count) \ + __builtin_choose_expr(__is_constexpr(count), \ + sizeof(*(p)) + flex_array_size(p, member, count), \ + size_add(sizeof(*(p)), flex_array_size(p, member, count))) + +/** + * struct_size_t() - Calculate size of structure with trailing flexible array + * @type: structure type name. + * @member: Name of the array member. + * @count: Number of elements in the array. + * + * Calculates size of memory needed for structure @type followed by an + * array of @count number of @member elements. Prefer using struct_size() + * when possible instead, to keep calculations associated with a specific + * instance variable of type @type. + * + * Return: number of bytes needed or SIZE_MAX on overflow. + */ +#define struct_size_t(type, member, count) \ + struct_size((type *)NULL, member, count) + +/** + * _DEFINE_FLEX() - helper macro for DEFINE_FLEX() family. + * Enables caller macro to pass (different) initializer. + * + * @type: structure type name, including "struct" keyword. + * @name: Name for a variable to define. + * @member: Name of the array member. + * @count: Number of elements in the array; must be compile-time const. + * @initializer: initializer expression (could be empty for no init). + */ +#define _DEFINE_FLEX(type, name, member, count, initializer) \ + _Static_assert(__builtin_constant_p(count), \ + "onstack flex array members require compile-time const count"); \ + union { \ + u8 bytes[struct_size_t(type, member, count)]; \ + type obj; \ + } name##_u initializer; \ + type *name = (type *)&name##_u + +/** + * DEFINE_FLEX() - Define an on-stack instance of structure with a trailing + * flexible array member. + * + * @type: structure type name, including "struct" keyword. + * @name: Name for a variable to define. + * @member: Name of the array member. + * @count: Number of elements in the array; must be compile-time const. + * + * Define a zeroed, on-stack, instance of @type structure with a trailing + * flexible array member. + * Use __struct_size(@name) to get compile-time size of it afterwards. + */ +#define DEFINE_FLEX(type, name, member, count) \ + _DEFINE_FLEX(type, name, member, count, = {}) + +#endif /* _LINUXKPI_LINUX_OVERFLOW_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 1fae23ad902a..32470312b78b 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -37,6 +37,7 @@ #include #include #include /* for BITS_PER_LONG */ +#include #include #include diff --git a/sys/compat/linuxkpi/common/include/linux/vmalloc.h b/sys/compat/linuxkpi/common/include/linux/vmalloc.h index 0a5cf0d409bf..00650a2df9b6 100644 --- a/sys/compat/linuxkpi/common/include/linux/vmalloc.h +++ b/sys/compat/linuxkpi/common/include/linux/vmalloc.h @@ -29,6 +29,7 @@ #ifndef _LINUXKPI_LINUX_VMALLOC_H_ #define _LINUXKPI_LINUX_VMALLOC_H_ +#include #include #define VM_MAP 0x0000 From nobody Thu Aug 1 22:27:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9Q3X27z5RZ6t; Thu, 01 Aug 2024 22:27:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9Q1dBfz4YF2; Thu, 1 Aug 2024 22:27:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4mc97po1HKOirXJ4BWM8vn8Lcwr6yV8kqka5U+4quPg=; b=Rr0PZd8tdZeLdplkKj+F0qx9qRAXDOlcBeTNX8nJu+VcXKtc7sNEnXFVdUMsLD1pVcy7u1 Mvv3+Kmhh1kiI1Wh3g34GpUY711cwAB2neBqVypFOh1KZk+tWXAvSg0Ggex50ToeyMzy4f X/+k+1GobfsAOl68r8lI1HtmgEg36QV1fcctSmzqRS3vTETIAPdZSy+AYipQurpW4FKU+b q2Bgd1z9dSRtSpWImmoJVFfMzN+8Wqq8P5Jlc1ivLo/cwulb6BvXuJu0KErDOSQm1ieAoI O6jD8PM6RmlrSBJlzhzeWYKrCFT9cq9IBG9em/J3oep2xjOQdGhC8vbKk2qvzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551242; a=rsa-sha256; cv=none; b=wPdRFYcTTjETJBPGgAQzeBvEG3Hx1FLD8IxNG31NpWbrKKiM7Vei5BN9afXNYbXo5Hz4sE UDSJwA8q/Ek/GnaWA4FJAoalIabkwrSLsOB+CEf1yXbIQGC6+TADjcQz3rrpGOlPZ5utzz YQ+cWQShLIzAm5NyesA8BYx8CkzWxpsrsPREvA81jgyEpwedwVCcTh9GuZa/5YR3oQmZWW C7VP0t6sv8j0la+HQAOr8u6TcVkDfp7X8Hbbp9gqT4zQA0yheCqxCo20lHg6d/WcLNDiTY CIHGGg63GMeXrpOSuZShS4yXM3zT1NCzn0x35NHIyMoqAESeRFkl4+zPnHoHxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4mc97po1HKOirXJ4BWM8vn8Lcwr6yV8kqka5U+4quPg=; b=aZN5RoBTKuLmN5y/ycfEoZBtZuEZ3Hxz9fQuyZjtlQncoJEBeuc/HIATmV03A7CwJv4+j8 Cg9g45A3ctkt59MixBo+3RvATfs4tb5y/iDSyoMDeuuchZr+Vvs3xpqcu1ACrQChZylfE3 2DiDTDacChOOUGhLA3eMqsXxjDMufkwK1YpgmjdIRCMIBGlddihTizjX8o+12DYsJHfozm xLu42PL8QspRZ9VVr42dejwe3iZoIVXwxhWI/7yAGxfCx+1485ma8WYEdFtwkhAMNlDsNz r4Dfe+JJeN4igMYOsuUo2jxk54/8WtpoZGr6aojKjiJF5gD9ykol84ErnVlf2w== 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 4WZk9Q1DcGz13Cs; Thu, 1 Aug 2024 22:27:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRMNZ026884; Thu, 1 Aug 2024 22:27:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRM71026881; Thu, 1 Aug 2024 22:27:22 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:22 GMT Message-Id: <202408012227.471MRM71026881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5496fab6a2e8 - stable/14 - LinuxKPI: Add VM_ACCESS_FLAGS define to linux/mm.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5496fab6a2e87b2fde3410093308fe6e3e1b9518 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5496fab6a2e87b2fde3410093308fe6e3e1b9518 commit 5496fab6a2e87b2fde3410093308fe6e3e1b9518 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Add VM_ACCESS_FLAGS define to linux/mm.h VM_ACCESS_FLAGS is a basic access permission flags. Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 38c276a43f2d55e19ff6bd15ab5730315d41e3a8) --- sys/compat/linuxkpi/common/include/linux/mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 1356d64dde28..1a7bae27fa8b 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -56,6 +56,8 @@ CTASSERT((VM_PROT_ALL & -(1 << 8)) == 0); #define VM_WRITE VM_PROT_WRITE #define VM_EXEC VM_PROT_EXECUTE +#define VM_ACCESS_FLAGS (VM_READ | VM_WRITE | VM_EXEC) + #define VM_PFNINTERNAL (1 << 8) /* FreeBSD private flag to vm_insert_pfn() */ #define VM_MIXEDMAP (1 << 9) #define VM_NORESERVE (1 << 10) From nobody Thu Aug 1 22:27:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9R5XK3z5RZ4d; Thu, 01 Aug 2024 22:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9R2Spzz4Yb2; Thu, 1 Aug 2024 22:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hu2k/QPGad3Bn/fo9WF7f4dpj8K4o5b8NrqfevrK600=; b=Ln3LPMAfL/ZWgE8YdYCVntw3SRmCDEbz08D6i+wmyNwWrzH7euPb4jnBJ7iniU2EdBr6bt mevSBvvAXRmX6n6rX/MbaO92Qw/6vPaIYV7EqjREzXrs8iLk927yxWYMN3KQ/+UMy6y1pt 5HaSlj23X+Rr6U+m7z8SL5+5w4HouWyOgJA4rBYmyV5DvoNNrp+jYtg5n1w7O1Gj+liZTD Q92dL9AZniaJbOseTJg5JCjOf65uHLaDd35wwp5GjAY0QaBh7FhfDJiqLR0f1aRScSWIt9 nVG++CNOcAVIFDAEP9iY79i5DJ0Dlq2UmjEZ5H+cBeWUeja1ahwXs6RpwkV6Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551243; a=rsa-sha256; cv=none; b=sYwa+fQX9nQ94tUEtrqaSrSeE3jIRx90kvwcOJxR5jQiDEYFn/8jqG1GIrUxAEw0f9anPB tWOOpLesyKp98Y6XxG2azfjy4sxvsdRrvN0yuhU6RpI9uu1za/eR+7otRR9hiLRyKzfNd0 5X/KRhcdsaq3KoSbkl9KC9OwnkY2+Pdfl/nlZ/tAj4nxB9s1dWz3ahWDbSTvRYFlIguZO2 DKRvN6m6U6IuD1ueFau81A/6CAOzKW6X6hrop1NSTmJMbEA69bPb8oD6qyEtXtDgg6Y6d8 6ec3m2miVj1nneUbA0cKLlrayjLBcjaNlQSksiPJ9D3gM08z1tNJgfnmpotTRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hu2k/QPGad3Bn/fo9WF7f4dpj8K4o5b8NrqfevrK600=; b=Vf0z5FMsddiQq6rhkbF9KDQ9J5xe+tLxHECHnNyiaZHiEignWrl+UACUOvmfIzj2q40/Nh 5tRTeGIstf+I8KD4SWt2AbkCpjFQTLLlArcCJxaTV5donfZox15IFSUHN/YMoy7nQNzW0J DIS9bXrkU/cRJAgvHA//otqc5gAVkTCaBCDwu5rJeLK4QiwHyePYA554X1GE1G6p6nEh33 Mydzk38KTPHGE5xN2VSd8p4aytTQCvzKZVF+i/iVKJSY9Er4TK21Uyh3J0CL5WmJxezz+k ADnKdfgeXjV1aV/8wALZK/fUzpeZW6HQXdZiAXVbRq8r8hn63kHH9lKnjlcSeQ== 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 4WZk9R22S0z12tG; Thu, 1 Aug 2024 22:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRNvI026923; Thu, 1 Aug 2024 22:27:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRNsw026920; Thu, 1 Aug 2024 22:27:23 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:23 GMT Message-Id: <202408012227.471MRNsw026920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 4242e224e6b7 - stable/14 - LinuxKPI: Add get_random_u32_below function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4242e224e6b7d00020a9fcee9bc020d0816630df Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=4242e224e6b7d00020a9fcee9bc020d0816630df commit 4242e224e6b7d00020a9fcee9bc020d0816630df Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Add get_random_u32_below function get_random_u32_below returns a random integer in the interval [0, ceil), with uniform distribution. Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 9289c1f6f1514e714b17026c50ec09282f079cba) --- sys/compat/linuxkpi/common/include/linux/random.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/random.h b/sys/compat/linuxkpi/common/include/linux/random.h index e87d4412ea4e..808c5bc55974 100644 --- a/sys/compat/linuxkpi/common/include/linux/random.h +++ b/sys/compat/linuxkpi/common/include/linux/random.h @@ -96,6 +96,12 @@ get_random_u64(void) return (val); } +static inline uint32_t +get_random_u32_below(uint32_t max) +{ + return (arc4random_uniform(max)); +} + static __inline uint32_t prandom_u32(void) { From nobody Thu Aug 1 22:27:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9T4v6Kz5RZ74; Thu, 01 Aug 2024 22:27: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9T3mDGz4YVm; Thu, 1 Aug 2024 22:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjsSQxv1CtgI3nFHb5MEHienGpoSde8jFUKIVbR/f4M=; b=k10TMFFfUrfnkp1g+u7/eT01tnEltWOY66CR9RxmHzvDor4KmpQn9V1ZfZApCcJPOD1pbi DkdxhFXYbKgTuCX6XA7bL8u9lZAC62BV6AGijbqWBtXSF+1IL9fmeKd5ZXPHsLrQ47pggl DPWQKKW3cLqT6iSPrDMJSEbiEI7XEPNohvkL++HqMEMQTIgKvYFLRXP0gg9pvzfUAHG4vA wAZlnfQf5Py2nf25M1FhvPKF0y+MVteIj4YjfsHSXw4XB+ux6BaajpybiVXQjuok6Zkv3i iijd+srZk6kg4r5CmEb27RkOtrGs1o5SSn73mlRxyW0s+GVfKhCQIW42OkUWyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551245; a=rsa-sha256; cv=none; b=aLTWxA81hXAKPk/4i9sNv/efG7Vug1us/paRJRVfuGHd+GTYl6qnQ+J737G0z3B61uSmdv si0K0hNBlcnBLIpkOVK4z+QzpOsHrmrEg7GJmmqd4MITn1Uk7OxSBRuk8gF2j1K+E4jkhm TcQur2SjsVw4FUTbQ/MCYlUdfN14y1VYk6wmyBOQ70Qn7Bqj9MMYuxRvrpoEpydtL5fGpF QP4s2bYTWRklHSM82T7eJnrOjQvYgtB/G+NIST+IAI4rGQDed5rd6veees+IQmg0ThuELF DdahhPfnaZTS++mzpGG8u67XMKkwZZ3R0xHqBtUsG1Vxtd9x7ci6e3vXD+MY+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=1722551245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjsSQxv1CtgI3nFHb5MEHienGpoSde8jFUKIVbR/f4M=; b=wHJPkYLZW7cdEZnUdS5GxJVvVOT5LF/W4+9curgq7rl5GokRfZf2rxKUL4B/8lWj6GA6Qo vvBo83RMzXXs0SOcKbJgQXbegFq1osuT/WoC9bY+izTh4bhk/ikhyBwijCsbGsG6Vaq+ZL IS1oNJFqHBbe/z6jykXUxJVq4vlOWn5tw8XNBt7eVpql4lxg9vPfdN2AApMt9ZwdLuDtBN fwjB9mAOUN1rj+9PZLugp3g563qmOZffs8cL3i0ZBxpDJwDziTA+f6VzqNwIfxLUR65/S1 tBjaMvu9BqfGs5JQCc6rs1kGkNlDeodFx8n/QM3FDWfLz8WwIwBzlfbcY88saQ== 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 4WZk9T3Msjz13Ct; Thu, 1 Aug 2024 22:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRPb4027006; Thu, 1 Aug 2024 22:27:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRPnu027003; Thu, 1 Aug 2024 22:27:25 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:25 GMT Message-Id: <202408012227.471MRPnu027003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: b4fb139e286b - stable/14 - LinuxKPI: Add vm_flags_(clear|set) functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b4fb139e286baf742095716e8dabcbc3553eccb4 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b4fb139e286baf742095716e8dabcbc3553eccb4 commit b4fb139e286baf742095716e8dabcbc3553eccb4 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Add vm_flags_(clear|set) functions Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 06902a447934e855dc8f7eaf95b4235c684b264d) --- sys/compat/linuxkpi/common/include/linux/mm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 1a7bae27fa8b..0030cc6fb7a9 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -324,6 +324,18 @@ vm_get_page_prot(unsigned long vm_flags) return (vm_flags & VM_PROT_ALL); } +static inline void +vm_flags_set(struct vm_area_struct *vma, unsigned long flags) +{ + vma->vm_flags |= flags; +} + +static inline void +vm_flags_clear(struct vm_area_struct *vma, unsigned long flags) +{ + vma->vm_flags &= ~flags; +} + static inline struct page * vmalloc_to_page(const void *addr) { From nobody Thu Aug 1 22:27:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9S4YD8z5RZWf; Thu, 01 Aug 2024 22:27:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9S2ywsz4YSm; Thu, 1 Aug 2024 22:27:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pfW6qkN2/qeyGVsVLOXWIzt7eVsrXzaPz6Iq7qAOsjk=; b=kk7uLDnCtmuSri2aUYnTJVaSAeneNcH5uHpCHkXFI0thh6bECw9bYQUIrtHRepocf4/g7k LIz4cJBjFLDN+D829p+AF3bDdG0A73k612InSCb1DINOekjLtncKGSIhtBkbIi0yWeRNhl uxuxGEoLeP0L831Jkry/19L0H+pfl9aC9xNjDl7rumxHukXPzfhrSAfxYNlzE+hl0Am8vw BqFejQ46ZKipb3kf7zo0K4177uwWPXBaNE3DNJs1Q9r4dSd6REBKJUCF/VRAZLy1e8fgVR Y44mgg/66IpB5+Lz6/ny+09cXtTCFHxk03qJXCRyYhLfUJ2D/MXEYRjbzpLtPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551244; a=rsa-sha256; cv=none; b=QvBWGT3Z7+oGdVHTRDDbPwxgnsKrVmLK1rvMiGD5cI33Zvuuo/PpDkUwXfSj3U91oUW33j 3lXg/5UEK1fy7/wTFUBKN4ehH5dDJ+fK50MbhJxYobbjo9dy4yMYxQdUP19OIdFbx0Nkwr j0wnmTt6q3JlghGMKghw4a7hshq5xUHqQJY3597frortnaIxETfMoYOhXJy+TvaH1cnbQh PuLqOYXO0t0dAzFrkgyv6ENa1vNGtRmBkeLtercKdsim5juRMIX3X/u02RaWeq3Ik/YMaD RniBixrbBsJGRcVyEr3Sn5PdR43lrq6kcPfYdiqeBP3ER/Zy7I+v3QTJbFSJpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pfW6qkN2/qeyGVsVLOXWIzt7eVsrXzaPz6Iq7qAOsjk=; b=HdMY1bi9/3ItQ8gTHXdR8maqCeHR5bWQjU1wZ1lnQbjWrG4pWHiXNBfd+XthUE2o2EQe1N 8uBTJsJ4AogoU4fdgtLtorAm5mqdGprY0LeKvvnFjHATbnvZaCokYAAIOJZuQDI4opUYof mU4ie77g7oykPFaTJ42P/POWSYyYhY652y/QKAZaS/hv8YDs3V5Pjnim97VRS2jzR4MjE4 iHKf2+0Z8buT6mO25CNqXsLg5eN0L43wfVp9ZG0fPplAaPj0IwMR6lqEmruX5qtGnTCJkh QKHtX2Kolr9MyJ9W/NfYPytoTrzkd3unuUaZ5QJAvRlYhMj4T9t0IhwZwidOyA== 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 4WZk9S2ZSWz12l7; Thu, 1 Aug 2024 22:27:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRO5M026965; Thu, 1 Aug 2024 22:27:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRO8R026962; Thu, 1 Aug 2024 22:27:24 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:24 GMT Message-Id: <202408012227.471MRO8R026962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5ea6546660de - stable/14 - LinuxKPI: Improve timer_shutdown_sync List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5ea6546660def3b853208c3eee236a21d9a317f8 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5ea6546660def3b853208c3eee236a21d9a317f8 commit 5ea6546660def3b853208c3eee236a21d9a317f8 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Improve timer_shutdown_sync timer_shutdown_sync not only shutdowns a timer but prevents it rearming. Sponsored by: Serenity CyberSecurity, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 61fb195e8dd08d4b006a176c09682f061424cb95) --- sys/compat/linuxkpi/common/src/linux_compat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 894e233042e3..90d03d480089 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1920,6 +1920,10 @@ linux_timer_callback_wrapper(void *context) timer = context; + /* the timer is about to be shutdown permanently */ + if (timer->function == NULL) + return; + if (linux_set_current_flags(curthread, M_NOWAIT)) { /* try again later */ callout_reset(&timer->callout, 1, @@ -1992,6 +1996,7 @@ int timer_shutdown_sync(struct timer_list *timer) { + timer->function = NULL; return (del_timer_sync(timer)); } From nobody Thu Aug 1 22:27:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9V6V37z5RZWm; Thu, 01 Aug 2024 22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9V51D9z4Yh3; Thu, 1 Aug 2024 22: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=1722551246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ywo/f7ixMDoQotB3qHwJM8vB0bvbeZftaoM7NapL9kE=; b=yp7new59XIt0ffQCT2tsfoAe2P2E3SK0PnOdXllUC7gOxmQmkiWXQhOtb+KyLxWUl7TXnW IGHeBaJxxhHNJOLGUEa5JncnyS03VJ8/uVrck3jjQp1lRoTdGg+xa0LQD6Ebw8pH4ugxb4 JcW99ZpxKOFOb4eaDcL3YjUnRIAaFQtm7JLVYU9O2l8a6nC/3nvEOt+rTgml7gbVRwaNSI SjYFwMbtjCrjgXho2PIooYyMI2Xnf73pobjgVRlg9gsoFLBKt7RI1wlvtdbxkmkWpMoT4s iDg7ax0oVsK+m0aV/OverDGeYYFpWYnlBh7Jgwcu0J+KMLGcndwzxWCHBttlKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551246; a=rsa-sha256; cv=none; b=L7bttmysFNQFrgxA6FWwbO9gev2sDXva1ddk0hq27o6C1l6DOPyN5TmdzHVKEYvYnJ/rEQ UezfCG64wphzcrH/2b/nfxkEH95d+2Ti+zUnSVLdC5tMRjWYK39IlXyVPG4Amrq2AhYEZb JbGFVCwTr1h4qbEp12JVdrqDGmE1Po5JauPS+GgxLdlOzlUYMuN/0+VXnbBeFPdPWktgi+ ILYMpKUXxQIsiGpDn/NbBGu1Rby6YazwLuMenIzU/KM+KpyogJkhMAipJd9TAOIL/3CCRt frwqSGwlS6aN1DcLUf+ku7dCztSfkgmAaPno8+EA67T/qO7R0NSzgRxU5JZ6Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ywo/f7ixMDoQotB3qHwJM8vB0bvbeZftaoM7NapL9kE=; b=LcUUEeyUjx+SWMYqqER2AyHjfYP/L+wgYAt4V89rrLERjejlLGocc9SKp4i8HFymdlCYUv QlYT1cf8EyUuWV3Pks4AKsEUUOCXzkgSsBljC/TAAMjriL8n3dINed0ibEXz1H7YykwhUi SmeWr2M14cJnJMPnN8kXnDL8lO1nDqPXugbRDwge2XulMa+mC3W+gKClTcaUK74cpik3gA QU0xywnqBD6H4SzrmGq0yLjYM1AhcacRgYFDuAZD4IMmZiBFP5LGcYPQWEX2DUXvsEhVkk BsIWu4mGBLoky6JFrDseD7McpKNeQrbylflGdQO3sTJdq/hN/r8iu3x8S85bIg== 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 4WZk9V4cchz13BW; Thu, 1 Aug 2024 22:27:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRQpd027045; Thu, 1 Aug 2024 22:27:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRQK0027042; Thu, 1 Aug 2024 22:27:26 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:26 GMT Message-Id: <202408012227.471MRQK0027042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: fbb9ca960d8d - stable/14 - LinuxKPI: Add PTR_IF macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fbb9ca960d8d0282fac3f2b31649f3cecdc5bc11 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=fbb9ca960d8d0282fac3f2b31649f3cecdc5bc11 commit fbb9ca960d8d0282fac3f2b31649f3cecdc5bc11 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Add PTR_IF macro Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit e0eeeca8b83a17aeebc4da525e813699bf3fabc2) --- sys/compat/linuxkpi/common/include/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 254b7729b96c..26fc2b8a4862 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -133,6 +133,8 @@ extern int linuxkpi_warn_dump_stack; #define printk(...) printf(__VA_ARGS__) #define vprintk(f, a) vprintf(f, a) +#define PTR_IF(x, p) ((x) ? (p) : NULL) + #define asm __asm extern void linux_dump_stack(void); From nobody Thu Aug 1 22:27:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9X0PRtz5RZSM; Thu, 01 Aug 2024 22:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9W63Bqz4YcR; Thu, 1 Aug 2024 22:27:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UoBqu4K81dVqrjKwamunxEx4Rz0P771LP4IgQGpy5AM=; b=EgMInwHP9R+xfeJP5uhP06xZukAvW+9cm0LIU4+8s1xyzYjkPubfUJ6EAWXM1I5R2HLV2Z Q3t/AFvxzjIPB2VdMiix+RbJ8qSAxZaqoAQnpqZQs2l4rAPHDfatr1tO6hxTeLnLRA7qoB IPl/qWq8trs8OWeYtfowoFS/UFAHafLXQD/mn72uTLZ+cY2PTKu3Zaq7RJ6/+8CAq8TLIX GvnRkZWBiKNqbOQFtscY6WE0H8SYXRR22sfKuHdmTwIsZyFuJeSTN9NeJI4OloIFPa7RQJ hTtigxQtreFgxXAcSlv6aF/Pc+LSPyDtLMSff2Ih89UaHkPaMNSWA53ysQ6edg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551247; a=rsa-sha256; cv=none; b=vZzYTaM6/4XL29GJyVeMA3B5H7bT/lDbCvCOqqdjTHjtgsLK7DW5FFlgmXbvN8lphDkOMc PP1Z3lztC3kseiCkZmQcDvMR+C5/X39un9Xb+poFFCvaUK+Xass8dSv930UpNYJ1NHmATi SLitcptTdPr/Kzqjr9KUo9TJvozMYm88L8QyCyEVqnH8FxqmgezFJLBxleZz1FwyDMCewE Kor4Jv7KinzEZ2O2iEou5X0HmXmuKQPA4yhUuAcDe3Dg9Xxah3xSaOSwhrZMF3cglKLfHX qznLLJN+ZHdnNpSzeYb0KFq2AVYN05gviPvWFp75H3R4hBij1QO1iqPBr+EfEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UoBqu4K81dVqrjKwamunxEx4Rz0P771LP4IgQGpy5AM=; b=ThVUnypOy8U6Qg7XmXULL0r5dlcgSqkX+Y864+cSYq0hISuzqNkxPOivB7x2O3+9FwCC9G P7cHd6ySkYxj9xLNkyZ20ragjcUa543MAOLe5FOcRECkScY27oJ1lNQJEU/YflT8R3Z9ew 4VZ00pkD/m+pPWhuHqlt/wz4RkKnlu373mCICxESEDOT1inqdNMZBdrTH7muuVQl1HIpha 64gPUYFd5cCLbJ3iufLUpclCpQVBZYQbwkCeBlc4x5U8MtM/7PDudA5FxoS6LyKhUBa8Zc tuDtjvH7FxhsJz8KqxsJnb7RIFg79aRmu1m1OBL+cVlHsl2PbcZ0LsdXtPLCRg== 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 4WZk9W5ctQz12Jh; Thu, 1 Aug 2024 22:27:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRRSB027090; Thu, 1 Aug 2024 22:27:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRR9Y027087; Thu, 1 Aug 2024 22:27:27 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:27 GMT Message-Id: <202408012227.471MRR9Y027087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 33b5923a9d5a - stable/14 - LinuxKPI: Add the accelerator PCIe class List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 33b5923a9d5af18924e162d062328d65729b86bb Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=33b5923a9d5af18924e162d062328d65729b86bb commit 33b5923a9d5af18924e162d062328d65729b86bb Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Add the accelerator PCIe class Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit e8f59f4d31b243a6f296e819a5912ba63789ae32) --- sys/compat/linuxkpi/common/include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci_ids.h b/sys/compat/linuxkpi/common/include/linux/pci_ids.h index b52ecc525db6..2f02d6ad1c14 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci_ids.h +++ b/sys/compat/linuxkpi/common/include/linux/pci_ids.h @@ -39,6 +39,8 @@ #define PCI_BASE_CLASS_BRIDGE 0x06 #define PCI_CLASS_BRIDGE_ISA 0x0601 +#define PCI_CLASS_ACCELERATOR_PROCESSING 0x1200 + /* XXX We should really generate these and use them throughout the tree. */ From nobody Thu Aug 1 22:27:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9Y254Xz5RZV5; Thu, 01 Aug 2024 22:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9X6jb1z4YfY; Thu, 1 Aug 2024 22:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=37VpnetjxCpmAW2ZTOC4l/a11+D3aiILqx5itjzaaOs=; b=OJRMAAfkqp37pIfffbsd0qK/oZT7SMHbe1TKplnkjXZOicMUE7lEfIosNCV6Q0mLGL6gy9 V442K6GWg2jdOWG1E/akideDbVaDWNvo5YF9cwiNpf5VR3h/sBfgNbM+TuWleIuKFv0xA+ CTfgWan45yoRAROjGk+sSZAJqvurhJt2IjP9+pr3/yQAXUlcjhB3qZGwjSYFhPmCICO27s zAzCzhGiL1UErLf8bxSnnlFJUGP7UQXDM3CSh7uM9GlI71K7uXYwg8It7eSJFHkxiCL8pe H3OotnxGU/yQovorUtcHluVaO40QAR7IRQUTz16GPXBuetPGmOSPv1zDTJIkAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551248; a=rsa-sha256; cv=none; b=KCYLGxBTIkmANqOQMrz+S+8fOixvPXBWIJub7KNvfji4L72NQAYkpXnhMRAOfkUBoabazi /oUPHlT4B+0icZtPbGf7iNPHOksQkpxnwfm0bumRaNZ4065lxkCOw4S21uEGn/BtrOWd3w yX0Wty4KfP8ThBzLj4Ph8hKK+1g5JqWqvLiiGBFZ8C0/5LZohBDctV03wmmejyWGdEmus+ GddyCZ5Bk9QXD7+BxHPwq27xr5JZffrPkpmnjUZZuTCoCCpROKqVvZcpS7IGSL6uwqTDKL qcFBS3ewsMhYqR4EKhSI2JylxYyxy41WfnSYQ/wW7kR+4CcrcimCSWpe3EzCgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=37VpnetjxCpmAW2ZTOC4l/a11+D3aiILqx5itjzaaOs=; b=KSMlZRjP/uyyvg7DGzWQT4NAhcuS80FOn5IDzfzNQ59w02SldKVUYQRFf/InRBoWJZbmmE acOmSnaYf4r18kamR6GSEOczadtOCW1TQxMSBjxGM9z8ZlL2y06vbMstjM89bJ4wihFVBF FVflqlwext9s2D1bN62TFdAYfdiozGktD1+czVgoJaWpQ24Y5DGcIqf0V7qrxVNhI48Lap FTS0qCEgyrenNGb8ZdDnWMeCj4+rBlZ44QP4pINjUKJA3N48XPwAK4NGhHCmHcDyRdE8t2 MFSexEaIJSpoXAzPVlPemrtLHYEFvYGg6JiURk379mj+qZ8/frAjw0qCjkpMnQ== 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 4WZk9X6Khgz12Jj; Thu, 1 Aug 2024 22:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRSsO027135; Thu, 1 Aug 2024 22:27:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRSdH027132; Thu, 1 Aug 2024 22:27:28 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:28 GMT Message-Id: <202408012227.471MRSdH027132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: acfd6cea1f57 - stable/14 - LinuxKPI: Add pci_dev_id to linux/pci.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: acfd6cea1f570baf0ec866b42f9fe56de1ec1ea9 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=acfd6cea1f570baf0ec866b42f9fe56de1ec1ea9 commit acfd6cea1f570baf0ec866b42f9fe56de1ec1ea9 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Add pci_dev_id to linux/pci.h It returns bus/device/function number for given PCI device. Also add intermediate PCI_DEVID macro used in some drivers. Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit f1206503e5a0073f56710bfebb6e503dcf612536) --- sys/compat/linuxkpi/common/include/linux/pci.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 98ba160150f7..f8ee6c5600da 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -94,6 +94,7 @@ MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) #define PCI_FUNC(devfn) ((devfn) & 0x07) #define PCI_BUS_NUM(devfn) (((devfn) >> 8) & 0xff) +#define PCI_DEVID(bus, devfn) ((((uint16_t)(bus)) << 8) | (devfn)) #define PCI_VDEVICE(_vendor, _device) \ .vendor = PCI_VENDOR_ID_##_vendor, .device = (_device), \ @@ -386,6 +387,12 @@ dev_is_pci(struct device *dev) return (device_get_devclass(dev->bsddev) == devclass_find("pci")); } +static inline uint16_t +pci_dev_id(struct pci_dev *pdev) +{ + return (PCI_DEVID(pdev->bus->number, pdev->devfn)); +} + static inline int pci_resource_type(struct pci_dev *pdev, int bar) { From nobody Thu Aug 1 22:27:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9Z4BNVz5RZMm; Thu, 01 Aug 2024 22:27: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9Z0kDGz4Yfs; Thu, 1 Aug 2024 22:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8YrXVOK1Xj8oRj6os8o86jTeeCs82mKShpEs2gGp5lg=; b=byJJzXYem8a0kl37iaDZU3DWvatgzkiKjNMq5sBFL+aJrmKAmaWJx4K0dzfyfdAiZDVWoi z8uU3aTsUZyjvSnPIigJS9mhLlNhoqb8nuE81bwNZXqkr98y+06evuyywKvcDta+1GwILy uZ+Hl5fe9b+lyLASDPYXchPUqg+UVxOZ7r6d5rADgHzAGU4lTpjrnNRIL6+RFA4koUHHN2 u5+YxLCU8w1DYGXbceA1UlEguTWmhd1kCZ7lsiJUjZnnkYgsfdq1FBCAhfktOGV2N5LNBn y7nzZc7nwoSuo1+3h0H+SI7vqsw00y2jHG/MWPt10eSHeIpTHIrypQpuH2FxUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551250; a=rsa-sha256; cv=none; b=ltoUURq/bk2u73Pco0ZlsMLASu5W+42rwSmeWmk7NMW4UBzrkJwIYzZ8VXRtXMpS3ciEQc ob6eHcRYb0kYPaxbElV6xAdEqzPpiJWJL635iRF1AMlXc0ryBb80w6kJOa53+9Q5EV7t27 Eg+BUj3PJX2IS7UQAfEsKXite+/jss77EcbLi+RLqObWoMeDvoH44WbOfJANw7qoU4HW9A GN7XEunZfbxkGUwISb+EyymYU45LViBlcoNvlLEs8/LddKPyuJdxC3CuoJQGOMZFR6ZYrJ dySid/rcTFiJA/kfaDcW/Vizm3FJYIuyQa5Hst3QIMIs5fXhVXyg7duQ3JETxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8YrXVOK1Xj8oRj6os8o86jTeeCs82mKShpEs2gGp5lg=; b=mJUEcY286awu/90FFZ5LpvAGcHYQDAu/orTQsUdpIFxz7njQt57x6WvQbR7wFjP1utwOqn ANVUqLI1laBH91ueIE2DaNML6ykpiiPL9r1Uxa514DgpX8oDVssOlbvhMG96pQOsNXu0vx W2p08CnzW3ifug4LSqkCCYoP6heCGg8wFi0A4OofQC7gHMq5a8TqQ/jdPVZXwNt8jbrkax k+dfSt1SmB6o+E/Ny2PDQSaWiNp6TPwJU/5/JVS9jBpZaw1iOsVFSO0xthGU4H4dqGxX4H 4+oBA8nNLQQZBpNRVwfXr1lxJ7fq0IW+nYTK+uZ0ypaA7I/2QX/2APyQ4srgrg== 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 4WZk9Z0LM0z12Jk; Thu, 1 Aug 2024 22:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRTx1027188; Thu, 1 Aug 2024 22:27:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRTXo027185; Thu, 1 Aug 2024 22:27:29 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:29 GMT Message-Id: <202408012227.471MRTXo027185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 8ce07593a947 - stable/14 - LinuxKPI: Add ACPI_ID_LEN const to linux/mod_devicetable.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8ce07593a947d506b5e643129da730d6b2ca07b5 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=8ce07593a947d506b5e643129da730d6b2ca07b5 commit 8ce07593a947d506b5e643129da730d6b2ca07b5 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: Add ACPI_ID_LEN const to linux/mod_devicetable.h Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit f7ea333e2b20b5850d5be4eee1d26873111f47ff) --- sys/compat/linuxkpi/common/include/linux/mod_devicetable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h b/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h index 5becc12ef960..87bd6ec24bce 100644 --- a/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h +++ b/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h @@ -78,4 +78,6 @@ struct dmi_system_id { #define I2C_NAME_SIZE 20 #define I2C_MODULE_PREFIX "i2c:" +#define ACPI_ID_LEN 16 + #endif /* __LINUXKPI_LINUX_MOD_DEVICETABLE_H__ */ From nobody Thu Aug 1 22:27:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9b4Zrcz5RZWx; Thu, 01 Aug 2024 22:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9b1lXTz4Yl9; Thu, 1 Aug 2024 22:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5PxQtsBb5DoaozlDhCUt61dpGKknVRO+6F3A4KGlpaQ=; b=I6S+UB/oICnPSVyeOu3pNdGWfidMEFXcVvWCDRZm4PnVceur+JmbZZKRWnGEVx2IOKFp7/ qEUBJ/XjWnCIT850yOdPjD7PllD8lc5uUurxq3YFK/5JA4uNV8FRbxLt3eXiMcrPlISIv6 JsGWPwXwKSL2aCSPtEknf3ucAE6xCbq4rAul4vL6qDj4NxGmGWK5bOACCJs+yEPLFnu3QE 49ELBEq38rMF5pJqxgRCsfURCEOnLV2R+PJ3t8hNXB8WOwDx+9HiYjFrYrYVx11OrDxZVr cz6Nl44YwsQ4q55kTQZCQiczmAFbLqWH2CDcC3/yYK8VAKg27B5C2BHgqYWj/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551251; a=rsa-sha256; cv=none; b=i3OPUFwT5Ot1KMfYoCoR35kSCFwHHRI/qDlkjHa2FuFNmXaqLc7XCm+8nie+U2SGcbTLEL GMQRG2WV8ScMRRH/OF44Hod+UF3NfuGNxr90RMWMlpw2hhxNcHbZ/rVmbYFVVupsmrWcNk gn5/9NZVp4H9RuD02m3zj8FS7/azFDjPwOTd8VIQ8fHlkUQBb1xytSUnbdxvj0MqKCAs75 KB1lwfcYiELNvlQZlalAmDNcReme7EENORK19dRmxsmVovroC6VLrS1z3jMxmQbXBYhw2m yvFHADxGrAvMat7oJFX56Mfj1EW/Bn9OYXZR9Au7CJ92hZuo/wbH2HHvjClIjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5PxQtsBb5DoaozlDhCUt61dpGKknVRO+6F3A4KGlpaQ=; b=kfjB08fFKOVjacQ3Z4JcvKJAqxxVM56a6/VVvqZgcYhqMOfAHuIJdeVtXqcmQomBa4W8Vt nqglweHm/pa5HWj2pWPglxaoYImW8FmI5flJ8ecuTiTjfCkusSgKyfIDhg5i9Z4dqnY07M YhrMwiYlRUnXt9u88zSMcnAzZxryKSOWjvCo6ZzxeOjt2bZo7bzZPpCTlqihYoCg/Za9jU kj+PxCbOJdRm1lblFOlMJJhqPY3Fc48FzZRfcWM/IJFl9hKbcWIAcmkxXUZUK6u1raJ5yt 74/osbicflSdVPlmghDkj67SAWHyHwYGLAQOrvO66TUDl00LtfZrrx5KhuJjxw== 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 4WZk9b1KMdz12tH; Thu, 1 Aug 2024 22:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRVer027230; Thu, 1 Aug 2024 22:27:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRVsk027227; Thu, 1 Aug 2024 22:27:31 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:31 GMT Message-Id: <202408012227.471MRVsk027227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 1a045267a3e5 - stable/14 - LinuxKPI: Add want_init_on_free to linux/mm.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a045267a3e5fa3c6aba879cde5a860d1e467421 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1a045267a3e5fa3c6aba879cde5a860d1e467421 commit 1a045267a3e5fa3c6aba879cde5a860d1e467421 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: Add want_init_on_free to linux/mm.h want_init_on_free returns if heap memory zeroing on free is enabled. FreeBSD does not zeroes heap memory on free(). Sponsored by: Serenity Cyber Security Reviewed by: emaste MFC after: 1 week (cherry picked from commit 56041ee817fff844e5b2de7eedc447e388ab988e) --- sys/compat/linuxkpi/common/include/linux/mm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 0030cc6fb7a9..109bfffe7d6a 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -382,4 +382,10 @@ might_alloc(gfp_t gfp_mask __unused) #define is_cow_mapping(flags) (false) +static inline bool +want_init_on_free(void) +{ + return (false); +} + #endif /* _LINUXKPI_LINUX_MM_H_ */ From nobody Thu Aug 1 22:27:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9c4Rmmz5RZPL; Thu, 01 Aug 2024 22:27: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9c2gc0z4YjG; Thu, 1 Aug 2024 22:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjANUkXj+kiM0PZVGRLNnUQWaDZOmu2mNkt4ZrdLaLY=; b=ZeOvS70995qpG/x6nKikRqtlLWzhpc3ETmn/s1q0A7h39WBmJqfPb6IW/+pGjusN4q6oyQ q0C6DwDmEdgdwSWho7dE8MBP6frbdHyIs1Qu3Wfajo1QeB2CN+eGJTyA7i2tuS8dDiWrlP XIHaanybpk6SeSnz3SKVOiI8gQB2WDUAoi9wPGQWZfygj4B0nYkm7KezlMchLpnNMG+6oE wwXMFSENkEpeds6/araRcIamVORhFMAKjIeNnkU+dJ9v/Ox5mHdTqQPG0SiEpXO1HrT6sn zNHOpCJF5XR5UF36axP7j5jnrTYrWVU+7UGG2v4LniNaOp70SygoZLEz4lv1ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551252; a=rsa-sha256; cv=none; b=Atyn9QB7lPAAmbK/ibyMEN476SC3DuBPn1t7O0oJVGT6ieWP/r/OkLawDihK5CSH+KIJm3 PQV4dbJ0y8PRhKvuUkO5pn9xFE5SSXhRNFjQtuRAuHdfPMYErHdq+4hIc68yrKRcangCpY iih0Xt0qiRb9/yod0WMJ3DSugYo1rYsW/ngia5gW/x+4ODvDa0TqQ040CyJTOEnNdUYckx k+ZDJNCAZjd+PJsUSvv0KLQwWQfa4RBc7hDo6/ikPpJpBM54O1pT01kEclsP+TLMOWC0mU RoaoydzfOjCv/4iv+ZgaQds5nGp+iEtArL3gNzv9GgpuQeHCl5R5uyZzOEP6kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjANUkXj+kiM0PZVGRLNnUQWaDZOmu2mNkt4ZrdLaLY=; b=JKjwj2PYavuXxiVh7ORBhoKWexHsXJYLy+mNcPB3Pl3sIBHoir2FOFkAbun3l+/V8F6+5L J3z42nsl/Ds3gJJJl9eZ8gPgmaxK6AfziQ1e+dc+QEvJKNz3IWy/ETe/zV70Lxy12Dvtj8 ItJ/spLaSYViFLtpP8Lu3YYZG3t1ZN3tgBRJuUEnybg2ImkGFCkqjnvNNsCdqE+cuxW1Hy l6i1okXIgACiL4O91CUdAejEtbISZv0nxS65Dx3YRU4FeLiglqq76Z2403kIv6eOgtSvqu TO/BrbGsquRv7q4+stB7n5vILzMOugXFGDadKTs+tYyT52jtEjk5M0cy+m9EJQ== 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 4WZk9c2JHpz12hq; Thu, 1 Aug 2024 22:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRWKB027273; Thu, 1 Aug 2024 22:27:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRWuL027270; Thu, 1 Aug 2024 22:27:32 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:32 GMT Message-Id: <202408012227.471MRWuL027270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: eb3e82e91761 - stable/14 - LinuxKPI: Stub sysfs_remove_link in linux/sysfs.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eb3e82e91761582eb5c40f06801b0b3151c4b9f4 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=eb3e82e91761582eb5c40f06801b0b3151c4b9f4 commit eb3e82e91761582eb5c40f06801b0b3151c4b9f4 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: Stub sysfs_remove_link in linux/sysfs.h sysfs_create_link is stubbed already. Stub sysfs_remove_link too to be feature-complete. Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 4e7aa03b7076353af4b960ade67f093af5736d38) --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 4a65095d9eb1..b5ad73e4460b 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -164,6 +164,12 @@ sysfs_create_link(struct kobject *kobj __unused, return (0); } +static inline void +sysfs_remove_link(struct kobject *kobj, const char *name) +{ + /* TODO (along with sysfs_create_link) */ +} + static inline int sysfs_create_files(struct kobject *kobj, const struct attribute * const *attrs) { From nobody Thu Aug 1 22:27:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9d6vZwz5RZX0; Thu, 01 Aug 2024 22:27:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9d3hvhz4Ylg; Thu, 1 Aug 2024 22:27:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ydqngpG63ztxmjTNwVg+lga94BEsD1JO2oCrIrBNzo=; b=qymd2hMIzcHtkeUROYiH1EogrQB8lRxe1nPWRkpp8cRaEUk+7/qL5pjzI5rru/BnTprJTi DBpfdhB2V/ANXHocDwSsFyocBLPGkKD7YLq2o/a1z8qjK7mpHho5U1mO0cA75FeMkvmQfk M15TT/CJbsZgV3i1YcF8Dn4yot6gC3r3qJrCoh8eNCrIQr5tEdrSUIaKNrBq8TkB59dqMV yJ1zhwwJNjZ2/l+Xf9cWP05l13q7gQc24y9IMieYqPNYXb+zQfQwUJag2sLANkRLpRQd8s iUWX6R8ymP99q3wjlweyI1du6Q1nXm8qI6XyEOuNBy5EyhwY4vTed5H2mjrP3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551253; a=rsa-sha256; cv=none; b=UFjm7vyPZhXI3v5EF1L6euUJcPLaisvqadwBY1cgdP7YGWHqE+5yCGeJpDva+sWceYQcPm kD7Su5qBgqs4Ztl0Us/dalFSLV/Mn9RuU7bDCYQH+dm9uWrWAbDb04aCpfofYRor285lbZ MNwW64EjPUs1pK49mST3G2rxNd+cxTwy6o9MIV1vWNlZ17WAo76R/caJVPmXJv7ySMVySS CTlK3wZXBHPKrcdTPng7RSUFuOHdEOMRyI+jdHS4Zu0hzwT+pEjZa0BpmXmqYzgf6fOQMu ENLa0LfPWlLumly7rLIYeYJRdnOisVUnzwDcnnxmMSUljhlEVKNRvnIWdub5zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ydqngpG63ztxmjTNwVg+lga94BEsD1JO2oCrIrBNzo=; b=uDeFTGRnavxl3Om/2nonVfSkPEycJz+dG6abG3fvkr6HJiYVB1G42s1KPn6JO2tmOJEX4j u4LPTXNk0gXAE+8WpldWS8qwzO/JUPgpT807ari9/F+lgsW1f8Fz3hcj77mNtfdPcsIhw4 G4krbKPnHNZg73Pl1DQJdoPmNiqr852cY4iQXZzpmf3oT6l9z1xzIrRu384vhl3bMZJq17 MQGy0bqv98+C+kxUA+kD4+eS81nem11paqbg+WGHWXkLVQsX1C2cG0JiybMNYiEPvx9mjq Hw6Qhk3LJaQ/Y51Jfkfw67akhIYbeu0y29bL7v2/XvMPOLLSjTA/dflOFP3xgg== 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 4WZk9d3KHTz12nm; Thu, 1 Aug 2024 22:27:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRXO5027324; Thu, 1 Aug 2024 22:27:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRXt5027321; Thu, 1 Aug 2024 22:27:33 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:33 GMT Message-Id: <202408012227.471MRXt5027321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 0ce38f6c0c82 - stable/14 - LinuxKPI: lockdep_assert: wrong 'cond' used in WARN_ON MACRO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0ce38f6c0c822af3b41d9eb63669acef57dd9af9 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0ce38f6c0c822af3b41d9eb63669acef57dd9af9 commit 0ce38f6c0c822af3b41d9eb63669acef57dd9af9 Author: Alvin Chen AuthorDate: 2024-06-06 20:42:06 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: lockdep_assert: wrong 'cond' used in WARN_ON MACRO 'cond' in WARN_ON need be bracketed, otherwise it is wrong for multiple conditions. Reviewed by: wulf MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44604 (cherry picked from commit 21f4cf5ccf87fd15d4d71f89d4c3ecab13f26146) --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index a379e191aad7..5291be79218e 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -50,8 +50,8 @@ struct pin_cookie { #define lockdep_unregister_key(key) do { } while(0) #ifdef INVARIANTS -#define lockdep_assert(cond) do { WARN_ON(!cond); } while (0) -#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!cond); } while (0) +#define lockdep_assert(cond) do { WARN_ON(!(cond)); } while (0) +#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!(cond)); } while (0) #define lockdep_assert_not_held(m) do { \ struct lock_object *__lock = (struct lock_object *)(m); \ From nobody Thu Aug 1 22:27:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9g1RFzz5RZK0; Thu, 01 Aug 2024 22:27: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9f5xZDz4Yx6; Thu, 1 Aug 2024 22:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XpYWqUBW86OTSTOuGft+lA5WNhqQ1we3Ojp/coW0yrk=; b=RDhd2LHga2D7P09xAxXrjnO/LR6lFyfdLMTKxKPSRVRJblSmPiw/D/UIS3CSObkhj9aryD M8+vroDIH53/a6fzZIqwgjU3os1EGwzrcgCgeO+jkrKaFjqSSeFL0oKgHZ9O5A7u1gpTdT hl82EuA0cMTkJZG9STcY4LhOIhxRUh4JWaq+Thb+MGGkc/xB5ZMufzKWhnfnjT4E8dPsov KrmAuzRlWJ4flf6sG30fnB3RdqvNCJhlTr1qMXj1IF0jMyIfQxU3yv5Z0crbqIa08Q6GcG q1DKs4b2RxiKcMAhpJWs2B6qvxTVmOlGtqwZUoboDP4MBCFhii5imtmDSBQoBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551254; a=rsa-sha256; cv=none; b=BnSfVauLbwwVSQR3W7OR6ZABGrGcSrLx2p1/nXOwfPY9emRV8XWX+KLnmcu3Py4m18qFp8 +A/MvpRIsAjBoOmW6/9Hwg1+N2TZwpmf+zDa94c/BMawIBZtWbspYek1Nk6Mcpud2obUsq ruKYccUMRAMATm6uTfO1VkI8M8KI6qRzlBv5TVkaIu+EJu0pWDs1pVcnZw97UbMEOBAorC KZkhfkgMQ8tTxBDC6mwIlW6+H9lrrEubnWvsouCJ06xggRLCMySffU0dlYntyl+/sxsGYD kzhLRmHAmP50o63VjnAzXqahXdTuDRg/WKN0E9SGjQ7AEWp89cSEVUl7TJdJlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XpYWqUBW86OTSTOuGft+lA5WNhqQ1we3Ojp/coW0yrk=; b=rgGx9tuaxcv/5Ueo04NI4f3jP2pUmsKfJJYZMgL3+2nqHdK2YEpNxUu1ItXHzKyuvTtK0r LoXLCVrH3HdyVDv6FBQYzwjymvT8X2VS04/T23J6LZpxfd7D56hRIBLZKRSGoS6cen4pkm Ax5j1LEPDKUBf4ge78puDiMgQ+P/S042YDPD7cL7pqPWqp9hIZi7o0MMY/4sgFKg5RF7Tx yryufev/VMEQUXNKuoWEmV9roDyl3LbnF5A8z7SSIqEM/QwsQ5R4tSFrtPd4Hk2HyhJmgD 9Ph9YtbsotvI+aG4b7mmZFeeY9VM7/EFDl5WBK2mqzyZFhMyrnUOidYRIeEjSA== 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 4WZk9f5YXKz13GK; Thu, 1 Aug 2024 22:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRYu8027381; Thu, 1 Aug 2024 22:27:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRYtK027378; Thu, 1 Aug 2024 22:27:34 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:34 GMT Message-Id: <202408012227.471MRYtK027378@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 89e485e04d54 - stable/14 - linuxkpi: Allow ida_destroy and idr_destroy to be called multiple times List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 89e485e04d547b236f32e3d4eb9ece0684ef01e0 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=89e485e04d547b236f32e3d4eb9ece0684ef01e0 commit 89e485e04d547b236f32e3d4eb9ece0684ef01e0 Author: Austin Shafer AuthorDate: 2024-06-06 20:42:06 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 linuxkpi: Allow ida_destroy and idr_destroy to be called multiple times This fixes some weird behavior triggered by nvidia-drm.ko: some DRM cleanup functions will be called multiple times, leading to a double free. drm_mode_config_cleanup will be called twice, causing ida_destroy to be called twice. Although calling the cleanup twice doesn't seem very clean, on Linux this seems to be permissable as it handles it just fine. Not doing these checks causes mutex panics and double frees. In order to preserve this behavior this change checks if the objects have already been destroyed and bails if so. This fixes the panic seen when unloading the nvidia-drm driver. MFC after: 1 week Reviewed by: bz, manu Differential revision: https://reviews.freebsd.org/D44865 (cherry picked from commit 613723bac219cb08ac1ad0afd3e07850d7fccc10) --- sys/compat/linuxkpi/common/src/linux_idr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_idr.c b/sys/compat/linuxkpi/common/src/linux_idr.c index b80f8c168d45..8d7f76c7964b 100644 --- a/sys/compat/linuxkpi/common/src/linux_idr.c +++ b/sys/compat/linuxkpi/common/src/linux_idr.c @@ -179,6 +179,14 @@ idr_destroy(struct idr *idr) { struct idr_layer *il, *iln; + /* + * This idr can be reused, and this function might be called multiple times + * without a idr_init(). Check if this is the case. If we do not do this + * then the mutex will panic while asserting that it is valid. + */ + if (mtx_initialized(&idr->lock) == 0) + return; + idr_remove_all(idr); mtx_lock(&idr->lock); for (il = idr->free; il != NULL; il = iln) { @@ -803,4 +811,5 @@ ida_destroy(struct ida *ida) { idr_destroy(&ida->idr); free(ida->free_bitmap, M_IDR); + ida->free_bitmap = NULL; } From nobody Thu Aug 1 22:27:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9h3Fc4z5RZMt; Thu, 01 Aug 2024 22:27: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9g5syPz4YxL; Thu, 1 Aug 2024 22:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=utt4jYwK0yZGlD4myxjE9kTvJhsfaWtTEdeAdIPE/u4=; b=jizt+pFmpIZRdcUY9gTF7njgUNyjiMsX5r/dFhERH19ZuhE33OYJSRRQRVvb0hDJNx9hfD uF+ssUTpIk+Ezjf5o1a/gHQeFaAO98nNO8Wjz9UB9aZdN+q/Fp5GJw1elY/zN4fE4wvJ0E Iaf5LFveopzf1VOC+UHJdHmhT00Ly5b3qifRiL6G280W14CSVBd0Y2R6U0foTgLkPmmRry jY96E+DKh6MQLLETK0hkfIpgTOR7Znj3NN9Wjb1wqO9aXNNOHel3CGEk5OYNoPvDiy1Dgn FSM5ttyvOFZ9iMjgYTXXHFKDLaSzsAS0E7OW3IrtgMMes58aY09PkUgAIIUC1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551255; a=rsa-sha256; cv=none; b=WV3bhpFTMigHkgXIDQ9w+32DbmNX5JZSSzmogn+rpjKHSx11LZJz6iCQ/L8mzJNhn5q/cd eYtZ1t5AXoeCTTi/Hbn2On0RIGn+1H4olSBNrjO/V7IFpqZGTLmm+U4HPSnqWCYkCKuf4F GAF4D3WeZT+DHzOTt+Ftm09I/pRXg12QhNf0qHz31lysdu/CRRFry5VigHqXE5LOlGLlyf e204v4BfOgUMFsdmwS0Tq7iFPgYCUWm8zsYUPIB2PHFk/Nhy3WfY0/6X9A/tmiE9UHjvfx X/bskB9vvXdwwWfb3rhxiXWoRi/RHPcKnUfREMrQcckE/woAXdius1HDCjw0qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=utt4jYwK0yZGlD4myxjE9kTvJhsfaWtTEdeAdIPE/u4=; b=HFYa+fIf09eKfcIyl8RvZLuoS7kBiYDQvCys6MN0HaLTG0jQbdK2lnpICjZtAZsK+57fF/ sILW9F3V0x8slx+zN0iKkFcN3WPJnVGedKyK2xi/DgDUh+rWh76mIlHO/weQyCyrZxQ50W s+yii+9TuAnvpVmr1Yztv0uEFq74W/P+XLb/Qhwnpq1UusmPiAdihQCX6GsptHNdXUHGzn Awd6IlHkVDlYoL+sGNZyv0YKus2DAYGLRZnlsKdz/T6vTApW5YeCht2E2laYo9KXXiFi/Z Ai1DISuScv6kO4EmBvMGX7ua3MI8jFArG2NjXe83nczVJuOt3zv1ovLLQwCq7w== 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 4WZk9g5TvMz13Cv; Thu, 1 Aug 2024 22:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRZGV027444; Thu, 1 Aug 2024 22:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRZbY027441; Thu, 1 Aug 2024 22:27:35 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:35 GMT Message-Id: <202408012227.471MRZbY027441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 80ade5b6940e - stable/14 - LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 80ade5b6940e6f29cbb429ecc807da3f40a4edac Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=80ade5b6940e6f29cbb429ecc807da3f40a4edac commit 80ade5b6940e6f29cbb429ecc807da3f40a4edac Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:06 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h To match Linux. Some future changes may depend on proper location. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D45448 (cherry picked from commit cb8bfc4db8ca8f4ed03406a554e77a013696c8e0) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 9 --------- sys/compat/linuxkpi/common/include/linux/mm.h | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index e5dd2e44b0fa..e285f8591a3c 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -85,15 +85,6 @@ struct page_frag_cache { int pagecnt_bias; }; -/* - * Resolve a page into a virtual address: - * - * NOTE: This function only works for pages allocated by the kernel. - */ -void *linux_page_address(struct page *); - -#define page_address(page) linux_page_address(page) - /* * Page management for unmapped pages: */ diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 109bfffe7d6a..41af4be4c015 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -178,6 +178,14 @@ get_order(unsigned long size) return (order); } +/* + * Resolve a page into a virtual address: + * + * NOTE: This function only works for pages allocated by the kernel. + */ +void *linux_page_address(struct page *); +#define page_address(page) linux_page_address(page) + static inline void * lowmem_page_address(struct page *page) { From nobody Thu Aug 1 22:27:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9k2cxfz5RZ7S; Thu, 01 Aug 2024 22:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9k0d4qz4Ymq; Thu, 1 Aug 2024 22:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7B0LaqHwCsD+KCB9Kv9SRKVoUDN8afvWNKQpFpQiuBw=; b=hU3nhEwVgtYGfJ6VvreNYrTGSwsc98VTlQcw0+IgLndxJceePZVontDthrJvb6Zcp8fQus lKmd89azlGkIvHX1DN/MK2S3bBPPIfTbwZaxYK8m0Ze3TYkDqtZtMCUJ9FX8HUjT3sZDc6 ULVPElqNh2gnt2fBuIMyM2wfs/CiiTKkEYX9ZO5tWYHGJvmLU3fRs55y7EkFEQwgqwaIpE Zxet7E3GorXL7VCj6KURdDRxk9kIPHQVVQbbZeMy6fYkIBwTSoZaArpl5lplhVGiXXb0EK ulktmruTBPqfqwRFZXEZbYbL4lVdXCWqHbmIhg/zuWMIeEtpUT8tzbQgVuH4tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551258; a=rsa-sha256; cv=none; b=KSzVfyTY3iXIOONyMBg0IEmXECOm7YByA6KeyJPHERi5XuiEMszqeCYFon3BT9Y1eSTPvd VFgA/fU30c952itv3cKgt1mFlHO04xW/EYZ+sdjv+WiW3KB2XLEnJK9Hdu2LaDWmXjnJOo FpfifSjkrtYi+aqCVg1cMOMTEkDYMhgF/LTADzb/tIKPJqaPOj1yWjxcU0K+dPalCvJLtN YMEHpAe7ll5jxfZd+UkBzvXSInVOp8uJp4jaLS4yT/+hCbVVcybx+WWvjW7VkeO2EKrC1Q DVEaDQ3cAjT9tCeUTmmcsleMcCkYn9P/jELAv/vgaXy8y9TVCOvljqgMfLiyKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7B0LaqHwCsD+KCB9Kv9SRKVoUDN8afvWNKQpFpQiuBw=; b=bjwGDB9rW1Y0G1o3clffZpCIsRyVhEAmTuxb/dvAzuHUw83XvfLUrq7KM61ysnwYZz67by Vu7UEVc8Y64x58RyTqqcL0eyo0D3zP7J6SwvNPv9bOVh6ElWzg+TpSDqF1fJFPuogO5wiL sWm2/8mKoS30pVAJMPh/yxq6yuia5p86j3WxMNVdiujMp22vze1WtxDALxVOpXWc3iFgeo ED8iWjpu0BEuuerjrNPOVLz2pCXPNtsmcgztUaDiWZ8QeF4WhFqkfy41R410pcwyx0Zjb8 WaLyAOiMtQEi2MZChm7v+PJM+p6XvidrlzdnyZzZgRfrwnnAgPpqFvWC84Qyjg== 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 4WZk9k0F8Nz12nn; Thu, 1 Aug 2024 22:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRbuG027540; Thu, 1 Aug 2024 22:27:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRbZV027537; Thu, 1 Aug 2024 22:27:37 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:37 GMT Message-Id: <202408012227.471MRbZV027537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: ef2a82120fc1 - stable/14 - LinuxKPI: Add min_not_zero() to linux/minmax.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ef2a82120fc1a742236368d527bab8e864c40e60 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=ef2a82120fc1a742236368d527bab8e864c40e60 commit ef2a82120fc1a742236368d527bab8e864c40e60 Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:06 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: Add min_not_zero() to linux/minmax.h It returns the minimum that is not zero, except both equals to zero. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste, ssaxena Differential Revision: https://reviews.freebsd.org/D45450 Differential Revision: https://reviews.freebsd.org/D45451 (cherry picked from commit 07c7c41ca1e31c20c2e2d8fb68c148f521831e4d) --- sys/compat/linuxkpi/common/include/linux/minmax.h | 7 +++++++ sys/dev/bnxt/bnxt_re/bnxt_re.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/minmax.h b/sys/compat/linuxkpi/common/include/linux/minmax.h index 465607371b9b..d48958f0899f 100644 --- a/sys/compat/linuxkpi/common/include/linux/minmax.h +++ b/sys/compat/linuxkpi/common/include/linux/minmax.h @@ -7,6 +7,7 @@ * Copyright (c) 2014-2015 François Tigeot * Copyright (c) 2015 Hans Petter Selasky * Copyright (c) 2016 Matt Macy + * Copyright (c) 2023 Serenity Cyber Security, LLC. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,6 +44,12 @@ #define min3(a, b, c) min(a, min(b, c)) #define max3(a, b, c) max(a, max(b, c)) +#define min_not_zero(x, y) ({ \ + __typeof(x) __min1 = (x); \ + __typeof(y) __min2 = (y); \ + __min1 == 0 ? __min2 : ((__min2 == 0) ? __min1 : min(__min1, __min2));\ +}) + #define min_t(type, x, y) ({ \ type __min1 = (x); \ type __min2 = (y); \ diff --git a/sys/dev/bnxt/bnxt_re/bnxt_re.h b/sys/dev/bnxt/bnxt_re/bnxt_re.h index 3bf0bbeb1061..56b3c8c0488c 100644 --- a/sys/dev/bnxt/bnxt_re/bnxt_re.h +++ b/sys/dev/bnxt/bnxt_re/bnxt_re.h @@ -100,10 +100,12 @@ * @x: value1 * @y: value2 */ +#ifndef min_not_zero #define min_not_zero(x, y) ({ \ typeof(x) __x = (x); \ typeof(y) __y = (y); \ __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); }) +#endif struct ib_mr_init_attr { int max_reg_descriptors; From nobody Thu Aug 1 22:27:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9j2rQ7z5RZ7Q; Thu, 01 Aug 2024 22:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9h6x2fz4Z3C; Thu, 1 Aug 2024 22:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SURfE1MFpE58B8czSJhyeTtJHVGVRAtWof+tSwpud+Q=; b=jzMFgS7DL2q/vOL5cY8X2YNc5eR4XqO681ncCcqNkGB8kMZqvbAivsdqWaLiHSUXyVSgri 3gabdFcLV/iw60I4M04ibwDDuxNYdHp0CsLDaMWNKkkqzUuuLqDH8aCFlPvOy16WN8K8q4 XYmW1udg245und1l1FUdiBx2jH2yUYSPPFKOYJuFInFVpb/T4v1W3JHc4WhVyYdl/KEPm8 ULFF48D0wxd63i1fLOUx1rpgVK19qghGcDRAEQNvy04x1r7Au+s6KWMpM0jfjT684EF4Y4 AtrnH7pgVSC4nGJjABTi49Cqsa5P5GdqUf9Vc2GVyxDBLb9nDo9MKM1xuw851w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551257; a=rsa-sha256; cv=none; b=HFOJGWWytzkXo6j5mM9wKsxrvteS6tOOzrGa0kD8PGn+XcxwRUu/JdPaKT5Ql7Q3b27Cw1 ZU3ZmPJZe2sYmxgTpSZMim44V33xofkXQu21fRVW993Iu2gOvhxKvuk4yWK6hS7scMHCCM yX0e0ciaKiFef7wNBity2vLOGJP4XvSv3lFqhxOHHR2H77rc8Xk4nZ9n4orBOl+vlL1qPZ eR2I4xKSWoWBYh/nYV2Pxkf5LTmy3XVJCLMMxvGrJK5s5bUZhBfTN6BFt69yTTAF1b3859 cC2/6jq0r/jdFMAiDhuHcfELwIRGfnrMZgXSQPUJd4EGYKsZCsJOHks8gLgiJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SURfE1MFpE58B8czSJhyeTtJHVGVRAtWof+tSwpud+Q=; b=BgQZ1OEqw9+i//+hKlGjyRNXOjuczA92ztD3gLooR47su8HnUnB/wJk3R9qCehw8Fk2Hy2 E4Kl442ini/USBe0/2W1wrrcyq8bcwRUhSHwyc8RgknqNKlAIGlNVlH+6G13DkdjM0IpHG zp0Sx3tRkl1jscnDChAcM2TZ/8qDOQW6Fm7HH5YhOCsTzyG0zywj0GVnI8XQYck28NWdTx FtcG/Bwy4AvTS/6M32oOrzkwrmjTyit6/m8GDwMmQLPFMBIFZFYIGnZ+JFh7jj9euge6m1 zXqwNyWYd2oPoj6P6BhXCO94nOjEdQ/mH71MhPAQolBa4LTv5y6AaPVfg4yz2g== 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 4WZk9h6TrKz12tJ; Thu, 1 Aug 2024 22:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRaBu027496; Thu, 1 Aug 2024 22:27:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRadv027493; Thu, 1 Aug 2024 22:27:36 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:36 GMT Message-Id: <202408012227.471MRadv027493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 18a9913f9ff0 - stable/14 - LinuxKPI: Move linux/minmax.h content out of linux/kernel.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 18a9913f9ff02da049cdbd9dbfba9ee0244c1979 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=18a9913f9ff02da049cdbd9dbfba9ee0244c1979 commit 18a9913f9ff02da049cdbd9dbfba9ee0244c1979 Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:06 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: Move linux/minmax.h content out of linux/kernel.h To match Linux and allow direct linux/minmax.h inclusion. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D45449 (cherry picked from commit f79474c4e3eeb48c6acb0a9e3163195a50cef577) --- sys/compat/linuxkpi/common/include/linux/kernel.h | 28 +--------- sys/compat/linuxkpi/common/include/linux/minmax.h | 67 +++++++++++++++++++++++ 2 files changed, 68 insertions(+), 27 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 26fc2b8a4862..7679c7f519af 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -518,29 +519,9 @@ kstrtou8_from_user(const char __user *s, size_t count, unsigned int base, return (kstrtou8(buf, base, p)); } -#define min(x, y) ((x) < (y) ? (x) : (y)) -#define max(x, y) ((x) > (y) ? (x) : (y)) - -#define min3(a, b, c) min(a, min(b,c)) -#define max3(a, b, c) max(a, max(b,c)) - -#define min_t(type, x, y) ({ \ - type __min1 = (x); \ - type __min2 = (y); \ - __min1 < __min2 ? __min1 : __min2; }) - -#define max_t(type, x, y) ({ \ - type __max1 = (x); \ - type __max2 = (y); \ - __max1 > __max2 ? __max1 : __max2; }) - #define offsetofend(t, m) \ (offsetof(t, m) + sizeof((((t *)0)->m))) -#define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) -#define clamp(x, lo, hi) min( max(x,lo), hi) -#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) - /* * This looks more complex than it should be. But we need to * get the type for the ~ right in round_down (it needs to be @@ -560,13 +541,6 @@ extern bool linux_cpu_has_clflush; #define cpu_has_clflush linux_cpu_has_clflush #endif -/* Swap values of a and b */ -#define swap(a, b) do { \ - typeof(a) _swap_tmp = a; \ - a = b; \ - b = _swap_tmp; \ -} while (0) - #define DIV_ROUND_CLOSEST(x, divisor) (((x) + ((divisor) / 2)) / (divisor)) #define DIV_ROUND_CLOSEST_ULL(x, divisor) ({ \ diff --git a/sys/compat/linuxkpi/common/include/linux/minmax.h b/sys/compat/linuxkpi/common/include/linux/minmax.h new file mode 100644 index 000000000000..465607371b9b --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/minmax.h @@ -0,0 +1,67 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2014-2015 François Tigeot + * Copyright (c) 2015 Hans Petter Selasky + * Copyright (c) 2016 Matt Macy + * + * 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 _LINUXKPI_LINUX_MINMAX_H_ +#define _LINUXKPI_LINUX_MINMAX_H_ + +#include +#include +#include + +#define min(x, y) ((x) < (y) ? (x) : (y)) +#define max(x, y) ((x) > (y) ? (x) : (y)) + +#define min3(a, b, c) min(a, min(b, c)) +#define max3(a, b, c) max(a, max(b, c)) + +#define min_t(type, x, y) ({ \ + type __min1 = (x); \ + type __min2 = (y); \ + __min1 < __min2 ? __min1 : __min2; }) + +#define max_t(type, x, y) ({ \ + type __max1 = (x); \ + type __max2 = (y); \ + __max1 > __max2 ? __max1 : __max2; }) + +#define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) +#define clamp(x, lo, hi) min(max(x, lo), hi) +#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) + +/* Swap values of a and b */ +#define swap(a, b) do { \ + __typeof(a) _swap_tmp = a; \ + a = b; \ + b = _swap_tmp; \ +} while (0) + +#endif /* _LINUXKPI_LINUX_MINMAX_H_ */ From nobody Thu Aug 1 22:27:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9l3g6bz5RZcd; Thu, 01 Aug 2024 22:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9l1R17z4Z5N; Thu, 1 Aug 2024 22:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FrpSWYJcgxqXeAFtpt1tHWMFMliz+HPE1CanbcoKF4g=; b=Lm4gqGnXDYwSufpkfbOiKlbM+Wzh9Bnt4mBYyajub86X2a9nH8mVw9A9qbdPUM62KZm+W5 sBUXR5iNwGj86E7JPCt1ZtxdveoP5PAAlc+WUbrph0z+rnnmUgWEqD463YgnEbYrJKZfVa aOdIVoNaR/Bs0Cy/i1o8tM7xk+tca81Ot19+paXUuy6IOAMuEOFqFvXRNPJeNe6oLZ3LQt ukURT1czQoZIhwO1Bv1KgQ0zf2d4afUSlDUY+cBds+yPV2FNo9TK4UoPwZXIBWzkMmJsgJ fJDTzeepom57pTI9Sg27yTEdlSG5EuVez41RYwidL7LmqxUxOw9zWL5hHigYCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551259; a=rsa-sha256; cv=none; b=P77RaZEsZTfzHNyqXFj2XiLLXjbA/2Hqm5992CnYe83f3PGB4oCpwOrA04Oi+EH8L9C5vO 0noiFF68DylLQZS/R8QjJIihjnBVOMCpAgI8QiipNdK324726rjBK7lgVvjaYLQcvgwKeA 50M8dhI/7OphsfIK4KJVCKUwN49ye+jBHLAlw71R7qZeyCLaFypYgiLmP3a7Z/goIxOrTT beM3coGoUTeKw699TVwRKzOv5KeSJYSKznMw3hkoWdGDqsNO01qC+WWNlwr45kRwr0AcmC Sn6MLKjYb5a5ocuUU0aOjQaKG70+odF3xFC8sLnjWa+r0Pd+aquJhtw81jDsiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FrpSWYJcgxqXeAFtpt1tHWMFMliz+HPE1CanbcoKF4g=; b=OvNVpIDQZ/ebD2XuXnaT3QGUvBXr7w6IK9HIIBh8R3NY8sizFWhjccxqi+YcXk4eOs8x/1 ryd6cxqaQjejYSBTOESfc3kBy+OhTNgN+eBNWrjK7eISGaAjdEK69DxI1rV19466Dlb1g/ njOk0XYRuxk1GZHzJkyFi2ZPPfDgZvsDUSNmmZ8DKdoan3SswzHysK+IxNdOvjk0Vo+RnJ uDUlVCRP0OgKeeQsTB10Krzu+ePbklpztvb2IGkheqxPXsQKIOF+uVsICKd77Z2Ttp85IV E8g6V0xItpjMmQzhetfsuwVUslx4UorPIcj2B17rdwqxD4lkY3Q+pIQZSmbK1g== 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 4WZk9l11PWz12l8; Thu, 1 Aug 2024 22:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRd3v027592; Thu, 1 Aug 2024 22:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRdx0027589; Thu, 1 Aug 2024 22:27:39 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:39 GMT Message-Id: <202408012227.471MRdx0027589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 9cc3f82da43a - stable/14 - LinuxKPI: Move linux/math.h content out of linux/kernel.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9cc3f82da43a4d26fcaaf1d07da6d76d3222a3d8 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=9cc3f82da43a4d26fcaaf1d07da6d76d3222a3d8 commit 9cc3f82da43a4d26fcaaf1d07da6d76d3222a3d8 Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:07 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: Move linux/math.h content out of linux/kernel.h To match Linux and allow direct linux/math.h inclusion. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D45452 (cherry picked from commit 588064e658d32f037854dd852b988728197a28de) --- sys/compat/linuxkpi/common/include/linux/kernel.h | 32 +---------- sys/compat/linuxkpi/common/include/linux/math.h | 67 +++++++++++++++++++++++ 2 files changed, 68 insertions(+), 31 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 7679c7f519af..93549178f9d9 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -125,10 +126,7 @@ extern int linuxkpi_warn_dump_stack; #undef PTR_ALIGN #define PTR_ALIGN(p, a) ((__typeof(p))ALIGN((uintptr_t)(p), (a))) #define IS_ALIGNED(x, a) (((x) & ((__typeof(x))(a) - 1)) == 0) -#define DIV_ROUND_UP(x, n) howmany(x, n) #define __KERNEL_DIV_ROUND_UP(x, n) howmany(x, n) -#define DIV_ROUND_UP_ULL(x, n) DIV_ROUND_UP((unsigned long long)(x), (n)) -#define DIV_ROUND_DOWN_ULL(x, n) (((unsigned long long)(x) / (n)) * (n)) #define FIELD_SIZEOF(t, f) sizeof(((t *)0)->f) #define printk(...) printf(__VA_ARGS__) @@ -522,16 +520,6 @@ kstrtou8_from_user(const char __user *s, size_t count, unsigned int base, #define offsetofend(t, m) \ (offsetof(t, m) + sizeof((((t *)0)->m))) -/* - * This looks more complex than it should be. But we need to - * get the type for the ~ right in round_down (it needs to be - * as wide as the result!), and we want to evaluate the macro - * arguments just once each. - */ -#define __round_mask(x, y) ((__typeof__(x))((y)-1)) -#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) -#define round_down(x, y) ((x) & ~__round_mask(x, y)) - #define smp_processor_id() PCPU_GET(cpuid) #define num_possible_cpus() mp_ncpus #define num_online_cpus() mp_ncpus @@ -541,24 +529,6 @@ extern bool linux_cpu_has_clflush; #define cpu_has_clflush linux_cpu_has_clflush #endif -#define DIV_ROUND_CLOSEST(x, divisor) (((x) + ((divisor) / 2)) / (divisor)) - -#define DIV_ROUND_CLOSEST_ULL(x, divisor) ({ \ - __typeof(divisor) __d = (divisor); \ - unsigned long long __ret = (x) + (__d) / 2; \ - __ret /= __d; \ - __ret; \ -}) - -static inline uintmax_t -mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor) -{ - uintmax_t q = (x / divisor); - uintmax_t r = (x % divisor); - - return ((q * multiplier) + ((r * multiplier) / divisor)); -} - typedef struct linux_ratelimit { struct timeval lasttime; int counter; diff --git a/sys/compat/linuxkpi/common/include/linux/math.h b/sys/compat/linuxkpi/common/include/linux/math.h new file mode 100644 index 000000000000..fc4542c83f1f --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/math.h @@ -0,0 +1,67 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2014-2015 François Tigeot + * Copyright (c) 2016 Matt Macy + * Copyright (c) 2019 Johannes Lundberg + * + * 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 _LINUXKPI_LINUX_MATH_H_ +#define _LINUXKPI_LINUX_MATH_H_ + +#include + +/* + * This looks more complex than it should be. But we need to + * get the type for the ~ right in round_down (it needs to be + * as wide as the result!), and we want to evaluate the macro + * arguments just once each. + */ +#define __round_mask(x, y) ((__typeof__(x))((y)-1)) +#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) +#define round_down(x, y) ((x) & ~__round_mask(x, y)) + +#define DIV_ROUND_UP(x, n) howmany(x, n) +#define DIV_ROUND_UP_ULL(x, n) DIV_ROUND_UP((unsigned long long)(x), (n)) +#define DIV_ROUND_DOWN_ULL(x, n) (((unsigned long long)(x) / (n)) * (n)) + +#define DIV_ROUND_CLOSEST(x, divisor) (((x) + ((divisor) / 2)) / (divisor)) +#define DIV_ROUND_CLOSEST_ULL(x, divisor) ({ \ + __typeof(divisor) __d = (divisor); \ + unsigned long long __ret = (x) + (__d) / 2; \ + __ret /= __d; \ + __ret; \ +}) + +static inline uintmax_t +mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor) +{ + uintmax_t q = (x / divisor); + uintmax_t r = (x % divisor); + + return ((q * multiplier) + ((r * multiplier) / divisor)); +} + +#endif /* _LINUXKPI_LINUX_MATH_H_ */ From nobody Thu Aug 1 22:27:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9m5346z5RZZG; Thu, 01 Aug 2024 22:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9m2b0jz4YqQ; Thu, 1 Aug 2024 22:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lAs+1KA2ZCtPSapRx8IFYZz8NnnpbcnJ7Err2Toh9Y0=; b=Kpu873zImBlRIZ2HbbjqSIOBntLXNiLXvqvLJr09MUETi2Io+P9FSbjKCjYUmE0Kf/1yyy xFnJGRSXowSIuC79u10xvk2tdhGRap8CcCX5mbz63B+6DLpLjDLIYVkTHtvLeGAvqVytAo rZWPrD87qUkI70joKILkRNUAuy21X8DRlbOH3Bpi+SZneNZj1hHSw4Ox/upY9JGwAO8JJf APKTMzVwJenasQHG067f5g3nRjGT7V4pBzUbnbwKYlvi4JPh76XhML9A/MV14bsJO+ltJB zLK7L1ZoBKFVofqE30dCTBNS7kTaRc40NdWSKu6ZpXVSxVd7uVmC7OVWZE/6EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551260; a=rsa-sha256; cv=none; b=SaOPKcHFYSs/5YxpyMD3qQ1bTzecxP12E0XhWU5kHF/U1+MoQItbnPWFKmRJpDhXHjz4LM rBURvVPtNxyHYzqnDENCBrEPMUYFMeGq5sVqIFgHuw6XuJz6eM4hc9eMuLG5EhEdpiOYjC EKMynVweomVJuz35+uhrlbBrUW4bh17Wrtz8TljOpA6FyFyCjE2LuArD2/7I6p0f0vGf9d wW893bXTlRJC6F0lcZ+fkAR8PcBqDu04TIbfkg7sLmciZ0xHWNx7fAiiL0LytvSIEhBog0 J3/foUOyBeFksN+bBfcoWAXi3XdNQffp4gW1ASl6pt+vcRHEvR8hf46lU+iKBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lAs+1KA2ZCtPSapRx8IFYZz8NnnpbcnJ7Err2Toh9Y0=; b=W4NEpomofXgNGR6NMbFMCNf1bA8ctjs4FvsVA7vVry5SpZJvS6ULClLbttTFJ+va1RCWun wX8oP9ZP7jrzndXUx7L4n/Fxp4zGdgLEUWlSH0mAN618RnW4bMKgMMKcCueNAjW3Bb2vId FE0ofDbTrrTevc9JTtS2MPEwYWqoMw3RIMs22rptqqkwzHBuGn43mWQSTIgjxJ7QFOGp8n 64e+8BFsDf2m0RBChkGyTIJgsq0ygLqfr3yUBozAfzf+OjtMNotKWeAG5dXdr7H1WWtvFL hVNCKoKQBYFziqlhJfei5FTTKdXyoHR4ZcP9bW+X4keUAl7OHhhCmlECFAwb+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WZk9m2BXzz12Jl; Thu, 1 Aug 2024 22:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MReXE027634; Thu, 1 Aug 2024 22:27:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRe2x027631; Thu, 1 Aug 2024 22:27:40 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:40 GMT Message-Id: <202408012227.471MRe2x027631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 42aeb3866cea - stable/14 - LinuxKPI: Add abs_diff to linux/math.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 42aeb3866cea6b00c00de0f5f0ecb09c863ee18f Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=42aeb3866cea6b00c00de0f5f0ecb09c863ee18f commit 42aeb3866cea6b00c00de0f5f0ecb09c863ee18f Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:07 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:40 +0000 LinuxKPI: Add abs_diff to linux/math.h It returns absolute value of the difference between the arguments. Add LinuxKPI version check as the macro was moved from drm-kmod to linux/math.h in Linux kernel commit 46f12960aad (6.6 timeframe). Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D45453 (cherry picked from commit afc450fac9f04f11cd916916ac28ffc52a973e1e) --- sys/compat/linuxkpi/common/include/linux/math.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/math.h b/sys/compat/linuxkpi/common/include/linux/math.h index fc4542c83f1f..dad7fa7fbe9c 100644 --- a/sys/compat/linuxkpi/common/include/linux/math.h +++ b/sys/compat/linuxkpi/common/include/linux/math.h @@ -5,6 +5,7 @@ * Copyright (c) 2014-2015 François Tigeot * Copyright (c) 2016 Matt Macy * Copyright (c) 2019 Johannes Lundberg + * Copyright (c) 2023 Serenity Cyber Security, LLC. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -55,6 +56,14 @@ __ret; \ }) +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60600 +#define abs_diff(x, y) ({ \ + __typeof(x) _x = (x); \ + __typeof(y) _y = (y); \ + _x > _y ? _x - _y : _y - _x; \ +}) +#endif + static inline uintmax_t mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor) { From nobody Thu Aug 1 22:27:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9v4N1mz5RZXZ; Thu, 01 Aug 2024 22:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9v0m2dz4Z2S; Thu, 1 Aug 2024 22:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ddXgbLK+hBljDmNTXBCF/e1JXY4XexfkMz/QJmkTEM=; b=OuCTGg/E/q3FcaYT5qEGLW1T1OKrFr5u0ViSbFNfZmYSo4Eb8LrqSFJiTJMr/3U8d97E51 BXgTgW9QcVrrs1cTKLExsRwhfFsvVT3apJ+UrNR5bZKF6VN1FHQzBltPCh2YQn216xGQ7r GxLkHaVnOJygG+KLqOhOZ+xu5JIt+dbUCLqkDTAgs2F7iCJsnOHcKP7SMAF6WaIu0DBbtL f6+dBDvNT1y2D/xGBBMewt+lTA1nrXJy6f6zG9d6/u34OhwmAMO/asHGLEjuQaDqHbbk2Z PuT18YunugDSz7OtgpvZn8oTiRfg5lOlj8GkQl6h8zWeZ8SCX/7VvxgvQFj4Ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551267; a=rsa-sha256; cv=none; b=qEUMgUmfL5+WGrSAjbzGSGCdBtjjR2XmF9YhrVNgr4RrLUokZcBgEvWylPv6h2KEu1SgDx 9r6hAf8Vw/dE0IF+V/m8JgRl38/jy1Kt21xBRv4t6bedI51euyYz8qof6OXBox3SC1y+2B goPmLNaF8AJiH4C4WxjZPaHJbdAKIIP1ab9apw5PNu6+oAfgUUM6Jb3K4Zkxs3f+d+mt7d r1exGCWWilOOObfbYQ0aMiDJWtNAuR59Tknbx1p/L9hk5scWQBE3u9K+FyXcngBLphIJlh 1vfgrnUdu83hZzAVb+16s+Xw/hhfs9eUpf7Ff6214zmZXObC/0ZtX2ZwnDGG5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ddXgbLK+hBljDmNTXBCF/e1JXY4XexfkMz/QJmkTEM=; b=cOW9FtU+lrEgBqLPL7g+23dEAm0s5ZFHyxaDIkRAVVKgLJqq3tTk07tsmF1PBDp6kaxLCW cFsVzp3EX9awn32826bJmjy08vtm5egbpFUnrn99y26rCEi50ig6qznDu0T8rL1/TGbRqV J+SSs/P0/TvsprM2MA8NB74W95cKC7kz/rBOIFfgVlwvAem158OtEhavAlPZQObgxGY2Ab iHLJisO3Snauj/qJUOxeKjKO9PF5x0yfOfz2VNX9rIQQ4Qfz9xngBB0q3Jz1oGKW58EU6v oufQBGLT354CNf3bl+161uLRlnhovModjmyysDEPC5dc+s/HqZdC0QvrcFbdsQ== 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 4WZk9v0NVdz12nq; Thu, 1 Aug 2024 22:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRknO027925; Thu, 1 Aug 2024 22:27:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRknM027922; Thu, 1 Aug 2024 22:27:46 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:46 GMT Message-Id: <202408012227.471MRknM027922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: ddde8df29363 - stable/14 - LinuxKPI: Add kmap_local_page function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ddde8df29363d4dfccb39975039d56e93275f061 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=ddde8df29363d4dfccb39975039d56e93275f061 commit ddde8df29363d4dfccb39975039d56e93275f061 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:43:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:40 +0000 LinuxKPI: Add kmap_local_page function kmap_local_page maps a page for temporary usage Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45609 (cherry picked from commit 73f3589120e61b4b9df1ef60c5be12ccd81878f2) --- sys/compat/linuxkpi/common/include/linux/highmem.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/highmem.h b/sys/compat/linuxkpi/common/include/linux/highmem.h index f770bef6b3b7..252d16b2ea70 100644 --- a/sys/compat/linuxkpi/common/include/linux/highmem.h +++ b/sys/compat/linuxkpi/common/include/linux/highmem.h @@ -93,6 +93,12 @@ kmap_atomic(struct page *page) return (kmap_atomic_prot(page, VM_PROT_ALL)); } +static inline void * +kmap_local_page(struct page *page) +{ + return (kmap(page)); +} + static inline void * kmap_local_page_prot(struct page *page, pgprot_t prot) { From nobody Thu Aug 1 22:27:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9p2Y5kz5RZX9; Thu, 01 Aug 2024 22:27: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9n3mchz4Z04; Thu, 1 Aug 2024 22:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ga9Fgf9Vgs9ECHqerHHYfPjKkqrsTcLQGnYtzyAsCx0=; b=EhzBifgNTytyGS0ckt1d51ZyYr04wN5aiusXCCpxEcFI4fVi75weBJJ5Jnch2dCde0H6vQ 0ZJcpthIY9Fl73mZ9wVYq4T9lS19pW7ttps5Gyrw37TxQGgGrz3qHEUm5Xa7czLl/cly4E y/I8/P4OTB2wge8dJ47t94ESpVWC1uumo49c0jYoVRRJuliLGxMlYoUhMmy5Fjx2nVXtro SoP/iPkhGAei6BNsEuu2uE1GRLzQpSq9RgzJzn1lHV9Jzk18eIHwkLUs397PMskOQUtkla 7s52reB8XM+jDRJ3GzFGrURnmyDUe5/IseaB2Wc5u1a0LvFWCXVBNWqCdFEceg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551261; a=rsa-sha256; cv=none; b=RFGN7yAqP6ANs4rJfZlbZI8QPUezPfM6PRpgnQfXkoLbKQDQsqDlgk27yE1d9jH6OUfqlU ie5Vz56LN+0ybwVKnOOK7+Kh0nfoCzPAjzxFo5thA3MirfLCnQD/xt9eXwCM9voMfdBaYi SPDGbkYyjoTj5x70pH0o5WAJW7wmzU/MU65rc1VWCZORp0aS1KRJUTlfFGTah24dlO2Nqw AcsHzTMoVx8Q9l2Z85FzCjxZRXqlzx9X1b8nGvqlAVpBezVf7Gcs0NQYwsnzrpQcE48ft7 6bZ5Ab/zxh7HA4iHm3RUYoXcxbiA3I0YJMGE1lJkH9PWccJ+Nq7TX7fFP3LjTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ga9Fgf9Vgs9ECHqerHHYfPjKkqrsTcLQGnYtzyAsCx0=; b=Q0iRT3ZD/DvcFG/16qlEKEXNU9dnC5L3Lz83rZT3spoZ8bOlD/eZYwtk9WfQqNyY729/eM P1CKe9/vic9tI9am8hGs236eC2WyFmmRtCNLR74n6iMCvfUBDjlypT5RL6iRzdRllYripG BDwHUPUl1KkHeRw4w6LnjOyFYmPeDTljGTdMSDOWhjnzBQOOi160X8phTFICNWksD8DeGb MFtfbXcWg0rUCBkEBfUrXrLkDDZSzml1YE7bEfErarEHTY7J5Nam7YFd0NSHC7Kp4sLAD7 PLTP86JJ3365RdlD8Fi6RSeGNXkpLIyRfTgFzClPDTMFk271zDpvzZsg8N2Hsw== 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 4WZk9n36CNz12hr; Thu, 1 Aug 2024 22:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRf6u027685; Thu, 1 Aug 2024 22:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRfMf027682; Thu, 1 Aug 2024 22:27:41 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:41 GMT Message-Id: <202408012227.471MRfMf027682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: fb884c724402 - stable/14 - LinuxKPI: Move kstrto* functions to linux/kstrtox.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fb884c7244028465fbad701937a555efa630e183 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=fb884c7244028465fbad701937a555efa630e183 commit fb884c7244028465fbad701937a555efa630e183 Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:07 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:40 +0000 LinuxKPI: Move kstrto* functions to linux/kstrtox.h from linux/kernel.h to match Linux and allow direct linux/kstrtox.h inclusion. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D45454 (cherry picked from commit a97f3a9ec96a2de542326a158d1ab8e65ad4fe5f) --- sys/compat/linuxkpi/common/include/linux/kernel.h | 248 +---------------- sys/compat/linuxkpi/common/include/linux/kstrtox.h | 310 +++++++++++++++++++++ 2 files changed, 311 insertions(+), 247 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 93549178f9d9..0b6bca5f388b 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -270,253 +271,6 @@ extern int linuxkpi_debug; #define _RET_IP_ __builtin_return_address(0) -static inline unsigned long long -simple_strtoull(const char *cp, char **endp, unsigned int base) -{ - return (strtouq(cp, endp, base)); -} - -static inline long long -simple_strtoll(const char *cp, char **endp, unsigned int base) -{ - return (strtoq(cp, endp, base)); -} - -static inline unsigned long -simple_strtoul(const char *cp, char **endp, unsigned int base) -{ - return (strtoul(cp, endp, base)); -} - -static inline long -simple_strtol(const char *cp, char **endp, unsigned int base) -{ - return (strtol(cp, endp, base)); -} - -static inline int -kstrtoul(const char *cp, unsigned int base, unsigned long *res) -{ - char *end; - - *res = strtoul(cp, &end, base); - - /* skip newline character, if any */ - if (*end == '\n') - end++; - if (*cp == 0 || *end != 0) - return (-EINVAL); - return (0); -} - -static inline int -kstrtol(const char *cp, unsigned int base, long *res) -{ - char *end; - - *res = strtol(cp, &end, base); - - /* skip newline character, if any */ - if (*end == '\n') - end++; - if (*cp == 0 || *end != 0) - return (-EINVAL); - return (0); -} - -static inline int -kstrtoint(const char *cp, unsigned int base, int *res) -{ - char *end; - long temp; - - *res = temp = strtol(cp, &end, base); - - /* skip newline character, if any */ - if (*end == '\n') - end++; - if (*cp == 0 || *end != 0) - return (-EINVAL); - if (temp != (int)temp) - return (-ERANGE); - return (0); -} - -static inline int -kstrtouint(const char *cp, unsigned int base, unsigned int *res) -{ - char *end; - unsigned long temp; - - *res = temp = strtoul(cp, &end, base); - - /* skip newline character, if any */ - if (*end == '\n') - end++; - if (*cp == 0 || *end != 0) - return (-EINVAL); - if (temp != (unsigned int)temp) - return (-ERANGE); - return (0); -} - -static inline int -kstrtou8(const char *cp, unsigned int base, u8 *res) -{ - char *end; - unsigned long temp; - - *res = temp = strtoul(cp, &end, base); - - /* skip newline character, if any */ - if (*end == '\n') - end++; - if (*cp == 0 || *end != 0) - return (-EINVAL); - if (temp != (u8)temp) - return (-ERANGE); - return (0); -} - -static inline int -kstrtou16(const char *cp, unsigned int base, u16 *res) -{ - char *end; - unsigned long temp; - - *res = temp = strtoul(cp, &end, base); - - /* skip newline character, if any */ - if (*end == '\n') - end++; - if (*cp == 0 || *end != 0) - return (-EINVAL); - if (temp != (u16)temp) - return (-ERANGE); - return (0); -} - -static inline int -kstrtou32(const char *cp, unsigned int base, u32 *res) -{ - - return (kstrtouint(cp, base, res)); -} - -static inline int -kstrtou64(const char *cp, unsigned int base, u64 *res) -{ - char *end; - - *res = strtouq(cp, &end, base); - - /* skip newline character, if any */ - if (*end == '\n') - end++; - if (*cp == 0 || *end != 0) - return (-EINVAL); - return (0); -} - -static inline int -kstrtoull(const char *cp, unsigned int base, unsigned long long *res) -{ - return (kstrtou64(cp, base, (u64 *)res)); -} - -static inline int -kstrtobool(const char *s, bool *res) -{ - int len; - - if (s == NULL || (len = strlen(s)) == 0 || res == NULL) - return (-EINVAL); - - /* skip newline character, if any */ - if (s[len - 1] == '\n') - len--; - - if (len == 1 && strchr("yY1", s[0]) != NULL) - *res = true; - else if (len == 1 && strchr("nN0", s[0]) != NULL) - *res = false; - else if (strncasecmp("on", s, len) == 0) - *res = true; - else if (strncasecmp("off", s, len) == 0) - *res = false; - else - return (-EINVAL); - - return (0); -} - -static inline int -kstrtobool_from_user(const char __user *s, size_t count, bool *res) -{ - char buf[8] = {}; - - if (count > (sizeof(buf) - 1)) - count = (sizeof(buf) - 1); - - if (copy_from_user(buf, s, count)) - return (-EFAULT); - - return (kstrtobool(buf, res)); -} - -static inline int -kstrtoint_from_user(const char __user *s, size_t count, unsigned int base, - int *p) -{ - char buf[36] = {}; - - if (count > (sizeof(buf) - 1)) - count = (sizeof(buf) - 1); - - if (copy_from_user(buf, s, count)) - return (-EFAULT); - - return (kstrtoint(buf, base, p)); -} - -static inline int -kstrtouint_from_user(const char __user *s, size_t count, unsigned int base, - unsigned int *p) -{ - char buf[36] = {}; - - if (count > (sizeof(buf) - 1)) - count = (sizeof(buf) - 1); - - if (copy_from_user(buf, s, count)) - return (-EFAULT); - - return (kstrtouint(buf, base, p)); -} - -static inline int -kstrtou32_from_user(const char __user *s, size_t count, unsigned int base, - unsigned int *p) -{ - - return (kstrtouint_from_user(s, count, base, p)); -} - -static inline int -kstrtou8_from_user(const char __user *s, size_t count, unsigned int base, - u8 *p) -{ - char buf[8] = {}; - - if (count > (sizeof(buf) - 1)) - count = (sizeof(buf) - 1); - - if (copy_from_user(buf, s, count)) - return (-EFAULT); - - return (kstrtou8(buf, base, p)); -} - #define offsetofend(t, m) \ (offsetof(t, m) + sizeof((((t *)0)->m))) diff --git a/sys/compat/linuxkpi/common/include/linux/kstrtox.h b/sys/compat/linuxkpi/common/include/linux/kstrtox.h new file mode 100644 index 000000000000..5dfc56d40d6e --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/kstrtox.h @@ -0,0 +1,310 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2017-2018 Mellanox Technologies, Ltd. + * All rights reserved. + * Copyright (c) 2018 Johannes Lundberg + * Copyright (c) 2020-2022 The FreeBSD Foundation + * Copyright (c) 2021 Vladimir Kondratyev + * + * Portions of this software were developed by Bjoern A. Zeeb and + * Emmanuel Vadot under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_LINUX_KSTRTOX_H_ +#define _LINUXKPI_LINUX_KSTRTOX_H_ + +#include +#include +#include + +#include +#include + +#include + +static inline unsigned long long +simple_strtoull(const char *cp, char **endp, unsigned int base) +{ + return (strtouq(cp, endp, base)); +} + +static inline long long +simple_strtoll(const char *cp, char **endp, unsigned int base) +{ + return (strtoq(cp, endp, base)); +} + +static inline unsigned long +simple_strtoul(const char *cp, char **endp, unsigned int base) +{ + return (strtoul(cp, endp, base)); +} + +static inline long +simple_strtol(const char *cp, char **endp, unsigned int base) +{ + return (strtol(cp, endp, base)); +} + +static inline int +kstrtoul(const char *cp, unsigned int base, unsigned long *res) +{ + char *end; + + *res = strtoul(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + return (0); +} + +static inline int +kstrtol(const char *cp, unsigned int base, long *res) +{ + char *end; + + *res = strtol(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + return (0); +} + +static inline int +kstrtoint(const char *cp, unsigned int base, int *res) +{ + char *end; + long temp; + + *res = temp = strtol(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + if (temp != (int)temp) + return (-ERANGE); + return (0); +} + +static inline int +kstrtouint(const char *cp, unsigned int base, unsigned int *res) +{ + char *end; + unsigned long temp; + + *res = temp = strtoul(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + if (temp != (unsigned int)temp) + return (-ERANGE); + return (0); +} + +static inline int +kstrtou8(const char *cp, unsigned int base, u8 *res) +{ + char *end; + unsigned long temp; + + *res = temp = strtoul(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + if (temp != (u8)temp) + return (-ERANGE); + return (0); +} + +static inline int +kstrtou16(const char *cp, unsigned int base, u16 *res) +{ + char *end; + unsigned long temp; + + *res = temp = strtoul(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + if (temp != (u16)temp) + return (-ERANGE); + return (0); +} + +static inline int +kstrtou32(const char *cp, unsigned int base, u32 *res) +{ + + return (kstrtouint(cp, base, res)); +} + +static inline int +kstrtos64(const char *cp, unsigned int base, s64 *res) +{ + char *end; + + *res = strtoq(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + return (0); +} + +static inline int +kstrtou64(const char *cp, unsigned int base, u64 *res) +{ + char *end; + + *res = strtouq(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + return (0); +} + +static inline int +kstrtoull(const char *cp, unsigned int base, unsigned long long *res) +{ + return (kstrtou64(cp, base, (u64 *)res)); +} + +static inline int +kstrtobool(const char *s, bool *res) +{ + int len; + + if (s == NULL || (len = strlen(s)) == 0 || res == NULL) + return (-EINVAL); + + /* skip newline character, if any */ + if (s[len - 1] == '\n') + len--; + + if (len == 1 && strchr("yY1", s[0]) != NULL) + *res = true; + else if (len == 1 && strchr("nN0", s[0]) != NULL) + *res = false; + else if (strncasecmp("on", s, len) == 0) + *res = true; + else if (strncasecmp("off", s, len) == 0) + *res = false; + else + return (-EINVAL); + + return (0); +} + +static inline int +kstrtobool_from_user(const char __user *s, size_t count, bool *res) +{ + char buf[8] = {}; + + if (count > (sizeof(buf) - 1)) + count = (sizeof(buf) - 1); + + if (copy_from_user(buf, s, count)) + return (-EFAULT); + + return (kstrtobool(buf, res)); +} + +static inline int +kstrtoint_from_user(const char __user *s, size_t count, unsigned int base, + int *p) +{ + char buf[36] = {}; + + if (count > (sizeof(buf) - 1)) + count = (sizeof(buf) - 1); + + if (copy_from_user(buf, s, count)) + return (-EFAULT); + + return (kstrtoint(buf, base, p)); +} + +static inline int +kstrtouint_from_user(const char __user *s, size_t count, unsigned int base, + unsigned int *p) +{ + char buf[36] = {}; + + if (count > (sizeof(buf) - 1)) + count = (sizeof(buf) - 1); + + if (copy_from_user(buf, s, count)) + return (-EFAULT); + + return (kstrtouint(buf, base, p)); +} + +static inline int +kstrtou32_from_user(const char __user *s, size_t count, unsigned int base, + unsigned int *p) +{ + + return (kstrtouint_from_user(s, count, base, p)); +} + +static inline int +kstrtou8_from_user(const char __user *s, size_t count, unsigned int base, + u8 *p) +{ + char buf[8] = {}; + + if (count > (sizeof(buf) - 1)) + count = (sizeof(buf) - 1); + + if (copy_from_user(buf, s, count)) + return (-EFAULT); + + return (kstrtou8(buf, base, p)); +} + +#endif /* _LINUXKPI_LINUX_KSTRTOX_H_ */ From nobody Thu Aug 1 22:27:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9r33tJz5RZZL; Thu, 01 Aug 2024 22:27:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9q5GBRz4Z6D; Thu, 1 Aug 2024 22:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSIdV9pgptEaBbNURAzhdLSexnNfXqHe1JXUDDQhq64=; b=el8EkwIvepFtYnaCucpCgB4UYUNr0wlNJ7wTF27MPqBT6xQMJSrl959pCgYWgnjh5GW8dF bu6tHBg5tG/oCua8EPnsZPNbDMh79QK9tFwSjU/BBAfmtoZ8mcLVNFmmr3qbxhHRVW7h+p 9AoHsBRe/exrsJ89dJtEKCEeo7rqJP/SCMurxHTYn3DN4qPJZdrX5tK513jEnsjZ4YZDD0 rbngRq6k2dcugG02blD6vmDwZd0xSRyYwJ5b+TtOWWjfqnbKbUtaXJctQ/tq+N9hPbI5lh Bl1lEKvrBZ4bLgT3wLRm/XbjsezV830cE0zmO6Bc3ZvQmtdIK3mygWQ1BT3hmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551263; a=rsa-sha256; cv=none; b=D+o53wS1IIxz7XToZqU+qZ7wEnmCXmTUTpgIkhSffvpE8DQle6ppNS+Et2H1p0uEKJv5A8 eFEagqsEeY+SxzoKeZzi08uVf+o+WONEXt7AqTU2Kl28+U6lQcG9faAEzqnHdC6SINrK2x vpY9j4TTIk+9alPod2ex7ZK2laxvkJz1mXtGrgIVnrGGt1AYg+cn/qvsiGCNr7z1jAtgRh ispT0aQc+1SkLtHFcy9gA7nvxPr5Ki+dtLNPZ+Wb9YqIqVKxTgQLOAlFl4Dt0V2yE+PrD0 douHFi07BV9/NT/AHefY2JP3FIA/rIrehFmQar9584vjuqXKZ7tstGklTocq/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=1722551263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSIdV9pgptEaBbNURAzhdLSexnNfXqHe1JXUDDQhq64=; b=DvlxyA4DkpxDuN6IjUs5aaNxbN51RQ/A0rOB8qEYXLElO6Vgec28pVeaY5DCvFc7nVn3B+ oGjgEESui201T2rE/lewEMmi2NoiE6GmJ4R99oSh8mpvl5k7Dw07JrfUNQxprSyW9vyNpp vrzrLqMYhvCGcSkLiQl7d2CRsA84v0erhAVOtoz1qkzid/cdmyk7PcoEu1Pucd+/0FBJyy 5YPcKh0I4GXmpsUYwfUQUbw3mo2Y/e7kWNV8SOhRm69fvlrSoucbGH9rxGxng8tH9Dolbq SBcz97fvbmIE4hci0ENR00o+nR7Ui8zfTLFnsb186An8Jk61Qnl2DkKziUE4pg== 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 4WZk9q4tKHz12tK; Thu, 1 Aug 2024 22:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRhiL027787; Thu, 1 Aug 2024 22:27:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRhpu027784; Thu, 1 Aug 2024 22:27:43 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:43 GMT Message-Id: <202408012227.471MRhpu027784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: ad02fbb03652 - stable/14 - LinuxKPI: Convert Linux integer types to ISO C99 in linux/kstrtox.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ad02fbb0365238f277b93a8aa5092961c3331efa Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=ad02fbb0365238f277b93a8aa5092961c3331efa commit ad02fbb0365238f277b93a8aa5092961c3331efa Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:07 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:40 +0000 LinuxKPI: Convert Linux integer types to ISO C99 in linux/kstrtox.h Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D45465 (cherry picked from commit db42bd1f71b1a29b392aacbd5b7aaca4c8d7e85d) --- sys/compat/linuxkpi/common/include/linux/kstrtox.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kstrtox.h b/sys/compat/linuxkpi/common/include/linux/kstrtox.h index b723bd4a6fd0..0567aa99f7a4 100644 --- a/sys/compat/linuxkpi/common/include/linux/kstrtox.h +++ b/sys/compat/linuxkpi/common/include/linux/kstrtox.h @@ -137,7 +137,7 @@ kstrtouint(const char *cp, unsigned int base, unsigned int *res) } static inline int -kstrtou8(const char *cp, unsigned int base, u8 *res) +kstrtou8(const char *cp, unsigned int base, uint8_t *res) { char *end; unsigned long temp; @@ -149,13 +149,13 @@ kstrtou8(const char *cp, unsigned int base, u8 *res) end++; if (*cp == 0 || *end != 0) return (-EINVAL); - if (temp != (u8)temp) + if (temp != (uint8_t)temp) return (-ERANGE); return (0); } static inline int -kstrtou16(const char *cp, unsigned int base, u16 *res) +kstrtou16(const char *cp, unsigned int base, uint16_t *res) { char *end; unsigned long temp; @@ -167,20 +167,20 @@ kstrtou16(const char *cp, unsigned int base, u16 *res) end++; if (*cp == 0 || *end != 0) return (-EINVAL); - if (temp != (u16)temp) + if (temp != (uint16_t)temp) return (-ERANGE); return (0); } static inline int -kstrtou32(const char *cp, unsigned int base, u32 *res) +kstrtou32(const char *cp, unsigned int base, uint32_t *res) { return (kstrtouint(cp, base, res)); } static inline int -kstrtos64(const char *cp, unsigned int base, s64 *res) +kstrtos64(const char *cp, unsigned int base, int64_t *res) { char *end; @@ -197,7 +197,7 @@ kstrtos64(const char *cp, unsigned int base, s64 *res) static inline int kstrtoll(const char *cp, unsigned int base, long long *res) { - return (kstrtos64(cp, base, (s64 *)res)); + return (kstrtos64(cp, base, (int64_t *)res)); } static inline int @@ -218,7 +218,7 @@ kstrtou64(const char *cp, unsigned int base, u64 *res) static inline int kstrtoull(const char *cp, unsigned int base, unsigned long long *res) { - return (kstrtou64(cp, base, (u64 *)res)); + return (kstrtou64(cp, base, (uint64_t *)res)); } static inline int @@ -301,7 +301,7 @@ kstrtou32_from_user(const char __user *s, size_t count, unsigned int base, static inline int kstrtou8_from_user(const char __user *s, size_t count, unsigned int base, - u8 *p) + uint8_t *p) { char buf[8] = {}; From nobody Thu Aug 1 22:27:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9s6fVsz5RZSj; Thu, 01 Aug 2024 22:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9r60G6z4ZF0; Thu, 1 Aug 2024 22:27:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XuL9CFcQ3Okt4wpRbSZ5UzA6Y4+iuCtQmbYIaLtW/CU=; b=bMtwPP/yZJuJW0IRNtBiSQobKKO+RnV9jeTx7Z0pES0oAj10MfZm+GDTXJu1J8WAl4ex+R 8Vn/DfqhKd+A0+SXhhm29ogp+0yuVi6ilLJqYYU4UwaIZ5QTQstEbsfN/jQnOjlHrIuG+/ 9CuRXCehJAOa3G+xRmDFeIDA+hgIhdLiStDh/m4nyvd3aoApvrWYp/Dkoh2TQCcY0mL7j9 cmV4xomsUumT1VpFCTR12hcI5+f0nz25Q9hREnLV050oS80XVfA/mewBzVys5CuaK+BUn6 hgQtKSH8KUNxkE1JBpuAI45eBMrBNJzhw6eQLmveX80ZJbSspvESUhLIBDN2Ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551264; a=rsa-sha256; cv=none; b=RUr/PE1OmE0NbRok7myvhzbdpetyaoKV2ibmneYrQmujFTkbjjNxCcrU5JM4Jm/r1xo4V7 aUo7WxH+IvKrtVmfaMNH8xOu+YjAa/C/XEfJ7CJHqnvRaYLf4T/+bwHk+Gji6fZcgZQNru 97i9PiQtWm6f3mRHPaT6vCrzmLZgIzanLkW4YPuk01WBpF4WpdJKjSASMdyYDIQJULnG2a qPtAaQ+ttMuU8c1o7Fuj7WCSGVw5IT1cUQRgyRjvggbt2SWyWVroXpXnzX4pseyN7uiM35 DWSjN2bV0WaGAuEpnMj4hPe+EB3dnYuOsf0A/nwG/5z3GHj6LP2V/NN9pJEnkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XuL9CFcQ3Okt4wpRbSZ5UzA6Y4+iuCtQmbYIaLtW/CU=; b=vubC+9mX2FoxxupZrpAnwkRpSHcAvm6Cm2/MN98v3j1LaCEprWZzp9uPskmAin3iOqyL+/ YGceTHFe9jmwC8EMhcmS9LlsyWwxWrM/5GLJaucBPFYjpHYsZnJ7E35g+oGKt6F3AQhVdG IeOaG37G5tIVwHlVY/oWd16pgp0baIOK3HLh32koGpLB4PE887CRkKscSjsU22OlCfw2US MlmIJ6EloY2wZx0k7qJ0cBywzjfem45N1coSJQNW6SR2SyOhv6hTZ73edKdehGohxP+1GC mqVjz1KITgtOdMXXKEf74BPJGy/klwilnfj5qILJW5C7YhXogWxZcQ5tbmKLrw== 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 4WZk9r5ckbz12tL; Thu, 1 Aug 2024 22:27:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRiIR027841; Thu, 1 Aug 2024 22:27:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRi0C027838; Thu, 1 Aug 2024 22:27:44 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:44 GMT Message-Id: <202408012227.471MRi0C027838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 55d41986ffd4 - stable/14 - x86/pci_early_quirks: Sync Intel 11th+ gen PCI IDs with Linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 55d41986ffd4b4c6236075c31c4c1f5448249d41 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=55d41986ffd4b4c6236075c31c4c1f5448249d41 commit 55d41986ffd4b4c6236075c31c4c1f5448249d41 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:42:25 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:40 +0000 x86/pci_early_quirks: Sync Intel 11th+ gen PCI IDs with Linux Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D45617 (cherry picked from commit 249e24d76a7c369fcfd08b1b3d0802dea94b7c6c) --- sys/x86/pci/pci_early_quirks.c | 2 ++ sys/x86/pci/pci_early_quirks.h | 50 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/sys/x86/pci/pci_early_quirks.c b/sys/x86/pci/pci_early_quirks.c index 40340c76005a..275108270bd0 100644 --- a/sys/x86/pci/pci_early_quirks.c +++ b/sys/x86/pci/pci_early_quirks.c @@ -260,7 +260,9 @@ static const struct pci_device_id intel_ids[] = { INTEL_RKL_IDS(&intel_stolen_ops_gen11), INTEL_ADLS_IDS(&intel_stolen_ops_gen11), INTEL_ADLP_IDS(&intel_stolen_ops_gen11), + INTEL_ADLN_IDS(&intel_stolen_ops_gen11), INTEL_RPLS_IDS(&intel_stolen_ops_gen11), + INTEL_RPLP_IDS(&intel_stolen_ops_gen11), }; /* diff --git a/sys/x86/pci/pci_early_quirks.h b/sys/x86/pci/pci_early_quirks.h index 2af0408e0ea5..020e9fd359db 100644 --- a/sys/x86/pci/pci_early_quirks.h +++ b/sys/x86/pci/pci_early_quirks.h @@ -466,16 +466,25 @@ INTEL_VGA_DEVICE(0x5A4C, info) /* ICL */ -#define INTEL_ICL_11_IDS(info) \ +#define INTEL_ICL_PORT_F_IDS(info) \ INTEL_VGA_DEVICE(0x8A50, info), \ - INTEL_VGA_DEVICE(0x8A51, info), \ - INTEL_VGA_DEVICE(0x8A5C, info), \ - INTEL_VGA_DEVICE(0x8A5D, info), \ INTEL_VGA_DEVICE(0x8A52, info), \ + INTEL_VGA_DEVICE(0x8A53, info), \ + INTEL_VGA_DEVICE(0x8A54, info), \ + INTEL_VGA_DEVICE(0x8A56, info), \ + INTEL_VGA_DEVICE(0x8A57, info), \ + INTEL_VGA_DEVICE(0x8A58, info), \ + INTEL_VGA_DEVICE(0x8A59, info), \ INTEL_VGA_DEVICE(0x8A5A, info), \ INTEL_VGA_DEVICE(0x8A5B, info), \ - INTEL_VGA_DEVICE(0x8A71, info), \ - INTEL_VGA_DEVICE(0x8A70, info) + INTEL_VGA_DEVICE(0x8A5C, info), \ + INTEL_VGA_DEVICE(0x8A70, info), \ + INTEL_VGA_DEVICE(0x8A71, info) + +#define INTEL_ICL_11_IDS(info) \ + INTEL_ICL_PORT_F_IDS(info), \ + INTEL_VGA_DEVICE(0x8A51, info), \ + INTEL_VGA_DEVICE(0x8A5D, info) /* EHL */ #define INTEL_EHL_IDS(info) \ @@ -483,6 +492,7 @@ INTEL_VGA_DEVICE(0x4551, info), \ INTEL_VGA_DEVICE(0x4555, info), \ INTEL_VGA_DEVICE(0x4557, info), \ + INTEL_VGA_DEVICE(0x4570, info), \ INTEL_VGA_DEVICE(0x4571, info) /* JSL */ @@ -536,6 +546,7 @@ INTEL_VGA_DEVICE(0x4682, info), \ INTEL_VGA_DEVICE(0x4688, info), \ INTEL_VGA_DEVICE(0x468A, info), \ + INTEL_VGA_DEVICE(0x468B, info), \ INTEL_VGA_DEVICE(0x4690, info), \ INTEL_VGA_DEVICE(0x4692, info), \ INTEL_VGA_DEVICE(0x4693, info) @@ -561,6 +572,12 @@ INTEL_VGA_DEVICE(0x46C2, info), \ INTEL_VGA_DEVICE(0x46C3, info) +/* ADL-N */ +#define INTEL_ADLN_IDS(info) \ + INTEL_VGA_DEVICE(0x46D0, info), \ + INTEL_VGA_DEVICE(0x46D1, info), \ + INTEL_VGA_DEVICE(0x46D2, info) + /* RPL-S */ #define INTEL_RPLS_IDS(info) \ INTEL_VGA_DEVICE(0xA780, info), \ @@ -568,6 +585,25 @@ INTEL_VGA_DEVICE(0xA782, info), \ INTEL_VGA_DEVICE(0xA783, info), \ INTEL_VGA_DEVICE(0xA788, info), \ - INTEL_VGA_DEVICE(0xA789, info) + INTEL_VGA_DEVICE(0xA789, info), \ + INTEL_VGA_DEVICE(0xA78A, info), \ + INTEL_VGA_DEVICE(0xA78B, info) + +/* RPL-U */ +#define INTEL_RPLU_IDS(info) \ + INTEL_VGA_DEVICE(0xA721, info), \ + INTEL_VGA_DEVICE(0xA7A1, info), \ + INTEL_VGA_DEVICE(0xA7A9, info), \ + INTEL_VGA_DEVICE(0xA7AC, info), \ + INTEL_VGA_DEVICE(0xA7AD, info) + +/* RPL-P */ +#define INTEL_RPLP_IDS(info) \ + INTEL_RPLU_IDS(info), \ + INTEL_VGA_DEVICE(0xA720, info), \ + INTEL_VGA_DEVICE(0xA7A0, info), \ + INTEL_VGA_DEVICE(0xA7A8, info), \ + INTEL_VGA_DEVICE(0xA7AA, info), \ + INTEL_VGA_DEVICE(0xA7AB, info) #endif /* _PCI_EARLY_QUIRKS_H_ */ From nobody Thu Aug 1 22:27:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9v3Zfgz5RZXY; Thu, 01 Aug 2024 22:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9t04LPz4Z2K; Thu, 1 Aug 2024 22:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LTJMSjb67SpNYdHjl2LlDDEdGlg6QIB5ktDZQBHnpvU=; b=DoLSszOZyhSzv/6cVzVf8bOZ/wlbnIqKhbECcp+b9YJrCQ2n3peLqHXeezMMnw5DJ0i2aX 4Iu7WtYP+t5G9TQo0oPr5ujZgxvk384/IRPAer9aCw/nrZXfQNo0sOb9mkkYTstxkjUbqW basBuDDXTH5Enr5a0vu3rgimEM1gIbswZZvShpKXZzYeUDNvtQmo0Yud9y1Hr0Qibmi+NU GEp6YywLaYdZnKjsuOw+f+BxzTcdDUWnPIhpGUjllj3D1WnEbehe879WiajD61/SIL8ArA nDuhSSNekak7Y9kR/ivlrtIGduLt0OhNyN/4endMLge/Y20Txkj3VsikqHCxnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551266; a=rsa-sha256; cv=none; b=RgiMzjp8iVA+Arnhe/m0lTN+1UntBwOQrynK91rF5KTMkaTQqnOaAeL8UEGVg/lhGTMRiH sm62bzFtQB5pxUzG5U0JnyYgJ/5uzdtbZ0trp+h/84Zdx2YciHIXaoSeh6GUoC7vP7wK3D JrPAH8XKDqgiW/GywuOGsw3FnjU0yFf5jA/nM4bZETx5XgayVgkt5yOuwqN0vui8T13o/3 2Q926SE4NVF2+Hs794xv905ykF/AbWWBL4LTGH8WfFovr+9gdp67ZMe1+Mx0DpLEkbqKe7 tE66nBKUR2SaKLmUqOW3r/oGWbn53yn5BN+/jF03vP8OmPk7azswdC/pDoksdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LTJMSjb67SpNYdHjl2LlDDEdGlg6QIB5ktDZQBHnpvU=; b=bjveuxwRW/S7ICbMfHmnlbNFqVMrlQ8kQ0AzdNaoaPZ1H32kLzpRtAQR/mfcRWuws0AAOm iNkNHycZ27y+pLNEwKfyDv7u08o8BNf3/FfhHa5szQDo4Jwr1xusFQScrQhP02S8xy45RT Q4Ampr+MWaivuQ7jJaIyK8kFefdY5rcw6gYrTuVqJIE7NgN84mTm2eC0TGmABYb51LsNCx 6IEgPbhSxQGTv+WUVqWAMmEwy4T1XyQvkMs2SYdc1otUgfbnx7hUNShY0PfL8hknMUTian /PfBgg+8iT+vHs4ESw1EgWZ2P1LyR8Ln6AkQXC1XNJjPGXRyT7EsLLjggLOe1Q== 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 4WZk9s6nTVz12hs; Thu, 1 Aug 2024 22:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRjTE027880; Thu, 1 Aug 2024 22:27:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRjCc027877; Thu, 1 Aug 2024 22:27:45 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:45 GMT Message-Id: <202408012227.471MRjCc027877@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 4f0f1f1a6e2a - stable/14 - LinuxKPI: Add rb_add_cached function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4f0f1f1a6e2aabd265cc6e25fd14c846da1bb8b8 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=4f0f1f1a6e2aabd265cc6e25fd14c846da1bb8b8 commit 4f0f1f1a6e2aabd265cc6e25fd14c846da1bb8b8 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:43:16 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:40 +0000 LinuxKPI: Add rb_add_cached function rb_add_cached inserts node into the leftmost cached tree Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45608 (cherry picked from commit a5cac2e672a7d94c0391076e7452d6a487f7b5c1) --- sys/compat/linuxkpi/common/include/linux/rbtree.h | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/rbtree.h b/sys/compat/linuxkpi/common/include/linux/rbtree.h index 78bf938eb000..e6033cfd760d 100644 --- a/sys/compat/linuxkpi/common/include/linux/rbtree.h +++ b/sys/compat/linuxkpi/common/include/linux/rbtree.h @@ -175,6 +175,30 @@ rb_replace_node_cached(struct rb_node *old, struct rb_node *new, root->rb_leftmost = new; } +static inline struct rb_node * +rb_add_cached(struct rb_node *node, struct rb_root_cached *tree, + bool (*less)(struct rb_node *, const struct rb_node *)) +{ + struct rb_node **link = &tree->rb_root.rb_node; + struct rb_node *parent = NULL; + bool leftmost = true; + + while (*link != NULL) { + parent = *link; + if (less(node, parent)) { + link = &RB_LEFT(parent, __entry); + } else { + link = &RB_RIGHT(parent, __entry); + leftmost = false; + } + } + + rb_link_node(node, parent, link); + rb_insert_color_cached(node, tree, leftmost); + + return (leftmost ? node : NULL); +} + #undef RB_ROOT #define RB_ROOT (struct rb_root) { NULL } #define RB_ROOT_CACHED (struct rb_root_cached) { RB_ROOT, NULL } From nobody Thu Aug 1 22:27:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9q6nnSz5RZN0; Thu, 01 Aug 2024 22:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9p44QQz4Z1l; Thu, 1 Aug 2024 22:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GsrRceYU7bueKJuQuuG4ux2jZp9Qgyfxnly72tZIaZI=; b=snL8W+Vs/Z3fGotZB/7uql63EMhdQk+NHStaZIZ3Q1+MszcUHwFqr6t1mKqKb+HYiZkNCY b2d9bhRethr3ve1/9u0OJotHetP5l1tNaXS7UVgXoNr/chotcc11AU+mg5J1/Nu1LeYJkE LxDGwBtOhbK7dZQg6nsIEFIgeV57GgxtqaYsJKIq1oLjmQz7vrtHT9fzLxL94wQD9fAhiS CR6DxaNaRE4Krrx7sqQoRjXc4l81amuKSqN1Oj+UYyZpieAKsDslxXjZvmxGLVHdTEDTBS 1z3Lm9IFDTfS8JFeB+SMTsgtCMv9xJLA9221hAS1ZqAxftznb9S73txqtazlcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551262; a=rsa-sha256; cv=none; b=B0hMz7XNDovx+M7MlzRKS3HZNIOY1U90Do5eXy4Ko6Ne7hhTYJxppyaLU4V1KTCKKfrENf YCcojToAiEhGsszl2FzV/j0PUQJUTE/YMKSSDWpxhCXS3AtMsfyksGtBIrzoIdSOdtBByw e3T3KbbZFbOGPfk2Sb0hDAgP6n4bMNxLyBv0qqWSzlgrcr6WQIp2v7boUgmZUq1aPHnM+2 B8m2EfyW+2ewHCx7QMcyngGQN+mxG/HSuvAKa6w+5IkcsdLk6Km44ctzdBVEN0L3IX5mee 3rbPmDxmcJ5az5yKhoGMjeXIPqdsbauAuXZ3xMzazOonzPXVj0Bmx2DqyHI+Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GsrRceYU7bueKJuQuuG4ux2jZp9Qgyfxnly72tZIaZI=; b=qu97TciAoJgmE5oDOxTbhlrZFrjZwzu5DXQINI3GkPQcUKRrdSFosYgLkmRPr7zy5QBnBP Ot9kGotvBVXSo88qM6hkyeQ8NNR1UMKH9I6oHGRx1Dm8a3qYrkkPlKgxsyRsoBchLlh/5t REPJ+bQ0BKw4yNAkveVRxtJlTfmgDumCtOvil/TFr4q/AkCnEAu5BaQpowp19RGvmtkOag LSQrZBco1O/UQ1+ZbFPMt4d6SkRGNf1d2eni4uhFy6YXXhbgP+RGv6tenyq6TCSWhOFgrY lKoEj/aMFC2ElS8Jb9NtV/ZfDFMsdIRzbrEJ1taPloWa0DjUVo/IIlaJz9OYbg== 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 4WZk9p3WXGz12np; Thu, 1 Aug 2024 22:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRgsb027728; Thu, 1 Aug 2024 22:27:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRg95027725; Thu, 1 Aug 2024 22:27:42 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:42 GMT Message-Id: <202408012227.471MRg95027725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 89e36e9f296b - stable/14 - LinuxKPI: Add kstrtoll to linux/kstrtox.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 89e36e9f296b9592d70798abaa5a6e1edfdb63ad Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=89e36e9f296b9592d70798abaa5a6e1edfdb63ad commit 89e36e9f296b9592d70798abaa5a6e1edfdb63ad Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:07 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:40 +0000 LinuxKPI: Add kstrtoll to linux/kstrtox.h kstrtoll converts a string to a long long. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D45455 (cherry picked from commit d207a2dee332706c352bf35c7e6ecea5240b1ceb) --- sys/compat/linuxkpi/common/include/linux/kstrtox.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kstrtox.h b/sys/compat/linuxkpi/common/include/linux/kstrtox.h index 5dfc56d40d6e..b723bd4a6fd0 100644 --- a/sys/compat/linuxkpi/common/include/linux/kstrtox.h +++ b/sys/compat/linuxkpi/common/include/linux/kstrtox.h @@ -7,6 +7,7 @@ * Copyright (c) 2018 Johannes Lundberg * Copyright (c) 2020-2022 The FreeBSD Foundation * Copyright (c) 2021 Vladimir Kondratyev + * Copyright (c) 2023 Serenity Cyber Security, LLC * * Portions of this software were developed by Bjoern A. Zeeb and * Emmanuel Vadot under sponsorship from the FreeBSD Foundation. @@ -193,6 +194,12 @@ kstrtos64(const char *cp, unsigned int base, s64 *res) return (0); } +static inline int +kstrtoll(const char *cp, unsigned int base, long long *res) +{ + return (kstrtos64(cp, base, (s64 *)res)); +} + static inline int kstrtou64(const char *cp, unsigned int base, u64 *res) { From nobody Thu Aug 1 22:27:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9w3Tfmz5RZmZ; Thu, 01 Aug 2024 22:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9w1rzwz4ZFP; Thu, 1 Aug 2024 22:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iU/FQG3pm9hGfgUzpWz8EwbQU3n2nQrdfu/kFJHq2vw=; b=RoX+PQavWSRpRCXepOPplkbZIp4NKICfUdKpmym6XLKmYlFlHCCNRGORL/8YdVc+GQIBWF HucK7f3UULIXPGSjW9eGJXMGGJj1EAJbXcIzni3akim9Mr98ql5UXXpJXfnj7xS7SyvrZ7 VtxjtMp6riJAGTYzC7MGmJa5saPqSyue/MdsqSAQ2Q0906OEIP4s8lGrK/EzERJ7G80ljH cnDVZPfpUy4fUZKpJmG7LQBN6eo1Olbb8+MUPYGvAp+69g/tldJfhCOzGitEzwnbXjGBlw NHLGRQQW/qGTlcRpnAU3NZYOnF+3ZgE36TOEuJEEjluI+GR+RZx/VpDAOVDVGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551268; a=rsa-sha256; cv=none; b=uIw6SLzBS9Naej8qW8GYXwmxkIjBT/XRQMLNL8U1zmQIhUjy409kaZJFABA4IxE56fH45I EkFporo5KoDAQmlww9nEqfRetc633QHVTAeJfh+P3oIgZK31B9mN4EShTYB657RgUDKdZu 0J0GPu7o/kjBsfo+Aup6ywY1VbcYMQ4QgQj3Y7avsmrSzaoAN7cPqAjzM+REHInXsyToDm nWq8IMo179dJw5J3wV9QOgh2fgnHRIQ68U/WSFs59wU+iugu3FgJh55oJTytC4S6OJSYrM oedm8nzD9WLSsvwFIfBJ2yV1ilmwQSQxnWYo8Eh2Go4yV+ZjbgVzDGDRRI0weg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iU/FQG3pm9hGfgUzpWz8EwbQU3n2nQrdfu/kFJHq2vw=; b=xwh1/8+go7jtVlgbZdWBZAeQSKVxk0QqBGeDcRf+NvA826dnDRKO3iYCjY/o+38LZdUZPo btA3xpGiS8FCSpW/SdYmSwgQsvzWla87PRIdCqFYaxeq2cBjFeGlQ5DeV/pUlxmvJVhdSS Kxw8uQ5tQYTMnsDsSzg/Bok2pC0/B75fRU+0AWaGVeO3+01lZmSVHDU/Y96atx8vrnWYfq 5cRNdaLPAxmsSDjdV0oSZt0vDVh+HRFe9oHGxfcPr9HmJUDXE49yQ6/RhVRlVr0dIQdeSC uWJ4UY32g4mV8YW1rVT9+/CzKAAYn5VXftxqsjWsezTcfTYUvQcjD7w808TUIA== 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 4WZk9w15nXz13Cw; Thu, 1 Aug 2024 22:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRm3T027991; Thu, 1 Aug 2024 22:27:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRmfg027988; Thu, 1 Aug 2024 22:27:48 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:48 GMT Message-Id: <202408012227.471MRmfg027988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 1e30fc5d7ffa - stable/14 - LinuxKPI: Remove owner argument from class_create function on KPI layer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1e30fc5d7ffaa39281a0309c594a031d74ffd20a Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1e30fc5d7ffaa39281a0309c594a031d74ffd20a commit 1e30fc5d7ffaa39281a0309c594a031d74ffd20a Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:44:12 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:40 +0000 LinuxKPI: Remove owner argument from class_create function on KPI layer to chase Linux 6.4 Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45610 (cherry picked from commit 460908ea55e67baf85d5cd1b6093154739cc0b9a) --- sys/compat/linuxkpi/common/include/linux/device.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 770c5c334c9a..98c16212512d 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -342,6 +342,9 @@ put_device(struct device *dev) } struct class *class_create(struct module *owner, const char *name); +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60400 +#define class_create(name) class_create(NULL, name) +#endif static inline int class_register(struct class *class) From nobody Thu Aug 1 22:27:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9x4yHPz5RZY5; Thu, 01 Aug 2024 22:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9x2Nf0z4ZQq; Thu, 1 Aug 2024 22:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWEf98xe0AtT7wGu5bUgk6P39p2EMQMaYlP6QRh8oKI=; b=dD10rauL5BsC+/7ee7CwMfgyvP2KsI+zymqc9pZTeZ2Hm4Q/L95vcCz5iYsJmZOtkWtU2c 1cPbtImPzfQEVYQ8FVjJbmsljt4FeEta0tIl12c1GtBRNtHmPjhjDiYMWPCBUoJK+NyzHL K4vHuaY0WbWT/7DxLFL6cq0nKhWqZ2M9pqFLYPoA7aXx20ZoMghEFkF2cNu/zZBxPuFCO8 2ufSsotg61PnFSp3fsW7lWx90Z6c+W6X6HrZ/krBQVSNvVKRnYtCkXs7OKl56oT1jK2iBM nUio5VUKJyiZ3ySHjznyxEQR7ISweq95WsKL30nNVFIDBYsZSWjyA+6qOfc8eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551269; a=rsa-sha256; cv=none; b=Vuk3RSKHd9rJWNNYSm0MUa1YgEVyEX2WF1lF9FNIo3g9VSUCHRmx5xgi2mUWw1AOxKyPL+ r41LeQEr+VtDpD0m+mY5JQ3AlzkIwlR4pe6OkfCAZARx6hPd/BgOYsAtyghxEtz6QJQ+iA eOdDc8As1Lmb7ixGdvyDvJ4Z+ZqodWPQG4BXabj0rvaGK55eiPSBIHc9QvF/Jt2Yqykh4u mVybJUyTbnM90CnNg64o8gnRQnfzloz76PhdJ8a2tGxJpKRvWbkUnnlKxQXUCxLaA27Ofl vGDd3jvAkvfPG4Al5kujOK3xL4Jx3GaH0Tux0VQIv6xcLBaids6MH8M/zYYyOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWEf98xe0AtT7wGu5bUgk6P39p2EMQMaYlP6QRh8oKI=; b=rRuY+EQfW0SeyCgVQnyZznmULfZplMttyh68WU9Cu4WRyDX9qnhuqcN+TradwDJj/wZ/vx /VIiBh2RMoRvh+a9+K2/I+AN9VvsUqvyF6481xtlwH1UiJdyYJW6m74ZE8SyhXH9ntzET3 s334pLXI0vA2sP7aBMoAA7TeMbuaGWXX6W08LfYfL+dKZsSIG/TwDLOydchrKsBXoKXxSZ zk9/PyIxQC7usfaA5lT/qUmlCqxs0y5woHAmCH+UDggx3RA6zUXRZkNg5rmKdLSpx9PEiw aFG+8Dzk73nR0o9FvWIogmp9COhHZOMZ3XxAN05aUeTpmj4SYfM38f3gyw+vVQ== 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 4WZk9x20d8z12nr; Thu, 1 Aug 2024 22:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRnqs028036; Thu, 1 Aug 2024 22:27:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRnI4028033; Thu, 1 Aug 2024 22:27:49 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:49 GMT Message-Id: <202408012227.471MRnI4028033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 28b5a9b45888 - stable/14 - LinuxKPI: Add smp_store_release and smp_load_acquire functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 28b5a9b458886028e64147996ff0745af23388e8 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=28b5a9b458886028e64147996ff0745af23388e8 commit 28b5a9b458886028e64147996ff0745af23388e8 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:44:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:41 +0000 LinuxKPI: Add smp_store_release and smp_load_acquire functions Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45611 (cherry picked from commit 597ffdc1d3503110165dd57685c29da64386a7db) --- sys/compat/linuxkpi/common/include/asm/barrier.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/barrier.h b/sys/compat/linuxkpi/common/include/asm/barrier.h index d09f9c6d2c97..39c5139cb322 100644 --- a/sys/compat/linuxkpi/common/include/asm/barrier.h +++ b/sys/compat/linuxkpi/common/include/asm/barrier.h @@ -58,4 +58,7 @@ #define smp_mb__before_atomic() barrier() #define smp_mb__after_atomic() barrier() +#define smp_store_release(p, v) do { smp_mb(); WRITE_ONCE(*p, v); } while (0) +#define smp_load_acquire(p) ({ typeof(*p) _v = READ_ONCE(*p); smp_mb(); _v; }) + #endif /* _LINUXKPI_ASM_BARRIER_H_ */ From nobody Thu Aug 1 22:27:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZk9z2ZY4z5RZbl; Thu, 01 Aug 2024 22:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZk9y3QSFz4ZR5; Thu, 1 Aug 2024 22:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ZrgE7al9u+Aaa5hcrumNZkhpLhcD7uo020zqqKrF0M=; b=c3H/ufanryCTH1HNo+xZehKDZEn1I/p9BzG/pUS8RI1RNok3yzqvIuZqvuercFdLvoSBbp HMGXyFwUiGlghYqpqecy9pGlgjBSrMG+t/8HN77vmL9l71mhTZWmOxqDoMTXXrER5bRaNu hnMtCy5R4DMFi6KVk0RhtgD/tzV4/p/Ei1Ym3S67c0echRLSihvE3xO4Z2ZN+YKbnPB1qY 5aFwp1QmfiOFi4kNtHTwiDGmS1rrUZ35fYf9in4U5Q6jYJIv7ylfxlUkDmKluYJL8YiIXn rbjauObmkV8ThPYhy+YtfUjuz1YMOI/dBy3mZXKyax0QfshtnZbmDVMUshg8Qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551270; a=rsa-sha256; cv=none; b=KcXgf9pK5p68Nh3gYFE6VszR900bhaPsf4omYpgXORsg5wRkkZLkp2cdKVwXTvBj1x6k/n 3qD486USq6mMRynbOe+xBpbaMA/VvkTqUbFw2xnIFu0iYRh9PMk+oDuseG0Sobzbsw8s42 wQsWaiNcBJ77SES/fDcIvuPp1jWo8/PgUldvF1oF1/HXY6c1F3Cxxu6eXKKXjgbFmWoZkU EnY3DIQAOsoMADwAE87ozadUAGXB0keVS1LewIzPaeSjyTKdsSzIx5AgzyCt4F/hlQIqsD mnuWW+aE9lWYnRY+7SSCuE4p/rvld3ip6HxHjt7LErArcGDvnyEOBQuf09Oezg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ZrgE7al9u+Aaa5hcrumNZkhpLhcD7uo020zqqKrF0M=; b=fmhZSYBNzPtW5SyD5KDUalHbjw3hroNsXqTDDhwGp4sQnIDo6iTiEE5vF4hg5jvvaqLqAg /UndC7yT44WZBYmeQNAUvzpV3fVEdWgpFhGEtrF5+at2iCnhFOTL7F2JfFD7ZPDwfkBZQY splVGgQgVEljKIEtSiOxNnSNOEcTgGfOF+z3jJZyF8yVT1MHOr/B7752gejLcx3vxxH7Ft e2Cu3JlJssfzwsWFp5jY5RABE0qMo6Ub4QM0PXmFnGi37ppf3qKw11V2L3bYfOzSpH7w4x XN6RqIkfgdH6mEL0v2cJDfZb2O4m63X+mfEwMTpzwYN5mPrYkB4ldKOUPxtBug== 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 4WZk9y32V3z12Jm; Thu, 1 Aug 2024 22:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRofe028084; Thu, 1 Aug 2024 22:27:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRo9U028081; Thu, 1 Aug 2024 22:27:50 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:50 GMT Message-Id: <202408012227.471MRo9U028081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: fe431f8c0822 - stable/14 - LinuxKPI: Add header polution to compile linux/numa.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fe431f8c08225715b97250040bb263603c1861e9 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=fe431f8c08225715b97250040bb263603c1861e9 commit fe431f8c08225715b97250040bb263603c1861e9 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:44:56 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:41 +0000 LinuxKPI: Add header polution to compile linux/numa.h Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz, emaste Differential Revision: https://reviews.freebsd.org/D45612 (cherry picked from commit d21316ff22b1468304b6db9c336f66a09c4f7be8) --- sys/compat/linuxkpi/common/include/linux/highmem.h | 1 + sys/compat/linuxkpi/common/include/linux/mm.h | 1 + sys/compat/linuxkpi/common/include/linux/mmzone.h | 1 + 3 files changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/highmem.h b/sys/compat/linuxkpi/common/include/linux/highmem.h index 252d16b2ea70..b8874481f9c6 100644 --- a/sys/compat/linuxkpi/common/include/linux/highmem.h +++ b/sys/compat/linuxkpi/common/include/linux/highmem.h @@ -43,6 +43,7 @@ #include #include +#include #include #define PageHighMem(p) (0) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 41af4be4c015..e2bda799dc77 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/compat/linuxkpi/common/include/linux/mmzone.h b/sys/compat/linuxkpi/common/include/linux/mmzone.h index 49cc218c6fce..9fd481e18ee4 100644 --- a/sys/compat/linuxkpi/common/include/linux/mmzone.h +++ b/sys/compat/linuxkpi/common/include/linux/mmzone.h @@ -4,6 +4,7 @@ #define _LINUX_MMZONE_H #include +#include #include #define MAX_ORDER 11 From nobody Thu Aug 1 22:27:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkB35YxFz5RZbw; Thu, 01 Aug 2024 22:27:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkB275Pwz4ZTS; Thu, 1 Aug 2024 22:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BA9O7DeYyNxY7oGZOzwbtJznsz5Y+6X8QkULG16IYSE=; b=u4omA2FfGkoI/ISCk3oGWJgynPodEG7CCDGSEAl9tLHIBlW1MmtJfm5KCL4n2S3cuGaMId poAzJW5uxCjA6fHoutbTvCSql8b7uVIAhHJQw9l4mn/XJ6/3JOZnW4AMF5Nh65F8WwatJi G6JSzF+u6nFKTld85iqwkTOXhmal2qN7KNWXENxXRrcw1Dbnm4vGZtx6KjavlSh2oYQOr7 bX0OgE0xHLZVtd06/yju1mfDe+F9gzqo53LHnNgUxjXsZboEOkafNGYZiVzISqbguXK/mM IUWLjVLTZfr8CT6UvN8q4rySTI3PxSX/Iv5YGXZUmgfZNhelaYLKRruUarAozg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551275; a=rsa-sha256; cv=none; b=MRmsJLkeTnGS3BqLk3+0iQpRXT4s82XLirGWpjwtUhhldZEFq4/quDiwHZT+jhA9KHfBgT 0gju3Bl4nVNxLtlLe0Wb1MxRcVAgqGO2EUU63dp7hzPNcYykGkJCAkvKKr36GKTOfQDC90 s3ucogVZIcavtYl+pSAJhidAXbJzq1pFFPuM8VH/UXym81QwdyEkzncf+i+09/65ikze2H 6CsMOBQTKbR5kdiM3LhpJNYXMHjKolysQb/8zeQgtUvLgBQr3u2JPyF4KjV+uC7cv3Vhxd 2ZkCCKFmI8wpWQwQDaLZeXiPrKLGODjDPh1wVZI5Zm3PYOa/jwS6rva4pobAmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BA9O7DeYyNxY7oGZOzwbtJznsz5Y+6X8QkULG16IYSE=; b=GoTVR2eMeYz7E1kVCqsmUU9VW9YlHq6wi4GWfymh3/AB/bM4EX4KzNhoX3x5WpFb8yaw8/ zpmqdCFFzos+wsujD6WoxfINoqMx/e4/J09UhDv6SbFjSJ39wXrhEefnKFsNz0dmIB4Ia9 hexB78qeTAYXIlXRzoYen8ONEgS9z04sP3MO2osY9y24IFR7ip8+msHqZR9C7nH3Csyz8d ZLTFWK+FyvTrfFSk9JnQOpzH82ddRgpxeFdKzQKP+ts6pq5Zfq7aUAi4kdYzctldAUCBWG xpcQGj0ShGz+Jh9z7h1AZ0tVsGIjRDdiPYeS0JnEe2aKHXjljUby4sAUMNPuwA== 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 4WZkB26jZJz12l9; Thu, 1 Aug 2024 22:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRsuu028275; Thu, 1 Aug 2024 22:27:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRsQG028272; Thu, 1 Aug 2024 22:27:54 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:54 GMT Message-Id: <202408012227.471MRsQG028272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 88ca9c822616 - stable/14 - LinuxKPI: Add DEFINE_DEBUGFS_ATTRIBUTE_SIGNED to linux/debugfs.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 88ca9c8226165e31991c25a246d825706c8ec2e7 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=88ca9c8226165e31991c25a246d825706c8ec2e7 commit 88ca9c8226165e31991c25a246d825706c8ec2e7 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:51:34 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:41 +0000 LinuxKPI: Add DEFINE_DEBUGFS_ATTRIBUTE_SIGNED to linux/debugfs.h Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45615 (cherry picked from commit 8c5c572125665e3fd8a033d1a8b0a370e5a43e24) --- sys/compat/linuxkpi/common/include/linux/debugfs.h | 2 ++ sys/compat/linuxkpi/common/include/linux/fs.h | 12 ++++++++-- sys/compat/linuxkpi/common/src/linux_simple_attr.c | 27 ++++++++++++++++++---- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/debugfs.h b/sys/compat/linuxkpi/common/include/linux/debugfs.h index 470b50cb730c..13186334d75c 100644 --- a/sys/compat/linuxkpi/common/include/linux/debugfs.h +++ b/sys/compat/linuxkpi/common/include/linux/debugfs.h @@ -88,6 +88,8 @@ void debugfs_remove_recursive(struct dentry *dentry); #define DEFINE_DEBUGFS_ATTRIBUTE(__fops, __get, __set, __fmt) \ DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) +#define DEFINE_DEBUGFS_ATTRIBUTE_SIGNED(__fops, __get, __set, __fmt) \ + DEFINE_SIMPLE_ATTRIBUTE_SIGNED(__fops, __get, __set, __fmt) void debugfs_create_bool(const char *name, umode_t mode, struct dentry *parent, bool *value); diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index ebe262926e97..74288f9cd461 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -375,7 +375,7 @@ simple_read_from_buffer(void __user *dest, size_t read_size, loff_t *ppos, MALLOC_DECLARE(M_LSATTR); -#define DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \ +#define __DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt, __wrfunc)\ static inline int \ __fops ## _open(struct inode *inode, struct file *filp) \ { \ @@ -386,10 +386,15 @@ static const struct file_operations __fops = { \ .open = __fops ## _open, \ .release = simple_attr_release, \ .read = simple_attr_read, \ - .write = simple_attr_write, \ + .write = __wrfunc, \ .llseek = no_llseek \ } +#define DEFINE_SIMPLE_ATTRIBUTE(fops, get, set, fmt) \ + __DEFINE_SIMPLE_ATTRIBUTE(fops, get, set, fmt, simple_attr_write) +#define DEFINE_SIMPLE_ATTRIBUTE_SIGNED(fops, get, set, fmt) \ + __DEFINE_SIMPLE_ATTRIBUTE(fops, get, set, fmt, simple_attr_write_signed) + int simple_attr_open(struct inode *inode, struct file *filp, int (*get)(void *, uint64_t *), int (*set)(void *, uint64_t), const char *fmt); @@ -400,4 +405,7 @@ ssize_t simple_attr_read(struct file *filp, char *buf, size_t read_size, loff_t ssize_t simple_attr_write(struct file *filp, const char *buf, size_t write_size, loff_t *ppos); +ssize_t simple_attr_write_signed(struct file *filp, const char *buf, + size_t write_size, loff_t *ppos); + #endif /* _LINUXKPI_LINUX_FS_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_simple_attr.c b/sys/compat/linuxkpi/common/src/linux_simple_attr.c index 27dc7beb8707..ecd1e135026c 100644 --- a/sys/compat/linuxkpi/common/src/linux_simple_attr.c +++ b/sys/compat/linuxkpi/common/src/linux_simple_attr.c @@ -139,12 +139,13 @@ unlock: } /* - * simple_attr_write: write contents of buffer into simple attribute file + * simple_attr_write_common: write contents of buffer into simple attribute file * * @filp: file pointer * @buf: kernel space buffer * @write_size: number bytes to be transferred * @ppos: starting pointer position for transfer + * @is_signed: signedness of data in @buf * * The simple_attr structure is stored in filp->private_data. * Convert the @buf string to unsigned long long. @@ -154,8 +155,9 @@ unlock: * On success, number of bytes written to simple attr * On failure, negative signed ERRNO */ -ssize_t -simple_attr_write(struct file *filp, const char *buf, size_t write_size, loff_t *ppos) +static ssize_t +simple_attr_write_common(struct file *filp, const char *buf, size_t write_size, + loff_t *ppos, bool is_signed) { struct simple_attr *sattr; unsigned long long data; @@ -173,7 +175,10 @@ simple_attr_write(struct file *filp, const char *buf, size_t write_size, loff_t mutex_lock(&sattr->mutex); - ret = kstrtoull(buf + *ppos, 0, &data); + if (is_signed) + ret = kstrtoll(buf + *ppos, 0, &data); + else + ret = kstrtoull(buf + *ppos, 0, &data); if (ret) goto unlock; @@ -187,3 +192,17 @@ unlock: mutex_unlock(&sattr->mutex); return (ret); } + +ssize_t +simple_attr_write(struct file *filp, const char *buf, size_t write_size, + loff_t *ppos) +{ + return (simple_attr_write_common(filp, buf, write_size, ppos, false)); +} + +ssize_t +simple_attr_write_signed(struct file *filp, const char *buf, size_t write_size, + loff_t *ppos) +{ + return (simple_attr_write_common(filp, buf, write_size, ppos, true)); +} From nobody Thu Aug 1 22:27:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkB53Mcvz5RZpx; Thu, 01 Aug 2024 22:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkB42Tqtz4ZX4; Thu, 1 Aug 2024 22:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u+XW0fw9k2ty3+WsVx4UA95YE5mTHJtxKL+THtAVaW8=; b=j86kX6a7ana+/TTKkLYmASOxIxzqNNwAR+kMBp/GUrXgWMdCOx/O8grd8hBeQkGVNonzmr ffDGReKG6wcAMc1N1mdTQdivouh7EU1pjKvXNNMrgbuEummPyj9Kvp5MTdJe8ANBThLDZZ ckt2tuWUjBf0kzxmvXaPhvdYc2tkyBV/O3e1OKg35gdegQ23hksX0G9Ns5NxrmW7asC/Ez oEaomVLrU3bL9OnpF83DC1jLUpVDunrgiXxjA9diq4nGVV1lJuPnd7Q7xKFgxtdd5OeDYD 5CHBxroqyB7m6E+vJ553QgW5IToPiPkOg24wCFOlk0calS93pP6jh0gEBy9wmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551276; a=rsa-sha256; cv=none; b=j4oF/gu6PhCkXIR3/qC5BGAJYNLjubpY9CXFXyNtOBopOvwu52OQ8pjhjz66pJkraJtRIg Gk387dzvKjs9TTckyCEomXn32X7GMKoI6CYVxuoX197u9LFl3eNMVWwIMLEWxaKy/EumPc 4VP2LRYsb4JPlHxqGjSLbsFSx2+EgNA75eBa2oOdoC9aEM+TGY1le1FKJGfBecbEDsI19E 8zxvyxeJKbA367mx/XmeO/aDGu8hkhbiaSyyPjQJ+Gufb+L9LRovkubLZ2VtNz4Pwy8dZS zasCifelA1d5WFFny5gJB8cKbmrP4Q6hKiFGXj1MAuTYRqvZGkSJp6gG3f4twA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u+XW0fw9k2ty3+WsVx4UA95YE5mTHJtxKL+THtAVaW8=; b=e++qd5Xk5fxFDDrD4Ub5+k3++647cj6x5u8aCYo1xCvsHKZJjniIwmetsZrzqigNMfv0ml ePBt+lxOvckzhVWqFVOC7NR+btzR63+Oxh9tLNNSSoqElknkoXU1+ynkzP1bFIGmQNUqsC 1Yai1nghy67FxueLN3KQLi+g6Yt6e6ynHYJeloOaUawiz6NPxAre1dRYYLVW7GQSuXH5cC KegeMI+R/7wX8D3Jmnfgo84okOenceW2lcG+grGIFaR+gnwcFhRdcNFmaN2TdBdu7GSaOW HxKgDrLrFZUg9wNY1kaJg5mLzLWRw0gWCWxFtHB8WeXIGC8WESV72hADsQEBDw== 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 4WZkB40rpPz12tP; Thu, 1 Aug 2024 22:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRufJ028334; Thu, 1 Aug 2024 22:27:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRuRu028331; Thu, 1 Aug 2024 22:27:56 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:56 GMT Message-Id: <202408012227.471MRuRu028331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 8a6ec2975633 - stable/14 - LinuxKPI: Automatically enable drm support for devices named "drmn" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8a6ec2975633f9649c1d8fcb92df55a8a349f554 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=8a6ec2975633f9649c1d8fcb92df55a8a349f554 commit 8a6ec2975633f9649c1d8fcb92df55a8a349f554 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:02:08 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:14:03 +0000 LinuxKPI: Automatically enable drm support for devices named "drmn" This allows replace linux_pci_(un)register_drm_driver calls with driver renaming to FreeBSD name. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45906 (cherry picked from commit 5d20075f8b9f7107aa0a246e5165d9816e816a44) --- sys/compat/linuxkpi/common/src/linux_pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 551b924d6f5e..3ed0f268d5f9 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -975,10 +975,10 @@ linux_pci_register_driver(struct pci_driver *pdrv) { devclass_t dc; - dc = devclass_find("pci"); + pdrv->isdrm = strcmp(pdrv->name, "drmn") == 0; + dc = pdrv->isdrm ? devclass_create("vgapci") : devclass_find("pci"); if (dc == NULL) return (-ENXIO); - pdrv->isdrm = false; return (_linux_pci_register_driver(pdrv, dc)); } @@ -1165,7 +1165,7 @@ linux_pci_unregister_driver(struct pci_driver *pdrv) { devclass_t bus; - bus = devclass_find("pci"); + bus = devclass_find(pdrv->isdrm ? "vgapci" : "pci"); spin_lock(&pci_lock); list_del(&pdrv->node); From nobody Thu Aug 1 22:27:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkB63SDzz5RZpy; Thu, 01 Aug 2024 22:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkB52LkXz4ZXC; Thu, 1 Aug 2024 22:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QeYYn/Z6vE+5PQCGXSPYzuEAFqVTDxVQAv01MoQ1FCk=; b=CiODkbBvXaXiP01LlIyNKZiDm2QKZSf6Q1hBNyEM8lAd3md6Byil//CauU48dLNkUXdFkC KbnW9g5+EcR7ct0bdOVD0akG1rMc5tNSfuvsP9+8oaNsI7d5yoNsOjgjiODZkDvvB/pzBR /BrtmbjsJZszGJvJu8N4ViCSU7K36rQB9ICkYlCVfiyLniAQqotzRudjQB1ivVh/AEc8P7 HSmkvv69UaPG+n7ylNcuqjyq8woHIPbZApzpvIpg5l+bbJMLYl77+jQf3Ec3RhJZJl5MZx EucivveftDCI9ZVPv1DVIeiDmEdhys4WXzBPpxJWKuwkUt0Ct4NevHl6H+nRKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551277; a=rsa-sha256; cv=none; b=J5qBRjTYTPhPILOSd15lO7FuLbj/CrHbrutlLrL4u32S1mZF/6fayI7T7w1Az1OxYl/Itn f1R9SkJlnk/4cQBGLMaRPx/FVpqXAsduczx3Nsh0JUQpv8l1xb4XkJTgU3XSH5HfDPd8/m 1i1QvOL0zZTyTHli+6UJFb+5v8nXQ4kzrJV3pwCB0AUZ1wW9sBRCxO7fKx2wEkLT204DBL sU13Z6uNVX1Z3KgDQpxrpgSs3W/I0OBN7a+9lwXcMoWvb/oTnHOkwialK2Z3MJ243INGSX 55ZdlkvVEVYeGYXQ1o6MXBVAmo9vxzvvFjJzg/jYKVkWR+13qYf/snThlqq+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=1722551277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QeYYn/Z6vE+5PQCGXSPYzuEAFqVTDxVQAv01MoQ1FCk=; b=XV3zhABd4xuGSX6I8Ks9+9Ud3bME4Uds0iJ+tfNT+BDt3l8g7o2HSNfOIKU+A7Q5qF3vCD uL266s19cb5gHghKomrPzmhFlajoe1/9TlBbTVSLbhCAs1fcPU6UINgSwvbiNtvwpAiBpq aiUf80tfY0aoqjEMfKymkJvO5tOy6/5vF8omD8+Zok89Pyd0ngQZrgk5lYFoM2nFhvSTFJ H7gEx0ccLAANCZY77JCnsapagBrJ58/frLvOQsfhDX8Cs1FZ5u9mcWOH8JXA+DmfPrjeS7 wXU3JeYYFtt5LZW/Wb78jDIQPJjhTbvIkAFyFaD51zok3jiFTGWlHa3B9M6SMw== 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 4WZkB51wvpz12Jn; Thu, 1 Aug 2024 22:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRvOL028377; Thu, 1 Aug 2024 22:27:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRvMx028374; Thu, 1 Aug 2024 22:27:57 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:57 GMT Message-Id: <202408012227.471MRvMx028374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: d8394e282f47 - stable/14 - LinuxKPI: Add kvrealloc to linux/slab.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d8394e282f47f6e0f5670ca37d0d9c1d87b73933 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d8394e282f47f6e0f5670ca37d0d9c1d87b73933 commit d8394e282f47f6e0f5670ca37d0d9c1d87b73933 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:08:28 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:14:10 +0000 LinuxKPI: Add kvrealloc to linux/slab.h Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45616 (cherry picked from commit ab6e1167909bf1e2792a2ba33000e13d33aaf551) --- sys/compat/linuxkpi/common/include/linux/slab.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index 298306b6ea05..e2d17e0558c2 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -91,6 +91,8 @@ struct linux_kmem_cache; #define ZERO_SIZE_PTR ((void *)16) #define ZERO_OR_NULL_PTR(x) ((x) == NULL || (x) == ZERO_SIZE_PTR) +extern void *lkpi_kmalloc(size_t size, gfp_t flags); + static inline gfp_t linux_check_m_flags(gfp_t flags) { @@ -212,13 +214,29 @@ kfree_sensitive(const void *ptr) zfree(__DECONST(void *, ptr), M_KMALLOC); } +static inline void * +kvrealloc(const void *ptr, size_t oldsize, size_t newsize, gfp_t flags) +{ + void *newptr; + + if (newsize <= oldsize) + return (__DECONST(void *, ptr)); + + newptr = kvmalloc(newsize, flags); + if (newptr != NULL) { + memcpy(newptr, ptr, oldsize); + kvfree(ptr); + } + + return (newptr); +} + static inline size_t ksize(const void *ptr) { return (malloc_usable_size(ptr)); } -extern void *lkpi_kmalloc(size_t size, gfp_t flags); extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name, size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor); extern void *lkpi_kmem_cache_alloc(struct linux_kmem_cache *, gfp_t); From nobody Thu Aug 1 22:28:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkBB5RBpz5RZwm; Thu, 01 Aug 2024 22:28: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkBB09swz4Zdy; Thu, 1 Aug 2024 22:28:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnpvqyonL6E/Hx3V8qgLfYtR4SDPazpMfYWQYNfsvG0=; b=IS5qcwdzNUYV5mYsbQDGJGs6ol2Qsa0E3AtapLAFPvQbGNdNfCIBgsvED/wLGnDkc4g1rB hQcemQtN1Rt1N5QvE10FTIJRjstpWgTLVzMMhZap1CdjCgXkDVfxzLsTU0z6YjutBmle64 U7SDbwcrex1ezTOoPgj/bFjJfDgbSLwO59Z6A6WqVOkjpwDcabP/ciQ940RxP79981PFuw /Jop9VWUTHV0hF9X9l8U9LjkZWFJ56MVsLLFzUbUHFb1LphT64f8lkT0oKuf6zFyjvG6gA V3FNROsSKj9WyuptUr4SP29rW5NdwCxQ207WeRtxFcSb3vkBhbJChj9105QMOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551282; a=rsa-sha256; cv=none; b=Bw+WSn6V1nES3PbrNse92XgMzEJGOckw2X7lvuTm+mluQiQ627iHweX0Jj9AuzqOqCKpGF +fZuhmfTkVysEfG6g8+rw2ef2VWh5lXUzQxeotFMEjxdpTfqoErgEKZYKifG5j2lSycjTB 7FLysfYOUADg56N3t+Frg5rAO2WaUgqFUmqYMcfvnPPJQF0X5SUDc26Jm7zcFm6fpK0IQF ATPlJ3AMp7BazYl73DHoQf37qvHWb+xzgoIPpexx0eyoUFmkCD5WOeU8qc22GNKLCs+pkk CbL3EKyWBDebpns1cNCj5IjE/mXRuYB6KpFfjWXLZhCoFgfbA6F8BWbKgWcCmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnpvqyonL6E/Hx3V8qgLfYtR4SDPazpMfYWQYNfsvG0=; b=fkk19JDbg7c0dEYhTA8B+Mzw4tg6vE/s4VS5ng/AP2cSXBitA6JduqFZ23rhoDrZzEmZsc hFZTP41tcyiDeqGiFYmTNDHW3wEJas1nE7zAhQI+axodYqX5/wd69sz4uEDcJ6AdOzaKy3 EClbO5Wk0WyjpjFBO52zR231KtIx2Z2Gb5lo4pI2cDHhDd+KEz0YVON/px6EQGv1ob/m/Y 52AHKheBEk2nAfhJ9RBQJDfYcwZ+LqV6pg9KctrfzT/hhkTtk0kiSU5lYFM64R2Yn6Dzrz weBEghosndxqJCASDJE8RQiSDEUxGOCjYEq88OyEbgBM1h6sZ7Dy6dZpQk4+OA== 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 4WZkB96Pvkz12lB; Thu, 1 Aug 2024 22:28:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MS1Vk028549; Thu, 1 Aug 2024 22:28:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MS1NO028546; Thu, 1 Aug 2024 22:28:01 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:28:01 GMT Message-Id: <202408012228.471MS1NO028546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: b71e429d5478 - stable/14 - LinuxKPI: Add devm_device_add_group to linux/device.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b71e429d54780ddc447b74d551eac38761847360 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b71e429d54780ddc447b74d551eac38761847360 commit b71e429d54780ddc447b74d551eac38761847360 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:12 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:15:28 +0000 LinuxKPI: Add devm_device_add_group to linux/device.h devm_device_add_group creates a managed attribute group for a device. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45845 (cherry picked from commit a1181662d3707d8165d7153a0aa5d76ea1ddc11a) --- sys/compat/linuxkpi/common/include/linux/device.h | 4 +++ sys/compat/linuxkpi/common/src/linux_compat.c | 30 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 98c16212512d..de7e66d9a4ad 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -700,4 +700,8 @@ int lkpi_devm_add_action_or_reset(struct device *dev, void (*action)(void *), vo #define devm_add_action_or_reset(dev, action, data) \ lkpi_devm_add_action_or_reset(dev, action, data) +int lkpi_devm_device_add_group(struct device *dev, const struct attribute_group *group); +#define devm_device_add_group(dev, group) \ + lkpi_devm_device_add_group(dev, group) + #endif /* _LINUXKPI_LINUX_DEVICE_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 90d03d480089..ec4e59f66e7f 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2615,6 +2615,36 @@ device_can_wakeup(struct device *dev) return (false); } +static void +devm_device_group_remove(struct device *dev, void *p) +{ + const struct attribute_group **dr = p; + const struct attribute_group *group = *dr; + + sysfs_remove_group(&dev->kobj, group); +} + +int +lkpi_devm_device_add_group(struct device *dev, + const struct attribute_group *group) +{ + const struct attribute_group **dr; + int ret; + + dr = devres_alloc(devm_device_group_remove, sizeof(*dr), GFP_KERNEL); + if (dr == NULL) + return (-ENOMEM); + + ret = sysfs_create_group(&dev->kobj, group); + if (ret == 0) { + *dr = group; + devres_add(dev, dr); + } else + devres_free(dr); + + return (ret); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; From nobody Thu Aug 1 22:27:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkB81qdSz5RZfb; Thu, 01 Aug 2024 22:28: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkB74Vtxz4ZVP; Thu, 1 Aug 2024 22:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JNrMgNwmemy3F3zEkV++UQ074XiESLbjeY8dslFWec4=; b=cA7sTB4pJ+53N8KALuzO65eStIJ/hVA+4ayrcRkAQjjL44biKqny98prHmHgwo90hqnoSW rZBlRwN5ESMSbKSje5igBEAdBlYvTZbEb83N5L/8etKXnBEHbN21QexDfYzcLGRx2F/p9Q wJUBoZR5wL/Hew/kT1rVf1N2+KqzuwoNXbkb4L1hdJaYp246eX6cEUVC4cO8G5i/kJq5Tr 4qqZ8QHFjUGY4NlLKSMCDybJK86ew2RH/R4NHdxarxQVC4T4vMWKNyvo92xqKFaXwAIFkZ Fo4SYpUd/+Ax3Lt/zu29OV4rhuAZgBZ0ILs0od0vantUGLyvvt34kmefqE23Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551279; a=rsa-sha256; cv=none; b=HUPqEqiChBrcpFI0xnZFP2tM1kkuALw+etoPhDqrs632upNzLtfSo1atXR4lch+9Q+ciWp JzzDKD86KaVKnFemdZmH1Vbzuf6NFRgFuOaJfkJdmZwlcuPAJL4PUFhth0WEeJJV1QqBeQ nkfMlixNriGPDKzm4uLhxH9GSaZ7oVnEE643aDhfhvnmw9GUO/1qSHsaRVsOW0cenE7gl8 HUKCey7lu07qPDibNZl4KGckUEc1z0Tc1mqZn+hjd7emlrj93yo3I0BhEMZ4sWOwrcPXwe W/Cue8HnKJk+6R0TJBHkdiJA69gAuCHJ66kF5+tsVc28Pgta7QyjbOaKo22GmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JNrMgNwmemy3F3zEkV++UQ074XiESLbjeY8dslFWec4=; b=fFoFgaQryllyBUOTFl8KHFtxygc3iHp7zXHA/KVTBH71m0dqWwF6SVmj8U1hWuC/b4hYoD 4DjTo91tIjgiHHH9o2MbjwrZIU530ZgCD/KeZZfVBCj059dIzQ4y5eoNczt8OlKfhQP47s 2TaFlmbuKvNxTZwOtZBDH8McAhtL+0Ps0ANdzMh1fYWVUoeiGnpJ9tjoX5hpPo+3wk69II BrlL6+fC34UL9SyaHMRTVvXqufKC0WbGqA2AlMmM0p5V13teYZa9YHWPUDtNZAqIXoM2nG MGO+N4ZX7fU7d/vv1uL2Og+dCPJk38vwFHUzSYI18Ka4u6jabzh4Nba7kzvBtQ== 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 4WZkB74054z12nt; Thu, 1 Aug 2024 22:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRxkf028462; Thu, 1 Aug 2024 22:27:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRxIe028459; Thu, 1 Aug 2024 22:27:59 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:59 GMT Message-Id: <202408012227.471MRxIe028459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 0ab568c2fff7 - stable/14 - LinuxKPI: Add __diag macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0ab568c2fff71b67021310a4f951a113b5ba5974 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0ab568c2fff71b67021310a4f951a113b5ba5974 commit 0ab568c2fff71b67021310a4f951a113b5ba5974 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:08:48 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:15:11 +0000 LinuxKPI: Add __diag macros __diag macros turn individual warnings and errors on and off locally, depending on version of compiler. Add dummy implementation as drm-kmod set warnings separately for each file. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45842 (cherry picked from commit 742088d9fb545296c8677119757a967141ba7d4a) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index d59e6faed12d..c82b9acd53fb 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -89,6 +89,10 @@ #define __printf(a,b) __printflike(a,b) +#define __diag_push() +#define __diag_pop() +#define __diag_ignore_all(...) + #define barrier() __asm__ __volatile__("": : :"memory") #define lower_32_bits(n) ((u32)(n)) From nobody Thu Aug 1 22:28:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkBJ4SJwz5RZnG; Thu, 01 Aug 2024 22:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkBH5x2Bz4Zt5; Thu, 1 Aug 2024 22:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6zs9nIHMx9n3PYSvAvV23IVttq7XmRuFKHXCd2HpeA=; b=esdf9oxcUf0M3Fi/s5I3LXEGPm58dGstWcBe5W9gdldGsgsYjLoHeWOTjQWyJblH/GXddM yF7EZ98YPYgeLuanvnl1XZ87AGF+yErdtEAY8rp9caFOJGOGpcXGC8/zmkWLMiJXqyTd38 yEpbG6hONmxz6jYWz5ik4JUw4FjqG7GiPWp8UjxRoC1Uw71ZBVq4ysZQP+bvNWdgMg9P/w rqyUFZM/6IJJebTU5taVx7pYAFYJE46CCgBRZtBVguoaXtVPBvdMfhXJ0ZOlT/fLRNNzY7 ZFW7axhlFtiqGwtLvNdKA8EKzJWeZATeCqajBP5oelD5kf36Jib9o25WFEFeiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551287; a=rsa-sha256; cv=none; b=mBfc3efY9vRtCPuUPJ4DoiCDggNBpfKR2Wj2E6PIAUZF6FtquEhOdF+RNGkao73J+UcpuR B4MLO53PixhYUrULbqP4aFOW+7zcsUtrwIAfZKl+4C2GqHUzT2/5JfH6cdZd+fcH9p48KG m5Yc5QkoE8kvC0SILdR8SWJCrTkbk8jNPEk4iskCyrOut78yB44SyTjA9fnKyFAYbx8k0o X8YGa/GOqwXf4LKKOz5Wg16tByojL3cMHsnDkHEgoT0O1ed0+q/MvSGW3bNDKig0FXNn3W DwoCA8PlCzA/qLzqIebn2Eukzz5tznq/RicqXCBLCYjYriNn7Bm8gmPP/FfAdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6zs9nIHMx9n3PYSvAvV23IVttq7XmRuFKHXCd2HpeA=; b=XcwCDTBfFBqwq+fRbNh6Yt9sZSMni3QpkeI3C8tnedR2LxQgmeXeRRKvscTjYoNnkV6tVU v6P8bslIGCtSYcZAdcJc9eeL0VeYfwKweUMm/6RT21zrHHCoOh4PvePsEmGRBLjs3Cvovn 0LC11CLLscGcJRoMXBj8Q8h5LnlEUOYkqUvFhITodeZB6VvJes2YvdRdTS5pds/XqSOrUU M0MjR19Y2KCm6NnLI6rh5UV7AC03HIVaFff3hm8G9SJZDtbD3eJQ8NeX47AsGdsrk4H1IX MUN8sz89LocHdehznp0glslzBuMf2yPLmzYSXEffYl9ilYr4ciftCQBzbbtukQ== 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 4WZkBH5VlTz12lC; Thu, 1 Aug 2024 22:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MS7li028782; Thu, 1 Aug 2024 22:28:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MS7p0028779; Thu, 1 Aug 2024 22:28:07 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:28:07 GMT Message-Id: <202408012228.471MS7p0028779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: a9a364864ebb - stable/14 - LinuxKPI: Fix resource leak on pci_iounmap-ing of PCI BAR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a9a364864ebbb3f92cf55583affbea311f29afa1 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a9a364864ebbb3f92cf55583affbea311f29afa1 commit a9a364864ebbb3f92cf55583affbea311f29afa1 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:10:44 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:16:33 +0000 LinuxKPI: Fix resource leak on pci_iounmap-ing of PCI BAR If the resource was allocated with want_iomap_res flag set. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45905 (cherry picked from commit 14fc33ea3a0571ca70e609b6f9e67db39f7c6140) --- sys/compat/linuxkpi/common/src/linux_pci.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index c41a55fc9f87..59775629e247 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -781,12 +781,18 @@ void linuxkpi_pci_iounmap(struct pci_dev *pdev, void *res) { struct pci_mmio_region *mmio, *p; + bus_space_handle_t bh = (bus_space_handle_t)res; TAILQ_FOREACH_SAFE(mmio, &pdev->mmio, next, p) { - if ((bus_space_handle_t)res < rman_get_bushandle(mmio->res) || - (bus_space_handle_t)res >= rman_get_bushandle(mmio->res) + - rman_get_size(mmio->res)) - continue; + if (pdev->want_iomap_res) { + if (res != mmio->res) + continue; + } else { + if (bh < rman_get_bushandle(mmio->res) || + bh >= rman_get_bushandle(mmio->res) + + rman_get_size(mmio->res)) + continue; + } bus_release_resource(pdev->dev.bsddev, mmio->type, mmio->rid, mmio->res); TAILQ_REMOVE(&pdev->mmio, mmio, next); From nobody Thu Aug 1 22:28:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkBF5L2Pz5RZfc; Thu, 01 Aug 2024 22:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkBF3Yx6z4ZsM; Thu, 1 Aug 2024 22:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oZAN0PIB2bFVXigkiVJKB/BIfNxgL3d7JhImG4J+7as=; b=jrVwvtS45iRkUfMMCy2jWVWomjsj5TfoKHCx4bBoItjd5X1lUwPfX6C7ZRBJWCOFe0C/sM 35CiZc82g1TAvgHHMUxtTxCpn5quhlWtaROMuPS7vBA3NBKr2RbbbQdOeJQ/OfiWBzKsmR bavpVWpX9gmFvv49KN4nGItdFCIhhmzRRCbNYMwOjSwDc63v27DN3qmDQg9wFXv/zDlDqk FTYs0KT7QFNn2kOKeoRL/aXyNJ6YDC+lut9/CAv0m2ljpuw4bBQvKZfV3Sl5PPhwzqy8nx 1TS5qmVrWImK0WzG2PayMDimo45NyZ5fwWsjwECm7KRxwbQhXTtumivnE2pqdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551285; a=rsa-sha256; cv=none; b=IdcDf77TnzDc0sipkB2Qei5Kt/u7QcbV2ZKP6MJP+2L5MIdJqydEjHkvsBsQNoDuJNNoRz Rv1yQM3Xzu8JEyenEwI97UUJQ7BZ9NsrciLbIUSXLtrW1mqTfMeO+mFX5HgKjR+BpkpzX+ Zdc6trMs3jZFnXCzqb4APUsBEnMwdx4uTziiDU4owYrNw2TTC8b5W3eTvWg+tqIh4rdt5N Mxf83Zq9foeBrLjhrkURl/PhYrLT8gFz0KjFBvNkBbLKttslp8a8LYMLTmmS5ck+y9yaio RsVFHrvMuGYnzqeLZ80NcHnowpBIJgo1NjVPsdpDgd68n1OwRHFcfcHc0mHQbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oZAN0PIB2bFVXigkiVJKB/BIfNxgL3d7JhImG4J+7as=; b=pG119SwMuI6YZvN3stAuFnbRIYnbtPE2ng9zJ1tuyhsu8tRw7l/2+BarTKgIj/3g77LGXx Z1plZZGNZbzQIyYwN/Rv+AFHbx4A53BeR/ZrTKc2M6VFYqJZYfeXPsAm1qxVXKCQNpd5bx 1sEyYTA0vJom1/RPeSwzHQml7QCzkHVp5WtaAhvTZMdmC4a+uKsNyQsAZnDmjipZy5pzM6 2Jy8trncFZ/P7F4dyf0kj3j7LfFNYNe6ijmOEJh7i0og+Lac34JRWQUJHzuSqJEYm5N8gU kqz5UUgsWD5TOQwJEDzMfrHB/EFkx+/c3PX43uSNprPtjTM/4XA5XdaDCA6I3Q== 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 4WZkBF3BVFz13BZ; Thu, 1 Aug 2024 22:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MS5Ul028689; Thu, 1 Aug 2024 22:28:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MS5jL028686; Thu, 1 Aug 2024 22:28:05 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:28:05 GMT Message-Id: <202408012228.471MS5jL028686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 7cc3cbdaa1bb - stable/14 - LinuxKPI: Add linux/eventfd.h and linux/memremap.h dummy headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7cc3cbdaa1bb4ff913ff28716d02f9543aa26a2d Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7cc3cbdaa1bb4ff913ff28716d02f9543aa26a2d commit 7cc3cbdaa1bb4ff913ff28716d02f9543aa26a2d Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:48 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:15:56 +0000 LinuxKPI: Add linux/eventfd.h and linux/memremap.h dummy headers Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45848 (cherry picked from commit 7774e08adf6c6364a0c7f07e8c40fb1ea7cc78e5) --- sys/compat/linuxkpi/dummy/include/linux/eventfd.h | 0 sys/compat/linuxkpi/dummy/include/linux/memremap.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/eventfd.h b/sys/compat/linuxkpi/dummy/include/linux/eventfd.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/memremap.h b/sys/compat/linuxkpi/dummy/include/linux/memremap.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Thu Aug 1 22:28:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkBC2jdSz5RZYb; Thu, 01 Aug 2024 22:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkBC0zDcz4Zk3; Thu, 1 Aug 2024 22:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wXSnxW9L7mLYRQ1bSWhK1Um1xUccqIa1oDTtNmYWPE=; b=ssA2UCd23ewvOrvZ5HALrnkTcFBD6RKzzsU+xE3z+M5lYSrmbHs77jGQ0RcrvWC+SGPl/1 qOw4FEhTa4PzGQCx0v72x8loypZls4cnFYFTNXK9ktqtFoE5Qp1fxwFSNI+M7S+BluISjH qN3kKw9qhA24nMbjldZsegKdFeRONxtEQ2H/OCqeAOeSUli2cPMqgyew+F0fXYurBOpOqK umerL+1v8O/XY1Gb1/DsdiiDEpZlisB2tHh9r3hu/6UDEcLznNjT93ot/U1qZj/bYGs0EV 5w8d8N3kn4T4y/ewzBWDbUPTIFThN9YKYAJncPAUQLRW1t5EoAFCc75haGQzuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551283; a=rsa-sha256; cv=none; b=lYY5UIWnaUrHZlN5esA5woHSHnq9+/ukqo8uMPRNxLQHGGTGfLZZXKl+rBCX6Wift1ppFI QRg799UCbH6xkQsLBf0sMwFeVJ/Co7FD8ODcxa0/FHicvi8ztoi9K+lpL9uj9vNUwgdlWp NypmnqxvvuTF3iF6ayGU7Gq/NC/p334KRANjwUxYEUoRQYI6+thDPUS6SD7yNCv+IypMGV xPUmBxwvwsV3a4HF/tb7vmHvLHni9coQJQK1trDYPPGcOovB8YmoSyGlNbPAYI6ksxRrfd 5I4mh8h88DU6lNLEllDUoppAyj2TgIFyFJuzuMaWomdoDzD5M+j5Ma91XnRptQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wXSnxW9L7mLYRQ1bSWhK1Um1xUccqIa1oDTtNmYWPE=; b=QzfrBp8JHFu9I+zsb0Ihg6gefZYZvOxU7qD5hDduPAnqZM1ir+nTjH+VI4krJM+kd4RMC1 A2dQXLcB1mxvjaFd+uXyJvktOdWYBT/YTgzwYgJIHkiws9SqRTObX4JchyuxFAaBA8jF2h Ma+REWZJrxXMIqeYWKdBceNrjE2gfQpldtXD/FwyIt4pP2SgQ6Oo27CVSGUrfrG4bDwKO4 3zRCHqxGQrCSmXm+ThqWJb5jZahddvdNq2f2yYNV4E32ugeh4qa3hLEtJe+K0P9Q4fJCzd GN2mUGQxyuMexTWTk5EAeRJ+KozQcZyrjxeEiyfFLRAtQzr/rsIs+S/wGwL20g== 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 4WZkBC0bSBz12nv; Thu, 1 Aug 2024 22:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MS2Eq028593; Thu, 1 Aug 2024 22:28:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MS2M3028590; Thu, 1 Aug 2024 22:28:02 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:28:02 GMT Message-Id: <202408012228.471MS2M3028590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: ce2d721b9fab - stable/14 - LinuxKPI: Add pci_match_id to linux/pci.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ce2d721b9fab172a7a3484155461076b026f0179 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=ce2d721b9fab172a7a3484155461076b026f0179 commit ce2d721b9fab172a7a3484155461076b026f0179 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:27 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:15:44 +0000 LinuxKPI: Add pci_match_id to linux/pci.h It finds out if a given PCI device matches a given pci_id table. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45846 (cherry picked from commit 5b1171a0b75fc88bffb5a67b0b02d8d59eb8d5c4) --- sys/compat/linuxkpi/common/include/linux/pci.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index f8ee6c5600da..027dc0dfca0b 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1268,6 +1268,29 @@ pci_dev_present(const struct pci_device_id *cur) return (0); } +static inline const struct pci_device_id * +pci_match_id(const struct pci_device_id *ids, struct pci_dev *pdev) +{ + if (ids == NULL) + return (NULL); + + for (; + ids->vendor != 0 || ids->subvendor != 0 || ids->class_mask != 0; + ids++) + if ((ids->vendor == PCI_ANY_ID || + ids->vendor == pdev->vendor) && + (ids->device == PCI_ANY_ID || + ids->device == pdev->device) && + (ids->subvendor == PCI_ANY_ID || + ids->subvendor == pdev->subsystem_vendor) && + (ids->subdevice == PCI_ANY_ID || + ids->subdevice == pdev->subsystem_device) && + ((ids->class ^ pdev->class) & ids->class_mask) == 0) + return (ids); + + return (NULL); +} + struct pci_dev *lkpi_pci_get_domain_bus_and_slot(int domain, unsigned int bus, unsigned int devfn); #define pci_get_domain_bus_and_slot(domain, bus, devfn) \ From nobody Thu Aug 1 22:27:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkB71vLLz5RZfW; Thu, 01 Aug 2024 22:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkB63Yydz4ZXN; Thu, 1 Aug 2024 22:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f5NEbLS+yeeo5GOzx3gcyWh5mOvRVsp3ilsOEkkOec0=; b=KJhtC2gWRIYwCR9H+7DpIR0w49IDoRpyp1hIo2inVKN5LAe3buxRbY+qwh+dKg1uVQpJHJ dYMcvaL8ESmyxzYIzAXlcBeyxX7M00Xp6b1Y1aDdoWxwLI9+EKd77pWZfGZ46GUvDz6SLt kfcXAeGBFksmS2ZtGv8jn3GSANwyehOBndcfCBBb1jeeoRLNdKMw3PqkAUVL/BQYSBS9bA SnmktH215hX+Sbbtqj16g3gJ8/XMbu9i0QX9Cp1K3/1meIixFaFheQkkckgFix7c5OOaop UXC2SiVvymuSeiHRP0UXj+dvkRDdzvXoAyIECtnUiN9H9E5WQikb48KLikkvlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551278; a=rsa-sha256; cv=none; b=icZGUaeg4axMbR4XqHWrWJKuAOY+rtGdFbOY9bFh3uJPWazBYai8nz9Yrym17DpuZ9/0FU w8ZR2tZaO/791wI7if9EMkPTHJdfgGCZap9oN52No58eXTzEJ5qVTaKx3TjpYOTBXFYCpX dxz30+5ViTBzM/jXvK4itxDfu42lbh2iuETR38qgI/3JY7IGSBiGaSmRy2jJWaO5mj2zIb c1BhvSSSDLDvYT51q7zzDUFY/vl+kTAIcBrBIy1pYxunU2ziUt2hm+0UZyFJ+YFFIxMhYM RqZD+eYjZyI48+fh/A5hPRZHpdGl16IAu/SAGXwpU+JNdzzubtnjtFiFSJIIJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f5NEbLS+yeeo5GOzx3gcyWh5mOvRVsp3ilsOEkkOec0=; b=USxQzK/RHxF/xwN/kjc0sDSiB7f85jYxcN7GxnBhhIgmNSchgxlX+d+ks+AkhZJDhj+0gI 6onegGNieANZF64NyzMO95ulfe7r3z2xaJFugZRFG+IAA7zHIBygawtvURfVBX27D+nQqO ZlcaYwfJO4VUX8ss0caj9yanmtEcb0ON0/63xFiAqNGkZ3eHjLwkfXSwJJQy8zkHYRnSHh C9pTIWNSD76z95nLru3/Vc4cfV0/uj16qY1rQNTKqMIAHjTMKtWAEfsd91rUn/VOnOH4u+ wYb/XK6xlbPVoXow3aCN1k2RDXWdrqT7A5wzid8KwXKGIaFPw9KcIVRBttoGzA== 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 4WZkB62mBTz12ns; Thu, 1 Aug 2024 22:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MRwsF028422; Thu, 1 Aug 2024 22:27:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRwg5028419; Thu, 1 Aug 2024 22:27:58 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:58 GMT Message-Id: <202408012227.471MRwg5028419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: b5d03f42e9bd - stable/14 - LinuxKPI: Add kmalloc_size_roundup function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b5d03f42e9bdfa31a4d3db06640f25f091a1fc5f Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b5d03f42e9bdfa31a4d3db06640f25f091a1fc5f commit b5d03f42e9bdfa31a4d3db06640f25f091a1fc5f Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:08:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:15:04 +0000 LinuxKPI: Add kmalloc_size_roundup function kmalloc_size_roundup reports allocation bucket size for the given size. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45841 (cherry picked from commit ab1a5d8e2ade8c706ff8cd7aa3d5c88a95633228) --- sys/compat/linuxkpi/common/include/linux/slab.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index e2d17e0558c2..3f2d1621e148 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -237,6 +237,14 @@ ksize(const void *ptr) return (malloc_usable_size(ptr)); } +static inline size_t +kmalloc_size_roundup(size_t size) +{ + if (unlikely(size == 0 || size == SIZE_MAX)) + return (size); + return (malloc_size(size)); +} + extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name, size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor); extern void *lkpi_kmem_cache_alloc(struct linux_kmem_cache *, gfp_t); From nobody Thu Aug 1 22:28:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkBD6d5dz5RZYd; Thu, 01 Aug 2024 22:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkBD2Vkhz4Zk8; Thu, 1 Aug 2024 22:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/2LfOhQD81MAfIdK3QYKEB1Lm26267OkFFydeBpdqyk=; b=P7OZ6RXXsxwXH/8M3M2/GsggxKpdh4lu1fgXLNlzG/L2AmdPepHpDPkyYjndsZiWPzHUpk NTq/UvBGsSdnb2cQTan3tL19h+b7rvYW9PmSyOA+srLWA/v+qJCDhv6+++snghuWiRfSg0 KyHN3xYCmW4eOR2a8Mjx6orOyZLyfw3ZjPM6dHxXvP/zq74ZiG9Xz2+epxB6jtlMVFVKp0 1ajwEMqMGJil4gq1ByDhxERfBlYvXy1d5iQ5VvvmzjUh7oT2SZ5yeJ5AgG8ZkWnVij8Mfv KebxsvTq0Ur3C9O8zTJJohYGxrbyZAKxPXUU8lwU1A4+iPAkDBtvDbaUhKIuYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551284; a=rsa-sha256; cv=none; b=ODeRAYqNP3S2nyMkkd/dYelnIE3Djqfrx72bn7bKYE2r/rCFw1oEJEjnBKuJ5Aak2U/XOL sfhu6+yqvDBUp/zAxP6JWkNqCyMX9xHUuU5ZWAA0nf+SDNn+3WO/eqQBSfLYANEVdeM1VL vNha5dQIfEdo55sDWyZY2oCObAcsxGrGVoAGVnd6wAsOgLvazoB9Csg1i7IEyCeuIdgBZ1 FqaM7amGmY3CTu79v4n4MulDlsQ7kmGyKLTiN4zXRTSqCvJZkV1/ckn0vu3aRlMWersKoW dGqT+6FNdmQ7MgSp/utfr04rOYLKcaYH+OtA1LxB18/zP5puVbIoz5NEkiRzVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/2LfOhQD81MAfIdK3QYKEB1Lm26267OkFFydeBpdqyk=; b=bJ2uLQv0DmIZbySgjH1/SCcW6Wz9+gC1C+TpX+rc5SJsiF/soPrE+k1D0iv3dJOOGlx9dJ J7FrkpG1XTVaXKBpqGObcy8fF2GFNdJ25UBQMAutxrLCZwQFAUXhNbo4VoKXoLG3Ru7AUi iPBGIkYBGwNYn5kaSGyC/3VX0yOvUxCIA2bR6jTFr079/eFjDoqEt6lhRpNxoYpwpvSHEL pS6uUfPgdrqBh9lvJfhJJRk7GuaOUVtVXAm0U3miEGMeXQf7B4Gxf+XU3Ux8zCqQlhw4zw ZOAAW3KI2jVti9GwgskBuchMsl2klUr/QLiUx4fjGCDv/3sF8nCz7a7Prv0qEg== 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 4WZkBD1wFMz12nw; Thu, 1 Aug 2024 22:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MS4RX028641; Thu, 1 Aug 2024 22:28:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MS4Uw028638; Thu, 1 Aug 2024 22:28:04 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:28:04 GMT Message-Id: <202408012228.471MS4Uw028638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: d23c4b1a558f - stable/14 - LinuxKPI: Add acpi_dev_get_first_match_dev and acpi_device_handle List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d23c4b1a558f14c89022498e5ef82618bf671e94 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d23c4b1a558f14c89022498e5ef82618bf671e94 commit d23c4b1a558f14c89022498e5ef82618bf671e94 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:15:51 +0000 LinuxKPI: Add acpi_dev_get_first_match_dev and acpi_device_handle acpi_dev_get_first_match_dev returns the first match of ACPI device and acpi_device_handle returns its ACPI handle. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45847 (cherry picked from commit 3e90716331cdbdee7465213d389a33f90dad11cf) --- sys/compat/linuxkpi/common/include/acpi/acpi_bus.h | 7 +++++ sys/compat/linuxkpi/common/include/linux/acpi.h | 4 +++ sys/compat/linuxkpi/common/src/linux_acpi.c | 32 ++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h index f107902a26ad..65bcbe7f1bdd 100644 --- a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h +++ b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h @@ -29,6 +29,9 @@ #ifndef _LINUXKPI_ACPI_ACPI_BUS_H_ #define _LINUXKPI_ACPI_ACPI_BUS_H_ +/* Aliase struct acpi_device to device_t */ +#define acpi_device _device + typedef char acpi_device_class[20]; struct acpi_bus_event { @@ -38,6 +41,8 @@ struct acpi_bus_event { }; #define acpi_dev_present(...) lkpi_acpi_dev_present(__VA_ARGS__) +#define acpi_dev_get_first_match_dev(...) \ + lkpi_acpi_dev_get_first_match_dev(__VA_ARGS__) ACPI_HANDLE bsd_acpi_get_handle(device_t bsddev); bool acpi_check_dsm(ACPI_HANDLE handle, const char *uuid, int rev, @@ -50,5 +55,7 @@ int unregister_acpi_notifier(struct notifier_block *nb); uint32_t acpi_target_system_state(void); bool lkpi_acpi_dev_present(const char *hid, const char *uid, int64_t hrv); +struct acpi_device *lkpi_acpi_dev_get_first_match_dev(const char *hid, + const char *uid, int64_t hrv); #endif /* _LINUXKPI_ACPI_ACPI_BUS_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/acpi.h b/sys/compat/linuxkpi/common/include/linux/acpi.h index 610aa0784cb9..3e1ec1b20626 100644 --- a/sys/compat/linuxkpi/common/include/linux/acpi.h +++ b/sys/compat/linuxkpi/common/include/linux/acpi.h @@ -39,6 +39,10 @@ #define ACPI_HANDLE(dev) \ ((dev)->bsddev != NULL ? bsd_acpi_get_handle((dev)->bsddev) : NULL) +#define acpi_device_handle(dev) \ + ((dev) != NULL ? bsd_acpi_get_handle(dev) : NULL) +static inline void acpi_dev_put(struct acpi_device *adev) {} +#define acpi_handle_debug(handle, fmt, ...) #endif diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c b/sys/compat/linuxkpi/common/src/linux_acpi.c index 60ec838e9da7..6a9afb3ddff0 100644 --- a/sys/compat/linuxkpi/common/src/linux_acpi.c +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c @@ -180,6 +180,7 @@ struct acpi_dev_present_ctx { const char *hid; const char *uid; int64_t hrv; + struct acpi_device *dev; }; static ACPI_STATUS @@ -187,6 +188,7 @@ acpi_dev_present_cb(ACPI_HANDLE handle, UINT32 level, void *context, void **result) { ACPI_DEVICE_INFO *devinfo; + struct acpi_device *dev; struct acpi_dev_present_ctx *match = context; bool present = false; UINT32 sta, hrv; @@ -230,6 +232,11 @@ acpi_dev_present_cb(ACPI_HANDLE handle, UINT32 level, void *context, return (AE_OK); } + dev = acpi_get_device(handle); + if (dev == NULL) + return (AE_OK); + match->dev = dev; + return (AE_ERROR); } @@ -249,6 +256,24 @@ lkpi_acpi_dev_present(const char *hid, const char *uid, int64_t hrv) return (rv == AE_ERROR); } +struct acpi_device * +lkpi_acpi_dev_get_first_match_dev(const char *hid, const char *uid, + int64_t hrv) +{ + struct acpi_dev_present_ctx match; + int rv; + + match.hid = hid; + match.uid = uid; + match.hrv = hrv; + match.dev = NULL; + + rv = AcpiWalkNamespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, acpi_dev_present_cb, NULL, &match, NULL); + + return (rv == AE_ERROR ? match.dev : NULL); +} + static void linux_register_acpi_event_handlers(void *arg __unused) { @@ -322,4 +347,11 @@ lkpi_acpi_dev_present(const char *hid, const char *uid, int64_t hrv) return (false); } +struct acpi_device * +lkpi_acpi_dev_get_first_match_dev(const char *hid, const char *uid, + int64_t hrv) +{ + return (NULL); +} + #endif /* !DEV_ACPI */ From nobody Thu Aug 1 22:28:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkB937rVz5RZwk; Thu, 01 Aug 2024 22:28:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkB85FZcz4ZXq; Thu, 1 Aug 2024 22:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l+Kwd+aT5en4Jbusr92ABQLaBx3zpAhjyjOHtm/++Ro=; b=KbHhRPf6wDzzPb2Q5fhmOrEbO5n6yqRCn4mtBOhs05YXasKfBF6LVkdDppPxR6RttB6ReJ NTrwdmtvVGcIpt3P9uo5WQblmWc1wZf6Yy+5ty3odEmGz3JgbBYoCzZ4etphtAt8BX4a6V R/CGsyLy7B96vXahEs6Tf89f2KGf3cXs0sJeKBz3BZr1BmZ7lcP/OCVgYIRqYZNo+Om6Zi eJxu1zd6grJMCBJC45fTNX6ziIslTqmzCQ4ctXGQHT59wbY2WcLWRHixqwgzWSkMGdeEV9 c9PD60t0o7OpcL7MsyLAfhFtf8dU2nQmckDbQZD8fWu3I3VTBNYfl+zCKjkgPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551280; a=rsa-sha256; cv=none; b=oV/+pfwoQmhtmoy21zrjtF0OFGM31ur+Q3Y1kP5WnTksGsDmo8YW0PdtEZxekVEi9sQ/Xt HvNYOeLjI4awMfo18nQTwUnVpV3vSyb0vITZv7bPyVlK2OGuXe1Jebil0mk9nniZjtxqsC MutmPdy6RqxfGCtPmWc7Ddzg5oCMpTp1uV2oAk6jnOTo+mJ8Fs1L3yhdR+Hi9kSkwIoVpy LS0kTb17gSN172n2UDIGgPKbIrj6nmCcAJryMC7kY9iOgxWaNp700XCIa0QlIARcS/eBvK 8x2kh5E9LPZAb2ppjPQbMTPZsz76GFwwr3RvI+GdWj/rsgIRhyxZbUAfkw5Hhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l+Kwd+aT5en4Jbusr92ABQLaBx3zpAhjyjOHtm/++Ro=; b=MCIm8QeYCfeCoRKk/3xluW8LuOlZCdNztVmiwyHoxcjpXpu6CjrkZXGftKTZv2MCHpWhzM 0WouMq0zrJr7/I8Y8oOeQtwWH3PGVf33wZ11UbjLg5S0pp96b1hkIkiACPiYT8JoXgdEA9 mJBIL1BbVWtO3dfq2VQYc6UoZUL/Iwb4I2WPaB0Cm5cE3hLg1XO4/3AIco0Mx2W1Yoi0IQ plddqErXCsYGhIdG/D71wQpDkl5ottvBGRTKSm2UQv6RLCgzQCRC07vxX6uYc0AlAbWmDb rllmbFCROqd0n1QoFznehoC51VT2p1sHiJnDbJmgONgJ+2PGRKfYmOCLWEhx9Q== 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 4WZkB84sYzz12Jp; Thu, 1 Aug 2024 22:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MS0lH028507; Thu, 1 Aug 2024 22:28:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MS0BF028504; Thu, 1 Aug 2024 22:28:00 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:28:00 GMT Message-Id: <202408012228.471MS0BF028504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5a9734412375 - stable/14 - LinuxKPI: Add page_to_virt function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5a97344123756e7d9c09064c27eff56c7bc9ea61 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5a97344123756e7d9c09064c27eff56c7bc9ea61 commit 5a97344123756e7d9c09064c27eff56c7bc9ea61 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:09:01 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:15:22 +0000 LinuxKPI: Add page_to_virt function Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45843 (cherry picked from commit 80aa295a5272d01b7f21eff6719dcd45e14e8e09) --- sys/compat/linuxkpi/common/include/linux/page.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/page.h b/sys/compat/linuxkpi/common/include/linux/page.h index aa5acac4f5fe..37ab593a64e9 100644 --- a/sys/compat/linuxkpi/common/include/linux/page.h +++ b/sys/compat/linuxkpi/common/include/linux/page.h @@ -72,6 +72,7 @@ pgprot2cachemode(pgprot_t prot) return (VM_MEMATTR_DEFAULT); } +#define page_to_virt(page) linux_page_address(page) #define virt_to_page(x) PHYS_TO_VM_PAGE(vtophys(x)) #define page_to_pfn(pp) (VM_PAGE_TO_PHYS(pp) >> PAGE_SHIFT) #define pfn_to_page(pfn) (PHYS_TO_VM_PAGE((pfn) << PAGE_SHIFT)) From nobody Thu Aug 1 22:28:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkBG6qQHz5RZYf; Thu, 01 Aug 2024 22:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkBG4v0sz4Zc7; Thu, 1 Aug 2024 22:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9Nl7m3wIn+Ic/Xg3yBcZBHU18cDjBELWCi0wG8Zpp0=; b=q2KQy0mRFGHlR96Bz9aCY1mNFF2L3+2u03vnjjTErF1ZKOGsi71iwcgt8INPskDHCPzSJo wUpUciKB+m6k3bDBOXM//96FrQeAXilyDvKWrPlfCbNG3TJ094zuFVqECn7f39nhWzx5Z4 FmG8bbLU9jdsb8qdNh1KGk8WrZ4fusi82gramHqDf2UAJX+AhJGe45WyQdNNYOzlqwLwG1 LHHwhgthQwYzUuLH1h9Ep64E8EbusLUjaC+jkyQmbbGnKA4taJG/nBeC5KKLqE8kLUxmCa xK7DVgOeGeMAfxOvUsxK4o+Idb3DDtxWEOAvywkxYxGRaoRra+bN71YvHQYVKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551286; a=rsa-sha256; cv=none; b=jnv0WZNaxVQxr3k524ZLvGoIJYpBcZl2zWyVlM2q++/9Rk3c+AUgM/5LIFot9VxexnE69h YYizsRGXGCql++MIo01u3Gzt9FNRxiQv87A58jticrGGpiDOTzCmn4cKb5VBJnm7Ksxci0 mfFlEKr9wNHDmD2D6kS+b/f/txjTKuEbydBNt9oXMXK2q9VV722QsQqCA6lTWisu8uezJl dKeJ/M2p7WYv9027ReNEQJPphD963QGzpm8tAlBhhlFtOwjxLjXt+iQpBv+NA/AQALIY7m Cf6LwA6oR8lJqVANaMiBsioeJfqMv1aTw/3lfriF76/wkOiioPSXNPH2rZj2Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9Nl7m3wIn+Ic/Xg3yBcZBHU18cDjBELWCi0wG8Zpp0=; b=YkeQwpMCHxeB0agQqxJStwKt0sHD+Z8Jj6Hfb34l+CCepI3MBs3DspzRGZczxa8Bn1SnpS H2R7/FUpUzZf8J3iWtFSkzhAm7LW/wL0fe8GR4f3reMK5mrFs80kzNoKYElOesKQ/QH06l yF9Z5AyaZ3QhixSrKUf2OF1WYOW5NzA81K5xzrBBn12NmZq10JyQluWfuUTJ5IRBRqSBMu GapUb1OUApSuuvm3DrJghI5iCOdMYfeQEIAng4j5/Y18BFTOxoQgUwbT2Du7nK2WjbDLkB JteO9TZIreUaFFyVcAuKyEbZTEgnubaYK1V+osNNgO/2NkzA/X+L7ec/zIqlBw== 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 4WZkBG4WCdz12nx; Thu, 1 Aug 2024 22:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MS6fc028728; Thu, 1 Aug 2024 22:28:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MS6FN028725; Thu, 1 Aug 2024 22:28:06 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:28:06 GMT Message-Id: <202408012228.471MS6FN028725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 7403f2c657dc - stable/14 - LinuxKPI: Add pci_iomap_range function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7403f2c657dc66665d6cff9ab4cd67d2f3d0cf56 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7403f2c657dc66665d6cff9ab4cd67d2f3d0cf56 commit 7403f2c657dc66665d6cff9ab4cd67d2f3d0cf56 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:10:25 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:16:23 +0000 LinuxKPI: Add pci_iomap_range function pci_iomap_range creates a virtual mapping cookie for a PCI BAR. As compared with pci_iomap it got extra offset parameter. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45904 (cherry picked from commit fcc350c375f776318d0da8021109631492ab9261) --- sys/compat/linuxkpi/common/include/linux/pci.h | 4 ++++ sys/compat/linuxkpi/common/src/linux_pci.c | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 027dc0dfca0b..f9b60ae186b5 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -362,6 +362,8 @@ bool pci_device_is_present(struct pci_dev *pdev); int linuxkpi_pcim_enable_device(struct pci_dev *pdev); void __iomem **linuxkpi_pcim_iomap_table(struct pci_dev *pdev); +void *linuxkpi_pci_iomap_range(struct pci_dev *pdev, int mmio_bar, + unsigned long mmio_off, unsigned long mmio_size); void *linuxkpi_pci_iomap(struct pci_dev *pdev, int mmio_bar, int mmio_size); void linuxkpi_pci_iounmap(struct pci_dev *pdev, void *res); int linuxkpi_pcim_iomap_regions(struct pci_dev *pdev, uint32_t mask, @@ -774,6 +776,8 @@ static inline void pci_disable_sriov(struct pci_dev *dev) { } +#define pci_iomap_range(pdev, mmio_bar, mmio_off, mmio_size) \ + linuxkpi_pci_iomap_range(pdev, mmio_bar, mmio_off, mmio_size) #define pci_iomap(pdev, mmio_bar, mmio_size) \ linuxkpi_pci_iomap(pdev, mmio_bar, mmio_size) #define pci_iounmap(pdev, res) linuxkpi_pci_iounmap(pdev, res) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 3ed0f268d5f9..c41a55fc9f87 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -756,7 +756,8 @@ _lkpi_pci_iomap(struct pci_dev *pdev, int bar, int mmio_size __unused) } void * -linuxkpi_pci_iomap(struct pci_dev *pdev, int mmio_bar, int mmio_size) +linuxkpi_pci_iomap_range(struct pci_dev *pdev, int mmio_bar, + unsigned long mmio_off, unsigned long mmio_size) { struct resource *res; @@ -766,7 +767,14 @@ linuxkpi_pci_iomap(struct pci_dev *pdev, int mmio_bar, int mmio_size) /* This is a FreeBSD extension so we can use bus_*(). */ if (pdev->want_iomap_res) return (res); - return ((void *)rman_get_bushandle(res)); + MPASS(mmio_off < rman_get_size(res)); + return ((void *)(rman_get_bushandle(res) + mmio_off)); +} + +void * +linuxkpi_pci_iomap(struct pci_dev *pdev, int mmio_bar, int mmio_size) +{ + return (linuxkpi_pci_iomap_range(pdev, mmio_bar, 0, mmio_size)); } void @@ -775,7 +783,9 @@ linuxkpi_pci_iounmap(struct pci_dev *pdev, void *res) struct pci_mmio_region *mmio, *p; TAILQ_FOREACH_SAFE(mmio, &pdev->mmio, next, p) { - if (res != (void *)rman_get_bushandle(mmio->res)) + if ((bus_space_handle_t)res < rman_get_bushandle(mmio->res) || + (bus_space_handle_t)res >= rman_get_bushandle(mmio->res) + + rman_get_size(mmio->res)) continue; bus_release_resource(pdev->dev.bsddev, mmio->type, mmio->rid, mmio->res); From nobody Thu Aug 1 22:28:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkBK2kbwz5RZYj; Thu, 01 Aug 2024 22:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkBK0slcz4ZtP; Thu, 1 Aug 2024 22:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pbbi2XocbhoT3eTmrIgeZ8kf7O60wqvFoS0LU8G7RG0=; b=QipMiYv8RhtDqOGmVG47wcUveix2ye+aYUk28LjA/pGIwlHTHcTqKn6aXxuyyZjA4ehddQ wN1hkycs4+3xYqz6k+vqCW8dN6ls31F+xjP3mvMErOQ697xjcr2S55QquRX8gSyc2y8/Pf vkpEk4lbWdFjWQlsx0NNXMN3EF+P0NZDp8CESJhQnXnRuTIZseQH6X5uMOmzCeVkxFSouX RO2nqfK1F3b84DcinOa9WZibLFE5zdC1Zf8XQb8J5BW5rngbw0Wq08v7+IWM4DkIbe+qnF ee+nfe0XlEEr0xTaRRyT8GF8oRAobKom+ho1udrUI6EFsne2gH8nw/lNPL09QA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551289; a=rsa-sha256; cv=none; b=o+fmhcrUOycIAq/e4tIfpm1U7ijquGQ/1p6VoE0jVWHdVaibJzPxsGajuTYHIWN6TEwfdE FGlwMrxUFrBTDN9AWgPJgTBcSI23yDoIY+qCj8EuFsKjAlU6umrSSoaHKS722RiODloA1R aUnIlcBnb511bRFLoYgSmvXlVdjoBePdcgQrdYJIiP+BfnSxAYhk8A91tTeRW0Zc83QEP6 Ru0lClLPuIzc5dJNMm8ED7ql2Zz/pJ7np4Dip8rmebLbt2cBE5JkgDVNcpSSJoEiESgsaA E8oRCOiTockcL7gW/MEFpYeE9EvOSQgEgfs1Bi1FYmqB0DKOrIOcWSJPf0uWDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pbbi2XocbhoT3eTmrIgeZ8kf7O60wqvFoS0LU8G7RG0=; b=a2/3+DY9PlCzg9X6DJU0MZhBYT7FibZjp8NReozsjo1iYKq7M9QrEDyIL5o+C2VONlthwU oSQ7FxMgtJCZM8j41ix/FNJC9nmyvPGy8B9xK0P+2E21O29cFdUxqP1sdub0NRDJs1IoJc +LmWzNJc8dPnJzG/yfPxQuiCPwJTXMbIM04HjAhUeBlLKuZ3tPWzHPcMqsmoxjHQX3Ehio 0g/bMgpxddQlcX6Bs2TlUB9kRsXhx8M5cPwBjFZ7rlwPQQAN6KTMPEuZBiBg/oPTvvtQJP 2JPo9cs9GKwAqpHqmFva1siXU4hNHrrNPS7d76AZy+OyJhdI8WVp55lcLoaTOQ== 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 4WZkBJ743xz12tQ; Thu, 1 Aug 2024 22:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MS8ei028828; Thu, 1 Aug 2024 22:28:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MS8NJ028825; Thu, 1 Aug 2024 22:28:08 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:28:08 GMT Message-Id: <202408012228.471MS8NJ028825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: b37a6d41a046 - stable/14 - Bump __FreeBSD_version after LinuxKPI changes. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b37a6d41a046dbb46ee1d6bf00c710c03c944a24 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b37a6d41a046dbb46ee1d6bf00c710c03c944a24 commit b37a6d41a046dbb46ee1d6bf00c710c03c944a24 Author: Vladimir Kondratyev AuthorDate: 2024-08-01 22:22:32 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 22:25:24 +0000 Bump __FreeBSD_version after LinuxKPI changes. Sponsored by: Serenity Cyber Security, LLC --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index cd77156ab17d..697a96cca916 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -75,7 +75,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1401501 +#define __FreeBSD_version 1401502 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Thu Aug 1 22:32:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZkGy6gbtz5RbFP; Thu, 01 Aug 2024 22:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZkGw13nJz4l1W; Thu, 1 Aug 2024 22:32:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GbgW7R0q8ySbQRqX0hCPRJEdW8FVUKjWZBtXEKgs6l4=; b=pvhqNd6vIaUCJHRtHxhrvgLkcNMB8eYfj/Uo3/tO0HFVjR9k4rdYHBT4tC13YFy2FbDSne /TXXavch8bXNxTWmMP8xbM3BWq3QbOqu4ns914RlY/zwHwraL91xbOquPPzVeQq9/8+XfY D4H/CSAH9VGsl5i1kUCtXv6hqa/Rp9XUcrmGasSnNV7kM4DnzMutWdm9thD4edzJTuBp1M EnpOyovXgl0qJ6pkeKXPEEg2nSRKxIcPgK5Xk//2ypu4+Nrz16uL7xVAReeZ0Q522dIye/ JOV/69GphcgyypbDEBrkwybGg8Vjl/vsUvuhdG02vuNz63tm7kdY9uLjkAVqhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551528; a=rsa-sha256; cv=none; b=RZ7KlbZ7CaBMa3ABm4uR7Bqoa1jhrOP2TM+Vt6/pvSYl42+XFADrABzdLm9IuG5ynKK+zq QX+kgjGXg3IcBfd08RO110cQ+kJCO5CBwDXLiWy1OTE+A6yGugA9LJmlnnUdTO+JkCwmLE qDM4EQfON9wMDTBxzgENrhy7hBWyqWJXZlN1qDDU62T3yLGUAV3SLdfo7AhKnZ/0Xhr3D+ I5HlqUzWB7bb8F8UqLlcjI6melAnYXx57YBpthdeX0oahLbEla4C56IDiSMMHeva7lSlIY LAC88cDd+e+UqOUMnhIZNRiJYt4NcB0KhyJrrWnCFPGM3q/8UHYX9NMfa89rRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GbgW7R0q8ySbQRqX0hCPRJEdW8FVUKjWZBtXEKgs6l4=; b=u0jZJCj9FaZRAAn5eE0kMSPmyikdgOIikCtwxfVwrtBMZGhAmtMJdslj088H4JpUgrFlSL 6I9jn4yr/gv7rM09auoAQcDcKlh/K/RXIEsjBOfwDnWmIIeSRsmJ7YyMwryPfgLzK+z72M TbJn9KD42wOvAeUhLqwbxMSdZO6myKHDkOCMC+iMuFPKo0IiOEx9FrWwCXogVaR97PFGRX 9Rt84JVtghGZ2CIfHGpXqa19OEBKfs8P97YF7NV0OE1kAnSqF2KPDPSuNdnfkSacC8Offt h0tHW+nVIQfSX+9WWW833olON1+H72RP5deUnMoGJjMofiGH0yLSDbY4LSTrpg== 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 4WZkGw0FjKz12pc; Thu, 1 Aug 2024 22:32:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471MW7Nc041094; Thu, 1 Aug 2024 22:32:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MW7Hv041091; Thu, 1 Aug 2024 22:32:07 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:32:07 GMT Message-Id: <202408012232.471MW7Hv041091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 85da0abada24 - stable/13 - LinuxKPI: Automatically enable drm support for devices named "drmn" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 85da0abada244f90dc6e9ce36c75492f0aa9bf02 Auto-Submitted: auto-generated The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=85da0abada244f90dc6e9ce36c75492f0aa9bf02 commit 85da0abada244f90dc6e9ce36c75492f0aa9bf02 Author: Vladimir Kondratyev AuthorDate: 2024-07-21 13:02:08 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 22:31:06 +0000 LinuxKPI: Automatically enable drm support for devices named "drmn" This allows replace linux_pci_(un)register_drm_driver calls with driver renaming to FreeBSD name. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45906 (cherry picked from commit 5d20075f8b9f7107aa0a246e5165d9816e816a44) --- sys/compat/linuxkpi/common/src/linux_pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 5f7296d66ee9..459f03f7e2a4 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -752,7 +752,8 @@ linux_pci_register_driver(struct pci_driver *pdrv) { devclass_t dc; - dc = devclass_find("pci"); + pdrv->isdrm = strcmp(pdrv->name, "drmn") == 0; + dc = pdrv->isdrm ? devclass_create("vgapci") : devclass_find("pci"); if (dc == NULL) return (-ENXIO); return (_linux_pci_register_driver(pdrv, dc)); @@ -907,7 +908,7 @@ linux_pci_unregister_driver(struct pci_driver *pdrv) { devclass_t bus; - bus = devclass_find("pci"); + bus = devclass_find(pdrv->isdrm ? "vgapci" : "pci"); spin_lock(&pci_lock); list_del(&pdrv->node); From nobody Thu Aug 1 23:18:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZlHy0qLdz5RfXW; Thu, 01 Aug 2024 23:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZlHx5bg8z4rJM; Thu, 1 Aug 2024 23:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722554285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNs1nxoMqfxdlTK2QwMo/IP/Iz6OTLV/tpdyTjvh28g=; b=sOsTd79duve6tFYzQCsveSpRSarlAP5g2BKhhZk3L+Whyhs3SBLceVYYAJV6l3+QD254Qx QNXA5Xr6vZvtk8dtyXSpP/Ac4WAGO1k5KgZ0wRNDBqP0ta33QP35rVufaOUWGA/Mdzoezb P41PwoM4YOBD3FhLGZCaS0MIqnPf7aK8GT5HfVMDjAK5XBySisasX7T1m2Ew4SJal/xYwN JMe4YcVgV7+rucXK625h3Kv0QzGv4Sjzxs0Sl232JHx0mtaS5fPOV/WQhqg+yt+49X81Zn SmWttdrsv6HBt8bkvlQC+WM+mT7sQZeaqQzP3e0f4MjSOq37xWj74kO/7+5WlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722554285; a=rsa-sha256; cv=none; b=eblMvlw9Dcp5yfc9mmkozxW59VLZfPubInyrPQPp5ZmBTkclnn3wpIhymLyy8+oxvYiu4G x3YjfYR1I7qsY50PkpgrKctf806/pENX4DV4MddX65imo84eSWdDX5oS+JCyb2RTfqEGHR tMc6wOD9GOUrNzF0GU7vL+n9kXrJk6AJE5D5XjKQ0MsBXE8yh3UJPXGQR/WMm0oX1PFTGX aYgs+P8lb+OcvaTmg2D+riW6nedzAPGEhyMZ8TlwmhB44nKkZ0qP8K93z0F3oi4UXRkj6r B+/0VsBIFHekQacxtpWKbzTL/xWAusr57DAiLlZAB692kT5dWmzk/3AzMWqNyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722554285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wNs1nxoMqfxdlTK2QwMo/IP/Iz6OTLV/tpdyTjvh28g=; b=XNA8tGKfBwu7idxSvgqDnY3hNFnm8fSucctLphXyD980DgzGANmThtjWXlp6Nj1iF4SA8y EQXzoXX0cdUKdzurMXI9GkfU6Cl3Xm7DSHpFAGLhxJKZ8sCo9gQhxKGVcqH7Mblg7d2Gja h3AwPydmVx5L8eC7qKJjU7bWvnynUhG5d/el9ZMeXT8kZekAV/C/0npDH2whT/oiD6c5G+ xCF7udcCZSXC0w7LoocHIZacCI2GnvMo0tBDYQdW0AmkcYDmga6sFjnAH0QEgP0BdzadxP YyRFxvJi3XFuniSrjSLnLPSLn3hUU0HUd9ulZxWS6/KR7/FDpTMwYWsiEUN1lg== 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 4WZlHx54Lwz14Cg; Thu, 1 Aug 2024 23:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471NI5g0014110; Thu, 1 Aug 2024 23:18:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471NI5rT014107; Thu, 1 Aug 2024 23:18:05 GMT (envelope-from git) Date: Thu, 1 Aug 2024 23:18:05 GMT Message-Id: <202408012318.471NI5rT014107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5eb1ab19a359 - stable/13 - Revert "LinuxKPI: Automatically enable drm support for devices named "drmn"" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5eb1ab19a359a9639627686ba6af6c02d6ce1cf8 Auto-Submitted: auto-generated The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5eb1ab19a359a9639627686ba6af6c02d6ce1cf8 commit 5eb1ab19a359a9639627686ba6af6c02d6ce1cf8 Author: Vladimir Kondratyev AuthorDate: 2024-08-01 23:12:32 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 23:12:32 +0000 Revert "LinuxKPI: Automatically enable drm support for devices named "drmn"" This reverts commit 85da0abada244f90dc6e9ce36c75492f0aa9bf02. It is based on other not MFC-ed commit. --- sys/compat/linuxkpi/common/src/linux_pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 459f03f7e2a4..5f7296d66ee9 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -752,8 +752,7 @@ linux_pci_register_driver(struct pci_driver *pdrv) { devclass_t dc; - pdrv->isdrm = strcmp(pdrv->name, "drmn") == 0; - dc = pdrv->isdrm ? devclass_create("vgapci") : devclass_find("pci"); + dc = devclass_find("pci"); if (dc == NULL) return (-ENXIO); return (_linux_pci_register_driver(pdrv, dc)); @@ -908,7 +907,7 @@ linux_pci_unregister_driver(struct pci_driver *pdrv) { devclass_t bus; - bus = devclass_find(pdrv->isdrm ? "vgapci" : "pci"); + bus = devclass_find("pci"); spin_lock(&pci_lock); list_del(&pdrv->node); From nobody Fri Aug 2 00:08:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZmPw0TDcz5Rkxh; Fri, 02 Aug 2024 00:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZmPv6phCz4vpk; Fri, 2 Aug 2024 00:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722557300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdv+NBXnsSSSC99UALrvJUEba6Ew4X+r1ys/oS623hs=; b=ZQX5noV1FX4wL9JCQlOFjLzhnAt/DMHnL057PVVv3sm/WDtj0p6/irCOrZ51oBKPIDW+rp EKFyDyR0Q3/1uMkCMqt+kyjb/iTTcDcBcUqATMNRi6ZThixmHtP5hVL4RwG9XDo1pEJHht EV0AIyNm3l5nrAe7szzygztJx91LKbfQ4d7B9XlCOKCBCfsb5lijPBH5BTEV4W6mwFSKR0 VV+cI+4xBGJJdNbtZxyUd1QZQQzXgger8hkvDBwU7yHsmwHi40zSGH/J/hwg+4nE9rslBj JxeprJ+JEBv4iZCjgYZTGCc2OPfB3tO/mGBtAixOUaI9RUCVriwBy52hs9xhZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722557300; a=rsa-sha256; cv=none; b=XhYc80p45AfKSxAvD+tDcbFScswZhhb9a0FJABTdBH+3zRKDPz/jX9VW9Aj5WUjraTx2ul F+mMqM6PRX7sd//gLwtm8ltU9KJz5OOIBbLEBIzCtXttniwVFvUNdMkCkDDrBiSaai/CRU /r18XGimoH7nfXFPmM7+RsloDhuus6y0wBpLC8KgcUZcdQHIRS8d6mxkLxlfRsVsCzSoXO LVZnYWeqnsNYqhb+/Un6pwOufr8mzBAdGKdLvaMHYKTSzOZ7/ICzmA2c8q2f5ORfUyvRuT UCijuL65kCsKg3cx+qHFplq/oIMiimSVgD5ggEN/RkI1H/neBhn+8/m0QetS7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722557300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdv+NBXnsSSSC99UALrvJUEba6Ew4X+r1ys/oS623hs=; b=JRZQENB1DSUYM4PO0iNgLRrhHRLU7e5lUf+/pD2fsOgXzAUoNMRXeeaFBQVxJibbZQ7qGn hLGsaLKuzftmnnNJgF4YaPEm5rBq6DB3AYkE8M7ruOaSXH1tdy9gh9xFv5m4cIhDNB1WzA 0PMsObQade+uCizzQaWVjJZ2Gf3WITqaz7hd2IwfDEHSXwYns+GmkyaDV5Tn0R1YTSdoN9 xg5jw1Ij6NNZnHPbelko09PyucLZX9g8C/6O18egSz/Tmkm7Z1q2sRfi4I2DKdib8ub6sU +bC/LBxsyZKw8PnqP+Y9Q1x6TZz5nEmKhyCtM6nhq0LeOIhkDTZqcNpFaxP/Xw== 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 4WZmPv6Pmzz15VS; Fri, 2 Aug 2024 00:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47208JhY099230; Fri, 2 Aug 2024 00:08:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47208Jgm099227; Fri, 2 Aug 2024 00:08:19 GMT (envelope-from git) Date: Fri, 2 Aug 2024 00:08:19 GMT Message-Id: <202408020008.47208Jgm099227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 77064cddb948 - stable/13 - Post-13.4-branch updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 77064cddb94875dc8d9693a93ac25019b7f62c59 Auto-Submitted: auto-generated The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=77064cddb94875dc8d9693a93ac25019b7f62c59 commit 77064cddb94875dc8d9693a93ac25019b7f62c59 Author: Colin Percival AuthorDate: 2024-08-02 00:07:12 +0000 Commit: Colin Percival CommitDate: 2024-08-02 00:07:12 +0000 Post-13.4-branch updates Rename stable/X to 13.4-STABLE Bump __FreeBSD_version Approved by: re (implicit) Sponsored by: Amazon --- sys/conf/newvers.sh | 2 +- sys/sys/param.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index cb4422125aea..b4872c14722a 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.4" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/sys/sys/param.h b/sys/sys/param.h index 155f04070ff1..cba49f3e9b9b 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -59,7 +59,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1303503 /* Master, propagated to newvers */ +#define __FreeBSD_version 1304500 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Fri Aug 2 00:08:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZmPx1F4fz5Rkxl; Fri, 02 Aug 2024 00:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZmPx0mP4z4vs9; Fri, 2 Aug 2024 00:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722557301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=srJ9sJlKHmwRklQGYAEOe/qypL54WPCbmUN16qFeu5w=; b=gEAOboWY+XAUy24s7KtWxDwqjlL/KkzZUsjyjHo6mKYDouJ6PgnBf0Q1/2RAtBRPyMj5aU h6FXL6CmD0sIcTpL2FxWK3g7sSrDAdIltNruqVLgbDqnX3CGLUGLJNGNRdwRbwk3ck/tWA c5J5d+ovs+9t6up2HTdViU6N+n0SlHrD0D5v9Rip1b8r1q+cD0KFybyu/9O7RKwaIY25JG 1hHVujAUOdrnNJEoQpu9/87ZEowYD4AnoGRBFw358RUavff1qUeOIq4Qo24NYSEHUZLqp8 patsuLik/G0jbiqfVEIrlGQGAXLZKoiEyLG9UCPzGxyMYzPxABc1Gns4FR+9hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722557301; a=rsa-sha256; cv=none; b=HyakGiTrv+2SYkSL1CiSdP+iitOGWiVhnHph87uxF3JDEXn+LzDV5sGHVj+AU0uP1HG571 Pg2l4fTmHnJKqPAKr+9LjBtCQAC74BSyMQBUX6Ck5Nw40c7C08ga8m5rD9fZEkgh/NjqHU JmNevaXjx8TmpIC99bj3OC3GIMvaDtd6FY7gp6ktQLZFgHEzP6j+tr46vEYi+Ywy5jx40t SlSQXQBksUe+P4dBe1r2GfvPcOhK3SqIeyNOZ7oX+5j2u5osHXA6Svi8THz9wew/H5c0YG bSihdPM2gRKcv1gp/kXnhmik7gLhLoftlrZKg00VDrIBxAVp9Ejds4VGQBFcXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722557301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=srJ9sJlKHmwRklQGYAEOe/qypL54WPCbmUN16qFeu5w=; b=xRnx8DVncxzCWI4YzLAP5TpJ6RKmHfESA10Ore3fl+uZENwnU9qMcBEqxpiita4cVXR4nF yw4KXUdCfG4ihGs5KMBXaic2Rb65oX+I7xPVmbyH2ClRkpVRsRybMxEkh6/4suLFo6qNc8 IV5qKl9SckwNiDh8yTEf7V+csDhVzJJy3AapsWnQC3Fhu6UFgGNpYI17RRVVfosR5Qyc6N p0dlr7fABPNwQY2W5hBu+Ei/w1PmyfP9I4LWsl4gEiTe8vsyfgewtLWRnBxG2HqheDCICH GbdAVa6I1VGYNbXQ+S6G0bRMHjk0r7CS2/eheXLTwG82Gf2dRSJgDCoteBx5Gg== 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 4WZmPx0N05z15T1; Fri, 2 Aug 2024 00:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47208KOk099280; Fri, 2 Aug 2024 00:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47208KfQ099277; Fri, 2 Aug 2024 00:08:20 GMT (envelope-from git) Date: Fri, 2 Aug 2024 00:08:20 GMT Message-Id: <202408020008.47208KfQ099277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e192230d0de8 - releng/13.4 - 13.4: create releng/13.4 branch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.4 X-Git-Reftype: branch X-Git-Commit: e192230d0de85bd47ede1f46ac8a00ded0269f3c Auto-Submitted: auto-generated The branch releng/13.4 has been created by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e192230d0de85bd47ede1f46ac8a00ded0269f3c commit e192230d0de85bd47ede1f46ac8a00ded0269f3c Author: Colin Percival AuthorDate: 2024-08-02 00:05:49 +0000 Commit: Colin Percival CommitDate: 2024-08-02 00:05:49 +0000 13.4: create releng/13.4 branch Update from PRERELEASE to BETA1 Switch pkg(8) configuration to use the quarterly repository Bump __FreeBSD_version Approved by: re (implicit) Sponsored by: Amazon --- release/pkg_repos/release-dvd.conf | 2 +- sys/conf/newvers.sh | 2 +- sys/sys/param.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/release/pkg_repos/release-dvd.conf b/release/pkg_repos/release-dvd.conf index c2e64c43a56f..600c309d5979 100644 --- a/release/pkg_repos/release-dvd.conf +++ b/release/pkg_repos/release-dvd.conf @@ -1,5 +1,5 @@ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index cb4422125aea..5a0f6c2f3498 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.4" -BRANCH="PRERELEASE" +BRANCH="BETA1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/sys/sys/param.h b/sys/sys/param.h index 155f04070ff1..108851a776c5 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -59,7 +59,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1303503 /* Master, propagated to newvers */ +#define __FreeBSD_version 1304000 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Fri Aug 2 02:38:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZqkt571bz5S0Ns; Fri, 02 Aug 2024 02:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZqkt3Cdsz47Wm; Fri, 2 Aug 2024 02:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722566294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JwfG/uQ15jqCzNU9ogikf/MJ4ptde0oavklbwvImqrU=; b=xPyg3jowbSqPeOuMZEn/QRdK3zD9Z7QfdCpNfUQc9ibTAQ2GCBE7JJe8rNz2hGTO0DyUD1 fmF2WvUPFqK1uQCkhJ6MBR1r+5jj+xTe++bSkkQtxfSxM6KyGfbK/TpfxiHnAkYvh4ziet AJTN6ec/jlE4gv50LS//NU+c3gx3y7kBnPDg1eBdt+Otw0oKiE/WC+6xXmuZTEm1XwYtcD p4h/P8MuAGp8W9aNNDJjY6sap81zpaegW0Romkv4pn171zBxbq+3mzytTz5JG65r5ZBfwW kzsB53xTA1Gi6t/AD3xgS4Bx203lChZJxNCBmwUbgSrsEbwfnuLIXO78pn/CbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722566294; a=rsa-sha256; cv=none; b=VXR+dS4YNv5RdyDCiUrN4JdW0tvRbN0rsNMYAkfnH87YkXzcX/dK6ERcmOKiu2OEYNu/W9 19CY4ORdaTGq3EruXOG6nsJNVCyan1mwgnG/khV54pBUBGbQLdoOi2zYe7zbWa2bcpjmpq BIoVm+qrljIuolaTUJhoF1uzmruaqtVtusOMy0owUaJQ2yS7oSsJMeWmYJ7fVntRelLx3u SU/FQVzbeczFQ6uc8OYj4LH9Xa2LRf4Yc5cfX66u64Q9TT5xjY1OR6WsdU0rqoT1IiErmP oZOBoxEndBw+Tul7kdz2UnKhrEG29b7MAQCE5sL8lzOh0D+MuBNERbbIMFZlbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722566294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JwfG/uQ15jqCzNU9ogikf/MJ4ptde0oavklbwvImqrU=; b=TFjXtB+53I+lWNSNO34ftEydagCdkEjLI2i9gYYcu6T1FpfBk/WIT3XBsO7U45qBMZSdco Eb8CMck92Xekzj8cGak1d49mx3qeRWw3ERaD7US7ki+4mNU7hFSLY3tYad1VZ6RVmXbcH1 fBmjK0E1UzChNGDnK+PzvACqtc7A18vETYSTClNjftjVnZlaNHY18aPk/ELfpSWrYR5MT7 NU6niXjgEI15PI6Wh2uPBrRbuQG1eDGFQpmnJI7xJbKsSECGxOxQLb8hgS30B0pbK/K5R5 scGpeTNbS3dBU4f0szMo7PtzWzTf4DLMBfqs6RPfwFXCK7WtKQL76iXN18AXxg== 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 4WZqkt2htBz18xL; Fri, 2 Aug 2024 02:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4722cEke051400; Fri, 2 Aug 2024 02:38:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4722cEf3051397; Fri, 2 Aug 2024 02:38:14 GMT (envelope-from git) Date: Fri, 2 Aug 2024 02:38:14 GMT Message-Id: <202408020238.4722cEf3051397@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: 6d86bdf1c423 - main - vm_pageout: shrink pageout array List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6d86bdf1c423e162cecd9b7c516b211461d1932b Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=6d86bdf1c423e162cecd9b7c516b211461d1932b commit 6d86bdf1c423e162cecd9b7c516b211461d1932b Author: Doug Moore AuthorDate: 2024-08-02 02:36:44 +0000 Commit: Doug Moore CommitDate: 2024-08-02 02:36:44 +0000 vm_pageout: shrink pageout array The array passed to vm_pageout_flush, and constructed in a middle-out fashion, can never use array element zero. Shrink the array by one, and reduce indices by one, to save that bit of stack space. In the vm_object version, make the accounting look more like the pageout version. Reported by: alc Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46208 --- sys/vm/vm_object.c | 17 +++++++++-------- sys/vm/vm_pageout.c | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index be21081255c2..7b3950b6f3bc 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1115,13 +1115,14 @@ static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int pagerflags, int flags, boolean_t *allclean, boolean_t *eio) { - vm_page_t ma[2 * vm_pageout_page_count], tp; - int count, mreq, runlen; + vm_page_t ma[2 * vm_pageout_page_count - 1], tp; + int base, count, runlen; vm_page_lock_assert(p, MA_NOTOWNED); vm_page_assert_xbusied(p); VM_OBJECT_ASSERT_WLOCKED(object); - ma[vm_pageout_page_count] = p; + base = nitems(ma) / 2; + ma[base] = p; for (count = 1, tp = p; count < vm_pageout_page_count; count++) { tp = vm_page_next(tp); if (tp == NULL || vm_page_tryxbusy(tp) == 0) @@ -1130,10 +1131,10 @@ vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int pagerflags, vm_page_xunbusy(tp); break; } - ma[vm_pageout_page_count + count] = tp; + ma[base + count] = tp; } - for (mreq = 0, tp = p; count < vm_pageout_page_count; count++, mreq++) { + for (tp = p; count < vm_pageout_page_count; count++) { tp = vm_page_prev(tp); if (tp == NULL || vm_page_tryxbusy(tp) == 0) break; @@ -1141,11 +1142,11 @@ vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int pagerflags, vm_page_xunbusy(tp); break; } - ma[vm_pageout_page_count - 1 - mreq] = tp; + ma[--base] = tp; } - vm_pageout_flush(&ma[vm_pageout_page_count - mreq], count, pagerflags, - mreq, &runlen, eio); + vm_pageout_flush(&ma[base], count, pagerflags, nitems(ma) / 2 - base, + &runlen, eio); return (runlen); } diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index e848d68739ca..8ad4bf4d3ab4 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -348,7 +348,7 @@ static int vm_pageout_cluster(vm_page_t m) { vm_object_t object; - vm_page_t mc[2 * vm_pageout_page_count], p, pb, ps; + vm_page_t mc[2 * vm_pageout_page_count - 1], p, pb, ps; vm_pindex_t pindex; int ib, is, page_base, pageout_count; @@ -358,9 +358,9 @@ vm_pageout_cluster(vm_page_t m) vm_page_assert_xbusied(m); - mc[vm_pageout_page_count] = pb = ps = m; pageout_count = 1; - page_base = vm_pageout_page_count; + page_base = nitems(mc) / 2; + mc[page_base] = pb = ps = m; ib = 1; is = 1; From nobody Fri Aug 2 10:42:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wb2V75jR1z5RTBq; Fri, 02 Aug 2024 10:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wb2V754VMz4lhL; Fri, 2 Aug 2024 10:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722595375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCUxlRvP3u4sjGRL+W2vt+bLaFTeObZnVc+jMiVRRks=; b=mLm6UiyHCVWvs5P0Y30BoTEll36dyMC1pzPPL74/hMN2mvWgXJleonYAqDndrq4qBZh/1y cRZU9NuGonYgLQ+3RuUEnjaa3sUzttP9TX5nhMv6Pk6qPFSOK0N+1r+9pk0QdV2AZv8Dar tSWS29ZmyL2myZnyJNTZsmgk5nB1RRjqkDXKr3vVCHDYe+dRcZwG9mWZ7viqQCJpvuEddZ TwzIFuYCjMnbF34qXRVHKw/XqKFrl5p8AOTBG7WVwdlPWfLWousRt0cUgN3ZH3lft/QN4L yHadNpR04DuTuOWpQz0wJbOnh3PIJSuGcFHNLXDa0OGoxDBGM5sORod0jD7kNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722595375; a=rsa-sha256; cv=none; b=y2TtFQ9hx8ql89EqfRzFH33l4Nepwx2R1noATzblNwJg/0fa8LSc/27W1e9mpe8G0+1XCF ffUcSsf8I9mkZ/SEtj6kq7uc6kuq10t/KRr1+pqPlZ/I7SDUt0pPlK3mUHylND+3tRdO7k igpbgIvLDMe7QhpzUff3YQ2JLu0VDUzwAHBW8B5Ky0ovYkcj+j83RwgNMAeD8guUCL3I6Y 7LH3u25REjVrvV/zduUWA3DvOTaqqGqYhuiLuOeEx9BH+BrbX7c1p/dUyQKQ8aWvTGk5Ga T1V9QoU8BRpYiBSHmis56UyrNdgR/am+e56Gms+1wruVlpQVVhluMPzErp9s5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722595375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCUxlRvP3u4sjGRL+W2vt+bLaFTeObZnVc+jMiVRRks=; b=tXlHFCiKP5VO1YFb27CNv9//l36ytSA9g3mJ4njtEoAduHZz8+quwHCYPjp7yDLSrUaloF 7xZm4Az/EsJG0gCUfNtvQeIWRFbWe5CJjkKYXpdVitV5tsDyJSXT/35Xh34W8XmGceN1Ai wtD7enKSWrAoVGbLpuDWLFWy8uhngkwSf5IkxRMw3w5m2AJI6AWWh3+/KYdBd2isIZtRMC M6bWvmYmDp3HdvTOR6Kxj8IhYzz8kwYpntXHM+rKBckgDmtkcoYqb6TJYpD4xycshO6U1Y 6gcWb35R6TlfBpdS9Y8tq5OxuWszy9i019PwdiJpwfLMKgCfq4J1wvduKw7qrw== 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 4Wb2V74gtPzPcB; Fri, 2 Aug 2024 10:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472AgtpY079930; Fri, 2 Aug 2024 10:42:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472AgtVM079927; Fri, 2 Aug 2024 10:42:55 GMT (envelope-from git) Date: Fri, 2 Aug 2024 10:42:55 GMT Message-Id: <202408021042.472AgtVM079927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 1b5e5ff68c2b - main - xen/pvh: fix initialization of environment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b5e5ff68c2bafae55a5adab42f22039bbbce59c Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=1b5e5ff68c2bafae55a5adab42f22039bbbce59c commit 1b5e5ff68c2bafae55a5adab42f22039bbbce59c Author: Roger Pau Monné AuthorDate: 2024-07-18 08:14:28 +0000 Commit: Roger Pau Monné CommitDate: 2024-08-02 10:41:52 +0000 xen/pvh: fix initialization of environment Xen PVH entry point requires to modify the environment provided by the boot loader, so that the ACPI RSDP is re-written to use the Xen generated RSDP instead of the native one. The current logic in the PVH entry point reserves a single page (4K) in order to copy the contents of the environment passed from the boot loader, so that the bootloader provided "acpi.rsdp" is dropped and a Xen specific one is added afterwards. This however doesn't scale well, as it's possible for the environment to be bigger than 4K. Bumping the buffer, or attempting to peek at the size of the metadata all seem to just add more complexity to a sensitive path. Instead introduce a new ACPI hook that allows setting the RSDP address directly, and use it from the PVH entry point to set the position of the Xen generated RSDP. This allows to reduce the logic in the PVH metadata processing, as there's no need to parse and filter the bootloader provided environment. Note that modifying the environment blob in-place is likely to not work. The RSDP address is provided as a string, it's possible the new RSDP location is higher than the current one, and the string with the new location would overrun the space used by the previous one. Sponsored by: Cloud Software Group PR: 277200 MFC: 3 days Reviewed by: markj kib Differential revision: https://reviews.freebsd.org/D46089 --- sys/x86/acpica/OsdEnvironment.c | 12 +++++-- sys/x86/include/acpica_machdep.h | 2 ++ sys/x86/xen/pv.c | 74 +++++++--------------------------------- 3 files changed, 25 insertions(+), 63 deletions(-) diff --git a/sys/x86/acpica/OsdEnvironment.c b/sys/x86/acpica/OsdEnvironment.c index c9dd3d0560cc..55954f8336fa 100644 --- a/sys/x86/acpica/OsdEnvironment.c +++ b/sys/x86/acpica/OsdEnvironment.c @@ -77,14 +77,22 @@ acpi_get_root_from_memory(void) return (0); } +void +acpi_set_root(vm_paddr_t addr) +{ + + KASSERT(acpi_root_phys == 0, ("ACPI root pointer already set")); + acpi_root_phys = addr; +} + ACPI_PHYSICAL_ADDRESS AcpiOsGetRootPointer(void) { if (acpi_root_phys == 0) { - acpi_root_phys = acpi_get_root_from_loader(); + acpi_set_root(acpi_get_root_from_loader()); if (acpi_root_phys == 0) - acpi_root_phys = acpi_get_root_from_memory(); + acpi_set_root(acpi_get_root_from_memory()); } return (acpi_root_phys); diff --git a/sys/x86/include/acpica_machdep.h b/sys/x86/include/acpica_machdep.h index b4811e4bd30c..2592b47ae1c1 100644 --- a/sys/x86/include/acpica_machdep.h +++ b/sys/x86/include/acpica_machdep.h @@ -84,6 +84,8 @@ void madt_parse_interrupt_values(void *entry, extern int madt_found_sci_override; extern int (*apei_nmi)(void); +void acpi_set_root(vm_paddr_t addr); + #endif /* _KERNEL */ #endif /* __ACPICA_MACHDEP_H__ */ diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index 0e6492b124b8..388543d64254 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -60,6 +60,7 @@ #include #include +#include #include #include #include @@ -157,7 +158,6 @@ hammer_time_xen(vm_paddr_t start_info_paddr) { struct hvm_modlist_entry *mod; uint64_t physfree; - char *kenv; start_info = (struct hvm_start_info *)(start_info_paddr + KERNBASE); if (start_info->magic != XEN_HVM_START_MAGIC_VALUE) { @@ -196,15 +196,6 @@ hammer_time_xen(vm_paddr_t start_info_paddr) PAGE_SIZE), physfree); } - /* - * Init a static kenv using a free page. The contents will be filled - * from the parse_preload_data hook. - */ - kenv = (void *)(physfree + KERNBASE); - physfree += PAGE_SIZE; - bzero_early(kenv, PAGE_SIZE); - init_static_kenv(kenv, PAGE_SIZE); - /* Set the hooks for early functions that diverge from bare metal */ init_ops = xen_pvh_init_ops; hvm_start_flags = start_info->flags; @@ -215,52 +206,6 @@ hammer_time_xen(vm_paddr_t start_info_paddr) /*-------------------------------- PV specific -------------------------------*/ -/* - * When booted as a PVH guest FreeBSD needs to avoid using the RSDP address - * hint provided by the loader because it points to the native set of ACPI - * tables instead of the ones crafted by Xen. The acpi.rsdp env variable is - * removed from kenv if present, and a new acpi.rsdp is added to kenv that - * points to the address of the Xen crafted RSDP. - */ -static bool reject_option(const char *option) -{ - static const char *reject[] = { - "acpi.rsdp", - }; - unsigned int i; - - for (i = 0; i < nitems(reject); i++) - if (strncmp(option, reject[i], strlen(reject[i])) == 0) - return (true); - - return (false); -} - -static void -xen_pvh_set_env(char *env, bool (*filter)(const char *)) -{ - char *option; - - if (env == NULL) - return; - - option = env; - while (*option != 0) { - char *value; - - if (filter != NULL && filter(option)) { - option += strlen(option) + 1; - continue; - } - - value = option; - option = strsep(&value, "="); - if (kern_setenv(option, value) != 0 && isxen()) - xc_printf("unable to add kenv %s=%s\n", option, value); - option = value + strlen(value) + 1; - } -} - #ifdef DDB /* * The way Xen loads the symtab is different from the native boot loader, @@ -313,7 +258,6 @@ xen_pvh_parse_preload_data(uint64_t modulep) vm_ooffset_t off; vm_paddr_t metadata; char *envp; - char acpi_rsdp[19]; TSENTER(); if (start_info->modlist_paddr != 0) { @@ -379,13 +323,18 @@ xen_pvh_parse_preload_data(uint64_t modulep) envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); if (envp != NULL) envp += off; - xen_pvh_set_env(envp, reject_option); + init_static_kenv(envp, 0); if (MD_FETCH(kmdp, MODINFOMD_EFI_MAP, void *) != NULL) strlcpy(bootmethod, "UEFI", sizeof(bootmethod)); else strlcpy(bootmethod, "BIOS", sizeof(bootmethod)); } else { + static char kenv_buffer[PAGE_SIZE]; + + /* Provide a static kenv so the command line can be parsed. */ + init_static_kenv(kenv_buffer, sizeof(kenv_buffer)); + /* Parse the extra boot information given by Xen */ if (start_info->cmdline_paddr != 0) boot_parse_cmdline_delim( @@ -397,9 +346,12 @@ xen_pvh_parse_preload_data(uint64_t modulep) boothowto |= boot_env_to_howto(); - snprintf(acpi_rsdp, sizeof(acpi_rsdp), "%#" PRIx64, - start_info->rsdp_paddr); - kern_setenv("acpi.rsdp", acpi_rsdp); + /* + * When booted as a PVH guest FreeBSD must not use the RSDP address + * hint provided by the loader because it points to the native set of + * ACPI tables instead of the ones crafted by Xen. + */ + acpi_set_root(start_info->rsdp_paddr); #ifdef DDB xen_pvh_parse_symtab(); From nobody Fri Aug 2 12:53:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wb5PD1Qn3z5Rg9W; Fri, 02 Aug 2024 12:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wb5PD0vVNz4vjG; Fri, 2 Aug 2024 12:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722603232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t5MyJkbLWo9yNeVEgprxd4zBgySLoJtZnyHd9xRRWLA=; b=by2Lw5XcK4Fwlyzi2lsk98L6uZU7RwbSmPoco0C6iVGxWEhw68xxhXtUgvlVt7PuWeEcFT YbzKnNV3KpSIcwin0URE+m1wrb+L+RJtR9ozu5nt87uC6rl/PjmrLnxYjqNdFlmA7VLzGN 6fYdeoxfcHZsKtofQNgr3+7H1ZfZUjQXDMHDprmXZy1knvYs4cTa4JdEOxQzwKn/eRfDpQ Tax8Vk8mEVVZAoiRyPcfniZgM06AEMyktCPr2mYJHeRKN5hJpYha1JZKDjNe+8BqEONqKr rEYef6GAe5W7jycfzpVv85kjY18OGPIrs/WyuZrh4dAql2skO7a6OByxEffcSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722603232; a=rsa-sha256; cv=none; b=PqfYY3p1KzFxxq+zwASPRLzWefp+Stpjgv47sDFQ3qafAOo45Zr5HUFvImlIgd02JqoBhT whGdJtLBjGIGgx/WhqPqKqB+v/3E2P22JrWhsz6CTbhYxEhVDZzvLR4MIUo9xN+0zu8Z2U 6XPDNJ/AG7325eVK7qRKtxVG5zSE0IP3zS7TxouLlp1z0jfmORzAl1VwhwuhF48UrTP2DW 1B5H8vQLmCj4s9ePaZZrh94/8z4ap6+egRUsHE/z/cnznw9LeQrtKHfmgtYKB4kyb5FK9a T1+S1TnFaLJx2adxziEox18ZgYPrJog1D4+AZ/Fad8m+uOFGov/nwn/6XlqwTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722603232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t5MyJkbLWo9yNeVEgprxd4zBgySLoJtZnyHd9xRRWLA=; b=h8Xu2Py/P3F9G0NLlP75O9qEe7JSrgD53u6GqPZpfJpCWPLaDUwnkniNNTeJeZXZEIgAC3 n9FImeHectKwKgkF/C/fdDamqWucJQ5A6W9INKSAXRmUmQ4acuWbGULZyu+TX9N0ScVq58 XpTzBxIGchigyxtvW8Kg2jv1rpvMp/QIEMrF6G2SiqfKMfk7WOZx6qz39h5F+dsthsgXYa Tphs7SoxPkaE9VZutfs25Ar9IcnrHubGq2hrYV2TGHPbRttA7jemlHjCaxqKuWo+Z3VSx1 X9YBaiaPHKZYOp6FZ5D4itQHA9gKBKiAGcIyaAyNqwnm25ISYapu8odW6tDhMg== 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 4Wb5PD0VgDzT22; Fri, 2 Aug 2024 12:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472Crpr4099329; Fri, 2 Aug 2024 12:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472CrpPM099326; Fri, 2 Aug 2024 12:53:51 GMT (envelope-from git) Date: Fri, 2 Aug 2024 12:53:51 GMT Message-Id: <202408021253.472CrpPM099326@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: b58d9db4d77a - main - sound: Fix VCHANs' starting and ending points in feeder chain List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b58d9db4d77a6f42ac7cf3cdb2af2443666033e2 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b58d9db4d77a6f42ac7cf3cdb2af2443666033e2 commit b58d9db4d77a6f42ac7cf3cdb2af2443666033e2 Author: Christos Margiolis AuthorDate: 2024-08-02 12:53:16 +0000 Commit: Christos Margiolis CommitDate: 2024-08-02 12:53:16 +0000 sound: Fix VCHANs' starting and ending points in feeder chain sndstat(4) falsely reports "hardware" as the starting point of recording, and ending point of playback VCHANs. Recording VCHANs get their input from the primary recording channel, and playback VCHANs send their input to the primary playback channel. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D46177 --- sys/dev/sound/pcm/sndstat.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index f09fa7139884..4fac6a97a3f0 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -517,8 +517,13 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_READY, sndbuf_getready(c->bufsoft)); - sbuf_printf(&sb, "[%s", - (c->direction == PCMDIR_REC) ? "hardware" : "userland"); + if (c->parentchannel != NULL) { + sbuf_printf(&sb, "[%s", (c->direction == PCMDIR_REC) ? + c->parentchannel->name : "userland"); + } else { + sbuf_printf(&sb, "[%s", (c->direction == PCMDIR_REC) ? + "hardware" : "userland"); + } sbuf_printf(&sb, " -> "); f = c->feeder; while (f->source != NULL) @@ -550,8 +555,13 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) sbuf_printf(&sb, " -> "); f = f->parent; } - sbuf_printf(&sb, "%s]", - (c->direction == PCMDIR_REC) ? "userland" : "hardware"); + if (c->parentchannel != NULL) { + sbuf_printf(&sb, "%s]", (c->direction == PCMDIR_REC) ? + "userland" : c->parentchannel->name); + } else { + sbuf_printf(&sb, "%s]", (c->direction == PCMDIR_REC) ? + "userland" : "hardware"); + } CHN_UNLOCK(c); @@ -1306,8 +1316,13 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) sbuf_printf(s, "channel flags=0x%b", c->flags, CHN_F_BITS); sbuf_printf(s, "\n\t"); - sbuf_printf(s, "{%s}", - (c->direction == PCMDIR_REC) ? "hardware" : "userland"); + if (c->parentchannel != NULL) { + sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + c->parentchannel->name : "userland"); + } else { + sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + "hardware" : "userland"); + } sbuf_printf(s, " -> "); f = c->feeder; while (f->source != NULL) @@ -1339,8 +1354,13 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) sbuf_printf(s, " -> "); f = f->parent; } - sbuf_printf(s, "{%s}", - (c->direction == PCMDIR_REC) ? "userland" : "hardware"); + if (c->parentchannel != NULL) { + sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + "userland" : c->parentchannel->name); + } else { + sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + "userland" : "hardware"); + } CHN_UNLOCK(c); } From nobody Fri Aug 2 14:28:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wb7W11CBMz5Rpsg; Fri, 02 Aug 2024 14:29:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wb7W06TYzz52Qf; Fri, 2 Aug 2024 14:29:00 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-7a3574acafeso18511885a.1; Fri, 02 Aug 2024 07:29:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722608939; x=1723213739; 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=AT3ty5fAAh+pcwPjDTBlcvA8cZZnnmjcI3f/sWaDzOU=; b=evmA1n9yA/X1WZl6YbV1aL+CzPsIpdDUxM9UrOr+GqvlgMAJ3K7yyZ+u/OPyOolC4a F1B5UgYD/nbbqXOETGzfkRPDdPZW0WhzICJAaAL2VRcIEB1/L7o0eV/Ze/pABKQkFZ+J G9ovoI3jRrmmRnvOe0z03T46cTljsX48rgSN9f7QkVOQ/zzJyf0aTuMgZHmqSozz/Rt9 /QfGZM6duLuJy/wcbTE6SBFhiQvgzcVMu6+vmKFOPIMIIA5da84lkZPzRcwNv/MtE2Cd T6M1/sONW3CVrKdww6j7UiywdYFxwswcZGr20JUox97xv0GDx75ZODwDO4bV6oSC2sve oxig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722608939; x=1723213739; 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=AT3ty5fAAh+pcwPjDTBlcvA8cZZnnmjcI3f/sWaDzOU=; b=toezbx8//cK7FJE1onKpguqzoGD6C3rOzFby1ZZjtERqzGbkzZf1nZQMLq1TzADMIl OI3MDcDZt1X4kSkwFm96EtTvm0S1rLndpzTEm4ttd2X00msIc7AA82W77siXxYPrPwKs pZOnuThuieuQxVo8yrfF/FIUYjp0tg+QszS2EqrjAFqSLelJ1JAxj4A/OHQsca1ssIO6 RQoTRYr73+7lk+ZwFldOp9uWfJ6BWK7ANLh584wEebe8C11lpzMj0bM3gumA59FbV7ig YDg/lB62P4fvIppfduQLfvNKe7doZ7YZGFnSr+r2u+8lq0HXv8wCDMM+9L9lIJbmJZLy 4XIQ== X-Forwarded-Encrypted: i=1; AJvYcCW5/sf4x4/xFXPcRJq1HgQYXTdKQ/0oOxcjg2jw/fJePD2tOaq57H9ybH7Pryj9w6T8fzVr1egA0PbFGI0mYCxhPa0yLNjhYsU5b5slYMr+SQ7ZSQ0+fIddXu5CSg4EDzW/jte8SbuCOI6VFAtjPs1ZnA== X-Gm-Message-State: AOJu0YyalvLWgF/gd+XWrc1RM9o3YOcvCU1zl0wJRMGTPNubIUP07cQQ B1+eN2SirK9zrGsxfBs12KXhUTM+v69j1AIlw4soewnvFFj5lWqF6/LWTy07 X-Google-Smtp-Source: AGHT+IFHQnQJYkfrOm5n3GjklhaIT6r8hJtdoxV25pd3KxTLemgUJGC5XlKFXzaDwD/c7qH95z6yAw== X-Received: by 2002:a05:620a:4149:b0:79f:1105:be3 with SMTP id af79cd13be357-7a34ef54184mr416380985a.40.1722608938886; Fri, 02 Aug 2024 07:28:58 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a34f797ebdsm88908585a.127.2024.08.02.07.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 07:28:58 -0700 (PDT) Date: Fri, 2 Aug 2024 10:28:55 -0400 From: Mark Johnston To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 46ea2ffc3fbc - main - stand: Reduce limit to 500k for x86 loader Message-ID: References: <202408012131.471LVOGC039269@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202408012131.471LVOGC039269@gitrepo.freebsd.org> 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: 4Wb7W06TYzz52Qf On Thu, Aug 01, 2024 at 09:31:24PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 > > commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 > Author: Warner Losh > AuthorDate: 2024-08-01 21:24:51 +0000 > Commit: Warner Losh > CommitDate: 2024-08-01 21:30:26 +0000 > > stand: Reduce limit to 500k for x86 loader > > The largest loader that works for PXE boot is about 500k. PXE needs low > memory for packets and other driver state, so the largest safe size for > the loader is about 500k. Reduce the size from 560k to 500k so we don't > accidentally break PXE in the future. > > Add a comment for people with special needs. If you control the > hardware, it can be safe to have boot loaders as large as 580k or 600k > in some cases. Since the BIOS loader is becoming more and more of a > legacy item, the build variable LOADERSIZE isn't documented. This change > doesn't change that: there's been little demand for this documentation > and in general, users shouldn't change it lightly. > > PR: 257018 > Sponsored by: Netflix > --- > stand/i386/loader/Makefile | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile > index a4aa3a3c4d45..efd442977780 100644 > --- a/stand/i386/loader/Makefile > +++ b/stand/i386/loader/Makefile > @@ -32,7 +32,12 @@ VERSION_FILE= ${.CURDIR}/../loader/version > # > # will tell you how many kiB of lomem are available. > # > -LOADERSIZE?= 560000 # Largest known safe size for loader.bin > +# We further reduce this to 500k, though, to give PXE an additional 64k of space > +# so pxeloader will fit. If you have special needs that do not include pxeboot, > +# you can safely set this as high as 560000 generally, or a bit higher if you > +# have tight control over the machines you are booting on. > +# > +LOADERSIZE?= 500000 # Largest known safe size for loader.bin Hi Warner, This breaks the WITH_BEARSSL (which implies WITH_LOADER_VERIEXEC) build. When enabled, the loader ends up being just slightly larger than the limit. From nobody Fri Aug 2 15:18:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wb8cq2s1hz5Rtdd for ; Fri, 02 Aug 2024 15:19:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wb8cq155Yz55ml for ; Fri, 2 Aug 2024 15:19:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2cdadce1a57so5672043a91.2 for ; Fri, 02 Aug 2024 08:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722611945; x=1723216745; 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=AtrohDacqOWK5xmgqGl6oOkypTO/uRD4qw93cNNowqs=; b=jhoBEsYgGDYtLrkgzafMzug413hW/43v9MhRRvyFnKGaAmef+zAXDYEhYNjhA9EYCU EGNr6e/Zu4hAqDsieqaGjGq1be2De1ZomfeXfIWZf4iuwF7eGcPA/f43VW6TzJVfkpK9 qwzwe3207HaI38DfFFK67/dD59nBv9YjmeIqKmvZ3SARm7ruqTa76iTKB0qomqMAXFhl 6BmU6u3jaYacuoBx5SBb083+r2YIdzIM8BeH4nxpyaRt6wJH6u0lOrpdajvEhCO8/iHl Cy0S8NZYhzI8A8PAwEOCW+3jF4WcFHUJoF5rR/4m+F/QdMGIElcphyVZ7IePL3pFC4q8 k6Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722611945; x=1723216745; 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=AtrohDacqOWK5xmgqGl6oOkypTO/uRD4qw93cNNowqs=; b=LX98DRhtycpRXe/pK+Rvh5y5sI5+ziOq0D/1KsTbDsMVeevHyPMdwSRb3PpRirgfc2 2OsN0eedHHRb/iVV53zEWbFvzR6OJnSAAyhPLb+bXgUjP0x2T0WNiPSu0OJMhl1arjxc 6NEW2aex8wtMnLe4bLMAg9DLJ6o5C6swViXiti4pF0l61ycYaMiVwQm+RKBYyPXbZ1+e IyM/QTnMhIxr5TGMMbI5R/WIjJQNkVfmbxdpVNKw2Cwi2L7aUZQkpOB/7OeTd7e+hBtC TwK5Zh0QaB15LTNumzhlZ48bJQATRfyAYg/YVtCwDSnI48O6Km62i93ABvjq33eHZsUl u/NA== X-Forwarded-Encrypted: i=1; AJvYcCUtwooMkwkSp0n0XHXL0AvojRgH9xmrrT5HBHCKNEIsLXoE+kUzAvyqRjV5R8KTmQOPK700mEsNXQBbFVJ/xB38wfpm6jawjPnoy3ERqufv X-Gm-Message-State: AOJu0YywgcprIlaf4OI6ukkCys5Sg9ae+4aJo7eeioN6ooHdPdncbo0I 5oAe7dvZKe0Eyyi0pr9nf5D2y0RxWKfXHtjixexcq1A7LtMSzXC2ClePwAvd/XY+NwglWlG0tKK m/7ULUkj87jS8CPBbYW6GLG9hocBh1HGcsYUjpg== X-Google-Smtp-Source: AGHT+IFg1pSLAkaYMWmp2ROkeXQdRLmrlPjdLnKZAWJVR7lplXrTIaoanOU9J6V5ZVLPikph2GPtkqdXKZxSYWr4wRo= X-Received: by 2002:a17:90a:5804:b0:2c8:7897:eb46 with SMTP id 98e67ed59e1d1-2cff956bd4dmr4505713a91.37.1722611945370; Fri, 02 Aug 2024 08:19:05 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202408012131.471LVOGC039269@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 2 Aug 2024 09:18:54 -0600 Message-ID: Subject: Re: git: 46ea2ffc3fbc - main - stand: Reduce limit to 500k for x86 loader To: Mark Johnston Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000017121d061eb4d9ad" 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: 4Wb8cq155Yz55ml --00000000000017121d061eb4d9ad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Aug 2, 2024 at 8:29=E2=80=AFAM Mark Johnston wr= ote: > On Thu, Aug 01, 2024 at 09:31:24PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D46ea2ffc3fbc42089d8322a65fdee84= 76d2b00d6 > > > > commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 > > Author: Warner Losh > > AuthorDate: 2024-08-01 21:24:51 +0000 > > Commit: Warner Losh > > CommitDate: 2024-08-01 21:30:26 +0000 > > > > stand: Reduce limit to 500k for x86 loader > > > > The largest loader that works for PXE boot is about 500k. PXE needs > low > > memory for packets and other driver state, so the largest safe size > for > > the loader is about 500k. Reduce the size from 560k to 500k so we > don't > > accidentally break PXE in the future. > > > > Add a comment for people with special needs. If you control the > > hardware, it can be safe to have boot loaders as large as 580k or > 600k > > in some cases. Since the BIOS loader is becoming more and more of a > > legacy item, the build variable LOADERSIZE isn't documented. This > change > > doesn't change that: there's been little demand for this > documentation > > and in general, users shouldn't change it lightly. > > > > PR: 257018 > > Sponsored by: Netflix > > --- > > stand/i386/loader/Makefile | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile > > index a4aa3a3c4d45..efd442977780 100644 > > --- a/stand/i386/loader/Makefile > > +++ b/stand/i386/loader/Makefile > > @@ -32,7 +32,12 @@ VERSION_FILE=3D ${.CURDIR}/../loader/version > > # > > # will tell you how many kiB of lomem are available. > > # > > -LOADERSIZE?=3D 560000 # Largest known safe size for loader.bi= n > > +# We further reduce this to 500k, though, to give PXE an additional 64= k > of space > > +# so pxeloader will fit. If you have special needs that do not include > pxeboot, > > +# you can safely set this as high as 560000 generally, or a bit higher > if you > > +# have tight control over the machines you are booting on. > > +# > > +LOADERSIZE?=3D 500000 # Largest known safe size for loader.bi= n > > Hi Warner, > > This breaks the WITH_BEARSSL (which implies WITH_LOADER_VERIEXEC) build. > When enabled, the loader ends up being just slightly larger than the > limit. > "Then fix veriexec to fit." is my knee-jerk (emphasis on the jerk) response. My more polite response is "Why not bump LOADERSIZE locally when you enable that option since it's one of the "special needs" people listed in the comment." IMHO, this is a special need given the tight space constraints, and the big impact when the loader gets too big for PXEBOOT to work. I'm very leery of doing too much "magic" with the size when other options are enabled. The whole point of the limit is to enforce the limit, and I don't want to go start playing whack-a-mole here: do I also disable pxeboot when the limit is > 500k? Do I just do that for veriexec? etc It becomes an aweful game. Or do I just fail the PXE build when loader is > 500k and have a knob to disable that if you want to build both? There's some other, interesting patches that may help with the size issue as well. I'm ill disposed to adding hacks that might wind up being temporary until I can look at those more closely. However, as time goes by, these issues will only grow more acute and we need to start dealing with them now. Given I've MFC'd this, though, I'm not entirely sure the best way forward for that. Warner --00000000000017121d061eb4d9ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Aug 2, 2024 at 8:29=E2=80=AFA= M Mark Johnston <markj@freebsd.org<= /a>> wrote:
O= n Thu, Aug 01, 2024 at 09:31:24PM +0000, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL:
https://= cgit.FreeBSD.org/src/commit/?id=3D46ea2ffc3fbc42089d8322a65fdee8476d2b00d6<= /a>
>
> commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-08-01 21:24:51 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-08-01 21:30:26 +0000
>
>=C2=A0 =C2=A0 =C2=A0stand: Reduce limit to 500k for x86 loader
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0The largest loader that works for PXE boot is about= 500k. PXE needs low
>=C2=A0 =C2=A0 =C2=A0memory for packets and other driver state, so the l= argest safe size for
>=C2=A0 =C2=A0 =C2=A0the loader is about 500k. Reduce the size from 560k= to 500k so we don't
>=C2=A0 =C2=A0 =C2=A0accidentally break PXE in the future.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Add a comment for people with special needs. If you= control the
>=C2=A0 =C2=A0 =C2=A0hardware, it can be safe to have boot loaders as la= rge as 580k or 600k
>=C2=A0 =C2=A0 =C2=A0in some cases. Since the BIOS loader is becoming mo= re and more of a
>=C2=A0 =C2=A0 =C2=A0legacy item, the build variable LOADERSIZE isn'= t documented. This change
>=C2=A0 =C2=A0 =C2=A0doesn't change that: there's been little de= mand for this documentation
>=C2=A0 =C2=A0 =C2=A0and in general, users shouldn't change it light= ly.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0PR: 257018
>=C2=A0 =C2=A0 =C2=A0Sponsored by: Netflix
> ---
>=C2=A0 stand/i386/loader/Makefile | 7 ++++++-
>=C2=A0 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile > index a4aa3a3c4d45..efd442977780 100644
> --- a/stand/i386/loader/Makefile
> +++ b/stand/i386/loader/Makefile
> @@ -32,7 +32,12 @@ VERSION_FILE=3D=C2=A0 =C2=A0 =C2=A0 ${.CURDIR}/../l= oader/version
>=C2=A0 #
>=C2=A0 # will tell you how many kiB of lomem are available.
>=C2=A0 #
> -LOADERSIZE?=3D 560000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Largest kno= wn safe size for loader.bin
> +# We further reduce this to 500k, though, to give PXE an additional 6= 4k of space
> +# so pxeloader will fit. If you have special needs that do not includ= e pxeboot,
> +# you can safely set this as high as 560000 generally, or a bit highe= r if you
> +# have tight control over the machines you are booting on.
> +#
> +LOADERSIZE?=3D 500000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Largest kno= wn safe size for loader.bin

Hi Warner,

This breaks the WITH_BEARSSL (which implies WITH_LOADER_VERIEXEC) build. When enabled, the loader ends up being just slightly larger than the
limit.

special need= given the tight space constraints, and the big impact when the loader
gets too big for PXEBOOT to work.

I'= m very leery of doing too much "magic" with the size when other o= ptions are enabled. The
whole point of the limit is to enforce th= e limit, and I don't want to go start playing whack-a-mole
he= re: do I also disable pxeboot when the limit is > 500k? Do I just do tha= t for veriexec? etc It
becomes an aweful game. Or do I just fail = the PXE build when loader is > 500k and have a knob
to disable= that if you want to build both?

There's s= ome other, interesting patches that may help with the size issue as well. I= 'm
ill disposed to adding hacks that might wind up being temp= orary until I can look at those
more closely. However, as time go= es by, these issues will only grow more acute and we
need to star= t dealing with them now.

Given I've MFC'd = this, though, I'm not entirely sure the best way forward for that.
<= /div>

Warner
--00000000000017121d061eb4d9ad-- From nobody Fri Aug 2 15:56:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wb9SL5XDKz5Rx45; Fri, 02 Aug 2024 15:56:50 +0000 (UTC) (envelope-from joe.marcus@gmail.com) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wb9SK6JJsz58Tm; Fri, 2 Aug 2024 15:56:49 +0000 (UTC) (envelope-from joe.marcus@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=marcuscom.com (policy=none); spf=pass (mx1.freebsd.org: domain of joe.marcus@gmail.com designates 209.85.160.176 as permitted sender) smtp.mailfrom=joe.marcus@gmail.com Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-44fe188d25cso29684021cf.3; Fri, 02 Aug 2024 08:56:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722614208; x=1723219008; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CDRxDCwvqwmQ6lgr5nniqpccUdhdyyazf9dTMsUiTpM=; b=hVxe6J8zF01L1/3e87aR/KF53zI5QN5RTzhfC3wdD/TYhvEUzlnCwsnfyhJIsXjxHo HeDAOZwCUvr0NDb+WnX4lPl0Q1pSbepRNpHGlNeeHpzRok2JpCN+NRUelUdJi5XoAqta y+GubuUYLSAO9tCL5iGSMqPoiYjHUAJAeFdLNr21Gn6oU8J0q/PsKxE+csx0nAbLTxE5 5YwEyi6GNeIS0oUDkqVcyiZuuUnpZ84AjfThpFmAy93xapjuWE83KMSbMJDrCvXQCPO6 UGm6JG1qkVL8AM3baGbH0fO563sYU7vD2hfsjrvJo9MyhIeItGEEM5RlnKz6vmqH0+p1 NhdQ== X-Forwarded-Encrypted: i=1; AJvYcCVfWeYpALcBbVpNiYDg2XW43pqGypkibg9xI2Kvyum7BCAlZe5SQlk7/QbRHzSz6sHgINYvooXu7OeAHXSvMrfvO7dxK37ANmrD@freebsd.org, AJvYcCWtGULg9VHuBfFmBgnj3AT3LYyCqS+pHs/t7Iob4hV2E67ThShdoMdHs8Jdl4T5WgwE7l+IxfCRIhDm6qtoN3umiTHH@freebsd.org, AJvYcCXS6A5O2uNdAPQkK4AJg05jmzRo+T3aJ+Tg3P7sE1+fs/sIsx3QtGCg+TGwZ0hOvHOFntx/wxXcj4I8sC1VpQE=@freebsd.org X-Gm-Message-State: AOJu0YzY8Dd7h3YBxbcATLmDQVbvIweryqhHJgKy+y+PZ9JIxqBUF61R Uu1vn8Fr0q9VT/+w161d2IF1hWLJ/KKrVhw77/mrhcJtloD3FV0ke9gO X-Google-Smtp-Source: AGHT+IENrBRw1Z7DcTAFDvvTPagSnWz/gtJsaWef6mbpZT6lPPugqipVVvbSogulOk8UuzoBVU0+ZA== X-Received: by 2002:a05:622a:255:b0:44f:f1c7:ed2e with SMTP id d75a77b69052e-451892079f1mr44281721cf.7.1722614208560; Fri, 02 Aug 2024 08:56:48 -0700 (PDT) Received: from creme-brulee.marcuscom.com (creme-brulee.marcuscom.com. [2607:fc50:1:f300::2]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4518a755579sm8293471cf.59.2024.08.02.08.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 08:56:48 -0700 (PDT) Received: from [10.10.103.118] (wsip-24-234-111-66.lv.lv.cox.net [24.234.111.66]) (authenticated bits=0) by creme-brulee.marcuscom.com (8.18.1/8.18.1) with ESMTPSA id 472FujF0055638 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 2 Aug 2024 11:56:46 -0400 (EDT) (envelope-from jclarke@marcuscom.com) X-Authentication-Warning: creme-brulee.marcuscom.com: Host wsip-24-234-111-66.lv.lv.cox.net [24.234.111.66] claimed to be [10.10.103.118] Message-ID: <4d8fcff6-92c4-4044-94f9-cf91af06a415@marcuscom.com> Date: Fri, 2 Aug 2024 11:56:40 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6b0a2b19c845 - stable/13 - stand: Print a warning of the loader is too old To: Warner Losh Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org References: <202408011457.471Evboq057700@gitrepo.freebsd.org> Content-Language: en-US From: Joe Clarke In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.4 required=5.0 tests=KHOP_HELO_FCRDNS,RDNS_DYNAMIC autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on creme-brulee.marcuscom.com X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.71 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.82)[-0.824]; FORGED_SENDER(0.30)[jclarke@marcuscom.com,joemarcus@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[marcuscom.com : SPF not aligned (relaxed), No valid DKIM,none]; XM_UA_NO_VERSION(0.01)[]; RCVD_TLS_LAST(0.00)[]; HAS_XAW(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jclarke@marcuscom.com,joemarcus@gmail.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.176:from]; MLMMJ_DEST(0.00)[dev-commits-src-branches@freebsd.org,dev-commits-src-all@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.160.176:from]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4Wb9SK6JJsz58Tm On 8/1/24 11:43, Warner Losh wrote: > > > On Thu, Aug 1, 2024, 9:39 AM Joe Clarke > wrote: > > On 8/1/24 10:57, Warner Losh wrote: > > > +if core.loaderTooOld() then > > + >  print("**********************************************************************") > > + >  print("**********************************************************************") > > +     print("***** >             *****") > > +     print("*****           BOOT LOADER IS TOO OLD. PLEASE > UPGRADE.          *****") > > +     print("***** >             *****") > > + >  print("**********************************************************************") > > + >  print("**********************************************************************") > > +end > > + > > Hey, Warner.  I know this is an MFC, but could the message be updated > with a pointer on _how_ to do that upgrade?  I always find myself > re-learning the process as FreeBSD has evolved, and a current man > pointer would always help. > > > We have a man page for this already, but it's not very good. I'd hoped > to do something with release notes for this release. I was racing the > freeze deadline with the actual change and was going to chase it with > the new / improved docs. Thanks. Improved docs and release notes definitely help. Just thinking beyond 13.4. If people hit this message pointing them to, "(see loader.8)" (or somesuch) would help those find the right answer quickly. Joe From nobody Fri Aug 2 16:13:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wb9rD3ZvBz5RyqZ for ; Fri, 02 Aug 2024 16:14:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wb9rD1hq6z3xJ0 for ; Fri, 2 Aug 2024 16:14:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2cf11b91813so5725995a91.1 for ; Fri, 02 Aug 2024 09:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722615243; x=1723220043; 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=q5Qld84aGfJI1IdBeobxMrYKdXCXPi/LSpxxcIzxNvc=; b=Oh1A5JjbiW7TWNSYJ1EVIjISAfi9jGJwgjYCT7U5M6pgpVeIr1mlGS64WEmi0n8A5h W2UoczEa34PRBB/xxlGyFPJMfZ4EkYGQeMBK1J1ZaNgNMvzCb6dDLEEsrOSD/r3oR/x2 5WIUAsX7vACxLlBrFnuT0jHPEfk6ywmtv8AegS23Zo0WuCMAay1yHeyKlFHrNrdrf/nD L3AK9BbGE9dNmFgQu+HNkgmjoGX4/ueMLiWPSOPzOnEl6mnA7DDYRYM3q53ttwa/tNuK GT/Lj5+CgW14sLjjL99Nmah7wvW6hWzgAvYJj23yse8QJvGxiLZsLXT5TUCFZmwUvhYu jKcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722615243; x=1723220043; 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=q5Qld84aGfJI1IdBeobxMrYKdXCXPi/LSpxxcIzxNvc=; b=NZmqqijQB5BQx+BhvQMkX2EIrmPlcVmzRwUFFkLGKyFVXaRf5r4JDXyHtKNkFwTXhe kRnPsJycbn5TuEOoH3FUYKcMVnBwmY6cf5jLEByasJXmyFB9pa3YAm5xgpl82BRjTZDn +jkdhTDV3JXKhlYqr30HYytGc8jRR0tpNbrHLccqBW4XIl7D5HXmoSSIln4zDhIlbUvB dy/fWQQVXDacbESmG483pOfKVihhRDUvqojp7XDnhOpSqhzkagk5V6ebZWoc+BkS7B4y ozVW7faMdunHZtdGaYFBKhESabKznBb1ccko61T1WI3l2SLfycTpjz6mV/9DadkI79Ep WGHA== X-Forwarded-Encrypted: i=1; AJvYcCUr2uq1G65gV7UivuylEzTDpXiNAuuY0d0x293aSFTay39uVgM3yQalckbM6J1Djl/5YRXJgZfkWvlWR2b3OU3inEyvQuXlzLGTKBypJ7hR X-Gm-Message-State: AOJu0YwmwpJpe+OrkadULHj57LgTk1IlZJRy9ReD2OJdbzoH0X8a8Yun 1x5G6GGw+2yg36jApbqB7STc5P1YfE9ALRdxsULjigU+yipFZOpYOJRsmCjgiRbg4oauCYLyckW N4g/8m5tKE/rm4JDoAucwEbT4tPmlqcxPFFrMZA== X-Google-Smtp-Source: AGHT+IF1+Og+iG/qXlN4wL+LABixxsCvJOo8Zy3x20ndIn4SUJnRozTQCE6PFncPI1eHOghIctwjQuLVO0U0mMZueSo= X-Received: by 2002:a17:90a:644b:b0:2c9:6514:39ff with SMTP id 98e67ed59e1d1-2cff952c35bmr4966114a91.33.1722615242596; Fri, 02 Aug 2024 09:14:02 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202408012131.471LVOGC039269@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 2 Aug 2024 10:13:51 -0600 Message-ID: Subject: Re: git: 46ea2ffc3fbc - main - stand: Reduce limit to 500k for x86 loader To: Mark Johnston Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009ec51f061eb59dd1" 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: 4Wb9rD1hq6z3xJ0 --0000000000009ec51f061eb59dd1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Aug 2, 2024 at 8:29=E2=80=AFAM Mark Johnston wr= ote: > On Thu, Aug 01, 2024 at 09:31:24PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D46ea2ffc3fbc42089d8322a65fdee84= 76d2b00d6 > > > > commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 > > Author: Warner Losh > > AuthorDate: 2024-08-01 21:24:51 +0000 > > Commit: Warner Losh > > CommitDate: 2024-08-01 21:30:26 +0000 > > > > stand: Reduce limit to 500k for x86 loader > > > > The largest loader that works for PXE boot is about 500k. PXE needs > low > > memory for packets and other driver state, so the largest safe size > for > > the loader is about 500k. Reduce the size from 560k to 500k so we > don't > > accidentally break PXE in the future. > > > > Add a comment for people with special needs. If you control the > > hardware, it can be safe to have boot loaders as large as 580k or > 600k > > in some cases. Since the BIOS loader is becoming more and more of a > > legacy item, the build variable LOADERSIZE isn't documented. This > change > > doesn't change that: there's been little demand for this > documentation > > and in general, users shouldn't change it lightly. > > > > PR: 257018 > > Sponsored by: Netflix > > --- > > stand/i386/loader/Makefile | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile > > index a4aa3a3c4d45..efd442977780 100644 > > --- a/stand/i386/loader/Makefile > > +++ b/stand/i386/loader/Makefile > > @@ -32,7 +32,12 @@ VERSION_FILE=3D ${.CURDIR}/../loader/version > > # > > # will tell you how many kiB of lomem are available. > > # > > -LOADERSIZE?=3D 560000 # Largest known safe size for loader.bi= n > > +# We further reduce this to 500k, though, to give PXE an additional 64= k > of space > > +# so pxeloader will fit. If you have special needs that do not include > pxeboot, > > +# you can safely set this as high as 560000 generally, or a bit higher > if you > > +# have tight control over the machines you are booting on. > > +# > > +LOADERSIZE?=3D 500000 # Largest known safe size for loader.bi= n > > Hi Warner, > > This breaks the WITH_BEARSSL (which implies WITH_LOADER_VERIEXEC) build. > When enabled, the loader ends up being just slightly larger than the > limit. > I sent another reply, but don't see it now. I hope it doesn't go out since its tone was off. So for me, on main, this combination works. I'm able to build everything with those two options. One can't build with just WITH_LOADER_VERIEXEC, though, you need both. Even if it had been too big, one can fix this with LOADERSIZE=3D510000. Though doing that automatically is tricky, for reasons below. At the very least, I should make a note of it in the WITH_xxx options. So are there other options you are using, or maybe a different clang version than I have (which I think is tip of main, but might be tip of may from early july). However, as the comment states: this is a special needs case. Veriexec for BIOS is a fringe activity compared to PXEBOOT using BIOS, so we have to draw some hard lines in the default settings. This is the first of the hard lines: The boot loader can't be larger than 500k, at least until we can get good data that larger sizes work with pxeboot. So this limit isn't going to change until there's new data that comes in, since there's way more pxeboot users. The build breakage for pxeboot is silent, and its users can be slow to resport it through the right channels. So this is the lessor evil: Strict limits and working pxeboot at the cost (evil) that some people that add in non-default options will need to do other special things. But what to do. Do we warn when these options are enabled? Do we bump the size? Do we disable pxeboot? Do we just do that if it's larger than a certain amount (or fail so unless you've disabled it, you'll see it's too big)? I'm inclined to (1) document you may need to bump LOADERSIZE with these options and (2) fail the pxeboot build if loader_lua is > 500,000 and maybe (3) have a WITHOUT_LOADER_PXEBOOT option as there isn't one already. That way, if you bump the size, you may have to also disable pxeboot to have a successful build, but it will all be explicit and we'll document that sometimes too many options results in size issues that need careful testing after overriding the safety limits. There's also a dark horse in this: There's a bug / pull request (I can't recall which) that uses LTO and other weird, but clever, tricks to reduce the size of the loader. IIRC, it was a big win for loader.efi, but much smaller win (or maybe even a slight pessimization) for /boot/loader. I'll look into that to see if any of the techniques used there can eke us out some space here. Warner --0000000000009ec51f061eb59dd1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
O= n Thu, Aug 01, 2024 at 09:31:24PM +0000, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL:
https://= cgit.FreeBSD.org/src/commit/?id=3D46ea2ffc3fbc42089d8322a65fdee8476d2b00d6<= /a>
>
> commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-08-01 21:24:51 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-08-01 21:30:26 +0000
>
>=C2=A0 =C2=A0 =C2=A0stand: Reduce limit to 500k for x86 loader
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0The largest loader that works for PXE boot is about= 500k. PXE needs low
>=C2=A0 =C2=A0 =C2=A0memory for packets and other driver state, so the l= argest safe size for
>=C2=A0 =C2=A0 =C2=A0the loader is about 500k. Reduce the size from 560k= to 500k so we don't
>=C2=A0 =C2=A0 =C2=A0accidentally break PXE in the future.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Add a comment for people with special needs. If you= control the
>=C2=A0 =C2=A0 =C2=A0hardware, it can be safe to have boot loaders as la= rge as 580k or 600k
>=C2=A0 =C2=A0 =C2=A0in some cases. Since the BIOS loader is becoming mo= re and more of a
>=C2=A0 =C2=A0 =C2=A0legacy item, the build variable LOADERSIZE isn'= t documented. This change
>=C2=A0 =C2=A0 =C2=A0doesn't change that: there's been little de= mand for this documentation
>=C2=A0 =C2=A0 =C2=A0and in general, users shouldn't change it light= ly.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0PR: 257018
>=C2=A0 =C2=A0 =C2=A0Sponsored by: Netflix
> ---
>=C2=A0 stand/i386/loader/Makefile | 7 ++++++-
>=C2=A0 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile > index a4aa3a3c4d45..efd442977780 100644
> --- a/stand/i386/loader/Makefile
> +++ b/stand/i386/loader/Makefile
> @@ -32,7 +32,12 @@ VERSION_FILE=3D=C2=A0 =C2=A0 =C2=A0 ${.CURDIR}/../l= oader/version
>=C2=A0 #
>=C2=A0 # will tell you how many kiB of lomem are available.
>=C2=A0 #
> -LOADERSIZE?=3D 560000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Largest kno= wn safe size for loader.bin
> +# We further reduce this to 500k, though, to give PXE an additional 6= 4k of space
> +# so pxeloader will fit. If you have special needs that do not includ= e pxeboot,
> +# you can safely set this as high as 560000 generally, or a bit highe= r if you
> +# have tight control over the machines you are booting on.
> +#
> +LOADERSIZE?=3D 500000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Largest kno= wn safe size for loader.bin

Hi Warner,

This breaks the WITH_BEARSSL (which implies WITH_LOADER_VERIEXEC) build. When enabled, the loader ends up being just slightly larger than the
limit.

<= div>
One can't build = with just WITH_LOADER_VERIEXEC, though, you need both. Even if it had been<= /div>
too big, one can fix this with LOADERSIZE=3D510000. Though doing = that automatically is tricky,
for reasons below. At the very leas= t, I should make a note of it in the WITH_xxx options. So are
the= re other options you are using, or maybe a different clang version than I h= ave (which I think is
tip of main, but might be tip of may from e= arly july).

However, as=C2=A0 the comment states: = this is a special needs case. Veriexec for BIOS is a fringe
activ= ity compared to PXEBOOT=C2=A0using BIOS, so we have to draw some hard lines= in the default
settings. This is the first of the hard lines: Th= e boot loader can't be larger than 500k, at least until
we ca= n get good data that larger sizes work with pxeboot. So this limit isn'= t going to change until
there's new data that comes in, since= there's way more pxeboot=C2=A0users. The build breakage for
= pxeboot=C2=A0is silent, and its users can be slow to resport=C2=A0it throug= h the right channels. So this
is the lessor evil: Strict limits a= nd working pxeboot=C2=A0at the cost (evil) that some people that add
<= div>in non-default options will need to do other special things.
disabled it, you'll see it's too big)?



--0000000000009ec51f061eb59dd1-- From nobody Fri Aug 2 16:35:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbBK949Xlz5S1MZ for ; Fri, 02 Aug 2024 16:35:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbBK844zQz41h8 for ; Fri, 2 Aug 2024 16:35:40 +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=yg+huTnx; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::1032) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2cb5b783c15so6226641a91.2 for ; Fri, 02 Aug 2024 09:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722616539; x=1723221339; 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=r1oAPGoVSdiHNjB5xrO+0km1ilFeSvg1qxc3tiUKp38=; b=yg+huTnx+LkKy91q73dwStAQJAJa1T43lY5L69g37xRAKYHk0ePGc+dPHNMs1HWAa7 SUh9oWY/BLyk1mNjPjIPDKOrEty+L4VpuLqqxF5FGvRHa+nsKcnqYJ/FTofdr2S3zDXO /KEKUATivdCdtwUrGAhYc/85ILmcm7FhA7NZBDtlJWEC41fmNmHUJy7CN83YM/x9l8LN VDf0U+Kz/MrY2MBhITklWERwmn5OiYxA4zXYtokf1q5aD/G3C6au2JerxmmvAsYGNJfq 3QrxydRSlhwDLBPasFqYa7xVZLbm5RDy0oZZiV6xrPxIXF1H7KGbNc6tqA9/OM2gOjPK M2GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722616539; x=1723221339; 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=r1oAPGoVSdiHNjB5xrO+0km1ilFeSvg1qxc3tiUKp38=; b=fvC746nsbrtT9oj7P4C3yOb0HqjfinmgbNN61Y3PUdwTqH3iiDJtXClEwxdYBJRJCx xinjbOHpQT2P2gr1c0LoWUkfZnZ2wCg29KcMhTcaKlrLBRzu7IUSNQ4CNO4oKVRzqnUN nWVi2ok6dBOf89cpwL8mLuyPt1947QpmdJJK0cXINyBbf1lbHW3Svvx/Xu/Yqat5mpv/ YZpaXCbsft2lcNYEltbIk7J7IpiHdSkG9hBQ4jv+vQ99nlEG7MaA7ChA2npMkuSSi55M CXnuDmC5Ym2AGrKHithRTTqttKiwV5wYaskk7DC7g07u0h6FfqO7y628ZvNYpl9EOvDY QpWw== X-Forwarded-Encrypted: i=1; AJvYcCVMyEyJpqOaYb9DSK6mGYoQTzQzIhUrhMkFsCZlMweUG5NiHndYqioq9B86NAxZD7MPpesVACt3VCEQnWX3l/JdUNS8cRhTR5XkjlyitFMd X-Gm-Message-State: AOJu0YzJTIGrOkIWHAIQDAdPc+W3M3wxuOrn83jiseAYbkPnl9IVZy4f /VR5p+UvfOyNFI4w1wnOpq1ZO/vXyekZWXStipC2FHS93eKtLiec2S9MX7y2eB6QzdD8ed1XakJ rgpgbFhIRTCsE5tshi+wqf9w7mdyiFCCpG+NeKIG0/zJZjIGn+THY6Q== X-Google-Smtp-Source: AGHT+IHwnSSVxbC0H4wOAfqTLir+RBHBgEwug0KrtQBEwxCe9SIULdeg8/iuJ9EF/mQBwBVwoV21jV84WLSTH0KCiuw= X-Received: by 2002:a17:90b:1183:b0:2c2:df58:bb8c with SMTP id 98e67ed59e1d1-2cff9430f46mr5103462a91.18.1722616538915; Fri, 02 Aug 2024 09:35:38 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202408012131.471LVOGC039269@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 2 Aug 2024 10:35:27 -0600 Message-ID: Subject: Re: git: 46ea2ffc3fbc - main - stand: Reduce limit to 500k for x86 loader To: Mark Johnston Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e300dc061eb5eaa8" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.989]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1032:from]; DMARC_NA(0.00)[bsdimp.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; R_SPF_NA(0.00)[no SPF record]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4WbBK844zQz41h8 --000000000000e300dc061eb5eaa8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Aug 2, 2024 at 10:13=E2=80=AFAM Warner Losh wrote: > > > On Fri, Aug 2, 2024 at 8:29=E2=80=AFAM Mark Johnston = wrote: > >> On Thu, Aug 01, 2024 at 09:31:24PM +0000, Warner Losh wrote: >> > The branch main has been updated by imp: >> > >> > URL: >> https://cgit.FreeBSD.org/src/commit/?id=3D46ea2ffc3fbc42089d8322a65fdee8= 476d2b00d6 >> > >> > commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 >> > Author: Warner Losh >> > AuthorDate: 2024-08-01 21:24:51 +0000 >> > Commit: Warner Losh >> > CommitDate: 2024-08-01 21:30:26 +0000 >> > >> > stand: Reduce limit to 500k for x86 loader >> > >> > The largest loader that works for PXE boot is about 500k. PXE need= s >> low >> > memory for packets and other driver state, so the largest safe siz= e >> for >> > the loader is about 500k. Reduce the size from 560k to 500k so we >> don't >> > accidentally break PXE in the future. >> > >> > Add a comment for people with special needs. If you control the >> > hardware, it can be safe to have boot loaders as large as 580k or >> 600k >> > in some cases. Since the BIOS loader is becoming more and more of = a >> > legacy item, the build variable LOADERSIZE isn't documented. This >> change >> > doesn't change that: there's been little demand for this >> documentation >> > and in general, users shouldn't change it lightly. >> > >> > PR: 257018 >> > Sponsored by: Netflix >> > --- >> > stand/i386/loader/Makefile | 7 ++++++- >> > 1 file changed, 6 insertions(+), 1 deletion(-) >> > >> > diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile >> > index a4aa3a3c4d45..efd442977780 100644 >> > --- a/stand/i386/loader/Makefile >> > +++ b/stand/i386/loader/Makefile >> > @@ -32,7 +32,12 @@ VERSION_FILE=3D ${.CURDIR}/../loader/version >> > # >> > # will tell you how many kiB of lomem are available. >> > # >> > -LOADERSIZE?=3D 560000 # Largest known safe size for loader.b= in >> > +# We further reduce this to 500k, though, to give PXE an additional >> 64k of space >> > +# so pxeloader will fit. If you have special needs that do not includ= e >> pxeboot, >> > +# you can safely set this as high as 560000 generally, or a bit highe= r >> if you >> > +# have tight control over the machines you are booting on. >> > +# >> > +LOADERSIZE?=3D 500000 # Largest known safe size for loader.b= in >> >> Hi Warner, >> >> This breaks the WITH_BEARSSL (which implies WITH_LOADER_VERIEXEC) build. >> When enabled, the loader ends up being just slightly larger than the >> limit. >> > > I sent another reply, but don't see it now. I hope it doesn't go out sinc= e > its tone was off. > > So for me, on main, this combination works. I'm able to build everything > with those two options. > One can't build with just WITH_LOADER_VERIEXEC, though, you need both. > Even if it had been > too big, one can fix this with LOADERSIZE=3D510000. Though doing that > automatically is tricky, > for reasons below. At the very least, I should make a note of it in the > WITH_xxx options. So are > there other options you are using, or maybe a different clang version tha= n > I have (which I think is > tip of main, but might be tip of may from early july). > > However, as the comment states: this is a special needs case. Veriexec > for BIOS is a fringe > activity compared to PXEBOOT using BIOS, so we have to draw some hard > lines in the default > settings. This is the first of the hard lines: The boot loader can't be > larger than 500k, at least until > we can get good data that larger sizes work with pxeboot. So this limit > isn't going to change until > there's new data that comes in, since there's way more pxeboot users. The > build breakage for > pxeboot is silent, and its users can be slow to resport it through the > right channels. So this > is the lessor evil: Strict limits and working pxeboot at the cost (evil) > that some people that add > in non-default options will need to do other special things. > > But what to do. Do we warn when these options are enabled? Do we bump the > size? Do we > disable pxeboot? Do we just do that if it's larger than a certain amount > (or fail so unless you've > disabled it, you'll see it's too big)? > > I'm inclined to (1) document you may need to bump LOADERSIZE with these > options and > (2) fail the pxeboot build if loader_lua is > 500,000 and maybe (3) have > a WITHOUT_LOADER_PXEBOOT > option as there isn't one already. That way, if you bump the size, you ma= y > have to also disable > pxeboot to have a successful build, but it will all be explicit and we'll > document that sometimes > too many options results in size issues that need careful testing after > overriding the safety limits. > > There's also a dark horse in this: There's a bug / pull request (I can't > recall which) that uses LTO > and other weird, but clever, tricks to reduce the size of the loader. > IIRC, it was a big win for loader.efi, > but much smaller win (or maybe even a slight pessimization) for > /boot/loader. I'll look into that to > see if any of the techniques used there can eke us out some space here. > https://reviews.freebsd.org/D46211 has what I had in mind for (1). It's really the only one of the three I'm not sure what to do about. Warner --000000000000e300dc061eb5eaa8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=


On Fri, Aug 2, 2024 at 8:29=E2=80=AFAM Mark J= ohnston <markj@fr= eebsd.org> wrote:
On Thu, Aug 01, 2024 at 09:31:24PM +0000, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D46ea2ffc3fbc42089d8322a65fdee8476d2b00d6<= /a>
>
> commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-08-01 21:24:51 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-08-01 21:30:26 +0000
>
>=C2=A0 =C2=A0 =C2=A0stand: Reduce limit to 500k for x86 loader
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0The largest loader that works for PXE boot is about= 500k. PXE needs low
>=C2=A0 =C2=A0 =C2=A0memory for packets and other driver state, so the l= argest safe size for
>=C2=A0 =C2=A0 =C2=A0the loader is about 500k. Reduce the size from 560k= to 500k so we don't
>=C2=A0 =C2=A0 =C2=A0accidentally break PXE in the future.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Add a comment for people with special needs. If you= control the
>=C2=A0 =C2=A0 =C2=A0hardware, it can be safe to have boot loaders as la= rge as 580k or 600k
>=C2=A0 =C2=A0 =C2=A0in some cases. Since the BIOS loader is becoming mo= re and more of a
>=C2=A0 =C2=A0 =C2=A0legacy item, the build variable LOADERSIZE isn'= t documented. This change
>=C2=A0 =C2=A0 =C2=A0doesn't change that: there's been little de= mand for this documentation
>=C2=A0 =C2=A0 =C2=A0and in general, users shouldn't change it light= ly.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0PR: 257018
>=C2=A0 =C2=A0 =C2=A0Sponsored by: Netflix
> ---
>=C2=A0 stand/i386/loader/Makefile | 7 ++++++-
>=C2=A0 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile > index a4aa3a3c4d45..efd442977780 100644
> --- a/stand/i386/loader/Makefile
> +++ b/stand/i386/loader/Makefile
> @@ -32,7 +32,12 @@ VERSION_FILE=3D=C2=A0 =C2=A0 =C2=A0 ${.CURDIR}/../l= oader/version
>=C2=A0 #
>=C2=A0 # will tell you how many kiB of lomem are available.
>=C2=A0 #
> -LOADERSIZE?=3D 560000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Largest kno= wn safe size for loader.bin
> +# We further reduce this to 500k, though, to give PXE an additional 6= 4k of space
> +# so pxeloader will fit. If you have special needs that do not includ= e pxeboot,
> +# you can safely set this as high as 560000 generally, or a bit highe= r if you
> +# have tight control over the machines you are booting on.
> +#
> +LOADERSIZE?=3D 500000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Largest kno= wn safe size for loader.bin

Hi Warner,

This breaks the WITH_BEARSSL (which implies WITH_LOADER_VERIEXEC) build. When enabled, the loader ends up being just slightly larger than the
limit.

<= div>
One can't build = with just WITH_LOADER_VERIEXEC, though, you need both. Even if it had been<= /div>
too big, one can fix this with LOADERSIZE=3D510000. Though doing = that automatically is tricky,
for reasons below. At the very leas= t, I should make a note of it in the WITH_xxx options. So are
the= re other options you are using, or maybe a different clang version than I h= ave (which I think is
tip of main, but might be tip of may from e= arly july).

However, as=C2=A0 the comment states: = this is a special needs case. Veriexec for BIOS is a fringe
activ= ity compared to PXEBOOT=C2=A0using BIOS, so we have to draw some hard lines= in the default
settings. This is the first of the hard lines: Th= e boot loader can't be larger than 500k, at least until
we ca= n get good data that larger sizes work with pxeboot. So this limit isn'= t going to change until
there's new data that comes in, since= there's way more pxeboot=C2=A0users. The build breakage for
= pxeboot=C2=A0is silent, and its users can be slow to resport=C2=A0it throug= h the right channels. So this
is the lessor evil: Strict limits a= nd working pxeboot=C2=A0at the cost (evil) that some people that add
<= div>in non-default options will need to do other special things.
disabled it, you'll see it's too big)?



<= div>https://reviews.freebsd.= org/D46211 has what I had in mind for (1). It's really the only one= of the three
I'm not sure what to do about.

Warner=C2=A0
--000000000000e300dc061eb5eaa8-- From nobody Fri Aug 2 16:39:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbBPs6wgkz5S1lG; Fri, 02 Aug 2024 16:39:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbBPs6PC0z41sS; Fri, 2 Aug 2024 16:39:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722616785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrbFPHb/aGdXXH5hXpbzpxIGn6OS2lV8/g8dFeM8WXY=; b=nswLc6nt0olyQyHiFUy3ftaD1D/6R+Yr5Kydj1V4cchDvVB5z6vp5tf4XlAJnCyr2P9OfK EHNniqyUmwyH45OD0n+tjs8QoZpvKoAurVyLjl0C9TVJle1XcPGkYGebjfAPlnsjuIDfU9 OBr/9RejiGlOW/E7c4/8qUvh+e6czBD1bzYlatvKSIHMvnXGcuk4Pm6rm51TggJrQi3uOf xUGJyv1AzMz95/dltJ3oUo0lu8aXJae0TBbsgBKLtsn0zE4D7LykcRDMnXrD6YHVxm/xkf fSC61rEmY8y8xF8E7bPbtqLnKYmW7kfUyRMVrm04EW5mYoQEyq5SFEo0A0N6eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722616785; a=rsa-sha256; cv=none; b=DO0aQbdzzuJcT86jlvEBs91sfPDp6gIV+GHxhs4elVZmVnV/iXyfDgW/5cfTiuxTr0/OTq LHQxEbeFWQp0diliTKGIaS0QWDooJg62jLZPE2NMJZSzXLqT9jI5yJSeQTSKoPXIUaMI4P KvMZNPBjAJNdLTBSxfH4RANO7Az1q89r2Or1Hgl7TL6XszGoxCPJWwWvgEEqk7il7JReIn CQ6+XgFWPfb73trIN/PUefVHwF5h/d1svwO/M0Ag9aAsW3UGK1IozA+VG/fxRLPL4iMUA7 vDpE/+dV9eyjRJbFIqkNlKKpFy+HXXcOjbpKprd+2Wd5WOKPuotREFD79GHq6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722616785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrbFPHb/aGdXXH5hXpbzpxIGn6OS2lV8/g8dFeM8WXY=; b=EcZm0GYh+kNo7HgYVcZ6ThHohW5ITxjHHqFRwfhyl1WBm1IgGKkck48a3SFwj0CysUuyH/ mHt0p5PtMqlXIDQk8uUP8m8ot+4oP1/vLTkGs58PUHiSg47ykW0VoqH47g3Wq3iMP4r3dE QgOVdRMpT1We/9SLWCINx2SpjZetqapNvfyFiDGhi2jru6PS+q8h7raG118IuY4/3rIg7C Bt74FfCfgiy/cjXOZh6rnLYOOUmeFMvnCR6FgugbzM7oILuByEae2o2oTigq3CsBxlXjhr 9f9JpYlx1Ho5h/aWtwEk+8Dy6rDrlmyHcA+n5nToRzEWorH6oD8dm+BkSHIkAA== 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 4WbBPs5ZbhzbjY; Fri, 2 Aug 2024 16:39:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472GdjEK071866; Fri, 2 Aug 2024 16:39:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472Gdjns071863; Fri, 2 Aug 2024 16:39:45 GMT (envelope-from git) Date: Fri, 2 Aug 2024 16:39:45 GMT Message-Id: <202408021639.472Gdjns071863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c1f711fd359f - stable/14 - siftr: remove the shutdown_pre_sync event handler on unload List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c1f711fd359f41f9cdb18dd7a02d1fb0ce8866a2 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c1f711fd359f41f9cdb18dd7a02d1fb0ce8866a2 commit c1f711fd359f41f9cdb18dd7a02d1fb0ce8866a2 Author: Kristof Provost AuthorDate: 2024-07-19 06:08:14 +0000 Commit: Kristof Provost CommitDate: 2024-08-02 07:30:38 +0000 siftr: remove the shutdown_pre_sync event handler on unload PR: 280351 MFC after: 2 weeks (cherry picked from commit fb05f761ac0b28b03eb057e36fe118f007d43d73) --- sys/netinet/siftr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index 52e2b8838b0f..255714cec0b1 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -273,6 +273,7 @@ static struct mtx siftr_pkt_queue_mtx; static struct mtx siftr_pkt_mgr_mtx; static struct thread *siftr_pkt_manager_thr = NULL; static char direction[2] = {'i','o'}; +static eventhandler_tag siftr_shutdown_tag; /* Required function prototypes. */ static int siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS); @@ -1281,6 +1282,7 @@ static int deinit_siftr(void) { /* Cleanup. */ + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, siftr_shutdown_tag); siftr_manage_ops(SIFTR_DISABLE); hashdestroy(counter_hash, M_SIFTR, siftr_hashmask); mtx_destroy(&siftr_pkt_queue_mtx); @@ -1295,8 +1297,8 @@ deinit_siftr(void) static int init_siftr(void) { - EVENTHANDLER_REGISTER(shutdown_pre_sync, siftr_shutdown_handler, NULL, - SHUTDOWN_PRI_FIRST); + siftr_shutdown_tag = EVENTHANDLER_REGISTER(shutdown_pre_sync, + siftr_shutdown_handler, NULL, SHUTDOWN_PRI_FIRST); /* Initialise our flow counter hash table. */ counter_hash = hashinit(SIFTR_EXPECTED_MAX_TCP_FLOWS, M_SIFTR, From nobody Fri Aug 2 16:39:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbBPt1qTHz5S1yf; Fri, 02 Aug 2024 16:39:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbBPs6tQ0z41xX; Fri, 2 Aug 2024 16:39:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722616786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vS6oerBj+G5J8QVAsCXtsDD5pRdY60m4+AJlkeYORE=; b=KNxm0chrpcLijFfdUjJIZzFD0hmBb+1I4wzJSt1+RkvEcmLFb6M+pVtYTBkiWCDHGJwyNa MtGHytyPfIyIkyEhYHgF2TxvTnArnlFfT+XPQbpmnITv+J73BZfxMaHOq55dlt/3y8vKpl Xi777ggtnPrrZ8lpExDJzBYm2HT5CB8BNufMZWIkmhsYYFUXSC6VgXjENUDaybbz36teQU dDD6VdZl3dx4n6fVGcK5b95VBGQDuNEKeoFiIV/MBHF9DKGZdMhnLhNZVYShH3wQQl15io lt8qT+j/myzqv3E3O4ZWZGjS2fBGLWjaOsYyZ3mtBId/USBZPPzoTpMfG4jDYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722616786; a=rsa-sha256; cv=none; b=vXlNp30EFtJ7XsUn8SBmqLTYBcQoaKC9WqQFxsG5THEJhcm4elAsbYvEPaiQ1oNdzCUQjv Km3RblvCLWIYwtjDJU+hgES4+mnz2uEop30eC+YqyQ2eHZ81/uaS5mJa82u/WITFEFhatR Al1BimG/e0mP+bgGYnTfIV3cLWa+Cii1TSJDu6gELl7M32SBlXCMAM5AAmoodbf4z3fsZd sazTdP6Nm++eDV5A3TUddYdTA3faUNAhbT8RdhcORGHKc/aonMAihUpYUs1UhrXdnMUwIn DYITAP4F72/AQRovI6esZ1/WwDjpRvFb8YkHqnQGk0UBRNswfg48P2sgpQITkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722616786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vS6oerBj+G5J8QVAsCXtsDD5pRdY60m4+AJlkeYORE=; b=YftZcJkjX52vAroZ6MLIcMwFuS5wLRmnRkaoyxmbeRImUwsr6JJrRDmWfCnRPeM3NXn8d/ GeA+MVvcyy0lmrkulr6G4m6Wzb1hLEYZtUA92drDgGUb06k+UkxWI3jRlv5sT1vavgTrXc jEyVdBDtzgWZJ9RMzQY9csdoY/lkRDAlVvZCCiCjERkMbiH9kJHQDSfwTP7oEjqsxFcpuc pvnTBYsQavH4avsOEe2OevnXZ7Vm0oVD0kTZsuL0bk7U7Kza5gu+Q7U53N6IESeh2RabeU 8tfXHpZq/oxhQiBLJXC4SJcWTv0ZmKXUZbCg+TJFrwFCEFnY71JTWV4iI5D4Zg== 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 4WbBPs6NG1zbnV; Fri, 2 Aug 2024 16:39:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472GdjFj071955; Fri, 2 Aug 2024 16:39:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472Gdjej071952; Fri, 2 Aug 2024 16:39:45 GMT (envelope-from git) Date: Fri, 2 Aug 2024 16:39:45 GMT Message-Id: <202408021639.472Gdjej071952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 8448df88fdb4 - stable/13 - siftr: remove the shutdown_pre_sync event handler on unload List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8448df88fdb4ed880b43e3fe91691d37b3940fe8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8448df88fdb4ed880b43e3fe91691d37b3940fe8 commit 8448df88fdb4ed880b43e3fe91691d37b3940fe8 Author: Kristof Provost AuthorDate: 2024-07-19 06:08:14 +0000 Commit: Kristof Provost CommitDate: 2024-08-02 07:30:41 +0000 siftr: remove the shutdown_pre_sync event handler on unload PR: 280351 MFC after: 2 weeks (cherry picked from commit fb05f761ac0b28b03eb057e36fe118f007d43d73) --- sys/netinet/siftr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index 7ec19ecc875a..c6c47eb9da83 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -288,6 +288,7 @@ static struct mtx siftr_pkt_queue_mtx; static struct mtx siftr_pkt_mgr_mtx; static struct thread *siftr_pkt_manager_thr = NULL; static char direction[2] = {'i','o'}; +static eventhandler_tag siftr_shutdown_tag; /* Required function prototypes. */ static int siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS); @@ -1507,6 +1508,7 @@ static int deinit_siftr(void) { /* Cleanup. */ + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, siftr_shutdown_tag); siftr_manage_ops(SIFTR_DISABLE); hashdestroy(counter_hash, M_SIFTR, siftr_hashmask); mtx_destroy(&siftr_pkt_queue_mtx); @@ -1521,8 +1523,8 @@ deinit_siftr(void) static int init_siftr(void) { - EVENTHANDLER_REGISTER(shutdown_pre_sync, siftr_shutdown_handler, NULL, - SHUTDOWN_PRI_FIRST); + siftr_shutdown_tag = EVENTHANDLER_REGISTER(shutdown_pre_sync, + siftr_shutdown_handler, NULL, SHUTDOWN_PRI_FIRST); /* Initialise our flow counter hash table. */ counter_hash = hashinit(SIFTR_EXPECTED_MAX_TCP_FLOWS, M_SIFTR, From nobody Fri Aug 2 17:58:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbD8D4G7Yz5S8D6; Fri, 02 Aug 2024 17:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbD8D1ssXz489Q; Fri, 2 Aug 2024 17:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722621484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iSD8RL3gYj6oHJhukntXQVdt4JlmTlThwIH2dNF/Frg=; b=tZlaNxELMb1g2GzThL5V/d1qc2K9EpSqaO8fO3Qhe5BQKcfQywuGbbzb782O8ZnJJ9d9B4 Iai9/9C6HG9lj0utgHRSMkHjUWpNPz3gL4VMs4FKAE7oz8d7t5AwZYYs/8IMqPIWgs13GT DdfTou1+uZljRobMFAL6v7fUN7340xXRUbrI9J1MxKtjR3vdAas+EVGN2OM0tvNHzHKWTx fcGFExIqi7R5+xf6lK2zFIdfxijm72wXCwV6QYT5WKjYYCyEfWDvf69oPw8CnCooraOL/Y 1jRqh0ISoXwO4skuRUfk+dZhoQIlxcX/E/TnZIcs7R4a1V0FeflmPX1xWntDWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722621484; a=rsa-sha256; cv=none; b=W3qhFWWGCeW0KYOmF3nYN9xaGub24OSwuok4j/cgr40B0YAIul1Kohzsi5iZD+BOpza771 kTAq+a1XJyQcZuY568QYwM0iP69Yxobx/TdOK+SaYcGXKLI4eKtGH/Z0TBu6JvRt2m20zv VtD33kV1JH6oHeoEbAxVYxJBKyEEYldhH9wzZlqp0AVijlrV5IQSwOvscBPvM7hPusP/R+ Q/uiHlLB7t4cJo4QPRIDPMx9ea44RGJtJigY3ah+Bd77XkVZSR1iAXKWNeoCRZxI5l8JuL XySpeoej2AgM8HhPO5tJEp9T2ZLfNGh//vP/DgOCwAJ0wFkEP2h7V3PizNI1DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722621484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iSD8RL3gYj6oHJhukntXQVdt4JlmTlThwIH2dNF/Frg=; b=VRp7sVK1fEN9gbFbdOqb36a4Y/A1mLSo7hUoQIcxpdCXi1Dx5HyI7O6+8oFE3LBmHgcZYI m323yhHYwOLnGtqEMOV93HK36O+7GHD29W0G8gjl5q/SdC7ePsm6fwjSg5P+pwuaIjVyoh xBsjttScf1MTZqB7al7lMv6W+KBMQ2S4I1OsNIq4c+snXR+cV4qwAu+7J1s+IOUHd+U3Dn c5WJ6TAiudRxgnCEf/S19XZk0jQ1oQDAqCeXO+5eUULyb2fEK8cgcIsEPExo5+WCeA/5Eg us6jlJ/u2XM7TLOHCqxWAJJl7HPavERLRNLCiSxbmYKY3pFslJtGK9Uud0qCEw== 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 4WbD8D1M7Hzd3R; Fri, 2 Aug 2024 17:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472Hw4JJ007195; Fri, 2 Aug 2024 17:58:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472Hw4Ix007192; Fri, 2 Aug 2024 17:58:04 GMT (envelope-from git) Date: Fri, 2 Aug 2024 17:58:04 GMT Message-Id: <202408021758.472Hw4Ix007192@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: e5d6af4fe754 - main - sysv ipc: remove {msg,sem,shm}sys() declerations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e5d6af4fe754dfec6ddc6802b3bbc2dae84d733a Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e5d6af4fe754dfec6ddc6802b3bbc2dae84d733a commit e5d6af4fe754dfec6ddc6802b3bbc2dae84d733a Author: Brooks Davis AuthorDate: 2024-08-02 17:22:43 +0000 Commit: Brooks Davis CommitDate: 2024-08-02 17:57:16 +0000 sysv ipc: remove {msg,sem,shm}sys() declerations These syscall muxes are under COMPAT7 or earlier and AFACT they were only ever used in libc. The which arguments seems to have never had a published API and it was a mistake that they were exported or declared. Reviewed by: kib, jhb Differential Revision: https://reviews.freebsd.org/D46209 --- sys/sys/msg.h | 3 --- sys/sys/sem.h | 3 --- sys/sys/shm.h | 3 --- 3 files changed, 9 deletions(-) diff --git a/sys/sys/msg.h b/sys/sys/msg.h index d8c950e66c47..a880c538ddc1 100644 --- a/sys/sys/msg.h +++ b/sys/sys/msg.h @@ -162,9 +162,6 @@ int msgctl(int, int, struct msqid_ds *); int msgget(key_t, int); ssize_t msgrcv(int, void *, size_t, long, int); int msgsnd(int, const void *, size_t, int); -#if __BSD_VISIBLE -int msgsys(int, ...); -#endif __END_DECLS #endif /* !_KERNEL */ diff --git a/sys/sys/sem.h b/sys/sys/sem.h index 5634f4b0cfcc..ebb287d6642f 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -148,9 +148,6 @@ int kern_get_sema(struct thread *td, struct semid_kernel **res, #else /* !_KERNEL */ __BEGIN_DECLS -#if __BSD_VISIBLE -int semsys(int, ...); -#endif int semctl(int, int, int, ...); int semget(key_t, int, int); int semop(int, struct sembuf *, size_t); diff --git a/sys/sys/shm.h b/sys/sys/shm.h index a1aa6ca54c60..d80de811ef7d 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -171,9 +171,6 @@ typedef __size_t size_t; #endif __BEGIN_DECLS -#if __BSD_VISIBLE -int shmsys(int, ...); -#endif void *shmat(int, const void *, int); int shmget(key_t, size_t, int); int shmctl(int, int, struct shmid_ds *); From nobody Fri Aug 2 18:05:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbDK80DdTz5S8kB; Fri, 02 Aug 2024 18:05:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbDK76mRpz49r0; Fri, 2 Aug 2024 18:05:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722621947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NDocZG/qTTaYD1Ez96XS+1mr3+l+tjlJKEYsG0HXaEA=; b=hFOq47fW1aNE5f3Wl76ZKvL16HgTUUJQgvrYKjkVkW/uisGB+0qMlVvDtqO4MFqCEkprbP eiMSFrM3537rGLCeMzM/9j2d9ZDkklMdZxh/hgR0iQL8LWE6TS2OukX+Jijq4QZwMaHOZb Y/KUfRlnwPSvb6aEyxTCbsks1Tn5qv9o8tQhpx1WN0oexA9N+Qd7W9h/E1uMoZ6SxJAdq9 0rb2dPmHIY60iMa8DeX/u5IlWnHuUP2r8WD65SmP7DE8ZUggdqIOJOdkGZ2naXf5SWtMyv nsvALvuEKdfCi3OTR8a3zlE3eZ1G3unJqLGVaj+gFze1kS6Pr4EXxQXgeReXcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722621947; a=rsa-sha256; cv=none; b=T/ij/dZWy/2k6Xk7My852qlPl5xmHOfqdphW77fp109P4j6lLH1ZbzDvx7TWhWvlAIRWgu ynAy4cYkWi4YiHFk0DIW+Wbf22k7LqgSuV/KGXTCN5gKWhFj6tep/4bXmaxl+tC2pdmOhu bGTXeLDGqnNuAqQMy4GW1iyjxICIPi32/mWC69SvPI2Z8d1bAXGG2OrfTFUpq1QrRk/muF GD2VYSydEykwhSd2LT1DJIJCr1rGbHHxi1N4XQM2aDEr+4a0IJzYmH9UEletPcHW92XyyT i+cnqu08SByqBWtVtgm3Xl0SzfIIqOLy6MrJVa5NNyBvuXVvrX64t10ffEMZ9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722621947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NDocZG/qTTaYD1Ez96XS+1mr3+l+tjlJKEYsG0HXaEA=; b=lqT3RFqcm/tG/6PQVx8RiT4VYP1EbxkB3hkdpgjuGzjmNG8hOTKipwW51oaKa/jdhKr4GS 38Wqo3jlg1iU0gBtQj1hiAXcFeflY/euyaNL6B6j5XiCDRU7tI8/NfnMtpbRBnlEOACyw5 9BkLoENeQ82SMHJLUrQdqOZPLXIUGFpEORTTlh9FI7Ngu7s1vAGfQ5pFP+D+sQKEmsmD5Q hlJXWWaKtSJupcS5bcFB4DA6PPmz74bTQb6UG0AJ9YEnl2Ds+InxnTmX6v/gxVBc3n7iav l1F92m4mzXYEfNbZa1CxEfPjT5zV8HPOfQQoBDC5tefcqslt9k2T7c+y1ln1wg== 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 4WbDK76FXHzf84; Fri, 2 Aug 2024 18:05:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472I5lwh025095; Fri, 2 Aug 2024 18:05:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472I5lhT025092; Fri, 2 Aug 2024 18:05:47 GMT (envelope-from git) Date: Fri, 2 Aug 2024 18:05:47 GMT Message-Id: <202408021805.472I5lhT025092@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: 2e4781cb12af - main - xen/netfront: Decouple XENNET tags from mbuf lifetimes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 2e4781cb12af2d13262ed5decf6fd95c8d58d9f5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e4781cb12af2d13262ed5decf6fd95c8d58d9f5 commit 2e4781cb12af2d13262ed5decf6fd95c8d58d9f5 Author: Mark Johnston AuthorDate: 2024-08-02 13:09:41 +0000 Commit: Mark Johnston CommitDate: 2024-08-02 18:05:37 +0000 xen/netfront: Decouple XENNET tags from mbuf lifetimes netmap's generic mode tries to improve performance by minimizing mbuf allocations. In service of this goal, it maintains an extra reference to the mbuf and polls the counter to see if the driver has released its reference by calling m_freem(). As a result, the extref destructor is not called when expected by the netfront driver, and mbufs tags are not freed. Modify the tx path to release its mbuf tags promptly when reclaiming tx descriptors. They are drawn from a fixed-size pool, so otherwise are quickly exhausted when a netfront interface is in netmap generic mode. Co-authored by: royger MFC after: 2 weeks Fixes: dabb3db7a817 ("xen/netfront: deal with mbuf data crossing a page boundary") Sponsored by: Cloud Software Group Sponsored by: Klara, Inc. Sponsored by: Zenarmor --- sys/dev/xen/netfront/netfront.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 6ac6ecc3bdb7..e13fb8765bae 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -335,8 +335,16 @@ static void mbuf_release(struct mbuf *m) KASSERT(ref != NULL, ("Cannot find refcount")); KASSERT(ref->count > 0, ("Invalid reference count")); - if (--ref->count == 0) + if (--ref->count == 0) { + /* + * Explicitly free the tag while we hold the tx queue lock. + * This ensures that the tag is deleted promptly in case + * something else is holding extra references to the mbuf chain, + * such as netmap. + */ + m_tag_delete(m, &ref->tag); m_freem(m); + } } static void tag_free(struct m_tag *t) From nobody Fri Aug 2 19:42:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbGT32D6Qz5SHMh; Fri, 02 Aug 2024 19:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbGT31N8wz4Lrd; Fri, 2 Aug 2024 19:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722627767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqYQqOyLvWeaAiSohZDxVBo6zsGpjwB/H0Lg8NvF3jg=; b=W3CW34sN8eCpaCuvH7YEoEWP6/jygDg6qvdDxplJdJnFoqpmMpE3WMX8NVrsB9Xvc5+orl XoXhoCXoQWYTS0oCaxzfYjVhjj2JwN1P4Nt8Hhc9Slmx8VQE/FYtF9gMt+GbWfx6V4xrv6 vtzfGLwMDaXCpqFHszF8QikdhZbqtNBTRgo8RoQUTm+ZoeuG7IsOVrYTJEPe443Yai4s8j kDjt2BGAnEi99x866muYWV6au1cYozavCRAYNNlBlS2W84UW8k7rbqQ+khjhHuAsuB5lJ5 3ZuxPEQ0FiFINjuIYyUPtTfd/CVIzySIBGAMOyhrUsR+rFwvZJZetAp1ZtY9hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722627767; a=rsa-sha256; cv=none; b=SJuPM7YN0OkHsfJjEn1YYRGhYrsh2QmYgZ2eimqiTh0dUK3KItqfy6MnqSrkKaXXzHyk8G rF9hMztKZTGISzYRAn5HpEzhgoZ+Cbpq+NwaEWbVj5jXNHTE35qqfyaYMnSN2GKinL6FQZ Y//oDoWVYylYEx0h8/+xJPzb/Th2gvMy0rWSPg9pGdI9fzgfi6O3NTyJyKy22KF8sBX2I6 1uYaaxNibkg7lZ+l15uIXF10MgakQaJ6P9oXrNeXDz5ZBYYKsVGkZLXwEX/vZTfroIUddQ bDuHHsLM2wbFB1fzSW7VEfcPisoe5F8rYDrX/M0DCo6JTjaG/N0AYqHC4Ys8Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722627767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqYQqOyLvWeaAiSohZDxVBo6zsGpjwB/H0Lg8NvF3jg=; b=bO3jUm0tgM5apSaOCsKZvDKHjFwXfl0prG+PLAkq31ZQ/E0DetPCx9NXSoh/2SueUMmH/O 0n+o/jReTNxfBBgvM4HkKmjl0NqSZlrEtJ4WOPzZtALfOIzpF74kkTYhgKMoLBPqaj2+fe Uwi7Ome6lxdAYG5hCJ3lH433dQq/w3kcVkowVm4iuqYEE9JD2XZ4DFBmjBfeutzGH7cwUy t9S7zaiNhTy9xut88RMUAspfBZI64UDfpCVuHDZh8c/Y58zrzgEgImuwCFvh5Bv8Q5kf9I FiNmwLywDXn3x4r3UrlK3zompEN6BjhgMzbRm4oJ2KHodEeN25lKEe1z3EdmPA== 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 4WbGT30zdBzh3F; Fri, 2 Aug 2024 19:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472JglMB092493; Fri, 2 Aug 2024 19:42:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472JglAJ092490; Fri, 2 Aug 2024 19:42:47 GMT (envelope-from git) Date: Fri, 2 Aug 2024 19:42:47 GMT Message-Id: <202408021942.472JglAJ092490@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: f6ed52c1f010 - main - vm: Stop reducing vm_pageout_page_count at startup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6ed52c1f010aca5083e9c4dd3d0ad15aa8230a2 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=f6ed52c1f010aca5083e9c4dd3d0ad15aa8230a2 commit f6ed52c1f010aca5083e9c4dd3d0ad15aa8230a2 Author: Alan Cox AuthorDate: 2024-08-01 17:14:00 +0000 Commit: Alan Cox CommitDate: 2024-08-02 19:41:36 +0000 vm: Stop reducing vm_pageout_page_count at startup Attempting to reduce vm_pageout_page_count at startup when the machine has less than 8MB of physical memory is pointless, since we haven't run on machines with so little memory in ages. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D46206 --- sys/vm/vm_pageout.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 8ad4bf4d3ab4..742e0afbc690 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -2305,9 +2305,6 @@ vm_pageout_init(void) /* * Initialize some paging parameters. */ - if (vm_cnt.v_page_count < 2000) - vm_pageout_page_count = 8; - freecount = 0; for (i = 0; i < vm_ndomains; i++) { struct vm_domain *vmd; From nobody Fri Aug 2 23:35:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbMdW4p30z5RQlS; Fri, 02 Aug 2024 23:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbMdW4Gqpz4j2N; Fri, 2 Aug 2024 23:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722641727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e5+00tGn2yhUciuy3ER+jgf64fbAKaVH1vHddUolMII=; b=ddRsdgcOoQ3EKR6aJwLQwoZGUnq4mgDdfb1Eqv2LVA8AiZIMKqbq6VshecYB5X+biSRiBF Hwk1YwJyCaPNt40gp+As69OPrRVU6ipOnttydEyPfrWqmVkrRIUWPy9eUiZsWhQymcWSGt kJwdZFJ6ApqHz5nCuye+iuXCFMG73fhQa2hnagXcWnfeylbjaR27MtrQq7m8rQS+KwEl20 kKO3aEVU/yth494OQLeq1Kcs/+1QvDYx7LkOuQoMMpWiD5Up3/OILQzmIc08dLUVZmtNGV acSishCGGJsL/MBO1nfQwBIQ91i1E0HIvGYIJZvVEWic//HRWqHio6QwIWE/BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722641727; a=rsa-sha256; cv=none; b=gcjxAjzK8bB/qBcaeBDFKPn2Oy9Cgj14I4YxdudfWNq+JDBTnO3qHs6Zo+1+KLcqx/a7fi LfLz1G6ECkWs19DEN0dfJHuSK4sMN/ASpoVu0/WeWr/QBgpwGosSsvfDFZBwQ5WVy8asbE gatuYLoJPaK1HiKIgKPXH5HvMr4dPNPiIxhq3kIqugshMkut1cSPASEfRtfeLLoANgHNM+ KS7VZI86OHMqEpWcCnNF8/94itNiF/bQsFf7/9L0e1G46KYBO/KeGksy8Wq0t1cZgLv1wL /zXFKx7OMurS0eddOBzB9gm49fXGdQcEcHuSD+294DLV+tHQPKHjRwnltDch7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722641727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e5+00tGn2yhUciuy3ER+jgf64fbAKaVH1vHddUolMII=; b=MBUDNKXo1bD1nelPa2/LVi2FYjretPKz14J+BuzfweBc0AKM2utcBH8FilseUUC6sRkhJu JGkR+o182XqeUdHSwkhw/dbwrHkEFJofrHgGWcXlPuq2GUXtooeoV7sS4Qc07agVxERShk 37Ittcp5UUq/LvgusdEO3TP5ESdkWTQDbrjNSZHnoTsyIRem5gavvN2elMS+j8dNUiI6di nvR2i4MgCHg1XKBljkO2I5kuwElW27QnjYoNeaxadu5g4N5IhIjwGkqiXiGhpfA45nwW3V ZTNmmcyJ+h3JZf0SM+MKYQBGk6Hs4Eft624zyVQxGw6zUzW1GLeoOe4zHVR4Yg== 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 4WbMdW3pKKznnV; Fri, 2 Aug 2024 23:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472NZRJ4084238; Fri, 2 Aug 2024 23:35:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472NZRBG084235; Fri, 2 Aug 2024 23:35:27 GMT (envelope-from git) Date: Fri, 2 Aug 2024 23:35:27 GMT Message-Id: <202408022335.472NZRBG084235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: f076dd3ef02d - main - imgact_elf: Optimize pagesizes[] loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f076dd3ef02ddf7799eeaab8d405ee9d845e8dc6 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=f076dd3ef02ddf7799eeaab8d405ee9d845e8dc6 commit f076dd3ef02ddf7799eeaab8d405ee9d845e8dc6 Author: Alan Cox AuthorDate: 2024-07-15 06:02:33 +0000 Commit: Alan Cox CommitDate: 2024-08-02 23:26:11 +0000 imgact_elf: Optimize pagesizes[] loop Except for elements whose value is zero, the elements of pagesizes[] are always sorted in increasing order, so once a loop starting from the end of the array has found a non-zero element, it has found the largest valued element and can stop iterating. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46215 --- sys/kern/imgact_elf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index a623a63e9c2e..28ffdd03dd6d 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1158,8 +1158,10 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) maxalign = PAGE_SIZE; maxsalign = PAGE_SIZE * 1024; for (i = MAXPAGESIZES - 1; i > 0; i--) { - if (pagesizes[i] > maxsalign) + if (pagesizes[i] > maxsalign) { maxsalign = pagesizes[i]; + break; + } } mapsz = 0; From nobody Fri Aug 2 23:50:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbMyv6nStz5RRSk; Fri, 02 Aug 2024 23:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbMyv6JvJz4jjZ; Fri, 2 Aug 2024 23:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722642631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z4BJ/TgAtR2su1oH1SRr/O4JATH8vCDJaGzJB/QWgEc=; b=jc2qbJeeIrfpl9FrGFAeC5WXG6pNfKWHTP5FBt2zhtKFqL/5COUNpbyxfBwokq++O+YVhW kDt6JOUMn2MfCsdhV10XlfgYXeFALgBXrKyit55J3GBEX1l00pz6ZpPK6Jdbj2SZFhf8O+ bC519hPsUTM/bJRe6YCbO2ATg7sdtXHflphK6HdHjxaD97EEVvOe4OpFRz0nQjcfBwan8k w3oddKNSCvc8DejT66J1gg2TAoqeUFOEpFVnhLU3U9CsIgWXys7LayCxDyQ/ZXAdDDTn/c 4NnQYJseMREuSd1MxtlXd/gl04Oujd549Us6nMJGkewWTC5NKINUJpBMRONZ0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722642631; a=rsa-sha256; cv=none; b=kMHND6Ryk5rLd/peAQOuRZarxC1YPs4pAaIBf6yMsT2GyKgRCPbvnDYXK+YRdVCfFWQ2RF TLqSNDvkALMhmzNSTiDjabcxCXuoDJDg+24OdRY4vy9ECKm+FLYKm8Y4f174fOREkeJK1r Ognk2Msgk/P4LD3Pq24Rt2wj8MoA6qfvRNI0STE8JHCMd+fwYnB6UY6faBIo7ZT111VAhN JLZH3gndJs6fsTxIZywQrvTkemdGnAJ7VAu60kvgpg62LImjOrJQnaQAbCApoFEzGHyN8m sUJUaAEoIhajnRKuKAM0YOYx7nSriZnZih0dVzjNzqTDUr0MGgR0CvuBTeFXYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722642631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z4BJ/TgAtR2su1oH1SRr/O4JATH8vCDJaGzJB/QWgEc=; b=Mj4sx7TibT6T37oI+Zjx0pxmSMbDM1XUSvRYA2/44ixQG//INEkInOYcmIktMBQ9j1+rk+ +4/IZwJciUzYpCwXjw9pnNNlJOHYo6k2I3+ECOYFXUyUNVCQ/fAE4kXIDFKNH/20j08dOi X+y95ZNSKh2iv/zTRPgZ/W9gPrzgXVERoxwN7FbxSHYzReTXdtO4s0e+qR4D+1Kcd79tto vWW913cRL2Q7mSZfM4hdSQJQml8ChtIB0Y7x0fSfQ+7OFQ7ZhBKasCQv9792NXo32a8wHX 2EtQ0U1yp3yuZgt1ieYlRg89lJZrXRFeQEOML/c5jIQ0eevn88wAhe2fSQhSxQ== 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 4WbMyv5wC3zpgt; Fri, 2 Aug 2024 23:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472NoVhT010113; Fri, 2 Aug 2024 23:50:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472NoVSr010110; Fri, 2 Aug 2024 23:50:31 GMT (envelope-from git) Date: Fri, 2 Aug 2024 23:50:31 GMT Message-Id: <202408022350.472NoVSr010110@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: b45d64fd0c47 - main - loader: Minor comentary tweak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b45d64fd0c473b27ab4d7921aa297ec00f814524 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b45d64fd0c473b27ab4d7921aa297ec00f814524 commit b45d64fd0c473b27ab4d7921aa297ec00f814524 Author: Warner Losh AuthorDate: 2024-08-02 17:20:05 +0000 Commit: Warner Losh CommitDate: 2024-08-02 23:50:47 +0000 loader: Minor comentary tweak Reword slightly to cleanup awkward constructs. Sponsored by: Netflix --- stand/i386/loader/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index efd442977780..8385131a8849 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -130,8 +130,8 @@ FILESMODE_${LOADER}= ${BINMODE} -b # Note: crt0.o needs to be first for pxeboot(8) to work. It assumes that the # startup code is located at the start of the loader and will jump # there. Although btx is more flexible than this, the emulated boot2 environment -# that pxeldr provides has none of that flexibility assumes an entry point of -# 0. In addition, pxeldr and cdboot assume that it is loading an a.out file. +# that pxeldr provides has none of that flexibility and assumes the entry point +# is 0. Finally, both pxeldr and cdboot assume they are loading an a.out file. # # We must add it to the LDFLAGS instead of the OBJS because the former won't try # to clean it. When it is in OBJS, this cleaning can lead to races where From nobody Sat Aug 3 03:14:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbSTw4hxWz5RncC; Sat, 03 Aug 2024 03:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbSTw4BvXz4Gyx; Sat, 3 Aug 2024 03:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722654852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fryQEKAeRQxYSVvn0WwMGtCdBfUnJtU8SpvskTuQ4i0=; b=SkyZqMsIhphuCkR8e4sjZpJU/d10fpfn4CU53RrRbjMnPD5Msh3399leex6Sry66cF9icj X4dPmIU48Um4MfoJ7yYOf6A3PsAE5exCYDmmWCEAlyIzLFClS2OBIIHGZkJ79O+p13n6gx n+gVbOKRhpMfhybtyQtsxAb4IQcz7Q3Z+YBd+mErUiWrQDJn9JTz4jYSkoS5diQLDmjFiU K7V9k189IpC5TwE+VN8ROnCmEEagR/6RpF4tLBOehmWRGtjQya8EWxA1J/U3Q+Pe8cex3g 99L6Dy0M0LkHabvcbMYA4lTZTATKx1t9YwW4nwQHZrFj1q2ChgTUl5196DtxAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722654852; a=rsa-sha256; cv=none; b=oATzFssPfi99dyq9LU2gVYlq98VHVEF21xhO5Na3+wPj4xMCvn5BclO3df2lBYOGkmkfEd kchGF5SsW3kkcbOvn/I6yhmxyZnfc4GSScK00Ykbi9dB40JU/usNooX3trhHc8YXchie0i CmXUlmG8o53699XLOBQIzFtJmAv3u3vFSHwOqiP3JFlUInUj5bWATcEesOo5lUSknuk82g MNdBHcQ4o9J9m0kPtbg9qEWQ6Ub8fw57s4WpklVkykmNj2NHC5OrS5Vfd994/KAn8NxtEq plyAzRvCX/oXuDU/kBjCcqAbwLXVZ+d6VLjSYbFtxXMldLcOe3LONr7PlA01AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722654852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fryQEKAeRQxYSVvn0WwMGtCdBfUnJtU8SpvskTuQ4i0=; b=hCVoJSpU06IFspNLD4TA/4S2OuhK8IVNnFOSohMWuZPytDmMJDq0LFFkxWc+X7xK6U8Pqy tZiUh9Hdzndu8BBovjjMz1TKlnQBWZayqXdTd1gk6LZVQw4RmS+uFuR/zB4lohHfq8Pm5U 8A4TfZKTChD6/uODbRfr4AJzbNkSn4WSAYFNs2f8t6b5KfpavZYMdrBZXefzQs5oHHbEUC TtNtNbFrMSXpcE/pO0QwQn2jLLoZfZ4/kGzbgRpuYa7TlcI0xCo+BHw14nTJl26gN1d9G0 IJrYzXt/+ILjiBgromot6SLooFoSWPaVrU2VUMmkZp5ahbjmJ308lqW1qgSYxg== 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 4WbSTw3jxXzvtM; Sat, 3 Aug 2024 03:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4733ECvQ057301; Sat, 3 Aug 2024 03:14:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4733EC22057298; Sat, 3 Aug 2024 03:14:12 GMT (envelope-from git) Date: Sat, 3 Aug 2024 03:14:12 GMT Message-Id: <202408030314.4733EC22057298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: c1287a3bb1b7 - main - x86/xen: ignore error to fetch memory map in xen_arch_init_physmem() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1287a3bb1b7b7ccc494d6718db52cb443bd0d38 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=c1287a3bb1b7b7ccc494d6718db52cb443bd0d38 commit c1287a3bb1b7b7ccc494d6718db52cb443bd0d38 Author: Roger Pau Monné AuthorDate: 2024-08-03 03:10:38 +0000 Commit: Colin Percival CommitDate: 2024-08-03 03:12:55 +0000 x86/xen: ignore error to fetch memory map in xen_arch_init_physmem() Some implementations of Xen don't expose the XENMEM_memory_map hypercall. Shallow the error from XENMEM_memory_map in xen_arch_init_physmem() and just return 0. This will fallback to using the non-arch specific mechanism for allocating scratch space. Reported by: cperciva Reviewed by: Elliott Mitchell Fixes: 69c47485b5f9 ('x86/xen: use UNUSABLE e820 regions for external mappings') Sponsored by: Cloud Software Group Differential revision: https://reviews.freebsd.org/D46205 --- sys/x86/xen/hvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/xen/hvm.c b/sys/x86/xen/hvm.c index d2ab1c32b0a2..02e41fda1d98 100644 --- a/sys/x86/xen/hvm.c +++ b/sys/x86/xen/hvm.c @@ -563,7 +563,7 @@ xen_arch_init_physmem(device_t dev, struct rman *mem) set_xen_guest_handle(memmap.buffer, smap); error = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap); if (error != 0) - return (error); + return (0); /* * Fill with UNUSABLE regions, as it's always fine to use those for From nobody Sat Aug 3 11:36:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbgdw2VBtz5SHgH; Sat, 03 Aug 2024 11:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbgdw1r8vz3ymH; Sat, 3 Aug 2024 11:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722685012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mw6QIi420GqEapR0sn5MvG7P4nzf7yKT8L4WMmWW/O0=; b=jus6rzPTLduS0YtqA7SPrJhu0MJWCsLQ+zDrjrH1l/ZM7jdlNkneXZI/yqilC/uR/G72Jp EViSLDZ7o82Q0rapCGt+Wvbt4nKwOraR31ACi9YGNVGRPpHBxXZqRvWfWeiFgGvC06OKzH cXh4KTSamHuQZLfdCgHi07GCa78xDpWwgRsMt+MoDxr5yS6nSU8noImrpC2sqoj2rSkTvz WAI/9N/dMOnOYUBLE5Q6pJxL0JoQRzWIEKJyVgxIhJ2x677DG4kfXaVnXS+ehEhD0nfWnR rRO63uYvstIKnfxpORmqHdW/QPWO2WmWcYpIt5bOw7TEFfe5zxk5sxDiA4KHYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722685012; a=rsa-sha256; cv=none; b=o7BjRcuZhC7db7dWu8p3YIW2lgFPzZqAVu1NYWkp6Z2GCtJuMHhQ/oys/Q1a92XGswYACG R3h9Xbr3+tOgAGne0LR1pTDyYjPDLVlkGTouFCUqJ8+0yhH6zAjZlN9mXxRchO+xMfwpr4 3WTDLJvHrZg2+yv4OxxkrrGJh6Uiu8pWSKaWsAErpAdMPXD0wgHg4wRobxJWpXNOwc55Rt oZERHavTDiTfl0kkR7NnRvJrwEfyjtVWMD21PE3cq/+8FMdl1UrgUr+3Bzgp/DBXkH6CMt oXwX+oPJr/UqRjk6wiXEBCjDDstFbtOos675Jk1AL3HYFvwn1xV9+s60CMtIPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722685012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mw6QIi420GqEapR0sn5MvG7P4nzf7yKT8L4WMmWW/O0=; b=F7MzrT/e/Sqx/+lUhON4mgWSeHhIybC57nUj42KH6NYGSVD2/nJ+jozxNFIis/kqwvSlKo 7/cQRUt9G8O6ShaEoWeFULcatGbFRY0OaqLebWX2i/aSjj8wl7rQV3SVQDOIfUJ2e7Mnn6 EJvOe3h87zg6hm9AtvAvmcX808UnNVe6YvNp8jmWamePGKdMSUEOc8jEjWeolXxkhaU2ND TKzB1RaoLs49Jw2XTXvyOwubgbiQ93sHSnW2L1We6GlCqRepAMiAZNUFvOPgr25tW+JTip s/tCSfC41/0oeShloueIlm2iEzdkcOMicV5jm7e+/jbo62DpiIqIDADmkKLyJA== 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 4Wbgdw0v8mz19HW; Sat, 3 Aug 2024 11:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473Bap5X010473; Sat, 3 Aug 2024 11:36:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473BapGb010470; Sat, 3 Aug 2024 11:36:51 GMT (envelope-from git) Date: Sat, 3 Aug 2024 11:36:51 GMT Message-Id: <202408031136.473BapGb010470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 101a0f09e8ba - main - sctp: improve input validation for data chunks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 101a0f09e8baf8293e1eeb591de18caf15e49e00 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=101a0f09e8baf8293e1eeb591de18caf15e49e00 commit 101a0f09e8baf8293e1eeb591de18caf15e49e00 Author: Michael Tuexen AuthorDate: 2024-08-03 11:27:18 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 11:27:18 +0000 sctp: improve input validation for data chunks fsn_included should only be considered, if first_frag_seen is true. Also, fix the resetting of the control structure, if stream queues are flushed. This fixes a bug where a legitimate message sequence was incorrectly classified as illegitimate. Thanks to Victor Boivie for reporting the issue on the userland stack. MFC after: 3 days --- sys/netinet/sctp_indata.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index 4c40e0de4326..693de313b970 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -746,21 +746,6 @@ sctp_build_readq_entry_from_ctl(struct sctp_queued_to_read *nc, struct sctp_queu nc->do_not_ref_stcb = control->do_not_ref_stcb; } -static void -sctp_reset_a_control(struct sctp_queued_to_read *control, - struct sctp_inpcb *inp, uint32_t tsn) -{ - control->fsn_included = tsn; - if (control->on_read_q) { - /* - * We have to purge it from there, hopefully this will work - * :-) - */ - TAILQ_REMOVE(&inp->read_queue, control, next); - control->on_read_q = 0; - } -} - static int sctp_handle_old_unordered_data(struct sctp_tcb *stcb, struct sctp_association *asoc, @@ -1922,7 +1907,8 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, SCTP_SNPRINTF(msg, sizeof(msg), "Duplicate MID=%8.8x detected.", mid); goto err_out; } else { - if ((tsn == control->fsn_included + 1) && + if ((control->first_frag_seen) && + (tsn == control->fsn_included + 1) && (control->end_added == 0)) { SCTP_SNPRINTF(msg, sizeof(msg), "Illegal message sequence, missing end for MID: %8.8x", @@ -5430,12 +5416,25 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); } if (!TAILQ_EMPTY(&control->reasm)) { - /* This has to be old data, unordered */ + KASSERT(!asoc->idata_supported, + ("Reassembly queue not empty for I-DATA")); + KASSERT(!ordered, + ("Reassembly queue not empty for ordered data")); if (control->data) { sctp_m_freem(control->data); control->data = NULL; } - sctp_reset_a_control(control, stcb->sctp_ep, cumtsn); + control->fsn_included = 0xffffffff; + control->first_frag_seen = 0; + control->last_frag_seen = 0; + if (control->on_read_q) { + /* + * We have to purge it from there, hopefully this + * will work :-) + */ + TAILQ_REMOVE(&stcb->sctp_ep->read_queue, control, next); + control->on_read_q = 0; + } chk = TAILQ_FIRST(&control->reasm); if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { TAILQ_REMOVE(&control->reasm, chk, sctp_next); From nobody Sat Aug 3 15:02:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbmCg4GNlz5SZNK; Sat, 03 Aug 2024 15:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbmCg3fKmz4N43; Sat, 3 Aug 2024 15:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722697375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Nw/YejcZjUUOw9K1LMQwWlt0TdZR+3H94psgFHSJGo=; b=ss67D/T9W+VATs36Ba52pg48avrfVQGtemY4C+RUZ8fy3Yj0NlfIOq8knmC9gGGlcHsoT2 9rMy5QPrdvNcLi+VikDQkpF19Wu3ZkKWgYfsxBUOKJGK62m6ad02DHl76S2MVnvEixrdMh tUrRmJboQNvhqztaqsurwvzzM3IdilFDvDUQD15eyoCJyfGgFiS+JsJjlQCf6X84KENIIJ 2uc02fQPSWW8Aqu+qcF9+B1GJdugStLKlB0TVvsDn6VB8n2XS8MrIR6cJ1iAsTIX4DHgoL YpAiK+K5DMiZHzI6ZCUFDquWf2SeSc77Oh/SF+60w9eeRKelyumtteAH3dKtQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722697375; a=rsa-sha256; cv=none; b=m2J/2erm4M1wm2VxSeoKP8YEtOWbKHY/xD+TGK+n0Sc0KiPDS1KpwfqLCB6QdwD1ieaqsT WFqlUiccsGqYWlHqGivrHduD5kpYWSlgmw0pdcVAELVLVtDIv6XBI6VYagADMI4Xz0nahp GdFDoxlLXaDJ9eaAh7XOH2zql7rn2kUFptnIMBWZ3nSlqrRzo1bdzdCjVARJkpytx1EqEL J7IUBYJ8HzOaT6Eu71Fer5VP4b49LaTpqZwpf4djp7gxRM4uvU6cKe2AG7voObTarAWOqW v+uR2t00GACtlL6xTCYpp/Ak3BRHbrcqS7hRUmaVzj8Qg9wq/W4NOUNJ2mYyrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722697375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Nw/YejcZjUUOw9K1LMQwWlt0TdZR+3H94psgFHSJGo=; b=ZmtwDvz3Jt7Q9S9TKcRxWvYpzWx8CmTbpyRMZJ0uw2u1E1xheAE6eE2ApkunFExPlKlzMw 0netScMzgTgT+OZbvnKxnFs/e65CPaKQoLqngWYv85UV6vYcSy0SfGYGIcAB7j9/zHm2GP 2g4VDnQn6c0lc5IFM/tXk9yx/JtRQzrQHhWW+5iFZHyD0U7uB9N7kC8Gy44EoLA5t2VhNz +ZOPiTM6yvz4ozi/40p8DCQ4WDPE71rors437O2iaZ367RRmwpiivFUUFnyXbLsma6Tj9n hK8u2kaDEhd9Hh/RYC6TbHWatWACd7glTsiwf2sHLg295OJ7BpjDVD0akS3ghQ== 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 4WbmCg3Bp8zH1p; Sat, 3 Aug 2024 15:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473F2thS072663; Sat, 3 Aug 2024 15:02:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473F2tdD072660; Sat, 3 Aug 2024 15:02:55 GMT (envelope-from git) Date: Sat, 3 Aug 2024 15:02:55 GMT Message-Id: <202408031502.473F2tdD072660@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: 8da89a177d71 - main - libsys: Add MLINKs for recvmmsg.2 and sendmmsg.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8da89a177d7197e985157cc230fa9e401c6efd01 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8da89a177d7197e985157cc230fa9e401c6efd01 commit 8da89a177d7197e985157cc230fa9e401c6efd01 Author: John Baldwin AuthorDate: 2024-08-03 14:57:57 +0000 Commit: John Baldwin CommitDate: 2024-08-03 14:57:57 +0000 libsys: Add MLINKs for recvmmsg.2 and sendmmsg.2 These were accidentally lost when moving recvmmsg and sendmmsg back from libc to libsys. Reported by: Mark Millard Reviewed by: brooks, imp Fixes: 29d079c96491 libsys: move __libsys_interposer consumers Differential Revision: https://reviews.freebsd.org/D46200 --- lib/libsys/Makefile.sys | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 205f6bc1a5eb..d18f4bc23227 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -487,6 +487,7 @@ MLINKS+=read.2 pread.2 \ read.2 readv.2 MLINKS+=readlink.2 readlinkat.2 MLINKS+=recv.2 recvfrom.2 \ + recv.2 recvmmsg.2 \ recv.2 recvmsg.2 MLINKS+=rename.2 renameat.2 MLINKS+=rtprio.2 rtprio_thread.2 @@ -499,7 +500,8 @@ MLINKS+=select.2 FD_CLR.3 \ select.2 FD_ISSET.3 \ select.2 FD_SET.3 \ select.2 FD_ZERO.3 -MLINKS+=send.2 sendmsg.2 \ +MLINKS+=send.2 sendmmsg.2 \ + send.2 sendmsg.2 \ send.2 sendto.2 MLINKS+=setpgid.2 setpgrp.2 MLINKS+=setresuid.2 getresgid.2 \ From nobody Sat Aug 3 15:02:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbmCj0QCfz5SZ60; Sat, 03 Aug 2024 15:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbmCh5B8Pz4N6b; Sat, 3 Aug 2024 15:02:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722697376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPaq4pk6rRFxGe+WObm0S908i2Y3AZuYeoKkukw5VLI=; b=IIXgl5rtf/TaKxmq7tnqAoZ2Zc/kXJFm7VxuDLnMWTYdebzC/MQH8GxW+JkdANiA9PNzct WNKoEE1+oHU0yT7P5WqjY6mlr0s/I98oQkC05jmtAq7iqrbkPcEqauRGqZ7aEsgvJsD03c I7bkwQoYix7UitiZuyLQSbjnHKn8OkHMiE1pnF5LMjTDQqCq266AWXzFD/0eFGJjWqiEDY Rb65kRxNYWncIPyQ5ijjYIry0OKSuetCymecjMfoKz1tnRDzLsqnggLqbN1WIkQEC0CZ9z y7YFSkHEfwGM7gKeM9qTtPEzGNUH0Q7G6gD4zmOYZ0Q55EeHQ7pI43z/U1w8zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722697376; a=rsa-sha256; cv=none; b=PLoIp8auOMvtUr0MP1nWJNylcO3xkd5PzeJkwCePahTp0yPPXKdS+1lPtZH6Eizn8MIQB8 vTDtIXx4xFZNh0ieR0t5YHUFSZ85Fw+sDUrPPcIcL3x2rwTvGtzCN+6cADsDy8y+sNpy6V x3C/k6EmiINKxfY5oxezy72MoIU2xGPf7FujEoiyWAmEI6S7bVVqqFpbYF98b+z8BIttjv WFRXSgS5aSr3gRjG+iJWQwNfbB/5HRWJ+SVH+8TFM8BE76ExsUUD6gYSN7O4BN2YNP6Tem k4ERZ9Mpv2x4womXwqM1OHUJsziT41uwFxXjZE55xvpLDquz2O8iHSsuJTMCUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722697376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPaq4pk6rRFxGe+WObm0S908i2Y3AZuYeoKkukw5VLI=; b=hOr21WMKYbQ6wxysEL31/sz06Afsa15q+n/ZiuBccJL95M5wlJstKZ54/zNu0oTqmSOpXB LLdHYTxv2yC+iL36nNzdstQqk9CbjcliTEFRzwYRGOMP1Pg4KTSZ6KPOdgMGp6rllqdS8U ati1q63qD1WM7ZLr43DBwaMkXVo88BRPCDBqajcinP+zoMSYx9mMWsf6C3ih9kxUpKHUEo OVP90hsVVOVfyWqT1pssZwntleY1qgYAJd4xs90+tUaPJ40iI7DUfAhj/1gPKnomgisSl0 Ag+w/6OISCeGTtIUIbXmb9N1nl/E6VXS8y8GZhmdAOCvPXGaz3jofaeUMqIL6Q== 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 4WbmCh4TFDzH9h; Sat, 3 Aug 2024 15:02:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473F2uI6072706; Sat, 3 Aug 2024 15:02:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473F2uVN072703; Sat, 3 Aug 2024 15:02:56 GMT (envelope-from git) Date: Sat, 3 Aug 2024 15:02:56 GMT Message-Id: <202408031502.473F2uVN072703@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: 102b4e33acef - main - imgact_elf: Rewrap function declaration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 102b4e33acef74da5b1e5aee43a324fd395342c8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=102b4e33acef74da5b1e5aee43a324fd395342c8 commit 102b4e33acef74da5b1e5aee43a324fd395342c8 Author: John Baldwin AuthorDate: 2024-08-03 15:01:10 +0000 Commit: John Baldwin CommitDate: 2024-08-03 15:01:10 +0000 imgact_elf: Rewrap function declaration This was a style regression I missed when merging an earlier commit. Fixes: 169641f7dd9f imgact_elf: Add const to a few struct image_params pointers Sponsored by: AFRL, DARPA --- sys/kern/imgact_elf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 28ffdd03dd6d..494456ceeeae 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -617,9 +617,9 @@ __elfN(map_insert)(const struct image_params *imgp, vm_map_t map, return (KERN_SUCCESS); } -static int __elfN(load_section)(const struct image_params *imgp, - vm_ooffset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, - vm_prot_t prot) +static int +__elfN(load_section)(const struct image_params *imgp, vm_ooffset_t offset, + caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot) { struct sf_buf *sf; size_t map_len; From nobody Sat Aug 3 15:49:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbnFJ1KPHz5Sd6g; Sat, 03 Aug 2024 15:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbnFH5n7Gz4SXc; Sat, 3 Aug 2024 15:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722700163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ATNzWVxNmWjehhzgpQkTA804uggJtz1B0nM1u5X6Ig=; b=ac28DeuFSr7ky7dJsNdVBcz0N8A/2jz6eBOu+zUi/wwXt1a/8iVFMV+ND7la/RLopbkwRZ IA11AQnxPQtTzXY1ykTlLPnHqjdBdFzykxWvmrbm3W83M/9ATkX3n/pYBhtAyT9VINUK/i 8sqjoebtklLgNRHHGW/VQMlKfobyEpHKcCylC4HgjXWMHMk6EHAsfzd/lTFdAm27l4hMGA irJC9kIQ1zyD9WWgZ7FvWQqUB51td9HlWyuTeO4b8yZpKSLke1oxlaGMmEnFdGT5bnAigf sJVohK9qla661rASYv2hI+dfVs5EEmNzywcQSv20KrI5/lqpYfldRM/2dec1ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722700163; a=rsa-sha256; cv=none; b=PqXdEXMjKlIiU8JLfrRO0qDnhfdl45e4ho+OZ0xshSxD53g69rlqre8JBlD2ltTCjKoXfq 9kVnmV3rpoRQ+wxctHJKGadYRV8Dd9IeP2h8+i3vX0y5YY6x+ZRin7raznwMLXi9z+7oqA 023iyvBaKMrvFpswFmVfVdCQs1MHjpMh/HPFjIGSs6G593T4TgQ7Vkz329Af9tPXcFPlQk zK4PzAtIN5tbuMyQ/EgggCTEHd7rn5FriusMITwuCCtg+Xtq8nm7xaqCluLKvWim831IPZ ZYm91E1hd1mwagZMPLsvyg9ga8nQikThML7PFGMYAnI2fpBuKX+yUk/i76AwAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722700163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ATNzWVxNmWjehhzgpQkTA804uggJtz1B0nM1u5X6Ig=; b=YIRVu/+U6gHJzJwW6eVdJKJ81+YD7mm4ylIPuxyx40MEwzqZwTpVRPU78oC0r5Km9sQ5DK w+2xPdc3KegAn/wciQVTrcpTX34GmKOILtyOg20zTuIjim6PfjkK4XTeqKNCOImmzfObMY kB5Xs6pnaBpcspuM2aR0wlFu0GwpI6jNDIxt0cg3FI9S6uDeaWk+gUp15whGrpUCsvUtn6 F0ix+ZnxFaBLmzMqI771UqeFJ0evu1iUkaY2gzZRj0Nx6bUwhgoowBZv9cuiswTNitECjR j6DfQ9341exG+FT/1uaBVyMbpko/jyJzJLpauXCSJ63HL1QV/STmO2dDVfhb2g== 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 4WbnFH52QkzHDC; Sat, 3 Aug 2024 15:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473FnN2k041338; Sat, 3 Aug 2024 15:49:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473FnNQ0041335; Sat, 3 Aug 2024 15:49:23 GMT (envelope-from git) Date: Sat, 3 Aug 2024 15:49:23 GMT Message-Id: <202408031549.473FnNQ0041335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 2b4aa2816cd2 - main - bsd-family-tree: add FreeBSD 14.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b4aa2816cd2988d0e20cee9035d8ab9712d6708 Auto-Submitted: auto-generated The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=2b4aa2816cd2988d0e20cee9035d8ab9712d6708 commit 2b4aa2816cd2988d0e20cee9035d8ab9712d6708 Author: Sergey A. Osokin AuthorDate: 2024-08-03 15:48:55 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-03 15:48:55 +0000 bsd-family-tree: add FreeBSD 14.1 MFC after: 3 days --- share/misc/bsd-family-tree | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 0b9cfce6f826..955bb0f30e43 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -453,13 +453,15 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 7.4 | *--FreeBSD | | | | | | 14.0 | | | | | - | | | | | | - | FreeBSD | | | | - | 13.3 | | | | - | | *--NetBSD | | - | | | 10.0 | | - | | | | | - | | | OpenBSD 7.5 | + | | | | | | | + | | FreeBSD | | | | + | | 13.3 | | | | + | | | *--NetBSD | | + | | | | 10.0 | | + | | | | | | + | | | | OpenBSD 7.5 | + | FreeBSD | | | | + | 14.1 | | | | | | | | | FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -892,6 +894,7 @@ FreeBSD 14.0 2023-11-20 [FBD] FreeBSD 13.3 2024-03-05 [FBD] NetBSD 10.0 2024-03-28 [NBD] OpenBSD 7.5 2024-04-05 [OBD] +FreeBSD 14.1 2024-06-04 [FBD] Bibliography ------------------------ From nobody Sat Aug 3 17:57:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbr4z19sMz5Sp7Y; Sat, 03 Aug 2024 17:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbr4z0fynz4hf8; Sat, 3 Aug 2024 17:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722707843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x04d5fj1f5BfXqHhEldBiz3qbsHv9kOM5xWPRYx6F9g=; b=uilYOg4Bi2mLHyJbVyd/uzOr1WgcKLjoJ6/hvc304kdsl1dCP+WGhfjfwIG6a1kW+RhORs I3b2Umyu/hYWqoPigvU5+tsSLyjF4thaCBcR8fi5BRWuj4qZulKHxHFQIWDYAyqK9IQUDF BSLRidNjwqLYoLtOOpvMizS4PI/CRi1ylcSDXJZ5Kp6KXZzMAgcUvF3G9we5SC+4wwkdu/ OwwPoyvTvwweW6x2eGquB9ZZr4ByIvSd7DPLuyRBKC05NlcTMwsl3L1WFHKRA65zdYt7pH 1r2HUw8dl+mFlvoRdT7IMNpyqy1dq/xmSdKn02N/VTZoo5fUbu9gfgim70TUuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722707843; a=rsa-sha256; cv=none; b=f3V45xwNabz9f9rT7QuK2SIMGPuD1zpSi8It9hTicmvEAKaCoBKOVcsWCLyWkWANiBAu/9 9kFCSk8IO74+oyP7U2vPSPObY0uN4a0JxuU/09oD4KrCHlSfV4kH3/6OhHm1hnHmyfuQyo nWyuI6u1KPjjcZ/MO4G/ZirgeiNQ+4D6V9UV23nZ3nybv6LnuBgbUo2uJb0dUNaGSmEOL7 yE4KEfFnTM9YQTowxwlkOpOTZGq7AE85Sf9opRAr7/Kp9PP4t1SF8ex0Ipx/LKnC3qJ4OF x7dMX4KI7HPrQQzopUCWN7RiJ+8qTn/+gVp8Vnn0vgnkexfFimtilEdYwCoMpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722707843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x04d5fj1f5BfXqHhEldBiz3qbsHv9kOM5xWPRYx6F9g=; b=hel3iCSkgXR2UYCRpzwA3h2VaCbI21E25kBHUDFk0pPYKJAQKTSKTXQB9kTOombHYzDHcg bVC1gZ/YMdz4PG1o26s/uoJUAomFvKNhImYLJSyJp33KZUFXAQ4odceT5DpYEUA84bh8Hu r3D9D/49vsU5mXnI+zeVthI4kTfn2Fp5rJ0fjEGS19X+geiaNqAQuMimmx39teMaSenphA yPqHkKdaScB8Ib0SH23/lEE+dwd/t/i1+3dTz7L26ohch/4Q9zfwF2VzLXY4ZsDRFkuDI0 CKggHzNeUrDmcZbGj7x/Xs3+9qV3qKlj9pmc1zMPxAyE02Oxs8yNz1bqB3eDbg== 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 4Wbr4z017fzLmG; Sat, 3 Aug 2024 17:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473HvMT5064201; Sat, 3 Aug 2024 17:57:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473HvM9S064198; Sat, 3 Aug 2024 17:57:22 GMT (envelope-from git) Date: Sat, 3 Aug 2024 17:57:22 GMT Message-Id: <202408031757.473HvM9S064198@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: 6502c60c2281 - main - Move fetch of DEBUG_SH from kenv to rc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6502c60c22819b879542c423cb7393d448d00e59 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6502c60c22819b879542c423cb7393d448d00e59 commit 6502c60c22819b879542c423cb7393d448d00e59 Author: Simon J. Gerraty AuthorDate: 2024-08-03 17:56:48 +0000 Commit: Simon J. Gerraty CommitDate: 2024-08-03 17:56:48 +0000 Move fetch of DEBUG_SH from kenv to rc We only need to check kenv for DEBUG_SH once. We also need to export DEBUG_SH to be useful. Sponsored by: Juniper Networks, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D46219 --- libexec/rc/rc | 5 +++++ libexec/rc/rc.subr | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc b/libexec/rc/rc index b23b0f35f263..5ed47d6eac20 100644 --- a/libexec/rc/rc +++ b/libexec/rc/rc @@ -72,6 +72,11 @@ set -o verify set +o verify load_rc_config $rc_config_xtra +if have DebugOn; then + # allow DEBUG_SH to be set from loader prompt + export DEBUG_SH=${DEBUG_SH:-$(kenv -q DEBUG_SH)} +fi + # If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d # scripts to perform "boot-time configuration" including enabling and # disabling rc.d scripts which appear later in the boot order. diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index f1f6cf6c8c2a..145b626aa01e 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -2767,10 +2767,7 @@ $_DEBUG_SH vdot /libexec/debug.sh # Ensure we can still operate if debug.sh and # safe_eval.sh are not found. -if have DebugOn; then - # allow DEBUG_SH to be set from loader prompt - DEBUG_SH=${DEBUG_SH:-$(kenv -q DEBUG_SH)} -else +if ! have DebugOn; then DebugOn() { return 0; } DebugOff() { return 0; } fi From nobody Sat Aug 3 18:01:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbrB73814z5SpPC; Sat, 03 Aug 2024 18:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbrB72dvmz4jqL; Sat, 3 Aug 2024 18:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722708111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjS7GLlsdzf5Ff4roGjpO1E1NQd27PYgCG9qnLTgPA0=; b=A7UsQp5KGKTaHWFtur3IVzRZPO1lw3IcfPV3pdBy+BdGAzA4/deubOy/vS9AmqsdIQRq40 TpANKse2rGF6B0gEIHQkXOSTNJu9TgFfBGpSRxTp+SoTqpDwkbSd4bbK/9rwIbp/SIkorV 9Y63lRH9jsLLAPvpqJHB0N5jbQh/mXOgxnAEtKLXdNjeEQXeOO2D3jMwV7MHNVJu72KlbZ GjtLCXTirqWEY4o9h6DR0KyoCyK8NyFylqZ/Mk2BCP2nCzgP3XzEP69oJ4JvMxRl7AqNVw FdcWYSg5D1kmEjy3xUaE7PwbOWlbST4Rns8LllScf/hQewTTUKLL9oSzIZFYvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722708111; a=rsa-sha256; cv=none; b=kMGGW16MWbMAt+AStVhr3eKocUDbrFY/3R+8e5oZqgf5opr8fQ3EXTZQkNEgs8+KwmGMXE nPLkDzh8r0WElnO/EZ+i3UOwpMFuVkM893zB6VBQiwdOPTtKkcGgKU5Dwq7dl0Tbe2RzGz Hgp3K15gatf2xNRo+JUGYjaslIkBwjm0XNAhXmxubF2pl5gTRIjo5j5go2TD5ST9kVAg91 nhauFNJEBZuH5Zt89CH4iljL2DeLVkSqBTy6FQnstZykaORuKxVLmnOKhNv50ldqztv6+J OKPgLSeXtTtfNY3wCTHtTKvp6uk/FvVl1jyac2LOiPhhQy5FmFPHhQYIqsG0AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722708111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjS7GLlsdzf5Ff4roGjpO1E1NQd27PYgCG9qnLTgPA0=; b=y1w95dcfZnMEKhXiRIiUYF07GYHAy63MH/FEPyZU9iYyqA1+tIoouzAA2C8cfdwf7QGkn+ +EAUt1iM5W41QmQWLAxwEABXOzCyff+m2Lnw+jWB1Hu/C5nqibDkaA4VCwDG7GGL3C1VM2 yuaHtURfVDyvVcMlZfuhFQz9qfhRST1q8svFCnHW2U13ybTZpYXvvahgyJn5Cl1xAGo5NA xYDGrWBdzJPUujGWsPM56E9MhuyZhzNOdhdmdZipDdLPaUhtQU5Aou/0bOmGgKTHfott3f I/XRvD843xG9DzCBN9ca3rq9Bx7cf0bCkB+af6MingjSuLUu1f4oSQ5DX7JWog== 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 4WbrB72Bk1zMRb; Sat, 3 Aug 2024 18:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473I1pDJ076858; Sat, 3 Aug 2024 18:01:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473I1pH2076855; Sat, 3 Aug 2024 18:01:51 GMT (envelope-from git) Date: Sat, 3 Aug 2024 18:01:51 GMT Message-Id: <202408031801.473I1pH2076855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 5c44e69d2f3d - main - tcpsso: add example to man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c44e69d2f3d2404f39c552448173a9bd62bd651 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5c44e69d2f3d2404f39c552448173a9bd62bd651 commit 5c44e69d2f3d2404f39c552448173a9bd62bd651 Author: Michael Tuexen AuthorDate: 2024-08-03 17:59:06 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 18:01:45 +0000 tcpsso: add example to man page Describe how to switch the TCP stack on all endpoints in the LISTEN state. Reviewed by: concussious.bugzilla_runbox.com MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46218 --- usr.sbin/tcpsso/tcpsso.8 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.sbin/tcpsso/tcpsso.8 b/usr.sbin/tcpsso/tcpsso.8 index 37968c8afa54..9bff621fc516 100644 --- a/usr.sbin/tcpsso/tcpsso.8 +++ b/usr.sbin/tcpsso/tcpsso.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 14, 2024 +.Dd August 3, 2024 .Dt TCPSSO 8 .Os .Sh NAME @@ -229,11 +229,17 @@ Then, use the following command to enable Black Box Logging on it: # tcpsso -i 435 TCP_LOG 4 .Ed .Pp -To switch all TCP endpoints from using the freebsd stack to the rack stack use: +To switch all TCP endpoints from using the freebsd stack to the RACK stack use: .Bd -literal -offset indent # tcpsso -S freebsd TCP_FUNCTION_BLK rack .Ed .Pp +All TCP endpoints in the LISTEN state can be switched to the RACK stack by +using: +.Bd -literal -offset indent +# tcpsso -s LISTEN TCP_FUNCTION_BLK rack +.Ed +.Pp The following command will set the congestion control module of all TCP endpoints currently using cubic as its congestion control algorithm to the congestion control algorithm newreno: From nobody Sat Aug 3 18:31:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbrrM6HwPz5Sr5P; Sat, 03 Aug 2024 18:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbrrM5n9qz4lyy; Sat, 3 Aug 2024 18:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722709891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZfk3p0HoS67SPz6qagUPNJ+llaLW3XEZdUVNrgz0qA=; b=kvW/6E1tky2sBcSYAqrQSkb6ctlLsUpyTaF/CexdmxAAEe0ThvJEeYYAgHOXLj89COR//d EzExjvHxXyoFohZ81M32tfPhpUq5TzBqadA7tqxEm6hJhQvAkUQt9FiaOU/QWzgJJdKYgx r7tQt575Xx5M1y0GfT2VGSKYPxSUBhjGNI7qCidPmkUEqIzPY2PnJA3iCGkHoTekTeuy25 XR03ytr9ObIL+ifc9Jr0ajoW3lAa/seShdgeZUmvG+PkQ5beqd318lH4g2ERJ1lpGJMSTw RKmwNt5yhSZMJ2Tq3Ej9qQoStJ6YDuMMo9YA/+lEqU0Vkle4CFlRkbvltK4c2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722709891; a=rsa-sha256; cv=none; b=nAt+4XwEnPyj0WMNd0o+HBd4iFGIatMgoXNDwi2zYBDNB3GyhVY/+fm02oLHZ9AFot4afs ezvijrfmQ5iDjQ413WH/w2dnU8J3LmQy4ePkOdm2KLN63kpVrqZqJsV+FOMpbhCSZ5YEnq jkT4XmLPWXYuTlPa4oEUn24Y3Ps7kOIkqlbRP9zLgftVrD4L66kSEdCeMiPBTG+CA5vZX/ HnL9QQm1o3/n1Pk0UqgpQwb30XxLWUgqah3uD7S+QEvJIL1s9jDZ6/tUsCHEf0tZ+RDHBR DzcITEikQl1yWa4Qh4bEaHkn0vXqVuPADJ+sxpqVMTRV9iqer9Poc4Uf/y9beA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722709891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZfk3p0HoS67SPz6qagUPNJ+llaLW3XEZdUVNrgz0qA=; b=FJ/jmsZ7okBcYCYH0TZJqq1qimaSkfsb+CpMY3C2GJfNlzEnSVN7fNz2F0e/x9/URiIAhx BVsnkfOzsoaBKv6lOl2vd88myid/xincMb3xXr9x1fZOK+nzHUKvobkAn9Zc723Kv/IbCg AWNPcthqT3cawNZDCGd2Tj+xLXiDThtEaeAJE1KRASbIACjWQdo3R9nZhXtxVPmkHYdlch zVcUeSfu+eAkJl2lLyerqQ7K1CwtWfV98v2emkVP9gP40pKKDyCa3HsUKeEq297LTgVdIb bACQKOOZA5Xg9o+W2BTFtR4H+li5praMbkHQT2obHqQG9XeXfIFJHDAbe7kqOA== 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 4WbrrM5LHbzN9K; Sat, 3 Aug 2024 18:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473IVVJL027503; Sat, 3 Aug 2024 18:31:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473IVVCJ027500; Sat, 3 Aug 2024 18:31:31 GMT (envelope-from git) Date: Sat, 3 Aug 2024 18:31:31 GMT Message-Id: <202408031831.473IVVCJ027500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 2edac5a60a57 - main - tcpsso: improve man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2edac5a60a57a2a6ef80c61079d427c4ee31b7a9 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2edac5a60a57a2a6ef80c61079d427c4ee31b7a9 commit 2edac5a60a57a2a6ef80c61079d427c4ee31b7a9 Author: Michael Tuexen AuthorDate: 2024-08-03 18:30:10 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 18:30:10 +0000 tcpsso: improve man page Address comment provided by bcr. MFC after: 1 week Sponsored by: Netflix, Inc. --- usr.sbin/tcpsso/tcpsso.8 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/tcpsso/tcpsso.8 b/usr.sbin/tcpsso/tcpsso.8 index 9bff621fc516..5bbcd0eb873f 100644 --- a/usr.sbin/tcpsso/tcpsso.8 +++ b/usr.sbin/tcpsso/tcpsso.8 @@ -234,8 +234,7 @@ To switch all TCP endpoints from using the freebsd stack to the RACK stack use: # tcpsso -S freebsd TCP_FUNCTION_BLK rack .Ed .Pp -All TCP endpoints in the LISTEN state can be switched to the RACK stack by -using: +Switch all TCP endpoints in the LISTEN state to the RACK stack by using: .Bd -literal -offset indent # tcpsso -s LISTEN TCP_FUNCTION_BLK rack .Ed From nobody Sat Aug 3 19:46:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbtW65Ffqz5SxSx; Sat, 03 Aug 2024 19:46: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbtW64Yyhz4vLb; Sat, 3 Aug 2024 19:46:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722714402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ic03gebvf2hdEtIX9t2mWVAeCUbnNiH3u7+w5exH548=; b=TfPIgWwLNwmL9L9dLJfIPGQI0K9VpaiiGuyq/0WGzRyH5cLBjwKkPEIp75CsSu+ClB0Ouy H5Yv2ro1M3IxSkZdFNgwPpCF7wrDvUes2LQLvpJ031M1oVb8mLAzjIiKH3u3Jsy39xHJRz TYRCX5sskBMbdpJHlh5z4wfLeWEOsFRBm3tucrziVa5mtdSy3CWPmUDApZs80543bB3Cuj Yjp82sU+apJIA7nNJaHBB9tOUTQreWydkl+HA/noDfGq8eBMSN/A3CQAlDOQAWt2JBOy3s Ilx7F1PaDS39ba14Vyy05/2EZiuvVQkggxUJFRo6LB2kAASxVzEE5+EG5CovcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722714402; a=rsa-sha256; cv=none; b=IJcjNZKpFstXI2nAuPtxBLLNO/yM9TR3spqN4xr1in9gNoMJe6p+/3o/OMQhr9zoVxj5y7 AvDSyg3l/aV9xSH+Y28v2hgRQWSllkp+hEYX2nXf37/cS3Z5+rK9V92Li/xs1l3rmiyEny P4BZIyT1hT7C0lBai5OgUg+IXd8bJzFywP51c0qq+XgnRZq5ZsJNb6oM4lU3JUuwR3cpYo Sm3KGYCJVFgoNCfwBebyOPLtnuaUYs1fETiJ87l1obV4uXYHwUTKNd/fjZIO50Y2ku5RDm 6Fri8honHr5J+FXDcI4RSfxxkvFF9thHKlPz/yLFjYVIdp6YYla67rheyYMhUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722714402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ic03gebvf2hdEtIX9t2mWVAeCUbnNiH3u7+w5exH548=; b=s7BBX+UhKNtvHr1tO75cJ+ngoJCAlVhdTknJ/Pz1Mdrzg9N9AuPWP2cwSjK3lReUuStB7+ pyHWuYVfufJV3082p2kv9JwwhpScSJfDUpH9g9587CL7wbciGsR+jKZUa4W6DeCrFe4pp4 2/bNzuNxArNwWN8pjHFGvl0MdQkmGSLcDBwn+OaVKzLycEP/ToenGHcGQzziFlw7NR+SVn yHdC5MEWcDnuwf0E2zt3RU9FhY4tCK63tW03cm9Gr9ZXpcs3vaw587PcMLRJAnrVhYrn7+ x6atGhyYbf+6z4526nQ9lp0nIXf34b1ohNDoTGfKQXsaYqxsvF3WsZMHNdEQ6w== 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 4WbtW63wnlzQ0q; Sat, 3 Aug 2024 19:46:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473JkgRE053918; Sat, 3 Aug 2024 19:46:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473JkgUN053915; Sat, 3 Aug 2024 19:46:42 GMT (envelope-from git) Date: Sat, 3 Aug 2024 19:46:42 GMT Message-Id: <202408031946.473JkgUN053915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 503b7f94d831 - main - tree.3: the example code fixed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 503b7f94d831642308585c980a7cabe4470960d0 Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=503b7f94d831642308585c980a7cabe4470960d0 commit 503b7f94d831642308585c980a7cabe4470960d0 Author: Maxim Konovalov AuthorDate: 2024-08-03 19:45:47 +0000 Commit: Maxim Konovalov CommitDate: 2024-08-03 19:45:47 +0000 tree.3: the example code fixed PR: 280566 Reviewed by: dougm --- share/man/man3/tree.3 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 index e6d855c5ade0..83d005a5e481 100644 --- a/share/man/man3/tree.3 +++ b/share/man/man3/tree.3 @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 27, 2020 +.Dd August 2, 2024 .Dt TREE 3 .Os .Sh NAME @@ -675,6 +675,8 @@ To maintain the sum of the values in the tree, each element maintains the sum of its value and the sums from its left and right subtrees. Lastly, the internal structure of the tree is printed. .Bd -literal -offset 3n +#define RB_AUGMENT(entry) sumaug(entry) + #include #include #include @@ -691,7 +693,7 @@ intcmp(struct node *e1, struct node *e2) return (e1->i < e2->i ? -1 : e1->i > e2->i); } -int +void sumaug(struct node *e) { e->sum = e->i; @@ -700,7 +702,6 @@ sumaug(struct node *e) if (RB_RIGHT(e, entry) != NULL) e->sum += RB_RIGHT(e, entry)->sum; } -#define RB_AUGMENT(entry) sumaug(entry) RB_HEAD(inttree, node) head = RB_INITIALIZER(&head); RB_GENERATE(inttree, node, entry, intcmp) @@ -749,8 +750,7 @@ main(void) printf("%d\en", n->i); } print_tree(RB_ROOT(&head)); - printf("Sum of values = %d\n", RB_ROOT(&head)->sum); - printf("\en"); + printf("\enSum of values = %d\en", RB_ROOT(&head)->sum); return (0); } .Ed From nobody Sat Aug 3 19:55:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbthp1tc8z5Sxt5; Sat, 03 Aug 2024 19:55:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbthp1BCpz3wnd; Sat, 3 Aug 2024 19:55:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722714906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yFUoZbctlPWRVpF8bAE2epGeRdFhReRWrix5mVBqScw=; b=LF64Y0kQaL8Pjiph0OFPakT3uFrNuuUJflLYY1kZ5ozhD8ZxVcO2JhVxYqRkzcpi/yj4n8 F3bacLR6X3i5Bdv8kxjHg+XJhUaolE1gbO8V5wkcmuF4wz5YO+IDqrCZ+jjY82fnrTCfoE Txn/lzda+vMdJYWg5MtxgCLGSojQdlZgibo3zs7no6WrIRhydsHW2lqBBWs9L2raGb/W7c MM0sM6MB4HeObl+nnKiLYlt3rOuNhvepWrr+54LtC1+KVQKGlS1VfgqXnrWexmq0HkWMw/ d9r50dLN/5+Eeim89rIR7JAsJsHnH/3rCyIGHCtGXGNfgWBUyA5ke3u5k5UhvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722714906; a=rsa-sha256; cv=none; b=lLY9HQQmUMR1MOpe0i8E762y/FLFaZUYMak4otUvCFW/fzeqgvxYBVx9V95mt/aMyJ6HlC IWF91GZZPuFDMlBP4l3hw57OsdKuyKF7WZ2zlLF1FY3FxIwRZTF8+Np+DQRgWJdC1vRzRD +VcnEBnbFrUUEXJ866mi2QeA7SfpmsjjOaGOmx///kY4PSSxkHz5zeXlVpqyqlQoNFSYd5 jzVjAfBykMI1mHvG9iEJ0yOCBHg6+TWf/BZ5w4PY0x8iFK+4N6fVG2sIQYZ8eNhWIfVES5 yiPBLRpfqcW+flZbIGYKVvkuGZ72HkrOPZLqrx1eBtNETq2/O5Au+4iBYIa7vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722714906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yFUoZbctlPWRVpF8bAE2epGeRdFhReRWrix5mVBqScw=; b=baSWqGOZEecKq7rjfWbaTqBLJ5vuQjUG6VPaaJCtqDWZey6B6YiG2zxKhncDvrnoqNXdcK hY27zSo0hoiXQLklg/N4spwUBH8ir5NgIKbnlvyVc1mNO68PYjeYXeT8lcRjsGRc6d1SIE 95Z55fAmg7zIBgg4STuich5+Qr0QwQ95jcOtyPj7ALd8j87lD8tWaX1fb/I+P9U0SbokCo 6a6BUdlHR8McqMmddrHyBEglBbAqOBrSPzEJcXYfm7UZOFRGnT9FLOo2FspoB4Oc07nu5/ NRoZiKDXJFiQmyWefilJzuwjJVmac6LT5DjOiSw5ID6rIIQRB6gW3ZRBYiHZOA== 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 4Wbthp0TQQzQ1V; Sat, 3 Aug 2024 19:55:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473Jt6Xe071291; Sat, 3 Aug 2024 19:55:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473Jt69J071288; Sat, 3 Aug 2024 19:55:06 GMT (envelope-from git) Date: Sat, 3 Aug 2024 19:55:06 GMT Message-Id: <202408031955.473Jt69J071288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 52eacec95d54 - main - tcp: fix t_flags2 collision List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52eacec95d54205962a3d6902e18e41fce8b4e79 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=52eacec95d54205962a3d6902e18e41fce8b4e79 commit 52eacec95d54205962a3d6902e18e41fce8b4e79 Author: Michael Tuexen AuthorDate: 2024-08-03 19:49:18 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 19:49:18 +0000 tcp: fix t_flags2 collision Fix the collision of TF2_IPSEC_TSO and TF2_NO_ISS_CHECK Fixes: 646c28ea80cb ("tcp: improve SEG.ACK validation") MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_var.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index cc982e321709..8ff015b90f89 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -854,7 +854,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) #define TF2_CANNOT_DO_ECN 0x00080000 /* The stack does not do ECN */ #define TF2_PROC_SACK_PROHIBIT 0x00100000 /* Due to small MSS size do not process sack's */ #define TF2_IPSEC_TSO 0x00200000 /* IPSEC + TSO supported */ -#define TF2_NO_ISS_CHECK 0x00200000 /* Don't check SEG.ACK against ISS */ +#define TF2_NO_ISS_CHECK 0x00400000 /* Don't check SEG.ACK against ISS */ /* * Structure to hold TCP options that are only used during segment From nobody Sat Aug 3 20:56:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbw375Btvz5T3XF; Sat, 03 Aug 2024 20:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbw37342mz442H; Sat, 3 Aug 2024 20:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722718563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sKzcJj3oAUynQtJgZMRRWtzjZuFIoMrC28eEo7bWxoU=; b=vU48vRmLjj4HMCQ29gJ8eyBjfZ0uwx8C0DIEq4no5JGibnY6MSnhD9nWMstKY/KkkekUOR 82Xjitgali9Nt1t53a2mvhs/2+ZoZVvdwSd62OYZm7+auGU9+q0gn06bYqQ1PeHSHaM0ce 8ZLiqWKhK14gJ9s4fNZQliod+5exXKfunvnEp1Q3QLvU7Db9IJlhe3D5dm1OIHHsvAbNbl ruo7CQQ9FVPAU56Ahwbbmk4Ic+Kzl+gjTLejtF5VtmMTkhoZLTwQGXWnoZWmU490Li2TuI 6ZJjN2QdMd7DTBo8kWXP3CERpbXlVP2ui5FxWZPlCYH3bVZEqBcUysJk0gZ62A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722718563; a=rsa-sha256; cv=none; b=CKTf0TWW6Nl5PFeSrLDHnqWMC2B7ugni+7HZ2VRf0JidXYbDxSN+MVlmDKP7Y26+Qnm6Wi YvO7Rm/jaAeQj9GoFfgXagTuTDH+/vvqI4tI25sAQaus8YORYRDyr7WjyNCFeEKBq0ExWH q95fBGQW/aIS2xJeO7hsMEgRY+5vq+kCEXUMhCOi7Hjsr5w70r3wivozWKp1VQ9zXgS7SK kNYkHRd9OdplwwdQSxUqs3mSGu9lR6EFScpp1Khtp9T7YHEMkCZvyIrRvjoDDVBIj2NOPu vl3Pc/u29N59v9MJpUYSvEpMTIU/XcR30FgCeqPozQ9GtQ2eKO6Ms14qRUgyiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722718563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sKzcJj3oAUynQtJgZMRRWtzjZuFIoMrC28eEo7bWxoU=; b=WhCR0/fBdyT708eJZ+Otm3XdTirvYVoqNQGO5hUACy4s5+bRozWM7/y/iB0VAvbINgxYwR ga751KlkRsjJzdAWb5UTF4Beq31g+3tMRKxHTeYNwJaEdHB1jTWwq06CiGmtvy/EcOI/Jr JfxpPpiZ3z4VTmSFm1ue587fbosYMxmAbLVo2Sjl9DtopozexiEQmktWLQQEgx94hNMDTR +DkKQSs6oDXFPLE0DQtk3DCAzuqMnpvsJPXqjn00H+e+tpuIocMh1ZH+yCbS2SB3xWvtom BR5KBFT2if8DK8XwxMOeJKiDvldAAPOsLhM5VhVVh0ZW3jBJd45YmHh8xUeiOQ== 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 4Wbw372XLjzRCP; Sat, 3 Aug 2024 20:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473Ku3uR072565; Sat, 3 Aug 2024 20:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473Ku3A4072562; Sat, 3 Aug 2024 20:56:03 GMT (envelope-from git) Date: Sat, 3 Aug 2024 20:56:03 GMT Message-Id: <202408032056.473Ku3A4072562@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: fd53594ae75d - main - tcp: retire sysctl variable functions_inherit_listen_socket_stack List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd53594ae75dc6f8b0afad5adfe8dc78eccac161 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=fd53594ae75dc6f8b0afad5adfe8dc78eccac161 commit fd53594ae75dc6f8b0afad5adfe8dc78eccac161 Author: Michael Tuexen AuthorDate: 2024-08-03 20:52:17 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 20:52:17 +0000 tcp: retire sysctl variable functions_inherit_listen_socket_stack The default was true and it is consistent to inherit the TCP function block from the listener as most of the other parameters. Reviewed by: Peter Lei, cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46141 --- share/man/man4/tcp.4 | 7 +------ sys/netinet/tcp_syncache.c | 15 +-------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 70356baa2145..192fa90a1635 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 28, 2024 +.Dd August 3, 2024 .Dt TCP 4 .Os .Sh NAME @@ -622,11 +622,6 @@ Defaults to 60 seconds. List of available TCP function blocks (TCP stacks). .It Va functions_default The default TCP function block (TCP stack). -.It Va functions_inherit_listen_socket_stack -Determines whether to inherit listen socket's TCP stack or use the current -system default TCP stack, as defined by -.Va functions_default . -Default is true. .It Va hostcache The TCP host cache is used to cache connection details and metrics to improve future performance of connections between the same hosts. diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index c797c6a99f4f..62a4a5a28878 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -114,14 +114,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, syncookies_only, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_syncookiesonly), 0, "Use only TCP SYN cookies"); -VNET_DEFINE_STATIC(int, functions_inherit_listen_socket_stack) = 1; -#define V_functions_inherit_listen_socket_stack \ - VNET(functions_inherit_listen_socket_stack) -SYSCTL_INT(_net_inet_tcp, OID_AUTO, functions_inherit_listen_socket_stack, - CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(functions_inherit_listen_socket_stack), 0, - "Inherit listen socket's stack"); - #ifdef TCP_OFFLOAD #define ADDED_BY_TOE(sc) ((sc)->sc_tod != NULL) #endif @@ -777,7 +769,6 @@ done: static struct socket * syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) { - struct tcpcb *listening_tcb; struct inpcb *inp = NULL; struct socket *so; struct tcpcb *tp; @@ -802,11 +793,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) goto allocfail; } inp = sotoinpcb(so); - if (V_functions_inherit_listen_socket_stack) - listening_tcb = sototcpcb(lso); - else - listening_tcb = NULL; - if ((tp = tcp_newtcpcb(inp, listening_tcb)) == NULL) { + if ((tp = tcp_newtcpcb(inp, sototcpcb(lso))) == NULL) { in_pcbfree(inp); sodealloc(so); goto allocfail; From nobody Sat Aug 3 20:59:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbw7d1WFxz5T3V7; Sat, 03 Aug 2024 20:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbw7d0t9Kz44nm; Sat, 3 Aug 2024 20:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722718797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayJEqj8EmbKSMPtZQm4bCQA0Po3r1qF4mNuGvuBPgj0=; b=A3KeP8U5pDZOLRX0nHvu1enVnHApAHTFQiy/3OgEzI5iRcy7Hr6VGlpZv6RgbokryR6iVa v60XOBD8LtGYwAN3FrqxfBvL3HRN7mkqzLSzOsAcZKjTSiBvt5ykMDKTUzw8ObawxBGWzB TkKyzFdyPSFM5h9KH3BDqe+v/5TuZjfyDjZKpoC4+DnrQ7nzxL6wxm8QORyb855NQOwL8Y JaG5zkFcLc9OAf1Z5+u26EvX9G6cuO5cV7bwQaPAyrmgzJ63apb437vVFZ0PEsrS9bPbRV IZ0W/sWfkcJ8CqXb5zOZ9djuB3EKxVvVKKpyjHqqkVzLHEJM0vWr03FrxfWPqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722718797; a=rsa-sha256; cv=none; b=NjeaLcZQsy9GqKATacy1MMwXsVByP1hHw87VEcPzK0m6uh4ZOIY7R6yTmvx3UeSyzycpOT g/2V/PYZZKhB2/B+4tJO4wxO3YdCpuhGiytsV8dQ5mvJvACNkOZD6NTOOPShbgaHgq1gW/ tBhhHpjZoYUYmkUaahtMcw2HobW9Q+2qrmQPcYCF5JKU3uzCGVDWfMRCO8xErq/B016R5d TapUNspNlSoc1H5OED8HGiXRqOdIdVcgtCIZyAYYJWnMBUFSBnnw67GwR/hh/MlX8zgiNs fgKspwFvwfJEtJGnEeCa60Dtpqvzavr/1/qGrqLGaUZGxSYuqkI0NZN2YfhWjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722718797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayJEqj8EmbKSMPtZQm4bCQA0Po3r1qF4mNuGvuBPgj0=; b=Oauiil+Znr9A63wJAejoeohQdyqqmgdbdduDobMhVih3hrQnluy+Beno0a/QDNCPPRAyo0 NBB9NBk+mLFrJ5TEIpWL3WRJY4EdWsOChzBidBQMWdkhCLSx6ePI6zSpEVo6hep9AVWz7m czwj/aqKFgK0Dr/J7Qp/WS/UksvW3OllgQdTGjOHkuBaOlNqWV7j+oECinj4ERwpbGqWnk vz0Rs6ihdPJetMzmxmzbnLJYrF4sDxdgjn/BjlfVvVu63Nt9nawfwE22lEncVxP5xH97CV 2BQQ72ctDCACUu6WO+afY2h+FDIxVxBR8Mz1tmqjdGNYB3fB33z0K+5TMzFQfQ== 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 4Wbw7d0Qq7zRfy; Sat, 3 Aug 2024 20:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473Kxu9r073327; Sat, 3 Aug 2024 20:59:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473Kxux2073324; Sat, 3 Aug 2024 20:59:56 GMT (envelope-from git) Date: Sat, 3 Aug 2024 20:59:56 GMT Message-Id: <202408032059.473Kxux2073324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: d6fb9f8ca344 - main - tcp: inherit CC algorithm from listener List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6fb9f8ca344bfe47fc79d3ae81112a8bc036307 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d6fb9f8ca344bfe47fc79d3ae81112a8bc036307 commit d6fb9f8ca344bfe47fc79d3ae81112a8bc036307 Author: Michael Tuexen AuthorDate: 2024-08-03 20:56:39 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 20:56:39 +0000 tcp: inherit CC algorithm from listener Like any other parameter, the CC algorithm should be inherited from the listener. Reviewed by: cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46143 --- sys/netinet/tcp_subr.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 145496afa098..9e95a87b3596 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2259,11 +2259,20 @@ tcp_newtcpcb(struct inpcb *inp, struct tcpcb *listening_tcb) KASSERT((tp->t_fb->tfb_flags & TCP_FUNC_BEING_REMOVED) == 0, ("tcp_newtcpcb: using TFB being removed")); rw_runlock(&tcp_function_lock); - /* - * Use the current system default CC algorithm. - */ - cc_attach(tp, CC_DEFAULT_ALGO()); - + CC_LIST_RLOCK(); + if (listening_tcb != NULL) { + if (CC_ALGO(listening_tcb)->flags & CC_MODULE_BEING_REMOVED) { + CC_LIST_RUNLOCK(); + if (tp->t_fb->tfb_tcp_fb_fini) + (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); + refcount_release(&tp->t_fb->tfb_refcnt); + return (NULL); + } + CC_ALGO(tp) = CC_ALGO(listening_tcb); + } else + CC_ALGO(tp) = CC_DEFAULT_ALGO(); + cc_refer(CC_ALGO(tp)); + CC_LIST_RUNLOCK(); if (CC_ALGO(tp)->cb_init != NULL) if (CC_ALGO(tp)->cb_init(&tp->t_ccv, NULL) > 0) { cc_detach(tp); From nobody Sat Aug 3 22:16:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbxr26kF9z5RR64; Sat, 03 Aug 2024 22:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbxr2664yz4D7h; Sat, 3 Aug 2024 22:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKNLAeGZryRYaFN9kFH/4BI3Xa7o8fd/WXn7W2wq4Pw=; b=qgXtmiYzMWLLFkz62LTjx5xWYKYZ5wE/suEdquFjOoWNA6F2xLoZsas9RRgLJASIQqjmkh Zd7WZhS1liJspDJWYNK1kiadG9s4SfNfHKrmbSHuFkifO2+AyLE1bHCPrmHWfoGNrI35S9 mSdMWPO+mzVteSog5B/zPcP0eQo+pWOUktupMCT1QZd7UvfsPfCXtfiUuxluLgpDu5XCY4 pHZBhze1hMwWXARJOhpTNj2jfLLXg4IWtEpvvgW6UnazgAsb9bsoRNSMKHRkLzH1PI9Kov ZAf9ME5QiPCUl6jiNW8brkB1tHiOHZzDLMQ+hjYg1JFASEXAEIj3UBz8BrHWQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722723394; a=rsa-sha256; cv=none; b=T55q5LQpkIh63DqLcQYkrLKmDceZFkchuUprVj+tZnavmH7oM0BakRG0mY8dZEUPQhrn+2 /Ss//8kTzjxcfy58z7OvsCWbgIZsdbffTJOYWYaxaI1tYCJ0gs5RUTwEGYG72R1RWaL8x4 5GL3w9plDC7KLVkjvUxRUAExg3XkpgwIQu4AZshYPyRQX+H3iejjs7GXS4cuIcqUy6JM5R 6x9alSTg9d5606EFDMMBG2yXxfYObQD+peMAU+SBsUhEp9HepoHYODT1OMiV1Fxfq2yTFm Q6HbbYEowFCae+/LDvlO2GMJ0BUwmQZfiLGCq8+SywqCUjay8S7fBRkPW98KCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKNLAeGZryRYaFN9kFH/4BI3Xa7o8fd/WXn7W2wq4Pw=; b=km2L5ppzrbbzLH22uWLWsmULMN+4ZVM33/mwlB72E3BXgYJiHn0kK8MepMtBjgFOR9tIsQ TBu2TwVLtMxQImrzrZEdZcTBCPHsErQnTrpKGGd8z9CY2ZDupm5yQ54ZyKF3ybmcL2De8C bw/J3XgMO21snyPOvoqfPZ1XeM2CwbObNc72nbjpnHMPUFGLzOKZuUPjHDeZupI00sB0Vg L/Y+xZ/MTb7W4C6tbQU59103B90eSyQrDK+NNDFJ5oEfBkQ9l2kY9HLt6Z8xHYl4ANx5Ia kldnLir8PrUql/ezcfvyugmyhiyUJWtXnwDkDsJnjdRAf9eelMTrkqwvWf5bOw== 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 4Wbxr25hX5zV7L; Sat, 3 Aug 2024 22:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MGYeV008387; Sat, 3 Aug 2024 22:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MGYbW008384; Sat, 3 Aug 2024 22:16:34 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:16:34 GMT Message-Id: <202408032216.473MGYbW008384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: af2702c997f8 - stable/14 - tcp: drop data received after a FIN has been processed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: af2702c997f85e9517b1538b5b645537bc2a0efc Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=af2702c997f85e9517b1538b5b645537bc2a0efc commit af2702c997f85e9517b1538b5b645537bc2a0efc Author: Michael Tuexen AuthorDate: 2024-04-18 19:50:31 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:15:51 +0000 tcp: drop data received after a FIN has been processed RFC 9293 describes the handling of data in the CLOSE-WAIT, CLOSING, LAST-ACK, and TIME-WAIT states: This should not occur since a FIN has been received from the remote side. Ignore the segment text. Therefore, implement this handling. Reviewed by: rrs, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44746 (cherry picked from commit c9cd686bd4a039c652ed5d11019bae10828329df) --- sys/netinet/tcp_input.c | 6 ++++-- sys/netinet/tcp_stacks/bbr.c | 18 ------------------ sys/netinet/tcp_stacks/rack.c | 14 -------------- 3 files changed, 4 insertions(+), 34 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index dbc2de17785f..2894b6fcf658 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2323,9 +2323,11 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, /* * If new data are received on a connection after the - * user processes are gone, then RST the other end. + * user processes are gone, then RST the other end if + * no FIN has been processed. */ - if ((tp->t_flags & TF_CLOSED) && tlen) { + if ((tp->t_flags & TF_CLOSED) && tlen > 0 && + TCPS_HAVERCVDFIN(tp->t_state) == 0) { if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: %s: Received %d bytes of data " "after socket was closed, " diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index f06a35022b25..7803865af818 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -9555,15 +9555,6 @@ bbr_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } - /* - * If new data are received on a connection after the user processes - * are gone, then RST the other end. - * We call a new function now so we might continue and setup - * to reset at all data being ack'd. - */ - if ((tp->t_flags & TF_CLOSED) && tlen && - bbr_check_data_after_close(m, bbr, tp, &tlen, th, so)) - return (1); /* * If last ACK falls within this segment's sequence numbers, record * its timestamp. NOTE: 1) That the test incorporates suggestions @@ -9666,15 +9657,6 @@ bbr_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } - /* - * If new data are received on a connection after the user processes - * are gone, then RST the other end. - * We call a new function now so we might continue and setup - * to reset at all data being ack'd. - */ - if ((tp->t_flags & TF_CLOSED) && tlen && - bbr_check_data_after_close(m, bbr, tp, &tlen, th, so)) - return (1); /* * If last ACK falls within this segment's sequence numbers, record * its timestamp. NOTE: 1) That the test incorporates suggestions diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 0bc3b5588b7b..d918d9385446 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -14041,13 +14041,6 @@ rack_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, &rack->r_ctl.challenge_ack_cnt)) { return (ret_val); } - /* - * If new data are received on a connection after the user processes - * are gone, then RST the other end. - */ - if ((tp->t_flags & TF_CLOSED) && tlen && - rack_check_data_after_close(m, tp, &tlen, th, so)) - return (1); /* * If last ACK falls within this segment's sequence numbers, record * its timestamp. NOTE: 1) That the test incorporates suggestions @@ -14154,13 +14147,6 @@ rack_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, &rack->r_ctl.challenge_ack_cnt)) { return (ret_val); } - /* - * If new data are received on a connection after the user processes - * are gone, then RST the other end. - */ - if ((tp->t_flags & TF_CLOSED) && tlen && - rack_check_data_after_close(m, tp, &tlen, th, so)) - return (1); /* * If last ACK falls within this segment's sequence numbers, record * its timestamp. NOTE: 1) That the test incorporates suggestions From nobody Sat Aug 3 22:20:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbxwN03hcz5RRD6; Sat, 03 Aug 2024 22:20:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbxwM6dTGz4DWK; Sat, 3 Aug 2024 22:20:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qMpOUz3VWxo1eiXIHGlg6rEuPAq2NHYirO35O/yNvaA=; b=tGaB5o4wCenEswNvlQHDzaQTKhZJCnbNEcV5v2g3tlFm1rsoGf2/cgQBuu3wvEDabb9ddV RIZtayMCFkoK8uWtOzG+jMe3Ux+Fk4JbhwflsF08WevNMu2eOdLmebkhY+noTLMSBIcg2E TVcAmDYFMaEdO1yrQ7XMnf0ZiKiDa5DMI9ERNj/NaSrDtt5jNtACgJZHT2JbbJDMB0hPMo 4N/X2xSsl1A1H1Ts1esL4589WwPhV2cRmCHf7O6R/bXu5Sxhxwg8DqKLpQx/h3znBY2Uj9 Kig+UefPf6CP3ps3PegB+/+qjndgZb/bKafTgtYd/kou1P9SKTM6NcEqsrmb2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722723619; a=rsa-sha256; cv=none; b=auTpbp070GXHYOKjLGmJfjJ3B/gmF0QaBVV7+69aJKQ5gcibva1xhkkdKhUHUDBy4v26xn RnQRGLCUrpArYtm8X8SPUunWMjwGXHOyQ8MwhkyOh2KPZtrLk2c0fwePO7ywrwsqCb9gbJ N+RmVQb8d68AsI0SUy76hGBj4+qgssdRv6L+GDKFZ62stYCc1bshAfiRPOK7uiNRKT6mw4 IudAPo9HXJT7ozY1n6O7t+Exot8CiST9zjzSTossIn9VK4Ps+rmxU6OwCdjgLImg3PeORL lPRTNGb0ImrUNNtxP8G6aLeaev66JeOyCiAt/cOmiBNcdyDOlPZxlf7eX7GV4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qMpOUz3VWxo1eiXIHGlg6rEuPAq2NHYirO35O/yNvaA=; b=o19pL5CIAfZOIEEV1vEho9Y58yTdXpDcRAYsU75MCalrfdsAd63qDL3Z5WQ2cMzX73em30 GS/ksgKF/YxjHRsXEnTLQlqugMY86BlDwkEFcgW5ni0/UoG9p0qpo49pLkmE8Va4b0onzt 09t4yj+ePRKQujiDAa3QRUOkSuC7OAvTZYa1BRgb031PqtCemYE62POIryuZpG9/rf7Hc7 z1GFBy6Iq0rBy3gfNV8NolsxCp35y2rSK+9K2x1YOi+HYeL0EnU9bQ8uAlEhNso3kUMzqh mxl6UNKh5i6muPhGd2zkA0DnsdPARlJ4XNd0Qh05TyhWhVwubMD7YMlczKwhFw== 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 4WbxwM68lfzTcW; Sat, 3 Aug 2024 22:20:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MKJeH017668; Sat, 3 Aug 2024 22:20:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MKJ2I017665; Sat, 3 Aug 2024 22:20:19 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:20:19 GMT Message-Id: <202408032220.473MKJ2I017665@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 37c9f79561c0 - stable/14 - sctp: document sctp_recvmsg as implemented List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 37c9f79561c0b83e2ad87939fad27167ae7f11db Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=37c9f79561c0b83e2ad87939fad27167ae7f11db commit 37c9f79561c0b83e2ad87939fad27167ae7f11db Author: Michael Tuexen AuthorDate: 2024-05-02 13:17:43 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:19:33 +0000 sctp: document sctp_recvmsg as implemented PR: 275990 (cherry picked from commit eee88ef45f78d7f9996a740c2a554bc6e8496114) --- lib/libc/net/sctp_recvmsg.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/net/sctp_recvmsg.3 b/lib/libc/net/sctp_recvmsg.3 index a5f794743f53..a529fc29110a 100644 --- a/lib/libc/net/sctp_recvmsg.3 +++ b/lib/libc/net/sctp_recvmsg.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 23, 2015 +.Dd May 2, 2024 .Dt SCTP_RECVMSG 3 .Os .Sh NAME @@ -39,8 +39,8 @@ .In netinet/sctp.h .Ft ssize_t .Fo sctp_recvmsg -.Fa "int s" "void *msg" "size_t len" "struct sockaddr * restrict from" -.Fa "socklen_t * restrict fromlen" "struct sctp_sndrcvinfo *sinfo" "int *flags" +.Fa "int s" "void *msg" "size_t len" "struct sockaddr *from" +.Fa "socklen_t *fromlen" "struct sctp_sndrcvinfo *sinfo" "int *flags" .Fc .Sh DESCRIPTION The From nobody Sat Aug 3 22:23:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbxzg4B3gz5RRhn; Sat, 03 Aug 2024 22:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbxzg3PGnz4Dj7; Sat, 3 Aug 2024 22:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=epEoYWr75qzlJNTCBezmrz7wcFZ5DLruYsvLnqnZtEk=; b=OOGcNAEYMJO2TRDQpHpSE8t3dsYmU2H3rkiPckMSf44irjrI2Pogaai3dJELYz+M4QgVqu BBPzt67wXukZr8ckkcoEC8GChnBuyTkSoDET4GpFKps7PdqCGwtUqzfdPIqsM1EWy8EyzY YmJ/v2wfwHQ3F8VPO16zcKhNoZDHva5EN++56oY7y10rjuHpDMNGZHuZgFFC6em+WA7yUF 9QWTSmpXgyGKNl4H2YZwcOJr+fByocD2oQHvkRXZuY2sltpVm5Eo+KozOpdeIB1WlRIeYe ekNgxYlfUb8F33RmjBM+DnGX3YXmR3LQX+c4siQJnMogbjQdwIsF6gsqfHiFsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722723791; a=rsa-sha256; cv=none; b=G8vS6GEP0TdzfquJiiti+BQECYDy+QU7YQ0mkvr4DKBl17cLfVOAbH2sWKoaL+YeuXHH9f rRZ+bhi3PzWFBfLeev2Y6+dnqdyEx3IGqbSqp0WfXZBmJlnJbnZVTwRguyn954nbD7tiRr QZKPLWYfcEq2Mj5PvIzVgv/ShVGRgX5rdLZdzyalVQUajZfmqqgl1XKhnO6ORyjC5+0EnH VkqqmeMYEhB0tUhAS6sJVoAh0T6a3NN8Q+MZd/MeaLXCdxN4zuWKw2RvJb7pIDHnvRusug QENLOy1ciIYRzK7LY6w5uP9yXnHCP7mHb6768RkXcsUQt23W/DVLNyoSHVdAjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=epEoYWr75qzlJNTCBezmrz7wcFZ5DLruYsvLnqnZtEk=; b=fMVKKnhQg4utM5DD1qE/eaX34iQq2hFI2VfsCY/lZ0qRyvc4NBqJWLaFR99GhL5wYIWdhV RnWdxXlr8OiljMA8ymzQn6Dex+bJF3pizQ+i8SgEQNXwKzSUtnmt7/CX7ZwLx8bo2LLqik AdtFGeyZKWOfPIwVgbDzBrgFkojSGTesDy/TZlVoMd2RM+3Z4uGEIJxe6K+yGGvhVfVACB ZUHWWEkYzx/wqo3tF0nZgL05WusfeEzsZKuJ92FoHjwsCOkj5XGVzmGoApz/VLKUPhzCxP T+pWbsLkYSYW34qLCEr0Wyjszw8+NnNEd6izn12FPcYiTLSg7elifc5K66upMg== 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 4Wbxzg3136zSyg; Sat, 3 Aug 2024 22:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MNBhj025417; Sat, 3 Aug 2024 22:23:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MNBRs025414; Sat, 3 Aug 2024 22:23:11 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:23:11 GMT Message-Id: <202408032223.473MNBRs025414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 7663542fd713 - stable/14 - sctp: add missing check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7663542fd71312e2648d212bf74c77fff310862e Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=7663542fd71312e2648d212bf74c77fff310862e commit 7663542fd71312e2648d212bf74c77fff310862e Author: Michael Tuexen AuthorDate: 2024-05-08 21:01:06 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:21:39 +0000 sctp: add missing check If memory allocation fails, m is NULL. Since this is possible, check for it. Reported by: Coverity Scan CID: 1086866 (cherry picked from commit 3d40cc7ab888a37a3ba085f377a057396a7d2476) --- sys/netinet/sctp_output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index a8facff6b917..e0106831f06a 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -6705,7 +6705,9 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, } else { m = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_NOWAIT, 1, MT_DATA); - SCTP_BUF_LEN(m) = sizeof(struct sctp_paramhdr); + if (m != NULL) { + SCTP_BUF_LEN(m) = sizeof(struct sctp_paramhdr); + } } if (m != NULL) { struct sctp_paramhdr *ph; From nobody Sat Aug 3 22:23:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbxzh4tMPz5RRnM; Sat, 03 Aug 2024 22:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbxzh49RWz4F31; Sat, 3 Aug 2024 22:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoEWmg0BHvrDCo5r7YeorqYLXkcC4U+lmpXAK0xegQY=; b=lCa3wwtpkZS7Rd2ZR06Gw58YDFc3x8JdJdEtBgcEUB/0gqY2cXohPumMpMGhLLLepwnV6w 8szs9ncJ6U9R2jIQh9KgYfDhqirFmQxrbg9OMzTL2qqEGpO1SFixL82JEirTXZB1Ua3qcz CyBm9eJBYFvq7SCOGLvBAJ/Kr8jlVJ8v5AXEZhFRkxiHzIPhSWbivdJmGmDwy849y5SqxQ QrnN1mdjhbcblKER1B/UUIcJ+h4tEXMWZGUxYD0YfxWfIXgFnVQGIXjgRjzK5TN237T+pK wTQblgneadMe6eXnYpqQsaPlAJzp61FXD9nAwvKA6adICzyrkwhm0qgQwPhCcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722723792; a=rsa-sha256; cv=none; b=n668C/QwmULVHJ2hduojJ3Il+D75qQHOeH1hyYyHU6HeSvvU5DhmbwkZa/3cqk3zoFnJwX YOPOJ9upq/cmGHFWFIO9woW1FNbQbkMPkRaS/BOpnM/Oyk+W2iZPjOryA4frOGLhVOJren 33oj9M2h/w5G7633oA7cI1eW7/CBwk8WneB9MpuSKe3a3li/VHr6l0EKBK3lR5HU3yAegj COiER1eOXRgUGXxpXs3DVfiGLAfqE2FyFOrJQfKMHKwz6odlYoJltolv2stf4Xf4eQYJhi lwes3VLmmvLAqfItGV1dcSu3fY2zfnScIqokcbVbFJ41AD9D5r38gmqKIVfgkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoEWmg0BHvrDCo5r7YeorqYLXkcC4U+lmpXAK0xegQY=; b=IOAG7d5kccKTpxVF7EfEr13WGwDpvZey7uF3WI2ohZUNNvnTUNtFEJcUneK4LBIOybwcM9 YgqQ2Iv6eZ2G3HYsQAfy13X+mjcjx8IY7ncah/fG24XXZGsKE/yBzNuZzeQ1yN+dK6E696 uAX0S/qK19SPNodfG1cP1/iU91aa3YxwFTdsxfA2i8VpFCa8W3Z8eUaZBrWB0rx8x+K54y wGvmClbt/2SccQ9lDjRQrXbZ965y38BIvVbsz/NB5031oxW0q003DVANwfF8s9nGwmaUz1 CmJGMwmgffQ3ORQivU1rpKBnHWU5DKnGa4b/qC+4wkqIFqMf4BNb0yPacZxFMg== 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 4Wbxzh3mw5zV87; Sat, 3 Aug 2024 22:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MNCe6025471; Sat, 3 Aug 2024 22:23:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MNC0h025468; Sat, 3 Aug 2024 22:23:12 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:23:12 GMT Message-Id: <202408032223.473MNC0h025468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 1776db67c3d1 - stable/14 - sctp: fix sctp_sendall() when an mbuf chain is provided List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1776db67c3d1f7e207ac06956af2a9983b67f201 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1776db67c3d1f7e207ac06956af2a9983b67f201 commit 1776db67c3d1f7e207ac06956af2a9983b67f201 Author: Michael Tuexen AuthorDate: 2024-05-08 21:41:17 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:22:43 +0000 sctp: fix sctp_sendall() when an mbuf chain is provided In this case uio is NULL, which needs to be checked and m must be copied into the sctp_copy_all structure. Reported by: Coverity Scan CID: 1400449 (cherry picked from commit e187fa56904712cb4dac9e14c81c88821582aeb4) --- sys/netinet/sctp_output.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index e0106831f06a..c146bda95c7c 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -6911,10 +6911,20 @@ static int sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, struct sctp_nonpad_sndrcvinfo *srcv) { - int ret; struct sctp_copy_all *ca; + struct mbuf *mat; + ssize_t sndlen; + int ret; - if (uio->uio_resid > (ssize_t)SCTP_BASE_SYSCTL(sctp_sendall_limit)) { + if (uio != NULL) { + sndlen = uio->uio_resid; + } else { + sndlen = 0; + for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { + sndlen += SCTP_BUF_LEN(mat); + } + } + if (sndlen > (ssize_t)SCTP_BASE_SYSCTL(sctp_sendall_limit)) { /* You must not be larger than the limit! */ return (EMSGSIZE); } @@ -6926,12 +6936,10 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, return (ENOMEM); } memset(ca, 0, sizeof(struct sctp_copy_all)); - ca->inp = inp; if (srcv != NULL) { memcpy(&ca->sndrcv, srcv, sizeof(struct sctp_nonpad_sndrcvinfo)); } - /* Serialize. */ SCTP_INP_WLOCK(inp); if ((inp->sctp_flags & SCTP_PCB_FLAGS_SND_ITERATOR_UP) != 0) { @@ -6942,15 +6950,14 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, } inp->sctp_flags |= SCTP_PCB_FLAGS_SND_ITERATOR_UP; SCTP_INP_WUNLOCK(inp); - /* * take off the sendall flag, it would be bad if we failed to do * this :-0 */ ca->sndrcv.sinfo_flags &= ~SCTP_SENDALL; /* get length and mbuf chain */ - if (uio) { - ca->sndlen = uio->uio_resid; + ca->sndlen = sndlen; + if (uio != NULL) { ca->m = sctp_copy_out_all(uio, ca->sndlen); if (ca->m == NULL) { SCTP_FREE(ca, SCTP_M_COPYAL); @@ -6962,20 +6969,14 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, return (ENOMEM); } } else { - /* Gather the length of the send */ - struct mbuf *mat; - - ca->sndlen = 0; - for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { - ca->sndlen += SCTP_BUF_LEN(mat); - } + ca->m = m; } ret = sctp_initiate_iterator(NULL, sctp_sendall_iterator, NULL, SCTP_PCB_ANY_FLAGS, SCTP_PCB_ANY_FEATURES, SCTP_ASOC_ANY_STATE, (void *)ca, 0, sctp_sendall_completes, inp, 1); - if (ret) { + if (ret != 0) { SCTP_INP_WLOCK(inp); inp->sctp_flags &= ~SCTP_PCB_FLAGS_SND_ITERATOR_UP; SCTP_INP_WUNLOCK(inp); From nobody Sat Aug 3 22:24:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wby0j2q0Xz5RRg6; Sat, 03 Aug 2024 22:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wby0j2BWCz4FWL; Sat, 3 Aug 2024 22:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R5ntVjPeD+F/kkFuYXn/WjDSWJF7ijyDwPPLiozVvxI=; b=kxUEXwePDeYbQSxAGkM4QGJUgLqLW9RawcvAChF0cahRbalWpfFLnFxAtDZTi79KrZe+/a MEKr5ajhAhQYNCGp157ILBxFWnLfwaQcH8pPB4u6gxUJ5fe/1qI7UApSh/KLHqljpLpC84 3uka4faxdf9ka2qLDQtyQ4JjiUPSrmWBT2YuJw0jKgpHUAjfJ+lnZRHBCL+5OT/McG3EG2 3HQfcoOXWITgd4J9uKva1n124jmGQjK5NYctcwusgqtm8dV170xaXgdgvBh+LgOqIxSXsH 25YJe00AbvJMYVunY4eF/lXG846F++J9dyfHP5ixE6nIHmkH5xWdX1avamCfQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722723845; a=rsa-sha256; cv=none; b=LU9O/PWuilDPMbVHk7z+wbSFt77rsmKy2ahKiynrtejKHFon0OjeAB+0W+EbB5MFZqEE2D +sqOyTvSFyiMdF2T/4xa1yLMA2GIifj/V1xHSspILY60CcholJt1bFWMIhKiN0V7yXD0g3 WYtLVX8+WUsFH6Pz8wqwyEOlX68n7w2x3Z0HSYDanyZJO7UKpzZhrVr8Yde/Gj7WCSlzhs WSZUpCp/f/ptuFUzv++l1nLE+hO5MKNdQVvU6iEht0F5COfbomLf04PwJg6VCYhIrlTbWH KVIST6wI8bbHGZwKoO/m2Jtqq4KSuHWyYyjb4680mE2XXYd4xM8sTh+z+IZvMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R5ntVjPeD+F/kkFuYXn/WjDSWJF7ijyDwPPLiozVvxI=; b=wyzYT0KQXkoBDbxYCZEzHCobbiAnMxl2SzlP70oVPMNX6zAXgXZ7FR+hqfUPy6fJeWehX5 8Cy+rOU1mmmGx+H43tinrIkeqgeOmUifCTWnmTy5CinEz+s3nkHN1qAPDc9Fa/EsTrRLAn MUiOP+urcvsbzfvnED0P6aiYX/fyrr/3mtCzTiDBLAaYWf87+7KBSC1TenRSXTtBpB65dH eED1rDyDnr3RTo+20T2jOdu1FX3uoOFx/p49qRVowh8mp/HvUsFQnRbmuwbRo7GHSpTg/i X9y01Jvc1f9msbM/Ikg4yfJyfD7kWbOe1eT+tKH1F67Ro3Uz4o7/xm+EwtQ9qQ== 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 4Wby0j1pDFzV88; Sat, 3 Aug 2024 22:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MO5rJ025729; Sat, 3 Aug 2024 22:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MO5VB025726; Sat, 3 Aug 2024 22:24:05 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:24:05 GMT Message-Id: <202408032224.473MO5VB025726@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 5678f3b366c2 - stable/14 - sctp: don't provide uninitialized memory to process_chunk_drop() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5678f3b366c28c6828d32bd758fda4d6b965aebf Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5678f3b366c28c6828d32bd758fda4d6b965aebf commit 5678f3b366c28c6828d32bd758fda4d6b965aebf Author: Michael Tuexen AuthorDate: 2024-05-08 22:17:13 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:23:37 +0000 sctp: don't provide uninitialized memory to process_chunk_drop() Right now, the code in process_chunk_drop() does not look the the corresponding fields. Therefore, no functional change intended. Reported by: Coverity Scan CID: 1472476 (cherry picked from commit 83dcc7790b11e605c32ec9a091c6bba3bc921083) --- sys/netinet/sctp_input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index a55ef5ac1eab..0a8372a07362 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -4231,6 +4231,8 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *cp, SCTP_STAT_INCR(sctps_pdrpmbda); } } else { + desc.tsn_ifany = htonl(0); + memset(desc.data_bytes, 0, SCTP_NUM_DB_TO_VERIFY); if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpmbct); } From nobody Sat Aug 3 22:25:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wby1x0lT9z5RRwM; Sat, 03 Aug 2024 22:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wby1w6r5rz4FrJ; Sat, 3 Aug 2024 22:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3G0aF+WucEAqPYKQYIUl9wiKh9NN1o9lw7kHIh7fyO4=; b=Fog3xMeEgTJ77ZSHQIyu2i8rFg4vvpZh5vBivCcXf/QvUJ3lUdMXkdKEbcv4vSW77RToCT n5veBL+FDHILiKix1qnvoxSH70EbT47XtJHaHw9ovkrcs1SxIiabWPafxIRWpDLiJ5Ts58 HWrbDZt3JhQpfChDyxJfCcIQTUL5xvBd3IZKPVnTxDQ1NaAMTS7/89+E1MTh6bqpzQm3nR KhkVZVdly+4JLrTN4HOjx2sf3NInsVpgZTYLU13XnI9zAHkX5/coRk/eyf4Oae0xtNOldh nnMaEPGRfSlTGqGnMQnLsOz4JhA6tWxZFopZ4oU8aK3rbql7otjWrgB5butOpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722723909; a=rsa-sha256; cv=none; b=oNwoDoA5ddtPvrX2py4SSF2Cg9rWbGWd3zszXynNriv5yLz8en+yfvwkIQ0+v2oVQ0Z/OR 4g0qSpfnGk1Y3IezsL4sVGbTru+JpnrnflxjTjQcRr0DVLyS7NI/rn/MNwxHNAJ3hru+a8 ducASdwUVFPiEQJxz6S2kv6au0tOJAkwaJi3F75jLwoz7g3MCJXPSqwqXwjaGx8slwqoQG DbkX6DOfMGz38dghn5GtbPKzQ3eLRvCuoMRc9j23gweS3vHc7lGjSekmORP2Zh3xUQFw87 ro7A7gVAO/76QyuFctRSo1+GxW1TixBqk3bxm19ibUWm4CDJEgovHxQ0RtXnxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3G0aF+WucEAqPYKQYIUl9wiKh9NN1o9lw7kHIh7fyO4=; b=pOpoqt1MF8kkZsXa6PPKdt4V78bTVpkSBcugdTtiqHAy9w7W5lCYLaIsQqe5AbX/r3qYlU MEfATyVlkA/pz+N+02OMtp0XnVdgPDrB3ZXtMy4VKmG3IkWJm8ghN7FWaoBB9iUCPYYSqM P91wohPfn4J2Egxi8DEexk7XkjdjPbs2484TA8ih3r2DJL39GzXiG9OAyWrrNuh/y/73XJ Tg6lFr4QOIswyme7jnwH4nATYkhK59UiB6fPnOYkcYiguo8THkbRDSrRPBSto6DB5zRlMq J95suKer5RBA+wo0MIQb4zG4yJTpixOoVJ5EZ9kk219yzto9LPb2ZY7oRNkGdg== 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 4Wby1w5vmkzSyh; Sat, 3 Aug 2024 22:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MP8o0026025; Sat, 3 Aug 2024 22:25:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MP8Y4026022; Sat, 3 Aug 2024 22:25:08 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:25:08 GMT Message-Id: <202408032225.473MP8Y4026022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: df07f0ce9195 - stable/14 - sctp: minor cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: df07f0ce9195ed044374e48dcfe7a21b875ed742 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=df07f0ce9195ed044374e48dcfe7a21b875ed742 commit df07f0ce9195ed044374e48dcfe7a21b875ed742 Author: Michael Tuexen AuthorDate: 2024-05-08 22:51:09 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:24:54 +0000 sctp: minor cleanup No functional chnage intended. (cherry picked from commit 0d15140d6d3470db45d823e4f3a5ec05693b097d) --- sys/netinet/sctp_indata.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index a30fd95fef30..4c40e0de4326 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -5241,6 +5241,10 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb, uint32_t mid; int need_reasm_check = 0; + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + asoc = &stcb->asoc; mid = strmin->last_mid_delivered; /* @@ -5278,11 +5282,9 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb, /* deliver it to at least the delivery-q */ if (stcb->sctp_socket) { sctp_mark_non_revokable(asoc, control->sinfo_tsn); - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, - 1, SCTP_READ_LOCK_HELD, - SCTP_SO_NOT_LOCKED); + sctp_add_to_readq(stcb->sctp_ep, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); } } else { /* Its a fragmented message */ @@ -5352,8 +5354,7 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb, strmin->last_mid_delivered = control->mid; if (stcb->sctp_socket) { sctp_mark_non_revokable(asoc, control->sinfo_tsn); - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, + sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); } @@ -5394,6 +5395,11 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, * it can be delivered... But for now we just dump everything on the * queue. */ + + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + if (!asoc->idata_supported && !ordered && control->first_frag_seen && SCTP_TSN_GT(control->fsn_included, cumtsn)) { From nobody Sat Aug 3 22:25:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wby2n66chz5RRgg; Sat, 03 Aug 2024 22:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wby2n5MM1z4G8B; Sat, 3 Aug 2024 22:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ieLrD8SeRRuoACRPct9L5ciPwYylI8MXoSZcn32TrPk=; b=Wrm2Wpm+OXr4wa2Uf4E/Zm7wr/vF0nH2XX/s2euNvPMWXndaix4DS6RR/DvmvO5oKH8lOb GZy3pTEeCJsMrG3SUDR3wi80jpbRYMhXt2DCZIvBQMT0Dl/+S4xqTxd1Lv12RwiBkya+6d YIk6r3myigQGfBMroksE9DAVxyPCv1zyHfkpqZXH7vQF5/pMUUNBIU8Qxg1I/kw2gAzade KygtYO/tUQexLSzp3H63/stQmmUa+LPQWZqT8Ybu6QbHSRFg4EZKt/KKYZJvu7ptFOvc35 ljNt85xANnXyjoNoo9X4wGeTtFWw3OUcIKjMLoCEZB7GEnawI0JgXWtWkBeYEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722723953; a=rsa-sha256; cv=none; b=pCwZrnm8tIikqg0ptRmctqwm+ef+0LadKyYwjQ8EorR91Oxxxzt3QS0oUNnqMbxnKCkTTt JRpHHzNYXW13c+m2XtYGNKY0/Dh0GIbLrcy1h98fO4RHwMf2/ja+H0XDvkOmfXAb5j3CZx 4yGZFUhWQXRIpzZLPSwSY43qiAnRUwyPjNuZEf/tS5eBfE8BIqzpXOp0aCv/PdzTHBtPIz WmzsymA101OGApURhO2uhLzn/+L/rP0/M8agZRpbEBNwZCnu+u4bzmCUEP9h0uiHx4hAaQ 7KCxzT1V6kEm8LFBA3BQFHyeF4QIGCddTO/eU1pI4NX4CTkx2D/RRzDDsDK7qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ieLrD8SeRRuoACRPct9L5ciPwYylI8MXoSZcn32TrPk=; b=tt5mgBJE3e/1+nHN2fOXVWMJITGpCymbOsNqpHvwg6Pzz9p9O6sS2eKufgyEh7hs4+pCTy AGelwmOl/uNxTDAxdJMP4XCI35qie3YxiAPpiK8MJYK/8q1HR4Dr3HgnLgY7vuwy1HUgA7 WGHdQAGb6oYJjvZwKLAmj4dR8BoDSbSSAlWBWePIYR/PGDqBr7HK8Z96Y65xVmtxYyVgpC jDpJ8QxCmRrDLZ9fNj++IMNsl/YThbs47xPe+1M0DUy/Uktk+vKxTPchaniQPJDntVMLrU 7J0o7Xpm56KS60xQ2SGw73mPLXMAZDpZdAUj+m4BE1SheZ2xI8wsiGHAeWfi8w== 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 4Wby2n4jB7zSyj; Sat, 3 Aug 2024 22:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MPrE5026250; Sat, 3 Aug 2024 22:25:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MPrFx026247; Sat, 3 Aug 2024 22:25:53 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:25:53 GMT Message-Id: <202408032225.473MPrFx026247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 53da1bf035be - stable/14 - sctp: store cookie secret change time as time_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 53da1bf035beef155fdb5d6e93215e01dc3090fd Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=53da1bf035beef155fdb5d6e93215e01dc3090fd commit 53da1bf035beef155fdb5d6e93215e01dc3090fd Author: Michael Tuexen AuthorDate: 2024-05-10 18:09:06 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:25:22 +0000 sctp: store cookie secret change time as time_t Reported by: Coverity Scan CID: 1492349 CID: 1493281 (cherry picked from commit 9d8a3718e24c9ec1ffca6efba64aba3e308aee96) --- sys/netinet/sctp_input.c | 4 ++-- sys/netinet/sctp_pcb.c | 2 +- sys/netinet/sctp_pcb.h | 4 ++-- sys/netinet/sctputil.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 0a8372a07362..dc31ffbc2161 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -2329,7 +2329,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, } ep = &(*inp_p)->sctp_ep; /* which cookie is it? */ - if ((cookie->time_entered.tv_sec < (long)ep->time_of_secret_change) && + if ((cookie->time_entered.tv_sec < ep->time_of_secret_change) && (ep->current_secret_number != ep->last_secret_number)) { /* it's the old cookie */ (void)sctp_hmac_m(SCTP_HMAC, @@ -2352,7 +2352,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* compare the received digest with the computed digest */ if (timingsafe_bcmp(calc_sig, sig, SCTP_SIGNATURE_SIZE) != 0) { /* try the old cookie? */ - if ((cookie->time_entered.tv_sec == (long)ep->time_of_secret_change) && + if ((cookie->time_entered.tv_sec == ep->time_of_secret_change) && (ep->current_secret_number != ep->last_secret_number)) { /* compute digest with old */ (void)sctp_hmac_m(SCTP_HMAC, diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index a1742b2fffca..69c492bc58df 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2570,7 +2570,7 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) /* Setup the initial secret */ (void)SCTP_GETTIME_TIMEVAL(&time); - m->time_of_secret_change = (unsigned int)time.tv_sec; + m->time_of_secret_change = time.tv_sec; for (i = 0; i < SCTP_NUMBER_OF_SECRETS; i++) { m->secret_key[0][i] = sctp_select_initial_TSN(m); diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index e57e13654073..5c6ead92bf9b 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -263,8 +263,8 @@ struct sctp_base_info { * access /dev/random. */ struct sctp_pcb { - unsigned int time_of_secret_change; /* number of seconds from - * timeval.tv_sec */ + time_t time_of_secret_change; /* number of seconds from + * timeval.tv_sec */ uint32_t secret_key[SCTP_HOW_MANY_SECRETS][SCTP_NUMBER_OF_SECRETS]; unsigned int size_of_a_cookie; diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 19180b3cf725..e963c5cb466e 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1944,7 +1944,7 @@ sctp_timeout_handler(void *t) type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timosecret); (void)SCTP_GETTIME_TIMEVAL(&tv); - inp->sctp_ep.time_of_secret_change = (unsigned int)tv.tv_sec; + inp->sctp_ep.time_of_secret_change = tv.tv_sec; inp->sctp_ep.last_secret_number = inp->sctp_ep.current_secret_number; inp->sctp_ep.current_secret_number++; From nobody Sat Aug 3 22:26:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wby3j1Qx3z5RRj9; Sat, 03 Aug 2024 22:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wby3j0xl1z4GD8; Sat, 3 Aug 2024 22:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0BtTLgtEU5hWeuJSZeHKaJ95qdZ6ihFkbMUCS2H96SY=; b=sah3MN78KhH7SnhlcYcXIbjEtWhLkmqogKKx6Z69FMYdAAiTu7t5/Vw9SNvs5cGSDEApQe 1egQSixB4kUDh78RIscuLGXi5KPnsK/S+mDYdO+vbkiXhf7C8Y+vMVURDaTnKeEn8JlZ29 NsgYkN3K9kJMYdrcgkqFz4z74kGcp0WF1fxydh0zjlOuLypvVkm/RWnu6lgRk4p9mwG4ny /9Zq3Y4n+yePz7WKN/xIG5X57UJpIp0YdC/d0GCOZsVnwwWUDf8B5IWOiSpfRqP7xo+vNi yoFsqlIXdMgRnP9W+v3YFq1JubGttGCJDtQYTpYOrndByy119Mdl2k8YUf75PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724001; a=rsa-sha256; cv=none; b=xGdyjXdYv54/Nyom1Y4dtnf/ICFirkAMYhNSg1Y8/2r1i6JjVJ7yAJ0xMd6Xx5Cwfu/8L1 yQqKovCK7QwES565tTp/DEIZbwWq7eutAfBm6tep0OgVR8gJb+FotnMyXp2lkGWHIndhrR HoPhMN5a2XIzh8Z1sJw90S2UNB18bDsrIeBDMHgC6emztZMqkf6UZPOMzVjePXIszgSzXQ FvTHEQ+f55igiB9eqSdzFX49LQdeKldKTI6WwfJN0bijyJMfNYmLHbcPp+/VpW8RYfzatX HHSnlTAwE3eZ65FGfAVUZvSPSERIqnXiQ81d6zSjmK84H7PdQvw9wp4dwnYy5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0BtTLgtEU5hWeuJSZeHKaJ95qdZ6ihFkbMUCS2H96SY=; b=R85Nholy4pYurGfhG3eVMCpaxXALSb00FcrmrPo3N/G2GG1bDIA06P9ePYOHMhyxuehBnE JLPFtrlKifQdnpg9GnEm6dJCxnzxxmQU2s9fRNlq9EeYamHy1LyMHKXnir1BaMAjrlhKZh ChU+GgheitrSlzvqDmq3vomB3tm2EUCPXXc2rZlyGXmravfGaffQkpV0zkdj9PUjGlQjHH +qmPUn7Z6/3ifvLJfH067kB6Iki16JyK45MXdwwZDw4TSH7Qz+wMWb7KTqEwSw/hoi3r8r JXBEL8Gco9WPQTEHwOEPT9jxL9jyVRTse8pxErgKuxreIiwTdHmsigs5kIRWbg== 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 4Wby3j0S1XzSyk; Sat, 3 Aug 2024 22:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MQeTw026473; Sat, 3 Aug 2024 22:26:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MQeZA026470; Sat, 3 Aug 2024 22:26:40 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:26:40 GMT Message-Id: <202408032226.473MQeZA026470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 1593585b5ab0 - stable/14 - sctp: store vtag expire time as time_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1593585b5ab020dcca655cfbf2208e681a4bf4b6 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1593585b5ab020dcca655cfbf2208e681a4bf4b6 commit 1593585b5ab020dcca655cfbf2208e681a4bf4b6 Author: Michael Tuexen AuthorDate: 2024-05-10 18:25:04 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:26:10 +0000 sctp: store vtag expire time as time_t Reported by: Coverity Scan CID: 1492525 CID: 1493239 (cherry picked from commit 42aeb8d490fb7e8f4c9d27b3797179b861bd85e3) --- sys/netinet/sctp_pcb.c | 12 ++++++------ sys/netinet/sctp_pcb.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 69c492bc58df..b2cafdc2f81e 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4541,7 +4541,7 @@ sctp_del_remote_addr(struct sctp_tcb *stcb, struct sockaddr *remaddr) } static bool -sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, uint32_t now) +sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, time_t now) { struct sctpvtaghead *chain; struct sctp_tagblock *twait_block; @@ -4563,7 +4563,7 @@ sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, uint32_t now) } static void -sctp_set_vtag_block(struct sctp_timewait *vtag_block, uint32_t time, +sctp_set_vtag_block(struct sctp_timewait *vtag_block, time_t time, uint32_t tag, uint16_t lport, uint16_t rport) { vtag_block->tv_sec_at_expire = time; @@ -4578,13 +4578,13 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint16_t lport, uint16_t rport) struct sctpvtaghead *chain; struct sctp_tagblock *twait_block; struct timeval now; - uint32_t time; + time_t time; int i; bool set; SCTP_INP_INFO_WLOCK_ASSERT(); (void)SCTP_GETTIME_TIMEVAL(&now); - time = (uint32_t)now.tv_sec + SCTP_BASE_SYSCTL(sctp_vtag_time_wait); + time = now.tv_sec + SCTP_BASE_SYSCTL(sctp_vtag_time_wait); chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; set = false; LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { @@ -4596,7 +4596,7 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint16_t lport, uint16_t rport) continue; } if ((twait_block->vtag_block[i].v_tag != 0) && - (twait_block->vtag_block[i].tv_sec_at_expire < (uint32_t)now.tv_sec)) { + (twait_block->vtag_block[i].tv_sec_at_expire < now.tv_sec)) { if (set) { /* Audit expires this guy */ sctp_set_vtag_block(twait_block->vtag_block + i, 0, 0, 0, 0); @@ -6746,7 +6746,7 @@ sctp_is_vtag_good(uint32_t tag, uint16_t lport, uint16_t rport, struct timeval * return (false); } } - return (!sctp_is_in_timewait(tag, lport, rport, (uint32_t)now->tv_sec)); + return (!sctp_is_in_timewait(tag, lport, rport, now->tv_sec)); } static void diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index 5c6ead92bf9b..ade29fb3544d 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -130,7 +130,7 @@ struct sctp_block_entry { }; struct sctp_timewait { - uint32_t tv_sec_at_expire; /* the seconds from boot to expire */ + time_t tv_sec_at_expire; /* the seconds from boot to expire */ uint32_t v_tag; /* the vtag that can not be reused */ uint16_t lport; /* the local port used in vtag */ uint16_t rport; /* the remote port used in vtag */ From nobody Sat Aug 3 22:27:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wby4g6Zrpz5RS3c; Sat, 03 Aug 2024 22:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wby4g62Tdz4GSY; Sat, 3 Aug 2024 22:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6mxVyVv2yJx9zmkROf45fquch+pOAuTWOWlmQMm3os=; b=YpbV5mksarcrgSqOf0/d4c7ddiAYAOdRT4SjAnB/bFSgu40mNoCMqAvO4ALrLJOT8TYt4T SZb9ADEQcHVQ48uzPEq9GK2uoaZ2Oi4nlwz1CpyllFf2Rzx4yt+BUALvdZdKak3AmrHGMS 3bmoGhv3HO0Ene4ShpOlzuv4CupZafgrWyYMh/H1W5oJWDJfyHq9fuGOsDI1FuOcYl26MS WZ1yI4MjgWJ6q31374NgYdZDQO9e6ny5iM1eEcoyJZ/jrjCrIut5Drydw7Hov5xwBVi4nd fH285isVxOfXETtPYUIzJ08pDAgYAEV4sN6fwXqwYiAGXGQYVxIsh5T8fEKpYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724051; a=rsa-sha256; cv=none; b=t/JfU2xHY/ckPXMNeypVdKTfw2q1nUy5S6dcbfhWKuXhC0hkP/UnXuP5EzDoZIXH273iBV UT25DRFQsVgXTkTA6Q30wxEbiafxURyYds+Qu2rn6+zIfuSrd90Zh1ywVzHgI8Ht2PPWnA 0p1fpT7lkL+MHokkevp7dSGKBKLxB0RhbRf35g49wP8oGcgoGXVqzgP4Lw8RDpOO2p6yIB 9RR7crNvwSOsE9MIZiPzvSKpxuGgQ3khsfQ1lJSmlqD4dqfzFgUmdwcBWHirO9Oq5Q5IKR g56nFaHnFQjMWRWxXWcOcB+YrQeINuE/1FsR/b4YNKV1ZiK3vVZgnIivh0w8xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6mxVyVv2yJx9zmkROf45fquch+pOAuTWOWlmQMm3os=; b=XNpBlr8hZEYOSTEFAMB5vNf6zY52WguDJG4tdH+DYyCNtdIeKLxQsNemk5kp/MZMk9bBCd Q8Lxp0TxTTiXB/0OHqseWxHzup6zAHC3lfBG7Z3Sbffh4eELSM5S2D3KR6EK5stcvs28fv 390nmwhuvURfy4FOvhUKLanckaWUxAbuZbwEWI2q8udVRx00T23PVzMbzPPzPpPh4/xOcV MYVR45y/ZJ4eqTgLmSTCaxUFqF9l0GCWKAAnYICTRux89NdJcG7MC7tTMS2PKVKZmvLSiy rVRSJ1BMd+DLVTBSmzG4Pq7VRoZ+4fP3xzc9TtGMeMFCtY9GYT4HVC0uf1y8Lg== 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 4Wby4g5MZ9zVQM; Sat, 3 Aug 2024 22:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MRViP026712; Sat, 3 Aug 2024 22:27:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MRVfu026709; Sat, 3 Aug 2024 22:27:31 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:27:31 GMT Message-Id: <202408032227.473MRVfu026709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e1fb799d7d1a - stable/14 - sctp: store heartbeat creation time as time_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e1fb799d7d1a9e5122c7f55e21ae271341a63602 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e1fb799d7d1a9e5122c7f55e21ae271341a63602 commit e1fb799d7d1a9e5122c7f55e21ae271341a63602 Author: Michael Tuexen AuthorDate: 2024-05-10 18:40:15 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:27:00 +0000 sctp: store heartbeat creation time as time_t Reported by: Coverity Scan CID: 1493087 (cherry picked from commit b67716dd58b93f373523cf35373c56fcfad44b12) --- sys/netinet/sctp_header.h | 2 +- sys/netinet/sctp_output.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h index 9696c4e954ba..c9fd0341f83a 100644 --- a/sys/netinet/sctp_header.h +++ b/sys/netinet/sctp_header.h @@ -83,7 +83,7 @@ struct sctp_supported_addr_param { /* heartbeat info parameter */ struct sctp_heartbeat_info_param { struct sctp_paramhdr ph; - uint32_t time_value_1; + time_t time_value_1; uint32_t time_value_2; uint32_t random_value1; uint32_t random_value2; diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index c146bda95c7c..cc8d017aba16 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -11427,7 +11427,7 @@ sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked) /* Fill out hb parameter */ hb->heartbeat.hb_info.ph.param_type = htons(SCTP_HEARTBEAT_INFO); hb->heartbeat.hb_info.ph.param_length = htons(sizeof(struct sctp_heartbeat_info_param)); - hb->heartbeat.hb_info.time_value_1 = (uint32_t)now.tv_sec; + hb->heartbeat.hb_info.time_value_1 = now.tv_sec; hb->heartbeat.hb_info.time_value_2 = now.tv_usec; /* Did our user request this one, put it in */ hb->heartbeat.hb_info.addr_family = (uint8_t)net->ro._l_addr.sa.sa_family; From nobody Sat Aug 3 22:28:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wby5c4mcKz5RRsf; Sat, 03 Aug 2024 22:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wby5c49lcz4GtM; Sat, 3 Aug 2024 22:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUleuJXGCt9zKFLW9rVHaquyMDXIXoNj3QhT8LL8oZo=; b=GCMDlimvQn81Leo6K0xiuADZq+9yluQEFm1MPF4x4qISUVKgGYPfCFYdgrc3ZwcVyCt0zY /psMFtMQSrs242ZEwNUmUWd+70EhTqOrcVPBo41U8d5EzS0JR6qwTcgNgb/gIyiGmOThGB qH4psREVo6/5XXxbjzsvIXgWrvd1oYRjywkzsfdnoTXiyuqHdG/pqXKKhlpErNKmfd+ws9 UrEz5EiGkuuvoIMt+8Tc8Quq99kke5OZz7elPXhSSiw/9FTHNbXHY4/rOnrcE7omAJKZU6 KKA+75rdIApX6KV7O0cBXc6SWaTfzzu+FLM4FNfYExXrOOWP9H3GL91HAjMEvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724100; a=rsa-sha256; cv=none; b=prXNkSAbbJC0f7tClcq+6XO/kZKVwMXwBi5OAyhreeN1y+64kPZV/3PnVkRL0s49fwwTpo HoiWTEopbWRyr3se4k6XkThIBP7ZB9foH24ZoO1MMRLjRCBtzczMqQsNrr4acGRhO/cZHY 1JO23qCKqDMZ1yMYkrhBPQLFvwMiOqmFhpXEAuM6G4EGg433K+PuHUWNIkHwzhv9XwfiXF 2kAqlq/3VD0fUMYexRUVy7ZLAl4+RyyfcP24Fvk4lzBSgmGn13C5nKb1K9JkUb77ef/AOU S9mgzuH25YjTy46/Iy/WfFmSdmtyNq333jBhks6rBn9oAhp4TqcbcAWyOrfazQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUleuJXGCt9zKFLW9rVHaquyMDXIXoNj3QhT8LL8oZo=; b=xdjmxMCWRKRcp6Idr1ZjDEOfPqmMO0i3erFH/glGO8Afvu/TJ9UAjwpQJJX4TPn+KvaplF H4tmE7v6SXPwN3DmTREiLiUeGi7zkg52416DWjQnXtE1mPaVa4qTYqRB3tiiUCCf2Gd1Au jhRPPIh8k50fUQJGecP2xk1K3D6y0Ps9Uv7TOgRxfuntew1Ut7Gg1PslZPEibaTXmwSCQ0 qJ1b0RwiqMN2AMJF7vre7nvkEP0uMfTTgDi9laE1sMhl0XN5hRo5PoMYcBZqiEJtxVH2tV yiNDF+YxRrVghH6fi7pYqspjYdTeAKchjGL+eJvfv2K5BOnOd36YqgxG8w9tRw== 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 4Wby5c3dskzV5y; Sat, 3 Aug 2024 22:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MSK3F026937; Sat, 3 Aug 2024 22:28:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MSKBx026934; Sat, 3 Aug 2024 22:28:20 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:28:20 GMT Message-Id: <202408032228.473MSKBx026934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: fc40509e72ef - stable/14 - sctp: improve heartbeat timer computation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fc40509e72efe4f9249f48bbe48098690a709fb3 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=fc40509e72efe4f9249f48bbe48098690a709fb3 commit fc40509e72efe4f9249f48bbe48098690a709fb3 Author: Michael Tuexen AuthorDate: 2024-05-10 18:58:01 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:27:53 +0000 sctp: improve heartbeat timer computation PR: 278666 Reviewed by: Albin Hellqvist Pull Request: https://reviews.freebsd.org/D45107 (cherry picked from commit 5120ea0d8871fd5d56a8fb70117b727b9d8a4e62) --- sys/netinet/sctputil.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index e963c5cb466e..fd11a7ece5b7 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -2289,19 +2289,19 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, } else { to_ticks = net->RTO; } - rndval = sctp_select_initial_TSN(&inp->sctp_ep); - jitter = rndval % to_ticks; - if (to_ticks > 1) { - to_ticks >>= 1; - } - if (jitter < (UINT32_MAX - to_ticks)) { - to_ticks += jitter; - } else { - to_ticks = UINT32_MAX; - } if (!((net->dest_state & SCTP_ADDR_UNCONFIRMED) && (net->dest_state & SCTP_ADDR_REACHABLE)) && ((net->dest_state & SCTP_ADDR_PF) == 0)) { + if (to_ticks > 1) { + rndval = sctp_select_initial_TSN(&inp->sctp_ep); + jitter = rndval % to_ticks; + to_ticks >>= 1; + if (jitter < (UINT32_MAX - to_ticks)) { + to_ticks += jitter; + } else { + to_ticks = UINT32_MAX; + } + } if (net->heart_beat_delay < (UINT32_MAX - to_ticks)) { to_ticks += net->heart_beat_delay; } else { From nobody Sat Aug 3 22:32:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbyB935Flz5RSdH; Sat, 03 Aug 2024 22:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbyB92f7kz4HCt; Sat, 3 Aug 2024 22:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOXkTCY6HIKMaMEd+QSvXN1CMoo3XGGXAVoS+R0qSek=; b=S5BUoKQdiqOFiO8k479MyAbZ/nTRZex5piNeOFUUxCxGSHrpTB80yHZlC8NYMT4v+EBZgV 3tcfcMs3XcCexBL71QXHf5KY+BYN5Caj+q40qsepbcwCGFgE4HzllCSNGhXlWJTAQVIg+1 p7OEkeJ3OT6K+8oxQvsLiOT7soSxm90fbERlkjceqpIeMdXd25veF7yeEchimhuT+fJaCt kvibx6kOHuIfQGKPIZ3eBMPfdZEwBkYqcXumP5Ayw/H8WhU3HbXMoSx5GGiXltnB2KkFWq KiwXWckMmmIJUp4wSXaKKDMpUXFSccDa9emuuAN28TzcWFn+WSKJ8rFyoGp+RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724337; a=rsa-sha256; cv=none; b=Y23O8rINf8VBUw/cV/8DExZmfAKwSGkdH5PGqLG9g7N69bgyHbRMFlZOWRVvPdzCOfs+e+ imwkOX0+k16vKYEQ0nU17XMQTSh7soGTLMQyM02FFRn6B+W6YI/8Qz74HHOnKaDKtPIRRw FG7OvGwFCUW+by13DC4qXeOCSbT+vyYHZU7xDYrdTwZUxAUt2LdyOtD+mp1GcHjl1zOVLn sX/w8OJ0gR1eh1QG0gYZlg0qjT1yzPLCkaBvROCqHJQwUjRO07YZDpQrfYcED8Sg2t8F5e N7fk5XHVIC6P+QDJTQsuvPYUwR5kzkFJ37B3rKAq6D838lqpW1MF17xAcSKDHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOXkTCY6HIKMaMEd+QSvXN1CMoo3XGGXAVoS+R0qSek=; b=wRxJEtY9iaOsTSKa6ltrZf8Mc7rOJOTnIkL8tGAfK5Gkkig6B01a+sMY2BiS8CdgFFTd3n w30RDzs0+YNOxXh8+uzJIm1D5W4G9h6Ni1ADAPki4rOZMM46LcG6qtnsiccFcKrjLQ0sWl dAUJWsb4FFNwhnW+MPysHrr/UAPPN6IRBG7tyOSNbobduHVe+WWYtXlwPZkzRBGRAZb7K1 qxgaSkx565Lcm2UW+o7ou43aTcAnIUs1lG7nXvnu7HW5HnpqOXZMZqy2YfrN1aiRf+TIrJ cn62I6v88RHETy+cx1H/UpyfSZSmC6p0v3aP1eH62YI21H3VOc0nNtXAOt6OaQ== 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 4WbyB92FgCzW8j; Sat, 3 Aug 2024 22:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MWHwe041581; Sat, 3 Aug 2024 22:32:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MWHim041578; Sat, 3 Aug 2024 22:32:17 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:32:17 GMT Message-Id: <202408032232.473MWHim041578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e4a4ca83df2c - stable/14 - blackhole.4: improve man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e4a4ca83df2c46407086fbc0cf695b4f18088f7c Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e4a4ca83df2c46407086fbc0cf695b4f18088f7c commit e4a4ca83df2c46407086fbc0cf695b4f18088f7c Author: Michael Tuexen AuthorDate: 2024-05-22 18:36:24 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:31:59 +0000 blackhole.4: improve man page Not the connection is dropped, but the incoming SYN segment. Reviewed by: concussious.bugzilla_runbox.com Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45296 (cherry picked from commit a45a9e61b498393b05f3e1e2e3e6131c7b484dc4) --- share/man/man4/blackhole.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 00c8e3d7a2b6..090f330a6ed8 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd November 3, 2021 +.Dd May 22, 2024 .Dt BLACKHOLE 4 .Os .Sh NAME @@ -51,7 +51,7 @@ when unexpected packets are received. .Ss TCP Normal behaviour, when a TCP SYN segment is received on a port where there is no socket accepting connections, is for the system to return -a RST segment, and drop the connection. +a RST segment, and drop the incoming SYN segment. The connecting system will see this as a .Dq Connection refused . From nobody Sat Aug 3 22:33:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbyCQ1Wm3z5RSc1; Sat, 03 Aug 2024 22:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbyCQ0x3Jz4Hpp; Sat, 3 Aug 2024 22:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zmwQW6nOClf/X4gD6MXpL+h2D5NUIQgEJ4XXMw316Eo=; b=ZtdkPpev7I4tt5GdVweKSaJfNV6mk5illUiu98WVcDRGI9yxhtJcQPC2vdwTWsf1AZ8Vxs OymWpeDKsCcV8ugGG4jl9QUKvfKo67x6VR3VzQI26ZrwDsTw7mUX4ZT3YW2dDmMBmzsgSh iXMPXP0DxO7P9K+Gxj6mHH8HFZYgzVSPVc7ptBqjHMbrAzJud4AVQIuSy27OaHitME2qwu HkdmCfz8DAp+sI7B90y+sTUcvOq6hRPc24iJgQfj9k7Fv86SdEeDPpqReOimU1B/uDvVGj nWWfo27inEEeRiJ/hQRnLYE6yQ5QNhFcoeizJTFF7zRzIhQBA8WfhYJyGrsBmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724402; a=rsa-sha256; cv=none; b=VSod3XArhuVynQAksgKbP4cKR9F272327Qgs3qu2Quv4YKrRiIL05146rxWDN2YAhPVGqn KiTs7XIWDzJYI37GQhWxdJ3Bcb1KvqylIzL+lTusXvu/dsaywiXwpty8id79CvyRDDwbRo 6zWykfAG+ciYBqmdnV3MYg4INZ+FAMTwWjFkrI8YGMTQcGinLxJ7N4MK4Iz8iZI35eJV7W Q3NgaLBpiOJWyStATg3dgG5mt/hDUY8BOHVvENoizLV9/lqrwVdMTG/Umx3SElA5q6K6Z/ BPLIXFQW3EgSxsBvft13VqiHka5IRQb4dabaGNryceBLs2ORw1K4wt7gXRpw5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zmwQW6nOClf/X4gD6MXpL+h2D5NUIQgEJ4XXMw316Eo=; b=Knq1puVgUmzfb4FmDd6vsZy3bmUS4iEGYC68v2yvKMLyErqpIURsL9OsBeK0Mteths0GAC ZpJEbOu6s5BU2Spel+biWNeigqS8xRG0W3HS+mXn01AmnNHJl7R/JtHzM1b8ZzfUpmBioP ihPGz3P1fMbEJ9wycnHVSCC3BLgP+LEQNAboSaNGLjEp4NsZVrxKeRTQYiUP6+S+6zDeP9 30NMhTFmv6RuLP7D15Tumu42unI0RL24TdwgTXPq4YujNuNP/1jjpZlhNB2KRC1r5tBKym NAEm83H47Oy1owOBDNJwgkwhKqDO+IJ9Wc3cGC9bNTguyFNu0ATQPtjtWh0//g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WbyCQ0QD9zWFk; Sat, 3 Aug 2024 22:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MXLIv042763; Sat, 3 Aug 2024 22:33:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MXL6C042760; Sat, 3 Aug 2024 22:33:21 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:33:21 GMT Message-Id: <202408032233.473MXL6C042760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: d48fcf99c450 - stable/14 - tcp: improve inp locking in setsockopt List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d48fcf99c4504b52f8ade5f7d47bfe67920f6e35 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d48fcf99c4504b52f8ade5f7d47bfe67920f6e35 commit d48fcf99c4504b52f8ade5f7d47bfe67920f6e35 Author: Michael Tuexen AuthorDate: 2024-05-23 20:14:27 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:32:45 +0000 tcp: improve inp locking in setsockopt Ensure that the inp is not dropped when starting a stack switch. While there, clean-up the code by using INP_WLOCK_RECHECK, which also re-assigns tp. Reviewed by: glebius Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45241 (cherry picked from commit fe136aecc2a0ae9d9cc5f78b2d1430cd33b6b7c4) --- sys/netinet/tcp_usrreq.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index f65b09f17a5f..a76a185474df 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1696,11 +1696,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) default: return (error); } - INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - INP_WUNLOCK(inp); - return (ECONNRESET); - } + INP_WLOCK_RECHECK(inp); } else if (sopt->sopt_name == TCP_FUNCTION_BLK) { /* * Protect the TCP option TCP_FUNCTION_BLK so @@ -1715,8 +1711,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) if (error) return (error); - INP_WLOCK(inp); - tp = intotcpcb(inp); + INP_WLOCK_RECHECK(inp); blk = find_and_ref_tcp_functions(&fsn); if (blk == NULL) { From nobody Sat Aug 3 22:34:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbyDd4nDpz5RSmh; Sat, 03 Aug 2024 22:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbyDd4Dv3z4Hp0; Sat, 3 Aug 2024 22:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9w41sC7p7FcWq6myO8jS9/8LdMADZ49Sd6IJq9HgPtw=; b=Lg0l/YdmUm/IddAtfZcWzIEvVtQrMUE1F7LEbJYkCKZqimAn5Q7JWDuESi6+AxUTPrLSZ0 7ooOJGJK57tfQM+giA2vg5fFfzunLxISh18Q8jSBUANo25efX9FYhIQuDRkRGQrR79zFOP 3/p2DbbvHw1aeuMIZPGpu8D5EuHMmX7tdySM7kLO1agzTThdDHJbik+tBW9Lwl/wkN8tei XNmlxvzeBjwFb8lDRhleojUFe60re0wV2SD7L/mDqqnU2Sr16ogjKrpxe1uzRiegtiCihW e5Hrg9kmZ7ErAy5TItkb7A3L8At6jfWIl/jE2uR1Oa2hW18prdd4LZ692sseQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724465; a=rsa-sha256; cv=none; b=h+2vBTGskLeog7rFDtZ8vbuy5/WmqTB91IxKFMQMwAU9ASsCvZwcV7RLW6loHcTa4diauJ 5V3r7Q8hKumq8FA1HQTpemepQ2EUQCOpqE6hUrz4B5HrxFIecyfKlK53JulKjIBzSXGVkH 5Hb4TgNWdIg4SytyEy/p6mKG/yXfyCEhtEG6/EMpXX7BmwKhkYz6l66BYsLh9VIp5cRl92 2ekDJNGs+LhZNv8p40UZqeK+NWFC9TO8874tx8x10YwGIy9DmBBr4AxUPzO8Ab2hYaleFz AXsk4AKbdkT/96L6pYFnTbCr08rcUe3hAlFkB28EsgV+uMKPSxjUeE88AdLL/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9w41sC7p7FcWq6myO8jS9/8LdMADZ49Sd6IJq9HgPtw=; b=Z54wj6NoUEd9R0J1h47uSyun9+dtu3TzJncEnYPCrMgcTidm1VB9+1fARdpC4Pxr+l4sGO uJqRbievvjWbTebmbJIDLyUhQJvomG2NDuYQlX+zfPTklbriBs+/0e5vPVrPKJDf2TDsFs 22ssC5YFMTWo1oZXx2XSM5tRCjEVj+lPD67QbUINbWO8rR5yt9P9CvMXZCQAdg+1UCauPu umnYVCpHMaz4YaQnvegyRIIowA5DN+d8o0M7IzfXcInNiVrnGkOHKVeuY0ACnyKONknwX4 UbN1ZIDKifJ+wdD9s+szkwtKeyVmDqclswyQOEv8K2PkEeM5md+5TxyCzGwB6Q== 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 4WbyDd3ljxzTD8; Sat, 3 Aug 2024 22:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MYPY0043028; Sat, 3 Aug 2024 22:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MYPNa043025; Sat, 3 Aug 2024 22:34:25 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:34:25 GMT Message-Id: <202408032234.473MYPNa043025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f0697703dd79 - stable/14 - tcp: improve blackhole support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f0697703dd7987158c0b98f89ba7d32a6a089a04 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f0697703dd7987158c0b98f89ba7d32a6a089a04 commit f0697703dd7987158c0b98f89ba7d32a6a089a04 Author: Michael Tuexen AuthorDate: 2024-05-24 04:59:13 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:33:43 +0000 tcp: improve blackhole support There are two improvements to the TCP blackhole support: (1) If net.inet.tcp.blackhole is set to 2, also sent no RST whenever a segment is received on an existing closed socket or if there is a port mismatch when using UDP encapsulation. (2) If net.inet.tcp.blackhole is set to 3, no RST segment is sent in response to incoming segments on closed sockets or in response to unexpected segments on listening sockets. Thanks to gallatin@ for suggesting such an improvement. Reviewed by: gallatin Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45304 (cherry picked from commit 02d15215cef2a28f1865e6ad5b19f18af1398b8b) --- share/man/man4/blackhole.4 | 10 +++++++--- sys/netinet/tcp_input.c | 43 +++++++++++++++++++------------------------ 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 090f330a6ed8..bb955fd4497d 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd May 22, 2024 +.Dd May 25, 2024 .Dt BLACKHOLE 4 .Os .Sh NAME @@ -21,7 +21,7 @@ MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connectio attempts .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" -.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2" +.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" .Cd sysctl net.inet.tcp.blackhole_local Ns Op = Ns Brq "0 | 1" .Cd sysctl net.inet.udp.blackhole Ns Op = Ns Brq "0 | 1" .Cd sysctl net.inet.udp.blackhole_local Ns Op = Ns Brq "0 | 1" @@ -30,7 +30,8 @@ The .Nm .Xr sysctl 8 MIB is used to control system behaviour when connection requests -are received on SCTP, TCP, or UDP ports where there is no socket listening. +are received on SCTP, TCP, or UDP ports where there is no socket listening +or unexpected packets are received on listening sockets. .Pp The blackhole behaviour is useful to slow down an attacker who is port-scanning a system in an attempt to detect vulnerable services. @@ -61,6 +62,9 @@ is merely dropped, and no RST is sent, making the system appear as a blackhole. By setting the MIB value to two, any segment arriving on a closed port is dropped without returning a RST. +Setting the MIB value to three, any segment arriving on a closed port +or an unexpected segment on a listening port is dropped without sending a +RST in reply. This provides some degree of protection against stealth port scans. .Ss UDP Enabling blackhole behaviour turns off the sending diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 2894b6fcf658..a45eb3201f7e 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -911,23 +911,6 @@ findpcb: log(LOG_INFO, "%s; %s: Connection attempt " "to closed port\n", s, __func__); } - /* - * When blackholing do not respond with a RST but - * completely ignore the segment and drop it. - */ - if (((V_blackhole == 1 && (thflags & TH_SYN)) || - V_blackhole == 2) && (V_blackhole_local || ( -#ifdef INET6 - isipv6 ? !in6_localaddr(&ip6->ip6_src) : -#endif -#ifdef INET - !in_localip(ip->ip_src) -#else - true -#endif - ))) - goto dropunlock; - rstreason = BANDLIM_RST_CLOSEDPORT; goto dropwithreset; } @@ -1406,15 +1389,27 @@ tfo_socket_result: return (IPPROTO_DONE); dropwithreset: + /* + * When blackholing do not respond with a RST but + * completely ignore the segment and drop it. + */ + if (((rstreason == BANDLIM_RST_OPENPORT && V_blackhole == 3) || + (rstreason == BANDLIM_RST_CLOSEDPORT && + ((V_blackhole == 1 && (thflags & TH_SYN)) || V_blackhole > 1))) && + (V_blackhole_local || ( +#ifdef INET6 + isipv6 ? !in6_localaddr(&ip6->ip6_src) : +#endif +#ifdef INET + !in_localip(ip->ip_src) +#else + true +#endif + ))) + goto dropunlock; TCP_PROBE5(receive, NULL, tp, m, tp, th); - - if (inp != NULL) { - tcp_dropwithreset(m, th, tp, tlen, rstreason); - INP_UNLOCK(inp); - } else - tcp_dropwithreset(m, th, NULL, tlen, rstreason); + tcp_dropwithreset(m, th, tp, tlen, rstreason); m = NULL; /* mbuf chain got consumed. */ - goto drop; dropunlock: if (m != NULL) From nobody Sat Aug 3 22:35:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbyFT5VXBz5RScJ; Sat, 03 Aug 2024 22:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbyFT4nRTz4JB6; Sat, 3 Aug 2024 22:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCwL4gjCLjbewp1ZZwEOO1KdEkl7CpU1v0pE717T4YY=; b=Z58/7esG0/UBgSMag1ZqmVa/kMSDz/fxcKGA7Vcsk6lPUDRlbNx6kGvjLuV3kadr8GXSuw 760SoE6Kuy0YHOItBDPhyO0OHpWnhJUoNtLnqBqA4/1jXzj+MxIfZi7FGFP5XJTvgMOdBX ALoLMxEt8NxeyYpDawdWs0nahbOxYsiUiZmztwhXHPuaqC3fN12gnU9STJjEqUEirtju5T KPDzMxRryyncSXWVGLpigDgBpW1hDYBwdA7pz6LkkFPNqIEyN5jigMs4h10WxGTEt/8Nzp 79sqxshlMPObvX9k5eQGWzpznA3k+w/WmFRC+XWBkmWHC5q7GqwW/D7IFfMOOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724509; a=rsa-sha256; cv=none; b=AniPbe+KkcpJ4YdUWcBYvi860ukAoA/LQY87q/rK8gBe4emr16x//yXclrdWESX8Dh0S1w rRCC8SW77YuPeJtGua7qTifeR/Lzm9wdxyTW4WOLDQ/IVzLVMgnctAIRCWpb4XEvywbTfZ nwI4tX05lBWk3NJ4gKcje0fy8563i16yvbDCVvQ9wuDWvzAZj7u35Sl7zC/POMurVgc5Cx 0g16dxc6luJ+CTGp5V9TssspB0VE5bgB9jbu22GVBIQocZikXFN/T5zyZpgeMvGmuNmyIA WIZ/zyCoawJyU0lFCkG+oFg35JLVQgmgFBcdPjqQELutV0Gp1TuSwDIbF4vzQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCwL4gjCLjbewp1ZZwEOO1KdEkl7CpU1v0pE717T4YY=; b=ZJhBxwxYROTvnUR05jmtKTu+EWnNnxtnmrtBqQknXC1H1GcwScQMe96c7ZAMeuXMBrAxdP 64TZ46PEl3JV4i1CqUnd0rpTQiwmz+TL8nDOvO4NTyAviZ+hi1N67bKR0mehqN8xFJ9rVR xLlv5/N8ZY/b50SGE1TaayIcO9jT20QQqr4VI0I3zqZA7K1l33x74ASs63DDvz23RJl4sB ZH+229bOFEN1JriezWTzVnAKLQ/EFtBlQ0nIGuVZ778wHWliOlO6UE/ldRoy/OKJT6I3RO ckrb7YIfLAHX7gXq3ZRp7zdxBi8fr837UuNk6tSnSdEIj3U5eGiI35qd27FASw== 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 4WbyFT4DVMzWCF; Sat, 3 Aug 2024 22:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MZ987043299; Sat, 3 Aug 2024 22:35:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MZ9lG043296; Sat, 3 Aug 2024 22:35:09 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:35:09 GMT Message-Id: <202408032235.473MZ9lG043296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 205157fafc25 - stable/14 - tcp: fix sending RST after second inp lookup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 205157fafc25f6711ef3670255f9ea328c344758 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=205157fafc25f6711ef3670255f9ea328c344758 commit 205157fafc25f6711ef3670255f9ea328c344758 Author: Michael Tuexen AuthorDate: 2024-05-25 17:46:33 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:34:38 +0000 tcp: fix sending RST after second inp lookup When we first find an inp, we set also the tp. If then a second lookup is necessary, the inp is recomputed. If this fails, the tp is not cleared, which resulted in failing KASSERT. Therefore, clear the tp when staring the inp lookup procedure. Reported by: Jenkins Fixes: 02d15215cef2 ("tcp: improve blackhole support") Sponsored by: Netflix, Inc. (cherry picked from commit df9de82f54d13aa077889349e15d9bf7794a1e6f) --- sys/netinet/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a45eb3201f7e..133818b73a1d 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -829,6 +829,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port) ((thflags & (TH_ACK|TH_SYN)) == TH_SYN ? INPLOOKUP_RLOCKPCB : INPLOOKUP_WLOCKPCB); findpcb: + tp = NULL; #ifdef INET6 if (isipv6 && fwd_tag != NULL) { struct sockaddr_in6 *next_hop6; From nobody Sat Aug 3 22:47:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbyWR4sdPz5RTNj; Sat, 03 Aug 2024 22:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbyWR3z91z4Jkl; Sat, 3 Aug 2024 22:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Evwz4XfSh6Jexlg8AxIImyIJMmdNdgNO2XtQmWivWpM=; b=rG1ZHz7QK/vd6TjB7Rk/zsjLqZ9R8aIAM+3/E2fhankOIZW6okYAordo9uiQ+9rHhEAOO7 waobbeerBsaEBdDFyhQsMoB2raQOgUtWOUULRQMepkA2dW+rolLcD5VM/VYhhrgDPiFagt vEyXAg3663Os6YinVHGN7/0UaSeYmP496GV4mbeVhRvk7fhOxqdKBE6AdGNoCvsPtvzeb8 G9+9o272PE7CHT0FnFWBZatCvOAgYZlc+FVcfjm778CTJErxUVTsl/A37zCAd9aCdCkyxr 3nAB/MX3kXtd19T+brRicmZg/4P7nZVMjFG/X6aDUSiNV4HdwIVa60Y5fx0v/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722725235; a=rsa-sha256; cv=none; b=IwJOFEs/XLVxXyZjqEg+AHvVG9AegDl7mLn8HqFreqk3bxJQM0Psl3DaETmFtqhsAfOY3H 32evT4a8Jf0Cr6ixeLyoeNjVhpFEKuPsUDW+wrl/LMrEG5iw3RQ6TQtu7T2UwR9AYN23fp Xc2yRlvKkE7gVr07XA091yy2hHAtSlpIa8x29KdJ3ESsVaunsjLkwmV9nTayclusFf5p6g Qnky29KeAw30wHP2GMvAlWLIZEZWTkL8JTjIvNcxyJBO6i7dVoFS3S58OEnzuLCsZAZYri nFoiYOSVql5+Xa+X1aTjMeuUGl9bPmbkLQHlxOhFIxLH1C871Lb0k2UlrkXx7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Evwz4XfSh6Jexlg8AxIImyIJMmdNdgNO2XtQmWivWpM=; b=VwrPr/uV37DCYmY63GflUwAli00OTJsW0mnaoDiZeXmsrFg6uN1FZOVQP/BLfe+qxWJT9+ K5+kRLhlx7vewWG5BBxd0bwipjquAm4Sd8CDBJnN5mgcYIB9CFRFkaFcUJWPGeaGb5a21S X6542RFICEVtDDWzw60WSl6HDFLpjJIAu9sk6jUtansKMPApjtf6LrxruvaNdZCmK8eKgr xlhvoBfvPT+e10EAGW2VP+2XmZIYeid4XgdCOWJ5xFj2hkA4SaY4CyqO/kjnQhqqil6YQo ezsPkcKMNw7Vd5bbr6tXqhKfvWwSMmZXcT4yriDEjP+jbh8PFOkN9wjBa6BbkQ== 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 4WbyWR3YXNzWCl; Sat, 3 Aug 2024 22:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MlFc4060351; Sat, 3 Aug 2024 22:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MlFpX060348; Sat, 3 Aug 2024 22:47:15 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:47:15 GMT Message-Id: <202408032247.473MlFpX060348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 808fb2711f0c - stable/14 - tcp: simplify stack switching protocol List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 808fb2711f0cad41decf5b18419cb9294c5ac062 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=808fb2711f0cad41decf5b18419cb9294c5ac062 commit 808fb2711f0cad41decf5b18419cb9294c5ac062 Author: Michael Tuexen AuthorDate: 2024-06-06 06:29:05 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:45:32 +0000 tcp: simplify stack switching protocol Before this patch, a stack (tfb) accepts a tcpcb (tp), if the tp->t_state is TCPS_CLOSED or tfb->tfb_tcp_handoff_ok is not NULL and tfb->tfb_tcp_handoff_ok(tp) returns 0. After this patch, the only check is tfb->tfb_tcp_handoff_ok(tp) returns 0. tfb->tfb_tcp_handoff_ok must always be provided. For existing TCP stacks (FreeBSD, RACK and BBR) there is no functional change. However, the logic is simpler. Reviewed by: lstewart, peter_lei_ieee_.org, rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45253 (cherry picked from commit 86c9325d341fc3f39543bcfaf7c3bb3ceeacbe5d) --- share/man/man9/tcp_functions.9 | 45 ++++++++++++++---------------------------- sys/netinet/tcp_subr.c | 12 +++++------ sys/netinet/tcp_usrreq.c | 27 ++++++------------------- sys/netinet/tcp_var.h | 11 ++++------- 4 files changed, 30 insertions(+), 65 deletions(-) diff --git a/share/man/man9/tcp_functions.9 b/share/man/man9/tcp_functions.9 index eb9b299eae9e..1e0616e03a9f 100644 --- a/share/man/man9/tcp_functions.9 +++ b/share/man/man9/tcp_functions.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 10, 2017 +.Dd June 6, 2024 .Dt TCP_FUNCTIONS 9 .Os .Sh NAME @@ -176,9 +176,10 @@ struct tcp_function_block { uint32_t, u_int); int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t); void (*tfb_tcp_timer_stop)(struct tcpcb *, uint32_t); - /* Optional functions */ + /* Optional function */ void (*tfb_tcp_rexmit_tmr)(struct tcpcb *); - void (*tfb_tcp_handoff_ok)(struct tcpcb *); + /* Mandatory function */ + int (*tfb_tcp_handoff_ok)(struct tcpcb *); /* System use */ volatile uint32_t tfb_refcnt; uint32_t tfb_flags; @@ -261,37 +262,21 @@ However, care must be taken to ensure the retransmit timer leaves the TCP control block in a valid state for the remainder of the retransmit timer logic. .Pp -A user may select a new TCP stack before calling -.Xr connect 2 -or -.Xr listen 2 . -Optionally, a TCP stack may also allow a user to begin using the TCP stack for -a connection that is in a later state by setting a non-NULL function pointer in -the +A user may select a new TCP stack before calling at any time. +Therefore, the function pointer .Va tfb_tcp_handoff_ok -field. -If this field is non-NULL and a user attempts to select that TCP stack after -calling -.Xr connect 2 -or -.Xr listen 2 -for that socket, the kernel will call the function pointed to by the +field must be non-NULL. +If a user attempts to select that TCP stack, the kernel will call the function +pointed to by the .Va tfb_tcp_handoff_ok field. The function should return 0 if the user is allowed to switch the socket to use -the TCP stack. -Otherwise, the function should return an error code, which will be returned to -the user. -If the -.Va tfb_tcp_handoff_ok -field is -.Dv NULL -and a user attempts to select the TCP stack after calling -.Xr connect 2 -or -.Xr listen 2 -for that socket, the operation will fail and the kernel will return -.Er EINVAL . +the TCP stack. In this case, the kernel will call the function pointed to by +.Va tfb_tcp_fb_init +if this function pointer is non-NULL and finally perform the stack switch. +If the user is not allowed to switch the socket, the function should undo any +changes it made to the connection state configuration and return an error code, +which will be returned to the user. .Pp The .Va tfb_refcnt diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 0ba35ea13130..afa2dc2a3a95 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -559,8 +559,7 @@ tcp_switch_back_to_default(struct tcpcb *tp) tfb = NULL; } /* Does the stack accept this connection? */ - if (tfb != NULL && tfb->tfb_tcp_handoff_ok != NULL && - (*tfb->tfb_tcp_handoff_ok)(tp)) { + if (tfb != NULL && (*tfb->tfb_tcp_handoff_ok)(tp)) { refcount_release(&tfb->tfb_refcnt); tfb = NULL; } @@ -594,11 +593,9 @@ tcp_switch_back_to_default(struct tcpcb *tp) /* there always should be a default */ panic("Can't refer to tcp_def_funcblk"); } - if (tfb->tfb_tcp_handoff_ok != NULL) { - if ((*tfb->tfb_tcp_handoff_ok) (tp)) { - /* The default stack cannot say no */ - panic("Default stack rejects a new session?"); - } + if ((*tfb->tfb_tcp_handoff_ok)(tp)) { + /* The default stack cannot say no */ + panic("Default stack rejects a new session?"); } if (tfb->tfb_tcp_fb_init != NULL && (*tfb->tfb_tcp_fb_init)(tp, &ptr)) { @@ -1229,6 +1226,7 @@ register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, if ((blk->tfb_tcp_output == NULL) || (blk->tfb_tcp_do_segment == NULL) || (blk->tfb_tcp_ctloutput == NULL) || + (blk->tfb_tcp_handoff_ok == NULL) || (strlen(blk->tfb_tcp_block_name) == 0)) { /* * These functions are required and you diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index a76a185474df..4e754965487b 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1724,32 +1724,17 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) INP_WUNLOCK(inp); return (0); } - if (tp->t_state != TCPS_CLOSED) { - /* - * The user has advanced the state - * past the initial point, we may not - * be able to switch. - */ - if (blk->tfb_tcp_handoff_ok != NULL) { - /* - * Does the stack provide a - * query mechanism, if so it may - * still be possible? - */ - error = (*blk->tfb_tcp_handoff_ok)(tp); - } else - error = EINVAL; - if (error) { - refcount_release(&blk->tfb_refcnt); - INP_WUNLOCK(inp); - return(error); - } - } if (blk->tfb_flags & TCP_FUNC_BEING_REMOVED) { refcount_release(&blk->tfb_refcnt); INP_WUNLOCK(inp); return (ENOENT); } + error = (*blk->tfb_tcp_handoff_ok)(tp); + if (error) { + refcount_release(&blk->tfb_refcnt); + INP_WUNLOCK(inp); + return (error); + } /* * Ensure the new stack takes ownership with a * clean slate on peak rate threshold. diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 1dc40c790b3e..b8278bbf2644 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -548,13 +548,10 @@ typedef enum { * stop_all function that loops through and calls * tcp_timer_stop() with each of your defined timers. * - * Adding a tfb_tcp_handoff_ok function allows the socket - * option to change stacks to query you even if the - * connection is in a later stage. You return 0 to - * say you can take over and run your stack, you return - * non-zero (an error number) to say no you can't. - * If the function is undefined you can only change - * in the early states (before connect or listen). + * tfb_tcp_handoff_ok is a mandatory function allowing + * to query a stack, if it can take over a tcpcb. + * You return 0 to say you can take over and run your stack, + * you return non-zero (an error number) to say no you can't. * * tfb_tcp_fb_init is used to allow the new stack to * setup its control block. Among the things it must From nobody Sat Aug 3 22:49:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbyYh3PTQz5RTtp; Sat, 03 Aug 2024 22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbyYh2svCz4KGr; Sat, 3 Aug 2024 22: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=1722725352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c+HQKXqMU4JP4RuEz//xs7x/CqgKvSGSqC2hgyA1KgE=; b=mH+o7ymRK08CENNqvDeRC/lYO16tiPEzgme+5SXoO/bzIPEGYpFUSChqvwgkp0q9FinH6s e1Yix0ye5s/0LDkk6gxhtmakjqBwFlkGVp0COmCAKtQlizSOVpXTTL2y7dkJ8cvqmryIsZ Oi8VAf7z8/Xp/g3celcCdJPHw5expvyqR7gtMxlA1L4Wno3KQoNFfpNUJklM2/NV84wR/M ADT7U6vqBZL5nyd3DhKWYQUPSyrTtgizq1VOzuXf6T5sxhFPHbh4aMcR3aCmHrUKGD0cgV bljYAD7VQ+EFhOpFjnEYkDh21vfUbt47/lrWNFTe/nLWJ7BPZauEWjhRHPm+zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722725352; a=rsa-sha256; cv=none; b=O3n+vJzrAUR8QQIVmTgsVLwAnqlR9HgkRhkQ5QGGYjiE0jWYgZUqMZXIgUlL5+nln8rxqX l3kQ6KG5a59X92q2lwpy35zNqrVE4z7hTcpl8n170l1KHgEz3Epyp8080MmxZoi4MwlOyW soiYoTu/bJXtRo/GCUlJRL4yEskoRMKryyqctPaMstaucdpYG1P7qWNOyzAY8sYVW/BHrE 3fuQZ/zhF5VgOonr58au0PKbxQOSOQPgZO8YMXRWoSLBHPke97xe6FImhIm9B36+0qzEi2 Mrs7y7QeeL65yNiMsly05ahzF/7QEJJt0qAuE8b08CPrU8KDoQj69lXPJjBv9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c+HQKXqMU4JP4RuEz//xs7x/CqgKvSGSqC2hgyA1KgE=; b=qnzrsNee0baDkKf0ctfsvrNziolQXG0KRZD7wjXO4niea0TuUbfmqG86C0fDfBm4BR9sZH vxa6CCtsa4gwp4AWIIAH1wc6bBgoEtjc/16VyAZEV2FBrVgB1PLlEpAbysA1pVXSxYKx78 iug6KQR368P2Fp7pzW0pcgkVPsaCoLhqKM4o0sPqLACtHFL/oAetjjFoG1KC/cjJRpac3s WnygSCS5B4nXCMUD7E+YVkgv7bjDcZLSDYV8MP9qtkksM7me88Tq8tf/B62NmjYkRDjcTp 29ZscGMKVCEkGNAhpcOO/LvfZGAy3RfDIzAYMFZn5Lr49IL9nn2C9iYcDxhMGw== 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 4WbyYh2LXLzWJb; Sat, 3 Aug 2024 22:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MnCpD060761; Sat, 3 Aug 2024 22:49:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MnCGx060758; Sat, 3 Aug 2024 22:49:12 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:49:12 GMT Message-Id: <202408032249.473MnCGx060758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 90ddea70e0b4 - stable/14 - lo: update man page since SCTP checksum offloading is supported List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 90ddea70e0b493300181dc0f6190ff0497cc7b77 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=90ddea70e0b493300181dc0f6190ff0497cc7b77 commit 90ddea70e0b493300181dc0f6190ff0497cc7b77 Author: Michael Tuexen AuthorDate: 2024-06-23 11:27:54 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:48:53 +0000 lo: update man page since SCTP checksum offloading is supported The loopback interface supports SCTP checksum offloading in addition to TCP and UDP. Reviewed by: gbe Differential Revision: https://reviews.freebsd.org/D45698 (cherry picked from commit 60117f9ee58e202be55a8af5bb6b6c768e7a940e) --- share/man/man4/lo.4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/lo.4 b/share/man/man4/lo.4 index 7bc806e5a005..f1ac67c7d7db 100644 --- a/share/man/man4/lo.4 +++ b/share/man/man4/lo.4 @@ -29,7 +29,7 @@ .\" .\" @(#)lo.4 8.1 (Berkeley) 6/5/93 .\" -.Dd January 25, 2012 +.Dd June 23, 2024 .Dt LO 4 .Os .Sh NAME @@ -57,11 +57,11 @@ be configured first unless no hardware interfaces exist. .Pp If the transmit checksum offload capability flag is enabled on a loopback -interface, checksums will not be generated by IP, UDP, or TCP for packets +interface, checksums will not be generated by IP, UDP, TCP, or SCTP for packets sent on the interface. .Pp If the receive checksum offload capability flag is enabled on a loopback -interface, checksums will not be validated by IP, UDP, or TCP for packets +interface, checksums will not be validated by IP, UDP, TCP, or SCTP for packets received on the interface. .Pp By default, both receive and transmit checksum flags will be enabled, in From nobody Sat Aug 3 22:50:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbyZl0dNvz5RTmD; Sat, 03 Aug 2024 22:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbyZk5Sctz4KTY; Sat, 3 Aug 2024 22:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGsoPWdhimxm2UKJsVvegJL094s+4mknsCjPfqblGs0=; b=RkH/yfuHdQit3gqeEY42XHyOKijiWk9G1RzdiDHfVgDSYjQmi+HD9dCehhomTZUJeGz3ey iQJ9B7+9kV3AduxRE0pCS3XmXLsegTVFr7NPSXx8oZdFRJ65wA6ZN5EALVXO5pGxCsc3hC 61n/shasvIfLARlicvi9ywyC0pVgaLGwDArfywkKUuwAkuz7CtSL1u/31/ciS2ptG78snL lX0OBnqWVslv6kX6f52Dd3NEUmtYhrJWim+fjmo15NHedXrDy3gOt6Reow+j7fWgGNlPvQ EDVgdz7PNOlFdiU6tM4TN4jtpS8qBcbd2WzyE51JGyrlK+W19M329TDpWXVdJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722725406; a=rsa-sha256; cv=none; b=dZE2dBkcnSWSAz9Jslc7Y7xo7YzsPK/onHSkZC+pfcHgi78Crga7GkXmZD7ShQEx3r4A8N REr++2gkHo4cMjBIdN+VauAE8WYdVGZXlzGoiypWjA8+pQLGayd8yV/QezTcgWP9eugXqR rdnpUAKmMdmxNCau5SoYGkxVI834/P3uhQlL7RIub64i8JTMm6RL1R/RulmC8PFznSTzmR CUjP2Z973ZOIfUsuzPQkNtpwBKUn1VYXhBZZuFt8algNIegwf7IwroQLxPDASmMzEznp8J jqu4I/K+/QgT2EwkGDgbJIo9URtnomtRG+K0s98dKGS65e4ni8CQWwZUoBijQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGsoPWdhimxm2UKJsVvegJL094s+4mknsCjPfqblGs0=; b=e9IcUhvDDT+kbJAgWKzBJLapn+QlVln0iunAfne4w651hiBVFb6sts8IPe4629GYx5ip5J +XmYoJDCS+s1DCHHSsXwjmkQa+5YWV9zC3nx9oZIyxH/435qcg/pm+S3ibnv36CM98Fslf A2A6shaoHuVJiazwtqYIXpTBdFYwwdBlEcW/D6qy703N7mtnq8g8gkDwQu2IXnc9pL3FGm kNK8uT0MCwH18Ae5Z38w5AGOEntG/5pvWcrkX/i4Xgzd6JofUxATM5yPkMfXSZAXTRcDji J+6sagyMyvRI9XLymyoom+KPw4KKsAsq8E25K7mX+EbVbxV1Z6B37/kPRCVZNQ== 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 4WbyZk43YFzWPV; Sat, 3 Aug 2024 22:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473Mo6XB064061; Sat, 3 Aug 2024 22:50:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473Mo6Oa064056; Sat, 3 Aug 2024 22:50:06 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:50:06 GMT Message-Id: <202408032250.473Mo6Oa064056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 5632dd45cc10 - stable/14 - tcp: improve error handling in syncache_socket() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5632dd45cc10ec75f9ba679b9b985c82b7a40267 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5632dd45cc10ec75f9ba679b9b985c82b7a40267 commit 5632dd45cc10ec75f9ba679b9b985c82b7a40267 Author: Michael Tuexen AuthorDate: 2024-06-27 05:25:15 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:49:33 +0000 tcp: improve error handling in syncache_socket() If syncache_socket() fails after calling tcp_newtcpcb(), the resources allocated in tcp_newtcpcb() needs to be freed. Just call tcp_discardcb() to do this. Thanks to jtl for making me aware of the issue and proposing a fix. Reviewed by: glebius, jtl, rscheff MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45749 (cherry picked from commit 3703e1a73e0e0367c04f47f793e46495e46e647b) --- sys/netinet/tcp_syncache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 20c77930556e..21dfe8dd123e 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1050,6 +1050,7 @@ allocfail: return (NULL); abort: + tcp_discardcb(tp); in_pcbfree(inp); sodealloc(so); if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { From nobody Sat Aug 3 22:50:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbybY1ghJz5RTxh; Sat, 03 Aug 2024 22:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbybY1CJFz4KvS; Sat, 3 Aug 2024 22:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yxTrU+jkr3zp7dknNBEAsMMvna86MLO2Pm7lJ26xQwk=; b=BBN3MS3hOHnlM0ygx0fGL/KCagueMbWOCAFsNHTOx7RTyfCO1YEUDoxA2JxyLh/vvVVOR+ hEf8egzLeJcnNiGfq+KP86K6e3DIrbKWAmVy6ViApjqiAwam+Sl5jEAMi4eZ/F6W2qhWku J5bRHSuQsY5MxZPHnM2w8SoPKRdFjrXhdg/LuEG5d8PT5kArDyP78O6fd1R0h0gYcv8GH3 fgqWFUdkI68jmZUEKQFGKJG+8jJGqHFEtMZMZj8mPWY3O4DPuOtCd5OZmiVoItrfN22Iju FC/X/XZwSxv3i/aKWikQlp8h64/tI9nGnf7JFxUG+83J69KO6T9UUs75Qmmx+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722725449; a=rsa-sha256; cv=none; b=ytrWa6XDD2J2c1j1r0sA7lFksAx48nEgaSBAER1ZXnSSdLN6q0k7VM65Kplj4rGSdl63Dq kWMFf0E2CYnnMzM1Xk/WhhvyHnoJFkJzszZtDiA9r4oXjt246qsv8KFQE1ZDVQDGVGw+26 au2J6fyF7AADCdCA6+bJpE5pA9aZisVPag9EgUGlmbhuji/80f/GJxTOvKtsh7E9gOU6fB wiyHCe6ZOMNkZlJeUFmXazPiFhPU63uMG0vPyp0T/rZDq37TmwiXFzX5vDL9i0cfelc0o0 2MCTN3yMf17VcRqEG9DgOdNGo3aTwsmD9AsmNt2JZqsxiNb0B9nq+yaguNG8iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yxTrU+jkr3zp7dknNBEAsMMvna86MLO2Pm7lJ26xQwk=; b=S9YtmS8dfbSXpxM5G1okggCdTKQ3udUxAtcnOkTtBb3l+AFdRcfC4FMriFTdHHF4gXFWNv VNqxT7ALIDDIoHCXcKekA1zIQk78Y7esLeAjydfWOjUA1Upod1svlB/2GG45Z3n68UsSNZ V1d2HoCA1QYwJe+Uhz5b8MwohtrsB4JmWm8SV/rKEWldR84BNhLzIaftm3GnyJ0a47qYsx bTawWwsNyra+UTzCwzANkB9XApsMnwe7zWF9l2B9qM6bjG0Ijw++BSE0zcbzv3MlawJcS7 a9rJowuLerWVtZ8Z3nnCFlJ4C7FO2Ax6X5OMadG0N/aCqebUwZ67XG3oVVmW1A== 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 4WbybY0qKyzWM5; Sat, 3 Aug 2024 22:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MonLq072132; Sat, 3 Aug 2024 22:50:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MonQo072129; Sat, 3 Aug 2024 22:50:49 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:50:49 GMT Message-Id: <202408032250.473MonQo072129@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: d02a9ef1f03a - stable/14 - tcp: improve failure handling in tcp_newtcpcb() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d02a9ef1f03aaa5fd6cc7c27ba1facdf997f0a67 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d02a9ef1f03aaa5fd6cc7c27ba1facdf997f0a67 commit d02a9ef1f03aaa5fd6cc7c27ba1facdf997f0a67 Author: Michael Tuexen AuthorDate: 2024-06-27 06:26:34 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:50:22 +0000 tcp: improve failure handling in tcp_newtcpcb() In case of a failure of tcp_newtcpcb, where NULL is returned, * call CC_ALGO(tp)->cb_destroy, after CC_ALGO(tp)->cb_init was called. * call khelp_destroy_osd(), after khelp_init_osd() was called. Reviewed by: glebius, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45753 (cherry picked from commit 14fee5324a9b76fff6e8aad266600eefab3ef335) --- sys/netinet/tcp_subr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index afa2dc2a3a95..8785963cc7d0 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2256,6 +2256,10 @@ tcp_newtcpcb(struct inpcb *inp) #ifdef TCP_HHOOK if (khelp_init_osd(HELPER_CLASS_TCP, &tp->t_osd)) { + if (CC_ALGO(tp)->cb_destroy != NULL) + CC_ALGO(tp)->cb_destroy(&tp->t_ccv); + CC_DATA(tp) = NULL; + cc_detach(tp); if (tp->t_fb->tfb_tcp_fb_fini) (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); refcount_release(&tp->t_fb->tfb_refcnt); @@ -2332,6 +2336,13 @@ tcp_newtcpcb(struct inpcb *inp) tp->t_pacing_rate = -1; if (tp->t_fb->tfb_tcp_fb_init) { if ((*tp->t_fb->tfb_tcp_fb_init)(tp, &tp->t_fb_ptr)) { + if (CC_ALGO(tp)->cb_destroy != NULL) + CC_ALGO(tp)->cb_destroy(&tp->t_ccv); + CC_DATA(tp) = NULL; + cc_detach(tp); +#ifdef TCP_HHOOK + khelp_destroy_osd(&tp->t_osd); +#endif refcount_release(&tp->t_fb->tfb_refcnt); return (NULL); } From nobody Sat Aug 3 22:51:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbych0xGjz5RTr1; Sat, 03 Aug 2024 22:51:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbycg5ZyTz4L49; Sat, 3 Aug 2024 22:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsfX2SKPBOez9pcjN6CnowrUTufRkkpt6goTuko2/oU=; b=ZbK2kPwGERsz0McmJLBBv6D+1utc5yPX7wDJnWnt8V8fpvu0ySOLs2Ug1RyFaC/HFYGRrs yTbB434FudFURrTi533pWE26lAPPsds5sbjdTYo54X4eP2ettr2KWIDILV6NTuPgpj8qbH Rs3GJAyMNx1MpBKp3xs0Dr90AAuLw8iUhAIx3nxtSn5JlltXKCfxCjBVhmyi1roaGqYfH2 4czeCyxPtoGer5nnIJNPf0pFvDSrZodZwklQvCWGivEWM/rprk4FAkVv7sl4afo09fWCXY 9PtERMroYGUkaPc0ZmyyNp4vbonAuM5lldSCLOXc5d3rxa6P3b6dfF0UUexUgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722725507; a=rsa-sha256; cv=none; b=RTMouPkNuJampds8HqleA6bMpRQJ0XimaWnblolc5BIcOJ25gGvhvbAEQP0Tcmp1XPdfjQ YO3dLDIQp9dM+Fsgg98KmMRL0EdnIZPNnqao6cBTaHJAo2e0PZMEQlR7evlvWO44T30Add UwKxn1JJ1W75cktUjCTNN762XXTNjlDiy1FMorPP5o25zHMWUFMagrcBaa/qwlSlkfiY+o gGZcKBLwWDckR0zO3aNgyzE68BUkK+GVoLhTXeq7pTlr7wMCigLKhU7E/hpbEkqRqlV4Iv 7/PFwNB+WE50VocE1Plq4byIX7vQzUAMj673NMCoZ3HByB0tLfiy5FljDYGdlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsfX2SKPBOez9pcjN6CnowrUTufRkkpt6goTuko2/oU=; b=bLIOdRfsQrIspJC0Ws7wDjExjXffDOXozgmggnlvsWBW6p+DtuPPuXY0WpzqNO8HMvt2lv L9sQMVfLQzvilkeBdb4gGu+MJijeUQJT1eHvs+djQ2my1fE0C9DbnqKBPcYEfCAyBLKiHl HVbapQ6DP8lUtltfEgvubpMEWdloh6WCZZssOCOBrMzmiuOnNGxFhOtCJWvY4dGfIglQLb Bcsxy09iTwPeoBe72/zMazYDFqRt96JhOVUH17yBSqVZEUZZ84IqF4IEaf7n2ofspFi37B ErIDegavLAWh/oiXY2NagK1LR/Bl4wYCXF0cLdIgBiB7SiuvPVk9xSAfPI6Dcw== 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 4Wbycg4KZVzWkd; Sat, 3 Aug 2024 22:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473Mpl7a073399; Sat, 3 Aug 2024 22:51:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473Mpl2F073396; Sat, 3 Aug 2024 22:51:47 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:51:47 GMT Message-Id: <202408032251.473Mpl2F073396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 94508d2fe471 - stable/14 - tcp: minor cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94508d2fe471bb30520799843e47309f08cd90f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=94508d2fe471bb30520799843e47309f08cd90f9 commit 94508d2fe471bb30520799843e47309f08cd90f9 Author: Michael Tuexen AuthorDate: 2024-06-29 09:06:35 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:51:19 +0000 tcp: minor cleanup Fix two KASSERTs to catch the condition they are intended to, add two asserts to ensure that the appropriate locking is in place and fix some things related to style. No functional change intended. Sponsored by: Netflix, Inc. (cherry picked from commit 811d831050d172a39c714a3f676722cf9a496a6f) --- sys/netinet/tcp_subr.c | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 8785963cc7d0..8ae9018f1e5d 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -437,23 +437,25 @@ static struct tcp_function_block * find_tcp_functions_locked(struct tcp_function_set *fs) { struct tcp_function *f; - struct tcp_function_block *blk=NULL; + struct tcp_function_block *blk = NULL; + rw_assert(&tcp_function_lock, RA_LOCKED); TAILQ_FOREACH(f, &t_functions, tf_next) { if (strcmp(f->tf_name, fs->function_set_name) == 0) { blk = f->tf_fb; break; } } - return(blk); + return (blk); } static struct tcp_function_block * find_tcp_fb_locked(struct tcp_function_block *blk, struct tcp_function **s) { - struct tcp_function_block *rblk=NULL; + struct tcp_function_block *rblk = NULL; struct tcp_function *f; + rw_assert(&tcp_function_lock, RA_LOCKED); TAILQ_FOREACH(f, &t_functions, tf_next) { if (f->tf_fb == blk) { rblk = blk; @@ -476,7 +478,7 @@ find_and_ref_tcp_functions(struct tcp_function_set *fs) if (blk) refcount_acquire(&blk->tfb_refcnt); rw_runlock(&tcp_function_lock); - return(blk); + return (blk); } struct tcp_function_block * @@ -489,7 +491,7 @@ find_and_ref_tcp_fb(struct tcp_function_block *blk) if (rblk) refcount_acquire(&rblk->tfb_refcnt); rw_runlock(&tcp_function_lock); - return(rblk); + return (rblk); } /* Find a matching alias for the given tcp_function_block. */ @@ -690,7 +692,7 @@ out: static int sysctl_net_inet_default_tcp_functions(SYSCTL_HANDLER_ARGS) { - int error=ENOENT; + int error = ENOENT; struct tcp_function_set fs; struct tcp_function_block *blk; @@ -708,7 +710,7 @@ sysctl_net_inet_default_tcp_functions(SYSCTL_HANDLER_ARGS) /* Check for error or no change */ if (error != 0 || req->newptr == NULL) - return(error); + return (error); rw_wlock(&tcp_function_lock); blk = find_tcp_functions_locked(&fs); @@ -1217,9 +1219,9 @@ register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, struct tcp_function_set fs; int error, i; - KASSERT(names != NULL && *num_names > 0, - ("%s: Called with 0-length name list", __func__)); KASSERT(names != NULL, ("%s: Called with NULL name list", __func__)); + KASSERT(*num_names > 0, + ("%s: Called with non-positive length of name list", __func__)); KASSERT(rw_initialized(&tcp_function_lock), ("%s: called too early", __func__)); @@ -1266,7 +1268,7 @@ register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, tcp_fb_cnt++; rw_wunlock(&tcp_function_lock); } - return(0); + return (0); cleanup: /* @@ -4378,7 +4380,7 @@ tcp_req_check_for_stale_entries(struct tcpcb *tp, uint64_t ts, int rm_oldest) uint64_t time_delta, oldest_delta; int i, oldest, oldest_set = 0, cnt_rm = 0; - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { ent = &tp->t_tcpreq_info[i]; if (ent->flags != TCP_TRK_TRACK_FLG_USED) { /* @@ -4421,15 +4423,15 @@ tcp_req_check_for_stale_entries(struct tcpcb *tp, uint64_t ts, int rm_oldest) int tcp_req_check_for_comp(struct tcpcb *tp, tcp_seq ack_point) { - int i, ret=0; + int i, ret = 0; struct tcp_sendfile_track *ent; /* Clean up any old closed end requests that are now completed */ if (tp->t_tcpreq_req == 0) - return(0); + return (0); if (tp->t_tcpreq_closed == 0) - return(0); - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + return (0); + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { ent = &tp->t_tcpreq_info[i]; /* Skip empty ones */ if (ent->flags == TCP_TRK_TRACK_FLG_EMPTY) @@ -4452,11 +4454,11 @@ int tcp_req_is_entry_comp(struct tcpcb *tp, struct tcp_sendfile_track *ent, tcp_seq ack_point) { if (tp->t_tcpreq_req == 0) - return(-1); + return (-1); if (tp->t_tcpreq_closed == 0) - return(-1); + return (-1); if (ent->flags == TCP_TRK_TRACK_FLG_EMPTY) - return(-1); + return (-1); if (SEQ_GEQ(ack_point, ent->end_seq)) { return (1); } @@ -4478,7 +4480,7 @@ tcp_req_find_a_req_that_is_completed_by(struct tcpcb *tp, tcp_seq th_ack, int *i /* none open */ return (NULL); } - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { ent = &tp->t_tcpreq_info[i]; if (ent->flags == TCP_TRK_TRACK_FLG_EMPTY) continue; @@ -4502,7 +4504,7 @@ tcp_req_find_req_for_seq(struct tcpcb *tp, tcp_seq seq) /* none open */ return (NULL); } - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { ent = &tp->t_tcpreq_info[i]; tcp_req_log_req_info(tp, ent, i, TCP_TRK_REQ_LOG_SEARCH, (uint64_t)seq, 0); @@ -4550,7 +4552,7 @@ tcp_req_alloc_req_full(struct tcpcb *tp, struct tcp_snd_req *req, uint64_t ts, i (tp->t_tcpreq_req >= MAX_TCP_TRK_REQ)); /* Check to see if this is a duplicate of one not started */ if (tp->t_tcpreq_req) { - for(i = 0, allocated = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0, allocated = 0; i < MAX_TCP_TRK_REQ; i++) { fil = &tp->t_tcpreq_info[i]; if (fil->flags != TCP_TRK_TRACK_FLG_USED) continue; @@ -4565,20 +4567,20 @@ tcp_req_alloc_req_full(struct tcpcb *tp, struct tcp_snd_req *req, uint64_t ts, i * a 4xx of some sort and its going to age * out, lets not duplicate it. */ - return(fil); + return (fil); } } } /* Ok if there is no room at the inn we are in trouble */ if (tp->t_tcpreq_req >= MAX_TCP_TRK_REQ) { tcp_trace_point(tp, TCP_TP_REQ_LOG_FAIL); - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { tcp_req_log_req_info(tp, &tp->t_tcpreq_info[i], i, TCP_TRK_REQ_LOG_ALLOCFAIL, 0, 0); } return (NULL); } - for(i = 0, allocated = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0, allocated = 0; i < MAX_TCP_TRK_REQ; i++) { fil = &tp->t_tcpreq_info[i]; if (fil->flags == TCP_TRK_TRACK_FLG_EMPTY) { allocated = 1; From nobody Sat Aug 3 22:54:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbygj2Qyzz5RVRq; Sat, 03 Aug 2024 22:54: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbygj1zJzz4Mhw; Sat, 3 Aug 2024 22:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ooaMF/hhkBey+H8fad8EvgIP6RfHU+1E8Ufjzd5M3o=; b=I84NBykAdjPJBg2P06FkxjLhPcQcTt8NTxiJzfJvqTqobIr6KerqziF38p2t8bbUqauEOb JgUKBvSK+A+ahdObLV9GEIHGkD/Vl895STTG8QCEfp7/5xN71SXf5lZv4a0qAgS+iM/Ck4 090TNznOcNOIFLf7zYouiMPuxxXWYbv514jvYqi+rpKXRuwnbfZDpgszopI4BCYr3y3Riu 7uksRPcm/QPR5FgxkZ6IppLm998+ce401qweAzpYoCipzNjA/2S7GcXNVza6yq0F0R68Lo xo53JXrK0MP+p+4kFFY92Hs187Xqxh+jKEFmXdzXoT9gaEIFbWtt1xObIwwF9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722725665; a=rsa-sha256; cv=none; b=N5hDtOfwdFjKgJJqhVelZaUHtBo6HJFmALnSaQPHsVqIwbRc7rYnAsA1H9pvZSwAhOrz7y D4K9HXXj6eFRsL7gCRVI4XCbBuqF40sBuN8xon48rAiUPoM/E58Zvg0C9R+hVYN9ujgUQW Vdmij5MPA8P7OatN26DHL3VV83bOOlOLZp+izaqWXomDazg1B5KahU5jUb+89C8hR80khp jX7MQPR2HznsxrdT68QeD6R4mGFHrtk6rhAuTF/KLOQj/aSTulQZZKdkLvRMM6kaToUrZ2 66y9P8xKWs9lObqj2ktiARxXEDivAtNgcjdd4oYpgBFTalUjWEWBfeh423VFhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ooaMF/hhkBey+H8fad8EvgIP6RfHU+1E8Ufjzd5M3o=; b=kvKftu8ENX4mtpT3eMBFcnl1vjfasl5hD83I6I2YqBfPSMjEwswjT22OBHDXYj3/PDPg9d fSsHtzi6snauDhpMwR30jJZTP9kz5rpqgO1bIAZfaxGtFqEuRLNYMU1noEaYtcKo60hNKk U6VBxnEjCvI1nwgYoNSpNb5wWh+dZNorfCck+hdMKcl3Ds8pIe8HwKf0J+3J8aIPDDp1Ep x8Oi+ue94I7REf+CMyAouy29Psl2n35aV1kW/yAWUzNpfm/gd+IdsLB4OCSCXWHWjo+T1I 2rUQZbPIJE5bt1GbdUSVMxuO8GfbWCBFSAv8WbWNvnvNrqO4FVjObA+fVqXyyQ== 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 4Wbygj1b6bzX0X; Sat, 3 Aug 2024 22:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MsPQZ077959; Sat, 3 Aug 2024 22:54:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MsPsH077956; Sat, 3 Aug 2024 22:54:25 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:54:25 GMT Message-Id: <202408032254.473MsPsH077956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 85a9a388799d - stable/14 - tcp: whitespace cleanup of enum tcp_log_events List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 85a9a388799d1c3972fae27ddd44ab98bb1694be Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=85a9a388799d1c3972fae27ddd44ab98bb1694be commit 85a9a388799d1c3972fae27ddd44ab98bb1694be Author: Michael Tuexen AuthorDate: 2024-07-11 09:38:11 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:53:41 +0000 tcp: whitespace cleanup of enum tcp_log_events No functional change intended. Sponsored by: Netflix, Inc. (cherry picked from commit af84665261ff0aa4c930456f79ba89a73613a63f) --- sys/netinet/tcp_log_buf.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h index 79f96bab1345..3c72ed49005c 100644 --- a/sys/netinet/tcp_log_buf.h +++ b/sys/netinet/tcp_log_buf.h @@ -219,18 +219,18 @@ enum tcp_log_events { BBR_LOG_BBRRTT, /* BBR RTT is updated 20 */ BBR_LOG_JUSTRET, /* We just returned out of output 21 */ BBR_LOG_STATE, /* A BBR state change occurred 22 */ - BBR_LOG_PKT_EPOCH, /* A BBR packet epoch occurred 23 */ - BBR_LOG_PERSIST, /* BBR changed to/from a persists 24 */ - TCP_LOG_FLOWEND, /* End of a flow 25 */ - BBR_LOG_RTO, /* BBR's timeout includes BBR info 26 */ - BBR_LOG_DOSEG_DONE, /* hpts do_segment completes 27 */ - BBR_LOG_EXIT_GAIN, /* hpts do_segment completes 28 */ - BBR_LOG_THRESH_CALC, /* Doing threshold calculation 29 */ + BBR_LOG_PKT_EPOCH, /* A BBR packet epoch occurred 23 */ + BBR_LOG_PERSIST, /* BBR changed to/from a persists 24 */ + TCP_LOG_FLOWEND, /* End of a flow 25 */ + BBR_LOG_RTO, /* BBR's timeout includes BBR info 26 */ + BBR_LOG_DOSEG_DONE, /* hpts do_segment completes 27 */ + BBR_LOG_EXIT_GAIN, /* hpts do_segment completes 28 */ + BBR_LOG_THRESH_CALC, /* Doing threshold calculation 29 */ TCP_LOG_MAPCHG, /* Map Changes to the sendmap 30 */ - TCP_LOG_USERSEND, /* User level sends data 31 */ + TCP_LOG_USERSEND, /* User level sends data 31 */ BBR_RSM_CLEARED, /* RSM cleared of ACK flags 32 */ - BBR_LOG_STATE_TARGET, /* Log of target at state 33 */ - BBR_LOG_TIME_EPOCH, /* A timed based Epoch occurred 34 */ + BBR_LOG_STATE_TARGET, /* Log of target at state 33 */ + BBR_LOG_TIME_EPOCH, /* A timed based Epoch occurred 34 */ BBR_LOG_TO_PROCESS, /* A to was processed 35 */ BBR_LOG_BBRTSO, /* TSO update 36 */ BBR_LOG_HPTSDIAG, /* Hpts diag insert 37 */ @@ -257,15 +257,15 @@ enum tcp_log_events { TCP_TIMELY_WORK, /* Logs regarding Timely CC tweaks 58 */ TCP_LOG_USER_EVENT, /* User space event data 59 */ TCP_LOG_SENDFILE, /* sendfile() logging for TCP connections 60 */ - TCP_LOG_REQ_T, /* logging of request tracking 61 */ - TCP_LOG_ACCOUNTING, /* Log of TCP Accounting data 62 */ - TCP_LOG_FSB, /* FSB information 63 */ + TCP_LOG_REQ_T, /* logging of request tracking 61 */ + TCP_LOG_ACCOUNTING, /* Log of TCP Accounting data 62 */ + TCP_LOG_FSB, /* FSB information 63 */ RACK_DSACK_HANDLING, /* Handling of DSACK in rack for reordering window 64 */ - TCP_HYSTART, /* TCP Hystart logging 65 */ - TCP_CHG_QUERY, /* Change query during fnc_init() 66 */ - TCP_RACK_LOG_COLLAPSE, /* Window collapse by peer 67 */ - TCP_RACK_TP_TRIGGERED, /* A rack tracepoint is triggered 68 */ - TCP_HYBRID_PACING_LOG, /* Hybrid pacing log 69 */ + TCP_HYSTART, /* TCP Hystart logging 65 */ + TCP_CHG_QUERY, /* Change query during fnc_init() 66 */ + TCP_RACK_LOG_COLLAPSE, /* Window collapse by peer 67 */ + TCP_RACK_TP_TRIGGERED, /* A rack tracepoint is triggered 68 */ + TCP_HYBRID_PACING_LOG, /* Hybrid pacing log 69 */ TCP_LOG_PRU, /* TCP protocol user request 70 */ TCP_LOG_END /* End (keep at end) 71 */ }; From nobody Sat Aug 3 22:55:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbyhq27QVz5RVXr; Sat, 03 Aug 2024 22:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbyhq1MMZz4N5s; Sat, 3 Aug 2024 22:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7FFLo18a8we/nPxyLOWy5M2/fZHGBS4xdDwHr3t7Rx8=; b=A7SLpmy7QRvpOHafR4i93Op+0PmaGgOUWuIEtSg6scQuvSFbrwqMLAs5DEHkwYvi6SKEBN B3V4rfd466geh3XvKb+8oxZUWqRC3/APF27dsQ85PaKYM3SpMTnzgTIf/cUh5qM6A+qGBs rWydlXKBXpjUTZTEhvchbTy1C7CuYKdeWgpO/p2SqjkPdfQA6+IzAKmSMyrt+8EZSeUNpq yRasWR9nLAQq/QSbFc0JoA7dPCZYEBNAn/oBcDL/BPeWn1jcs5E3UAa0Hga6X9qN5itKVc Idfy92GwOScyHMUFS+3gIYAg9uw2NbA6j6xVo7u4r/67vATWBIz3lyCf8/OdWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722725723; a=rsa-sha256; cv=none; b=RtM0oke+r92BgBiiXPTtshjc6QhysodgAkaCQ9UsAs8DRX7EkxdcC0PHD4247luUKLiSNA 0AqENXcM6x0720MKH2YPaS0K6uGrWh+4HHWEkSIhoIPDCs9JB2FxQybLtMzTZmnQxrw29N 2yfwAM07bkSPWJAmGCPn+1wtIxnmeKnqSYUhUrmNAVzcDUva7ac9EiW8Lev923xK0L/F9z buqOQ3Qd0fxAdVeRu7xaHZvB+yl5M40mrTypn+pi6P1PlnIMJO0A3njpdEW+J10EvtO29b J9Rt3qEDG4EDt5vdI0r9Jx15x/mzMRX1DRB0uXbhoSJp89PaS6rOcqGsxJVEjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722725723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7FFLo18a8we/nPxyLOWy5M2/fZHGBS4xdDwHr3t7Rx8=; b=MAN9zps4M8IiA1KJuOjvd4SDvXkpZfp6kkQCKOvUWY5rfAuRfstQzcWrjyqecVvyX9WpUH SkzGxmyqTB3mMYJzPRU41gqubmEC+zabE8NPkGwJXUYH1+ahh1hA2y2iJ+p42pt19BHbKH qlyDePbysksgvUniklJL5LOf2LBYSw/2h42JOIyqyrbffyPliRR2+CA8d7gXUD0zuyI+sg lO0WmHA85nXY/ET7jF1obYRWfCXAqD3jHieSixh+LfcGjPZoQh3BtCFq05UeJqSkoSSK7e zJYcm8irYjpT9k0VN/lIOIhkkIvP4FNu+C+0g3qSJbibzNp1dyfVAzoBbMJIog== 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 4Wbyhq0yjvzWS9; Sat, 3 Aug 2024 22:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MtNSZ078265; Sat, 3 Aug 2024 22:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MtNsW078262; Sat, 3 Aug 2024 22:55:23 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:55:23 GMT Message-Id: <202408032255.473MtNsW078262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f87aebe64c96 - stable/14 - tcp: refactor register_tcp_functions_as_names() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f87aebe64c9678916b4c22edb99793adbfd6fcea Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f87aebe64c9678916b4c22edb99793adbfd6fcea commit f87aebe64c9678916b4c22edb99793adbfd6fcea Author: Michael Tuexen AuthorDate: 2024-07-13 10:22:25 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:54:44 +0000 tcp: refactor register_tcp_functions_as_names() Refactor register_tcp_functions_as_names() such that either all or no (in error cases) registrations happen atomically (while holding the tcp_function_lock write lock). Also ensure that the TCP function block is not already registered. This avoids situations, where some registrations were performed and then they were removed without holding a lock in between or checking ref counts. Reviewed by: cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45947 (cherry picked from commit 859f0f0d6bf753c16caa0103a541c69fb6bd5e37) --- share/man/man9/tcp_functions.9 | 25 +++++++++++--- sys/netinet/tcp_subr.c | 78 ++++++++++++++++++++++-------------------- sys/netinet/tcp_var.h | 3 ++ 3 files changed, 64 insertions(+), 42 deletions(-) diff --git a/share/man/man9/tcp_functions.9 b/share/man/man9/tcp_functions.9 index 1e0616e03a9f..8ba7f21c978c 100644 --- a/share/man/man9/tcp_functions.9 +++ b/share/man/man9/tcp_functions.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 6, 2024 +.Dd July 13, 2024 .Dt TCP_FUNCTIONS 9 .Os .Sh NAME @@ -37,6 +37,7 @@ .Ft int .Fn register_tcp_functions_as_name "struct tcp_function_block *blk" \ "const char *name" "int wait" +.Ft int .Fn register_tcp_functions_as_names "struct tcp_function_block *blk" \ "int wait" "const char *names[]" "int *num_names" .Ft int @@ -112,6 +113,7 @@ argument. The .Fa num_names argument provides a pointer to the number of names. +This number must not exceed TCP_FUNCTION_NAME_NUM_MAX. This function will either succeed in registering all of the names in the array, or none of the names in the array. On failure, the @@ -328,8 +330,11 @@ must be prepared to wait until all connections have stopped using the specified TCP stack. .Sh ERRORS The -.Fn register_tcp_functions -function will fail if: +.Fn register_tcp_functions , +.Fn register_tcp_functions_as_name , +and +.Fn register_tcp_functions_as_names +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL Any of the members of the @@ -338,7 +343,19 @@ argument are set incorrectly. .It Bq Er ENOMEM The function could not allocate memory for its internal data. .It Bq Er EALREADY -A function block is already registered with the same name. +The +.Fa blk +is already registered or a function block is already registered with the same +name. +.El +Additionally, +.Fn register_tcp_functions_as_names +will fail if: +.Bl -tag -width Er +.It Bq Er E2BIG +The number of names pointed to by the +.Fa num_names +argument is larger than TCP_FUNCTION_NAME_NUM_MAX. .El The .Fn deregister_tcp_functions diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 8ae9018f1e5d..6feb1916bb35 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1215,9 +1215,9 @@ int register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, const char *names[], int *num_names) { - struct tcp_function *n; + struct tcp_function *f[TCP_FUNCTION_NAME_NUM_MAX]; struct tcp_function_set fs; - int error, i; + int error, i, num_registered; KASSERT(names != NULL, ("%s: Called with NULL name list", __func__)); KASSERT(*num_names > 0, @@ -1225,71 +1225,73 @@ register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, KASSERT(rw_initialized(&tcp_function_lock), ("%s: called too early", __func__)); + if (*num_names > TCP_FUNCTION_NAME_NUM_MAX) { + /* Too many names. */ + *num_names = 0; + return (E2BIG); + } if ((blk->tfb_tcp_output == NULL) || (blk->tfb_tcp_do_segment == NULL) || (blk->tfb_tcp_ctloutput == NULL) || (blk->tfb_tcp_handoff_ok == NULL) || (strlen(blk->tfb_tcp_block_name) == 0)) { - /* - * These functions are required and you - * need a name. - */ + /* These functions are required and a name is needed. */ *num_names = 0; return (EINVAL); } - if (blk->tfb_flags & TCP_FUNC_BEING_REMOVED) { - *num_names = 0; - return (EINVAL); + for (i = 0; i < *num_names; i++) { + f[i] = malloc(sizeof(struct tcp_function), M_TCPFUNCTIONS, wait); + if (f[i] == NULL) { + while (--i >= 0) + free(f[i], M_TCPFUNCTIONS); + *num_names = 0; + return (ENOMEM); + } } + num_registered = 0; + rw_wlock(&tcp_function_lock); + if (find_tcp_fb_locked(blk, NULL) != NULL) { + /* A TCP function block can only be registered once. */ + error = EALREADY; + goto cleanup; + } + if (blk->tfb_flags & TCP_FUNC_BEING_REMOVED) { + error = EINVAL; + goto cleanup; + } refcount_init(&blk->tfb_refcnt, 0); blk->tfb_id = atomic_fetchadd_int(&next_tcp_stack_id, 1); for (i = 0; i < *num_names; i++) { - n = malloc(sizeof(struct tcp_function), M_TCPFUNCTIONS, wait); - if (n == NULL) { - error = ENOMEM; - goto cleanup; - } - n->tf_fb = blk; - (void)strlcpy(fs.function_set_name, names[i], sizeof(fs.function_set_name)); - rw_wlock(&tcp_function_lock); if (find_tcp_functions_locked(&fs) != NULL) { /* Duplicate name space not allowed */ - rw_wunlock(&tcp_function_lock); - free(n, M_TCPFUNCTIONS); error = EALREADY; goto cleanup; } - (void)strlcpy(n->tf_name, names[i], sizeof(n->tf_name)); - TAILQ_INSERT_TAIL(&t_functions, n, tf_next); + f[i]->tf_fb = blk; + (void)strlcpy(f[i]->tf_name, names[i], sizeof(f[i]->tf_name)); + TAILQ_INSERT_TAIL(&t_functions, f[i], tf_next); tcp_fb_cnt++; - rw_wunlock(&tcp_function_lock); + num_registered++; } + rw_wunlock(&tcp_function_lock); return (0); cleanup: - /* - * Deregister the names we just added. Because registration failed - * for names[i], we don't need to deregister that name. - */ - *num_names = i; - rw_wlock(&tcp_function_lock); - while (--i >= 0) { - TAILQ_FOREACH(n, &t_functions, tf_next) { - if (!strncmp(n->tf_name, names[i], - TCP_FUNCTION_NAME_LEN_MAX)) { - TAILQ_REMOVE(&t_functions, n, tf_next); - tcp_fb_cnt--; - n->tf_fb = NULL; - free(n, M_TCPFUNCTIONS); - break; - } + /* Remove the entries just added. */ + for (i = 0; i < *num_names; i++) { + if (i < num_registered) { + TAILQ_REMOVE(&t_functions, f[i], tf_next); + tcp_fb_cnt--; } + f[i]->tf_fb = NULL; + free(f[i], M_TCPFUNCTIONS); } rw_wunlock(&tcp_function_lock); + *num_names = num_registered; return (error); } diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index b8278bbf2644..a8621563e190 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -638,6 +638,9 @@ struct tcp_function_block { uint8_t tfb_id; }; +/* Maximum number of names each TCP function block can be registered with. */ +#define TCP_FUNCTION_NAME_NUM_MAX 8 + struct tcp_function { TAILQ_ENTRY(tcp_function) tf_next; char tf_name[TCP_FUNCTION_NAME_LEN_MAX]; From nobody Sat Aug 3 23:06:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbyxD5Gh3z5RWTQ; Sat, 03 Aug 2024 23:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbyxD4pXfz4NmM; Sat, 3 Aug 2024 23:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bCC3w/JUKVgQvWO9cBMHp/dKQMCCbxld5r0SHPmpL2c=; b=Qt0yXOMS4rM+ihhPRr8WVe3VdPXO/xBDcoT2xdv6DHfSpkpKa/1U5f+M6i398qaiHMh1IH K/yMtHSsBc2iFO4xi+Wa6RUAxFKVwWi42J4bTkqA3eOmJWTAVZCNaGSxEYs6pzjbWp1lv8 ElnBrHbJPWBvC1NnzJIZiKip8HA3LSGyG3pPNapwo6NrKHk1CjMIRaMKSWrl8crQrmvHxV 8MuukK7onN6LRfMnt7VAS/9IXRNlHVLePA7qDO6oKplFUUar/fIxjVCgl2Vd8VHnDwJQmP z8sl91PMKNTZv4IsuCBNHLybp8F2A7pdK7CmUdZSq9v+8yJxhb4jQVSz2McDwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722726368; a=rsa-sha256; cv=none; b=YUJBpIUfMGnLPbB3YB1BzoMrfQTd5GD6Yz+jSfdHVpdQRT6t/qeKopjMJrZOIX1gvHRydW yM/rQCo4iwHI8tOaLBAAr+yPOSjmpT3wqMHYO4iDvxVynuwguo5liM9NmmCGR1GdtLca76 Ft2hGTl2W2KSNoquE6MZYeRFb0pu/oPQk22e7Emp+OauNcyBGLHo/jWejUM/oOcIR9eH/2 r7FNTCnHnyB1Y3I3ntPLkjRCD0nA0KNIMLAQlSJSkukaqniDsGB4zMipNNkNFExQ82vGWb ePOzqtwEcKtwzqUGa0YF3RjSXKuJ5lHJ89IyL38ye2KRirIEMZDIk+RXMPaDXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bCC3w/JUKVgQvWO9cBMHp/dKQMCCbxld5r0SHPmpL2c=; b=gvK983VqhFj5L/xzapfLJ99lXwWZKY9Xnx6tJ3mMru9pBQtnBCOUvjg0f+6lMoGfpvam1u vtD4zu2AX6PEKD2BQya0paiFZmJrDNuhSVageKgqIncA2lTkcZ910wxRnt8p3wzY3qNsQQ 8NhaS3aVn+k1NjgxyfIAXaByp0YqSFLjrBkOaMP3O46eVx9yaA/ZPZ/bwYoqRBoHasXxjm i9tqqubiFV8R2fnr8t/MdsiRBAyen+jomJDhPuaosRfXmEw45DLlUM5mfYScbVCa9uRc27 b4AkN6BhmHIBfocbpXoZ6sst/OiQotCqXpFLzoyC3LY9q0tWPTPjM91H6i1e9w== 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 4WbyxD4J0pzXK5; Sat, 3 Aug 2024 23:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473N680L096229; Sat, 3 Aug 2024 23:06:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473N687E096226; Sat, 3 Aug 2024 23:06:08 GMT (envelope-from git) Date: Sat, 3 Aug 2024 23:06:08 GMT Message-Id: <202408032306.473N687E096226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 1ce8cf6f7bdf - stable/14 - tcp: improve SEG.ACK validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1ce8cf6f7bdf5e9f8e497be5e3c54767fa0a7cf8 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1ce8cf6f7bdf5e9f8e497be5e3c54767fa0a7cf8 commit 1ce8cf6f7bdf5e9f8e497be5e3c54767fa0a7cf8 Author: Michael Tuexen AuthorDate: 2024-07-21 09:37:35 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 23:05:13 +0000 tcp: improve SEG.ACK validation Implement the improved SEG.ACK validation described in RFC 5961. In addition to that, also detect ghost ACKs, which are ACKs for data that has never been sent. The additional checks are enabled by default, but can be disabled by setting the sysctl-variable net.inet.tcp.insecure_ack to a non-zero value. PR: 250357 Reviewed by: Peter Lei, rscheff (older version) Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45894 (cherry picked from commit 646c28ea80cb0f9258386626297495b5a0e56db5) --- share/man/man4/tcp.4 | 5 ++++- sys/netinet/tcp_input.c | 44 +++++++++++++++++++++++++++++++++++++++++++ sys/netinet/tcp_stacks/bbr.c | 37 ++++++++++++++++++++++++++++++++++++ sys/netinet/tcp_stacks/rack.c | 39 ++++++++++++++++++++++++++++++++++++++ sys/netinet/tcp_var.h | 8 +++++++- usr.bin/netstat/inet.c | 8 ++++++-- 6 files changed, 137 insertions(+), 4 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 16c9e0ce84df..1f5cc7734bbf 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -33,7 +33,7 @@ .\" .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" -.Dd November 17, 2023 +.Dd July 21, 2024 .Dt TCP 4 .Os .Sh NAME @@ -708,6 +708,9 @@ Default is false. .It Va insecure_syn Use criteria defined in RFC793 instead of RFC5961 for accepting SYN segments. Default is false. +.It Va insecure_ack +Use criteria defined in RFC793 for validating SEG.ACK. +Default is false. .It Va isn_reseed_interval The interval (in seconds) specifying how often the secret data used in RFC 1948 initial sequence number calculations should be reseeded. diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 133818b73a1d..21f4d046d6c9 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -209,6 +209,11 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_insecure_rst), 0, "Follow RFC793 instead of RFC5961 criteria for accepting RST packets"); +VNET_DEFINE(int, tcp_insecure_ack) = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_ack, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_insecure_ack), 0, + "Follow RFC793 criteria for validating SEG.ACK"); + VNET_DEFINE(int, tcp_recvspace) = 1024*64; #define V_tcp_recvspace VNET(tcp_recvspace) SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_VNET | CTLFLAG_RW, @@ -2417,6 +2422,45 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, /* * Ack processing. */ + if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { + /* Checking SEG.ACK against ISS is definitely redundant. */ + tp->t_flags2 |= TF2_NO_ISS_CHECK; + } + if (!V_tcp_insecure_ack) { + tcp_seq seq_min; + bool ghost_ack_check; + + if (tp->t_flags2 & TF2_NO_ISS_CHECK) { + /* Check for too old ACKs (RFC 5961, Section 5.2). */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } else { + if (SEQ_GT(tp->iss + 1, tp->snd_una - tp->max_sndwnd)) { + /* Checking for ghost ACKs is stricter. */ + seq_min = tp->iss + 1; + ghost_ack_check = true; + } else { + /* + * Checking for too old ACKs (RFC 5961, + * Section 5.2) is stricter. + */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } + } + if (SEQ_LT(th->th_ack, seq_min)) { + if (ghost_ack_check) + TCPSTAT_INC(tcps_rcvghostack); + else + TCPSTAT_INC(tcps_rcvacktooold); + /* Send a challenge ACK. */ + tcp_respond(tp, mtod(m, void *), th, m, + tp->rcv_nxt, tp->snd_nxt, TH_ACK); + tp->last_ack_sent = tp->rcv_nxt; + m = NULL; + goto drop; + } + } switch (tp->t_state) { /* * In SYN_RECEIVED state, the ack ACKs our SYN, so enter diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 7803865af818..2bdab744e0d9 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -7700,6 +7700,43 @@ bbr_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, bbr = (struct tcp_bbr *)tp->t_fb_ptr; lost = bbr->r_ctl.rc_lost; nsegs = max(1, m->m_pkthdr.lro_nsegs); + if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { + /* Checking SEG.ACK against ISS is definitely redundant. */ + tp->t_flags2 |= TF2_NO_ISS_CHECK; + } + if (!V_tcp_insecure_ack) { + tcp_seq seq_min; + bool ghost_ack_check; + + if (tp->t_flags2 & TF2_NO_ISS_CHECK) { + /* Check for too old ACKs (RFC 5961, Section 5.2). */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } else { + if (SEQ_GT(tp->iss + 1, tp->snd_una - tp->max_sndwnd)) { + /* Checking for ghost ACKs is stricter. */ + seq_min = tp->iss + 1; + ghost_ack_check = true; + } else { + /* + * Checking for too old ACKs (RFC 5961, + * Section 5.2) is stricter. + */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } + } + if (SEQ_LT(th->th_ack, seq_min)) { + if (ghost_ack_check) + TCPSTAT_INC(tcps_rcvghostack); + else + TCPSTAT_INC(tcps_rcvacktooold); + /* Send challenge ACK. */ + ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val); + bbr->r_wanted_output = 1; + return (1); + } + } if (SEQ_GT(th->th_ack, tp->snd_max)) { ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val); bbr->r_wanted_output = 1; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index d918d9385446..c27f745ade62 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12149,6 +12149,45 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, INP_WLOCK_ASSERT(tptoinpcb(tp)); rack = (struct tcp_rack *)tp->t_fb_ptr; + if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { + /* Checking SEG.ACK against ISS is definitely redundant. */ + tp->t_flags2 |= TF2_NO_ISS_CHECK; + } + if (!V_tcp_insecure_ack) { + tcp_seq seq_min; + bool ghost_ack_check; + + if (tp->t_flags2 & TF2_NO_ISS_CHECK) { + /* Check for too old ACKs (RFC 5961, Section 5.2). */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } else { + if (SEQ_GT(tp->iss + 1, tp->snd_una - tp->max_sndwnd)) { + /* Checking for ghost ACKs is stricter. */ + seq_min = tp->iss + 1; + ghost_ack_check = true; + } else { + /* + * Checking for too old ACKs (RFC 5961, + * Section 5.2) is stricter. + */ + seq_min = tp->snd_una - tp->max_sndwnd; + ghost_ack_check = false; + } + } + if (SEQ_LT(th->th_ack, seq_min)) { + if (ghost_ack_check) + TCPSTAT_INC(tcps_rcvghostack); + else + TCPSTAT_INC(tcps_rcvacktooold); + /* Send challenge ACK. */ + __ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt); + rack->r_wanted_output = 1; + return (1); + } + } if (SEQ_GT(th->th_ack, tp->snd_max)) { __ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val, &rack->r_ctl.challenge_ack_ts, diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index a8621563e190..010ad748260a 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -858,6 +858,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) #define TF2_MBUF_QUEUE_READY 0x00020000 /* Inputs can be queued */ #define TF2_DONT_SACK_QUEUE 0x00040000 /* Don't wake on sack */ #define TF2_CANNOT_DO_ECN 0x00080000 /* The stack does not do ECN */ +#define TF2_NO_ISS_CHECK 0x00200000 /* Don't check SEG.ACK against ISS */ /* * Structure to hold TCP options that are only used during segment @@ -1109,8 +1110,11 @@ struct tcpstat { uint64_t tcps_tlpresends; /* number of tlp resends */ uint64_t tcps_tlpresend_bytes; /* number of bytes resent by tlp */ + /* SEG.ACK validation failures */ + uint64_t tcps_rcvghostack; /* received ACK for data never sent */ + uint64_t tcps_rcvacktooold; /* received ACK for data too long ago */ - uint64_t _pad[4]; /* 4 TBD placeholder for STABLE */ + uint64_t _pad[2]; /* 2 TBD placeholder for STABLE */ }; #define tcps_rcvmemdrop tcps_rcvreassfull /* compat */ @@ -1291,6 +1295,7 @@ VNET_DECLARE(int, tcp_ecn_maxretries); VNET_DECLARE(int, tcp_initcwnd_segments); VNET_DECLARE(int, tcp_insecure_rst); VNET_DECLARE(int, tcp_insecure_syn); +VNET_DECLARE(int, tcp_insecure_ack); VNET_DECLARE(uint32_t, tcp_map_entries_limit); VNET_DECLARE(uint32_t, tcp_map_split_limit); VNET_DECLARE(int, tcp_minmss); @@ -1337,6 +1342,7 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_tcp_initcwnd_segments VNET(tcp_initcwnd_segments) #define V_tcp_insecure_rst VNET(tcp_insecure_rst) #define V_tcp_insecure_syn VNET(tcp_insecure_syn) +#define V_tcp_insecure_ack VNET(tcp_insecure_ack) #define V_tcp_map_entries_limit VNET(tcp_map_entries_limit) #define V_tcp_map_split_limit VNET(tcp_map_split_limit) #define V_tcp_minmss VNET(tcp_minmss) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 19f7ba1490c4..3442666ce0bd 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -649,8 +649,12 @@ tcp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/UDP tunneled pkt%s}\n"); p(tcps_tunneled_errs, "\t\t{:received-bad-udp-tunneled-pkts/%ju} " "{N:/UDP tunneled pkt cnt with error%s}\n"); - p(tcps_rcvacktoomuch, "\t\t{:received-acks-for-unsent-data/%ju} " - "{N:/ack%s for unsent data}\n"); + p(tcps_rcvacktoomuch, "\t\t{:received-acks-for-data-not-yet-sent/%ju} " + "{N:/ack%s for data not yet sent}\n"); + p(tcps_rcvghostack, "\t\t{:received-acks-for-data-never-been-sent/%ju} " + "{N:/ack%s for data never been sent (ghost acks)}\n"); + p(tcps_rcvacktooold, "\t\t{:received-acks-for-data-being-too-old/%ju} " + "{N:/ack%s for data being too old}\n"); p2(tcps_rcvpack, tcps_rcvbyte, "\t\t" "{:received-in-sequence-packets/%ju} {N:/packet%s} " "({:received-in-sequence-bytes/%ju} {N:/byte%s}) " From nobody Sat Aug 3 23:07:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbyys4PMZz5RWKC; Sat, 03 Aug 2024 23:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbyys3hz0z4PYb; Sat, 3 Aug 2024 23:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oTMAL/y7xB6DD53GY/nQw9d1m87+C1bwM9ogtd5t7pc=; b=jY7heYHUdPtM0nJ7EQ+4GzvtMof1EM9WeK4XvNr9QMRQFimNNpquggwLRyNN+jEKgoG8fQ wsgWCYjNxsrYu2iI4dnKaG0jdB2DRw6jGX70KfFid5GcZs3BK0EDWv2Hk/V5NaiJNU5LCR PWRhaK9M/nVZ2wvgLJGs7mK8uLjSP6P1bRSjWZICEtu43HuEXIfqtDkiBpa4mJyM9+9D2s I8Oj0fVrjJf1kfg9lFJNlLX8wXHAYe0ZoL2O7FvTMMUmjL0hQl2f19EnE6ku69CJWUmvc3 vTxGgGfR2/07hPFl4blblCH/ZkWL3BQhzhSmVQXYGmu9WI2+6p6vDrMnK2xlPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722726453; a=rsa-sha256; cv=none; b=wf4eFVnA6+exgAt8jaJ8aJnvly7UehMB0M8KgIzn1lqM2kcfxAVPFEFBJbAc2uEGyipQ6V 5HeEnjqHTYf1ViBtQ1oN/FlKN9llpgqyC3BFYzLBL2tjceA8rsxmoyC4f+Fj8XLD5CsYnK XNuZ4/yFbldy3ODZWWSzp9dzZ458tZd7F8M74XKzzHemYMlAZc19MS4rbo1OXegJ+aYBQr gJ70I/jXzfEv24oWuLdxtrtM6W3jdr3TwwiLSelq+XZHveMORJRPY9ubYznOdQuM9J2ZSs Lw6TPkFt3JxL1/LSkz5Z2ZE1RmzN2Pz96J6+h4feh4f3+YjjiMG7kFF+z1dDVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oTMAL/y7xB6DD53GY/nQw9d1m87+C1bwM9ogtd5t7pc=; b=P9E8uaBRGvlVUKs8SqsTo07g7nXArMBavR/GkRF60Lxt94uQh77bCjUEhgGlqyF1uIFdn5 7XWSTIULnZHlJrBeIO0P6biSn0KrljEpvCgp2EPZokcjn0mMtM6+C2tUB10IY4E1z824rn HEJTi9y/V9iZ7I+PVV3BhqsmLgDcGobPDM56baiZiKpJDKVHnbzEXL3H6H1fAc+jKm7WG6 qA16uaY9L/TXjCUx5l+iHt9n72Ax2iW4auMcjEr2gRIyXzZRiNXpvmD6PCk9PhA3QasatZ dszHy343GP/00dHw/QvKfBNKumMU+3nVWTkT4Rcht0Ed991kv/2Y9X8W7LVJ3A== 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 4Wbyys3G2nzWNZ; Sat, 3 Aug 2024 23:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473N7X6J096522; Sat, 3 Aug 2024 23:07:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473N7Xkb096519; Sat, 3 Aug 2024 23:07:33 GMT (envelope-from git) Date: Sat, 3 Aug 2024 23:07:33 GMT Message-Id: <202408032307.473N7Xkb096519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: ac56d68b1b71 - stable/14 - tcp: simplify endpoint creation at the passive side List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ac56d68b1b71031370e94577adc5fbc12a0353d2 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ac56d68b1b71031370e94577adc5fbc12a0353d2 commit ac56d68b1b71031370e94577adc5fbc12a0353d2 Author: Michael Tuexen AuthorDate: 2024-07-21 09:49:37 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 23:06:50 +0000 tcp: simplify endpoint creation at the passive side Use the intended TCP stack when creating a TCP endpoint instead of creating it the endpoint the default stack first and after that switching it to use the intended TCP stack. Reviewed by: Peter Lei, rrs and jtl (older version) Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45411 (cherry picked from commit baee801c92d26f4b7d1b2a9edd755c1b07b84167) --- sys/netinet/tcp_subr.c | 19 +++++++++++++++++-- sys/netinet/tcp_syncache.c | 39 ++++++--------------------------------- sys/netinet/tcp_usrreq.c | 2 +- sys/netinet/tcp_var.h | 2 +- 4 files changed, 25 insertions(+), 37 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 6feb1916bb35..5d87d0327148 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2221,9 +2221,11 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, * Create a new TCP control block, making an empty reassembly queue and hooking * it to the argument protocol control block. The `inp' parameter must have * come from the zone allocator set up by tcpcbstor declaration. + * The caller can provide a pointer to a tcpcb of the listener to inherit the + * TCP function block from the listener. */ struct tcpcb * -tcp_newtcpcb(struct inpcb *inp) +tcp_newtcpcb(struct inpcb *inp, struct tcpcb *listening_tcb) { struct tcpcb *tp = intotcpcb(inp); #ifdef INET6 @@ -2241,8 +2243,21 @@ tcp_newtcpcb(struct inpcb *inp) tp->t_ccv.type = IPPROTO_TCP; tp->t_ccv.ccvc.tcp = tp; rw_rlock(&tcp_function_lock); - tp->t_fb = V_tcp_func_set_ptr; + if (listening_tcb != NULL) { + INP_LOCK_ASSERT(tptoinpcb(listening_tcb)); + KASSERT(listening_tcb->t_fb != NULL, + ("tcp_newtcpcb: listening_tcb->t_fb is NULL")); + if (listening_tcb->t_fb->tfb_flags & TCP_FUNC_BEING_REMOVED) { + rw_runlock(&tcp_function_lock); + return (NULL); + } + tp->t_fb = listening_tcb->t_fb; + } else { + tp->t_fb = V_tcp_func_set_ptr; + } refcount_acquire(&tp->t_fb->tfb_refcnt); + KASSERT((tp->t_fb->tfb_flags & TCP_FUNC_BEING_REMOVED) == 0, + ("tcp_newtcpcb: using TFB being removed")); rw_runlock(&tcp_function_lock); /* * Use the current system default CC algorithm. diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 21dfe8dd123e..052e257a3cb5 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -777,7 +777,7 @@ done: static struct socket * syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) { - struct tcp_function_block *blk; + struct tcpcb *listening_tcb; struct inpcb *inp = NULL; struct socket *so; struct tcpcb *tp; @@ -802,7 +802,11 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) goto allocfail; } inp = sotoinpcb(so); - if ((tp = tcp_newtcpcb(inp)) == NULL) { + if (V_functions_inherit_listen_socket_stack) + listening_tcb = sototcpcb(lso); + else + listening_tcb = NULL; + if ((tp = tcp_newtcpcb(inp, listening_tcb)) == NULL) { in_pcbfree(inp); sodealloc(so); goto allocfail; @@ -912,37 +916,6 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) tp->t_port = sc->sc_port; tcp_rcvseqinit(tp); tcp_sendseqinit(tp); - blk = sototcpcb(lso)->t_fb; - if (V_functions_inherit_listen_socket_stack && blk != tp->t_fb) { - /* - * Our parents t_fb was not the default, - * we need to release our ref on tp->t_fb and - * pickup one on the new entry. - */ - struct tcp_function_block *rblk; - void *ptr = NULL; - - rblk = find_and_ref_tcp_fb(blk); - KASSERT(rblk != NULL, - ("cannot find blk %p out of syncache?", blk)); - - if (rblk->tfb_tcp_fb_init == NULL || - (*rblk->tfb_tcp_fb_init)(tp, &ptr) == 0) { - /* Release the old stack */ - if (tp->t_fb->tfb_tcp_fb_fini != NULL) - (*tp->t_fb->tfb_tcp_fb_fini)(tp, 0); - refcount_release(&tp->t_fb->tfb_refcnt); - /* Now set in all the pointers */ - tp->t_fb = rblk; - tp->t_fb_ptr = ptr; - } else { - /* - * Initialization failed. Release the reference count on - * the looked up default stack. - */ - refcount_release(&rblk->tfb_refcnt); - } - } tp->snd_wl1 = sc->sc_irs; tp->snd_max = tp->iss + 1; tp->snd_nxt = tp->iss + 1; diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 4e754965487b..384c27b3a6cd 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -174,7 +174,7 @@ tcp_usr_attach(struct socket *so, int proto, struct thread *td) if (error) goto out; inp = sotoinpcb(so); - tp = tcp_newtcpcb(inp); + tp = tcp_newtcpcb(inp, NULL); if (tp == NULL) { error = ENOBUFS; in_pcbfree(inp); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 010ad748260a..4632474c1d11 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1463,7 +1463,7 @@ void tcp_mss_update(struct tcpcb *, int, int, struct hc_metrics_lite *, void tcp_mss(struct tcpcb *, int); int tcp_mssopt(struct in_conninfo *); struct tcpcb * - tcp_newtcpcb(struct inpcb *); + tcp_newtcpcb(struct inpcb *, struct tcpcb *); int tcp_default_output(struct tcpcb *); void tcp_state_change(struct tcpcb *, int); void tcp_respond(struct tcpcb *, void *, From nobody Sat Aug 3 23:10:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbz1p6KXgz5RWpc; Sat, 03 Aug 2024 23:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbz1p4Qvqz4PtX; Sat, 3 Aug 2024 23:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ctrE+W0OhDx4JEuiHCdh+uQgzj2PHUtNXdAryQIh+I=; b=YRvBhJwai7w9RdgNz1fYOTO9x5323HvKopU0QNDd+5R+adP8gXHg8UYmRO/vf9QYfL0SFU 5lPPDq59rbUkuwZnkf4AXe1uzqmz1Y/6VGWQirweqqh+L+4HBZkh5o+P/ZCrkrUBovy0Hj xnYgW/i5sLMo2OosDH5uYVutEoqD9UaHzFDhjUNSwnE9Hv0ry93JuKr6Qi0CzIilMqdXDs ehj+t7BpSiFBd4rxCTxOG+SBBXLO7K/wLFCX7cioJm6rquo5Z+je6A7G2NGYRTdrqZeKT1 iG5QpMDf5vJbUQdVlrv+l07kPpIWIh0EEtSyBaQZ+XsNOavjebiokq8c7Y5wsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722726606; a=rsa-sha256; cv=none; b=omj+NqdrABG3V1/VbclWC4jFH6JzDpy0xBGX5mAvl8Vq/1wxO4UN1dYuRFgRYxQ4K243O1 EbjvvF93Qx9dYzpM/W9lbuD4pdNUEyR8LyfQNWxrwRA4G+KBGGf6T7HEc0bcEMHu15wrGY 2/+xOLs24eJ8tUkhA3eN6RRVfZhEBvozypG5wp/z9CullKUUmBD2uWbiMDkW9qbrDl1fv5 r8OEx1New/c1kI79vCSeHg2zcErdwdRmMxGVjNyj7dLicxPNc62Ca3SXvbEz6ceQS+7gU9 EM6qcxBiT9wiWyC1A606A7OwQKP9+ORcGVg/FQ4P++bJHtY+jTHUIJy9UgczbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ctrE+W0OhDx4JEuiHCdh+uQgzj2PHUtNXdAryQIh+I=; b=XJhq8qCnGNyElXPy0NRx3TWNHV8IeBq9sfUW3SIfIlDMpUGj40j92gFb0uPMR4EUkfgMCZ 6Aj4zLnjJ9XmTn/j9NAepIuS/hBuzVzPuBNIj/ROw67n6qHQNovpDIY4891cpj4xcOD6CY RUKaqxEofW6Lm1kXlSogf08uQvTsb1rK4ozcX4jWfutfEbAOYwu62ZqeqDOtWXef63My+6 XeOr4EA9IqyAyRrgBJ1O7GINjfayuD3D5WtPliH+bxwbxC65y58QG2Bq2d2rpSBtg5sfke MLCPqsVOi3Urdt/+XRxdVIjea2VMosTqczHoVRLOOlqIApdSo65AaQ+ued1E2Q== 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 4Wbz1p3h68zX3t; Sat, 3 Aug 2024 23:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473NA6An099918; Sat, 3 Aug 2024 23:10:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473NA6AC099905; Sat, 3 Aug 2024 23:10:06 GMT (envelope-from git) Date: Sat, 3 Aug 2024 23:10:06 GMT Message-Id: <202408032310.473NA6AC099905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 9ea13f8547a9 - stable/14 - tcp: mark TCP stacks which can serve as a default stack List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9ea13f8547a98d4467d2095c4e97447309a2dd10 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=9ea13f8547a98d4467d2095c4e97447309a2dd10 commit 9ea13f8547a98d4467d2095c4e97447309a2dd10 Author: Michael Tuexen AuthorDate: 2024-07-21 13:06:10 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 23:09:27 +0000 tcp: mark TCP stacks which can serve as a default stack Allow a TCP function block (tfb) to become the default stack only if tfb->tfb_flags has the TCP_FUNC_DEFAULT_OK flags set. This allows a TCP function block, that is not suitable as a default function block to ensure that it is not set as the default via sysctl. In this case sysctl would return EINVAL. Reviewed by: gallatin, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45419 (cherry picked from commit e0b080f850cc0418353cc196cbfe81075cf76661) --- sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 2 +- sys/netinet/tcp_subr.c | 5 +++++ sys/netinet/tcp_var.h | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 2bdab744e0d9..c1bbec3800fd 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -14151,7 +14151,7 @@ struct tcp_function_block __tcp_bbr = { .tfb_tcp_mtu_chg = bbr_mtu_chg, .tfb_pru_options = bbr_pru_options, .tfb_switch_failed = bbr_switch_failed, - .tfb_flags = TCP_FUNC_OUTPUT_CANDROP, + .tfb_flags = TCP_FUNC_OUTPUT_CANDROP | TCP_FUNC_DEFAULT_OK, }; /* diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index c27f745ade62..35ae371a082e 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -23800,7 +23800,7 @@ static struct tcp_function_block __tcp_rack = { .tfb_switch_failed = rack_switch_failed, .tfb_early_wake_check = rack_wake_check, .tfb_compute_pipe = rack_compute_pipe, - .tfb_flags = TCP_FUNC_OUTPUT_CANDROP, + .tfb_flags = TCP_FUNC_OUTPUT_CANDROP | TCP_FUNC_DEFAULT_OK, }; /* diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 5d87d0327148..9fc744c42e0c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -402,6 +402,7 @@ static struct tcp_function_block tcp_def_funcblk = { .tfb_tcp_fb_init = tcp_default_fb_init, .tfb_tcp_fb_fini = tcp_default_fb_fini, .tfb_switch_failed = tcp_default_switch_failed, + .tfb_flags = TCP_FUNC_DEFAULT_OK, }; static int tcp_fb_cnt = 0; @@ -719,6 +720,10 @@ sysctl_net_inet_default_tcp_functions(SYSCTL_HANDLER_ARGS) error = ENOENT; goto done; } + if ((blk->tfb_flags & TCP_FUNC_DEFAULT_OK) == 0) { + error = EINVAL; + goto done; + } V_tcp_func_set_ptr = blk; done: rw_wunlock(&tcp_function_lock); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 4632474c1d11..e7cccd60a95e 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -536,6 +536,7 @@ typedef enum { /* Flags for tcp functions */ #define TCP_FUNC_BEING_REMOVED 0x01 /* Can no longer be referenced */ #define TCP_FUNC_OUTPUT_CANDROP 0x02 /* tfb_tcp_output may ask tcp_drop */ +#define TCP_FUNC_DEFAULT_OK 0x04 /* Can be used as default */ /** * If defining the optional tcp_timers, in the From nobody Sat Aug 3 23:10:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbz2h09XCz5RWpn; Sat, 03 Aug 2024 23:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbz2g6VX9z4Q6K; Sat, 3 Aug 2024 23:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FBWtKk//eSCPDNwiMJ4GhSlO94YeLsZJqwHvwOUi1kw=; b=ytR53pG/8/pLUoixtaWg5rF/7bgTJyFz1v8u69pmI51BcQDvfbLMM2Zo5ezqDdlzRL/XQG +yBrnWy5szWpUUPEdskKc6JGs9a8jr7VRc8oyfTn9RaNp2ieacCldaPYwTznFrQRmuVBw8 svttJhaqsjaI3GSwMtQSJy1v8TTVLoI1FBDhMd0NRHP+s24zfzx0Oa6c2EMFfTtw1xw3LE kflzZ/VX+dBRYsGQnSL4ajMka4PFdCsjp3032NOUc6qSH9qNqalq2ktolpUp/ZU5mK4j30 CNQGHTdw65MuQboZK4nCTmcX8daOvdAASRvHVJHnU01ajxrLtIG/AjFx1Z9gyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722726651; a=rsa-sha256; cv=none; b=NcuLOAZXhBENTMnkCmWzAnRe0jbKQdqJ9A1KOSzEbe7m/V9vDiiQku61xndX+71THq/XvA UGXp9OJuTRjSUPcsm+ZvJIPpAA0dudXIXCS2mNX6Q1WZqoiZeaWBEiUAovySbRJVpIKtA/ CeEIw0NF4nMkPu/KI5/YfGfptnC+pQJWXSZZKoVpAnQNcggc4gpdj6HKmLngmJtp48jJ/H i93XYS3f4YWwhi6N22IfLGAvSBQzYDHRntyMPX6SkTWOILkpkI927o+gau/uz20obuFs5R o+vzoeUdk1Cut8x7p9aeZUFMT4id0LV2hci2sx9FZBUM2r8S0xAMsid6wAHyBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FBWtKk//eSCPDNwiMJ4GhSlO94YeLsZJqwHvwOUi1kw=; b=jNhQ7AbhV0INwz1P0KPjVzudOGQszTmkD9Ra2d98AKRBNDzgwf3kiOSLoudMnV400XqT8b iL/HMd/x5nWAeCXXVzKnPe2JLrnd9b8qUlrXxjIo9EOq8VQg2w6Aoc4AkjXjOn/zdSmxGf RKCcC2431xW2ONB/+L/9jav2sp+hPmKXGFkwKYFjjHGa/SqIO4vatYeyjKw85ZP7j72QNr fLlpQ4W1YSsorTvCYwXa6Ub4wcPfkm22PEST4Fcll+d2E8s+xYRgD7nwYegtzPSdmEW/68 K3yyFjWDqyjaJ773ubPo9XhPffsLNYI598BGyLv+zPzrBrLx06EyEkwrVuJQrg== 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 4Wbz2g5Hm7zW0F; Sat, 3 Aug 2024 23:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473NApkA006903; Sat, 3 Aug 2024 23:10:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473NApda006900; Sat, 3 Aug 2024 23:10:51 GMT (envelope-from git) Date: Sat, 3 Aug 2024 23:10:51 GMT Message-Id: <202408032310.473NApda006900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f0b0eefe581f - stable/14 - tcp: use TCP_MAXWIN instead of 65535 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f0b0eefe581f5b476d7692fa06334e4c658ef737 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f0b0eefe581f5b476d7692fa06334e4c658ef737 commit f0b0eefe581f5b476d7692fa06334e4c658ef737 Author: Michael Tuexen AuthorDate: 2024-07-22 06:52:12 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 23:10:28 +0000 tcp: use TCP_MAXWIN instead of 65535 This is suggested by cc@. No functional change. Sponsored by: Netflix, Inc. (cherry picked from commit 37b3e6a660f551ceda412e2115748f3b97b2e615) --- sys/netinet/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 21f4d046d6c9..cb72ddbef947 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2422,7 +2422,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, /* * Ack processing. */ - if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { + if (SEQ_GEQ(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) { /* Checking SEG.ACK against ISS is definitely redundant. */ tp->t_flags2 |= TF2_NO_ISS_CHECK; } From nobody Sat Aug 3 23:13:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wbz5G38xjz5RWp9; Sat, 03 Aug 2024 23:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wbz5G1X0Sz4QqW; Sat, 3 Aug 2024 23:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yswoB8My7ipqjBDVnfx8sdDQJlQ8mCV+HEu+HSl57OY=; b=uwLZq3ndgM8xjVOAEgq8Ha03AnSkOA4gN8F6HfjHHDBNN1BJd6TrUvTLp5O2qG/cZa22ZM 04r97fxAsnezrV/2JbypigU+ijJi+fhorR/MKz81HhQooSy+G7RUXU7F1j9KCmNHsVUtAt P9/coGc40HLk/lUHeojOq9wdZz22OJ+7lRPS3CJ+pQ2M3v1VzF9XwjA3KbDvtpFAwGIuoG /MTJK7cwNnNvcNVa4ZrRjhwf5lSB+Upw337LKPgqkXkr9tR7t4P7Jb5OsmZ3+U2wQHHsHA aLeuHW14o0+ObJicagYfpI+rFsF/nHqy1FMEX47839gcdUQk3FPgLDjnAcfNSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722726786; a=rsa-sha256; cv=none; b=BXv1cgRjyAZDH3uVxH17IGrjoubguvGgORJ07EOHG1+5UhKkihAyaGWEsYlM3qO6GYB+hb v0fcgdlp2KOTEJp2nsu+m/kcHMycwGGn9w7b4tyHN71S4VTP++rJCntHwPMm8KtoeGKygi 1gYWL55PYYXzMtP0eRZjInFiBgm6lBhMnBa/i7mTz1lNNDUliMCo+ARlkiXulDvAKh2OS6 OCVwgIKMgWliOhJd3OvRsjlWgySD2RNh0lGsVYsoxg3Qj9xQxXN7KCi9Q2aRb0RKwS3+7R hDxeukKYmjHHtgs8678Pclmlj7efSRsXJV0KgVefl442zJmBsHRnAZGywChu6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722726786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yswoB8My7ipqjBDVnfx8sdDQJlQ8mCV+HEu+HSl57OY=; b=Y34Y87yk6U3smSUvYcRb6FaWQgF//DY8iZULz1WE9zRPVT2ZUVACv2b9O8ks9/SiI2/G1H Mf7eppIyxzdvyzQ6Xv9xm1i46QgLmIIDAo1l512CT6DFjaW3L/KZqbBF//UD/zHv+gfzvB aagMk7zJ3AngqHZvlaLY/F7pVpO3xXskV2+IV/EBfgAXK4iGva2mk3kbBjwWkGMWFaAc8w G8GHOXSh0P9vlvrlz6p2jToH7u4/A0HJq9QMC//UB1Pt292mZU2AuDqDwdNUm5JV0rTYiT jJqj6lPfyzm+6vadOhOnNGGnjC78ULqLnJ/hxgc2bmP7/WiF85GwD7KriidUjQ== 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 4Wbz5G0SLYzX4j; Sat, 3 Aug 2024 23:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473ND549012621; Sat, 3 Aug 2024 23:13:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473ND5f6012618; Sat, 3 Aug 2024 23:13:05 GMT (envelope-from git) Date: Sat, 3 Aug 2024 23:13:05 GMT Message-Id: <202408032313.473ND5f6012618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 25d9ade9aa50 - stable/14 - tcp: implement challenge ACK throttling for the base stack List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 25d9ade9aa50b22eb5fb0b6aaabbc808fb076c18 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=25d9ade9aa50b22eb5fb0b6aaabbc808fb076c18 commit 25d9ade9aa50b22eb5fb0b6aaabbc808fb076c18 Author: Michael Tuexen AuthorDate: 2024-07-25 11:54:52 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 23:12:28 +0000 tcp: implement challenge ACK throttling for the base stack Implement ACK throttling of challenge ACKs as described in RFC 5961. Reviewed by: Peter Lei, rscheff, cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46066 (cherry picked from commit 40299c55a05ff008102e24269d5f2d7fa7b6842d) --- sys/netinet/tcp_input.c | 15 +++------------ sys/netinet/tcp_subr.c | 39 +++++++++++++++++++++++++++++++++++++++ sys/netinet/tcp_var.h | 6 ++++++ 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index cb72ddbef947..500d208b7756 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2187,10 +2187,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, } } else { TCPSTAT_INC(tcps_badrst); - /* Send challenge ACK. */ - tcp_respond(tp, mtod(m, void *), th, m, - tp->rcv_nxt, tp->snd_nxt, TH_ACK); - tp->last_ack_sent = tp->rcv_nxt; + tcp_send_challenge_ack(tp, th, m); m = NULL; } } @@ -2212,10 +2209,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, rstreason = BANDLIM_UNLIMITED; } else { tcp_ecn_input_syn_sent(tp, thflags, iptos); - /* Send challenge ACK. */ - tcp_respond(tp, mtod(m, void *), th, m, tp->rcv_nxt, - tp->snd_nxt, TH_ACK); - tp->last_ack_sent = tp->rcv_nxt; + tcp_send_challenge_ack(tp, th, m); m = NULL; } goto drop; @@ -2453,10 +2447,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, TCPSTAT_INC(tcps_rcvghostack); else TCPSTAT_INC(tcps_rcvacktooold); - /* Send a challenge ACK. */ - tcp_respond(tp, mtod(m, void *), th, m, - tp->rcv_nxt, tp->snd_nxt, TH_ACK); - tp->last_ack_sent = tp->rcv_nxt; + tcp_send_challenge_ack(tp, th, m); m = NULL; goto drop; } diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 9fc744c42e0c..e2b120223bc0 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2222,6 +2222,45 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, lgb->tlb_errno = output_ret; } +/* + * Send a challenge ack (no data, no SACK option), but not more than + * tcp_ack_war_cnt per tcp_ack_war_time_window (per TCP connection). + */ +void +tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) +{ + sbintime_t now; + bool send_challenge_ack; + + if (tcp_ack_war_time_window == 0 || tcp_ack_war_cnt == 0) { + /* ACK war protection is disabled. */ + send_challenge_ack = true; + } else { + /* Start new epoch, if the previous one is already over. */ + now = getsbinuptime(); + if (tp->t_challenge_ack_end < now) { + tp->t_challenge_ack_cnt = 0; + tp->t_challenge_ack_end = now + + tcp_ack_war_time_window * SBT_1MS; + } + /* + * Send a challenge ACK, if less than tcp_ack_war_cnt have been + * sent in the current epoch. + */ + if (tp->t_challenge_ack_cnt < tcp_ack_war_cnt) { + send_challenge_ack = true; + tp->t_challenge_ack_cnt++; + } else { + send_challenge_ack = false; + } + } + if (send_challenge_ack) { + tcp_respond(tp, mtod(m, void *), th, m, tp->rcv_nxt, + tp->snd_nxt, TH_ACK); + tp->last_ack_sent = tp->rcv_nxt; + } +} + /* * Create a new TCP control block, making an empty reassembly queue and hooking * it to the argument protocol control block. The `inp' parameter must have diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index e7cccd60a95e..f41fdaca13ac 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -461,6 +461,11 @@ struct tcpcb { /* TCP Fast Open */ uint8_t t_tfo_client_cookie_len; /* TFO client cookie length */ uint32_t t_end_info_status; /* Status flag of end info */ + sbintime_t t_challenge_ack_end; /* End of the challenge ack epoch */ + uint32_t t_challenge_ack_cnt; /* Number of challenge ACKs sent in + * current epoch + */ + unsigned int *t_tfo_pending; /* TFO server pending counter */ union { uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN]; @@ -1469,6 +1474,7 @@ int tcp_default_output(struct tcpcb *); void tcp_state_change(struct tcpcb *, int); void tcp_respond(struct tcpcb *, void *, struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, uint16_t); +void tcp_send_challenge_ack(struct tcpcb *, struct tcphdr *, struct mbuf *); bool tcp_twcheck(struct inpcb *, struct tcpopt *, struct tcphdr *, struct mbuf *, int); void tcp_setpersist(struct tcpcb *); From nobody Sat Aug 3 23:21:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbzGq5VVzz5RXSn; Sat, 03 Aug 2024 23:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbzGq4n5Bz4R7l; Sat, 3 Aug 2024 23:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722727283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUK3K5t8g1wnc/cE8rj9KXrHsvzKcASjhdtlwYTy95E=; b=JWqpwPN7WLaFwbSYDlmIFuHAhdWz9cQJguDTfTpyPjJ0aOVt/3Wnphk76wX/sDRDrpoCJj un+GU4a5LRGx5jEzN41nGNq6HTNCV3TO41+iXQBl0NIsAh7IF98Qkg9yAeMJCTk80P5y14 90NijU+6ffX4wavzHjppZffJYnkLORRZWFGGpO5JuvoPhgHm7iBppDnTyNUwqqntKb2Y/n bivRGWHicLCAF42BWwHNlhn3HJhEe/5JNd32KNqS/8dq7Q/tZnJU4UeXhj62MPYew8bNRc Uem68a9WTMlXHl5vkRIrU75Zi6x7vmojFAU8cx8/LeNTZaCwJF91bXdnPSGlxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722727283; a=rsa-sha256; cv=none; b=kroI3426vxHR2h0u3XZt1HOiNOyBxe1TXwJzeIq2dwMxlM8epkhbU3c0uxzfTgiGkPw3HV IMezFIDzlSvZEnp7pNIPZdgTecYfC+U9//kcEB0RU9wisfQoLrVJjesHu/+w+tKNSn3FPB /k8wcVV2WnzQFdrGDDAgJkx6K5oY4Qso7BR8CV4Vb52VTWVNg6im4MP4hUd2FZxkv6/YH1 DopGljWW1h2szjKG6SfLDF6czBgsh2FFoBNjjAXhVc0nUEMHKYwWRTAJ0HKnrQIIRPpm/W Vq3X0u25YaVcfNGe5x1kMI7yD1WdFjg2EdxCTPy2yDRah68qMgODqyvMoj8RTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722727283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUK3K5t8g1wnc/cE8rj9KXrHsvzKcASjhdtlwYTy95E=; b=R39oNke+8tj7+axZUlJNXkNrnF2WEylQ96zNm/G9PHxaPUTNil3leEnYMbKCAKaHxgCCfl oKlZ0kxmVFrbqRIAHSfSK2TTxuezEWYVWp3MK6b+PBNr1DyXzBoudrFnsp7p2kT3bVAU9X xJj4y0VmNivGXtJjru0Jp3y59ndVLtbpPLyWjGfZI5QunaVXuUbizGJb84LnTAUoKVCrdu BvRvk92QY4k1wCIF/dIakBfK3/07aBDSmocxI78mrkuSxePpaMBmSRQ3X3WoMRkxGSMi8A RBzQ0wxc4pgCjX63o3JU3X+9r0koAzXKs7sn0mb83iGu1Ot5zY++UgJr9bt95Q== 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 4WbzGq4LyqzXZP; Sat, 3 Aug 2024 23:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473NLNkM024406; Sat, 3 Aug 2024 23:21:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473NLNbp024403; Sat, 3 Aug 2024 23:21:23 GMT (envelope-from git) Date: Sat, 3 Aug 2024 23:21:23 GMT Message-Id: <202408032321.473NLNbp024403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 4401d7b362b1 - stable/14 - tcp: vnetify sysctl variables ack_war_timewindow and ack_war_cnt List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4401d7b362b18d867b50eefe1b6258760c8c9870 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=4401d7b362b18d867b50eefe1b6258760c8c9870 commit 4401d7b362b18d867b50eefe1b6258760c8c9870 Author: Michael Tuexen AuthorDate: 2024-07-28 20:36:34 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 23:19:29 +0000 tcp: vnetify sysctl variables ack_war_timewindow and ack_war_cnt As suggested by glebius@. While there, improve the documentation. Reviewed by: Peter Lei, cc Sponsored by: Netflix, Inc Differential Revision: https://reviews.freebsd.org/D46140 (cherry picked from commit 4036380e029708f5d6ad7aa599ce1bba9d7c067b) --- share/man/man4/tcp.4 | 20 +++++++++++++++++++- sys/netinet/tcp_stacks/rack_bbr_common.c | 16 ++++++++-------- sys/netinet/tcp_subr.c | 24 +++++++++++------------- sys/netinet/tcp_var.h | 4 ++++ 4 files changed, 42 insertions(+), 22 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 1f5cc7734bbf..da88a30bf86a 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -33,7 +33,7 @@ .\" .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" -.Dd July 21, 2024 +.Dd July 28, 2024 .Dt TCP 4 .Os .Sh NAME @@ -434,6 +434,17 @@ branch of the MIB, which can also be read or modified with .Xr sysctl 8 . .Bl -tag -width ".Va v6pmtud_blackhole_mss" +.It Va ack_war_timewindow , ack_war_cnt +The challenge ACK throttling algorithm defined in RFC 5961 limits +the number of challenge ACKs sent per TCP connection to +.Va ack_war_cnt +during the time interval specified in milliseconds by +.Va ack_war_timewindow . +Setting +.Va ack_war_timewindow +or +.Va ack_war_cnt +to zero disables challenge ACK throttling. .It Va always_keepalive Assume that .Dv SO_KEEPALIVE @@ -1080,6 +1091,13 @@ when trying to use a TCP function block that is not available; .%T "The Addition of Explicit Congestion Notification (ECN) to IP" .%O "RFC 3168" .Re +.Rs +.%A "A. Ramaiah" +.%A "R. Stewart" +.%A "M. Dalal" +.%T "Improving TCP's Robustness to Blind In-Window Attacks" +.%O "RFC 5961" +.Re .Sh HISTORY The .Tn TCP diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index 4a4a8af2bd78..b218f449475f 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -535,8 +535,8 @@ void ctf_ack_war_checks(struct tcpcb *tp, uint32_t *ts, uint32_t *cnt) { if ((ts != NULL) && (cnt != NULL) && - (tcp_ack_war_time_window > 0) && - (tcp_ack_war_cnt > 0)) { + (V_tcp_ack_war_time_window > 0) && + (V_tcp_ack_war_cnt > 0)) { /* We are possibly doing ack war prevention */ uint32_t cts; @@ -550,9 +550,9 @@ ctf_ack_war_checks(struct tcpcb *tp, uint32_t *ts, uint32_t *cnt) if (TSTMP_LT((*ts), cts)) { /* Timestamp is in the past */ *cnt = 0; - *ts = (cts + tcp_ack_war_time_window); + *ts = (cts + V_tcp_ack_war_time_window); } - if (*cnt < tcp_ack_war_cnt) { + if (*cnt < V_tcp_ack_war_cnt) { *cnt = (*cnt + 1); tp->t_flags |= TF_ACKNOW; } else @@ -772,8 +772,8 @@ __ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, KMOD_TCPSTAT_INC(tcps_badrst); if ((ts != NULL) && (cnt != NULL) && - (tcp_ack_war_time_window > 0) && - (tcp_ack_war_cnt > 0)) { + (V_tcp_ack_war_time_window > 0) && + (V_tcp_ack_war_cnt > 0)) { /* We are possibly preventing an ack-rst war prevention */ uint32_t cts; @@ -787,9 +787,9 @@ __ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, if (TSTMP_LT((*ts), cts)) { /* Timestamp is in the past */ *cnt = 0; - *ts = (cts + tcp_ack_war_time_window); + *ts = (cts + V_tcp_ack_war_time_window); } - if (*cnt < tcp_ack_war_cnt) { + if (*cnt < V_tcp_ack_war_cnt) { *cnt = (*cnt + 1); send_challenge = 1; } else diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index e2b120223bc0..a2424f2ab4d6 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -193,16 +193,14 @@ SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, sad_low_pps, &tcp_sad_low_pps, 100, "What is the input pps that below which we do not decay?"); #endif -uint32_t tcp_ack_war_time_window = 1000; +VNET_DEFINE(uint32_t, tcp_ack_war_time_window) = 1000; SYSCTL_UINT(_net_inet_tcp, OID_AUTO, ack_war_timewindow, - CTLFLAG_RW, - &tcp_ack_war_time_window, 1000, - "If the tcp_stack does ack-war prevention how many milliseconds are in its time window?"); -uint32_t tcp_ack_war_cnt = 5; -SYSCTL_UINT(_net_inet_tcp, OID_AUTO, ack_war_cnt, - CTLFLAG_RW, - &tcp_ack_war_cnt, 5, - "If the tcp_stack does ack-war prevention how many acks can be sent in its time window?"); + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_ack_war_time_window), 0, + "Time interval in ms used to limit the number (ack_war_cnt) of challenge ACKs sent per TCP connection"); +VNET_DEFINE(uint32_t, tcp_ack_war_cnt) = 5; +SYSCTL_UINT(_net_inet_tcp, OID_AUTO, ack_war_cnt, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_ack_war_cnt), 0, + "Maximum number of challenge ACKs sent per TCP connection during the time interval (ack_war_timewindow)"); struct rwlock tcp_function_lock; @@ -2224,7 +2222,7 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, /* * Send a challenge ack (no data, no SACK option), but not more than - * tcp_ack_war_cnt per tcp_ack_war_time_window (per TCP connection). + * V_tcp_ack_war_cnt per V_tcp_ack_war_time_window (per TCP connection). */ void tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) @@ -2232,7 +2230,7 @@ tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) sbintime_t now; bool send_challenge_ack; - if (tcp_ack_war_time_window == 0 || tcp_ack_war_cnt == 0) { + if (V_tcp_ack_war_time_window == 0 || V_tcp_ack_war_cnt == 0) { /* ACK war protection is disabled. */ send_challenge_ack = true; } else { @@ -2241,13 +2239,13 @@ tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) if (tp->t_challenge_ack_end < now) { tp->t_challenge_ack_cnt = 0; tp->t_challenge_ack_end = now + - tcp_ack_war_time_window * SBT_1MS; + V_tcp_ack_war_time_window * SBT_1MS; } /* * Send a challenge ACK, if less than tcp_ack_war_cnt have been * sent in the current epoch. */ - if (tp->t_challenge_ack_cnt < tcp_ack_war_cnt) { + if (tp->t_challenge_ack_cnt < V_tcp_ack_war_cnt) { send_challenge_ack = true; tp->t_challenge_ack_cnt++; } else { diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index f41fdaca13ac..9ba13b779616 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1278,6 +1278,8 @@ VNET_DECLARE(int, tcp_log_in_vain); VNET_DECLARE(int, drop_synfin); VNET_DECLARE(int, path_mtu_discovery); VNET_DECLARE(int, tcp_abc_l_var); +VNET_DECLARE(uint32_t, tcp_ack_war_cnt); +VNET_DECLARE(uint32_t, tcp_ack_war_time_window); VNET_DECLARE(int, tcp_autorcvbuf_max); VNET_DECLARE(int, tcp_autosndbuf_inc); VNET_DECLARE(int, tcp_autosndbuf_max); @@ -1328,6 +1330,8 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_path_mtu_discovery VNET(path_mtu_discovery) #define V_tcbinfo VNET(tcbinfo) #define V_tcp_abc_l_var VNET(tcp_abc_l_var) +#define V_tcp_ack_war_cnt VNET(tcp_ack_war_cnt) +#define V_tcp_ack_war_time_window VNET(tcp_ack_war_time_window) #define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) #define V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc) #define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max) From nobody Sun Aug 4 10:23:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFyc46Xmz5SXyr; Sun, 04 Aug 2024 10:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFyc2ynGz4CB1; Sun, 4 Aug 2024 10:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8jm8E8UBN+mirj/qfY8hWzz7XblUgDoq/MUw6qB+Oag=; b=UxMHdTECTxy6WtgI0Ic6srkkXBG+Ad568nrGiEkzyYFY0RpgFGO8+ro9ULtkVobpHAH82j 7ziJRHwEHaAT2tSToQMivRZxr0Fwxl8MWL5HGqcVJpVteWVCOFuXinsXoCBjyPo4YXe2EN ZXi+foi2JtaC1bLtz5tCSTimSby4R+Wvm/6ygc40RBUhbpcgzALrveGcg8sbm5Ja18Ly9Q zVuSI1h/3DFbclM8Un8dVDPS0FGE5MCsxgoRVS/XoVUgtZVD8bl6rA2+0DUjD7MBWkp3Yr LgIMnpt7UyWdmMPn5s1zbGezk2WcpBTfL0SqUnzmBwirsbyTlgZMxVhT8hTcIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767000; a=rsa-sha256; cv=none; b=wmAuKEBdDBpHFOVj32CcZV8dKmXcooyqrnWSVX1qTg1lNjC6Cl5Cjl2AHFvhEaCGNELc+I KE2pzyRDAAionObW4W8Fiske+oGqF79a6C0ZqYhvUKvsRVcL3Ca59atiPbJ3xf6YFNb1Vt QV9aIiuBm/ETb+uJlY1CeGgbMejnPBbUjPZvn+s/oR31+FL1RfqEiCCXhCGfJgKqX34fid njdSwBslhsksuF9r+QnOPV0dyy1YXomnduGbFyQJ8O5RrEqw/64F+ykdWIq7SifsTAJZsE yisqzoCIWRRaANpfkgkRhuTAogfO7iC6mOAW++fM8pSuabRgkShPFFejSoT4qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8jm8E8UBN+mirj/qfY8hWzz7XblUgDoq/MUw6qB+Oag=; b=phJAlkR/2CXWS7QqsvccCX2NWXRI1V/hjPSsS3uoZX3t0NIdyK3CVaaWgettIMjpEet1eJ jxCBIeW52hDV+2sPFIDNcGiyIU9J1ydxlqYAr8C834spwO7JOrsX+Gb5ff/2faZKguh1V6 NzArnq28uzkmdcOYoZ0VLY7Wqa1BV5PNbRQJqR2o/GnF0Q/r6zDmZRByiiZP6fsS/Y4O7T WSx3mdNhhcza3ME1v5baQRcRTU2j8I2d+ryQDfO0EipmIxLdjvXOfaoPqWOEFSS3IZz0/4 xmjUJQ65q2I9cB6XPbQMhHSBU9bxw5oUOToU04nErDavcy8dRKiaYa4AseD39Q== 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 4WcFyc2ZB7zrdr; Sun, 4 Aug 2024 10:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474ANKip045607; Sun, 4 Aug 2024 10:23:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474ANKDP045604; Sun, 4 Aug 2024 10:23:20 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:23:20 GMT Message-Id: <202408041023.474ANKDP045604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e656c69b8d50 - stable/14 - Fix enum warning in heimdal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e656c69b8d50ab13a08d315d49f289287b97f83a Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e656c69b8d50ab13a08d315d49f289287b97f83a commit e656c69b8d50ab13a08d315d49f289287b97f83a Author: Dimitry Andric AuthorDate: 2024-07-30 18:31:47 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:02 +0000 Fix enum warning in heimdal This fixes a clang 19 warning: crypto/heimdal/lib/krb5/deprecated.c:75:17: error: comparison of different enumeration types ('krb5_keytype' (aka 'enum ENCTYPE') and 'enum krb5_keytype_old') [-Werror,-Wenum-compare] 75 | if (keytype != KEYTYPE_DES || context->etypes_des == NULL) | ~~~~~~~ ^ ~~~~~~~~~~~ In https://github.com/heimdal/heimdal/commit/3bebbe5323 this was solved by adding a cast. That commit is rather large, so I'm only applying the one-liner here. MFC after: 3 days (cherry picked from commit 6f25b46721a18cf4f036d041e7e5d275800a00b3) --- crypto/heimdal/lib/krb5/deprecated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/krb5/deprecated.c b/crypto/heimdal/lib/krb5/deprecated.c index e7c0105ebf7f..02cf7614f932 100644 --- a/crypto/heimdal/lib/krb5/deprecated.c +++ b/crypto/heimdal/lib/krb5/deprecated.c @@ -72,7 +72,7 @@ krb5_keytype_to_enctypes_default (krb5_context context, unsigned int i, n; krb5_enctype *ret; - if (keytype != KEYTYPE_DES || context->etypes_des == NULL) + if (keytype != (krb5_keytype)KEYTYPE_DES || context->etypes_des == NULL) return krb5_keytype_to_enctypes (context, keytype, len, val); for (n = 0; context->etypes_des[n]; ++n) From nobody Sun Aug 4 10:23:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFyd5G65z5SYTB; Sun, 04 Aug 2024 10:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFyd4FvDz4BrB; Sun, 4 Aug 2024 10:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jGQ1IGcFQyeg4vxc5SVTPgK2u/5ZJvT2DQEBWUXEZdU=; b=Yh7CzeSFBWieb+fWQEs01aycqSYvL04XXIyyWIaccV9t+6eQi3J+ufaVkYSRy/6QfpCy85 JfjqO3VGRxnsGABP0wyiVn2VfiXz1TuJrZrSZQxxzIDoZTu0TIPEk4ofLjFqQQjixTTmb+ 4fYOywobUQgo7gRrtC6kBPNBEDRsYj4KS6sbwVkCYEL2hsPwC006jq0/5Lt9GDyzV4R0ON xZc0woYBAb8it6ZoW5mp0bb7uOfcnnsz2T7nK1p/3pasLS4pMtmkJe9hrJknjnjq+eKKE2 NNVkRd3T8RAl8uFOd8IMvu2Cl3BDDrytInA9Ouhwvey+s6MX58qG56VLkmTCSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767001; a=rsa-sha256; cv=none; b=BQrAE+Dr3UOaJ0FmQ+VcfiPrJE9LjudgNWfYs1qnW7e0LSBZzottfd8H6B1P5CBXzNVtjy rPlADOi3cvXLpZIVn/hfAZEpPxqP+swocARDurPCNXWMGFuQrMNpXXB2I/XJaGgAQf0Fv1 eTr/qaKEPsCa74FUV6F7sU9RuwzWl+9Qjjy1j9vJYEz/VY1VNr6hfitBGB1ZZLUYVwdnsq 5ytVgD1g5+B/h5LkkAm/Q2ut3wt+k80VeP07Zh+8lSWq6WkhxBj4MFvMRO42ziN7gEL0D1 HBmTyyiDcCH7mGtNaTVBWsdShOcXK0+f+0tydvmS+MumwMI/iCEUWI6CsgI0rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jGQ1IGcFQyeg4vxc5SVTPgK2u/5ZJvT2DQEBWUXEZdU=; b=lWIlcNbhu28CG6zIfkNO8kyV2ABZZbQEf8G7ulpLMjShZZ+0T4MkxHyoFRUxCXUHe20rkd JgEkUI9Bq9C026yHg44K5HyURPwa/qBgKqImg5G1mnTgtEjVUkaSjeipx3ipGo4T9TIGrB mPNoKEu/9OKUIM3F63xxfx/3eXk1sr2UEbgEOdrKk+rJQM/AH+1q9fgwH69an5cC/bE5zA FmyoJJ7ttAwi2jUN1d1eg8YEkXwQT0UvTEXao0pObZrGnTunHAk4kYkWratNBB18uL6PcZ LDU87U1PAGluSNn6lBiHcy4oeMIcPLGwP05Y6Hwv0M0wkqr/+MJSTHzV1xalBw== 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 4WcFyd3sN1zs9J; Sun, 4 Aug 2024 10:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474ANLlJ045652; Sun, 4 Aug 2024 10:23:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474ANLeU045649; Sun, 4 Aug 2024 10:23:21 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:23:21 GMT Message-Id: <202408041023.474ANLeU045649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2b05d46dc32f - stable/14 - Fix incorrect -I option in sys/conf/Makefile.arm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2b05d46dc32f89f915ed3f75b988925b43ebcd7a Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2b05d46dc32f89f915ed3f75b988925b43ebcd7a commit 2b05d46dc32f89f915ed3f75b988925b43ebcd7a Author: Dimitry Andric AuthorDate: 2024-07-31 19:23:41 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:10 +0000 Fix incorrect -I option in sys/conf/Makefile.arm In commit 8e53cd7099436 the intent was to add sys/dts/include to the compiler include path, but this was spelled incorrectly, leading to an error with clang 19: cc: error: no such include directory: '$/dts/include' [-Werror,-Wmissing-include-dirs] Use the spelling -I$S/dts/include instead. MFC after: 3 days (cherry picked from commit 8ce3e489a5eec1b41bc5e08f43c5e95aa8115b93) --- sys/conf/Makefile.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index af6ce7136636..5195191e0156 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -29,7 +29,7 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include -I$$/dts/include +INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include -I$S/dts/include LINUX_DTS_VERSION!= awk '/freebsd,dts-version/ { sub(/;$$/,"", $$NF); print $$NF }' $S/dts/freebsd-compatible.dts CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" From nobody Sun Aug 4 10:23:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFyf70rfz5SYTD; Sun, 04 Aug 2024 10:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFyf5Jwsz4BPB; Sun, 4 Aug 2024 10:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cV/jcPWc9fxh+89lHvK5doB6h/Qeexzrg8IV36yVvBE=; b=EHewHolY44e4nCen8tOjd2My4cJJuIFpy9sXJPUEKLoNSxDdVEI8X6RlbRnAtF/Fe4iQy0 R47xNlZ8uFhcacXGxhcYoaGYf8a5i5A33F1sztsxcmcahwVa/fUAiGZFwgna5loEjFwgGX zByuDN9TaiWNPJr69BKRTbSZ9PJB9ErJdS+NxYwX7m0IXXBQTPPRgi539bOFXvV3ThsULm 3AlyOpn7EbQDNKCsFTh6YlAqcLDoCeDzN/zBY58bGXb2CjhCesrH9ZWz3tT1zcY4770N5P 3e7RCmERVa5BuOqHiCWjZxhrVPe6ug+geJtHuNnpOqiU6l9O4tDtU3lY2akcnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767002; a=rsa-sha256; cv=none; b=m/latpn31urYiQ8AuUXy5Uh/I95RA8SmRQH2mhm+KTdR8ed/NmunxHjxGPZGC4U6kH2z5f nrMWcFk0js8iUIZbpxXMHrWPr18XVhrvEqYn2Vr/OK2hw8vG9AVqM3SMhA2YEKWHnhJ7i+ LT1S2eoS0fM0I9HhjqRtIdNX/U3oGBHmNgsdixAqTQQ/8qfZkMdErzCkv+QmDq5UExqxaJ 3m/Pk/ChE+0MLgNTDVTC9aX1jb/g1z7Gs2BBY2KWLVResjGJNeuwNOkwR5ltj447Sek7HL u1GZSKp8MEssaEviKmhfvxjCzoKdyvPvxRfpYzMLytmVz68bEr++D36tninUIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cV/jcPWc9fxh+89lHvK5doB6h/Qeexzrg8IV36yVvBE=; b=rrXk+sxRvlvni3By83+5yv1fkvmDCrPVms+zo6YxB6S4TMHbdHG0laNnI0vwkCk9Ht0umZ 5it3pCNsBAIBoUriL5/DWJm5BUDNwVgUGOMb/hBamlfdG6zSKMxropFGMqMqxK4af4MeXh /Y1ppqkxn3QFbePFPsmkY9zFI0+NHmLqpRE5Q/X+2/qx3PCmKWh9H2v5S5tP4TelwyzsWb HiIdIG1ms/Obwyx96ssNbK/d4fnllNXOc6anFoQKMr6Aay2KRswIc05zAdhdaujwqdCBM4 hfRtWCnhsYvWBNbgy2MNFOyQXvxa7d7KuqXl6WojULFstizRAu/SM/TasXxxSg== 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 4WcFyf4vWCzsCn; Sun, 4 Aug 2024 10:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474ANMVX045694; Sun, 4 Aug 2024 10:23:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474ANM0e045691; Sun, 4 Aug 2024 10:23:22 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:23:22 GMT Message-Id: <202408041023.474ANM0e045691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7ffa2d91fbdf - stable/14 - Fix enum warning in isci List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ffa2d91fbdf2cc9984c1cfdcb475c783308b7ad Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7ffa2d91fbdf2cc9984c1cfdcb475c783308b7ad commit 7ffa2d91fbdf2cc9984c1cfdcb475c783308b7ad Author: Dimitry Andric AuthorDate: 2024-07-31 11:14:17 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:16 +0000 Fix enum warning in isci This fixes a clang 19 warning: sys/dev/isci/scil/scif_sas_smp_remote_device.c:197:26: error: comparison of different enumeration types ('SCI_IO_STATUS' (aka 'enum _SCI_IO_STATUS') and 'enum _SCI_STATUS') [-Werror,-Wenum-compare] 197 | if (completion_status == SCI_FAILURE_RETRY_REQUIRED) | ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ The `completion_status` variable is of type `SCI_IO_STATUS`, not `SCI_STATUS`. In this case, we can seamlessly replace the value with `SCI_IO_FAILURE_RETRY_REQUIRED`, which is numerically equal to `SCI_FAILURE_RETRY_REQUIRED`. MFC after: 3 days (cherry picked from commit 1bd66fac35ec27fa64d6158f82fdcbdc26098679) --- sys/dev/isci/scil/scif_sas_smp_remote_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/scif_sas_smp_remote_device.c b/sys/dev/isci/scil/scif_sas_smp_remote_device.c index d6055adc13f9..c72402f66889 100644 --- a/sys/dev/isci/scil/scif_sas_smp_remote_device.c +++ b/sys/dev/isci/scil/scif_sas_smp_remote_device.c @@ -194,7 +194,7 @@ SCI_STATUS scif_sas_smp_remote_device_decode_smp_response( //if Core set the status of this io to be RETRY_REQUIRED, we should //retry the IO without even decode the response. - if (completion_status == SCI_FAILURE_RETRY_REQUIRED) + if (completion_status == SCI_IO_FAILURE_RETRY_REQUIRED) { scif_sas_smp_remote_device_continue_current_activity( fw_device, fw_request, SCI_FAILURE_RETRY_REQUIRED From nobody Sun Aug 4 10:23:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFyh48KYz5SY4D; Sun, 04 Aug 2024 10:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFyg6SBgz4CMP; Sun, 4 Aug 2024 10:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DuLtkTJgQvVYr7Kle/Th88Ah+aDSC1jQ/OuvTxCgRv8=; b=N+LMKJ09RBi03uDJMzB/oSxD3BnkBHIkbtdFEN9JED4zPe7wRhpOD6TbMLGvv+vX9124SV /eyPSO7hQn4cO3QOQnF0aa2te4cy6h+ZU9ddFnxwFPawWnlQGm/slUABWsYI9cvMb965VX wSiLI3o/vS9OgNhCRSWyEF9TAIET9LRZo4pddMJ8s/iYapqIqKayL1G/Eg/3ljocFClByI R7Kndpzq9C3q64x2UP67ak3H5AgzvuVMeBFIPOxMgmk3qzIRNZD+eOjT+Dz6WJiwgyfLct YIfMYAWnY23pXrENkuwJtT7KnN+6E7fEdXfdhOJQ9Q15Xs+lgSXNOUndAGwj3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767003; a=rsa-sha256; cv=none; b=DCPyBIu7Vldv+CO6anrKIkRF5uhRohkQUe5bYqLtWnUnfR3wOsztur0Og9NgzL1W5KqwQK Kaa/wSttdMEW+N83zbuJ2x4rqF6rGHMuQGsnkUjNv+nhdR3O+IT42PN8g9ndeO2s+r6bCa SQ0YSJsGkagutc5umHIbIggq8U4+j9ADMDB5OGd3MYmAxW8E4F/thgS8tUkGF6qn/+FK/F 0V7MWTOzWXJGOGOgeyY+lzPV71iFzT+CuFX1B/e+u3p0kghdob6cq0u3mNeSSrg1RMszgT Al5qShzcuSf0k6RnC/q65qt8/cb5StShvI3vtvTYmQ+OzLXu4oSi+YPdQXmxLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DuLtkTJgQvVYr7Kle/Th88Ah+aDSC1jQ/OuvTxCgRv8=; b=m66axotdsLY33L7B7oir+bWTgRdb2HQuXnma2gcBEXGWiTBA7ERCOSZlE/DUzsqnWLl7Yv ema/nNZyagD0PpFhdcIOqFTHFGPJ0Wg3tyw1aVdxWpRz8Ov5yXIRWeTJqEdK9jkAXa+sFw EfuTVKCMSHqPNfoPjQrH31NKn+6aq+F3gRB0wBIC+4u4iRTwoagHLjRra4dvS+da3h00yQ lLfaDAERkxDkbvThf+Nb9UEV49bPmtwfX4T4W3yBMUHYDyQT7wK2UJBvi/4POc7oFrFrqY HS7pddA+esqXsTvvhVXuq/COvLKQufNmorRp7iTSAyPGx9/WscN1XTXfvX2rMw== 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 4WcFyg5x7rzs8h; Sun, 4 Aug 2024 10:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474ANNEo045736; Sun, 4 Aug 2024 10:23:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474ANNpK045733; Sun, 4 Aug 2024 10:23:23 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:23:23 GMT Message-Id: <202408041023.474ANNpK045733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: fa59de726fa2 - stable/14 - Fix enum warning in keyserv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: fa59de726fa2ed25c79ca8400b38f9feab905f85 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fa59de726fa2ed25c79ca8400b38f9feab905f85 commit fa59de726fa2ed25c79ca8400b38f9feab905f85 Author: Dimitry Andric AuthorDate: 2024-07-30 22:35:03 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:22 +0000 Fix enum warning in keyserv This fixes a clang 19 warning: usr.sbin/keyserv/crypt_server.c:237:53: error: comparison of different enumeration types ('des_mode' (aka 'enum des_mode') and 'enum desmode') [-Werror,-Wenum-compare] 237 | if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { | ~~~~~~~~~~~~~~ ^ ~~~ The type of `argp->des_mode` (aka `desargs::des_mode`) is `enum des_mode` from `/usr/include/rpcsvc/crypt.h`, not `enum desmode` from `/usr/include/rpc/des.h` (which is used in `struct desparams`). Luckily the integer values of `enum desmode`'s `CBC` and `ECB` are identical to those of `enum des_mode`'s `CBC_DES` and `ECB_DES`, so replace both values. MFC after: 3 days (cherry picked from commit 1d5a5500ad4b1f5187f40baaf58ab6868b18fc08) --- usr.sbin/keyserv/crypt_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c index 04290326cf3b..ccd593fe4e97 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -236,9 +236,9 @@ des_crypt_1_svc(desargs *argp, struct svc_req *rqstp) * getting ECB mode. */ #ifdef BROKEN_DES - if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { + if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC_DES) { #else - if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB) { + if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB_DES) { #endif int i; char *dptr; From nobody Sun Aug 4 10:23:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFyj3b9cz5SY6W; Sun, 04 Aug 2024 10:23: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFyj0BqXz4CQC; Sun, 4 Aug 2024 10:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yXmG8vf36rLS0jeCmaLW58shyaHIBaIVH4XbP2/lcoU=; b=bVU2dkWTJPBpihqG0Fp7L8Z+P+GCJVXMsWQS7lRndBJKtMKtCe2svSi3LkjwJqWzeVcoq0 1FmkbrIpTHZUm2nQdtxRNnVlSAMnz4VjIx09T/h3gK9whe2GORtKMyoVDSJTkosy+jD+It YuHvdZw0Jclif5skIIpUKhy0RH0YWw/CxnXdh5c+J4DeJY7D7rSQA4HqFHWquBM9SAFO2D bDIXMfj3wjukmgyYJ/pcI6MCTFlob0W0Rgk/5mIcKdBTdbl2BdLGSo+RKA8LQAbxWhZ+h2 4O8JpM1cKskay0RwKKE9TFiXeSpJusUMLaGfP5rO2WJtydHXoWf0DbWv+TjzNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767005; a=rsa-sha256; cv=none; b=umF7U5YGJBdFBTst9XlbOdXnl7cZqmOlZy9sVkzBWXfMc5i03FjJom7l4ezuIr9TO2xctU +oCh2pVU54G/D0+nFEg0CO5oD2VWxT+RusiUc29PigwjHMmdLXQuDZq++dH1FaSTFUJtP0 a5N9QZni/1faN1IfWWngAopxqPz1PlE9I2yw/jWdRP1TuCWJXoLyl+pnrjha/deNocHtNg IWNo07DzFMBP0Djzmj6KbRFnXTisOFUp9yi1w9rXCRt9IG8AFQS1I5kvl9EtWYXC6nFZE2 8Fm1Z2xxhY/daL4uedAG5dTQ7gi1crJ0YCZkOSmA9g2B2ENGv+o7d8gfPWA/cQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yXmG8vf36rLS0jeCmaLW58shyaHIBaIVH4XbP2/lcoU=; b=TU/PK37Cqm6AXpDDImyFUzWTqhT6jkWW9pYfLF7b+8OJedVHOkDrHIGav3bgQAC36rHNUt yRIm3ju36ufQ2PXImS4nGe/qIK5VqstPMWZaie1iJVErkm06ii0C67X4dOQj+iKCWsVWui gLXt26PzRP7yhOuwzCXaUuykSoiUye3Fdv3OeCqFr/wrvmuOSWgYrnV+tg2vOFpTJU0SWi j1RqXshKh20Rc9LA+bvJnPBITn8JmU2tUy5zks1IxoKtoU4rAi2McTm8tItsxTtG4rA6Tn VaylyrusBAM7o3isw7igo0n92A9nTz1F6EJK5vf74u+he/OZT88KPFvuNsv5uw== 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 4WcFyh6v9Wzs0y; Sun, 4 Aug 2024 10:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474ANOrW045778; Sun, 4 Aug 2024 10:23:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474ANOXv045775; Sun, 4 Aug 2024 10:23:24 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:23:24 GMT Message-Id: <202408041023.474ANOXv045775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4b521ea870c7 - stable/14 - Fix enum warnings in qat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4b521ea870c733276811b2473a6648cbb0bea9f0 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4b521ea870c733276811b2473a6648cbb0bea9f0 commit 4b521ea870c733276811b2473a6648cbb0bea9f0 Author: Dimitry Andric AuthorDate: 2024-07-31 12:21:25 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:28 +0000 Fix enum warnings in qat This fixes a number of clang 19 warnings: sys/dev/qat/qat_api/common/compression/dc_session.c:154:15: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare] 154 | if (CPA_TRUE == pService->comp_device_data.enableDmm) { | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/dev/qat/qat_api/common/compression/dc_session.c:285:17: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare] 285 | (CPA_TRUE == pService->comp_device_data.enableDmm) ? | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `enableDmm` field of variable `comp_device_data` is of type `icp_qat_hw_compression_delayed_match_t`, not `CpaBoolean`. In this case, we can seamlessly replace the value with `ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED`, which is numerically equal to `CPA_TRUE`. MFC after: 3 days (cherry picked from commit 357378bbdedf24ce2b90e9bd831af4a9db3ec70a) --- sys/dev/qat/qat_api/common/compression/dc_session.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/qat/qat_api/common/compression/dc_session.c b/sys/dev/qat/qat_api/common/compression/dc_session.c index c92d6eebdc47..60f4410dac32 100644 --- a/sys/dev/qat/qat_api/common/compression/dc_session.c +++ b/sys/dev/qat/qat_api/common/compression/dc_session.c @@ -151,7 +151,8 @@ dcCompHwBlockPopulate(sal_compression_service_t *pService, } /* Set delay match mode */ - if (CPA_TRUE == pService->comp_device_data.enableDmm) { + if (ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED == + pService->comp_device_data.enableDmm) { dmm = ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED; } else { dmm = ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_DISABLED; @@ -282,7 +283,8 @@ dcCompHwBlockPopulateGen4(sal_compression_service_t *pService, hw_comp_lower_csr.hash_update = ICP_QAT_HW_COMP_20_SKIP_HASH_UPDATE_DONT_ALLOW; hw_comp_lower_csr.edmm = - (CPA_TRUE == pService->comp_device_data.enableDmm) ? + (ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED == + pService->comp_device_data.enableDmm) ? ICP_QAT_HW_COMP_20_EXTENDED_DELAY_MATCH_MODE_EDMM_ENABLED : ICP_QAT_HW_COMP_20_EXTENDED_DELAY_MATCH_MODE_EDMM_DISABLED; From nobody Sun Aug 4 10:23:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFyk5mn5z5SYTK; Sun, 04 Aug 2024 10:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFyk19d4z4CSJ; Sun, 4 Aug 2024 10:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iX5mmIMl3MlgRYg2rTzG5NgzZFbGZY0f/3DFc0r7J/M=; b=OwrG3d8KULO60saqTrL75nWrdONtrBJ9ihRpsamJ995Vmz9emUQLeRbtsZXZpD9Dpiq6Yy 395iRO4XFMP185GteMojMN1MQDhzFjaJ1UTeTXErb7wn35ADj+BMhyfuQ4uoTUBfVkJzrd NgwGcP5QdgQ9LNKUuI/+EKMSZz/j9kmLi3CF/w1ylukD0VXUIhIkDMW+T3lAFUInJadOi1 UrDpq6sNP/lS+FrsR4HFh7QpfYtpEApHx21LE0JxtGDDofLIoB0ymZd9e5Ccilg8WVD1C7 uQTmUfP0G3r2EAdnXMXfbE4Zj70UWjp1VuajRpuI1MivLiLhsPXb3v+S6PmBBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767006; a=rsa-sha256; cv=none; b=t4sollsSwBCwsdtGy9NokTipAsmU8r58RNO5BXy1ePRA0o95pJxOjI7UBoO1hSz+wFkS/p QgcjoNPBJQQ/GIUSRcy1jztntG8SGdrEfqAc4/lTVxRTlPMHFYzc4ZsGpMg37JZR82ogEQ hiYHGEIz7YaJL1LJLNG6V4vqQM6WOms3z27MWx48d+uhQH0eOv0scmzGkanpPSyBacRmjZ Baze1k9r0kLDpNHSwDx5yWlCRe7wp+Cpknncjuz853M+NjZSguzAvnkT3HhL7QgOzagdDI obq7VTFt1hnuDh7mt0AX0A89ITkCqDA3jth+i/eW99f1Ebb3D6FSnHG5VmuvAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iX5mmIMl3MlgRYg2rTzG5NgzZFbGZY0f/3DFc0r7J/M=; b=YUGkS2Ia7yOeowAD+75dZ4GvMVLJ5bw/1OgCUwPw/sD7opNzsSVwLZ1dd6Tg6JwokkLTjV BfqoBuQHRJ5sk3H6XA2aMF8K7kZSAxEWSFSEmdd2N3+On69OZkmqW91USHJfomxf9/t5tO 022+gN4JUSIBvBF++oZA6L5LdNR1Ma8JcXCZ+OX+kvJXGz6vinZiiYxxLiFsvtwrBo0YaX CHKHl/rBHQ9o5hD21sKx9bx+tWVcX7TixpOm9psjn6zOUmMA6Brkn2bak2d0RVKtAJuyfq tD2JKGaag0yPXO+pOkN1bQm5PaWYOw7G0NV9jsRu+qZbidyF1x22dnPUHvZoBA== 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 4WcFyk0nW3zs8j; Sun, 4 Aug 2024 10:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474ANQ2f045827; Sun, 4 Aug 2024 10:23:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474ANPGg045824; Sun, 4 Aug 2024 10:23:25 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:23:25 GMT Message-Id: <202408041023.474ANPGg045824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 646d5b96b41d - stable/14 - Fix enum warning in iavf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 646d5b96b41db9296a64569a58f83a7af11cd9ca Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=646d5b96b41db9296a64569a58f83a7af11cd9ca commit 646d5b96b41db9296a64569a58f83a7af11cd9ca Author: Dimitry Andric AuthorDate: 2024-07-31 11:01:20 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:33 +0000 Fix enum warning in iavf This fixes a clang 19 warning: sys/dev/iavf/iavf_lib.c:514:39: error: comparison of different enumeration types ('enum virtchnl_vsi_type' and 'enum iavf_vsi_type') [-Werror,-Wenum-compare] 514 | if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ The `vsi_type` field of `struct virtchnl_vsi_resource` is of type `enum virtchnl_vsi_type`, not `enum iavf_vsi_type`. In this case, we can seamlessly replace the value with `VIRTCHNL_VSI_SRIOV`, which is numerically equal to `IAVF_VSI_SRIOV`. MFC after: 3 days (cherry picked from commit 67be1e195acfaec99ce4fffeb17111ce085755f7) --- sys/dev/iavf/iavf_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iavf/iavf_lib.c b/sys/dev/iavf/iavf_lib.c index 883a722b3a03..f80e3765448f 100644 --- a/sys/dev/iavf/iavf_lib.c +++ b/sys/dev/iavf/iavf_lib.c @@ -511,7 +511,7 @@ iavf_get_vsi_res_from_vf_res(struct iavf_sc *sc) for (int i = 0; i < sc->vf_res->num_vsis; i++) { /* XXX: We only use the first VSI we find */ - if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV) + if (sc->vf_res->vsi_res[i].vsi_type == VIRTCHNL_VSI_SRIOV) sc->vsi_res = &sc->vf_res->vsi_res[i]; } if (!sc->vsi_res) { From nobody Sun Aug 4 10:24:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFzW6gJcz5SY4V; Sun, 04 Aug 2024 10:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFzW6Cdgz4Djq; Sun, 4 Aug 2024 10:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hNHrXTxTEmdoqwNjPkN0zaiIrD9oAxL8FXz/f5HNWy4=; b=pWDtdFRoBij1BVvFID9t5cUASLgsMuRxoz7whABQZ5BQnMyntemsj0f+sN7ouilfzfsgEh jR2HpKbuGHxjJqN8jDUFLi+dyv4427wSuUYlCmSa0Ja+QbeA3Fx9F3cyrxrb0SGGYhIWsG tzZm37VHoKZ38hAC1uqrUcxpSUchhpvxmuij+/4tXjkNGPpqoui4+AHslCSwBn5TRaX/bB nwvzqmbRKXPohZD+SUvIms5UZuU5NUkLogPRWz/E9agnBrbAuRult8ZiV8slgovpGh9Pvr yxwxWnMZhAj7obBrHjP9saRtuuU0yxFk+hxE0MOrWHqr+T709WITdxv0HE7ZqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767047; a=rsa-sha256; cv=none; b=kvcn8U2+GCRE/Xqr0eh0uG67CRdeYiLg0PzQFrRna4iUYRn4Q2LEzLupcXBfZUhN/6sLuf RDN1WD8Zw/S0vn7JophQY019PMYABargHIfWKPtqU+UDfceucDbpgluJxbRx35X2Pu5+wr Ogod8NckHAf+0GXJgHq4mkd6g+UHIALhC1TQRlMpbMDbQU94bHgAI3Mt6FmuUpoQr4/MT6 wvsj4tEc2/6qOIMUNFeR7Z7utfgZciGvDgsQtnzGbHm0/cMHk6RT/9zuK/Z50knhKGo4AR +ReNYeUsgDrxICt2l0yez4mi0hpQ0x1CVy4KqWWvfIjAqYlC/IKFV4ugRafkbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hNHrXTxTEmdoqwNjPkN0zaiIrD9oAxL8FXz/f5HNWy4=; b=KZ+PPNPSpdHM65VbWA2M38XcMmYhHLsAJKVZyqK4SaLLB/fFfLT/YxMD0VUXe5+anm5kw/ 5zfjW4FNaciKgyDh48Yc2VcLer/LfHpSrd8tWexpjffFQF/fqJstSi+UCRJoZcH8m/5XEz QP/0PvejznEsgaqKu6D0kGhxWUdVPBNK5xtT0KUPei2c2f8x0XfiY57jvtFA4eUVcQcFra 8yMmJfqfPC20PpA0gDh4JZtOmbqvQKz0HRrlwfYg5EVvXFKqBkH/5PQcKCUontXEnJQ8rM wv7SQbgwMHezjTnmxDTu5rShRRVXTrWv0Cpd1+TQnKWqZrP8qonhqeVdZziuNw== 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 4WcFzW5qSSzs9K; Sun, 4 Aug 2024 10:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474AO7YR046089; Sun, 4 Aug 2024 10:24:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474AO7aY046086; Sun, 4 Aug 2024 10:24:07 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:24:07 GMT Message-Id: <202408041024.474AO7aY046086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 86e5bb86772c - stable/13 - Fix enum warning in heimdal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 86e5bb86772cd61197b7b964c1c008223bfbbb32 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=86e5bb86772cd61197b7b964c1c008223bfbbb32 commit 86e5bb86772cd61197b7b964c1c008223bfbbb32 Author: Dimitry Andric AuthorDate: 2024-07-30 18:31:47 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:47 +0000 Fix enum warning in heimdal This fixes a clang 19 warning: crypto/heimdal/lib/krb5/deprecated.c:75:17: error: comparison of different enumeration types ('krb5_keytype' (aka 'enum ENCTYPE') and 'enum krb5_keytype_old') [-Werror,-Wenum-compare] 75 | if (keytype != KEYTYPE_DES || context->etypes_des == NULL) | ~~~~~~~ ^ ~~~~~~~~~~~ In https://github.com/heimdal/heimdal/commit/3bebbe5323 this was solved by adding a cast. That commit is rather large, so I'm only applying the one-liner here. MFC after: 3 days (cherry picked from commit 6f25b46721a18cf4f036d041e7e5d275800a00b3) --- crypto/heimdal/lib/krb5/deprecated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/krb5/deprecated.c b/crypto/heimdal/lib/krb5/deprecated.c index e7c0105ebf7f..02cf7614f932 100644 --- a/crypto/heimdal/lib/krb5/deprecated.c +++ b/crypto/heimdal/lib/krb5/deprecated.c @@ -72,7 +72,7 @@ krb5_keytype_to_enctypes_default (krb5_context context, unsigned int i, n; krb5_enctype *ret; - if (keytype != KEYTYPE_DES || context->etypes_des == NULL) + if (keytype != (krb5_keytype)KEYTYPE_DES || context->etypes_des == NULL) return krb5_keytype_to_enctypes (context, keytype, len, val); for (n = 0; context->etypes_des[n]; ++n) From nobody Sun Aug 4 10:24:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFzY2N3Fz5SYWy; Sun, 04 Aug 2024 10:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFzY0K0Zz4DfF; Sun, 4 Aug 2024 10:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXjkhAkHpAMTOtCvQQOlWY6RemW1v3xj22NCtY5abak=; b=rKDVBBWRTTDVkzUiQxhyTJupHG0Cg3OadYVBsUH3FZd5k3Pm0E+ws3YRnjj5HNnxYGlu2n 7xwiZkxyQqMUg35Y2AYHx3pW3dH0lSruX7hmj3T39BYtxFjx+GDKgAlUTf0efAT8PUtbsB geOdQrqZN5tBA9JyGipgzHfHrd58G6cvUENiytPd3/wAg3vEnV7RpFpLruwLKeDuK9jaD8 6NRYSk2heydpfpX7BquVtWntES0s88BVthqpaEtryq3mI3f3zn1WtNfgBOTgfutvqc5PhU x8JsSaJ/x5Mjj/v4YaXbQRsqQ54Fw1ySdceMJCztaefI5vsKi4y/iGlpXcuWgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767049; a=rsa-sha256; cv=none; b=v+GG25ADVeGN0XV5xI4x5Taz6OH4GrXCASn7yyrBW8Lxz+fDCSMNe4KhUX0ci8hdYFnBqn dWqPRfVVrW+T5cXMNzZnyzL2kQAGT4z7tBnccHePfi6DTMfhEI32PF06z/EU7EuFcP6qie CE0Yy36/fYaAeOOFWYfbDbtZNK0TiYGUmq+XrYVCCE95Zai91OXMM/wtKempLKJ/rViUIz /KROQ1qfNwSL08/vIbJ/aMKtU4Q/7BTIT7ivfxS346k6IW4miTlxN2ZkkAl53xT3oGJyJW W9YiAZmpggqEj0NSbryZ7gHYdFEAmwHiS+g+dzPfljde9a5XCd4FNRvSIIakQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXjkhAkHpAMTOtCvQQOlWY6RemW1v3xj22NCtY5abak=; b=Y16p/1ywCBV19fApcPJbFyJYvmwSI1Oj3vcnQsaO2ZbhwXDoEWuKsrxShqwjMFtBKenUrC Fp4/rc8V7qnWALJZaReOk+d796AUxohF20qei+ctvVGeinGg3ZqpDb2+DSUjhLp2d5Zfyk 5LHZ5cASlsl6QAddAIVWZ1NElrygEuIBJe1rsjsD2mzdiFyXETkAxedcUZLux3hGq29EWI P3QZq5XqEG/pUp7JBebzLp9E5SNUheDlYIZNzrMeoXNYwnVl5aBOxf++6niOxd7NyOIpfc W8FaVclYDDzcf/xO6hgqiKHgIrexo38gTTUg8P1dlF1MTiHFoFiWgVzP/zwTYA== 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 4WcFzX72pczrhj; Sun, 4 Aug 2024 10:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474AO8qV046131; Sun, 4 Aug 2024 10:24:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474AO8YD046128; Sun, 4 Aug 2024 10:24:08 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:24:08 GMT Message-Id: <202408041024.474AO8YD046128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1a00a88a379c - stable/13 - Fix enum warning in isci List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1a00a88a379c23825c5f91ff4d0a87a7ed72ca48 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1a00a88a379c23825c5f91ff4d0a87a7ed72ca48 commit 1a00a88a379c23825c5f91ff4d0a87a7ed72ca48 Author: Dimitry Andric AuthorDate: 2024-07-31 11:14:17 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:22:41 +0000 Fix enum warning in isci This fixes a clang 19 warning: sys/dev/isci/scil/scif_sas_smp_remote_device.c:197:26: error: comparison of different enumeration types ('SCI_IO_STATUS' (aka 'enum _SCI_IO_STATUS') and 'enum _SCI_STATUS') [-Werror,-Wenum-compare] 197 | if (completion_status == SCI_FAILURE_RETRY_REQUIRED) | ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ The `completion_status` variable is of type `SCI_IO_STATUS`, not `SCI_STATUS`. In this case, we can seamlessly replace the value with `SCI_IO_FAILURE_RETRY_REQUIRED`, which is numerically equal to `SCI_FAILURE_RETRY_REQUIRED`. MFC after: 3 days (cherry picked from commit 1bd66fac35ec27fa64d6158f82fdcbdc26098679) --- sys/dev/isci/scil/scif_sas_smp_remote_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/scif_sas_smp_remote_device.c b/sys/dev/isci/scil/scif_sas_smp_remote_device.c index d6055adc13f9..c72402f66889 100644 --- a/sys/dev/isci/scil/scif_sas_smp_remote_device.c +++ b/sys/dev/isci/scil/scif_sas_smp_remote_device.c @@ -194,7 +194,7 @@ SCI_STATUS scif_sas_smp_remote_device_decode_smp_response( //if Core set the status of this io to be RETRY_REQUIRED, we should //retry the IO without even decode the response. - if (completion_status == SCI_FAILURE_RETRY_REQUIRED) + if (completion_status == SCI_IO_FAILURE_RETRY_REQUIRED) { scif_sas_smp_remote_device_continue_current_activity( fw_device, fw_request, SCI_FAILURE_RETRY_REQUIRED From nobody Sun Aug 4 10:24:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFzZ2F5Rz5SY8c; Sun, 04 Aug 2024 10:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFzZ16NDz4DmW; Sun, 4 Aug 2024 10:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H63CVMUsJbK5uQXxaNvsVOCZFZ13tR0GRx4C/41TXfg=; b=kx2C/DkSAyAvwTeoj7um0pnCBC7v7Mf+6Scz7MLV5TKM4FY5DHA8vatBBVCcsZVM0OKjvs JD7xNATDCVtmakjK1DmdKjl/jf6J1doyr5Lcz/Le/pt9FCASydFYTdMlcjDTVBw5Pmflk0 fTlFKjHXn/C+N0HARHl/+kIP/na6L6q820ZHzru4AKgmfL6QqBrGtM+A5kn4+yee/fXLoY pVow9hP0P1Tot9smGfuvbfQVKLKG1GI5nShOjaS0yKRxN6eRK492UFp6qudclyMDYDmWHW ORYmDRe4EtIYHNgfAr0EPEgFWmk6Bd/Dant7nLEFd9cO6+2DqhZiIaQcLUZZCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767050; a=rsa-sha256; cv=none; b=qKJiiFFcWgBFByZzi14V8BPXRTuyfeyVtQlarnJpIvFSPAkvjxRQ2cm+ko+HDc37YDWXDB yq1+UGDURBgDS34MvFK3afjdYuLztLOewABQ7/ITZaxjyZU5Z2GD7NJoi7cDhnH8jQUeeY MDm9D92AizxevWlMOzJPTF72XQv2nmwNMxM3PC1u/d6+nFH74NEyT1iGv/Iop8IqClrONC q0TjrUlcMCwOVm2wRYEcH/Low8PgbB2PdjxHKYAxJqFLevHUBKrIRDxDLmjyiZjdFrnuN4 KJIG3dVsdvcQ87/skOeyWgq46aH8TPeYnElr+rqqQx8ltonnXAsalcK10/jINw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H63CVMUsJbK5uQXxaNvsVOCZFZ13tR0GRx4C/41TXfg=; b=nTE/LwPxT86C1nh0HKf3wMHUgxaQRHkItoOXFNDaY5bzMtpTdIk4knYrZBkYJrYAsrHSq0 +f4EWKPu2Mk7EqE6Fgz1DDXZK0RJw/bdpfEdcKKHFk4vDwNU2mp+FQra1+qOl1b7Wu9OWC U4p3bcMh6ebmSLgZqg6wirOWnxZVZUHo8dg8lXhCqa/3AAkESpJ1XQxRNcP5Qd6/3E2kJE vAEfwO16+CRhIumxHif/0WlMJ8dQQ0VL61XmSJ20ZK0GPK7UgaLEJXbZc8Bzr2sgcRaBuA kMYf6a51ith3yx28e2cJ4pSbwo42b48uSag6+AxBGoK7QcgMNxVc+0F2s+trxQ== 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 4WcFzZ0kbTzrhk; Sun, 4 Aug 2024 10:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474AOADS046175; Sun, 4 Aug 2024 10:24:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474AO9PE046172; Sun, 4 Aug 2024 10:24:09 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:24:09 GMT Message-Id: <202408041024.474AO9PE046172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2b740ae7dad0 - stable/13 - Fix enum warning in keyserv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2b740ae7dad00a1118542f5cc617e22f1e65b645 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2b740ae7dad00a1118542f5cc617e22f1e65b645 commit 2b740ae7dad00a1118542f5cc617e22f1e65b645 Author: Dimitry Andric AuthorDate: 2024-07-30 22:35:03 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:22:45 +0000 Fix enum warning in keyserv This fixes a clang 19 warning: usr.sbin/keyserv/crypt_server.c:237:53: error: comparison of different enumeration types ('des_mode' (aka 'enum des_mode') and 'enum desmode') [-Werror,-Wenum-compare] 237 | if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { | ~~~~~~~~~~~~~~ ^ ~~~ The type of `argp->des_mode` (aka `desargs::des_mode`) is `enum des_mode` from `/usr/include/rpcsvc/crypt.h`, not `enum desmode` from `/usr/include/rpc/des.h` (which is used in `struct desparams`). Luckily the integer values of `enum desmode`'s `CBC` and `ECB` are identical to those of `enum des_mode`'s `CBC_DES` and `ECB_DES`, so replace both values. MFC after: 3 days (cherry picked from commit 1d5a5500ad4b1f5187f40baaf58ab6868b18fc08) --- usr.sbin/keyserv/crypt_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c index 34ca454d42a6..ac14c90642ba 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -241,9 +241,9 @@ des_crypt_1_svc(desargs *argp, struct svc_req *rqstp) * getting ECB mode. */ #ifdef BROKEN_DES - if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { + if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC_DES) { #else - if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB) { + if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB_DES) { #endif int i; char *dptr; From nobody Sun Aug 4 10:24:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFzb3H0dz5SYTk; Sun, 04 Aug 2024 10:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFzb1jhDz4Dpm; Sun, 4 Aug 2024 10:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dcV50mpxXRC653rJYHbjjcjB9PlZi9SEx6fW4kQuS1k=; b=CpmfhKwwJ53OVIshAFD6nREO4GEAmEkvzsBywBXWL0Wc4e1gdrKjgL+Syx2zkoJSE/Onqi f/S9LN7Ht3EZrsk0HLb283tbP+jZR1JQUmo/KTPBkZLntzwYfY7Nb7TTO1VxMPSabeXTi4 kHjBhqO3bfwG0zoul1oc1+GyYJJFCnenv7IKlsKXx6vrd6ma8NvLxUqpZppUTDNKxVvPMZ VqUl8Jsp7kTQn9VhWQoNqEWZzA4asfFjBuN4IiUTaV7u+l+ls0+1yxg63mh6VlR8EhJG7s y5yJI2Fsdzy0agMc5r57j7lD8x5Kxh6kAzs61OXMFAx9TZhMluGda/3m6niv9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767051; a=rsa-sha256; cv=none; b=QXKOXrgnhOHriZHWeh6ToEfLrOu5Dzd13GEWeLer4ZLNdfQP0zoDXK+pfELQPhK8N/+BuO 5eWGf++vdb8ccsRj4PT0ojxnG83UltbsLniak+83P1hQ8Iel46CCrTyLyjLuPduEKK8fMB BfeVRqtTt80KFh108lQ8S60JeL3symHqajAN8DpvCcmaiya5xt8GMGfUaeP85N7shTERmL kCXq2TN9gwv6DZVNY6C0TfYtcXCxWMm0EhcGR5ZhzOH+Njy8F3sz+zNgx/vHA3OqUdydGQ CFO6cin+xdO1wNkoZYc4k4wpjPeklfDw6BmxBGw8znCxPG4tjunr/TSCjvyNqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dcV50mpxXRC653rJYHbjjcjB9PlZi9SEx6fW4kQuS1k=; b=w68hcUMjDr7OQKjQwep/AxgklxQg8m/t2K7djnkt5D/ptaosVs4k2LnD28K51QpbBaZSyd 12LHx71jlqWa9lntiX4W75qBHfUizdO718TWHGcNYsZi+Tqv5llV4acwxw5Bedu0Jnh9HB X1MNMfxfeK6OT4rO1Tb1PkRMwJaimQ0k5MinwcftfuJ1VRW5FnNbwpFNUOquWZP6oLEStA y9Pv79aGaVAJgKFnEIkkUvKfe+Z+pDBpPr6pgZnRIUNxLAUJ43PkcS4SEi6yFBrkekE9rT 5Xs93auV7te851dFrEy88RqQRHrv1bgnSC39VBkWaAasKdThDqnxFhVYEU3YiA== 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 4WcFzb1KYtzrds; Sun, 4 Aug 2024 10:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474AOB2j046217; Sun, 4 Aug 2024 10:24:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474AOBRF046214; Sun, 4 Aug 2024 10:24:11 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:24:11 GMT Message-Id: <202408041024.474AOBRF046214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 8356d8ff63a3 - stable/13 - Fix enum warning in iavf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 8356d8ff63a3ffab8b1ff91c922ca7865de9dfc3 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8356d8ff63a3ffab8b1ff91c922ca7865de9dfc3 commit 8356d8ff63a3ffab8b1ff91c922ca7865de9dfc3 Author: Dimitry Andric AuthorDate: 2024-07-31 11:01:20 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:23:02 +0000 Fix enum warning in iavf This fixes a clang 19 warning: sys/dev/iavf/iavf_lib.c:514:39: error: comparison of different enumeration types ('enum virtchnl_vsi_type' and 'enum iavf_vsi_type') [-Werror,-Wenum-compare] 514 | if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ The `vsi_type` field of `struct virtchnl_vsi_resource` is of type `enum virtchnl_vsi_type`, not `enum iavf_vsi_type`. In this case, we can seamlessly replace the value with `VIRTCHNL_VSI_SRIOV`, which is numerically equal to `IAVF_VSI_SRIOV`. MFC after: 3 days (cherry picked from commit 67be1e195acfaec99ce4fffeb17111ce085755f7) --- sys/dev/iavf/iavf_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iavf/iavf_lib.c b/sys/dev/iavf/iavf_lib.c index 15e9a334c7fe..bac6d0948c32 100644 --- a/sys/dev/iavf/iavf_lib.c +++ b/sys/dev/iavf/iavf_lib.c @@ -511,7 +511,7 @@ iavf_get_vsi_res_from_vf_res(struct iavf_sc *sc) for (int i = 0; i < sc->vf_res->num_vsis; i++) { /* XXX: We only use the first VSI we find */ - if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV) + if (sc->vf_res->vsi_res[i].vsi_type == VIRTCHNL_VSI_SRIOV) sc->vsi_res = &sc->vf_res->vsi_res[i]; } if (!sc->vsi_res) { From nobody Sun Aug 4 10:33:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcG9w2VGDz5SZ8V; Sun, 04 Aug 2024 10:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcG9w1rRHz4FyP; Sun, 4 Aug 2024 10:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjDxMd+JS5Il0n2TVvJw0+rLUzv35E3UDfOTUjq+vE0=; b=A+Txx29p63C5T6rlMs6kk3oqugh2/w+0yclGC09e4rA0cNidQW4WysSnJ8TzvZi7Fh7K5f 26RStrDPaaiznf2kbIVJ2N8gJoHsp+Re10gdMgr3mdl2797NXg2txZV8ZvS0kUrywn73yl meIs/ricNBQNufwFkX++85g523R4gme1zhMsp+Pn75WVqX4OWWNHK7JRmvmP/TdyR8QdYp wMrVtiCsTvUVRH5cp0kVhulRXxOQoYX7sfsXKJg3eTMpVH7xvbCjzm4aWxbH8/b3HwLgHB BiMhwvM/rHOd9+Snc96bG1qD2hCEKSmdWAEtbIvEkdRo95PS2BIXkskzF+Ue2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767588; a=rsa-sha256; cv=none; b=SA2tVq4nRVBdp76xY6KH/Q8wyvJQixoZpVUFSKMSDClGKyqnyBcZEUse2F3WVxr+tQQ5e0 5Ac0Mu8RDTZlLNTAL8oYPuuZPMcriWfthSmPoWglPQG8ucuUNWyUc1uI7j4iYjRdILWj37 6IyKkSz6YG3lJ4KAtm0iBemx+yQU4xtiI6oPgp4RTm24XweWA/gEfGfbHuDxkL1uQtZIhE fqgwJycf6+9JrbCeXfGa8dtHTVyd/8JLMcX5IDxuUBGgYhp3rJ0RzBoT/7C4RwNU98W1OG 0Q6Yp7q6f+o7mJcttl5hMH0nfJ2UWfFEJmJzrNZpgvB0VDbJyzMsf8/vHZBVEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjDxMd+JS5Il0n2TVvJw0+rLUzv35E3UDfOTUjq+vE0=; b=T9H5VLF9ZvnS6t7Kk2MS+cJ4OoLrJZnx3cUYcdZT8UNxha0fd/ddzHV3C4bHYeDw+nXP7l B+x9ppAdtyNEGZSA0O4xThXBDPyFbQak/ePxAEmFyt5JU1Jqtqa/b+3gp4hO5Jbv7cPkVl YNc6OCgA6U2ecsKKDt0DtdbPCMNRRolmBRAXeon4A8QjGtKJXZ7X9GSYLF+PQ+7Y5sw3Vp 0LEFqY+JGWVvz27I9xeCyN5ev57jFBA54nTA6+Kd7W37/G9emSZoQlY2Oo+I62+1NqcH30 0pyyJrASWcd8KKLq62CdyD4IOV2ASSimw8emdQjwRx4HK3m3hc/G6+SBPKZK2Q== 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 4WcG9w1RQ8zrfG; Sun, 4 Aug 2024 10:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474AX85N062408; Sun, 4 Aug 2024 10:33:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474AX8Rf062405; Sun, 4 Aug 2024 10:33:08 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:33:08 GMT Message-Id: <202408041033.474AX8Rf062405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Zhilin Subject: git: d471b4f71dd3 - main - usr.sbin/gstat: add microsecond precision for disk latency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mizhka X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d471b4f71dd3b09ada5bf58912dfb1266dd47750 Auto-Submitted: auto-generated The branch main has been updated by mizhka: URL: https://cgit.FreeBSD.org/src/commit/?id=d471b4f71dd3b09ada5bf58912dfb1266dd47750 commit d471b4f71dd3b09ada5bf58912dfb1266dd47750 Author: Michael Zhilin AuthorDate: 2024-08-04 08:31:06 +0000 Commit: Michael Zhilin CommitDate: 2024-08-04 08:31:06 +0000 usr.sbin/gstat: add microsecond precision for disk latency This patch makes gstat to show latency in microseconds if actual latency is less than 1ms. It affects only "ms/r" and "ms/w" columns. Before patch: L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name 0 922 0 0 0.0 922 35809 0.0 2.8| nda0 0 928 2 34 0.1 926 35809 0.0 3.1| nda1 After patch: L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name 0 496 1 31 0.156 495 16020 0.040 1.5| nda0 0 492 0 0 0.000 492 16020 0.042 1.5| nda1 Reviewed by: imp MFC after: 3 days Sponsored by: Postgres Professional Differential Revision: https://reviews.freebsd.org/D41999 --- usr.sbin/gstat/gstat.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/usr.sbin/gstat/gstat.c b/usr.sbin/gstat/gstat.c index b99b750eb253..887ae9dbee16 100644 --- a/usr.sbin/gstat/gstat.c +++ b/usr.sbin/gstat/gstat.c @@ -406,16 +406,20 @@ main(int argc, char **argv) PRINTMSG(",%.0f", (double)ld[2] * 1024); if (ld[3] > 1e3) PRINTMSG(",%.0f", (double)ld[3]); - else + else if (ld[3] > 1e0) PRINTMSG(",%.1f", (double)ld[3]); + else + PRINTMSG(",%.3f", (double)ld[3]); PRINTMSG(",%.0f", (double)ld[4]); if (flag_s) PRINTMSG(",%.0f", (double)ld[14]); PRINTMSG(",%.0f", (double)ld[5] * 1024); if (ld[6] > 1e3) PRINTMSG(",%.0f", (double)ld[6]); - else + else if (ld[6] > 1e0) PRINTMSG(",%.1f", (double)ld[6]); + else + PRINTMSG(",%.3f", (double)ld[6]); if (flag_d) { PRINTMSG(",%.0f", (double)ld[8]); @@ -426,9 +430,12 @@ main(int argc, char **argv) if (ld[10] > 1e3) PRINTMSG(",%.0f", (double)ld[10]); - else + else if (ld[10] > 1e0) PRINTMSG(",%.1f", (double)ld[10]); + else + PRINTMSG(",%.3f", + (double)ld[10]); } if (flag_o) { @@ -436,8 +443,11 @@ main(int argc, char **argv) if (ld[12] > 1e3) PRINTMSG(",%.0f", (double)ld[12]); + else if (ld[12] > 1e0) + PRINTMSG(",%.1f", + (double)ld[12]); else - PRINTMSG(",%.1f", + PRINTMSG(",%.3f", (double)ld[12]); } PRINTMSG(",%.1lf", (double)ld[7]); @@ -450,16 +460,20 @@ main(int argc, char **argv) PRINTMSG(" %6.0f", (double)ld[2] * 1024); if (ld[3] > 1e3) PRINTMSG(" %6.0f", (double)ld[3]); - else + else if (ld[3] > 1e0) PRINTMSG(" %6.1f", (double)ld[3]); + else + PRINTMSG(" %6.3f", (double)ld[3]); PRINTMSG(" %6.0f", (double)ld[4]); if (flag_s) PRINTMSG(" %6.0f", (double)ld[14]); PRINTMSG(" %6.0f", (double)ld[5] * 1024); if (ld[6] > 1e3) PRINTMSG(" %6.0f", (double)ld[6]); - else + else if (ld[6] > 1e0) PRINTMSG(" %6.1f", (double)ld[6]); + else + PRINTMSG(" %6.3f", (double)ld[6]); if (flag_d) { PRINTMSG(" %6.0f", (double)ld[8]); @@ -471,9 +485,12 @@ main(int argc, char **argv) if (ld[10] > 1e3) PRINTMSG(" %6.0f", (double)ld[10]); - else + else if (ld[10] > 1e0) PRINTMSG(" %6.1f", (double)ld[10]); + else + PRINTMSG(" %6.3f", + (double)ld[10]); } if (flag_o) { @@ -481,8 +498,11 @@ main(int argc, char **argv) if (ld[12] > 1e3) PRINTMSG(" %6.0f", (double)ld[12]); + else if (ld[12] > 1e0) + PRINTMSG(" %6.1f", + (double)ld[12]); else - PRINTMSG(" %6.1f", + PRINTMSG(" %6.3f", (double)ld[12]); } From nobody Sun Aug 4 12:09:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcJKK2zV9z5SD2K; Sun, 04 Aug 2024 12:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcJKK0pcKz4SDs; Sun, 4 Aug 2024 12:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722773381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8BgQl4OKk2fLrS84OkpX0EzExsotHOVouWxckIOUruU=; b=yKfdrDPiflkg9mdxoVE6OfrwFXb+j/13KacpVBKrvTY8TdAtSF6eMiIr0heRs/VYh3Wpt8 SFeWHqrC4efJRzLXempzoSr6Klm7EPZuHqEJD+ccdGJRzKY5TvZ9dhTdjPejab9pTeB5q4 TDw5DvaOVRTrcaDX56OHYEXP8BkpktN2eaiPrBbfP1ox+b95Mjelw5tzHHIwAuR1Zr8915 6R/UIltWmMS1bdE4tIIY9vyHr7/Q+JJacUgv9SEPkWmWUggidN/+ed3LKmshM+SxupIwJb nu2TLhuPdmtlN5e+48Qq2tjdM+FoxD/DR6VqBcO869o2D0BSvEWfw7LAwCfmaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722773381; a=rsa-sha256; cv=none; b=OnU6+D2sUohD+M32I06Aitg4PS4JW0jcg+fFSBF7mn8Q0prxW71ITMIrpCnQl/9v0ywvMv vgDZ+COLZ0GCR7ps0NPOFzgEZYFMb6Wl6GkaIow+pT/BBrO1mGKnToB2akDyQ2EXW+iJIr GJlxOCBFoG6R/KB3M6XvxGY80kxG4iyM1SYlxdvVROW5HNjqIB63W6e7WoFvhDbmeSUiu1 8lq/HLc06INblIYRWrfBAlyqjdLS88fq+oBREsSRlwpqNJrIcoTJ1tA/iUfy17xN8ShrRm G4HnOioZgY5uLE/sXAUpbgm3I3nxQzF0UeO/H9chcUUOo/JcSlAKzVtc4EZ0SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722773381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8BgQl4OKk2fLrS84OkpX0EzExsotHOVouWxckIOUruU=; b=Rty6HZ94jHojxee2ySOdF6wCD8UI6y3ahdFfbLwqLRalpee6nydQ9ptda4RYDrEP/rkxF8 n9NZTcZoCcoWXS00uLkkV5NJfdmQMLCMJz9p3yMf5P6l9JLov/MhPbSguOyIhgivAUUcA3 V9PEoFgdFj6oOn8aRhsnn7YliiVr1AjZrPBAcLEwfsSIZKMt+nxVhOnsBvlu385hhXMUGU q0btn25xq4kgCEXKlNROTBNdnxR+SzyqB5GdoVYit6pBj8GzfnR9/qxdl22/bDFH5jZ4hK xMGUW8RFtaVykT2/xJ7a05fBBcs3BpBfq7hF90H5d93o0WSyAuTMQ2GA+cXagg== 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 4WcJKK0PwBzv21; Sun, 4 Aug 2024 12:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474C9e1M018401; Sun, 4 Aug 2024 12:09:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474C9erB018398; Sun, 4 Aug 2024 12:09:40 GMT (envelope-from git) Date: Sun, 4 Aug 2024 12:09:40 GMT Message-Id: <202408041209.474C9erB018398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f2372d936d7f - stable/14 - sound: Fix VCHANs' starting and ending points in feeder chain List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f2372d936d7f57b52af85dde10c977fd49cbd52d Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f2372d936d7f57b52af85dde10c977fd49cbd52d commit f2372d936d7f57b52af85dde10c977fd49cbd52d Author: Christos Margiolis AuthorDate: 2024-08-02 12:53:16 +0000 Commit: Christos Margiolis CommitDate: 2024-08-04 12:09:35 +0000 sound: Fix VCHANs' starting and ending points in feeder chain sndstat(4) falsely reports "hardware" as the starting point of recording, and ending point of playback VCHANs. Recording VCHANs get their input from the primary recording channel, and playback VCHANs send their input to the primary playback channel. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D46177 (cherry picked from commit b58d9db4d77a6f42ac7cf3cdb2af2443666033e2) --- sys/dev/sound/pcm/sndstat.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index f09fa7139884..4fac6a97a3f0 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -517,8 +517,13 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_SWBUF_READY, sndbuf_getready(c->bufsoft)); - sbuf_printf(&sb, "[%s", - (c->direction == PCMDIR_REC) ? "hardware" : "userland"); + if (c->parentchannel != NULL) { + sbuf_printf(&sb, "[%s", (c->direction == PCMDIR_REC) ? + c->parentchannel->name : "userland"); + } else { + sbuf_printf(&sb, "[%s", (c->direction == PCMDIR_REC) ? + "hardware" : "userland"); + } sbuf_printf(&sb, " -> "); f = c->feeder; while (f->source != NULL) @@ -550,8 +555,13 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) sbuf_printf(&sb, " -> "); f = f->parent; } - sbuf_printf(&sb, "%s]", - (c->direction == PCMDIR_REC) ? "userland" : "hardware"); + if (c->parentchannel != NULL) { + sbuf_printf(&sb, "%s]", (c->direction == PCMDIR_REC) ? + "userland" : c->parentchannel->name); + } else { + sbuf_printf(&sb, "%s]", (c->direction == PCMDIR_REC) ? + "userland" : "hardware"); + } CHN_UNLOCK(c); @@ -1306,8 +1316,13 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) sbuf_printf(s, "channel flags=0x%b", c->flags, CHN_F_BITS); sbuf_printf(s, "\n\t"); - sbuf_printf(s, "{%s}", - (c->direction == PCMDIR_REC) ? "hardware" : "userland"); + if (c->parentchannel != NULL) { + sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + c->parentchannel->name : "userland"); + } else { + sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + "hardware" : "userland"); + } sbuf_printf(s, " -> "); f = c->feeder; while (f->source != NULL) @@ -1339,8 +1354,13 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) sbuf_printf(s, " -> "); f = f->parent; } - sbuf_printf(s, "{%s}", - (c->direction == PCMDIR_REC) ? "userland" : "hardware"); + if (c->parentchannel != NULL) { + sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + "userland" : c->parentchannel->name); + } else { + sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC) ? + "userland" : "hardware"); + } CHN_UNLOCK(c); } From nobody Sun Aug 4 12:33:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcJrV3nrDz5SGGf; Sun, 04 Aug 2024 12:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcJrV1PmVz4VZY; Sun, 4 Aug 2024 12:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722774794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MmV7eaeC4jkSeOCqKfsxBk0U7jCBescW3gsGHMH2Cbo=; b=dS+XQ6hQSwyo85N7nTzCuaU5B03bUM/f4cQC70kb+3mCXAPgz7judahxqt0v0o4EETvCgS 89+iGDIl4iPsQ2ZM1iOkEvWHSnpMNThO0lEwH4wP6rdSid7MKa74gDySNtqN+mgGoib7A4 nNaGprqXC6TkDxRYVSqEtiWeoJIXRNgAl4ITGDxgjmckQh4sFCcZ8w+Kpdh1rfZ4gdLppy q5q7TWBxNx0E5wpyB61qXulmE813xWW2JMyTWobp1Tp5EivokGwZvAX2YjZf9Hw25YG8yh 9TzlOa2Uniq49qSVRRTVi/J3NCMwjOJdCJ47XQmrj4DAEVHd5FfhU9o5hKa0dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722774794; a=rsa-sha256; cv=none; b=lULJZzLegIMSYU621CwKD+1VKAyM2x+77QP7v240q5pviDEKHa5QXQPGbu95ufl84E++fo wLFfbUCEPh6U55rv5nT5+dAGjAJcE2PdWa7M4WLS2NRBZRApUNA/mz2NFSQw8FnyWRURok LRYiAb0udXMtlJgfWpaJkp/WV03NtPoVtqlLr+Ta1shc/x8i0Dix7/ZvjzGGQfsQXh4IoL rL1+jBDnQzMFPbcBR2UGOD02iEr7vL8/js6DWe5zNkv/M4qYM+qQg+41nnZC5jsc2qst03 2ki1FM8isMq8mife25WUjGA9fZRWPleX1HvRwIAMdsdtjHGYC/wKd9N5QbXtQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722774794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MmV7eaeC4jkSeOCqKfsxBk0U7jCBescW3gsGHMH2Cbo=; b=vZgaA0vpGF3I2Egv2pF4CaOPU9AmaSIgBykh/BnIMDn+Fze2bvABmvyjstSCe3pZXZU1V6 t7n6w6sVfUxn+WkMEw/aAaC2jPT6LzAB/yvEavZUzrDPXEGfR+jWcJcrp2Xl0W1UOa0Lpv jZcabIJXVQt9AeA5GOTtqQdy+EmvgI1URY2LgVfZKq8HATdEiWQC9nOD7d392qH8rgD6bn 5E5FGZIw3WKFv8IQsHZinb9z/yMejA4SapBuIgUId/NPDAj7R3HCvQtHMq7h0pbBWkx+P8 uDCurmP4toC6Zmh2WJ3k5JQ0VzQAwki6RkehaKrbChk7ClpFcOxIC+ixrB8PNQ== 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 4WcJrV11z7zvSn; Sun, 4 Aug 2024 12:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474CXEju068817; Sun, 4 Aug 2024 12:33:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474CXEvV068814; Sun, 4 Aug 2024 12:33:14 GMT (envelope-from git) Date: Sun, 4 Aug 2024 12:33:14 GMT Message-Id: <202408041233.474CXEvV068814@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: 82246ac5d890 - main - Fix enum warnings in ath_hal's ar9300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 82246ac5d890e031c9978052e5a431e0960182d5 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=82246ac5d890e031c9978052e5a431e0960182d5 commit 82246ac5d890e031c9978052e5a431e0960182d5 Author: Dimitry Andric AuthorDate: 2024-07-31 09:37:20 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 12:31:06 +0000 Fix enum warnings in ath_hal's ar9300 This fixes a number of clang 19 warnings: sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:709:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare] 709 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ' 148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x)) | ~~~ ^ ~~~~~~~~~~~~~~~~~~ sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:745:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare] 745 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ' 148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x)) | ~~~ ^ ~~~~~~~~~~~~~~~~~~ sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:781:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare] 781 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ' 148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x)) | ~~~ ^ ~~~~~~~~~~~~~~~~~~ The `FBIN2FREQ()` and `FREQ2FBIN()` macros in `ar9300eep.h` are invoked in most places around the `ath_hal` code with a (effectively) boolean second argument, corresponding to "is this 2GHz?". But in the code that is warned about, the value `HAL_FREQ_BAND_2GHZ` is of a different non-boolean type, `HAL_FREQ_BAND`. Update the `FBIN2FREQ()` and `FREQ2FBIN()` macros to interpret the second argument as boolean value, and rename the macro parameter names to better describe their meaning. Reviewed by: adrian, bz MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46201 --- sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h index 9230fd57e2e4..b2a0862c7aee 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h @@ -142,10 +142,10 @@ enum Ar9300EepromTemplate #define OSPREY_EEPMISC_WOW 0x02 #define OSPREY_CUSTOMER_DATA_SIZE 20 -#define FREQ2FBIN(x,y) \ - (u_int8_t)(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5)) -#define FBIN2FREQ(x,y) \ - (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x)) +#define FREQ2FBIN(freq,is_2ghz) \ + (u_int8_t)((is_2ghz) ? ((freq) - 2300) : (((freq) - 4800) / 5)) +#define FBIN2FREQ(freq,is_2ghz) \ + ((is_2ghz) ? (2300 + freq) : (4800 + 5 * freq)) #define OSPREY_MAX_CHAINS 3 #define OSPREY_ANT_16S 25 #define OSPREY_FUTURE_MODAL_SZ 6 From nobody Sun Aug 4 20:08:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcVxJ5N2tz5SwMM; Sun, 04 Aug 2024 20:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcVxJ4rSlz4Xt0; Sun, 4 Aug 2024 20:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722802084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0B22t7jOCZeSMtI/epBqf28eoDiUIEdmyxOrjkuWi5Q=; b=lterX7kXEHPF/GV3AzRMghjdHtyiRRE4YYZF01tVLYKgTJOTQW8r6AHhlZgd5+vC9BQcYE bUPYZMBRZ0QAsCM6eBd2yrnvzlC1+RFzUjE/xnXLfDQ3eoSHZLSrDVKKbjl9du36uJIW0x u6zFHRuxrtYDolKcjiid5fS8lkNTPrAY9eAHu4Y4vXaByWUdrpCwvt4uvC47zhccyk5A4s jBWqTVdMf9eugEUb5DazZhO1fsWkMpq5Ad3CVif/RUjJQ3we1NBfBIrL++AdYc8Qu1Ox2G Q6+XdRlgMkJyjz7E3V/eYAOoQh2eym2S9IAOh6jlYSgBzdaCBX45VTrj0zdTvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722802084; a=rsa-sha256; cv=none; b=OuLEjlTQY61EoFpPRsaym55wctLUJeB3KvYJYykhrNseSYnkaaDuACY8VocCwFKryUFNMo 9rgOLIpQ55cEuWy/uwXDEM/uPGXGjemcyRaopRy0JYfP1oEgRXlQTH5lnfqx1JubB3vGmd 9N9Geoi8ABy2bVudWivDZE8breWiYvvxLLLW5Lic4CtXlCJEx7IQwLyHV5/4UfRLohudGB ZJuS+y2mYllSZTZPxCOQXPMnCohPK7swUZsECrGXwayXJ0inEpYOaY2qincuKr/af8MD56 fFoNgBio4Sy7CPAfCGkcvR7kaBvsRr3gO9DKcJBxd4XyjJdofiB1w1+rWnhX2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722802084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0B22t7jOCZeSMtI/epBqf28eoDiUIEdmyxOrjkuWi5Q=; b=kq6A54R8WL6D9jdXl6kXcPZFBzE5OQ6MeuBwj308tiiRc6vyIZ024HbvCEX1AbloeLlnN8 ONsgAw4EWE+tdBYdqpdu5w8RthvlMUMKBnTsobRbfS+EqFIfTIck6wqx1B9by3aRplyXjB vp9Fo7ztvFAiMXe/fw8+/xfcMHEtI6xbrb4u5FWndtXczHVK+XMFd4mb+YOBCscUZREEX/ HX7AbNLnMPj8x0glrTwwvUrp4Eswphg8pzccaj4VpgSwevU96FU0tDrxTwi2GOEQjKWnDl K9r38GjqunWpzwe9FRevELhz5vJ7VBHk4wPl80o+BS0QD0gNm/RjVUhTJCMS5w== 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 4WcVxJ4S1pz17XB; Sun, 4 Aug 2024 20:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474K84Pw042915; Sun, 4 Aug 2024 20:08:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474K84un042912; Sun, 4 Aug 2024 20:08:04 GMT (envelope-from git) Date: Sun, 4 Aug 2024 20:08:04 GMT Message-Id: <202408042008.474K84un042912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: fa290859fa63 - main - vm: Assert that pagesizes[] is sorted List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa290859fa63d65b5da3014038ae289c1b336700 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=fa290859fa63d65b5da3014038ae289c1b336700 commit fa290859fa63d65b5da3014038ae289c1b336700 Author: Alan Cox AuthorDate: 2024-08-03 20:18:16 +0000 Commit: Alan Cox CommitDate: 2024-08-04 19:53:15 +0000 vm: Assert that pagesizes[] is sorted Ensure that pmap_init() properly initialized pagesizes[]. In part, we are making this change to document the requirement that the non-zero elements of pagesizes[] must be in ascending order. Reviewed by: kib, markj --- sys/vm/vm_init.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index 0fd13f73a180..a0d3651ba266 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -100,6 +100,24 @@ long physmem; static void vm_mem_init(void *); SYSINIT(vm_mem, SI_SUB_VM, SI_ORDER_FIRST, vm_mem_init, NULL); +#ifdef INVARIANTS +/* + * Ensure that pmap_init() correctly initialized pagesizes[]. + */ +static void +vm_check_pagesizes(void) +{ + int i; + + KASSERT(pagesizes[0] == PAGE_SIZE, ("pagesizes[0] != PAGE_SIZE")); + for (i = 1; i < MAXPAGESIZES; i++) { + KASSERT((pagesizes[i - 1] != 0 && + pagesizes[i - 1] < pagesizes[i]) || pagesizes[i] == 0, + ("pagesizes[%d ... %d] are misconfigured", i - 1, i)); + } +} +#endif + /* * vm_mem_init() initializes the virtual memory system. * This is done only by the first cpu up. @@ -140,6 +158,10 @@ vm_mem_init(void *dummy) kmem_init_zero_region(); pmap_init(); vm_pager_init(); + +#ifdef INVARIANTS + vm_check_pagesizes(); +#endif } void From nobody Sun Aug 4 20:33:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcWW83Qvgz5SyHd; Sun, 04 Aug 2024 20:33: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcWW82nDwz4bXC; Sun, 4 Aug 2024 20:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722803636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j6Hftsur/sNk/hiSqsyvXKPZyDBYjGBfOJFKRTFAQSM=; b=D/RES/zjoC831gEH0t+e4rFXNFmuXnfQSL8Ln56cJxGKN2OQjYeAlXJpS8WDMrVR+gE0+7 8AJAUcpIfJvTSIMJ/KUJ4scIHBaizmBIcEdQfGzVw7jY/G3Q3soSjGPKuYs9wOn7+/+Qdc CY9RWeBdvngiO8+PVd5xLcJUZA/FMxTJWD8zSqdH6IryQrrMMvVWiK9CyaR8O36QQihdLQ /e/XallCMfWMdOSKW3CAlz+A4Gw6t0nght18vAPU+hFCMC/fNGdGbH3VQBsHJVUZ96yAmU 4jUcCZyYepujQ9JxTukUHcJ4MTdKKCPavQdOd3SBffPiCv7ki2om+ARKtu0RQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722803636; a=rsa-sha256; cv=none; b=EBECxYr3x0rRj3hMTI6/88cMd03wcG+bzebga4Oi0gq2TDT+Fh8mWhjQv0rvMnVv2vMhH/ vep2+BzEjvDW+PVHk4HYTOhVJQPhrI/jvi6QLU0KNKIJutEvLVkmbgjMlifcx0Vib4gbPa ErTVhC7vPvZ8DyeL4LhoGLxWHQq5PRf2+pGAAIB/s4tR9QrhtbImTxTvHGBe2Pkbal4EQK A/u05UYyoxdnRxpNaVSDUzIgOJkr1FpDsc3KEUW/gPHJ9c7lJsPv4x4krskmQjRW4seCI0 l9p5dkPuND0reDVWfYxJoYNWHBUU5QtSpaXLjhtXMSBnKE9gqsfBBuAhlztyTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722803636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j6Hftsur/sNk/hiSqsyvXKPZyDBYjGBfOJFKRTFAQSM=; b=athPr8VzWZk9/eWeaOcOOFlr2IDS4Uw8rTTqXjik9u/u79VS0fwIwSgzcRDXTzaiK7j1Jr D4P7CwpEs9CnlWh8odc41oJj5nMugNJY+JIT0RCT6wszSI8egFchtsvEnmBLt/ng19Xhbv G9E1NRsJyNO17jfi6IlQz85W0I0vu5R+G9JGVvjm2geBDD3Wr25Psv3Q6d7zHMfJxeK1JH R7dvW2ozf7hqNlD63TCd1fKLmxHm63GxOKTpPVtuBrbOqbx7uxR64WzUv82C0yphg8ELXA tVLgOhDlXB1TfwI59yxbzFckO/0OfkoQzi1icJ4es2u3rxXCCa2kH0mYB8UatA== 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 4WcWW82NdMz18lp; Sun, 4 Aug 2024 20:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474KXu0Y093579; Sun, 4 Aug 2024 20:33:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474KXusM093576; Sun, 4 Aug 2024 20:33:56 GMT (envelope-from git) Date: Sun, 4 Aug 2024 20:33:56 GMT Message-Id: <202408042033.474KXusM093576@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: acb4cb33d358 - main - vm_pageout: simplify pageout_cluster List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: acb4cb33d35838e3e86412202cd63d9021b21ce2 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=acb4cb33d35838e3e86412202cd63d9021b21ce2 commit acb4cb33d35838e3e86412202cd63d9021b21ce2 Author: Doug Moore AuthorDate: 2024-08-04 20:32:15 +0000 Commit: Doug Moore CommitDate: 2024-08-04 20:32:15 +0000 vm_pageout: simplify pageout_cluster Rewrite vm_pageout_cluster to eliminate redundant variables and duplicated code. Remove tests on pindex to check for object boundary conditions, since the page_next and page_prev functions return NULL at the object boundaries. Fix an alignment error that could happen if pindex is aligned, and the first of vm_pageout_page_count flushable pages, and the page at pindex-1 is also flushable. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46217 --- sys/vm/vm_pageout.c | 115 +++++++++++++++++++++------------------------------- 1 file changed, 46 insertions(+), 69 deletions(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 742e0afbc690..0d054da34866 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -339,6 +339,25 @@ vm_pageout_defer(vm_page_t m, const uint8_t queue, const bool enqueued) return (false); } +/* + * We can cluster only if the page is not clean, busy, or held, and the page is + * in the laundry queue. + */ +static bool +vm_pageout_flushable(vm_page_t m) +{ + if (vm_page_tryxbusy(m) == 0) + return (false); + if (!vm_page_wired(m)) { + vm_page_test_dirty(m); + if (m->dirty != 0 && vm_page_in_laundry(m) && + vm_page_try_remove_write(m)) + return (true); + } + vm_page_xunbusy(m); + return (false); +} + /* * Scan for pages at adjacent offsets within the given page's object that are * eligible for laundering, form a cluster of these pages and the given page, @@ -348,26 +367,21 @@ static int vm_pageout_cluster(vm_page_t m) { vm_object_t object; - vm_page_t mc[2 * vm_pageout_page_count - 1], p, pb, ps; - vm_pindex_t pindex; - int ib, is, page_base, pageout_count; + vm_page_t mc[2 * vm_pageout_page_count - 1]; + int alignment, num_ends, page_base, pageout_count; object = m->object; VM_OBJECT_ASSERT_WLOCKED(object); - pindex = m->pindex; vm_page_assert_xbusied(m); - pageout_count = 1; + alignment = m->pindex % vm_pageout_page_count; + num_ends = 0; page_base = nitems(mc) / 2; - mc[page_base] = pb = ps = m; - ib = 1; - is = 1; + pageout_count = 1; + mc[page_base] = m; /* - * We can cluster only if the page is not clean, busy, or held, and - * the page is in the laundry queue. - * * During heavy mmap/modification loads the pageout * daemon can really fragment the underlying file * due to flushing pages out of order and not trying to @@ -377,74 +391,37 @@ vm_pageout_cluster(vm_page_t m) * forward scan if room remains. */ more: - while (ib != 0 && pageout_count < vm_pageout_page_count) { - if (ib > pindex) { - ib = 0; - break; - } - if ((p = vm_page_prev(pb)) == NULL || - vm_page_tryxbusy(p) == 0) { - ib = 0; - break; - } - if (vm_page_wired(p)) { - ib = 0; - vm_page_xunbusy(p); - break; - } - vm_page_test_dirty(p); - if (p->dirty == 0) { - ib = 0; - vm_page_xunbusy(p); - break; - } - if (!vm_page_in_laundry(p) || !vm_page_try_remove_write(p)) { - vm_page_xunbusy(p); - ib = 0; - break; - } - mc[--page_base] = pb = p; - ++pageout_count; - ++ib; - + m = mc[page_base]; + while (pageout_count < vm_pageout_page_count) { /* - * We are at an alignment boundary. Stop here, and switch - * directions. Do not clear ib. + * If we are at an alignment boundary, and haven't reached the + * last flushable page forward, stop here, and switch + * directions. */ - if ((pindex - (ib - 1)) % vm_pageout_page_count == 0) - break; - } - while (pageout_count < vm_pageout_page_count && - pindex + is < object->size) { - if ((p = vm_page_next(ps)) == NULL || - vm_page_tryxbusy(p) == 0) + if (alignment == pageout_count - 1 && num_ends == 0) break; - if (vm_page_wired(p)) { - vm_page_xunbusy(p); - break; - } - vm_page_test_dirty(p); - if (p->dirty == 0) { - vm_page_xunbusy(p); + + m = vm_page_prev(m); + if (m == NULL || !vm_pageout_flushable(m)) { + num_ends++; break; } - if (!vm_page_in_laundry(p) || !vm_page_try_remove_write(p)) { - vm_page_xunbusy(p); + mc[--page_base] = m; + ++pageout_count; + } + m = mc[page_base + pageout_count - 1]; + while (num_ends != 2 && pageout_count < vm_pageout_page_count) { + m = vm_page_next(m); + if (m == NULL || !vm_pageout_flushable(m)) { + if (num_ends++ == 0) + /* Resume the reverse scan. */ + goto more; break; } - mc[page_base + pageout_count] = ps = p; + mc[page_base + pageout_count] = m; ++pageout_count; - ++is; } - /* - * If we exhausted our forward scan, continue with the reverse scan - * when possible, even past an alignment boundary. This catches - * boundary conditions. - */ - if (ib != 0 && pageout_count < vm_pageout_page_count) - goto more; - return (vm_pageout_flush(&mc[page_base], pageout_count, VM_PAGER_PUT_NOREUSE, 0, NULL, NULL)); }