From nobody Mon Jul 29 01:49:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:49:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:50:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 13:48:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 16:31:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:39:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXlyQ53bjz5RfWW for ; Mon, 29 Jul 2024 17:41:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (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 4WXlyQ2rD2z4MDV 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-x102a.google.com with SMTP id 98e67ed59e1d1-2cf93dc11c6so1464914a91.1 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=uPKyA5rCpLLdR2Md9xoqKl9DxNteJY9rmUFwjnewGZCnrjiH1dFuL5Dx2QkK5txe/6 785m6ZIpAYQbS78e+b3I9aWTRZloKYA3HayZ7SsTtvNCRSkw5yvlZiNn8jnR0Gg1V4uj 4ybbjxNMDdojZnpad/hQgC6oxlI+ggTW8L4F6fzTDV8ytglQD7caJk1nBVSKGtR0x4No wwzM/ao3HSGYqf+8BZ3mrZS96TtrDQ8U0fZ2xQRTNVE8iubvm1jxqoEN39PAPv0JLXhX cQWRH0+L7GtGcWZESXO483j69eh2WgsL/ib8BIxIz58KYlsGl1TGp7/v79h7pwqBelg1 zJog== X-Forwarded-Encrypted: i=1; AJvYcCW9Bl5TRAWgQO/MIdSZ4/XT2SVRlyUNya35qZb4ySNpGqwsiOul2kpJLG+yggc6YZiyP/ii1j6yYqJczJ2ZTj5nB1HR7Nf+xJXhKdoUx5pPWA== X-Gm-Message-State: AOJu0YxYz5P7DGbA7GKqjcVVI+1FJ+jdAaCqwk/qyh/JHSNRAbf7r/pw KoZIwGeJi8Iu6Pcv7n3Lp7zs1lqcZzJMXsFo5bSnpXZO/K5Cnoyl4nlA17kPMeS8m5CrRJ0jpHP A54IZFsdMCfQ4X1DMPvlBbR7TBi8bV3+HbuNS0LzURdyv4cvGCmM= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4WXlyQ2rD2z4MDV --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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXp7Q66bJz5Rp9d for ; Mon, 29 Jul 2024 19:18:58 +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 4WXp7Q1nDrz4ZJZ for ; Mon, 29 Jul 2024 19:18:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2cf213128a1so2142302a91.2 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=Kd2LjUricpjKwUL9Sw72177AK6goNfV+bvWeSnRgTw9FWk/XKSKaP5B0B2cxhz5oJf CGcZBXIbWOonOrIqSO/hBa4PmPL4Damtuu+Z4XBPLUWosBmrzjkeq0EsOuWyks0ibzP6 Aedc+8vjsB0UP62WkO9gwunktpofk0M7ceipbQGcnhftPM43QKIj8KlbaCnhwcH4zbiV tz068rOFNs0TcznJcF1E1QCFuJwDfZWKYS5mP2Esx8cZ6yFvX4X2P/YpiBtuBy4JV2zV 6aK+WuDKIxklIs5qiIqfOUha/1UkqoTmuAEONiMwT52+NNQFygzMNBoAk0DLsxSjbF0b UEqA== X-Forwarded-Encrypted: i=1; AJvYcCVLkWCERvkZPuSk6tgQUMINXCEReE+vVwRTPl83eUkf3eHeG795HK151DnFpSIrnbv+Y41ygkZEWUNOeZiooNv+9fpuS1CCx0KIH5401LNMqg== X-Gm-Message-State: AOJu0Yx2e5t2czE+peSCmJExqhDV4EHPiGEmXgtLg8UBEq49TfK3M5K7 D9O2IJv2bYt2GapaHPK4c7TAvXAjwinPNY3clCDUZRxZMGzHXz2LUb36tPV7lvMzInNPMiem9k6 esPdfDZx0LCGJ96OraiH1OZm6q3Z9QrfbKL4Ptg== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4WXp7Q1nDrz4ZJZ --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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 07:57:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYH1G5PkPz5S1rJ for ; Tue, 30 Jul 2024 14:00:18 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 4WYH1G3Wfpz4sKy 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-f46.google.com with SMTP id 5b1f17b1804b1-42803bbf842so35261325e9.1 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=H0A5lo/QXUDWBuYCmZdvk/on+hv1pDlyFIJJH08I5MY8chj+tfD2N9SOgMoL6Lu9PP +6MnZ5ndaKM6uDbP4tyR5fJyvuYDYhUDSBWm/ENajcV8vb24NKzNSKUApfCVl6djwLYt vKQgNrNYGI2eTDfh0wcpDHDl2Xcoxp1bVvMk0G9dupZdF6fGjxrnq7qXxVkKaGg8xUUg wunKW6wPTogZx3VtXJe4v1G09xHhNE+T4Sy+sIsYPcwPInp7b6MmvmJp0Yh+Z0wjmy4s Ncq5JZ64E2zoyyrOU+IgCxq+UFTWoefetoSCUXLlDzx1LxQk24XqrnzitxCl4ky+jR1G Z7zA== X-Forwarded-Encrypted: i=1; AJvYcCXZ0R4HECME8eJV4pCw7xu8oBamxsI0Pv52ERzLTd66qf8J8nG1yl/qS45Yzmcu4Sg1A3HwoDqp384wmaOeJGlRZhbelO6GlKLJhRYSQu76/A== X-Gm-Message-State: AOJu0YyNLJVS2HjHibI1jFmArD8t5ZJMSZgJYGhW9o7dkvj7hOcPkGh6 3oCmTmkOaopxAXhCWRBZhx489yYRIP5dw3a9jRDIRmCyO36IsB7ed2A/i0Dt08Q= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: git: 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: 4WYH1G3Wfpz4sKy 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:29:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:39:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 16:17:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 14:50:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 19:26:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ4f850wLz5RN1T for ; Wed, 31 Jul 2024 21:16:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (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 4WZ4f81kX1z4kP7 for ; Wed, 31 Jul 2024 21:16:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2cb53da06a9so1076759a91.0 for ; Wed, 31 Jul 2024 14:16:32 -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=PKIJt4/mgvM1GlGmmJAiI6wg4jbVxJu34aa7CkeD44f2AxkAGme9/o1ZuFoOyB+q0Z x9B+BeJa0wO+nR2Sehkv/xQJlWwdeNZTVhmvsrQsDqyclBgtK2TyOX+w5M3Idi0UsqNy K5NzCY096YsV44oa+VSsocijyrykSr69S9nJTPh+cb/pVAHOZNEm44QNi4iz6T+k3hXp /vmp10BqeBl/eUGGO+h0fQpnaseFMPkv9vRl0MfXT0mBUkmgcUkgfP8iR89RXKJT1csj oP9sg8+cx8p/qEv8Uw34a7yQFY+8qyxaK1n2dZAu1OxcPxYu5VR3qGai3LH96EvpNt1H vfMg== X-Forwarded-Encrypted: i=1; AJvYcCWkQwrQulIG/ZZdxKHvyc+weYCCxRHd+qKYwaG6tPZSmS7spb7MHefzMPbMwFSL8mcrzSyUNwgIhVEgX+jUlaoNggPZFmVmvchzvRqKBIJIkg== X-Gm-Message-State: AOJu0Yx1x7gXUrFaEkLHkQ+S+k0zQpm0Az7Rr1LH7a0mF7Beb+mEk1Fu pdotjKGO5vn7LkvPY/Q9+RBSQUlx4s/f0hyecboIGCd1CmcmnHviU8AyscsFd45l5zclguMEK10 SiS/8MfXXqkOohDLH5UUjnJTNid1rSszNrmr/ew== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4WZ4f81kX1z4kP7 --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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 11:51:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 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 17:50:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 20:35:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:43:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 21:31:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZjDG0tBcz5RWGP for ; Thu, 01 Aug 2024 21:44:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZjDF66MXz4VJt 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-x42b.google.com with SMTP id d2e1a72fcca58-70eec5f2401so4765674b3a.3 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=hwy6M7cjB9wbx1m7PSfrcY2xoVjRKp3mqWK1WqA2WJcwEpOPeNdoZ2ZEkwilHN8iJ9 mCtdOKJGdAEYOkdC9kRtbaErK7LZJRqtYaH+N01QdcBILHUYSmGbeY8d0WRM1gp3o0H2 8M7gS3LCsHZdBImmCS/zP5ZTvg1bHuXOshBH8NPG4fZXZRIc7gHOQAKHNnyeqHOzSh1z BNBvm28E/DbVEa8b9ggqDGnEDeQoSPWD8dVLbMmBLgIHFH7PWBhC5wcIHa0Y/mPn6rJe 3cn6kpO2+Ve71pRC7jMiWKeOWr83FsjAKYbBpyDGQd98UueovaQ1tjlCHya/q50I4rmd TaOg== X-Forwarded-Encrypted: i=1; AJvYcCWxqv5FJzAizmV6MPYmyJ15GhVnRFn2P6+okeFKEkw2HmDTCRXD1puz1ClvxifEnyav45NG5vQItyV3h+pP6nVxzEZ3Mhua2Po01LtvBQ1Ehg== X-Gm-Message-State: AOJu0YzMVOppxG3eVTOvTsXSjaVH8bQfUMf2CKcXHlVnDL+0rxGYQxwm aWoYug4LsrXvlqWWglqZFDkygOdm0SJAhnF3bViGc4N6+lShiA5l+8XG4bySk4qRekTpj0XEmBb uEfGSlowSkg/dOSW+q1v0jhYKeERzzOnfrYZI2g== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4WZjDF66MXz4VJt --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 Thu, Aug 1, 2024 at 5:51= =E2=80=AFAM John Baldwin <jhb@freebsd= .org> wrote:
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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 Fri Aug 2 02:38:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wb8cs2Zlrz5RtK9 for ; Fri, 02 Aug 2024 15:19:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wb8cr6SfXz55mq for ; Fri, 2 Aug 2024 15:19:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2cb63ceff6dso5678409a91.1 for ; Fri, 02 Aug 2024 08:19:08 -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=pKRxGAKQ9oZpoHnCR4JCqTy56lTo6ik/R6RDdiGt6AO85O45R2Vk9UrK7IV+PT+6sf 0dt9cRZUBn20PNfJ2aspPpyMxALiV4yoaRU2r3C2Hcm8qt/6Dnb3FG5F+qhshM4orNX/ vOGssRwf+u09pqDnoioZPO2aQBBHQCM6xPISPxmU1PVF5R9j+BSjMDiXoZBwI6k386h2 XiPrObfCs45AO7S071kpyxVGK8qo8GjEJ+l5w3n5WyrcWtTJlvJSfDLez7obMo3I1dzB g3WoVk5S5hatwximzPv65Pp7smRYVVqKM2P6ukq6o0G2olHUiagfBxPnas0WgEkl79+N 3abw== X-Forwarded-Encrypted: i=1; AJvYcCUJIHlRlcai2NfmIWbsAtXGzlvRIudzwfcRsrx17fxl0/EVi5vmCTu8pJCIJQ1orHv8xmmfdPKLxWsQOHuMCFkS68GVqsXEXk7vusbrBMrfPw== X-Gm-Message-State: AOJu0YyRNjEFwHB7XiaGapNQZ1svDs0drG8FIk4PtBmE7ta28BkqEI45 EiYbgq2NfQPNo4h48XTBZFSxNnlOOnn+7LPWwYpkD/u4fzRP5olWa2unWs35uyc9wdVZP7XC8Os lWfUvXopgAR7aL/Vkj/uP20l0w02jvQ3pwUozew== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4Wb8cr6SfXz55mq --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 16:13:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wb9rF0MLcz5S03T for ; Fri, 02 Aug 2024 16:14:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (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 4Wb9rD2mB6z3xB6 for ; Fri, 2 Aug 2024 16:14:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-7a23fbb372dso5475706a12.0 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=t+gUkDCPZ5cqdmhwD/lNG09mlHnDUb2Xa6/67le2ffF+jtU6VgxkljiLnHgz4M8cRS f1hniYVwHZhJIjfy8XaEFRknYfTE3PYKoRtEUZqWvM4awR/2eTpRyFOucGG/m3qAl7z0 TiiefIZtEe7o1cmsRffiWjuPoHAlSlKmWzka6pNaUZ8Obdr+GjBQluxsTIxmQgBUAVBW g2hkp9wau1LUyCmjOTbw4RvnS89On9Dnu8Cjow8MAbaoMyo73/FcqXR8/5c/6YcjNRaK 8BP91/spD0W4pMGYP+KwJjIB7CvdHSeF2B0gye3RWbrUPVfHgDdR0Ycg8RSNDcRoOqxZ zVUA== X-Forwarded-Encrypted: i=1; AJvYcCUtllCzNcRQ3Qle48qlT82tZ0XvIDbTHhH9mxxag1Eep98Fzto0919Dfhc5uXB6Ic90mIaXFUTlJfSBGDsLEzdaz6GNwthLhphpJ4o3lzLZ1A== X-Gm-Message-State: AOJu0YxoSbZvXQBff0EfKPce/pweoMXrrJmw5VevBDLayhNbGOSvgHb5 I/r9jnhSSB7NaZsto210TW3hQesZMJqb39l8cMmzfxWZbNMn5qDptEGlXsfl/Mn/YnCUkGKevlH mVG+9vJLUuqtSytEmVPRKxDmlubgsAEgLiB2vl63A7YzmUjYoTZA= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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: 4Wb9rD2mB6z3xB6 --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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbBKB3D8Zz5S1jy for ; Fri, 02 Aug 2024 16:35:42 +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 4WbBKB0bj1z41H8 for ; Fri, 2 Aug 2024 16:35:42 +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-2cb510cd097so6232498a91.1 for ; Fri, 02 Aug 2024 09:35:42 -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=tGQNfg+cikxXxeOV2Zog72k8hneOWQvANU4/Shs9RXbNaTW9S66rPw3XSSxw7tdeQ6 6vzDZIP5Uev2w4Igyu8CwdbhvpcPrerYYsWSkRcJIWI3Rr3oByiL9E3uRyqFsHFZpR5u DgGVY4CEAB6qzKLB651Ok6vj/iu3Ie4iyA1zJwiH2FJ2YfN4wHGuu+IMj5R024ldL8j2 ewzs7BwSuWFHqCQ+8gG2ulTTpqWcgbVmADIHXzAnweGmkUOpjlQEUOOa6yynxpY3WxtB vFaSx+6R9o0ECCit49w+rm2J4yYxRSfEhiWqvNfiqLSUlsRfvEkYyU+16spgopuMHqkj gXCA== X-Forwarded-Encrypted: i=1; AJvYcCVOT+HiY0hxNI12TS4vNbVoTpacSJESn17ZeuTPYvxDiB8d2L/mWlUXaDCW377CP895+sRfNofFBSlE5wfBh2Xu7Nlrbiid3Lq3xPJAWQMaSQ== X-Gm-Message-State: AOJu0Yzthe77MD7TAIT9le0mbRXmyyyBpuU9q1a0HqBsHVPNZgQkQtXO vcz9Z0g28pqPM5PAMuEdmewDEXopXEKP3+mjn4oJqUyW4BGl3zOQ4QH6YsJYTEdoraUNatcrlql VRBjaroHoxAcmxwFOCk1Fv1pi9JiAppcvgIKB3w== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <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-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; R_SPF_NA(0.00)[no SPF record]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4WbBKB0bj1z41H8 --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 17:58:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 Sun Aug 4 10:33:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:33:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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)); }