From nobody Mon Oct 20 12:26:12 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cqvmP0X4tz6BXw0; Mon, 20 Oct 2025 12:26: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cqvmN6x7wz41qL; Mon, 20 Oct 2025 12: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=1760963173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LZjr1wlcictqb96uxl916ZA+ypYPxvaIOxphGiopgzE=; b=nofNJ3DEhuebmJWfJ07MSGYwevr7mSoRN6Sh8WZIWnk/8QnYxn8Ou3xNPi05UDkH22Lh4o Rv4+NtjgW8CEVwlEb2ruLXgl6FG13ibMpEau1PG5umcLEQyrIojzl27U4T+beVf8SZi5gT BjCEI++zAS15F/2RVpCNxwzFmTvx2rsBBZIzN7NpcmupI4Yef7TpcIX9BnNO/pkAkKiazr qbd3+QCEmiHMqDm3yWHW5nOLbskK/w3nocKEa1+cIneMAQf1F7YdAr2+FAutKiVcnVZF1g jiV0bZzqj/7kuA9FthPmVdUvJa43VIZvCk5DnazbaY5niS8MUwBOLoShtKEy6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LZjr1wlcictqb96uxl916ZA+ypYPxvaIOxphGiopgzE=; b=xeceJ6NvtzC+hYxggIiRSoigsVEBcT9OSQEWvuOdtdU2d+QEFRwIx+MSaH92/YWMj5Xl6F 9A3drLSWa8ct993EmlfIyfn2HiimmsWsiKVrANpFJFITTXTE3Hva1CPQ6LzTMSCTzGxIdM pJYGSGyhEzOLBSxKbK3eplQKJdyjaTjj7fh6yThjm7W8js8zQ3lB94vD5N44xr+8wAbCDP FUkSyW+AbA9mXVjeWeSiMMwCLrUpw7x4zbomLDP5iFnB/ftIaV+2tzCI8oh5TbKk/he0iR DRiw+nGGwe6dhY6iOg9pA6Z+0/tclqaV6DE2Us1L84JBcPHZiFOdjUhwq9VTdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760963173; a=rsa-sha256; cv=none; b=AY4uMtT4DQKetPQxJnh+HmiMEZUxrXPJlddyesXsr27FnGqW4/A4eBx61P2I+ijK1cGzA0 it29IA6ggVbrocSF0BGAZyUIf3/yl5SlU+J9OiauAPnmM7iUNPxdFhVOpiyGFifhY6Lldu UoSjJiO59RodYXrcT15OeYcK4uWffUDznVgafmBab5k+sbYfT6OmAgfLIc+QLfkAVfZgBY e7SzTjf907bedrrCclXQsF6T3An/N2AzwcK9Bt0+xHhP5xNOdEmKraf4A4nLhv0HUm+7KB u6Vv4grft+4Ix7A1jdKQGPvEOjF0SpuhlbxPftRlO+qYYXPV4WawE6vVgGbgjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cqvmN6WG1z1C2X; Mon, 20 Oct 2025 12: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 59KCQCrD006773; Mon, 20 Oct 2025 12: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 59KCQC6J006770; Mon, 20 Oct 2025 12:26:12 GMT (envelope-from git) Date: Mon, 20 Oct 2025 12:26:12 GMT Message-Id: <202510201226.59KCQC6J006770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 34710b2c08c9 - stable/15 - login.conf: Remove never used ignoretime/ignoretime@ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 34710b2c08c95b8cdee96e77693c2e4ddef9bfbe Auto-Submitted: auto-generated The branch stable/15 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=34710b2c08c95b8cdee96e77693c2e4ddef9bfbe commit 34710b2c08c95b8cdee96e77693c2e4ddef9bfbe Author: Paul Armstrong AuthorDate: 2019-09-06 21:40:01 +0000 Commit: Michael Osipov CommitDate: 2025-10-20 12:25:49 +0000 login.conf: Remove never used ignoretime/ignoretime@ PR: 240378 Reviewed by: otis (mentor), glebius (src committer) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52991 (cherry picked from commit 4835fc45efe8b593fa49786ec4bfb6ce5050756c) --- usr.bin/login/login.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/usr.bin/login/login.conf b/usr.bin/login/login.conf index 1069da17b4db..c65a83caa565 100644 --- a/usr.bin/login/login.conf +++ b/usr.bin/login/login.conf @@ -46,7 +46,6 @@ default:\ :umtxp=unlimited:\ :pipebuf=unlimited:\ :priority=0:\ - :ignoretime@:\ :umask=022:\ :charset=UTF-8:\ :lang=C.UTF-8: @@ -149,7 +148,6 @@ russian|Russian Users Accounts:\ # :requirehome:\ # :passwordtime=90d:\ # :umask=002:\ -# :ignoretime@:\ # :tc=default: # # @@ -174,7 +172,6 @@ russian|Russian Users Accounts:\ ## #staff:\ # :ignorenologin:\ -# :ignoretime:\ # :requirehome@:\ # :accounted@:\ # :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ @@ -265,7 +262,6 @@ russian|Russian Users Accounts:\ ## - no time accounting, restricted to access via dialin lines ## #site:\ -# :ignoretime:\ # :passwordtime@:\ # :refreshtime@:\ # :refreshperiod@:\ From nobody Mon Oct 20 12:26:32 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cqvmn1YWfz6BY4Y; Mon, 20 Oct 2025 12:26: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cqvmn131Qz42KK; Mon, 20 Oct 2025 12:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q33Aba2sZzfOf6G/aqYAFkSk0uk1ZBLVIQrbjfXO5Lk=; b=rHV1KLXG9DIGemyAXdWdWwDbZKK06hGLUAqi6zxVrNeTr7UROEij3C0QLq8+A3WRAELlxT /OoGDyjeUAv+s65k7Gd1x8CtYCfJ3cwKUgLnCvi4S/sS0hvLF0F4oE5OIbMv4w6bAYyyae cCin5hm9aJJSN9vbcwZMpPQ2xnp5WnVoczmB36CI4RYYbTa3NclYVCj7Hf6YQqtqPYSmiV rzU/EitcZGlIo4dE3v4Bg1XladsEHZE08AZmiZGLSezd287ZfGL7mG87BjE8NZNdU3bUUE R2k3yLecTLCZZUUUrytdF4EQrOw5tBpR+3A7M0wn1yXa18RUiwJ+bDipJOrJ7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q33Aba2sZzfOf6G/aqYAFkSk0uk1ZBLVIQrbjfXO5Lk=; b=qLD8LhVgb3Fyt+vCdWRdp8wdbDysBi2WEKOf9+RG3fxyZLYbky9PxXQL/wdR6z6jim5MtR pZX8M5A863CvpxTFUZAIaiHUa992fTLgrSvOnItcmzztpSXz61lFj+e/okPa1w+80RxDyy qjxT6w2Q9LiRsdElyKBbmANUpZWh56tojqQaIQFuByqgsch2prZgrcOaAv3NRnEGvAEX2a b3MDrzau2gnfsFrclosLAsshCPqoY8PTfcTvc3Lkzvo2CUuXq1Ic62GwgJZOIi8UJyl+Vt NWfiDXF65Cr/753SObNZgB+hpFeCDVzU4K+Q5k0IWKN4+gJMx4+HntVa9qBPSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760963193; a=rsa-sha256; cv=none; b=wkSUi2eW+TLk+dt3+GVv651s852hAzoRDN0kBC8ifymBq9ppUUoqXWGSQfLm7f3jyc5C89 rjqqkCfl5UJEsqvQhIw9yTKqPPwrt0TuxRbWOAovlpDkISg0XMFLs/dxRHQdWIfNkPhR18 nFNXvY4Ngcy+Sag11F2R4OUbbMSB/9TxJEXsx/JeL/6/q+P9s/wn6TJTIE1+QhabZoLplA sXYz1+VwxXg8pW71Yn7kElIVS6j/DAQdWEtExl588ahqOpIDzhs8zQp3CHjQSBh2ONFGku Dd/Zzi5K3EgQVpoLntXWehmYRLNd9Bas9jE7j79/INxh2CukvYnQADgx0NleKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cqvmn0Q4cz1C2Y; Mon, 20 Oct 2025 12:26: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 59KCQX7c006976; Mon, 20 Oct 2025 12:26:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KCQWFs006973; Mon, 20 Oct 2025 12:26:32 GMT (envelope-from git) Date: Mon, 20 Oct 2025 12:26:32 GMT Message-Id: <202510201226.59KCQWFs006973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 6ec0fbd8ff11 - stable/15 - manpages: Use canonical names for Linux filesystems List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6ec0fbd8ff11c7180e52e9c30a071da8f532fd47 Auto-Submitted: auto-generated The branch stable/15 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=6ec0fbd8ff11c7180e52e9c30a071da8f532fd47 commit 6ec0fbd8ff11c7180e52e9c30a071da8f532fd47 Author: Michael Osipov AuthorDate: 2025-10-17 09:24:12 +0000 Commit: Michael Osipov CommitDate: 2025-10-20 12:26:21 +0000 manpages: Use canonical names for Linux filesystems The manpages of linprocfs(5) and linsysfs(5) document incomplete names without "fs" suffix. Make them identical to other filesystems. PR: 283079 MFC after: 3 days Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D53155 (cherry picked from commit 88b9ca860ef332d4d32e97e0f8a166f12cffc8e3) --- share/man/man4/linprocfs.4 | 4 ++-- share/man/man4/linsysfs.4 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man4/linprocfs.4 b/share/man/man4/linprocfs.4 index 53940d7c02b0..dcd1c642b409 100644 --- a/share/man/man4/linprocfs.4 +++ b/share/man/man4/linprocfs.4 @@ -9,7 +9,7 @@ .Nd Linux process file system .Sh SYNOPSIS .Bd -literal -linproc /compat/linux/proc linprocfs rw 0 0 +linprocfs /compat/linux/proc linprocfs rw 0 0 .Ed .Sh DESCRIPTION The Linux process file system, or @@ -138,7 +138,7 @@ To mount a file system on .Pa /compat/linux/proc : .Pp -.Dl "mount -t linprocfs linproc /compat/linux/proc" +.Dl "mount -t linprocfs linprocfs /compat/linux/proc" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , diff --git a/share/man/man4/linsysfs.4 b/share/man/man4/linsysfs.4 index 12729a814085..045e1af89173 100644 --- a/share/man/man4/linsysfs.4 +++ b/share/man/man4/linsysfs.4 @@ -9,7 +9,7 @@ .Nd Linux kernel objects file system .Sh SYNOPSIS .Bd -literal -linsys /compat/linux/sys linsysfs rw 0 0 +linsysfs /compat/linux/sys linsysfs rw 0 0 .Ed .Sh DESCRIPTION The @@ -66,7 +66,7 @@ The PCI device hierarchy node. .Sh EXAMPLES The most common usage follows: .Pp -.Dl "mount -t linsysfs linsys /compat/linux/sys" +.Dl "mount -t linsysfs linsysfs /compat/linux/sys" .Pp where .Pa /compat/linux/sys From nobody Mon Oct 20 12:27:57 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cqvpP6xf4z6BY15; Mon, 20 Oct 2025 12:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cqvpP1d01z42y6; Mon, 20 Oct 2025 12:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tg7Zg6/BLDxQHuwrIgRphT62Q+/IFc5nuCcs/hUPp4Q=; b=JOhP03uzSmjGt2Iv1NG4Yyg5M/lVc2Yj4Zxs2hxj94f3aTwv+4yuKXKsAoXAYR6OXhz1bb ae8X2uCrdufNNyqUO1tS1vfNEWyMuRLcNgDpDnX9sWjpaipIkpeRH3Y6R8V5Vxozn4Ytk1 L4SY7y54CVRYQjt3KfN0xhiJwMZkOCm1pAJ8IXvwRdWe/sBMpP5vHA9zTItkCrN6SsYopn WUmXEHa/P6j/LubSOFgMpXmW+G2PA1VHujkfsyipym9A95DxbW1BjKkNpMxeIIlTVIJE5S TDKSACnzv8sWYi4FwBCCSzPrgcMNP6/WQwA5X+5xnSQ02HBg1OiXhy5q1tvNbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tg7Zg6/BLDxQHuwrIgRphT62Q+/IFc5nuCcs/hUPp4Q=; b=fjZGVmG2dzXeO0nYPRrhpcotzm/XLoSaiOW8RaEVdZPpUTCBplMu5U5lF6FdIVYvsRZXmk 8AZK88j6INWplxCKcFmhU2QbkAFYAEbPWa43dpm/mOIp9G8qaYPtbWc3xXgdRyOTO6FUMP 9NUpBc8qaZo5aPiJRDpWdTMMeTO031f4Ha/A+xlCygL9FHlMOdfCO6YlDpWI0JxJ+lugWp uq0SxBToj1sPsfVNqzDj0YtGpzHKBvXVzv3/1mGZ9/qyRDTWRxuyCf5Dj2aKpRaJboU4F3 jY2ubM7YC1pw4oxKoFGEKQw9MPuCz1lP8AHuU13fJIXdL5K5J583Ev+6i3hAyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760963277; a=rsa-sha256; cv=none; b=Ahi7uhbIObZxDYwNI+Uh1kyUZi/W/xc3WYaqBtBK57Sf/4yufEG+Oi13D0TgFqDR4LpWo7 lp67k5csJRxIVx/hj474/qEtZXMjg+eKL25GTLm6ElgqZADHnncW9wvajUgBpPXlR/bW1o 0xM2RqXYgQb41ecDEbxTU5I8bZGp0VC9kwlvkLU3kWasgt3cKDoNsfTRUfXdyW/kL8WFXN UZN4nPJohH+XxzIdvQB7fVnVEJGW+PToQ3hJseMpbnbIGgV4CF6Y/Fm5RwndeGnJ3nkCMQ zXsB0Bn3bNjgFIkyXPti6vRLQ1WnlMinGoli0uwNGyck9vcDCW0evGGBh6nlnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cqvpP0tDRz1C9n; Mon, 20 Oct 2025 12:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59KCRvIY007523; Mon, 20 Oct 2025 12:27:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KCRvS3007520; Mon, 20 Oct 2025 12:27:57 GMT (envelope-from git) Date: Mon, 20 Oct 2025 12:27:57 GMT Message-Id: <202510201227.59KCRvS3007520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 30f3a4146466 - stable/14 - login.conf: Remove never used ignoretime/ignoretime@ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 30f3a41464667f763b8cceabd23a9b3e466e521a Auto-Submitted: auto-generated The branch stable/14 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=30f3a41464667f763b8cceabd23a9b3e466e521a commit 30f3a41464667f763b8cceabd23a9b3e466e521a Author: Paul Armstrong AuthorDate: 2019-09-06 21:40:01 +0000 Commit: Michael Osipov CommitDate: 2025-10-20 12:27:46 +0000 login.conf: Remove never used ignoretime/ignoretime@ PR: 240378 Reviewed by: otis (mentor), glebius (src committer) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52991 (cherry picked from commit 4835fc45efe8b593fa49786ec4bfb6ce5050756c) --- usr.bin/login/login.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/usr.bin/login/login.conf b/usr.bin/login/login.conf index 1069da17b4db..c65a83caa565 100644 --- a/usr.bin/login/login.conf +++ b/usr.bin/login/login.conf @@ -46,7 +46,6 @@ default:\ :umtxp=unlimited:\ :pipebuf=unlimited:\ :priority=0:\ - :ignoretime@:\ :umask=022:\ :charset=UTF-8:\ :lang=C.UTF-8: @@ -149,7 +148,6 @@ russian|Russian Users Accounts:\ # :requirehome:\ # :passwordtime=90d:\ # :umask=002:\ -# :ignoretime@:\ # :tc=default: # # @@ -174,7 +172,6 @@ russian|Russian Users Accounts:\ ## #staff:\ # :ignorenologin:\ -# :ignoretime:\ # :requirehome@:\ # :accounted@:\ # :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ @@ -265,7 +262,6 @@ russian|Russian Users Accounts:\ ## - no time accounting, restricted to access via dialin lines ## #site:\ -# :ignoretime:\ # :passwordtime@:\ # :refreshtime@:\ # :refreshperiod@:\ From nobody Mon Oct 20 12:32:36 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cqvvm40cyz6BYbq; Mon, 20 Oct 2025 12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cqvvm3WZjz43hx; Mon, 20 Oct 2025 12: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=1760963556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTekj5dPVjr7hCZKE8mNFsBjHAYxVWPjhHRfPNqE+KU=; b=AaP/9zlyXLFObiwSMgf9p0kW73A1IFa1L2n2al5gdkHGl7W72egF4crDT9Nbn88DRxa1Xf 3qyDT2BLPcsFnpxkBe02TGjZh/k6zwdpAIf+o0KNGAXLghcKXc61TsXchPCDpYf/+mCda6 U47Ml0O+e3XhkdPfOLR5Zho9irohJmPTJYiooFsVqYSc84S13Hq0ThBsxIwbNhDirT0xu8 LeRhRGAiz3MBIiHd/SlNnbaS/QjKAYMNMNKzoSLRWHLlH4bWQsA2JzCj7EvJuNRq48U0e9 wQKnzQxna26uNlXR1MQM9igzWN65AEcF3tnRK7duB63x/nZmxO6G3qPXmIzd/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTekj5dPVjr7hCZKE8mNFsBjHAYxVWPjhHRfPNqE+KU=; b=V6/XRNPfqz0HIPkaR+C+Cx8YQ5gqmP2a+M5y70JAIImYWCsWDnmGxyY19mpCQfmh++HQYz 9BneS4rg8HHGK7jU9U0EpHQK+b3heTa58Lo3j+U8NuOu7DmUrCN5hoiBJHnKZIZzuCJoMs P4r7ywkHvLggYpZyLO8EivaTTA9D2y2NSFT/ybUEsxy8AFbnwOig3DWeXt/6IF69aSh0IZ 60BEURJrp7HqdNKCV35yVpShc0Vq60LIdJLdYdrRMFwpX0iYpOTSNygqt+J2RHrjnu8kwa QsOIDQODFmSHb+MltPhhq57q5fuiTaHEVrJTnl1quiK8Jj9It5eda6ya/HmSWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760963556; a=rsa-sha256; cv=none; b=B6FGFHOkG42S29BmSaUMEvZGYUpl3FZi9RG6i684SnUwRrKQB+EHByj1sy2TECvSPLc1ck +vW87SjOLor0LLTRiYjekOGJEoaHHWTvHHyMupJ8YrMa6bTZoSsUnWJDXIGlCpPKp00lu5 v0Ph680BTYqmtfTT1vPjUkb0g4Te6cjiHnl28YHDJIrYMdM75RxMpglSSAdjZkBbfh3IeJ mqiqcAS9C3cisN/OqquDCGuqhS2fHWAPqQlsMZVXs/EVycT7RVtIaHVyW5Dyjq4ZGpqbEq /IcZMOYH2hol2jIYi1ftQUT7MggdfZW9TCLj5PTsBXd0gKikCtyOTbcj6A9EXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cqvvm33MMz1BXf; Mon, 20 Oct 2025 12: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 59KCWaQl024566; Mon, 20 Oct 2025 12: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 59KCWaq0024563; Mon, 20 Oct 2025 12:32:36 GMT (envelope-from git) Date: Mon, 20 Oct 2025 12:32:36 GMT Message-Id: <202510201232.59KCWaq0024563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 9e40b536cb58 - stable/14 - manpages: Use canonical names for Linux filesystems List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e40b536cb589a1f54b58c1e53b6e5ec682dd4df Auto-Submitted: auto-generated The branch stable/14 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=9e40b536cb589a1f54b58c1e53b6e5ec682dd4df commit 9e40b536cb589a1f54b58c1e53b6e5ec682dd4df Author: Michael Osipov AuthorDate: 2025-10-17 09:24:12 +0000 Commit: Michael Osipov CommitDate: 2025-10-20 12:32:17 +0000 manpages: Use canonical names for Linux filesystems The manpages of linprocfs(5) and linsysfs(5) document incomplete names without "fs" suffix. Make them identical to other filesystems. PR: 283079 MFC after: 3 days Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D53155 (cherry picked from commit 88b9ca860ef332d4d32e97e0f8a166f12cffc8e3) --- share/man/man5/linprocfs.5 | 4 ++-- share/man/man5/linsysfs.5 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man5/linprocfs.5 b/share/man/man5/linprocfs.5 index 6b30d944b14b..568d4dcd9d14 100644 --- a/share/man/man5/linprocfs.5 +++ b/share/man/man5/linprocfs.5 @@ -9,7 +9,7 @@ .Nd Linux process file system .Sh SYNOPSIS .Bd -literal -linproc /compat/linux/proc linprocfs rw 0 0 +linprocfs /compat/linux/proc linprocfs rw 0 0 .Ed .Sh DESCRIPTION The Linux process file system, or @@ -70,7 +70,7 @@ To mount a file system on .Pa /compat/linux/proc : .Pp -.Dl "mount -t linprocfs linproc /compat/linux/proc" +.Dl "mount -t linprocfs linprocfs /compat/linux/proc" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , diff --git a/share/man/man5/linsysfs.5 b/share/man/man5/linsysfs.5 index f87f791c5f94..2f437eb88f99 100644 --- a/share/man/man5/linsysfs.5 +++ b/share/man/man5/linsysfs.5 @@ -9,7 +9,7 @@ .Nd Linux kernel objects file system .Sh SYNOPSIS .Bd -literal -linsys /compat/linux/sys linsysfs rw 0 0 +linsysfs /compat/linux/sys linsysfs rw 0 0 .Ed .Sh DESCRIPTION The @@ -66,7 +66,7 @@ The PCI device hierarchy node. .Sh EXAMPLES The most common usage follows: .Pp -.Dl "mount -t linsysfs linsys /compat/linux/sys" +.Dl "mount -t linsysfs linsysfs /compat/linux/sys" .Pp where .Pa /compat/linux/sys From nobody Mon Oct 20 12:33:38 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cqvwy4Xb0z6BYb5; Mon, 20 Oct 2025 12:33: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cqvwy42jhz43q7; Mon, 20 Oct 2025 12:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A6z+FR9YC9UVQRogSwWj1FNj6epHYpeuHWckd6QF/Gk=; b=ijOoaoJOcxyApQdVlQBXnL+DW0lw0ym3yEt2oNklU5ARFdop8SVvj8ZIqOv6KulZg24/j8 TeAxgJ4a9ov44hUmjUrgpW5xbj9kbxpE2MKfV8RinzQnhM0F7nSu7RyBpniYQiedfKO8eY hpdc17wsRflNnehgzFybJ4nuFk374uHlpWeb+0Tm9ebsBfAOdVDcM81nq/ArRsRkEVpLfR dFGSuHeKprTDFxUVEpwPknOBBgbM/CxaBPk5EzQBFtcrFJ0KZXK9jPGJwgj+6dliH+qxDG w+CmTVCNaBtUuxvsheSJT7vTj5g2ENq81e94IbOuIcg7GdsBOEPg/VqMtHOetA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A6z+FR9YC9UVQRogSwWj1FNj6epHYpeuHWckd6QF/Gk=; b=qcU8Kwh6e5GckJb/qSG2rtg7xHPEH9Y4CZSrsYI13IOjEKXRGULiwyApViXHWqjvhHuxGe ua/aKq05+gVu0xG58duhSvfa3sPtx5QnYRCszpF8sQ4gCBku9Ice79a/Y6qrsNvQ5PMMGj ga1l8AjoWpHBOn77IdINDw1ywM3t9fZZy3wCrHxaR5fabkvEI8MzjCkol55FbWReKzAnip tn5VeSU7OCnOXFwUQWFOUYVHlnk39JQTJs6Hupujqr4K0rlU0nxUaFU0eF9pJfvj8iuE5D 1jTK+NNSFCircFTNgtUYMM2raxmSALaYVKrXQtZKOP2WcVk3bpADXGZEdtdAUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760963618; a=rsa-sha256; cv=none; b=UP4Ywj5PRypBnlQd5V1T487PypFflsBgs2aH+Z2V0VlLPtNgPJsMAqm4nh/2Ly23uMRLP1 PxQpVB5agvriA2k0yXh6tOXwGkZlzQtQhvzM495ydcfa9mCOc92xoz00PREAPGTTRcIoFx wIwjLslyY29uIM1JL2dCT3K6ki0+hDsmFTcdNANAZyEw1E9QjOzWtvKuhfDWj8XvneuzAK +blyNDxWRla0eWzTyS7PFf54esFHPgZrA0Oz1WcbiR0TweNwaK6vc7s17GZeNyTYisHbXD /KN6JKWVqxtaCxPaIpJW/3FIFPv8WRioxAWHe6J1xkve9aRFYeNR1mBVarv8CA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cqvwy3fHTz1BRb; Mon, 20 Oct 2025 12:33: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 59KCXc5a025031; Mon, 20 Oct 2025 12:33:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KCXcCL025028; Mon, 20 Oct 2025 12:33:38 GMT (envelope-from git) Date: Mon, 20 Oct 2025 12:33:38 GMT Message-Id: <202510201233.59KCXcCL025028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: f8c4b9d71a5c - stable/13 - login.conf: Remove never used ignoretime/ignoretime@ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f8c4b9d71a5c241eabbc36737896fae21c10d319 Auto-Submitted: auto-generated The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=f8c4b9d71a5c241eabbc36737896fae21c10d319 commit f8c4b9d71a5c241eabbc36737896fae21c10d319 Author: Paul Armstrong AuthorDate: 2019-09-06 21:40:01 +0000 Commit: Michael Osipov CommitDate: 2025-10-20 12:33:31 +0000 login.conf: Remove never used ignoretime/ignoretime@ PR: 240378 Reviewed by: otis (mentor), glebius (src committer) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52991 (cherry picked from commit 4835fc45efe8b593fa49786ec4bfb6ce5050756c) --- usr.bin/login/login.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/usr.bin/login/login.conf b/usr.bin/login/login.conf index 50a2ba9ffb5e..0e25d200636d 100644 --- a/usr.bin/login/login.conf +++ b/usr.bin/login/login.conf @@ -45,7 +45,6 @@ default:\ :kqueues=unlimited:\ :umtxp=unlimited:\ :priority=0:\ - :ignoretime@:\ :umask=022:\ :charset=UTF-8:\ :lang=C.UTF-8: @@ -148,7 +147,6 @@ russian|Russian Users Accounts:\ # :requirehome:\ # :passwordtime=90d:\ # :umask=002:\ -# :ignoretime@:\ # :tc=default: # # @@ -173,7 +171,6 @@ russian|Russian Users Accounts:\ ## #staff:\ # :ignorenologin:\ -# :ignoretime:\ # :requirehome@:\ # :accounted@:\ # :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ @@ -264,7 +261,6 @@ russian|Russian Users Accounts:\ ## - no time accounting, restricted to access via dialin lines ## #site:\ -# :ignoretime:\ # :passwordtime@:\ # :refreshtime@:\ # :refreshperiod@:\ From nobody Mon Oct 20 12:34:49 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cqvyK54wfz6BYdZ; Mon, 20 Oct 2025 12:34: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cqvyK4ZQxz444h; Mon, 20 Oct 2025 12:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wgvo1x6fiFPK9u1FXeSKIt+Wlcwv46KOQHwbDOGkYU=; b=kD4wISU+l2bHKePkKaCghMGNh7E/TGPYDGTmkF2o1BBUXrJMk982B59gWhXUC2+PbeGKH/ LNwsN0mAHmoAF0U5LIBBI7KXWGoYZZP0yqZZM6koA9CahOWkAuWvK4lomIrxwXuvVrITs9 8KoMsJQZJqHCbN2cMrfm/OUY+trmMBTqtd4gmCwIqMz9+R2hdl7JtETUztH6Hzdc3tkcua ffXLbNjN7gzw8d0aCC+f3n9+JldkWfhznVhGlFzb6cJDJq6G6Lp1NfDn76FRgJKB+lmAfI Fvr8uzzeZ0645H6ucnbZs70Mivb1IRNP8QM8SNtYBhvdOybMX9BD9u2dwActIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760963689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wgvo1x6fiFPK9u1FXeSKIt+Wlcwv46KOQHwbDOGkYU=; b=tFuTpG3BVhqTuhPj3kv3vm8PVwmG2mM9QBYtBQkbQIeGjI/KiU+SGMhAZe2AF7sqHrM1UZ 6/pB/VP5XnNIwxLdbriLTUJ7ueU+N5QPjF2YTdnrno7sAbtIaD6ooN9r5Q040GPcPJfF5U inNpqYduRR2qJLDhKSqP0S/k0w8Od8lOaFCi0fhsNF40Oc6Kz4tIcs2MuwYpt+OJHE98ZQ U1fmVI/DkEPPEepPN0sMbBb9IAizyRdlNiZd4tR0B31d3Tm8ijHoSPOxeI3OHBBX0hP4w2 klr8bYuasTa0BdM7pzmsNjSy1ookiZu+s+1D0FTqzKS2lFqqiX3Hfv1nNnMCRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760963689; a=rsa-sha256; cv=none; b=XY5yCLcrojq1E0JwM3htman7uR5dFqrDasuxgN4EoU7Jmh3VNSgfBMnqDciucZXgym+X6r zsvCMDSetAee6SFsU8SosuLJHCtc1c+ExSkTjBATKZtvn0dTJGDBZkg98EHpVM6RjLsUEe 14P3rRs1EBpMVlUmcHApJoHCFcbxDsNTjIioFQ+DEkSpdJgxPiGktvKYN5gG7U4rPF9LV/ 6Xt8KbqaGjspcd58po3Qr8HAlkLK/2X8MlM335RUyUXfbJMxs5FCE+zIGSPqPhpIOaNuem HTdO6mlv/7K0banlyAdpaFNJeJ2rN3Xo2Qv6jGRpX0RqsPCmcvEyg8GM6twIKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cqvyK3qJhz1CTn; Mon, 20 Oct 2025 12:34: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 59KCYnLQ025488; Mon, 20 Oct 2025 12:34:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KCYn4q025485; Mon, 20 Oct 2025 12:34:49 GMT (envelope-from git) Date: Mon, 20 Oct 2025 12:34:49 GMT Message-Id: <202510201234.59KCYn4q025485@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 25150c4f98c0 - stable/13 - manpages: Use canonical names for Linux filesystems List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 25150c4f98c0b128267bd7be0c1b83a228a5688b Auto-Submitted: auto-generated The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=25150c4f98c0b128267bd7be0c1b83a228a5688b commit 25150c4f98c0b128267bd7be0c1b83a228a5688b Author: Michael Osipov AuthorDate: 2025-10-17 09:24:12 +0000 Commit: Michael Osipov CommitDate: 2025-10-20 12:34:34 +0000 manpages: Use canonical names for Linux filesystems The manpages of linprocfs(5) and linsysfs(5) document incomplete names without "fs" suffix. Make them identical to other filesystems. PR: 283079 MFC after: 3 days Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D53155 (cherry picked from commit 88b9ca860ef332d4d32e97e0f8a166f12cffc8e3) --- share/man/man5/linprocfs.5 | 4 ++-- share/man/man5/linsysfs.5 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man5/linprocfs.5 b/share/man/man5/linprocfs.5 index 6b30d944b14b..568d4dcd9d14 100644 --- a/share/man/man5/linprocfs.5 +++ b/share/man/man5/linprocfs.5 @@ -9,7 +9,7 @@ .Nd Linux process file system .Sh SYNOPSIS .Bd -literal -linproc /compat/linux/proc linprocfs rw 0 0 +linprocfs /compat/linux/proc linprocfs rw 0 0 .Ed .Sh DESCRIPTION The Linux process file system, or @@ -70,7 +70,7 @@ To mount a file system on .Pa /compat/linux/proc : .Pp -.Dl "mount -t linprocfs linproc /compat/linux/proc" +.Dl "mount -t linprocfs linprocfs /compat/linux/proc" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , diff --git a/share/man/man5/linsysfs.5 b/share/man/man5/linsysfs.5 index f87f791c5f94..2f437eb88f99 100644 --- a/share/man/man5/linsysfs.5 +++ b/share/man/man5/linsysfs.5 @@ -9,7 +9,7 @@ .Nd Linux kernel objects file system .Sh SYNOPSIS .Bd -literal -linsys /compat/linux/sys linsysfs rw 0 0 +linsysfs /compat/linux/sys linsysfs rw 0 0 .Ed .Sh DESCRIPTION The @@ -66,7 +66,7 @@ The PCI device hierarchy node. .Sh EXAMPLES The most common usage follows: .Pp -.Dl "mount -t linsysfs linsys /compat/linux/sys" +.Dl "mount -t linsysfs linsysfs /compat/linux/sys" .Pp where .Pa /compat/linux/sys From nobody Mon Oct 20 14:12:04 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cqy6Y09HVz6CSs3; Mon, 20 Oct 2025 14:12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cqy6X6FdXz4NK6; Mon, 20 Oct 2025 14:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760969524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdEbx1SbuVSRRyRZkZD8I59tI7oz7o467gyJ3okZFOM=; b=ODo593E397Z/Xd0LfN11tF+uTGaE1VyhQgfxbJr7fdapiyCY1pje2GPTE3sAycOaOI5m3D P8fkShAzE76japQ53MpEKWrUD1YwNciPwt/ZP+Kk+Dr/0SZcotKDwjLyehElCRYtVDHgdx YRt+mfwB2XGvUZ8uxTn6pglmLSTu1sXjILUF3E6F4PtkTRZbEBCYBZF1Qf5O0mo+6QyY9d qaiAp43jfqiOuP4IWKcU7sIsX3Higzym1C1V0LwgldyCEmNyOXVuoZ15ZQ3YPYL3qNmVWj mkn1mqf+H/L1WaiKt44qPDgn/fDpeirHFrOitNw0I7uqoQORkQKu64bycd9X6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760969524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdEbx1SbuVSRRyRZkZD8I59tI7oz7o467gyJ3okZFOM=; b=dWAJE3hZ8wbzYlDXteX/HXkW9NzYShHw57K0+hzQJVCWFkEgzDLf8IXHawuK6ufRxRN6h8 /Mwn1+Fv25G0Izv+ltxSq4629V+KG3g/J3knE0Fi+Up8Vgbcg5ZirNcP2r9NI79slBmZP6 85hDvzgqyIhj5bL44uFTyV3/Mk3v6BCxYpP9Rk5i8OISEHL53D2d2ZEzFxR4YJttYiY6vd XihHZM0xFRGSF2+X/HU1uPm5qKwawGY2Onfnjfm3C0Zx2R//iciTJi9RZgm16teAnQb8lR 3QU5reyJGswCf1kJK0ZjYmxkEtNwj4EL9v4OtAeG6Yhe3/e9opiQOT6Mhl7Abg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760969524; a=rsa-sha256; cv=none; b=yZkYNXZDUYSZQ63yGOB6E8eEputaiZi7gpRKxfJsPDZl02PpjSyk+Nf++jncQCKa1q1opc Z0bRYo9fRujW4jY+aq8Sgi/N4DivZT7Qu3o8E8Ca7djyWcNJTl/gEIvFiUjLSoWQXh794V R4lPwfcM1lLZ2HsLG7Q4gqOaHcortjp2h0UGqnXykpzd98Ng09lhkT07a5kS2DorTsOyfe VVgJ2D8zWRvDApGO7iHdZKg7FqMz1fPM2DpcBGc1dg938UWj0NYkHdXAr2ear8d95gEolk RoKYYIv0MzfHJQkhhTUWMjfSzL+ROMYnKBhNqbBQZz7BsgOLGOYP+S3GUyA2IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cqy6X5mlzz1gV; Mon, 20 Oct 2025 14:12: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 59KEC4oX014206; Mon, 20 Oct 2025 14:12:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KEC45c014203; Mon, 20 Oct 2025 14:12:04 GMT (envelope-from git) Date: Mon, 20 Oct 2025 14:12:04 GMT Message-Id: <202510201412.59KEC45c014203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: d4ccbbce399b - stable/15 - Add random Intel Elkhart Lake device IDs. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d4ccbbce399b71c8b32e5eb379468d107a6d5964 Auto-Submitted: auto-generated The branch stable/15 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=d4ccbbce399b71c8b32e5eb379468d107a6d5964 commit d4ccbbce399b71c8b32e5eb379468d107a6d5964 Author: Dmitry Luhtionov AuthorDate: 2025-09-08 16:28:24 +0000 Commit: Alexander Motin CommitDate: 2025-10-20 14:11:22 +0000 Add random Intel Elkhart Lake device IDs. --- sys/dev/ahci/ahci_pci.c | 1 + sys/dev/ichsmb/ichsmb_pci.c | 3 +++ sys/dev/sound/pci/hda/hdac.c | 1 + sys/dev/sound/pci/hda/hdac.h | 1 + sys/dev/usb/controller/xhci_pci.c | 2 ++ 5 files changed, 8 insertions(+) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 9e7cfd4a9a33..2b4cb37275a6 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -195,6 +195,7 @@ static const struct { {0x1f3f8086, 0x00, "Intel Avoton (RAID)", 0}, {0x23a38086, 0x00, "Intel Coleto Creek", 0}, {0x31e38086, 0x00, "Intel Gemini Lake", 0}, + {0x4b638086, 0x00, "Intel Elkhart Lake", 0}, {0x5ae38086, 0x00, "Intel Apollo Lake", 0}, {0x7ae28086, 0x00, "Intel Alder Lake", 0}, {0x8c028086, 0x00, "Intel Lynx Point", 0}, diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c index 728bb942d503..e4d87fe1fed2 100644 --- a/sys/dev/ichsmb/ichsmb_pci.c +++ b/sys/dev/ichsmb/ichsmb_pci.c @@ -107,6 +107,7 @@ #define ID_COMETLAKE2 0x06a3 #define ID_TIGERLAKE 0xa0a3 #define ID_TIGERLAKE2 0x43a3 +#define ID_ELKHARTLAKE 0x4b23 #define ID_GEMINILAKE 0x31d4 #define ID_CEDARFORK 0x18df #define ID_ICELAKE 0x34a3 @@ -206,6 +207,8 @@ static const struct pci_device_table ichsmb_devices[] = { PCI_DESCR("Intel Tiger Lake SMBus controller") }, { PCI_DEV(PCI_VENDOR_INTEL, ID_TIGERLAKE2), PCI_DESCR("Intel Tiger Lake SMBus controller") }, + { PCI_DEV(PCI_VENDOR_INTEL, ID_ELKHARTLAKE), + PCI_DESCR("Intel Elkhart Lake SMBus controller") }, { PCI_DEV(PCI_VENDOR_INTEL, ID_GEMINILAKE), PCI_DESCR("Intel Gemini Lake SMBus controller") }, { PCI_DEV(PCI_VENDOR_INTEL, ID_CEDARFORK), diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 90cd74d28b3d..80028063bb0d 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -133,6 +133,7 @@ static const struct { { HDA_INTEL_PCH, "Intel Ibex Peak", 0, 0 }, { HDA_INTEL_PCH2, "Intel Ibex Peak", 0, 0 }, { HDA_INTEL_ELLK, "Intel Elkhart Lake", 0, 0 }, + { HDA_INTEL_ELLK2, "Intel Elkhart Lake", 0, 0 }, { HDA_INTEL_JLK2, "Intel Jasper Lake", 0, 0 }, { HDA_INTEL_BXTNP, "Intel Broxton-P", 0, 0 }, { HDA_INTEL_SCH, "Intel SCH", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index ff3a1d0dcfb5..c11e6b2d6810 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -66,6 +66,7 @@ #define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57) #define HDA_INTEL_ELLK HDA_MODEL_CONSTRUCT(INTEL, 0x4b55) +#define HDA_INTEL_ELLK2 HDA_MODEL_CONSTRUCT(INTEL, 0x4b58) #define HDA_INTEL_JLK2 HDA_MODEL_CONSTRUCT(INTEL, 0x4dc8) #define HDA_INTEL_BXTNP HDA_MODEL_CONSTRUCT(INTEL, 0x5a98) #define HDA_INTEL_MACBOOKPRO92 HDA_MODEL_CONSTRUCT(INTEL, 0x7270) diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c index d5cfd228a429..820fb2f738a1 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -178,6 +178,8 @@ xhci_pci_match(device_t self) return ("Intel Tiger Lake-H USB 3.2 controller"); case 0x461e8086: return ("Intel Alder Lake-P Thunderbolt 4 USB controller"); + case 0x4b7d8086: + return ("Intel Elkhart Lake USB 3.1 controller"); case 0x51ed8086: return ("Intel Alder Lake USB 3.2 controller"); case 0x5aa88086: From nobody Mon Oct 20 16:03:45 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0bP2xztz6Cfsb; Mon, 20 Oct 2025 16:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0bP2MLBz3QW7; Mon, 20 Oct 2025 16:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SzvMiQfqtzytZvxR71v+tctPKN0rPGGKp0x799hKnzs=; b=sCPBUup4k/ibEx8GToqHJVlYBNXmRtfl4Q5FWlsZPn5YoGOhtxGIqnJjUltgUHMO7xvwzK nueI16lwcgXNG3fSJ0GVapTD3hHsEzWpCwo8uLNFIY0VfkGijxeQwM3lPghN3d2ahm9WVn S5EaqI3FhcYoGmN+17Ln4Ki4g2Ow1c2EbCiLrWO1MMDkFUvQwqwZ52T93SGRu08EhEAWRC 3IfTVrYkCLkvW3MHHJLeMninZ357/Wh0IbLm02agU9gQwLGE3/XuEfrF3sMnuURU2GZfvA PJ1Q/mqt837nURMd4FTxyEIOvXvt/HrycNLitALD1Gpzy3GvJmghCm0s/U13CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SzvMiQfqtzytZvxR71v+tctPKN0rPGGKp0x799hKnzs=; b=wG/56H2BeUQOP93SzfUaS6u4PfP9zRL4IXOwNdrt0d/SPKZbQ35x4I1bfCSFRt+T7gUmkg tIj2194f8m0tDGFQD9KcIj+s3XqEfjfXkMhJ7tLKw9W+BU35D46Tzo6TTRIHnabFoc79Tv Z/Qj6oQK1KRnSNLFY8epo0sgBRpw2aj3K8UPFek1ZERtesp3PxvyTuSrxqsyRwwgR8S4XW dZYaeBWj1dXJUSbv/irrbti/x1wkVzEaoJtaYSpfd8gNwiAg6pUt745Z20fhor+C/SKgo3 YyQrXGXRj/YjOYue38G28QNAmGq94rH/vm+YmyIEYjUC0eHulcNh/DyvfXK3dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976225; a=rsa-sha256; cv=none; b=S0VWtHAUgrmf1VxXvxQ6ll4vm+05u4BWovbVfgtxvY5RFSyYEG+q9Xwo2vIOeOnhcnT9Hd 0XeFDqqIMHU6zlNn3S2/lHKIv6IAWWVO0lA6JGWU4Kj+sUUMO1+VvW7kpyj0wW1iOGzzk9 rQdN4bHO5gjQrtXvJfX3yIquFU+SVhBFYTI19zlRymeCwRZ6UoxJr3zBPYFUfQ2vnD4b5p SXheROIpbJFAEadqiqgy6YZv4qXJw6vvuXlb2AXsjqoVyIk8ST3nL9X6bRyR0B7QYjMEPE 4vZQpn8mGI5nJ8SkOC0kku4oty/n7nUJBzccQaxIHV4ENZYeDNW6jsdtub/X3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0bP1JfNz4xc; Mon, 20 Oct 2025 16:03: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 59KG3jj0022297; Mon, 20 Oct 2025 16:03:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KG3je8022294; Mon, 20 Oct 2025 16:03:45 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:03:45 GMT Message-Id: <202510201603.59KG3je8022294@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: fdf8dc1a01a6 - stable/14 - zfs: Emit warning upon use of legacy sysctls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fdf8dc1a01a603cbd1f9349068e43c7d8c609969 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fdf8dc1a01a603cbd1f9349068e43c7d8c609969 commit fdf8dc1a01a603cbd1f9349068e43c7d8c609969 Author: Ed Maste AuthorDate: 2025-10-09 15:57:14 +0000 Commit: Ed Maste CommitDate: 2025-10-20 13:40:06 +0000 zfs: Emit warning upon use of legacy sysctls The introduction of OpenZFS moved some sysctls, and legacy compat shims were added. For example: Old (legacy) name: vfs.zfs.min_auto_ashift New name: vfs.zfs.vdev.min_auto_ashift Upstream OpenZFS removed these, but we've temporarily restored them in FreeBSD. Note that l2arc sysctls use generic sysctl functions (e.g. SYSCTL_UQUAD) and thus cannot trivially have warnings added, so they are not handled. PR: 266374 Reviewed by: jlduran Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53033 (cherry picked from commit 654a3aa9a1de176648eec00b3c201c33b10bd325) (cherry picked from commit f0033878b92e1a00120fec4edf590715f7c4ecbc) --- .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 41 +++++++++++++++++----- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c index 55e133c096c1..04c4bac2201c 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/sysctl_os.c @@ -163,6 +163,13 @@ param_set_arc_int(SYSCTL_HANDLER_ARGS) return (0); } +static void +warn_deprecated_sysctl(const char *old, const char *new) +{ + printf("WARNING: sysctl vfs.zfs.%s is deprecated. Use vfs.zfs.%s instead.\n", + old, new); +} + int param_set_arc_max(SYSCTL_HANDLER_ARGS) { @@ -185,13 +192,16 @@ param_set_arc_max(SYSCTL_HANDLER_ARGS) if (val != 0) zfs_arc_max = arc_c_max; + if (arg2 != 0) + warn_deprecated_sysctl("arc_max", "arc.max"); + return (0); } /* BEGIN CSTYLED */ SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max, CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - NULL, 0, param_set_arc_max, "LU", + NULL, 1, param_set_arc_max, "LU", "Maximum ARC size in bytes (LEGACY)"); /* END CSTYLED */ @@ -216,13 +226,16 @@ param_set_arc_min(SYSCTL_HANDLER_ARGS) if (val != 0) zfs_arc_min = arc_c_min; + if (arg2 != 0) + warn_deprecated_sysctl("arc_min", "arc.min"); + return (0); } /* BEGIN CSTYLED */ SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min, CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - NULL, 0, param_set_arc_min, "LU", + NULL, 1, param_set_arc_min, "LU", "Minimum ARC size in bytes (LEGACY)"); /* END CSTYLED */ @@ -246,6 +259,9 @@ param_set_arc_free_target(SYSCTL_HANDLER_ARGS) zfs_arc_free_target = val; + if (arg2 != 0) + warn_deprecated_sysctl("arc_free_target", "arc.free_target"); + return (0); } @@ -256,7 +272,7 @@ param_set_arc_free_target(SYSCTL_HANDLER_ARGS) /* BEGIN CSTYLED */ SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_free_target, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, - NULL, 0, param_set_arc_free_target, "IU", + NULL, 1, param_set_arc_free_target, "IU", "Desired number of free pages below which ARC triggers reclaim" " (LEGACY)"); /* END CSTYLED */ @@ -276,13 +292,16 @@ param_set_arc_no_grow_shift(SYSCTL_HANDLER_ARGS) arc_no_grow_shift = val; + if (arg2 != 0) + warn_deprecated_sysctl("arc_no_grow_shift", "arc.no_grow_shift"); + return (0); } /* BEGIN CSTYLED */ SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_no_grow_shift, CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - NULL, 0, param_set_arc_no_grow_shift, "I", + NULL, 1, param_set_arc_no_grow_shift, "I", "log2(fraction of ARC which must be free to allow growing) (LEGACY)"); /* END CSTYLED */ @@ -775,13 +794,16 @@ param_set_min_auto_ashift(SYSCTL_HANDLER_ARGS) zfs_vdev_min_auto_ashift = val; + if (arg2 != 0) + warn_deprecated_sysctl("min_auto_ashift", + "vdev.min_auto_ashift"); + return (0); } /* BEGIN CSTYLED */ SYSCTL_PROC(_vfs_zfs, OID_AUTO, min_auto_ashift, - CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - &zfs_vdev_min_auto_ashift, sizeof (zfs_vdev_min_auto_ashift), + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, NULL, 1, param_set_min_auto_ashift, "IU", "Min ashift used when creating new top-level vdev. (LEGACY)"); /* END CSTYLED */ @@ -802,13 +824,16 @@ param_set_max_auto_ashift(SYSCTL_HANDLER_ARGS) zfs_vdev_max_auto_ashift = val; + if (arg2 != 0) + warn_deprecated_sysctl("max_auto_ashift", + "vdev.max_auto_ashift"); + return (0); } /* BEGIN CSTYLED */ SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift, - CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - &zfs_vdev_max_auto_ashift, sizeof (zfs_vdev_max_auto_ashift), + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, NULL, 1, param_set_max_auto_ashift, "IU", "Max ashift used when optimizing for logical -> physical sector size on" " new top-level vdevs. (LEGACY)"); From nobody Mon Oct 20 16:09:13 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0jk0KkHz6Cg0Q; Mon, 20 Oct 2025 16:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0jj5d54z3R6D; Mon, 20 Oct 2025 16:09:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fh1AYwbmCEO2nYxIHg2nTK6B3/sEHQ8NyAl448ooJ+g=; b=scV2VmQbQCgGfqYyRAOAouRzVtqU2CE5DD6+6G1hi9qblGvy+XZTO+cP1+uMY/tx09Epbs Jrm6o1dBgT+DCNrRZoj9vaT67LsbDaj8IJzQH089oGqlLD8+8RrUXjO88KOp3PbYO2EzJe DfHDXNXZk6K4n4PnLlVp2LT32Du4QmGecvT+044SowO+xC80CbkbuDwgdNTTKqspwMeI/P swiE4BaQSlI7mXyrzHdZAi3Zidd++suZdejv2PIDmnQmvqxLZgZzDRecTtRhjdUOR+uTG4 H43Z8z1U5DQ15CGnYzMVUncmmRtDIRA9BLmBEdDgz//XpMFFk/7LE6QZMQHQ0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fh1AYwbmCEO2nYxIHg2nTK6B3/sEHQ8NyAl448ooJ+g=; b=PEjccuPUDRssri4/w3svmDbINBi4nNC7MDqjgmQrtf2g89O5b9o1zZP/V39Nt+aA3xdxGV Gy/cNKQoIoEO/xz1mZdnCz7x01ilmubW9WzIKt2K8nRktFgirHTJGZ27FI2lX/UHp5G4nJ v91eVy2cStV3h7QGo9dCre6Dv2LzIOOfBT/4806ybp1qA0/myEgdsU1u9QQRt98rj45OAx cNJ85+6M/b/gvPo0NJC8QTgUkW4i8XvMs5kRzqStzlesr6+VJPT9WZt3L5ICNhlkJ1WtTl I2aKHC1Dj89xgWzFaSUWoNRKaVYAER9PojzLPauopjtjZ34A3m+ujYja51QyHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976553; a=rsa-sha256; cv=none; b=F8b7P9JB9wt3H6GWv8qx3HFyW8gFg50wAOv0AIpq/e9vrCAWSG35hSAPzYevO08CAPLQGC wVDwDhXprSGHlD9PrOpFdX89cyA2mDqTGzGEX5HGg9th12ObHr2FVd1sVlELm8ePn2oVYR 0mzR73n2p/n4kP4L18fsAZntVN5Bm7MywuFMhy55Egfunc4mjONZr3o0NTlVqJOPfbo/py DornNU0oj3+Q+X32pz3KP4YHU1woHO2+UwgREDFrulZb/bV1hJiC//UYCQ/F5pxa62hBY0 Zjv4QBGWNTMFG8kad+wjiRXw9HsghHDWbRlAaEoYeQC+QpOExzNLfwDO/XHucQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0jj4y3qz4cY; Mon, 20 Oct 2025 16:09: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 59KG9Dsv024271; Mon, 20 Oct 2025 16:09:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KG9Dn4024268; Mon, 20 Oct 2025 16:09:13 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:09:13 GMT Message-Id: <202510201609.59KG9Dn4024268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 59c0a987e0d3 - stable/15 - rc.conf: Fix typo interferring -> interfering List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 59c0a987e0d3fab4a884f57001802e6099624d57 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=59c0a987e0d3fab4a884f57001802e6099624d57 commit 59c0a987e0d3fab4a884f57001802e6099624d57 Author: Jose Luis Duran AuthorDate: 2025-10-17 14:15:46 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-20 16:02:25 +0000 rc.conf: Fix typo interferring -> interfering Reviewed by: emaste MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53168 (cherry picked from commit 982d70ca2e6333b7e8ccf828b004ccf20a9cc550) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index af4f6be30cc4..87f9d50b3b3c 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -24,7 +24,7 @@ : ${_localbase:="$(/sbin/sysctl -n user.localbase 2> /dev/null)"} : ${_localbase:="/usr/local"} -# rc_debug can't be set here without interferring with rc.subr's setting it +# rc_debug can't be set here without interfering with rc.subr's setting it # when the kenv variable rc.debug is set. #rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. From nobody Mon Oct 20 16:09:14 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0jl0xXHz6CgB9; Mon, 20 Oct 2025 16:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0jk6b8vz3RJw; Mon, 20 Oct 2025 16:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHEnt7dhrnDuc6ovUg2uSOCVpROGdfz1rv1Z3fR5c3g=; b=B8JNArBWk5xsF5ZgoOZZGS/Fj1PwD7s4fX1IbSA6Ev+Jil62c7jUHdkVv2z/QcMktPucq8 dpCGPyG2Rf18b0QXEQRz0CJrCOfCEbKXZreIWm6XVGhxfad3dwbEE/JEVTx7yzdaXkHta5 lzvyTq0PG9Lf9lPSsIjrgiO3oNqnrcXWgK7oNSEiJKwk03reun8e3ek9udPXJiwX8W5UJV ahF0eLasFEdq8HroD0v2WN6fw9t64Fg33np7fMcMv1dPTVqBImjvYshwJApz0xpnByO0m+ p55CCCP0e4ldPwQ9fvLRS+CmH1LEFmabNGO5KOAhhCn7q9L2CTJ8UxI5QJWU7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHEnt7dhrnDuc6ovUg2uSOCVpROGdfz1rv1Z3fR5c3g=; b=hgla3qmPsxsSNsi6Q6kpxBlAGqkBH9Hc6mL166z7lcLFBgXHDKET7J4d1kHm/AcBEXLCXx Fwdxwhy5XZuRJlONY0RkXqi8PDwp6Mm6MPuxEjF4TovnL9/KTZ3Dl6TB4F0JkiJdhEnylS Xl0StVG1hwHHUuo+NiXzGE9YzpV1ZUCQIvcg656KfbAO+00X1cIz/poSsyCdWfInV2egYi g1I/XU2FbPIayY85tA+lq1EJ0JG+WXHPJMMtEvXoL8UuxUxzvVRt+y55o9IBLY92dlyZoF j8CM0jtQqTM8CSHTDnKCI5dybJZKCe4T4ADTN1oR7lL0eLw0l2uTSbZX3Zz+8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976554; a=rsa-sha256; cv=none; b=dPEIuKgJK4B3Uj6Yi5UMxRytFmoLvNPpWcrTDb4EbbGSRHdiz6cGU/9lSwpgr2ANIUYMRS a47hN+fFZGPtPmh9Z4VCWz7gfaySAq0olkckGqNHLnbX8XAIbkyv46YU4oZVmXw6jZ2lK5 xpap4nPAc2VzEhTQc7qld6NTe8H/ONaraGbAtoEbA3HxLyRVJAL14pEnNBuzBjqbmxTHGz 7T6q202kpBc6K1XAlIejR423xCje6GEaPoNFmoeg2c4lItc/CayMtuzTmVyhOIkjkPp++k wmnmnBMUIUM25fGPQI8zNiAHpvkiMpKZuUk/4HWc4EEFmclbJT3rjG4T4qmMlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0jk69B7z4JN; Mon, 20 Oct 2025 16:09: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 59KG9Egv024306; Mon, 20 Oct 2025 16:09:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KG9E6w024303; Mon, 20 Oct 2025 16:09:14 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:09:14 GMT Message-Id: <202510201609.59KG9E6w024303@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: fa2e886206f4 - stable/15 - rc: dmesg: Allow umask to be configurable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fa2e886206f41b4ce652377a6da163103ef25351 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=fa2e886206f41b4ce652377a6da163103ef25351 commit fa2e886206f41b4ce652377a6da163103ef25351 Author: Jose Luis Duran AuthorDate: 2025-10-17 14:34:55 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-20 16:04:35 +0000 rc: dmesg: Allow umask to be configurable Allow umask to be configurable. Being able to set the umask via an rc variable is useful when setting: security.bsd.unprivileged_read_msgbuf=0 As it allows a user to configure: dmesg_umask="066" Without modifying the rc script, and preventing the contents of the $dmesg_file (/var/run/dmesg.boot) from being publicly readable. PR: 272552 Reviewed by: netchild MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53169 (cherry picked from commit edadbc6ee95570627679f3bc14a1d5476d0ce339) --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/dmesg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 87f9d50b3b3c..2b6db04d08e3 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -707,6 +707,7 @@ osrelease_enable="YES" # Update /var/run/os-release on boot (or NO). osrelease_file="/var/run/os-release" # File to update for os-release. osrelease_perms="444" # Default permission for os-release file. dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot +dmesg_umask="022" # Default umask for /var/run/dmesg.boot file. watchdogd_enable="NO" # Start the software watchdog daemon watchdogd_flags="" # Flags to watchdogd (if enabled) watchdogd_timeout="" # watchdogd timeout, overrides -t in watchdogd_flags diff --git a/libexec/rc/rc.d/dmesg b/libexec/rc/rc.d/dmesg index 51e35d5d4e80..736449f3b159 100755 --- a/libexec/rc/rc.d/dmesg +++ b/libexec/rc/rc.d/dmesg @@ -19,7 +19,7 @@ stop_cmd=":" do_dmesg() { rm -f ${dmesg_file} - ( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} ) + ( umask "${dmesg_umask}" ; /sbin/dmesg $rc_flags > ${dmesg_file} ) } load_rc_config $name From nobody Mon Oct 20 16:09:15 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0jm1VS7z6CgCb; Mon, 20 Oct 2025 16:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0jm065Vz3RK7; Mon, 20 Oct 2025 16:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TnCKZWNuqbMydowDh52eg5HI8LzTB1j8pYLCZYRVnIA=; b=WNIB4iTk0BkkYQ3UpywTa3S9pHHJhR2Ddfi4drvSs+WTwJJBZGt4Qp51kKEYDd9IDOGqDP NBp+CXxwisCkSkC58QDMSNgQqF83/Smyz+czIYnD4cyAj1cm6yroV2bJ3ThZDXdqc3pX4W t6jXZPhw0oEKowA2tkEWUiCIFlgsG/03uKT91OGYkuscfqimIqqb04/4+phwBeTPeb12KQ C0uuLB++79s6E/jKDjm3uYChWSle6LV3UQKLgzHTXj+RNBY872uVkL5inDk6sdyccSSjcq fWFibaCWEnCe1PPs2H3gkRW+C7z4mIDP2HgW6GNtKA8+Fd8nIf5FZ9+2dOzeow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TnCKZWNuqbMydowDh52eg5HI8LzTB1j8pYLCZYRVnIA=; b=cxvYP+aThq2ehkOjY/+JDID+avCQ5ttUQgIzfMGbfIV5Hy4g4qyOfjLuqk1XlgoUnWCHrZ 4qJ+2NO0i/KuX0HWX4dTWsgw833z3jX66iZBxmTI3+/lFjnPEN8QiCwtvoA1Ix0OaewQQs 67OydpeQ0sHpclooGcamgjb82aMb8B4qJYFqbDlypRkg4TwpD5k0Q2un49hUpOELieRigT Y7+uJZ8Xs6RjIjUYjjMZ6ne1aZxq3DDGY1yzCZh3sqEmlGD/+WJsTO9pEPdkzpJNZeHAHc n7erU7+X1ZAjDmkU4pYQqnLgdYhH12UQP3qUWvekoNNCcqqMkvL0pklNkSL75g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976556; a=rsa-sha256; cv=none; b=SGDTdxTirk3MwYSkzCanpklpP5KTL3jB7u1w6zE6WQItFASM6DdEuePqBVZNsyYLutP3fa PkxFDcJxLJL+M7a8aHMDdqRGQgQbmUTA4dKiH5ccWoWGEJEDBGDVCjylfFC3rzis9CzePi wUFitwGG/EU4M37UQhbaaGQpdzv+G/MqaavAulsp0MYSQtltrnGqGyno1YAiMpthsE5GqD ZPU157igChfe0KA6bWLllEcMJncWyLebyAshM+RqzQID7TKcBsTgYhPSDi3O8h28jAwzWf 4IFsf9Z+UijVQlIaz0EJ+uzYnUsHQs9x3WE1G1QHnBrvuRq9Ju5IGP4iK5wZDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0jl6mgfz4s5; Mon, 20 Oct 2025 16:09: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 59KG9FwE024348; Mon, 20 Oct 2025 16:09:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KG9F6d024345; Mon, 20 Oct 2025 16:09:15 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:09:15 GMT Message-Id: <202510201609.59KG9F6d024345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: f28a5c92f9cd - stable/15 - bsdinstall: Fix typos List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f28a5c92f9cd8b8f8fe690f6a2bdbd28dbe1b7cd Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f28a5c92f9cd8b8f8fe690f6a2bdbd28dbe1b7cd commit f28a5c92f9cd8b8f8fe690f6a2bdbd28dbe1b7cd Author: Jose Luis Duran AuthorDate: 2025-10-17 15:16:32 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-20 16:06:22 +0000 bsdinstall: Fix typos Reviewed by: emaste MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53170 (cherry picked from commit 4ee348e27143b857445fd261cbe6695d6d57c836) --- usr.sbin/bsdinstall/scripts/auto | 2 +- usr.sbin/bsdinstall/scripts/bootconfig | 2 +- usr.sbin/bsdinstall/scripts/jail | 2 +- usr.sbin/bsdinstall/scripts/keymap | 2 +- usr.sbin/bsdinstall/scripts/script | 2 +- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 8058b1a41dbf..5fefc07e4c07 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -73,7 +73,7 @@ msg_yes="YES" # error [$msg] # # Display generic error message when a script fails. An optional message -# argument can preceed the generic message. User is given the choice of +# argument can precede the generic message. User is given the choice of # restarting the installer or exiting. # error() diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 6736e78b450a..9c188c1d8a91 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -163,7 +163,7 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then rmdir "${mntpt}" fi - # Try to set the UEFI NV BootXXXX variables to recod the boot location + # Try to set the UEFI NV BootXXXX variables to record the boot location if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then update_uefi_bootentry fi diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index 3b1b2ee98fff..8e001fc4a027 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -45,7 +45,7 @@ user_env_vars="BSDINSTALL_DISTSITE DISTRIBUTIONS" # error [$msg] # # Display generic error message when a script fails. An optional message -# argument can preceed the generic message. User is given the choice of +# argument can precede the generic message. User is given the choice of # restarting the installer or exiting. # error() { diff --git a/usr.sbin/bsdinstall/scripts/keymap b/usr.sbin/bsdinstall/scripts/keymap index 6f4060c0772e..669a1062df95 100755 --- a/usr.sbin/bsdinstall/scripts/keymap +++ b/usr.sbin/bsdinstall/scripts/keymap @@ -216,7 +216,7 @@ while :; do n=$( eval f_dialog_menutag2index_with_help \ \"\$menu_choice\" $menu_list ) - # Turn that number ithe name of the keymap struct + # Turn that number into the name of the keymap struct k=$( set -- $KEYMAPS; eval echo \"\${$(( $n - 2))}\" ) # Get actual keymap setting while we update $keymap and $KEYMAPFILE diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script index 00ded5f8e24d..21da2ea7c366 100755 --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -144,7 +144,7 @@ else # # Work around this in an extremely lame way for the specific # case of EFI system partitions only. This *ONLY WORKS* if - # /boot/efi is empty and does not handle analagous problems on + # /boot/efi is empty and does not handle analogous problems on # other systems (ARM, PPC64). tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT --exclude boot/efi mkdir -p $BSDINSTALL_CHROOT/boot/efi diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 95cbba3fa131..9ea6ec3a4ac9 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -255,7 +255,7 @@ msg_encrypt_disks="Encrypt Disks?" msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" msg_error="Error" msg_force_4k_sectors="Force 4K Sectors?" -msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.vdev.min_auto_ashift=12" +msg_force_4k_sectors_help="Align partitions to 4K sector boundaries and set vfs.zfs.vdev.min_auto_ashift=12" msg_freebsd_installer="$OSNAME Installer" msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted" msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk" From nobody Mon Oct 20 16:09:44 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0kK1t7Bz6Cg0b; Mon, 20 Oct 2025 16:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0kK1Chpz3RyV; Mon, 20 Oct 2025 16:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxRowDa+odvsL9uQGcemmBPwi0IcrdjTI1HAe7fkgkM=; b=fy3HYdYO+aqj4z1Sq5Vpd8FX+bT8hpwwGRQTQ+0C6q19TxBtdGl8j8KyJQjB5/MwaEiaxq BWcwKo1FjO4HXayqKLAEFk9qlYUWd6ptfi9RWDqtWuEubhYTuXrfes+EeClXEkHTQFvsKR +XMAPf8LU7iEfYm1KAnzhhYyQ8mcFMMyFOy/egjvtjJaEGHauNOgUyKbZr8KUF5NO3ZLuf qcGMcyu9wgEQeagQwVL/BOt8nv6UiZAC0Hq6MjNdAbmut9QcVuRszW5ksTleljyPFi7DPX cwd1kJZLkYEF99+SUJ0XMUIjeO5Y0+n45aF0Bvt+7zJTSn6IgjG3L6I26xYdGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxRowDa+odvsL9uQGcemmBPwi0IcrdjTI1HAe7fkgkM=; b=Z9oT1Re3NOk1GswBK9jy06kekN1EJl3YQ1CeW+ERHXgVM85poupN4X8wJxxHrKuQN2CfAa +IdZfdKyi6aY3wV8uTiNCMQxgMflSiGvFl+XpQtdc0riloSbEDbmHtDdn2wbZCd+S13HZZ FweHiDGk2p2n/CzgRsekWG8zMfnYOT6auWOJWsa1WLuIQoozEwYrzGyuTfvl/WhczexQsn ZqSSwx9LJz4lfbgHzWRpL00Tywl7V6LIL0B9Qbj4ROalvaIeLB9gh+lRASPCcVS4HPY+2n yOJDELoc4ynAHL/t/ctnlfr/klfgEcQFWAPlGMqZBWp8Qdz4RyTzWa1i+YCK/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976585; a=rsa-sha256; cv=none; b=lH2Gb/VUFxUqyYMI1rOeHwJBd5ata8ztyVSLa/gYJNcQ78CAS/jZWtf2RtzC1xUDw7n4fB MA2p2bDa1whuFNjlM7QqttugrzQSue8LmtFvTpjsvQyylT3vrb1XE99gKD3fBYFZv7xIzK B5Psgnt/rWeE6A3zrBZCckm1Ifc/plwmDFyk90CEQsrgYUOihnTn72TP/aQL7tWPEHGnbI IRLXIoVma/PlXSye4SAN+hZdLntBZyOMTNk6DxEtx7PYj1oR1Rp1PRGW1dWeG3mTX+Lq/4 FwLN5sj8tY+1XcZrTfIPXw7bC8gtqeOoqkpGIoABL/H9J6EJuVX1r3E12KM02A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0kK0gsSz4Z8; Mon, 20 Oct 2025 16:09: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 59KG9ixO024642; Mon, 20 Oct 2025 16:09:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KG9iZR024639; Mon, 20 Oct 2025 16:09:44 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:09:44 GMT Message-Id: <202510201609.59KG9iZR024639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 907cb4ac5fea - stable/14 - rc.conf: Fix typo interferring -> interfering List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 907cb4ac5fea8f249e10f14316289e7c4f4fdea0 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=907cb4ac5fea8f249e10f14316289e7c4f4fdea0 commit 907cb4ac5fea8f249e10f14316289e7c4f4fdea0 Author: Jose Luis Duran AuthorDate: 2025-10-17 14:15:46 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-20 16:09:30 +0000 rc.conf: Fix typo interferring -> interfering Reviewed by: emaste MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53168 (cherry picked from commit 982d70ca2e6333b7e8ccf828b004ccf20a9cc550) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index b17dbb6902cc..39ec921b36c5 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -24,7 +24,7 @@ : ${_localbase:="$(/sbin/sysctl -n user.localbase 2> /dev/null)"} : ${_localbase:="/usr/local"} -# rc_debug can't be set here without interferring with rc.subr's setting it +# rc_debug can't be set here without interfering with rc.subr's setting it # when the kenv variable rc.debug is set. #rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. From nobody Mon Oct 20 16:09:46 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0kL2pf9z6CgPp; Mon, 20 Oct 2025 16:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0kL1xpKz3S6M; Mon, 20 Oct 2025 16:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EAsYID40BFEKtz8PvFgtrfMl6/HXzi6S84NLJWcObiA=; b=osrZfAkrIHtvXM2MKp+xevA+WVGnpvgKESn8kV+4dyjE2r4lryr71w2P0w6WTxbYQd+XTF tCSMZbwX4xaV1HXUi3ueRNUTAd+ZObuptqUTqMjYDqgoIkEuKCjampxJxBdk3b4W5Q/Z8l CrnmXuFDenBGGRZWCpg7AVIcdoaP//6d0SP6CwcQ1Wf7tMl2yOKHjClTDjQmZwjZe7BxdW u1+ScT+FZxfQmfdPzUEemGa9batcxFA6bLhCpXaf91SVvMsI5vFad9BQN64lczQDYUXyhp 6zynBua4yO5PzTrrrFdCSMnABozSvzFWIcmg2c7ocNUazKh6qp89zNO+mrrosA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EAsYID40BFEKtz8PvFgtrfMl6/HXzi6S84NLJWcObiA=; b=oaj6PBfG+woIfTL8HWOTbH084ALLlIdWcMkSQxSLXfZ2WH2HVLqyw2CxiwoiWzVfpfDxt1 puUK1hq9716HyEufWh2bg8CJoYKGkRWdm2EfXCDc229ejdOJTd774NpS4lyZ+Wxc3bH3Ty 7Qp2U71WXuCOBLKQ/7mRIBoC2W8GhI/ySOJwPvGUXbRJADXmClkVZmDPCRE62dbMDkSZ2Y amzQJ+tjoKS2qm0F9abeyT1K5XvZci1EZrZ6zEMm6lRMap+RzRf1nXjYoVrPno1zN2Prmp +vEd6wBVB68EyNm/8AxzqbfjcwKFI7UkKgl9jbZ8N9tjrEZO0qswj4Wm+1JLOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976586; a=rsa-sha256; cv=none; b=piDKzs6/Wiw3kHX6rnXewvhWxMofx5mCWeCDez/z5OMvMhQuEbTIFvywWLwNRVJV9iaDGW YgiLpqR914QQzj5pc+KWJTjwbbJvMRN5YPC/gvd4EkTf6KxXYx/poFEbghrWuY8nYlW5pz VYgqrgmRccDnt4dqz4FQT2EufgYvcGEsnkMsuFLfs+ZOPltpsJxirs9oFcntmd15B9BRJ/ nYMaNT6lzVaHTz+PLWurJkWhIzHQKwtKaWseK9B+AuRvByEYQNzRmmqd244dX3ujWaJ9x1 UTpoTPca6SqbKPQqtET2DiDE52kTvLzq16Ug2LYlK7uj4O5ED3v5uBb7aPu6ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0kL1Wjfz51H; Mon, 20 Oct 2025 16:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59KG9kEg024684; Mon, 20 Oct 2025 16:09:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KG9k4m024680; Mon, 20 Oct 2025 16:09:46 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:09:46 GMT Message-Id: <202510201609.59KG9k4m024680@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: d8ddea0d4b0a - stable/14 - rc: dmesg: Allow umask to be configurable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d8ddea0d4b0ad316000970987d26307e84ce1efc Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=d8ddea0d4b0ad316000970987d26307e84ce1efc commit d8ddea0d4b0ad316000970987d26307e84ce1efc Author: Jose Luis Duran AuthorDate: 2025-10-17 14:34:55 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-20 16:09:30 +0000 rc: dmesg: Allow umask to be configurable Allow umask to be configurable. Being able to set the umask via an rc variable is useful when setting: security.bsd.unprivileged_read_msgbuf=0 As it allows a user to configure: dmesg_umask="066" Without modifying the rc script, and preventing the contents of the $dmesg_file (/var/run/dmesg.boot) from being publicly readable. PR: 272552 Reviewed by: netchild MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53169 (cherry picked from commit edadbc6ee95570627679f3bc14a1d5476d0ce339) --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/dmesg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 39ec921b36c5..a1bb88903911 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -710,6 +710,7 @@ osrelease_enable="YES" # Update /var/run/os-release on boot (or NO). osrelease_file="/var/run/os-release" # File to update for os-release. osrelease_perms="444" # Default permission for os-release file. dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot +dmesg_umask="022" # Default umask for /var/run/dmesg.boot file. watchdogd_enable="NO" # Start the software watchdog daemon watchdogd_flags="" # Flags to watchdogd (if enabled) watchdogd_timeout="" # watchdogd timeout, overrides -t in watchdogd_flags diff --git a/libexec/rc/rc.d/dmesg b/libexec/rc/rc.d/dmesg index ed36ec17b419..b6ad4b65d8f8 100755 --- a/libexec/rc/rc.d/dmesg +++ b/libexec/rc/rc.d/dmesg @@ -19,7 +19,7 @@ stop_cmd=":" do_dmesg() { rm -f ${dmesg_file} - ( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} ) + ( umask "${dmesg_umask}" ; /sbin/dmesg $rc_flags > ${dmesg_file} ) } load_rc_config $name From nobody Mon Oct 20 16:09:47 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0kM5nTwz6CgBM; Mon, 20 Oct 2025 16:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0kM2zH4z3Ryq; Mon, 20 Oct 2025 16:09:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976587; h=from:from:reply-to:subject:subject: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/81lnN8iZPaUqRtjf5Ce1VnSoKMSJKuhbbUvfmP170=; b=kvElqT4HyboPm4ng8/JB5G2k0l3U1EpLoCtkIgUp/uIbJEgGQA0ZglktVHceR6JlHaelK2 0i3T40WvzuTk6BTtzWTSTWETCn5E8SSJTTU3SyJC2n8aOcPFLjmd57XU6+Vnr6XxySJe0C Zr+qFDToE564M5s6KqbxtqnNbhNu5K6ZRMIY/whEIiwMgFGcHBTv2Rg9dK1HVaji1T6N5n O+cVPnaLd7G2qdnsJUy4lLQITh2uIL90wNSRVh91q3xoAy0KZkrZp8WMDAIS+OPgLIQ0Tx +MvDGc7o787dltsVvlt8G/o6fwLQsB7bsuFGjrRtwRioHxME7UAjUQeUC3BNOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976587; h=from:from:reply-to:subject:subject: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/81lnN8iZPaUqRtjf5Ce1VnSoKMSJKuhbbUvfmP170=; b=qU6NyjylzF92xG5o63sxrM18kM8sihinONYaZ3GXhc3OSjQLuw0z7BHxSH8ahzL6D3SDXw 61aC+6hjtk9tOjSS0OY7DzirhKU8WTasPfEHRybi+a6bFFAYanYdnVshQQBJYOLnK27m0q Po+M0GlGYIZ+aY8m0sWsBR7gQIivAoR7n2iYpXKJcmEC0+tYGSpeLeXiZD0bQnYdE8Rt4z G/RrIUWesU88XO4N6/w9ptWKxbGRUkgOvCWw3iU4eGvS1UZCNM6Wy+EnZ7DfIy3v8ChCyB XbOQlmAZS9YzWmGbhiM+MD1gUKTy4BqQFf1h6OMzImZTBq9rVIyOGnipOpVgVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976587; a=rsa-sha256; cv=none; b=XwiX7FufJEwTKPI/pisB1RinXRRPomEIOigCFEkg7b9TM5ZFtgKCq/IMR9OSeRr9Fbe22S FA6Hkp5dWuB1ls1BQZsO0p4vqESymIfjyCuGYta1Pyi+5aoUWB+ewUpxxklk9pvUOVE6f2 FGSiVVw2ZdK0+QlmqX2dpOp6/o+t4v0wHv4R6RP8B2dtC4p28FZMuSWrWfzJ+7eP5CyXgR HEAmfZxEMA/EqmS6YzakWwcbIkxvRTvHCcRlyQWvKZYRJCHgvdWFyq3Q5DyyzY7O6W70I/ T9Y9mRV23eyfLR+ABWRmNczzchulzGYCvHwCKoyXeCzvhR1BtSiFAdSdH5qk/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0kM2YMGz4pL; Mon, 20 Oct 2025 16:09: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 59KG9lGJ024722; Mon, 20 Oct 2025 16:09:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KG9lpo024719; Mon, 20 Oct 2025 16:09:47 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:09:47 GMT Message-Id: <202510201609.59KG9lpo024719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 829e479a0a37 - stable/14 - bsdinstall: Fix typos List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 829e479a0a37eb72023ce361f5b2379d82f8bc2a Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=829e479a0a37eb72023ce361f5b2379d82f8bc2a commit 829e479a0a37eb72023ce361f5b2379d82f8bc2a Author: Jose Luis Duran AuthorDate: 2025-10-17 15:16:32 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-20 16:09:31 +0000 bsdinstall: Fix typos Reviewed by: emaste MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53170 (cherry picked from commit 4ee348e27143b857445fd261cbe6695d6d57c836) --- usr.sbin/bsdinstall/scripts/auto | 2 +- usr.sbin/bsdinstall/scripts/bootconfig | 2 +- usr.sbin/bsdinstall/scripts/jail | 2 +- usr.sbin/bsdinstall/scripts/keymap | 2 +- usr.sbin/bsdinstall/scripts/script | 2 +- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 1b9b047dae0e..4d16dec6ac5a 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -73,7 +73,7 @@ msg_yes="YES" # error [$msg] # # Display generic error message when a script fails. An optional message -# argument can preceed the generic message. User is given the choice of +# argument can precede the generic message. User is given the choice of # restarting the installer or exiting. # error() diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 1d8fb8657135..ba9a4369429c 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -160,7 +160,7 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then rmdir "${mntpt}" fi - # Try to set the UEFI NV BootXXXX variables to recod the boot location + # Try to set the UEFI NV BootXXXX variables to record the boot location if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then update_uefi_bootentry fi diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index 191cc5e89563..239940cce02e 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -45,7 +45,7 @@ user_env_vars="BSDINSTALL_DISTSITE DISTRIBUTIONS" # error [$msg] # # Display generic error message when a script fails. An optional message -# argument can preceed the generic message. User is given the choice of +# argument can precede the generic message. User is given the choice of # restarting the installer or exiting. # error() { diff --git a/usr.sbin/bsdinstall/scripts/keymap b/usr.sbin/bsdinstall/scripts/keymap index 63f1f2455096..9075e8be154d 100755 --- a/usr.sbin/bsdinstall/scripts/keymap +++ b/usr.sbin/bsdinstall/scripts/keymap @@ -216,7 +216,7 @@ while :; do n=$( eval f_dialog_menutag2index_with_help \ \"\$menu_choice\" $menu_list ) - # Turn that number ithe name of the keymap struct + # Turn that number into the name of the keymap struct k=$( set -- $KEYMAPS; eval echo \"\${$(( $n - 2))}\" ) # Get actual keymap setting while we update $keymap and $KEYMAPFILE diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script index 1c617835c274..5c2ff5d79d2f 100755 --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -140,7 +140,7 @@ else # # Work around this in an extremely lame way for the specific # case of EFI system partitions only. This *ONLY WORKS* if - # /boot/efi is empty and does not handle analagous problems on + # /boot/efi is empty and does not handle analogous problems on # other systems (ARM, PPC64). tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT --exclude boot/efi mkdir -p $BSDINSTALL_CHROOT/boot/efi diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index fe1c522c5399..387ff7c18091 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -255,7 +255,7 @@ msg_encrypt_disks="Encrypt Disks?" msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" msg_error="Error" msg_force_4k_sectors="Force 4K Sectors?" -msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.vdev.min_auto_ashift=12" +msg_force_4k_sectors_help="Align partitions to 4K sector boundaries and set vfs.zfs.vdev.min_auto_ashift=12" msg_freebsd_installer="$OSNAME Installer" msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted" msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk" From nobody Mon Oct 20 16:10:27 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0l84nCLz6CgJc; Mon, 20 Oct 2025 16:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0l76Wr2z3T5T; Mon, 20 Oct 2025 16:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yc7PCkntf3tA0pOWdcppUUyOdfxGV90SdoA4nRPCZUg=; b=wOajLYjKG/cQqvGRnScbDjrIOSYobS3BVQXhyqWLo2B2+1u9RJJPhLnP8D1BzfJFCBSoNm DKTLoHZOKE1HBbRSpVZB8eXbMsgaDT+B2idmiyrI4HmdoGo54mUOEW9dEhBeFq8iw6Bisz hhFmMD7LUopgp5CqYlA0gxJxjbsT9FvKQB2o6FXZ4Vcw8s4NEXDaYXtRNjxowYYrLaYdsu 4c3gxSCcSKkdnOLQePGIbAxdRq3bwD1dWid5x8XC19taPEkaUJslzoyEiQJa3Mjh6Ya9ei D8GKCPXqVsWvzk2IsL8tWQde3X50SWd7+oyLrT85t0+nOeyBnFK23KpNIWyJiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yc7PCkntf3tA0pOWdcppUUyOdfxGV90SdoA4nRPCZUg=; b=LMWEcJbXfYmAloPdEFyq4FjyTmu1fv48ie/Sd343++RBz7DzHze03wGZv3otr8Lt+4Sn9w pRI7PzU1SJT3qINus2vgDPkmfYCw7ijgDZ2qKa5nxC5wipSaGzuumbSZeiATY4DRTHiiNO 9BJAibCdAlArXDmBLWNtNoUtqXfN19WZJBHHoH8JPtgXvI9uBpjn3OioUFOrNGQQSSxjnH jfluzQbkIM1XpVyPIVV3dY07GfX3m7od4qUI4sgC8hjkG9pyyldUlUSqWbo1CpHeGu5pNx 5sxDSKTG8szO+lvps5dgxvAq1XUoE8Zy++vC8IkDjXyqz5Q/1p2MBOyYxVx1aQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976627; a=rsa-sha256; cv=none; b=UPBvSqsQgg90IOUNoL9mEFywv6/PGK/iRHW5jNHHDQz6GSn6HYg8PEsuowY+w4AE+vf431 GWb3MfZu8iy2N/KMGpmQmQ7A9ZzvGwwDJpBS4mX9VBPpGmHT7x04iIOUeL3A2H08jSUktA hbOOxQtLrxej6EswLhAQ/7YkYodmcMIRHdQHk6PMDjKbhyZMitLv/+Jx8sKIKU+Ka3rsD1 FnykvcKT5HCq5rk2O2tSlzrTyrhp5vHoefCzvNFOgGWAJGQaoIvsLsHzTimA3j6y/aq7T1 LBIYFRRhlCqAM+C2xPhi4R0PPMwPkWU0xOYZSYoth2e5xWOLJdpNSprl7go72A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0l763Fnz4JS; Mon, 20 Oct 2025 16:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59KGARcS033822; Mon, 20 Oct 2025 16:10:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGARQT033819; Mon, 20 Oct 2025 16:10:27 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:10:27 GMT Message-Id: <202510201610.59KGARQT033819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 2779d6310121 - stable/13 - rc.conf: Fix typo interferring -> interfering List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2779d63101219b51acad34ca758e3f7eab67e5c9 Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2779d63101219b51acad34ca758e3f7eab67e5c9 commit 2779d63101219b51acad34ca758e3f7eab67e5c9 Author: Jose Luis Duran AuthorDate: 2025-10-17 14:15:46 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-20 16:04:00 +0000 rc.conf: Fix typo interferring -> interfering Reviewed by: emaste MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53168 (cherry picked from commit 982d70ca2e6333b7e8ccf828b004ccf20a9cc550) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 5e70aa5cbc06..4751d000c936 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -23,7 +23,7 @@ # Set default value of _localbase if not previously set : ${_localbase:="/usr/local"} -# rc_debug can't be set here without interferring with rc.subr's setting it +# rc_debug can't be set here without interfering with rc.subr's setting it # when the kenv variable rc.debug is set. #rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. From nobody Mon Oct 20 16:10:28 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0l93HTxz6CgMX; Mon, 20 Oct 2025 16:10: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0l90SRhz3SvQ; Mon, 20 Oct 2025 16:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zCESG+CdpmiPFPpyvVk0QNdAroRejYPI4W53rfnpnN8=; b=d8Gb7GZXUuVK4yPEuwx6dAR0/MRdb+IEsYJJDWdkqvgiks1ssI/IfFPMAx0COGqTpz1EC1 ojGxPeQlJpjeoW6HhRdum4QHgnIBL14xf/hmmeaqThrPTkFTortJKpN/plXYHbe7iQxl4A Q2XhycQT3DyHCijYZHBVQQLbowX8pda0jLL2DkEbN6QK4B/9/Ji2W2mI8h9VQ4ZTWsa1JM D9vEdMFi5tOAp0zYXVpAszglbfEE2MkyYpbm5erQib/UTHB2ieRBhQLbO29cXdFCtVrxyx 4vV2rxHrozN+oojRyDYfYrITGg6Ngw1sI7BxAsRTB3jTWJPgw+0XCMtoMAJ4SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zCESG+CdpmiPFPpyvVk0QNdAroRejYPI4W53rfnpnN8=; b=v4yRd5q+PTq2LqM0CPhVIPjA5Pcs/AVl6CZ3Z0rk80WKTet5gOLDy2dXXPeCtzlt6lOrOO GELGH46S+7T3PkVSEe2cPvVg+2/RRfparogxZyU9zNj0AeJ82ZsRyHx9JvnXKg7FfY4Sx1 c52zE/OnzHwMqjIKRqhKkRgXPFCEyuxkB1vhbUPvQxr97FCy1daSnIi3K2z+vm7jnxfJhz 7gfhnqjp2PlWI0FoCuuObdXPvQvj2JgbmNVizfEDCLClYdeqcjOsKllzRYLyq6d0QXMWfq I878NWYz2U+cES247W1CwdXfwIpY9EBa363fMZK32FjM0n87YLTMsxDzTQm6bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976629; a=rsa-sha256; cv=none; b=XWf0RmNoyEiSIgAjm3afzbxdz98FAkBx3emFtzdW7hFRfYJcmG1Kcp6bZ+fmU+8tBehPQp Aoefq7fGX1kNC/4QUyTDMhbC5Cz8eE0RTn11hWPuqXYevynRwbwW6FCm/QnxfknCle1wN9 SoMyvsZ5lnbgMpYEXfh6q3fIxt4VQhr3mGy05rNVN3pikWbPBXSunbohbnJo0cjgQCbFgt s/2WeuOpxyyjK//Mk9koy3ca3tZ8d8dPrzqZtot4eLLXST0uKUDneLLIShEThGCiJ8KYJY ieoyimDf367RO8LldA7XEUW4JT/TD8AFduzBuyfr0xLloTvqsVFUucQ3jOQTaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0l9012bz4cZ; Mon, 20 Oct 2025 16:10: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 59KGASHB033867; Mon, 20 Oct 2025 16:10:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGASml033862; Mon, 20 Oct 2025 16:10:28 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:10:28 GMT Message-Id: <202510201610.59KGASml033862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 549cba3c9d1e - stable/13 - rc: dmesg: Allow umask to be configurable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 549cba3c9d1e14fffa9a99ed7b6ee51eb6d20e51 Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=549cba3c9d1e14fffa9a99ed7b6ee51eb6d20e51 commit 549cba3c9d1e14fffa9a99ed7b6ee51eb6d20e51 Author: Jose Luis Duran AuthorDate: 2025-10-17 14:34:55 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-20 16:05:40 +0000 rc: dmesg: Allow umask to be configurable Allow umask to be configurable. Being able to set the umask via an rc variable is useful when setting: security.bsd.unprivileged_read_msgbuf=0 As it allows a user to configure: dmesg_umask="066" Without modifying the rc script, and preventing the contents of the $dmesg_file (/var/run/dmesg.boot) from being publicly readable. PR: 272552 Reviewed by: netchild MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53169 (cherry picked from commit edadbc6ee95570627679f3bc14a1d5476d0ce339) --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/dmesg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 4751d000c936..d740d2df32d9 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -708,6 +708,7 @@ osrelease_enable="YES" # Update /var/run/os-release on boot (or NO). osrelease_file="/var/run/os-release" # File to update for os-release. osrelease_perms="444" # Default permission for os-release file. dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot +dmesg_umask="022" # Default umask for /var/run/dmesg.boot file. watchdogd_enable="NO" # Start the software watchdog daemon watchdogd_flags="" # Flags to watchdogd (if enabled) watchdogd_timeout="" # watchdogd timeout, overrides -t in watchdogd_flags diff --git a/libexec/rc/rc.d/dmesg b/libexec/rc/rc.d/dmesg index ed36ec17b419..b6ad4b65d8f8 100755 --- a/libexec/rc/rc.d/dmesg +++ b/libexec/rc/rc.d/dmesg @@ -19,7 +19,7 @@ stop_cmd=":" do_dmesg() { rm -f ${dmesg_file} - ( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} ) + ( umask "${dmesg_umask}" ; /sbin/dmesg $rc_flags > ${dmesg_file} ) } load_rc_config $name From nobody Mon Oct 20 16:11:32 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mN5hRrz6Cgqk; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mN51mNz3V7J; Mon, 20 Oct 2025 16:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ba/OyggGDPW+ap2bLtZTvFcyN+hzulXUWw7uQfjp7bE=; b=T0lDtpj8ebBYn18fgadPTs76dXeIIw7B5ImTUbzSeAOD5MlLTcG6fEMVOcyJV9k29v6YEv vjvyAL0AvAOZtxTzWr+GWvgwWXBPSHVEQAY0ZOZehy7UgBDJ3tBNA2AOBojQLzHiuWCBwq TgR9SWY9BBWueiWKB+ADe4sf1+wNIi9AZ32NKL24opGTMnjr8umnwcEqxcjmGAYCHRCRAj ySdrtefag3oRT6Jp3abkPfru853GZ34QM24pP75E2f3ZsaMlM4BbYMttoKkZfRTGqS0noq pRu8WXU8eYfEpxQwg7pce0CH6WL2i7ByQrt7vZb7m2JSf8QmxjF3XccC7uQQ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ba/OyggGDPW+ap2bLtZTvFcyN+hzulXUWw7uQfjp7bE=; b=FDRivreg6DT72pDSv88ko9mTvnLUrcQ2VXsQkhuz7/GZDpsElFYQwN7/nT3H2CKaf2hI62 DPIUsNy00EWbFzoAZ30wSl4gr91JDDTu2UsuN8XLJqAY+vYa7gIUxwpvTOtntA7MskRBXm tkbP3gug1OM7uXbHPDvm+Z67iifXXNJSux2YimPpGKgj4h7YWYLSoLFnEUTp2S1R1naAYT UXuKbvr0mxWxeU+4cnBWeoa1+6mAKBYxR2eXo4ed752GFa5UV5ksd7xJoNFjbxMru1qGs1 u0+uh/9ZzF67W4Jb7LAb3XqLGmkIKfKl/3kPxpnXmQc/IFA3sxGNwouHa4cS+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976692; a=rsa-sha256; cv=none; b=dp5xX5F+tkGRkInIc23wvj7sebIwqOt6ZJ77ZdSRhD6fDev+t8pnBN7c7WuFb3pm5PKIQz 2QAUM5ivRscSyAYInsAl3/kmQAPVR0NII1GXEfmOJYm8LUf8ZqECpSYFhjKqqEvGu3eRF+ MV0pTd+wqrxu5rKIi260sZ5dIdXdRQ4t2UpEYFH0wzQld+ydI3qYbfEUv7u7fYvjCjM6aR GInyK6SNtobpf2D4M0UsZOlqzLQaiXH2kUqR5jpb8szNlwbEIBCwoUCoKhyAWcgy8Yznzq Qn+sWPDTHqaa/WdZpu9ur+L0Oqesfh+jCQ8RTwmWG+tIX6SEoGFT0XMzUk8h6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mN4cQ1z4vg; Mon, 20 Oct 2025 16:11: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 59KGBWwu036188; Mon, 20 Oct 2025 16:11:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBWrX036185; Mon, 20 Oct 2025 16:11:32 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:32 GMT Message-Id: <202510201611.59KGBWrX036185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5debbcb6b7a5 - stable/15 - realpath: Additional test cases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5debbcb6b7a5a25511e8d63142fbc5e8498a8f46 Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5debbcb6b7a5a25511e8d63142fbc5e8498a8f46 commit 5debbcb6b7a5a25511e8d63142fbc5e8498a8f46 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:21 +0000 realpath: Additional test cases * Passing NULL should result in EINVAL * Passing an empty path should result in ENOENT * Failure with a non-null buffer should leave a partial result. As pointed out in a comment in the test case, this reveals a discrepancy between the documentation and reality. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53024 (cherry picked from commit f3386dfeb429faaa30a915a4a422a25e07c8bf39) --- lib/libc/tests/gen/realpath2_test.c | 113 ++++++++++++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 12 deletions(-) diff --git a/lib/libc/tests/gen/realpath2_test.c b/lib/libc/tests/gen/realpath2_test.c index f89dd99cbb72..b8f951d9b10f 100644 --- a/lib/libc/tests/gen/realpath2_test.c +++ b/lib/libc/tests/gen/realpath2_test.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2017 Jan Kokemüller * All rights reserved. + * Copyright (c) 2025 Klara, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,6 +26,8 @@ */ #include +#include + #include #include #include @@ -34,6 +37,31 @@ #include +ATF_TC(realpath_null); +ATF_TC_HEAD(realpath_null, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test null input"); +} +ATF_TC_BODY(realpath_null, tc) +{ + ATF_REQUIRE_ERRNO(EINVAL, realpath(NULL, NULL) == NULL); +} + +ATF_TC(realpath_empty); +ATF_TC_HEAD(realpath_empty, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test empty input"); +} +ATF_TC_BODY(realpath_empty, tc) +{ + char resb[PATH_MAX] = ""; + + ATF_REQUIRE_EQ(0, mkdir("foo", 0755)); + ATF_REQUIRE_EQ(0, chdir("foo")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("", resb) == NULL); + ATF_REQUIRE_STREQ("", resb); +} + ATF_TC(realpath_buffer_overflow); ATF_TC_HEAD(realpath_buffer_overflow, tc) { @@ -44,16 +72,11 @@ ATF_TC_HEAD(realpath_buffer_overflow, tc) ATF_TC_BODY(realpath_buffer_overflow, tc) { - char path[MAXPATHLEN] = { 0 }; - char resb[MAXPATHLEN] = { 0 }; - size_t i; + char path[PATH_MAX] = ""; + char resb[PATH_MAX] = ""; - path[0] = 'a'; + memset(path, 'a', sizeof(path) - 1); path[1] = '/'; - for (i = 2; i < sizeof(path) - 1; ++i) { - path[i] = 'a'; - } - ATF_REQUIRE(realpath(path, resb) == NULL); } @@ -66,9 +89,9 @@ ATF_TC_HEAD(realpath_empty_symlink, tc) ATF_TC_BODY(realpath_empty_symlink, tc) { - char path[MAXPATHLEN] = { 0 }; - char slnk[MAXPATHLEN] = { 0 }; - char resb[MAXPATHLEN] = { 0 }; + char path[PATH_MAX] = ""; + char slnk[PATH_MAX] = ""; + char resb[PATH_MAX] = ""; int fd; (void)strlcat(slnk, "empty_symlink", sizeof(slnk)); @@ -89,11 +112,77 @@ ATF_TC_BODY(realpath_empty_symlink, tc) ATF_REQUIRE(unlink(slnk) == 0); } -ATF_TP_ADD_TCS(tp) +ATF_TC(realpath_partial); +ATF_TC_HEAD(realpath_partial, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that failure leaves a partial result"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} + +ATF_TC_BODY(realpath_partial, tc) { + char resb[PATH_MAX] = ""; + size_t len; + + /* scenario 1: missing directory */ + ATF_REQUIRE_EQ(0, mkdir("foo", 0755)); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + + /* scenario 2: dead link 1 */ + ATF_REQUIRE_EQ(0, symlink("nix", "foo/bar")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/nix", resb + len - 8); + + /* scenario 3: missing file */ + ATF_REQUIRE_EQ(0, unlink("foo/bar")); + ATF_REQUIRE_EQ(0, mkdir("foo/bar", 0755)); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 12 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar/baz", resb + len - 12); + + /* scenario 4: dead link 2 */ + ATF_REQUIRE_EQ(0, symlink("nix", "foo/bar/baz")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 12 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar/nix", resb + len - 12); + + /* scenario 5: unreadable directory */ + ATF_REQUIRE_EQ(0, chmod("foo", 000)); + ATF_REQUIRE_ERRNO(EACCES, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + /* + * This is arguably wrong. The problem is not with bar, but with + * foo. However, since foo exists and is a directory and the only + * reliable way to detect whether a directory is readable is to + * attempt to read it, we do not detect the problem until we try + * to access bar. + */ + ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + + /* scenario 6: not a directory */ + ATF_REQUIRE_EQ(0, close(creat("bar", 0644))); + ATF_REQUIRE_ERRNO(ENOTDIR, realpath("bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 4 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/bar", resb + len - 4); +} +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, realpath_null); + ATF_TP_ADD_TC(tp, realpath_empty); ATF_TP_ADD_TC(tp, realpath_buffer_overflow); ATF_TP_ADD_TC(tp, realpath_empty_symlink); + ATF_TP_ADD_TC(tp, realpath_partial); return atf_no_error(); } From nobody Mon Oct 20 16:11:33 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mQ0Hwvz6Cgqq; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mP5z4lz3V5g; Mon, 20 Oct 2025 16:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bg6kl4OrhO7OkbLv+5tL5iMLaeytjti4TK6hr0ptPi0=; b=fKHmJkWGfLARPggxCQ2XPRZ3fjbL5D8hBPgvK8apnIO/Vz4vvYQho8P+rZQEa6wiwWsbl3 ubLBGaTjKCCo6JxpxkT6FG023MAU7z6CbcnM1TN+5X/GZudPjlXM0K4Oaohw3y8WNOASLn Ed/tb1c7JwFpTZsxEhbiHgocnVdQ6swQOVW5PsN/AqItbbFoNZXMX3ZiJzei4qwrNi+CBw YaiIcnYbo5Qdof/ROitFY7NDeFLVGKS7zf99evFcTXB9FPbsHUa9OkSHn0+cS817Qt7zq4 j3Nfap4Zcz1q8PmBgJ2/v4x/R1x61eaG3Ws/aTmKIGoUvLFkgOF7K59aFJzFXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bg6kl4OrhO7OkbLv+5tL5iMLaeytjti4TK6hr0ptPi0=; b=chRnGZ0YdBG8oDVEN5u+rDIlqTPs4klzwRk0Ok8HAGjjJNS7tgkz0ERp19yAFnmdF4NnvC 8O14achaj0jqK69Z6wZtya8WqZl3PU2+pz/r3zgPalfBeo81Btn+hxc6xsrra3so4qzhIo uFBuDZiGYn8LAeBqGF57EMQBSD5oDHiJEG1ZrU6izSEeyXkoFDMhhl7uwzWDBGuWJrLbrO MC6aCHDJ0tALynpNeRF1reDo2HxAcgbglupg5gY3mcMffNP7Z+ODaUAuhf7ulkA+MwrT4d 67pA5BxTYPTPL5bCBZk3UQjejbH/wltf4Ipqi/1CNJDiH1PestTZbJ5vUgGTlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976693; a=rsa-sha256; cv=none; b=fwhxIMjiECvI9eutMPRhEXP2FXzzaBlzyx0jfsZ68QyRpyIIcmfRuqlSg0BgfMX8B0I1Et RviQYOLc7mVz97O3Xq2/VmYLX7J+0/Tn4MWoB03p5joWig2JQxqKYOzYBlRcjaoFmpoQle rvdeIOA+P1aXpJNSnZC9wvpQTq3pjdKTSLUtR/AnGygS3os/YgW2IoSArq1xQBLiwvRgfi SoHFrvjVlIZpuRh7ZWW7AzsEs9NAGKBp278y9746nD+bZ42yf6ku4CVC8EUx874IeKbdZD Rgh6ZdGj5Bser7/9upPe1ZiXlnWSkTAWSAGsp+tYLUUWwTbzBAh5HWBP2qqMuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mP5ZYdz51c; Mon, 20 Oct 2025 16:11: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 59KGBXNE036225; Mon, 20 Oct 2025 16:11:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBX9B036222; Mon, 20 Oct 2025 16:11:33 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:33 GMT Message-Id: <202510201611.59KGBX9B036222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 6c9b25246d44 - stable/15 - realpath: Report correct path on failure List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6c9b25246d4408eced73886d0b58feef7bff25c6 Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6c9b25246d4408eced73886d0b58feef7bff25c6 commit 6c9b25246d4408eced73886d0b58feef7bff25c6 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:21 +0000 realpath: Report correct path on failure If lstat() fails with EACCES or ENOTDIR, the path we need to return in the caller-provided buffer is that of the parent directory (which is either unreadable or not a directory; the latter can only happen in the case of a race) rather than that of the child we attempted to stat. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53025 (cherry picked from commit 1406de21e176d8700240ac9e473df007cd41eec1) --- lib/libc/stdlib/realpath.c | 14 ++++++++++++-- lib/libc/tests/gen/realpath2_test.c | 11 ++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index 4c52b73319ab..18f29e95ee6b 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -49,7 +49,7 @@ realpath1(const char *path, char *resolved) { struct stat sb; char *p, *q; - size_t left_len, resolved_len, next_token_len; + size_t left_len, prev_len, resolved_len, next_token_len; unsigned symlinks; ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; @@ -98,6 +98,7 @@ realpath1(const char *path, char *resolved) left_len = 0; } + prev_len = resolved_len; if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { errno = ENAMETOOLONG; @@ -133,8 +134,17 @@ realpath1(const char *path, char *resolved) errno = ENAMETOOLONG; return (NULL); } - if (lstat(resolved, &sb) != 0) + if (lstat(resolved, &sb) != 0) { + /* + * EACCES means the parent directory is not + * readable, while ENOTDIR means the parent + * directory is not a directory. Rewind the path + * to correctly indicate where the error lies. + */ + if (errno == EACCES || errno == ENOTDIR) + resolved[prev_len] = '\0'; return (NULL); + } if (S_ISLNK(sb.st_mode)) { if (symlinks++ > MAXSYMLINKS) { errno = ELOOP; diff --git a/lib/libc/tests/gen/realpath2_test.c b/lib/libc/tests/gen/realpath2_test.c index b8f951d9b10f..431df8721ae0 100644 --- a/lib/libc/tests/gen/realpath2_test.c +++ b/lib/libc/tests/gen/realpath2_test.c @@ -158,15 +158,8 @@ ATF_TC_BODY(realpath_partial, tc) ATF_REQUIRE_EQ(0, chmod("foo", 000)); ATF_REQUIRE_ERRNO(EACCES, realpath("foo/bar/baz", resb) == NULL); len = strnlen(resb, sizeof(resb)); - ATF_REQUIRE(len > 8 && len < sizeof(resb)); - /* - * This is arguably wrong. The problem is not with bar, but with - * foo. However, since foo exists and is a directory and the only - * reliable way to detect whether a directory is readable is to - * attempt to read it, we do not detect the problem until we try - * to access bar. - */ - ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + ATF_REQUIRE(len > 4 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo", resb + len - 4); /* scenario 6: not a directory */ ATF_REQUIRE_EQ(0, close(creat("bar", 0644))); From nobody Mon Oct 20 16:11:34 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mR5MWWz6CgVN; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mQ702wz3VJt; Mon, 20 Oct 2025 16:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YY00r6UecP8RT49qvvLq/a+w9gU1xEk8C6xAV0R1sO8=; b=iZ4O+t5bGto6aPZ8O4MfImIg8AXYcYrCwRccUdRFxkY9/XOUPT/RLPR03ftpi/KqoyNy8a JhStLr/k2SU984hl6ykPPEtMiP631hLscQeRH7SCnnmfZstXzNPHLEYC/SKyqC04sOsvXL Cx8tWe3iHGO0j25ffM71iaBn+XlVJyrUjQVsX9CQFPIwGLTOJNDoKRXc4IjD82CZrbeN1v VqH5ZUzSmbtgaqlXNkA7/y6odvH7UrbZI7aCxXNqkT/6HZ3NUpoWa1ICK8WFDLAWjgQ0af TANcdhXmGmKZsqWTxgm7udObcwXhEEGe4znDfCFC/suiBd3TdivWuka2kjbm+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YY00r6UecP8RT49qvvLq/a+w9gU1xEk8C6xAV0R1sO8=; b=ZVPtXsuVYTt6uLCDCfDgjK8YniHv2FTaRLbxY5DZs4nK171AJr0JVpY83CGbaMnVCo8eZM stvbBhOfYNevGY/snrrVl4D8MulXkhlh3FXw/dkNa0FHri6fijLp3S2nHIN3t/6Zq3DB4+ hH9GiAS/k5xMEPEpMXxenMLv1JTgbAYv+oDr2Gq9HsJlo3zegzUExk3EumK9iXR3/RjCyi MIYaAVOISbGHbhrvWWsi5xOCBjTqZMEK0lDhuiF6Vka7AsiFt7vuqaCQPxKRavchNOUqR9 Qu30MZodHRl4SoedGkqsOC/0aM+fsCmpAPtxfQ/Zaht7wVeLMYFzf4jW5fFtZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976695; a=rsa-sha256; cv=none; b=v1LbJihY5jTH21dDLLCCsYjxRQGF49i0PpossJPTsyLeugV+zRjQU94fZQMaqWexJkt4+u eMVKVyUGFhvVKSl9B80sKq8GXfayjp3D5Z7pdpAVATDWOczD80a7Rt+ikQqivkHKoZB41J ZM/ZyAbtqmjmgNTovzt/1Cz2p3VL31dB595g7PWud4PUlbmzWqn5huwkVawonwS2aAJfjU e0DxMA/+/5XXczOnjqsr3VpMEY9rrcrlawbb750tD4Jb/x/MhWrDCWdHkscyAriN0nbb65 qkODpTgVRrUY4/QeQMWlZSVNCtPIqlnBRhwdOk9wx0r2+WEFmyxcyzyrhF18wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mQ6VPdz4ZL; Mon, 20 Oct 2025 16:11: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 59KGBYY7036262; Mon, 20 Oct 2025 16:11:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBY0j036259; Mon, 20 Oct 2025 16:11:34 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:34 GMT Message-Id: <202510201611.59KGBY0j036259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 50d6a56a198c - stable/15 - realpath: Belatedly document POSIX conformance List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 50d6a56a198c7c3961313a933f54eea94ffa4b5f Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=50d6a56a198c7c3961313a933f54eea94ffa4b5f commit 50d6a56a198c7c3961313a933f54eea94ffa4b5f Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:21 +0000 realpath: Belatedly document POSIX conformance We've been mostly POSIX-conforming since r236400 and fully since r240410, which fixed a corner case where a missing non-leaf directory would be reported as ENOTDIR instead of ENOENT. Sponsored by: Klara, Inc. Fixes: 7877ed7ce33e ("Avoid mapping ENOENT to ENOTDIR for non-existent path components.") Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D53027 (cherry picked from commit 7c66667d45e95af59f59e41ef169119a974a6be1) --- lib/libc/stdlib/realpath.3 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/stdlib/realpath.3 b/lib/libc/stdlib/realpath.3 index 065ba312c2ef..76f40249963b 100644 --- a/lib/libc/stdlib/realpath.3 +++ b/lib/libc/stdlib/realpath.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 11, 2012 +.Dd October 10, 2025 .Dt REALPATH 3 .Os .Sh NAME @@ -108,11 +108,11 @@ and .Xr getcwd 3 . .Sh SEE ALSO .Xr getcwd 3 -.\" .Sh STANDARDS -.\" The -.\" .Fn realpath -.\" function conforms to -.\" .St -p1003.1-2001 . +.Sh STANDARDS +The +.Fn realpath +function conforms to +.St -p1003.1-2001 . .Sh HISTORY The .Fn realpath From nobody Mon Oct 20 16:11:35 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mT0mGdz6Cgn7; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mS0PrSz3VPx; Mon, 20 Oct 2025 16:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C4ItJzLcr0BFqw6OS6wltyjvQu/GMcbHti35Mnz0Azg=; b=BIuWTeOPG4vz9UhnezQcvcDitraqhntglRESbDgSTEXKfzeku/3Z9nSuVvmHWpgnbS3x4u Da+JkoCkktxEvCw/A4cKsdria496A2AEvlZi5opsEEScHacfbNG+pibrZ1CJwf/RlzIPO8 zCkXnqxrKiROD8BpXDFOoDf9GCI97UK/00YF8Z3TTLGC5bXjD7Ub32tSl+aI6/hpOUnTj4 V1pG1CKo3eHmODba07LoH36Ybx/qgCOlYamPWJ42apwl6cE9VFFhhMGk/NANVFUPt4RkYt P99hg5aIrj1m5iDnBAyLPIuAtdTKvulXide8w0g1muOkw4nJduvk4qT77mrQ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C4ItJzLcr0BFqw6OS6wltyjvQu/GMcbHti35Mnz0Azg=; b=MNTDeCZdjLOH93XXVpoj63Smu74NDdU4tQXvfBDxmmrLk46bD3h5KXwRO6Rc4FZgp8upOU U9HVfp8MUdZA1bt1gfNaLfx9W7FFX9jmMP8Pzkvv+7tuPTfph9MknXc/OflzzxZpppou+E gxwQJ9EVdRVIA8Sk7zo5izTeZkONLQ79FPBIo0NMcttqhaXEAOeimttfgcpCchLu5We66n NjOEaLvEpaTAp8C15U4nOfcHhjf4iJm4/nr4mNLfZGmi6cWhUBWpa3Yl/LWABxEROKd40w 2NzZqLxZi+IcSWh9eyJ3Kkq7mM0VLoMjUFBMYTCyB2h/DdEA/SGTAOQ1fARpmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976696; a=rsa-sha256; cv=none; b=ocsEnnPTj037FLlr4Rvkz2HVSO/VSZI5f6gjdqStCtOkNE2+fkDQRFiCjxK89POT1Bip8i IB6oVenxVMUeQER/T2bP5RiRiSGuA+UCz3DeMTnkDJZLQ/ygADp8MnyuiS4Erh5wHQJfL9 8l2l37lW7aulflXkON12Jj6G70vWPji3PiFRuh1Kq2CnNlxjzleXuHrJF3kK9uB7AiXv7f ZPfjHdt8dyjxKQ0E87gGpKLn3vUwbC57GfzloPrm/m1UzPXfeF4swYKSAubtfkbsG3WeyC AWLIQkrm4brKcPYC7wErauRxuiLBblTaaxyyjv49HlPqCv/lFWfkWuO6wsAH4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mR73CRz4y9; Mon, 20 Oct 2025 16:11: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 59KGBZt0036302; Mon, 20 Oct 2025 16:11:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBZ3T036299; Mon, 20 Oct 2025 16:11:35 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:35 GMT Message-Id: <202510201611.59KGBZ3T036299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 3d680881f6ed - stable/15 - quot: Fix benign buffer overflow List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3d680881f6ed2f55079aac26cf0ded307c282563 Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3d680881f6ed2f55079aac26cf0ded307c282563 commit 3d680881f6ed2f55079aac26cf0ded307c282563 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:54:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:21 +0000 quot: Fix benign buffer overflow If it encounters an inode whose owner does not have a pw entry, quot allocates a 7-byte buffer (8 in practice, since that is the minimum allocation size) and uses it to store the numeric uid preceded by a hash character. This will overflow the allocated buffer if the UID exceeds 6 decimal digits. Avoid this by using asprintf() instead. While here, simplify the common case as well using strdup(). Reported by: Igor Gabriel Sousa e Souza MFC after: 3 days Reviewed by: obiwac, emaste Differential Revision: https://reviews.freebsd.org/D53129 (cherry picked from commit 5854d1cbab1073d78519e7ad9a6eb5726341d587) --- usr.sbin/quot/quot.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 4152c498371a..c11c46a500a1 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -280,14 +280,10 @@ user(uid_t uid) usr--) { if (!usr->name) { usr->uid = uid; - if (!(pwd = getpwuid(uid))) { - if ((usr->name = (char *)malloc(7))) - sprintf(usr->name,"#%d",uid); + asprintf(&usr->name, "#%u", uid); } else { - if ((usr->name = (char *) - malloc(strlen(pwd->pw_name) + 1))) - strcpy(usr->name,pwd->pw_name); + usr->name = strdup(pwd->pw_name); } if (!usr->name) errx(1, "allocate users"); From nobody Mon Oct 20 16:11:37 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mT3dhzz6CgSD; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mT14FKz3V6D; Mon, 20 Oct 2025 16:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dETTt5x2H3wjMVvJ55rTz673PxE5vqAohFYpIwyfxck=; b=Y/HZQdsqXGfEzJ+oQHXutjfZcZksQ7GQi2bBi5ZaN7xhod9pjRwRqszgzHyzcV/BlxmlEY eJkPvr9ugxDxv2pDCFFd4/Zb811gZr9l5DNZUPDRLGHSbTbfzavwzrQaGsFLFLcmeTGTDH HVovndNwSTAiDeW2++bfHpWeAOOjtjbtPTasUVh7PsuDs8MWx2xwDm0bs7IDQrQy80n0KX JariyUkC4C6Kl1b6whKlUQqJtnMzA0IGbvhPC7u/8C4Qcv8GnJnoaVHRt8fnz79VdTfhcE 4xFo5Z55TU4Hpr7PFD48ap6tFxPkdHmzkaHxITD9+sB8oF2Hy6mg6tDP+4H5CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dETTt5x2H3wjMVvJ55rTz673PxE5vqAohFYpIwyfxck=; b=lkCZTKxJvjz0mU6VF608dVjMXpmkCSWoJdl7LYEmxkWG9Q7rxxsB9i3VJAT+FG9BAeTRHj zNGOMu6Rg6+qaPDirw+6RuduLMtxR3ECr+xd4KmzUfKo+J2OuTE7AMJWBkmdQH+DQrTbbn og4be/pODin0CWwqplziGOkcqlYzRFtSiU7fL3r5aE6f3xyqyutG/v03plKk63IYzrFnMW Blxw3iXVTmIAvJNfq6g97c1gcb/O1zkVeqIl0jZJduYts18rLiqV3Ql98jkp4DCIGEy67Q 4DxzmnmZGatV5qz5z1e1SY1h/ck2wfum7CNfIn4dVRkUXHU3DNWE6TrOOEgUpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976697; a=rsa-sha256; cv=none; b=D/BG35fRRQMc4vNagj2gMfawwdBOEZbF5EfLwq45Orm0kaNdo/qI1SYETmx+Etb3k9f2Hi mnlgcS3EdT/hoJKSVdob8LrLLB303HdZVQx4lGjI0aizQAV8nNIUdAhDUNdmuzXQNz/icp +W71XIiARXY3TDnWOMT7FBuOHryzcT7xb/yjdrx48d0jX/Y1sgfaPCQiK1X8UyDX+M678D bMcAWsZIf/cHCu4IVNjvaiIRAW6UScFxgD4+B1avPGzB3O7RVzRr/6sVc5TS5CqlsZWKi7 eDctghwea/qazFRI+0iZOtnshOcIvAcjs/tV3M71ZymzhAdXxbhr79XY0Him9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mT0Zlzz51f; Mon, 20 Oct 2025 16:11: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 59KGBbLq036345; Mon, 20 Oct 2025 16:11:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBbMB036342; Mon, 20 Oct 2025 16:11:37 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:37 GMT Message-Id: <202510201611.59KGBbMB036342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 68911bf64eb5 - stable/15 - quot: Clean up List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 68911bf64eb5f6a99dd1fa7e2b6eaee1d27d8f1a Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=68911bf64eb5f6a99dd1fa7e2b6eaee1d27d8f1a commit 68911bf64eb5f6a99dd1fa7e2b6eaee1d27d8f1a Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:54:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:22 +0000 quot: Clean up * Fix numerous style violations. * Modernize somewhat. * Don't bother examining errno after calling get_inode(), as it always exits on error. * Fix confusing wording in the manual page. The code remains somewhat idiosyncratic, e.g. in its insistance on counting down rather than up in simple for loops, but in the absence of comprehensive automated tests, the risk of introducing bugs exceeds the benefit of rewriting these into more idiomatic forms. Reviewed by: obiwac Differential Revision: https://reviews.freebsd.org/D53130 (cherry picked from commit 195b00ec45e55c38da13d1bcd2d7eb6614abec59) --- usr.sbin/quot/Makefile | 2 - usr.sbin/quot/quot.8 | 7 +- usr.sbin/quot/quot.c | 227 ++++++++++++++++++++++--------------------------- 3 files changed, 106 insertions(+), 130 deletions(-) diff --git a/usr.sbin/quot/Makefile b/usr.sbin/quot/Makefile index ed8360ae938e..34ebcb1009c8 100644 --- a/usr.sbin/quot/Makefile +++ b/usr.sbin/quot/Makefile @@ -2,6 +2,4 @@ PROG= quot MAN= quot.8 LIBADD= ufs -WARNS?= 2 - .include diff --git a/usr.sbin/quot/quot.8 b/usr.sbin/quot/quot.8 index 81abe28b41d5..8da0625b246c 100644 --- a/usr.sbin/quot/quot.8 +++ b/usr.sbin/quot/quot.8 @@ -27,7 +27,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 8, 1994 +.Dd October 15, 2025 .Dt QUOT 8 .Os .Sh NAME @@ -55,9 +55,8 @@ blocks in files with this or lower size. For each user, display count of files and space occupied. .It Fl h Estimate the number of blocks in each file based on its size. -Despite that this does not give the correct results (it does not -account for the holes in files), this option is not any faster -and thus is discouraged. +Note that this does not account for sparse files and is no faster than +reporting the accurate block count. .It Fl k Force the numbers to be reported in kilobyte counts. By default, all sizes are reported in 512-byte block counts. diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index c11c46a500a1..0a3e3094d940 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -32,19 +32,20 @@ */ #include -#include #include #include #include #include #include +#include #include #include -#include #include #include #include +#include +#include #include #include #include @@ -52,10 +53,11 @@ #include /* some flags of what to do: */ -static char estimate; -static char count; -static char unused; -static void (*func)(int, struct fs *, char *); +static bool all; +static bool count; +static bool estimate; +static bool unused; +static void (*func)(int, struct fs *); static long blocksize; static char *header; static int headerlen; @@ -69,9 +71,9 @@ static struct user *user(uid_t); static int cmpusers(const void *, const void *); static void uses(uid_t, daddr_t, time_t); static void initfsizes(void); -static void dofsizes(int, struct fs *, char *); -static void douser(int, struct fs *, char *); -static void donames(int, struct fs *, char *); +static void dofsizes(int, struct fs *); +static void douser(int, struct fs *); +static void donames(int, struct fs *); static void usage(void); static void quot(char *, char *); @@ -89,7 +91,7 @@ static void quot(char *, char *); #ifdef COMPAT #define SIZE(n) (n) #else -#define SIZE(n) ((int)(((quad_t)(n) * 512 + blocksize - 1)/blocksize)) +#define SIZE(n) ((int)(((intmax_t)(n) * 512 + blocksize - 1) / blocksize)) #endif #define INOCNT(fs) ((fs)->fs_ipg) @@ -104,29 +106,26 @@ static void quot(char *, char *); static union dinode * get_inode(int fd, struct fs *super, ino_t ino) { - static caddr_t ipbuf; + static union dinode *ipbuf; static struct cg *cgp; static ino_t last; - static int cg; + static unsigned long cg; struct ufs2_dinode *di2; + off_t off; if (fd < 0) { /* flush cache */ - if (ipbuf) { - free(ipbuf); - ipbuf = 0; - if (super != NULL && super->fs_magic == FS_UFS2_MAGIC) { - free(cgp); - cgp = 0; - } - } - return 0; + free(ipbuf); + ipbuf = NULL; + free(cgp); + cgp = NULL; + return (NULL); } - if (!ipbuf || ino < last || ino >= last + INOCNT(super)) { + if (ipbuf == NULL || ino < last || ino >= last + INOCNT(super)) { if (super->fs_magic == FS_UFS2_MAGIC && - (!cgp || cg != ino_to_cg(super, ino))) { + (cgp == NULL || cg != ino_to_cg(super, ino))) { cg = ino_to_cg(super, ino); - if (!cgp && !(cgp = malloc(super->fs_cgsize))) + if (cgp == NULL && (cgp = malloc(super->fs_cgsize)) == NULL) errx(1, "allocate cg"); if (lseek(fd, (off_t)cgtod(super, cg) << super->fs_fshift, 0) < 0) err(1, "lseek cg"); @@ -135,12 +134,12 @@ get_inode(int fd, struct fs *super, ino_t ino) if (!cg_chkmagic(cgp)) errx(1, "cg has bad magic"); } - if (!ipbuf - && !(ipbuf = malloc(INOSZ(super)))) + if (ipbuf == NULL && (ipbuf = malloc(INOSZ(super))) == NULL) errx(1, "allocate inodes"); last = rounddown(ino, INOCNT(super)); - if (lseek(fd, (off_t)ino_to_fsba(super, last) << super->fs_fshift, 0) < (off_t)0 - || read(fd, ipbuf, INOSZ(super)) != (ssize_t)INOSZ(super)) + off = (off_t)ino_to_fsba(super, last) << super->fs_fshift; + if (lseek(fd, off, SEEK_SET) != off || + read(fd, ipbuf, INOSZ(super)) != (ssize_t)INOSZ(super)) err(1, "read inodes"); } @@ -150,7 +149,7 @@ get_inode(int fd, struct fs *super, ino_t ino) di2 = &((struct ufs2_dinode *)ipbuf)[ino % INOCNT(super)]; /* If the inode is unused, it might be unallocated too, so zero it. */ if (isclr(cg_inosused(cgp), ino % super->fs_ipg)) - bzero(di2, sizeof (*di2)); + memset(di2, 0, sizeof(*di2)); return ((union dinode *)di2); } @@ -166,8 +165,8 @@ static int virtualblocks(struct fs *super, union dinode *dp) sz = DIP(super, dp, di_size); #ifdef COMPAT - if (lblkno(super,sz) >= UFS_NDADDR) { - nblk = blkroundup(super,sz); + if (lblkno(super, sz) >= UFS_NDADDR) { + nblk = blkroundup(super, sz); if (sz == nblk) nblk += super->fs_bsize; } @@ -176,9 +175,9 @@ static int virtualblocks(struct fs *super, union dinode *dp) #else /* COMPAT */ - if (lblkno(super,sz) >= UFS_NDADDR) { - nblk = blkroundup(super,sz); - sz = lblkno(super,nblk); + if (lblkno(super, sz) >= UFS_NDADDR) { + nblk = blkroundup(super, sz); + sz = lblkno(super, nblk); sz = (sz - UFS_NDADDR + NINDIR(super) - 1) / NINDIR(super); while (sz > 0) { nblk += sz * super->fs_bsize; @@ -186,7 +185,7 @@ static int virtualblocks(struct fs *super, union dinode *dp) sz = (sz - 1 + NINDIR(super) - 1) / NINDIR(super); } } else - nblk = fragroundup(super,sz); + nblk = fragroundup(super, sz); return nblk / 512; #endif /* COMPAT */ @@ -234,10 +233,9 @@ inituser(void) int i; struct user *usr; - if (!nusers) { + if (nusers == 0) { nusers = 8; - if (!(users = - (struct user *)calloc(nusers,sizeof(struct user)))) + if ((users = calloc(nusers, sizeof(*users))) == NULL) errx(1, "allocate users"); } else { for (usr = users, i = nusers; --i >= 0; usr++) { @@ -255,14 +253,13 @@ usrrehash(void) struct user *svusr; svusr = users; - nusers <<= 1; - if (!(users = (struct user *)calloc(nusers,sizeof(struct user)))) + nusers *= 2; + if ((users = calloc(nusers, sizeof(*users))) == NULL) errx(1, "allocate users"); - for (usr = svusr, i = nusers >> 1; --i >= 0; usr++) { - for (usrn = users + (usr->uid&(nusers - 1)); usrn->name; - usrn--) { + for (usr = svusr, i = nusers / 2; --i >= 0; usr++) { + for (usrn = users + usr->uid % nusers; usrn->name; usrn--) { if (usrn <= users) - usrn = users + nusers; + usrn += nusers; } *usrn = *usr; } @@ -272,29 +269,24 @@ static struct user * user(uid_t uid) { struct user *usr; - int i; struct passwd *pwd; + int i; while (1) { - for (usr = users + (uid&(nusers - 1)), i = nusers; --i >= 0; - usr--) { - if (!usr->name) { + for (usr = users + uid % nusers, i = nusers; --i >= 0; usr--) { + if (usr->name == NULL) { usr->uid = uid; - if (!(pwd = getpwuid(uid))) { + if ((pwd = getpwuid(uid)) == NULL) asprintf(&usr->name, "#%u", uid); - } else { + else usr->name = strdup(pwd->pw_name); - } - if (!usr->name) + if (usr->name == NULL) errx(1, "allocate users"); - - return usr; - - } else if (usr->uid == uid) - return usr; - + } + if (usr->uid == uid) + return (usr); if (usr <= users) - usr = users + nusers; + usr += nusers; } usrrehash(); } @@ -303,15 +295,13 @@ user(uid_t uid) static int cmpusers(const void *v1, const void *v2) { - const struct user *u1, *u2; - u1 = (const struct user *)v1; - u2 = (const struct user *)v2; + const struct user *u1 = v1, *u2 = v2; - return u2->space - u1->space; + return (u2->space - u1->space); } -#define sortusers(users) (qsort((users),nusers,sizeof(struct user), \ - cmpusers)) +#define sortusers(users) \ + qsort((users), nusers, sizeof(struct user), cmpusers) static void uses(uid_t uid, daddr_t blks, time_t act) @@ -339,7 +329,7 @@ uses(uid_t uid, daddr_t blks, time_t act) #else #define FSZCNT 512 #endif -struct fsizes { +static struct fsizes { struct fsizes *fsz_next; daddr_t fsz_first, fsz_last; ino_t fsz_count[FSZCNT]; @@ -361,7 +351,7 @@ initfsizes(void) } static void -dofsizes(int fd, struct fs *super, char *name) +dofsizes(int fd, struct fs *super) { ino_t inode, maxino; union dinode *dp; @@ -375,13 +365,12 @@ dofsizes(int fd, struct fs *super, char *name) errx(1, "allocate fsize structure"); #endif /* COMPAT */ for (inode = 0; inode < maxino; inode++) { - errno = 0; - if ((dp = get_inode(fd,super,inode)) + if ((dp = get_inode(fd, super, inode)) != NULL && #ifdef COMPAT - && ((DIP(super, dp, di_mode) & IFMT) == IFREG - || (DIP(super, dp, di_mode) & IFMT) == IFDIR) + ((DIP(super, dp, di_mode) & IFMT) == IFREG || + (DIP(super, dp, di_mode) & IFMT) == IFDIR) #else /* COMPAT */ - && !isfree(super, dp) + !isfree(super, dp) #endif /* COMPAT */ ) { sz = estimate ? virtualblocks(super, dp) : @@ -400,9 +389,8 @@ dofsizes(int fd, struct fs *super, char *name) if (ksz < fp->fsz_last) break; } - if (!fp || ksz < fp->fsz_first) { - if (!(fp = (struct fsizes *) - malloc(sizeof(struct fsizes)))) + if (fp == NULL || ksz < fp->fsz_first) { + if ((fp = malloc(sizeof(*fp))) == NULL) errx(1, "allocate fsize structure"); fp->fsz_next = *fsp; *fsp = fp; @@ -416,24 +404,23 @@ dofsizes(int fd, struct fs *super, char *name) fp->fsz_count[ksz % FSZCNT]++; fp->fsz_sz[ksz % FSZCNT] += sz; #endif /* COMPAT */ - } else if (errno) { - err(1, "%s", name); } } sz = 0; - for (fp = fsizes; fp; fp = fp->fsz_next) { + for (fp = fsizes; fp != NULL; fp = fp->fsz_next) { for (i = 0; i < FSZCNT; i++) { - if (fp->fsz_count[i]) + if (fp->fsz_count[i] != 0) { printf("%jd\t%jd\t%d\n", (intmax_t)(fp->fsz_first + i), (intmax_t)fp->fsz_count[i], SIZE(sz += fp->fsz_sz[i])); + } } } } static void -douser(int fd, struct fs *super, char *name) +douser(int fd, struct fs *super) { ino_t inode, maxino; struct user *usr, *usrs; @@ -442,38 +429,36 @@ douser(int fd, struct fs *super, char *name) maxino = super->fs_ncg * super->fs_ipg - 1; for (inode = 0; inode < maxino; inode++) { - errno = 0; - if ((dp = get_inode(fd,super,inode)) - && !isfree(super, dp)) + if ((dp = get_inode(fd, super, inode)) != NULL && + !isfree(super, dp)) { uses(DIP(super, dp, di_uid), estimate ? virtualblocks(super, dp) : actualblocks(super, dp), DIP(super, dp, di_atime)); - else if (errno) { - err(1, "%s", name); } } - if (!(usrs = (struct user *)malloc(nusers * sizeof(struct user)))) + if ((usrs = malloc(nusers * sizeof(*usrs))) == NULL) errx(1, "allocate users"); - bcopy(users,usrs,nusers * sizeof(struct user)); + memcpy(usrs, users, nusers * sizeof(*usrs)); sortusers(usrs); for (usr = usrs, n = nusers; --n >= 0 && usr->count; usr++) { - printf("%5d",SIZE(usr->space)); + printf("%5d", SIZE(usr->space)); if (count) - printf("\t%5ld",usr->count); - printf("\t%-8s",usr->name); - if (unused) + printf("\t%5ld", usr->count); + printf("\t%-8s", usr->name); + if (unused) { printf("\t%5d\t%5d\t%5d", - SIZE(usr->spc30), - SIZE(usr->spc60), - SIZE(usr->spc90)); + SIZE(usr->spc30), + SIZE(usr->spc60), + SIZE(usr->spc90)); + } printf("\n"); } free(usrs); } static void -donames(int fd, struct fs *super, char *name) +donames(int fd, struct fs *super) { int c; ino_t maxino; @@ -484,18 +469,18 @@ donames(int fd, struct fs *super, char *name) /* first skip the name of the filesystem */ while ((c = getchar()) != EOF && (c < '0' || c > '9')) while ((c = getchar()) != EOF && c != '\n'); - ungetc(c,stdin); + ungetc(c, stdin); while (scanf("%ju", &inode) == 1) { if (inode > maxino) { warnx("illegal inode %ju", inode); return; } - errno = 0; - if ((dp = get_inode(fd,super,inode)) - && !isfree(super, dp)) { - printf("%s\t",user(DIP(super, dp, di_uid))->name); + if ((dp = get_inode(fd, super, inode)) != NULL && + !isfree(super, dp)) { + printf("%s\t", user(DIP(super, dp, di_uid))->name); /* now skip whitespace */ - while ((c = getchar()) == ' ' || c == '\t'); + while ((c = getchar()) == ' ' || c == '\t') + /* nothing */; /* and print out the remainder of the input line */ while (c != EOF && c != '\n') { putchar(c); @@ -503,11 +488,9 @@ donames(int fd, struct fs *super, char *name) } putchar('\n'); } else { - if (errno) { - err(1, "%s", name); - } /* skip this line */ - while ((c = getchar()) != EOF && c != '\n'); + while ((c = getchar()) != EOF && c != '\n') + /* nothing */; } if (c == EOF) break; @@ -534,7 +517,7 @@ quot(char *name, char *mp) get_inode(-1, NULL, 0); /* flush cache */ inituser(); initfsizes(); - if ((fd = open(name,0)) < 0) { + if ((fd = open(name, 0)) < 0) { warn("%s", name); close(fd); return; @@ -551,11 +534,11 @@ quot(char *name, char *mp) close(fd); return; } - printf("%s:",name); + printf("%s:", name); if (mp) - printf(" (%s)",mp); + printf(" (%s)", mp); putchar('\n'); - (*func)(fd, fs, name); + (*func)(fd, fs); free(fs); close(fd); } @@ -563,29 +546,27 @@ quot(char *name, char *mp) int main(int argc, char *argv[]) { - char all = 0; struct statfs *mp; struct fstab *fs; - int cnt; - int ch; + int ch, cnt; func = douser; #ifndef COMPAT - header = getbsize(&headerlen,&blocksize); + header = getbsize(&headerlen, &blocksize); #endif while ((ch = getopt(argc, argv, "acfhknv")) != -1) { switch (ch) { case 'a': - all = 1; + all = true; break; case 'c': func = dofsizes; break; case 'f': - count = 1; + count = true; break; case 'h': - estimate = 1; + estimate = true; break; #ifndef COMPAT case 'k': @@ -596,7 +577,7 @@ main(int argc, char *argv[]) func = donames; break; case 'v': - unused = 1; + unused = true; break; default: usage(); @@ -609,18 +590,16 @@ main(int argc, char *argv[]) usage(); if (all) { - cnt = getmntinfo(&mp,MNT_NOWAIT); - for (; --cnt >= 0; mp++) { - if (!strncmp(mp->f_fstypename, "ufs", MFSNAMELEN)) + for (cnt = getmntinfo(&mp, MNT_NOWAIT); --cnt >= 0; mp++) + if (strncmp(mp->f_fstypename, "ufs", MFSNAMELEN) == 0) quot(mp->f_mntfromname, mp->f_mntonname); - } } - while (--argc >= 0) { + while (argc-- > 0) { if ((fs = getfsfile(*argv)) != NULL) quot(fs->fs_spec, 0); else - quot(*argv,0); + quot(*argv, 0); argv++; } - return 0; + return (0); } From nobody Mon Oct 20 16:11:38 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mV3qNnz6Cgqy; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mV1wfFz3VHT; Mon, 20 Oct 2025 16:11:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4JMabZ/HeeDylS+eyWwKrJ7iRHy2vxS5uxivoqY02s=; b=mLQfZH8t+WHF/O/wZkXytK+RMcrlLu6s++5GRJPgY87Mf7Q0UscKem6LsbH6ywRIB+WRwq iZVa9fv/SPO73SDtHeAuvI0xcFszAkoBQlmV9JY5SvlrgLkMHLtqvL0JHes8sM2h5Hf92w rptuamKXfun6CHNwfF085qofm2G9tYN/78fuT2PXSQlUGI7FpG/GqkSeM5xRxgmG+4MarK OmmORDuGWfcEiYOYnbR9xwYP3/RFoX4sEuZ5In1CiZ+2JHPveEBqCXDiOmQAwiN6Q7q8xa 1pnS/z3k7zgF7/oNJdP3C/K1QsyRv+WSKJtrEd1bazZpz2I18GFpd3R0MmbGVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4JMabZ/HeeDylS+eyWwKrJ7iRHy2vxS5uxivoqY02s=; b=CLuGX1CxWQddIffemvQwWjA9D1gzwjFnN4sKVdbRoAVO+xOSqeVJUo+PFqCZ+DHtqeNTok 3/oeZ7Vrhf46UQb7Dwm2cJMHyRgoE3U5H4rN6PAc73LB5C1PJn9uwqZlwZsqR4VY8WYXWj ghhXWvQaOnYhWah/fNJJK512mcyGhT1noquLmq+FmLRCrJNT2Fpu5sJB/wRMtxnI/OwM37 UZWpmEh2+syI7PB25sIR95LbJSueLfs9SLRCeey+2MTLtmSKjgAFOG/oaRXKi1VGf1ekg3 pEti3vq5W+AGllZbSC2Jik53EPTPINcfF+pFQnkgdRgaRGJoPl0LUUtT87h3vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976698; a=rsa-sha256; cv=none; b=JCDnYv55qYzd2LlYovKmiib0yTRGdaYlQ4MbJvdhfgxyvaFQwbzLtJr8os01zPY01NVloZ v5o15HKW1uvtgNmhPUYeD+BgFj4hEi0id8o291yC3DUmksGFh4+bda+SIKWYiu4ee82trK /EKErXasn7EVLrPCSau5mdRdECwyPRsr7spu9la1LKMzYj6vQV6SX4GB5wmEBdqAxEPLgg gFrcQuf6Ra0ReZBLdTV8LJWWcNha7BKIZj4sfKTnH4cSqDnqjhTYxQU2iNAVD8uWimMKVu dJod/jZn5koruJcbJMmW0+lB+TMikevon3mii0Hox3B0wy9Wi/XFVm4Mx3CuRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mV1V6vz4sK; Mon, 20 Oct 2025 16:11: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 59KGBccC036383; Mon, 20 Oct 2025 16:11:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBciR036380; Mon, 20 Oct 2025 16:11:38 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:38 GMT Message-Id: <202510201611.59KGBciR036380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 9a7b48fef152 - stable/15 - quot: Drop the COMPAT version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9a7b48fef15230740cdf7b69e40e6ceb2bd2318e Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9a7b48fef15230740cdf7b69e40e6ceb2bd2318e commit 9a7b48fef15230740cdf7b69e40e6ceb2bd2318e Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:55:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:22 +0000 quot: Drop the COMPAT version We've had this code for 30 years, but there has never been a way to build it. We have no idea if it still works, or if it ever worked. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53131 (cherry picked from commit 0eaca4a24b97c02685532f86c121a4cf415942c5) --- usr.sbin/quot/quot.c | 54 ---------------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 0a3e3094d940..ad9f65c94877 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -88,11 +88,7 @@ static void quot(char *, char *); * Due to the size of modern disks, we must cast intermediate * values to 64 bits to prevent potential overflows. */ -#ifdef COMPAT -#define SIZE(n) (n) -#else #define SIZE(n) ((int)(((intmax_t)(n) * 512 + blocksize - 1) / blocksize)) -#endif #define INOCNT(fs) ((fs)->fs_ipg) #define INOSZ(fs) \ @@ -153,27 +149,13 @@ get_inode(int fd, struct fs *super, ino_t ino) return ((union dinode *)di2); } -#ifdef COMPAT -#define actualblocks(fs, dp) (DIP(fs, dp, di_blocks) / 2) -#else #define actualblocks(fs, dp) DIP(fs, dp, di_blocks) -#endif static int virtualblocks(struct fs *super, union dinode *dp) { off_t nblk, sz; sz = DIP(super, dp, di_size); -#ifdef COMPAT - if (lblkno(super, sz) >= UFS_NDADDR) { - nblk = blkroundup(super, sz); - if (sz == nblk) - nblk += super->fs_bsize; - } - - return sz / 1024; - -#else /* COMPAT */ if (lblkno(super, sz) >= UFS_NDADDR) { nblk = blkroundup(super, sz); @@ -188,15 +170,11 @@ static int virtualblocks(struct fs *super, union dinode *dp) nblk = fragroundup(super, sz); return nblk / 512; -#endif /* COMPAT */ } static int isfree(struct fs *super, union dinode *dp) { -#ifdef COMPAT - return (DIP(super, dp, di_mode) & IFMT) == 0; -#else /* COMPAT */ switch (DIP(super, dp, di_mode) & IFMT) { case IFIFO: @@ -213,7 +191,6 @@ isfree(struct fs *super, union dinode *dp) default: errx(1, "unknown IFMT 0%o", DIP(super, dp, di_mode) & IFMT); } -#endif } static struct user { @@ -324,11 +301,7 @@ uses(uid_t uid, daddr_t blks, time_t act) usr->spc30 += blks; } -#ifdef COMPAT -#define FSZCNT 500 -#else #define FSZCNT 512 -#endif static struct fsizes { struct fsizes *fsz_next; daddr_t fsz_first, fsz_last; @@ -360,30 +333,12 @@ dofsizes(int fd, struct fs *super) int i; maxino = super->fs_ncg * super->fs_ipg - 1; -#ifdef COMPAT - if (!(fsizes = (struct fsizes *)malloc(sizeof(struct fsizes)))) - errx(1, "allocate fsize structure"); -#endif /* COMPAT */ for (inode = 0; inode < maxino; inode++) { if ((dp = get_inode(fd, super, inode)) != NULL && -#ifdef COMPAT - ((DIP(super, dp, di_mode) & IFMT) == IFREG || - (DIP(super, dp, di_mode) & IFMT) == IFDIR) -#else /* COMPAT */ !isfree(super, dp) -#endif /* COMPAT */ ) { sz = estimate ? virtualblocks(super, dp) : actualblocks(super, dp); -#ifdef COMPAT - if (sz >= FSZCNT) { - fsizes->fsz_count[FSZCNT-1]++; - fsizes->fsz_sz[FSZCNT-1] += sz; - } else { - fsizes->fsz_count[sz]++; - fsizes->fsz_sz[sz] += sz; - } -#else /* COMPAT */ ksz = SIZE(sz); for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) { if (ksz < fp->fsz_last) @@ -403,7 +358,6 @@ dofsizes(int fd, struct fs *super) } fp->fsz_count[ksz % FSZCNT]++; fp->fsz_sz[ksz % FSZCNT] += sz; -#endif /* COMPAT */ } } sz = 0; @@ -500,11 +454,7 @@ donames(int fd, struct fs *super) static void usage(void) { -#ifdef COMPAT - fprintf(stderr, "usage: quot [-cfhnv] [-a | filesystem ...]\n"); -#else /* COMPAT */ fprintf(stderr, "usage: quot [-cfhknv] [-a | filesystem ...]\n"); -#endif /* COMPAT */ exit(1); } @@ -551,9 +501,7 @@ main(int argc, char *argv[]) int ch, cnt; func = douser; -#ifndef COMPAT header = getbsize(&headerlen, &blocksize); -#endif while ((ch = getopt(argc, argv, "acfhknv")) != -1) { switch (ch) { case 'a': @@ -568,11 +516,9 @@ main(int argc, char *argv[]) case 'h': estimate = true; break; -#ifndef COMPAT case 'k': blocksize = 1024; break; -#endif /* COMPAT */ case 'n': func = donames; break; From nobody Mon Oct 20 16:11:39 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mW5tYDz6CgN2; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mW36jJz3VQY; Mon, 20 Oct 2025 16:11:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1tSrqHq01XBfz+8YhKvEjIhST/w5GUP0+4mcoHviJHk=; b=kCWdykfDZggIh4hC9LONqyRpmj3GziFISaJpGeruJKExuN2rw/m8TOiXMtoFw25JiT8l/q DdRK5mfmJLJOgq7MVAyKC7DhlHamC0Zt8yNPRKIRdRep6LTkFDny/Gimqnaz0Q7DNIOJAc OVyDMDLfeHB27UG9CqWpZH4prDBn+4fEJg1AgI89g0HGBBy2jt4LIrp3WqvWzaVG205Wmd Ynv8ZKiPx1CJvU/nDv9a2/FhR6d2AxuUTbGwC7w+PbS2/AjJ/byR+DANU2oaYo4GJk7Ol4 2ATZx8TTATyt8nCi29Bh7fIAOH34Z59HX5tjQJZBy9tCX0iN894hD+zVcz1ozQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1tSrqHq01XBfz+8YhKvEjIhST/w5GUP0+4mcoHviJHk=; b=i8X+xXs4vstkj1+/smhP3aZlhsqNKsQqKY0sVWb67tfXioB7eo+AkZeFh8eUpsullO2ibY 7XLuDCYP2VXGv2NCyYb6sU1A3v0a99UVmcLwGDiBApXD7+v4vhbztiHI20cxaUfjgAxN5T n60Po2/Hn409yO0gHF+5Om3IX9OvV3kqDh8VLvpV6twEJMRoLEYSpauKoQWZ/8JPh64ZlF ENidJXO+4LRlPOze9lzz7AF1WWhVy1ZDZJXg4F5kf/+XcQSLdHWSv2qsmixgeYbdQIN6fd wA/35/WJyeNDaGEZIUyAt9E5wrTLnIag5egm/EbTAy3SSwzL8H7wyRc/xFi+lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976699; a=rsa-sha256; cv=none; b=ZOuQIxftnQlPEG/3k5+qfBKiJoQsEY0VedCGhSsb78t74qSv06vROum/5HUTbO5vNW6Vm/ 2u7Vy/fOQMUj8D+uMQS1CWX/Txe9OQQojMnqvsyIfrSQUfprAn5D2yRN/zq8boxFagcv/J 5PRqQgAgra8snyvf2R/xOKF7lpiYnH8A/bCVvPzjjhS50dSXxNnZhD8plsDr7obebvXkkv HL/mukTOOQH6HQsPDTVGF2sjhA7rjPuUSqO03srwjMdxiZm5+8uBCllIlEPnR04N06JaSF UIuAZrMusFWW8rNEb4r125uPrn5zh3+wtrBc02fjaJRCALYMr/ry0QmVYA7sdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mW2RWMz4ZN; Mon, 20 Oct 2025 16:11: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 59KGBdOK036422; Mon, 20 Oct 2025 16:11:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBdE9036419; Mon, 20 Oct 2025 16:11:39 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:39 GMT Message-Id: <202510201611.59KGBdE9036419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c0d4bbcb8069 - stable/15 - quot: Drop the -h option List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c0d4bbcb8069bd64f6ad070c099ebcf7cfde3e72 Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c0d4bbcb8069bd64f6ad070c099ebcf7cfde3e72 commit c0d4bbcb8069bd64f6ad070c099ebcf7cfde3e72 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:55:07 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:22 +0000 quot: Drop the -h option There was probably a time, more than 30 years ago, when the actual size of a file had to be calculated and this option saved time, but all it does today is give incorrect results for no benefit. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53132 (cherry picked from commit 8209311c51d34c81edec8d09778201cb6e67c6a5) --- usr.sbin/quot/quot.8 | 6 +----- usr.sbin/quot/quot.c | 36 ++++-------------------------------- 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/usr.sbin/quot/quot.8 b/usr.sbin/quot/quot.8 index 8da0625b246c..32e666e2a863 100644 --- a/usr.sbin/quot/quot.8 +++ b/usr.sbin/quot/quot.8 @@ -35,7 +35,7 @@ .Nd display disk space occupied by each user .Sh SYNOPSIS .Nm -.Op Fl cfhknv +.Op Fl cfknv .Op Fl a | Ar filesystem ... .Sh DESCRIPTION The @@ -53,10 +53,6 @@ number of files in this category, and aggregate total of blocks in files with this or lower size. .It Fl f For each user, display count of files and space occupied. -.It Fl h -Estimate the number of blocks in each file based on its size. -Note that this does not account for sparse files and is no faster than -reporting the accurate block count. .It Fl k Force the numbers to be reported in kilobyte counts. By default, all sizes are reported in 512-byte block counts. diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index ad9f65c94877..323648d8d550 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -55,7 +55,6 @@ /* some flags of what to do: */ static bool all; static bool count; -static bool estimate; static bool unused; static void (*func)(int, struct fs *); static long blocksize; @@ -63,7 +62,6 @@ static char *header; static int headerlen; static union dinode *get_inode(int, struct fs *, ino_t); -static int virtualblocks(struct fs *, union dinode *); static int isfree(struct fs *, union dinode *); static void inituser(void); static void usrrehash(void); @@ -149,33 +147,9 @@ get_inode(int fd, struct fs *super, ino_t ino) return ((union dinode *)di2); } -#define actualblocks(fs, dp) DIP(fs, dp, di_blocks) - -static int virtualblocks(struct fs *super, union dinode *dp) -{ - off_t nblk, sz; - - sz = DIP(super, dp, di_size); - - if (lblkno(super, sz) >= UFS_NDADDR) { - nblk = blkroundup(super, sz); - sz = lblkno(super, nblk); - sz = (sz - UFS_NDADDR + NINDIR(super) - 1) / NINDIR(super); - while (sz > 0) { - nblk += sz * super->fs_bsize; - /* sz - 1 rounded up */ - sz = (sz - 1 + NINDIR(super) - 1) / NINDIR(super); - } - } else - nblk = fragroundup(super, sz); - - return nblk / 512; -} - static int isfree(struct fs *super, union dinode *dp) { - switch (DIP(super, dp, di_mode) & IFMT) { case IFIFO: case IFLNK: /* should check FASTSYMLINK? */ @@ -337,8 +311,7 @@ dofsizes(int fd, struct fs *super) if ((dp = get_inode(fd, super, inode)) != NULL && !isfree(super, dp) ) { - sz = estimate ? virtualblocks(super, dp) : - actualblocks(super, dp); + sz = DIP(super, dp, di_blocks); ksz = SIZE(sz); for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) { if (ksz < fp->fsz_last) @@ -386,8 +359,7 @@ douser(int fd, struct fs *super) if ((dp = get_inode(fd, super, inode)) != NULL && !isfree(super, dp)) { uses(DIP(super, dp, di_uid), - estimate ? virtualblocks(super, dp) : - actualblocks(super, dp), + DIP(super, dp, di_blocks), DIP(super, dp, di_atime)); } } @@ -454,7 +426,7 @@ donames(int fd, struct fs *super) static void usage(void) { - fprintf(stderr, "usage: quot [-cfhknv] [-a | filesystem ...]\n"); + fprintf(stderr, "usage: quot [-cfknv] [-a | filesystem ...]\n"); exit(1); } @@ -514,7 +486,7 @@ main(int argc, char *argv[]) count = true; break; case 'h': - estimate = true; + /* ignored for backward compatibility */ break; case 'k': blocksize = 1024; From nobody Mon Oct 20 16:11:40 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mX66j2z6Cgl6; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mX3tV1z3VQs; Mon, 20 Oct 2025 16:11:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h+zfWY4u1F6oxp9EF1YJ/4hSeJK5FHKN8UDWRCkUDQU=; b=ARS74+l/4TCY/dtHENEkECQPt0dwyW5qywqCVC0IrXp/Eo595fikuZ603XpKHyMo+Ra3g4 u+TZWQeEOPHGCN1qozoc+jHnMEOr9ylTnHDnrPw9aw5jkQLen5w4YpVEzI1pjog1rzXzV5 A1iM1aUTnbefYIRPh9VE6lWxXZrbxe7xlLTeWcstMNytpIHmcf56CmCvmDqDgY0WzDA7Of ijL/eP/r+oYBFz0+uBTcopuXZmPUVAQA9Ujn/TNIs2xbeHjKr/n/AXA9Obdj9TsgKunCvA /17obFC9UMBLbEMaBJo7hjzr1+EeB8C9IvI1xRu+28ytMINwt60cP6NnBGwcdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h+zfWY4u1F6oxp9EF1YJ/4hSeJK5FHKN8UDWRCkUDQU=; b=LSSkLIX5Prk+hxCXfe40PeSxsGNPnyZZVul/7wZ1ynHWwfkbFgk4JOIaGx6phOmfdBOuYS oXlmsWCORLwiZYWomSBbW3UEmExqB+strkxZSmx0ciEb21BwBCWxrlfrqB/HYd7rtrNDuS ChATT8FiJh3R2b+E1UDl3I7ziEPZeGQQPgiACkVP55X67QGrzXGBnNlnaEQ9WhXmQUj2nD uJupRiInv/rE5u9UA3jplBnStFWOwFAOutWtQb6EVCgoFNsvMsGy4PqBa7viomdG/zTEjs m+yAtZBBExWVjWI5qkufbD76YwvppnQE/pXSoWhDGVrf3fSHPOfJyqCyCn7zUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976700; a=rsa-sha256; cv=none; b=DEgiPpDjzil2CmTpMc7arZcX5Wr8UHxcgYT7zQoqfD0Ismh4QzMpOwBj0Tsxnsxhbh/wrM 7wK/VecSZ5wv/WdxbKYRvvyqxdOIW1lS8waVuyUHaDrFZKNfw3oXcOQVsPw5KA6dU/F2vW xiCXwahwvbMsdtVkPcsn2GFR0N1yfShH7rTsHq8DT4Ik4GxlAwNkBExvYdvujU8cl1rNrF kAZx6TTWINWipO3AA9J9lnxmGJEv76aa69SBXlxgi4uXvQnQw7WuG9RG/vDpX4GRNyyOCQ QQjRXgNKxksFKBQqWhDqEFWL3YmvHym1aAJ3AQzhoqr0WFY1zvgBqz22XwHg9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mX3R7Nz4pY; Mon, 20 Oct 2025 16:11: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 59KGBeci036468; Mon, 20 Oct 2025 16:11:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBeF4036465; Mon, 20 Oct 2025 16:11:40 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:40 GMT Message-Id: <202510201611.59KGBeF4036465@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b5f3f1a661ab - stable/15 - quot: Add tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b5f3f1a661ab69986c3379fa4c9c2b38785933db Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b5f3f1a661ab69986c3379fa4c9c2b38785933db commit b5f3f1a661ab69986c3379fa4c9c2b38785933db Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:55:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:22 +0000 quot: Add tests To facilitate the task, we change the comparison function so that users with equal filesystem usage are sorted by UID, and add an undocumented option that prevents quot from replacing numerical UIDs with names. We also switch from getfsfile(3) to getmntpoint(3) so the first line is identical regardless of whether we pass quot a mountpoint or a device. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53133 (cherry picked from commit aa870a1935bccb66e02c4c31630706768a3e7d74) --- etc/mtree/BSD.tests.dist | 2 + usr.sbin/quot/Makefile | 6 ++- usr.sbin/quot/quot.c | 19 +++++--- usr.sbin/quot/tests/Makefile | 4 ++ usr.sbin/quot/tests/quot_test.sh | 102 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 126 insertions(+), 7 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index e6a013f010de..9ab2f3e972d6 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1283,6 +1283,8 @@ .. pw .. + quot + .. rpcbind .. sa diff --git a/usr.sbin/quot/Makefile b/usr.sbin/quot/Makefile index 34ebcb1009c8..2f32c8f2df8b 100644 --- a/usr.sbin/quot/Makefile +++ b/usr.sbin/quot/Makefile @@ -1,5 +1,9 @@ +.include + PROG= quot MAN= quot.8 -LIBADD= ufs +LIBADD= ufs util +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests .include diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 323648d8d550..879580f649b9 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,7 @@ /* some flags of what to do: */ static bool all; static bool count; +static bool noname; static bool unused; static void (*func)(int, struct fs *); static long blocksize; @@ -227,7 +229,7 @@ user(uid_t uid) for (usr = users + uid % nusers, i = nusers; --i >= 0; usr--) { if (usr->name == NULL) { usr->uid = uid; - if ((pwd = getpwuid(uid)) == NULL) + if (noname || (pwd = getpwuid(uid)) == NULL) asprintf(&usr->name, "#%u", uid); else usr->name = strdup(pwd->pw_name); @@ -248,7 +250,10 @@ cmpusers(const void *v1, const void *v2) { const struct user *u1 = v1, *u2 = v2; - return (u2->space - u1->space); + return (u2->space > u1->space ? 1 : + u2->space < u1->space ? -1 : + u1->uid > u2->uid ? 1 : + u1->uid < u2->uid ? -1 : 0); } #define sortusers(users) \ @@ -469,12 +474,11 @@ int main(int argc, char *argv[]) { struct statfs *mp; - struct fstab *fs; int ch, cnt; func = douser; header = getbsize(&headerlen, &blocksize); - while ((ch = getopt(argc, argv, "acfhknv")) != -1) { + while ((ch = getopt(argc, argv, "acfhkNnv")) != -1) { switch (ch) { case 'a': all = true; @@ -491,6 +495,9 @@ main(int argc, char *argv[]) case 'k': blocksize = 1024; break; + case 'N': + noname = true; + break; case 'n': func = donames; break; @@ -513,8 +520,8 @@ main(int argc, char *argv[]) quot(mp->f_mntfromname, mp->f_mntonname); } while (argc-- > 0) { - if ((fs = getfsfile(*argv)) != NULL) - quot(fs->fs_spec, 0); + if ((mp = getmntpoint(*argv)) != NULL) + quot(mp->f_mntfromname, mp->f_mntonname); else quot(*argv, 0); argv++; diff --git a/usr.sbin/quot/tests/Makefile b/usr.sbin/quot/tests/Makefile new file mode 100644 index 000000000000..d4e64691f905 --- /dev/null +++ b/usr.sbin/quot/tests/Makefile @@ -0,0 +1,4 @@ +PACKAGE= tests +ATF_TESTS_SH= quot_test + +.include diff --git a/usr.sbin/quot/tests/quot_test.sh b/usr.sbin/quot/tests/quot_test.sh new file mode 100644 index 000000000000..21088d162a53 --- /dev/null +++ b/usr.sbin/quot/tests/quot_test.sh @@ -0,0 +1,102 @@ +# +# Copyright (c) 2025 Dag-Erling Smørgrav +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Create and mount a UFS filesystem on a small memory disk +quot_setup() +{ + atf_check -o save:dev mdconfig -t malloc -s 16M + local dev=$(cat dev) + atf_check -o ignore newfs "$@" /dev/$dev + atf_check mkdir mnt + local mnt=$(realpath mnt) + atf_check mount /dev/$dev "$mnt" + echo "/dev/$dev: ($mnt)" >expect + printf "%5d\t%5d\t%-8s\n" 8 2 "#0" >>expect +} + +# Create a directory owned by a given UID +quot_adduid() +{ + local uid=$1 + atf_check install -d -o $uid -g 0 mnt/$uid + printf "%5d\t%5d\t%-8s\n" 4 1 "#$uid" >>expect +} + +# Perform the tests +quot_test() +{ + local dev=$(cat dev) + # Create inodes owned by a large number of users to exercise + # hash collisions and rehashing. The code uses an open hash + # table that starts out with only 8 entries and doubles every + # time it fills up. + local uid + for uid in $(seq 1 32); do + quot_adduid $uid + done + # Also create inodes owned by users with long UIDs, up to the + # highest possible value (2^32 - 2, because chown(2) and + # friends interpret 2^32 - 1 as “leave unchanged”). + local shift + for shift in $(seq 6 32); do + quot_adduid $(((1 << shift) - 2)) + done + # Since quot operates directly on the underlying device, not + # on the mounted filesystem, we remount read-only to ensure + # that everything gets flushed to the memory disk. + atf_check mount -ur /dev/$dev + atf_check -o file:expect quot -fkN /dev/$dev + atf_check -o file:expect quot -fkN $(realpath mnt) +} + +# Unmount and release the memory disk +quot_cleanup() +{ + if [ -d mnt ]; then + umount mnt || true + fi + if [ -f dev ]; then + mdconfig -d -u $(cat dev) || true + fi +} + +atf_test_case ufs1 cleanup +ufs1_head() +{ + atf_set descr "Test quot on UFS1" + atf_set require.user root +} +ufs1_body() +{ + quot_setup -O1 + quot_test +} +ufs1_cleanup() +{ + quot_cleanup +} + +atf_test_case ufs2 cleanup +ufs2_head() +{ + atf_set descr "Test quot on UFS2" + atf_set require.user root +} +ufs2_body() +{ + quot_setup -O2 + quot_test +} +ufs2_cleanup() +{ + quot_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case ufs1 + atf_add_test_case ufs2 +} From nobody Mon Oct 20 16:11:41 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mY551Mz6Cg5f; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mY28LSz3VNK; Mon, 20 Oct 2025 16:11:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a88pk6zC6tQnpJ18ahd6nmVYoomCdSMJDWmLua9V9Zc=; b=FQCHcUIBghJGHgOyp3wRzuOMSBcFwhpgiBdKNQONUhjAxTTrUlg/YX3Ekb1e9VyBAsTIpo Zn0tICybKF2iYL1H5ZvKFNPh7016xI3NeRGrs+x5fryLXrSkcjRvaa1GPZJGerIfh0keXH AZPTWJiqa2wpcPq0z4ikNZBuMY3UlbjuUbRc7/RhWPaoB+kcydYH0SI/Ap4oIIb4iY0/Ht /RUUcO/dykMxDqgO3OsCHt4mEtYeZWdj+RkDiA8/d1qmJBxRIIxaJw7D+VvEkvIK3KgngU LKG2ImcOXU5QwHrQ+nIKW7uHZIH8e6ymQyWCqVBXh4iiP3eEJRR3JkZMu6Mkxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a88pk6zC6tQnpJ18ahd6nmVYoomCdSMJDWmLua9V9Zc=; b=yamrrR8m69gQyRHoerk8k8wQPFvh48//I1k877O+KcgRi9V2J3iveXpcNbMjqk/KNAIXZo Z5fLRW5OxLQ6V242VfBIUOktv/smbozxs/Mot2Q/HXUTT64Q4QmNo4MDzb2+garbQifenH 71xkjPonm8YW/iw/MqnKHGYWN45IfsaoToXm8ySkVTkXGbjWncL5WGTXADt2gOrb7p22SH UUFKZziv4p2tVnkfrN5IyHybHG8iLi28Z3/T97cs87vePu+XcA+l+qcZxF/fsZyA6Z2ibG odb5kewx3X2iZdCaAwdejohDXMIfbqn3AUx2K9ZS5Sf6Biwenj3xNZiLDM/1wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976701; a=rsa-sha256; cv=none; b=K0h6B5FRD0HSqyhtNGCNnJ4RAWEJcrIjhH+EAdu9Twpu3k/6XmyY+tCPYS9yjAcQjFEzee XjGmuFFBZlCT2jBIMiEOuC8sYfqBM7qmVsyAEHKKneAcbRT7c4G8p15qBE9k0dWIa8tBRi ARMsMAsPsk1ARNnuOpMsNwurWUMgb41gEc76FurK1HfWIDJvWUZP2keppkU8GpeGrNIk5E 6rSxEb3ovtBnLUrASx9L3MPl7/6ajJhZ2PyZxDV3YiF/7s6+yUpZ41/rZpGhVdrfQmjNWP 2Jdz2w1QkWqL2BQY3ZTzM7vhXysV0eLruV1Hd9ynXFs8nQQDG71M0XXllybMvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mY1SmYz4yD; Mon, 20 Oct 2025 16:11: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 59KGBfQ7036573; Mon, 20 Oct 2025 16:11:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBfGq036570; Mon, 20 Oct 2025 16:11:41 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:41 GMT Message-Id: <202510201611.59KGBfGq036570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c81b5640aabd - stable/14 - realpath: Additional test cases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c81b5640aabd7fb6cd8111c884c3388a21532b42 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c81b5640aabd7fb6cd8111c884c3388a21532b42 commit c81b5640aabd7fb6cd8111c884c3388a21532b42 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:33 +0000 realpath: Additional test cases * Passing NULL should result in EINVAL * Passing an empty path should result in ENOENT * Failure with a non-null buffer should leave a partial result. As pointed out in a comment in the test case, this reveals a discrepancy between the documentation and reality. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53024 (cherry picked from commit f3386dfeb429faaa30a915a4a422a25e07c8bf39) --- lib/libc/tests/gen/realpath2_test.c | 113 ++++++++++++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 12 deletions(-) diff --git a/lib/libc/tests/gen/realpath2_test.c b/lib/libc/tests/gen/realpath2_test.c index f89dd99cbb72..b8f951d9b10f 100644 --- a/lib/libc/tests/gen/realpath2_test.c +++ b/lib/libc/tests/gen/realpath2_test.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2017 Jan Kokemüller * All rights reserved. + * Copyright (c) 2025 Klara, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,6 +26,8 @@ */ #include +#include + #include #include #include @@ -34,6 +37,31 @@ #include +ATF_TC(realpath_null); +ATF_TC_HEAD(realpath_null, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test null input"); +} +ATF_TC_BODY(realpath_null, tc) +{ + ATF_REQUIRE_ERRNO(EINVAL, realpath(NULL, NULL) == NULL); +} + +ATF_TC(realpath_empty); +ATF_TC_HEAD(realpath_empty, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test empty input"); +} +ATF_TC_BODY(realpath_empty, tc) +{ + char resb[PATH_MAX] = ""; + + ATF_REQUIRE_EQ(0, mkdir("foo", 0755)); + ATF_REQUIRE_EQ(0, chdir("foo")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("", resb) == NULL); + ATF_REQUIRE_STREQ("", resb); +} + ATF_TC(realpath_buffer_overflow); ATF_TC_HEAD(realpath_buffer_overflow, tc) { @@ -44,16 +72,11 @@ ATF_TC_HEAD(realpath_buffer_overflow, tc) ATF_TC_BODY(realpath_buffer_overflow, tc) { - char path[MAXPATHLEN] = { 0 }; - char resb[MAXPATHLEN] = { 0 }; - size_t i; + char path[PATH_MAX] = ""; + char resb[PATH_MAX] = ""; - path[0] = 'a'; + memset(path, 'a', sizeof(path) - 1); path[1] = '/'; - for (i = 2; i < sizeof(path) - 1; ++i) { - path[i] = 'a'; - } - ATF_REQUIRE(realpath(path, resb) == NULL); } @@ -66,9 +89,9 @@ ATF_TC_HEAD(realpath_empty_symlink, tc) ATF_TC_BODY(realpath_empty_symlink, tc) { - char path[MAXPATHLEN] = { 0 }; - char slnk[MAXPATHLEN] = { 0 }; - char resb[MAXPATHLEN] = { 0 }; + char path[PATH_MAX] = ""; + char slnk[PATH_MAX] = ""; + char resb[PATH_MAX] = ""; int fd; (void)strlcat(slnk, "empty_symlink", sizeof(slnk)); @@ -89,11 +112,77 @@ ATF_TC_BODY(realpath_empty_symlink, tc) ATF_REQUIRE(unlink(slnk) == 0); } -ATF_TP_ADD_TCS(tp) +ATF_TC(realpath_partial); +ATF_TC_HEAD(realpath_partial, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that failure leaves a partial result"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} + +ATF_TC_BODY(realpath_partial, tc) { + char resb[PATH_MAX] = ""; + size_t len; + + /* scenario 1: missing directory */ + ATF_REQUIRE_EQ(0, mkdir("foo", 0755)); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + + /* scenario 2: dead link 1 */ + ATF_REQUIRE_EQ(0, symlink("nix", "foo/bar")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/nix", resb + len - 8); + + /* scenario 3: missing file */ + ATF_REQUIRE_EQ(0, unlink("foo/bar")); + ATF_REQUIRE_EQ(0, mkdir("foo/bar", 0755)); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 12 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar/baz", resb + len - 12); + + /* scenario 4: dead link 2 */ + ATF_REQUIRE_EQ(0, symlink("nix", "foo/bar/baz")); + ATF_REQUIRE_ERRNO(ENOENT, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 12 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo/bar/nix", resb + len - 12); + + /* scenario 5: unreadable directory */ + ATF_REQUIRE_EQ(0, chmod("foo", 000)); + ATF_REQUIRE_ERRNO(EACCES, realpath("foo/bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 8 && len < sizeof(resb)); + /* + * This is arguably wrong. The problem is not with bar, but with + * foo. However, since foo exists and is a directory and the only + * reliable way to detect whether a directory is readable is to + * attempt to read it, we do not detect the problem until we try + * to access bar. + */ + ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + + /* scenario 6: not a directory */ + ATF_REQUIRE_EQ(0, close(creat("bar", 0644))); + ATF_REQUIRE_ERRNO(ENOTDIR, realpath("bar/baz", resb) == NULL); + len = strnlen(resb, sizeof(resb)); + ATF_REQUIRE(len > 4 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/bar", resb + len - 4); +} +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, realpath_null); + ATF_TP_ADD_TC(tp, realpath_empty); ATF_TP_ADD_TC(tp, realpath_buffer_overflow); ATF_TP_ADD_TC(tp, realpath_empty_symlink); + ATF_TP_ADD_TC(tp, realpath_partial); return atf_no_error(); } From nobody Mon Oct 20 16:11:42 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mZ5bjCz6CgKJ; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mZ2fwyz3VVp; Mon, 20 Oct 2025 16:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/o0qBtyaJRStdQ4+5vnFAVROiypet62IFnKB81L0ky4=; b=AikNYr285FyWEdblwBY6ZQDVdXKZaRqboK+lRArllgAh9TEj9wbIEZt1W3zz9Yf7FYGaGm T1QkCcx431dcL23HR5CxY92vOkAKGUyDea1xY0vJhkpF9ojk2lfVwwjZgobPYgm75d5G// wygghR+X65P9Z3Vxh0ACRTvpN6Z76DiufimWvr68Y4XGvTqjNISThBhH8HJorIjAlBTZx4 Dob/XS0hKa9VP996DiVbOJdDU3g0p1UjJvJx5s3pCzABS+NvpuyuaVra+LG1fHK0/7NL2K O+jHSTyGx35WaV+aPYyHLgvmAO2jgTp+PmJlt5ehEzR33MEUirlq4I1/TOa0Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/o0qBtyaJRStdQ4+5vnFAVROiypet62IFnKB81L0ky4=; b=sdEPq0UL7X19Bho/LOqDN4GCC4SzFzecozwSQPPCgrZFIMOJjpKuS13zK/A/+0RQB2vsme j7Q3VpqTVe8XXjA8NgJg5EVic52wGaYChWsY/Z9Edq3duAK/Wc0N8NQUVwiALjjaizVZrl hAyy7+k+yfTm2Rciy/EQABG7HKvd6Y/lN3zRSfMlaeHWeNOwZzcaKkpn3EpeA4G4R2L1Ld 5yj62zA0tTI1zgUrYt6nnAb99s3dpNEeRJzYrM4KI3wkzEkRnFT3uOcCpwZGxViJ1te+7X AYRDTTEOq5z/wI4ZS2f7+dHv1R3wUGv/g335zLxOugv2bOgpq+pvXH8sfzAT4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976702; a=rsa-sha256; cv=none; b=sPdPXbjlbPwDR28W6am3PbGZS2UzIW7SRRFncFiHhzIdlkuMP7UglGtRH32RFFwzKEdxY5 yPn1/AT6mkEbAk9cgEqFStl+ZTdKdAfaD4de3m94WSlBC0l3N3wQ0jqlW4EUZPoFyBQpOl Mje3QK08nJ2r9j+3nrZiaKqKVzm9RLsElqbolaXQ7JS0hYsKVSLklIeAHX5lYZg3xXmIvH d++D4Bijb5xfmXuH920Er56gy5CrEQ4v9uzZItTz+sDqlI8tN9eYE4wZmRd2Wy9vpYKw7P PyZKbzl0nTAsh6Ehxn/lce+wI/HqRHdFeQTVza5F6GIr82cMxvk/fTzpsE/xMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mZ2Fk4z4sM; Mon, 20 Oct 2025 16:11: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 59KGBgiu036691; Mon, 20 Oct 2025 16:11:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBgxK036683; Mon, 20 Oct 2025 16:11:42 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:42 GMT Message-Id: <202510201611.59KGBgxK036683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: bebae0e23129 - stable/14 - realpath: Report correct path on failure List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bebae0e231290833b04935e4c18e25931e766587 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=bebae0e231290833b04935e4c18e25931e766587 commit bebae0e231290833b04935e4c18e25931e766587 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:34 +0000 realpath: Report correct path on failure If lstat() fails with EACCES or ENOTDIR, the path we need to return in the caller-provided buffer is that of the parent directory (which is either unreadable or not a directory; the latter can only happen in the case of a race) rather than that of the child we attempted to stat. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53025 (cherry picked from commit 1406de21e176d8700240ac9e473df007cd41eec1) --- lib/libc/stdlib/realpath.c | 14 ++++++++++++-- lib/libc/tests/gen/realpath2_test.c | 11 ++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index 64f1dbdf1b7d..f23a3fd8c58e 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -56,7 +56,7 @@ realpath1(const char *path, char *resolved) { struct stat sb; char *p, *q; - size_t left_len, resolved_len, next_token_len; + size_t left_len, prev_len, resolved_len, next_token_len; unsigned symlinks; ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; @@ -105,6 +105,7 @@ realpath1(const char *path, char *resolved) left_len = 0; } + prev_len = resolved_len; if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { errno = ENAMETOOLONG; @@ -140,8 +141,17 @@ realpath1(const char *path, char *resolved) errno = ENAMETOOLONG; return (NULL); } - if (lstat(resolved, &sb) != 0) + if (lstat(resolved, &sb) != 0) { + /* + * EACCES means the parent directory is not + * readable, while ENOTDIR means the parent + * directory is not a directory. Rewind the path + * to correctly indicate where the error lies. + */ + if (errno == EACCES || errno == ENOTDIR) + resolved[prev_len] = '\0'; return (NULL); + } if (S_ISLNK(sb.st_mode)) { if (symlinks++ > MAXSYMLINKS) { errno = ELOOP; diff --git a/lib/libc/tests/gen/realpath2_test.c b/lib/libc/tests/gen/realpath2_test.c index b8f951d9b10f..431df8721ae0 100644 --- a/lib/libc/tests/gen/realpath2_test.c +++ b/lib/libc/tests/gen/realpath2_test.c @@ -158,15 +158,8 @@ ATF_TC_BODY(realpath_partial, tc) ATF_REQUIRE_EQ(0, chmod("foo", 000)); ATF_REQUIRE_ERRNO(EACCES, realpath("foo/bar/baz", resb) == NULL); len = strnlen(resb, sizeof(resb)); - ATF_REQUIRE(len > 8 && len < sizeof(resb)); - /* - * This is arguably wrong. The problem is not with bar, but with - * foo. However, since foo exists and is a directory and the only - * reliable way to detect whether a directory is readable is to - * attempt to read it, we do not detect the problem until we try - * to access bar. - */ - ATF_REQUIRE_STREQ("/foo/bar", resb + len - 8); + ATF_REQUIRE(len > 4 && len < sizeof(resb)); + ATF_REQUIRE_STREQ("/foo", resb + len - 4); /* scenario 6: not a directory */ ATF_REQUIRE_EQ(0, close(creat("bar", 0644))); From nobody Mon Oct 20 16:11:43 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mb5kXkz6CgST; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mb3Nyxz3VW5; Mon, 20 Oct 2025 16:11:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CkP+cNML8J7rkDzoiObM6r2KeYbAu0pxjdR6YkVFWPk=; b=pKIAk6OpVg9Xu8sTAx0WGLWGYu51ryjK1m/AL/dCq3w0FQcTYWol1W6P0rBK1/dyI/uZF/ 1dvpRIn1DPWyLjOWXSH7MtZDXb0MdvfcrHUCMvxDuTuP8Q1FCcIoW5WkXm21yf6WD1D+Sp Vlvj8jL2LeO/+PeyVuDvs7hYOb7STWMZ9mcdWBzXegAOPgxVJwh3xep1WhJMfRoDNsJe3T jkg/jmCk2xGXzVxMu94Qs3BhkVim4LZMZWflq0s+/UDxKCPt8QAy52cugQP9PiSf/EPUt4 JbLQAysqM1vjT9hkDLVeM5bsC8WwdmI6ipEi3v3SyZslSp59BD78GBk8MmFY5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CkP+cNML8J7rkDzoiObM6r2KeYbAu0pxjdR6YkVFWPk=; b=Uid58w/2Wu6MpXlaK1nIIeJLZNSkhWNx4blbiHyPrnC67Xpb91Pyqy8cI8UX3vfN8xAV3/ n14e8Q9SU8cijB0WZ56H3Lkr7Cyc+L0W6O0WTBPgIVhzZkx+Vox0ez87FYQzh3zNkrZfG2 GHsSloO+Hs0tuBe4a2lfIiLPHhb49eq3kb+qNnj4VRMl6USzzM6oro5cvOYmvdfeKzIU/d QrQiB6tYXKSu9cB0ynmPI065GB4EgWF/ME1iycZ4NZZSxRBBhdBmCRLtsQ5xbGG8sGTfZW ms2VuaKDB26Bwh6OcuBcFhMfY2lJdmxXAWkj8/yi4PaueJXCDiYI+9RpsGfwww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976703; a=rsa-sha256; cv=none; b=u5NnfmOqSj2CjzjCAY24830GLolAAFbb86zp4F5CqrAzc6HKOyyiYZxa0Ra8T1ImhYKJku u1S7Q0g9QugYANcvQOXWYpSMdnLM+STwYLfhRcL6BvSWEwzau/1MRDsfRuIBHqOFHQ+jr/ 5IloVMTp3rDPcd70WKvxml82dqjDDtyHGvqbTFhBPTzhxVW7TsXC+RRqvTafzMHSGxo65o lZ0wVg5igF4Tk7V1QYHM0Bdg9ttnGh1Ya4kRrHplI50U0aKW4oX0jMc6JmaLLJmr7+ZcpG PH4yhNboCcLcqxyBBzD67CtTaYGQD5snAhu/aX4c5Yp3numuwnXLx7bVPUCWFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mb2xrVz4ct; Mon, 20 Oct 2025 16:11: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 59KGBhas038152; Mon, 20 Oct 2025 16:11:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBhYI038138; Mon, 20 Oct 2025 16:11:43 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:43 GMT Message-Id: <202510201611.59KGBhYI038138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 4ab2e9d4feec - stable/14 - realpath: Belatedly document POSIX conformance List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ab2e9d4feec969a634f26924822da94efabab7c Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4ab2e9d4feec969a634f26924822da94efabab7c commit 4ab2e9d4feec969a634f26924822da94efabab7c Author: Dag-Erling Smørgrav AuthorDate: 2025-10-13 11:53:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:34 +0000 realpath: Belatedly document POSIX conformance We've been mostly POSIX-conforming since r236400 and fully since r240410, which fixed a corner case where a missing non-leaf directory would be reported as ENOTDIR instead of ENOENT. Sponsored by: Klara, Inc. Fixes: 7877ed7ce33e ("Avoid mapping ENOENT to ENOTDIR for non-existent path components.") Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D53027 (cherry picked from commit 7c66667d45e95af59f59e41ef169119a974a6be1) --- lib/libc/stdlib/realpath.3 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/stdlib/realpath.3 b/lib/libc/stdlib/realpath.3 index ec35518d8986..28381b00bbc7 100644 --- a/lib/libc/stdlib/realpath.3 +++ b/lib/libc/stdlib/realpath.3 @@ -30,7 +30,7 @@ .\" .\" @(#)realpath.3 8.2 (Berkeley) 2/16/94 .\" -.Dd May 11, 2012 +.Dd October 10, 2025 .Dt REALPATH 3 .Os .Sh NAME @@ -110,11 +110,11 @@ and .Xr getcwd 3 . .Sh SEE ALSO .Xr getcwd 3 -.\" .Sh STANDARDS -.\" The -.\" .Fn realpath -.\" function conforms to -.\" .St -p1003.1-2001 . +.Sh STANDARDS +The +.Fn realpath +function conforms to +.St -p1003.1-2001 . .Sh HISTORY The .Fn realpath From nobody Mon Oct 20 16:11:44 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0md1b6Sz6CgSY; Mon, 20 Oct 2025 16:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mc3stHz3VWZ; Mon, 20 Oct 2025 16:11:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tU0/wSWSspPnu3cLI303SvXvStFXflgealSF/zVCAFY=; b=MsgQL1eXDccpeDCvoWOF1cG31iDU6UwZbfpFcFqS2AjTxdEuY26CzOz1VpeAw4dHm5FHgg 0kst9lQiMYdscDdGzcIq9PlANd1+mgx5XzrLs7z7idDqEWT5BlRIPC5tfTmrIRz0MTzQ3/ V9LW3q5HcYvTlm+tEtjK/KnHM7qeKQz7/QHEiVH8iNCRceeMrxmkLBkzr6v8uscQY/bbpv Pjsiat7WKqC19iv157DUwX0eU6YbGY18DCYh0J5Fo45kqsUyBuhdORG+oUqU7U+htVvTQF VxfxYvBhDeQsZws1yJgU8NDvApQPTQPBxj9zfz/wQPvWLL5OvXssACjl36RbZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tU0/wSWSspPnu3cLI303SvXvStFXflgealSF/zVCAFY=; b=GeArjq3rg6im7ZB+Q8Xrx+nGRWcvEo8PT4VndY3uewZKvGuOtrvedNe4RAG1TFL/3orU3U 4tHhAnAzQV66iRvU8m447jA+ZbvmO1fc4XGJEl6y6g0uAcCi+/kLmp3Kcj8p7pHMwFEox/ gyROK6dniYrU+TP2TvVTb99tpDL8YxMQMyr9ueo4SSv8fWdWIsmMfHt17n4WCzIt+M0SBc DyMMlCO586Mk6Rufm+3GafnNbrneRcDr0bxMivj4qzp6UiS42OcpU5NZDxx7rsWMsb5q/h /Gtb4eDEkOGsEkT+Xr69oltPquo33wSUwyvTNQy0WChktEfMv9wM/9bdQVrKWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976704; a=rsa-sha256; cv=none; b=PglBhFrgmaljNs2YHfnJSRY1h+uzX/ZovpBVkpUEWNPzT/7ciTW2yEWOroakr12jfkzB3L tnC2NEa45/kutWxueUiRKDWkbysuygxfl8umLSUtgcq2aJBWYPsJa2+0OBzRkyXoiXjaA3 b10shbOovp+7y8OTkrPCUyFldL06UAgAQw4fGNjJdmgx8mbuu7j7J86AHmVFWzkwgtxJWs ozliStmzd847n4dpScSxXCBmZUOC+fHhWXqKrNv6WIa2rkm0EXrGM8zzy3RnXxf7Nx04O2 uJpfdFDCjWV8OjPQt26Q0wBVj6LCsIVo3g5UAhdKlNuJkUhzSjHh3B/KWcW+UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mc3Ldcz4Zb; Mon, 20 Oct 2025 16:11: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 59KGBilb039375; Mon, 20 Oct 2025 16:11:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBiDt039368; Mon, 20 Oct 2025 16:11:44 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:44 GMT Message-Id: <202510201611.59KGBiDt039368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: edeff9b3f5ef - stable/14 - quot: Fix benign buffer overflow List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: edeff9b3f5ef5a7e926c1cda87d3da6c40e80ab6 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=edeff9b3f5ef5a7e926c1cda87d3da6c40e80ab6 commit edeff9b3f5ef5a7e926c1cda87d3da6c40e80ab6 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:54:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:34 +0000 quot: Fix benign buffer overflow If it encounters an inode whose owner does not have a pw entry, quot allocates a 7-byte buffer (8 in practice, since that is the minimum allocation size) and uses it to store the numeric uid preceded by a hash character. This will overflow the allocated buffer if the UID exceeds 6 decimal digits. Avoid this by using asprintf() instead. While here, simplify the common case as well using strdup(). Reported by: Igor Gabriel Sousa e Souza MFC after: 3 days Reviewed by: obiwac, emaste Differential Revision: https://reviews.freebsd.org/D53129 (cherry picked from commit 5854d1cbab1073d78519e7ad9a6eb5726341d587) --- usr.sbin/quot/quot.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 27f0c1ee0068..7a7362dea996 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -281,14 +281,10 @@ user(uid_t uid) usr--) { if (!usr->name) { usr->uid = uid; - if (!(pwd = getpwuid(uid))) { - if ((usr->name = (char *)malloc(7))) - sprintf(usr->name,"#%d",uid); + asprintf(&usr->name, "#%u", uid); } else { - if ((usr->name = (char *) - malloc(strlen(pwd->pw_name) + 1))) - strcpy(usr->name,pwd->pw_name); + usr->name = strdup(pwd->pw_name); } if (!usr->name) errx(1, "allocate users"); From nobody Mon Oct 20 16:11:57 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr0mt3XQ8z6CgnV; Mon, 20 Oct 2025 16:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr0mt0gRCz3VtK; Mon, 20 Oct 2025 16:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wB6+Fu7LnbS+PPmpBjXFLjRQQAQppjWbbadywAky+w=; b=COa7S5Blz9pJq9byqmwWF0K6vxyFicWm4XwlOQ4BKmzi3Y1m4yOqjDe1fYebOgra3v3Iyo nlVAgo/8gXtfV0bVUfmUfO0ehw3MFpMZNh/P7a6ZPXylYRQqio/+N1FQtbn6AglMF+3Pi1 GWWZ/t3bp0sbNJcWdNf9tMLRY2PU+BkXZOS1ZAFLpLp6XuLfUAtpGOM05dUtI4sZtolIzl +U44wqivQl9nduA2fR/sWHW9ZBhy1Se0AgVAlVZNSIz3sAquBuQ9WTzUeyHpA8kQCO48Qm fcJA2tXrgGtJyFc9NffAo/nLsShc9H+GSgOVpRS0WogQuT2l1FOxM4eU9XBmtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760976718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wB6+Fu7LnbS+PPmpBjXFLjRQQAQppjWbbadywAky+w=; b=B42qWAthlGVkUtlt/UFJ6U/WpthSselS/C+BljT/alHhN/2e1f7sjWj9hgyW1z+V1sdJNz UbxS7WcRu6qnOkUi5He+608uZtXAKyIgNuLewvV4V19XQDZ2VdHHOuzuncftVD9cBrTTt/ IWPZyTuJSh7RNXDJTuavGc3yRYNwbkrhNQBoruuFBH3gkx3a9F3bk4pZPLA/zKOPf/gW3n 2LE3eFBa1k3hVHfClV3luzqwV8hMxxHqdVzKOigkSzhzJ/ZPyZH1WiEp67RKsUBzvb5GNS zoyocf2aKCL6O8xruuo0RmsE8i9MZ71UPPoDA7E5tnsmcDuFlShQu+23EakFpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760976718; a=rsa-sha256; cv=none; b=NegnjVhGRXKuQ7e0pIUwWbaqHtzkILSNp7LVGME8NrVoue529ZgRYw5c6XX4YI6ThJHAua 4s4tl9l6UY59eaaDLtCYDSjqc9i2M3pdki7cI7UqDJh4RSF/tvNEfDfR7dkKwQ5ytPesWf SYBORaO+UHNi8++oYzbsARKmOlb7gd0qn9hpwr0/TAlWyNJ5zFmABGQ49E0IDWTxCo4OMQ 6Q1pWQDO/keRgKDOjrniUY1WYkM8gCRMFDqwirzUcr+Q9JCA5mFbzAGd0X4dHWloA+R84X 2VlKXFmrEzMTNjFtWw4nyL8ffmkAvQSXiluuVdqiir0RAYl1ScKK/GKdriglwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr0mt0DBLz4Jp; Mon, 20 Oct 2025 16:11: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 59KGBv7k041597; Mon, 20 Oct 2025 16:11:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGBvPj041594; Mon, 20 Oct 2025 16:11:57 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:11:57 GMT Message-Id: <202510201611.59KGBvPj041594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: bbf986d0f140 - stable/13 - quot: Fix benign buffer overflow List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bbf986d0f140d847b9e0c808bf6006b62e85e78e Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=bbf986d0f140d847b9e0c808bf6006b62e85e78e commit bbf986d0f140d847b9e0c808bf6006b62e85e78e Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:54:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 16:11:48 +0000 quot: Fix benign buffer overflow If it encounters an inode whose owner does not have a pw entry, quot allocates a 7-byte buffer (8 in practice, since that is the minimum allocation size) and uses it to store the numeric uid preceded by a hash character. This will overflow the allocated buffer if the UID exceeds 6 decimal digits. Avoid this by using asprintf() instead. While here, simplify the common case as well using strdup(). Reported by: Igor Gabriel Sousa e Souza MFC after: 3 days Reviewed by: obiwac, emaste Differential Revision: https://reviews.freebsd.org/D53129 (cherry picked from commit 5854d1cbab1073d78519e7ad9a6eb5726341d587) --- usr.sbin/quot/quot.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 037db7ba3f55..7042acf07bc4 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -281,14 +281,10 @@ user(uid_t uid) usr--) { if (!usr->name) { usr->uid = uid; - if (!(pwd = getpwuid(uid))) { - if ((usr->name = (char *)malloc(7))) - sprintf(usr->name,"#%d",uid); + asprintf(&usr->name, "#%u", uid); } else { - if ((usr->name = (char *) - malloc(strlen(pwd->pw_name) + 1))) - strcpy(usr->name,pwd->pw_name); + usr->name = strdup(pwd->pw_name); } if (!usr->name) errx(1, "allocate users"); From nobody Mon Oct 20 16:47:18 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr1Yf5Hblz6CkTh; Mon, 20 Oct 2025 16:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr1Yf4pNCz3fS6; Mon, 20 Oct 2025 16:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760978838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nz804yH+db5wi/bd+tOHl3B2tAsj22NzMHgzfQGnHM8=; b=bbVEeHg0eS1UPYVbNQFeKQz8jdC0e8Fns/Difq1UM1mP01hsl4YF5tZN1D8WKoObhnQuaI vXiKGaqIGLQWdSW4twSM3J+fyaF0yvmrAZvfR8Lrh7ZkqytLiSQ6aXn2YmvpCxzhEvyS43 ZLepc/rzTSk2ODWx1Is5fhYGMuzwYlWnBEvpP5o6cgUVxSmYgjVJtOuTIqyalvzL0vdLzT joswvpAZxvV/2q+Pgy7mZghLwqBD7HTFcolR0XRZibBxKQC4pGstFWKp7ghZ6BzcND0inm /A1RAeS+QnCUQI3COSIZDlIEhm00vSqIPTAvtOt8z+uzx7a313cv73NR/5IRWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760978838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nz804yH+db5wi/bd+tOHl3B2tAsj22NzMHgzfQGnHM8=; b=ofrd0HaLEaF4fGSAX//1RbjKyMYCXxrR4L6ULYgj4xG2uKf6UIaTwTeIvLJk9ma2hDSzS/ /UJGc4/S15tQuzPUmPRQRtROLqOJiA/KEoZQAFFi/NQFf0eMUVl7PQmMHF4K/H9Y+mDFJw MvB7B7BrompiFuBA1CgmRcxgzMWm4WZR+zcgJqtTEzT9HcRRjK/aCgHMoIKW27Kttke+iH fJGm5zGJP3P0V3eaJ/RQbVtzRe6YfCzJvUEbqV8cxgSuRmHSaiAJrGXFouf3KjaYjjODoy cpUso7pdlN38znvyx8EWHuRcwpGqIY7H31pKRk0PyDORKBuNmhTbMWD0EHq8gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760978838; a=rsa-sha256; cv=none; b=OOkKOMm08SKOOzVbBUHIhTTOw2bg7tHwJd/UIj5AxRa/+Z8zru/GHq0blUHGKc0vBGfbPC UDPYItzgSsCeUe02Oe0MdybX6gvbsUkEyJkZxH6pMNNXnlWvfzkBs4P1oLqQ8hQKLYP3fs HXcCZK30TNosvB4l+kF5ZtzKGHWF0kEQt5SjOthHYZ4YtgQOlKv8BH1XCWFArzxfrbCeJP wuqfMBtI7mWeaJpdiO7+JJd9fxGg7MUAa3PmXOey2Gn9uNQdaaKiZZIC9g9+PbqEzAqXsq jSqHFyQwvXtzPPw3jziLnYL3YIC5QbiIfAbsWlcqZi7GIuJA0Sl6NbLbyEo+1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr1Yf4KRpz65R; Mon, 20 Oct 2025 16:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59KGlI6a099669; Mon, 20 Oct 2025 16:47:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGlIZj099666; Mon, 20 Oct 2025 16:47:18 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:47:18 GMT Message-Id: <202510201647.59KGlIZj099666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3e138efaf4ba - stable/15 - linprocfs: Add nodes for inotify List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3e138efaf4baa7517ac00b85ee6c1711c290d7c3 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3e138efaf4baa7517ac00b85ee6c1711c290d7c3 commit 3e138efaf4baa7517ac00b85ee6c1711c290d7c3 Author: Mark Johnston AuthorDate: 2025-10-17 12:55:56 +0000 Commit: Mark Johnston CommitDate: 2025-10-20 16:45:37 +0000 linprocfs: Add nodes for inotify These map directly onto sysctls under vfs.inotify of the same name. Reviewed by: olce, des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53142 (cherry picked from commit 28c0ef76841bbb322b6e39668e1c8e997c1f8000) --- sys/compat/linprocfs/linprocfs.c | 77 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 5 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 95b212be1306..7ac48786c77b 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2216,6 +2216,67 @@ linprocfs_dosysvipc_shm(PFS_FILL_ARGS) return (0); } +static int +linprocfs_doinotify(const char *sysctl, PFS_FILL_ARGS) +{ + size_t size; + int error, val; + + if (uio->uio_rw == UIO_READ) { + size = sizeof(val); + error = kernel_sysctlbyname(curthread, + __DECONST(void *, sysctl), &val, &size, NULL, 0, 0, 0); + if (error == 0) + sbuf_printf(sb, "%d\n", val); + } else { + char *endp, *newval; + long vall; + + sbuf_trim(sb); + sbuf_finish(sb); + newval = sbuf_data(sb); + vall = strtol(newval, &endp, 10); + if (vall < 0 || vall > INT_MAX || endp == newval || + *endp != '\0') + return (EINVAL); + val = (int)vall; + error = kernel_sysctlbyname(curthread, + __DECONST(void *, sysctl), NULL, NULL, + &val, sizeof(val), 0, 0); + } + return (error); +} + +/* + * Filler function for proc/sys/fs/inotify/max_queued_events + */ +static int +linprocfs_doinotify_max_queued_events(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_queued_events", + PFS_FILL_ARGNAMES)); +} + +/* + * Filler function for proc/sys/fs/inotify/max_user_instances + */ +static int +linprocfs_doinotify_max_user_instances(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_user_instances", + PFS_FILL_ARGNAMES)); +} + +/* + * Filler function for proc/sys/fs/inotify/max_user_watches + */ +static int +linprocfs_doinotify_max_user_watches(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_user_watches", + PFS_FILL_ARGNAMES)); +} + /* * Filler function for proc/sys/fs/mqueue/msg_default */ @@ -2313,9 +2374,7 @@ linprocfs_domqueue_queues_max(PFS_FILL_ARGS) static int linprocfs_init(PFS_INIT_ARGS) { - struct pfs_node *root; - struct pfs_node *dir; - struct pfs_node *sys; + struct pfs_node *dir, *fs, *root, *sys; root = pi->pi_root; @@ -2466,10 +2525,18 @@ linprocfs_init(PFS_INIT_ARGS) NULL, PFS_RD); /* /proc/sys/fs/... */ - pfs_create_dir(sys, &dir, "fs", NULL, NULL, NULL, 0); + pfs_create_dir(sys, &fs, "fs", NULL, NULL, NULL, 0); + + pfs_create_dir(fs, &dir, "inotify", NULL, NULL, NULL, 0); + pfs_create_file(dir, NULL, "max_queued_events", + &linprocfs_doinotify_max_queued_events, NULL, NULL, NULL, PFS_RDWR); + pfs_create_file(dir, NULL, "max_user_instances", + &linprocfs_doinotify_max_user_instances, NULL, NULL, NULL, PFS_RDWR); + pfs_create_file(dir, NULL, "max_user_watches", + &linprocfs_doinotify_max_user_watches, NULL, NULL, NULL, PFS_RDWR); /* /proc/sys/fs/mqueue/... */ - pfs_create_dir(dir, &dir, "mqueue", NULL, NULL, NULL, 0); + pfs_create_dir(fs, &dir, "mqueue", NULL, NULL, NULL, 0); pfs_create_file(dir, NULL, "msg_default", &linprocfs_domqueue_msg_default, NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, NULL, "msgsize_default", From nobody Mon Oct 20 16:47:19 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr1Yg6cHYz6CkgL; Mon, 20 Oct 2025 16:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr1Yg5ynWz3fMK; Mon, 20 Oct 2025 16:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760978839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gkgiqMalMIQDQ0+lZbF/mw38nR9vyaKSLyRIGPBKCdI=; b=dy8f/WBqZBrTeExLttFeWj0diY9AkEGMAJaIWOPOTWkAdx2/U1cmq/9CAPJaB/xbpCZ+a7 Lx18ZFDsU6lCI6ISQkYNcYqYw6wtrMr409RbDQrh4FqVxGa7Gk39qUS44NhzK0mxLaSqyI TRho2kW7zOMOyIyod80y9dGuBrsYznj3ZHPqWDzuZMfez2hhg19bbB8fEptaIbShgQiWzQ b5ZSx+83mEhkLB024SAaKi3AaG9UB9gejAMBmbebUWG7Q3+kYWgo2w4oSQZ7phXJHqlkQp zNy2cIOtNe92uNiXVOA4IRibt3h+CRnEaONwL0la+jenrQCLav+qc3rX/WFJag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760978839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gkgiqMalMIQDQ0+lZbF/mw38nR9vyaKSLyRIGPBKCdI=; b=XECZEszMCBENoWPdivgyUdshQLkNwWQdO4/vK0PZ0g/6kK87n10+BeqLVzLm/n7+hzpDkd LQ9gnneJUaDlQaOSmnTX8UoHc+AX0PWtBoTfQgnCJeisQY1gArMH+OxLfKJ5Ee/Kuv4GCs 5ukQIMbBmtb7Nw8ju/NO48NzFEbdrepKO5VAS0Cy6QGNyQ55tp8ve7ApYRsZ6dGKwPpPRq 45etY/4c090W4yY/liIwcYFDri2QEA9/Nv517QJKhz+RdwyagU7sT9572k8WulPWhx+IGe +d+9nf8gCELAEWrWtws9XXnkdAmJq7KJpo97lywmzUZWMbwZtHjdJrgTuW2sgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760978839; a=rsa-sha256; cv=none; b=bLQfOiMOnfn3aUCuQoF7Z1hvlRBi4QyJh5LikKbrZWYabX4tsbASJLQ3MyHliP9m3vBtpq IdcweWV5HD3orOQmBoPEXeZZWk+YSLPk6NZrytSr2wAsraadRtMb5xEO0LbUAwI5v3DChu VhiBUZQOCFZpYhiPW72M6vZHAB/P8qpgn7Rgw+uaNZ/bSWHkidt10jN0TbuvLWVEfZomol 0fR5JGhEZqq96aE19OQ8bflnmo/gr1okrhJ1aYt2PJY+7//o+qAcYg7MJOkYVuyqcP3XhW 2pviYhtV+5Tgm+5zGMM3NwN265HzhgoNXcxtK6NTJuoe+IXDorCk5GGJxXtACQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr1Yg5XWrz5pY; Mon, 20 Oct 2025 16:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59KGlJTm099705; Mon, 20 Oct 2025 16:47:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KGlJEF099702; Mon, 20 Oct 2025 16:47:19 GMT (envelope-from git) Date: Mon, 20 Oct 2025 16:47:19 GMT Message-Id: <202510201647.59KGlJEF099702@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 511311e4f7a6 - stable/15 - vm: Fix iterator usage in vm_thread_stack_create() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 511311e4f7a6220234bc5bced1e8e0fae96d02a6 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=511311e4f7a6220234bc5bced1e8e0fae96d02a6 commit 511311e4f7a6220234bc5bced1e8e0fae96d02a6 Author: Mark Johnston AuthorDate: 2025-10-16 23:12:54 +0000 Commit: Mark Johnston CommitDate: 2025-10-20 16:46:02 +0000 vm: Fix iterator usage in vm_thread_stack_create() After commit 7a79d0669761 we no longer hold the VM object lock when initializing or advancing the domainset iterator in vm_thread_stack_create(). We could lift the lock out of vm_thread_stack_back() but that poses complications since we cannot allocate KVA with a VM object lock held. Instead of overridding the object's iterator, just borrow that of the current thread. Kernel stacks are basically always allocated with a DOMAINSET_POLICY_PREFER policy, so it's not very important to maintain a global iterator for round-robin allocation. As a part of this, fix up flag handling: make sure we handle M_NOWAIT/M_WAITOK from the caller. Delete a comment in vm_thread_new() which refers to a non-existent consideration (stack swapping has been removed). I suspect vm_thread_new() can use M_WAITOK but opted not to make that change here. Reported by: olce Reviewed by: olce, alc, kib Fixes: 7a79d0669761 ("vm: improve kstack_object pindex calculation to avoid pindex holes") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52982 (cherry picked from commit 3b9b64457676561b8de2bec7c94c561bbd807b0c) --- sys/vm/vm_glue.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index e0f1807a1b32..18d789c59281 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -441,19 +441,16 @@ vm_thread_kstack_arena_release(void *arena, vmem_addr_t addr, vmem_size_t size) * Create the kernel stack for a new thread. */ static vm_offset_t -vm_thread_stack_create(struct domainset *ds, int pages) +vm_thread_stack_create(struct domainset *ds, int pages, int flags) { vm_page_t ma[KSTACK_MAX_PAGES]; struct vm_domainset_iter di; - int req = VM_ALLOC_NORMAL; - vm_object_t obj; + int req; vm_offset_t ks; int domain, i; - obj = vm_thread_kstack_size_to_obj(pages); - if (vm_ndomains > 1) - obj->domain.dr_policy = ds; - vm_domainset_iter_page_init(&di, obj, 0, &domain, &req); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); + req = malloc2vm_flags(flags); do { /* * Get a kernel virtual address for this thread's kstack. @@ -480,7 +477,7 @@ vm_thread_stack_create(struct domainset *ds, int pages) vm_page_valid(ma[i]); pmap_qenter(ks, ma, pages); return (ks); - } while (vm_domainset_iter_page(&di, obj, &domain, NULL) == 0); + } while (vm_domainset_iter_policy(&di, &domain) == 0); return (0); } @@ -532,15 +529,9 @@ vm_thread_new(struct thread *td, int pages) ks = 0; if (pages == kstack_pages && kstack_cache != NULL) ks = (vm_offset_t)uma_zalloc(kstack_cache, M_NOWAIT); - - /* - * Ensure that kstack objects can draw pages from any memory - * domain. Otherwise a local memory shortage can block a process - * swap-in. - */ if (ks == 0) ks = vm_thread_stack_create(DOMAINSET_PREF(PCPU_GET(domain)), - pages); + pages, M_NOWAIT); if (ks == 0) return (0); @@ -660,7 +651,8 @@ kstack_import(void *arg, void **store, int cnt, int domain, int flags) ds = DOMAINSET_PREF(domain); for (i = 0; i < cnt; i++) { - store[i] = (void *)vm_thread_stack_create(ds, kstack_pages); + store[i] = (void *)vm_thread_stack_create(ds, kstack_pages, + flags); if (store[i] == NULL) break; } From nobody Mon Oct 20 17:12:38 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr26t6xydz6CmM0; Mon, 20 Oct 2025 17:12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr26t66qXz3lvT; Mon, 20 Oct 2025 17:12:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760980358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCUha8fvG+41/k9n3FL9lRAneH1HCM2gseT0B+s+G6w=; b=IsArZp08VMULMOAgHdDbATtL7aMHVQL9lCPFCTalg88DphK/64+VFiHOdSdMA4g2Q6aLX4 xt+6pz1Ixz36kkne+VApCnyZl2ug5zOtyAJ66LlY5ZtAy14i+os9iuN7kK9AN88x8tvGkN QJLaY8nIyV4pwwjXvZE7/gioxpNUcefWFGx9KQpQS8KF6ykW4C0zgqc6syBg40xFtQyXnP Buds9QE3NYPXP32/uOa7ploJghBgL8mPvLboSst08Ya8s2AYkQFxNO1fEywuR8J5UjOni6 BIEydGf9sYPzuj3eLQCaU20prDySsT/85CXKbL4DEASRNKM8T+OVuFgF94Vr5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760980358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCUha8fvG+41/k9n3FL9lRAneH1HCM2gseT0B+s+G6w=; b=mYqV+nkYdzb5d69Xjr5KIi8crx6N8LXysQ7mJ4ZLz/764ZLuV5NVbEFFpI4WiF+Uno/e8Z 2/8jG0t/DQZT3jr+N57+Ftp+bvJNVAEMTc+9EwuW/4eMm3G3wsjtWiGvwmDhcTQMDivvb0 2VKvhlitdWblHA5OquuDnhVP5MqbC+JJo6ZWx+RFqjJGP4Nt5vSdQ1D6JYL2vkz9fPxS44 +4SGdmDKbYJBoZlIyd9tdkUaZvPlam/6srkZKnVYPUnH8++5xIJP3dfhVdLwIgYOlOD5TA +VHoJo+81Bb4aOZ2wd9Lxr83ZlauAJ9oOcn8DwdCXpnn8uFHfgKHkgwi41JUdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760980358; a=rsa-sha256; cv=none; b=l0fBZlqFRgXF6OoIMDEgeBncW1VW/JkAiwnFiOqcteS/iyXAqpfucL5H3R+G2l1Pmd3fL1 AHvNkIn7Ca9NPTbUJ+RthPslgW7WnpaeAvTR+7FtgzLOQWwFjdQ5EPCjc8qhdmihaGLwZ9 YfI1k7szlXejAN4HeMLrHj7XTBawmhMMS0ViXKcL37OcHH+4sZ/KugADVA0R+IyHniPRYg YAxjd3JSTAhYw8AWnp6Vdt7tGTMu0y+KS4utFC56X4ZcC9gRLtzfTxWNshAQrSGZRaTBnl kHKfi5ETJvDSUkGCXUEV9aTEeqfOKCAlxVRqtoRW/g3GFmWGtrgIkWw2bgC8Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr26t5hYHz6fw; Mon, 20 Oct 2025 17:12: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 59KHCckC056011; Mon, 20 Oct 2025 17:12:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KHCc9K056008; Mon, 20 Oct 2025 17:12:38 GMT (envelope-from git) Date: Mon, 20 Oct 2025 17:12:38 GMT Message-Id: <202510201712.59KHCc9K056008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a1b0fae4182c - stable/14 - libc: Avoid installing timezone.3 multiple times List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a1b0fae4182c3455ee24a5f3dcfc1a69553f2c93 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a1b0fae4182c3455ee24a5f3dcfc1a69553f2c93 commit a1b0fae4182c3455ee24a5f3dcfc1a69553f2c93 Author: Ed Maste AuthorDate: 2025-10-20 16:16:21 +0000 Commit: Ed Maste CommitDate: 2025-10-20 17:10:44 +0000 libc: Avoid installing timezone.3 multiple times Commit a34940a9756a ("timezone: Move to the XSI/POSIX definition for timezone") was not merged to stable/14. The MFC of 29810aa6ae70 ("libc: Move tzset.3 to stdtime") didn't take this into account and ended up installing two different versions of timezone.3 over top of each other. This is a direcct commit to stable/14 as the issue is not present in main. If a34940a9756a gets merged in the future the reverted part of 29810aa6ae70 will need to be reapplied. Fixes: 29810aa6ae70 ("libc: Move tzset.3 to stdtime") Sponsored by: The FreeBSD Foundation --- lib/libc/stdtime/Makefile.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libc/stdtime/Makefile.inc b/lib/libc/stdtime/Makefile.inc index 842166201fd1..1c5880797f43 100644 --- a/lib/libc/stdtime/Makefile.inc +++ b/lib/libc/stdtime/Makefile.inc @@ -31,5 +31,4 @@ MLINKS+=strftime.3 strftime_l.3 MLINKS+=strptime.3 strptime_l.3 MLINKS+=time2posix.3 posix2time.3 MLINKS+=tzset.3 daylight.3 \ - tzset.3 timezone.3 \ tzset.3 tzname.3 From nobody Mon Oct 20 17:48:23 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr2w82VG3z6CqjZ; Mon, 20 Oct 2025 17:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr2w81Zclz3ty3; Mon, 20 Oct 2025 17:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760982504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MMVXWPTeBLV1WqVm7dWZSHNKuj0Y+4yiFq8Td+IXANw=; b=QpPUe1QAaKHlXcZeVUA4oKea3hUDYNo5sXCZ98z0uj1bv7cc+ayCCD1Ii5ZQsYUQvqoPsk 9l9HsrCgODANn0ILApnZgQsDH5OG5AI2tTqzt6qQdoGUAmalbr8cjB4U4gfAFN9BlSDh1a kL2zM+owKeR7Rj0fSB7eZCSO5H/R3aX15LhstpUC6waOWJjXfbtfq+TSW8qxK7vvp7HvVY lVZONKFfd/eA6sZIOIlmpI+TItCj99dAltdgC4rCuoS8ErHf1jRPYGDm4H4dwXETkbwlhx 5491v9osmcN0mq7nTfd2s3aoYiL3MxpEivw1H4E7tiR32VdYO3njl9p+VKphLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760982504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MMVXWPTeBLV1WqVm7dWZSHNKuj0Y+4yiFq8Td+IXANw=; b=tfBzSX57X2M+06yru3fhnZoCcASQDEs506fG1WOA0GYA/GfyHiA6lvLN5XP5sNN3JKwtnl R7oU8UIyXCQ8WpacibJlQ2FYlAshaiCMpMWka3d2j3ZY4d8y0zdBb83woUhBR8pht9KiPP MKU98etU6qTsWDHxfRUX8pIVqYgx3l6/eOhoYUZML3piMOao9kZV+BoPPXzlbbdUSfiZ/a Lh+CT6J3Xc9C6Heqq2vcusI62OP5fgaF3OC8qxjFFNmFrnH1fit/eFlYW7zmfDfZR5KoFD mBcfKqzGXSucRFDCOewRuVbyEyR3Uet7bTmfdJQsRO4eWU1+9SJkN/iKVNdnGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760982504; a=rsa-sha256; cv=none; b=XqtOmtvDurwXcZ+mrJkIgWqVKuOjgSiqyU1E9Y+eVy7ugJ7w+j15U1u1hdk70nljQ3+QKn oYtpZYjGDfm+kN8vBEstEXqt29TTx1MkowahXRX1GgAx5WnNd705OsCgns58CDFtrwU5tr +HiPRp3r+/Dph64ukia9EBByTusQwHFXDFdrlHobDb47mowNibat72Ms4HP+G66yJFPGFP ttVlVtmbhPPhR6hRIGaMWb16CTT/MFzDEJTpOVFsNLJMWffisgWTwn3fFpblKlcuVdr4+l z9utKfHYjWA+bWuMd+2IQ6QaYL3JAoMG2r6aa/37j1FuWmkNWSnAghg0kB9d8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr2w80kdJz7Yx; Mon, 20 Oct 2025 17:48: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 59KHmNqS013837; Mon, 20 Oct 2025 17:48:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KHmNTd013834; Mon, 20 Oct 2025 17:48:23 GMT (envelope-from git) Date: Mon, 20 Oct 2025 17:48:23 GMT Message-Id: <202510201748.59KHmNTd013834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e3bd658fad96 - releng/15.0 - login.conf: Remove never used ignoretime/ignoretime@ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: e3bd658fad96ee493e5b6ea912bce666a2027d7e Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e3bd658fad96ee493e5b6ea912bce666a2027d7e commit e3bd658fad96ee493e5b6ea912bce666a2027d7e Author: Paul Armstrong AuthorDate: 2019-09-06 21:40:01 +0000 Commit: Colin Percival CommitDate: 2025-10-20 17:48:09 +0000 login.conf: Remove never used ignoretime/ignoretime@ Approved by: re (cperciva) PR: 240378 Reviewed by: otis (mentor), glebius (src committer) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52991 (cherry picked from commit 4835fc45efe8b593fa49786ec4bfb6ce5050756c) (cherry picked from commit 34710b2c08c95b8cdee96e77693c2e4ddef9bfbe) --- usr.bin/login/login.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/usr.bin/login/login.conf b/usr.bin/login/login.conf index 1069da17b4db..c65a83caa565 100644 --- a/usr.bin/login/login.conf +++ b/usr.bin/login/login.conf @@ -46,7 +46,6 @@ default:\ :umtxp=unlimited:\ :pipebuf=unlimited:\ :priority=0:\ - :ignoretime@:\ :umask=022:\ :charset=UTF-8:\ :lang=C.UTF-8: @@ -149,7 +148,6 @@ russian|Russian Users Accounts:\ # :requirehome:\ # :passwordtime=90d:\ # :umask=002:\ -# :ignoretime@:\ # :tc=default: # # @@ -174,7 +172,6 @@ russian|Russian Users Accounts:\ ## #staff:\ # :ignorenologin:\ -# :ignoretime:\ # :requirehome@:\ # :accounted@:\ # :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ @@ -265,7 +262,6 @@ russian|Russian Users Accounts:\ ## - no time accounting, restricted to access via dialin lines ## #site:\ -# :ignoretime:\ # :passwordtime@:\ # :refreshtime@:\ # :refreshperiod@:\ From nobody Mon Oct 20 17:48:25 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr2w937rkz6Cqjb; Mon, 20 Oct 2025 17:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr2w91mqJz3vKX; Mon, 20 Oct 2025 17:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760982505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30E6e4SxfMaYl71qmfoYFeT7Gw0qtinGfx1suWVxggI=; b=rXNhMNDsQNU3EU4eo0ljuGV8/IM3rGUk0ZvmTf6DpD8L4YIskH56WYl1/bBoAEMFEz6kzy jjNh/hT5BfFwumwFRZoGee5vazJzkhBmng6LdCZ7UgODO5L0UDFJZ+fZ2BrxWOt4WufZlQ owWCINBdZ+beUEKeEwZADOZixOLjMU8cySBBIpHqye0WMv5g6PIuDMxyUhjYDyrAUva04J dJXzxd3YSgPMTpHvCBxezj5x2P4K6VPYPE3h9Xo5tB8BgZlXv7hXiu8g+mRZ4OabpT/mNZ 9aLFIwQjcyDcxtHT65z8YaQa67x5kvU0ZUJaYr9WwlkskELw8Iiz/3YgonO61g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760982505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30E6e4SxfMaYl71qmfoYFeT7Gw0qtinGfx1suWVxggI=; b=pvfjeWT2ly7Jrvb7pxY62OP3obHMNe/NHF5L6L2APrikkpmk2xgM+KtyfqOLjuoFEBM6tS eBhrn3mKoheex/0RdGORNB3v45nIvawk/L0s9sHyWGriTZlooiJC7X6VHD7saJd8rJxV8O CRVF2fLWFjvPyvV2Qi4TEe7OBeEVuu2SEHukteXb3PGQxxmIROfQPstHAzK1UgOlYA7ySu gSvrnALFXZki8ihEk7y5Rw6Cw81anIz3HHjI+AdurVR6/eoxrsNZFkX7lK6s1ScPc/jsrD iNwCEYrhpjjsLhG0CtXpYSQDxrY3EA8nbPRnpWp/GcsGVnhG5JeHqjKryxbobw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760982505; a=rsa-sha256; cv=none; b=oRkZFuxo4hONhBiB5+o767D9S+f3T0oyNcZlLET2BgHLTsB+PeZRALLhvhcweFSD4hfV6t 6FS1RpNd5kKvVQg1LxFa7/XuYZes0hZ3TpkJA+mKASQXDse679L/4lED/ZjiRq8m70MftC fdfR6E9rihwF9FY/U4Col5yFmjneHeSNk61Pl55HRAYwHzjWzVcfVYjf35Qu6DDAbkRRnp HVS0qC+ZKXZgo4l39BgMXcsFl61DMHuHgbn/B+uKKtp5VppPPiJD8UudrftgYTH4EmLtuE 0K7XI8et2szmcg7R1H21IT1OxUL2vCpep1jGy7LvCh5kCaVBFkTVeTkpUV/9EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr2w915tLz7XG; Mon, 20 Oct 2025 17:48: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 59KHmPRD013874; Mon, 20 Oct 2025 17:48:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KHmPmK013871; Mon, 20 Oct 2025 17:48:25 GMT (envelope-from git) Date: Mon, 20 Oct 2025 17:48:25 GMT Message-Id: <202510201748.59KHmPmK013871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 5773d056fb4a - releng/15.0 - manpages: Use canonical names for Linux filesystems List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 5773d056fb4ac151d2897fa3051e8c5243aa79f8 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=5773d056fb4ac151d2897fa3051e8c5243aa79f8 commit 5773d056fb4ac151d2897fa3051e8c5243aa79f8 Author: Michael Osipov AuthorDate: 2025-10-17 09:24:12 +0000 Commit: Colin Percival CommitDate: 2025-10-20 17:48:13 +0000 manpages: Use canonical names for Linux filesystems The manpages of linprocfs(5) and linsysfs(5) document incomplete names without "fs" suffix. Make them identical to other filesystems. Approved by: re (cperciva) PR: 283079 MFC after: 3 days Reviewed by: ziaee, markj Differential Revision: https://reviews.freebsd.org/D53155 (cherry picked from commit 88b9ca860ef332d4d32e97e0f8a166f12cffc8e3) (cherry picked from commit 6ec0fbd8ff11c7180e52e9c30a071da8f532fd47) --- share/man/man4/linprocfs.4 | 4 ++-- share/man/man4/linsysfs.4 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man4/linprocfs.4 b/share/man/man4/linprocfs.4 index 53940d7c02b0..dcd1c642b409 100644 --- a/share/man/man4/linprocfs.4 +++ b/share/man/man4/linprocfs.4 @@ -9,7 +9,7 @@ .Nd Linux process file system .Sh SYNOPSIS .Bd -literal -linproc /compat/linux/proc linprocfs rw 0 0 +linprocfs /compat/linux/proc linprocfs rw 0 0 .Ed .Sh DESCRIPTION The Linux process file system, or @@ -138,7 +138,7 @@ To mount a file system on .Pa /compat/linux/proc : .Pp -.Dl "mount -t linprocfs linproc /compat/linux/proc" +.Dl "mount -t linprocfs linprocfs /compat/linux/proc" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , diff --git a/share/man/man4/linsysfs.4 b/share/man/man4/linsysfs.4 index 12729a814085..045e1af89173 100644 --- a/share/man/man4/linsysfs.4 +++ b/share/man/man4/linsysfs.4 @@ -9,7 +9,7 @@ .Nd Linux kernel objects file system .Sh SYNOPSIS .Bd -literal -linsys /compat/linux/sys linsysfs rw 0 0 +linsysfs /compat/linux/sys linsysfs rw 0 0 .Ed .Sh DESCRIPTION The @@ -66,7 +66,7 @@ The PCI device hierarchy node. .Sh EXAMPLES The most common usage follows: .Pp -.Dl "mount -t linsysfs linsys /compat/linux/sys" +.Dl "mount -t linsysfs linsysfs /compat/linux/sys" .Pp where .Pa /compat/linux/sys From nobody Mon Oct 20 17:48:26 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr2wB3kzwz6CqTw; Mon, 20 Oct 2025 17:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr2wB2BzNz3v1T; Mon, 20 Oct 2025 17:48:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760982506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FovMVdmgRvuojY9/dUqfHOe1GRZ2E852qx+Dq7HHaQM=; b=powMxfP6/9vHOf86L7lVzIsiAgUIFETX2NBwBnl4i4hGoIdyCC8ZsSEZQWfB6Pcy+1EvuW jw37hGVrZJpAlBldDmz2m0ZbSZ38hYfpX9DtlDm90aKXlunEAiu/f51e1bCuRzrtEsk8IO 91HGdr6WQ0bvNCyZ4Sh041A8Nc1GuOR5ZG3oxmJhlW81sZHVJ6VxrivN3d0TBrf3S6Txxn pw3ukGnS4fC/pLKyVleVWcgIq6B2rDmamYUCFXhF9ijB77+GiVWOiIjPRTjSm0wy+45/r4 MOr9tkcpCyu9giIjGc5CZz7M6KB7VMzfBSXkkYXSRoR5aL4292mysGd3cmWqBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760982506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FovMVdmgRvuojY9/dUqfHOe1GRZ2E852qx+Dq7HHaQM=; b=JEdBOY1VpGF6Z4FgT3qBaHI4TeyvGdheubmLv/G7b5gyTmO2js8VZUMyC3uDDIjXAddX1i 0AHZE1oxYWTLzDOfyXVSZBIpyCVPHgfb+m+ilfatWbT35ycgh37xqCjOB/CMHTormwioIt zKopuyzr45FoaqXYGFif+9+/2wN0WtR+JYbWibGS651u41cM1e6Po5OpDuaQjQaZMp9N9/ K8/0NQpAcaMzjtAXSHhzodZyBW/SOTNKB0XoBGVmJXkUUtgGZsuw/wGHRzKnG/ya+VI5Ye wAr/w1oYV+6apq0N18Yml3vIHvM6LS/7SXNBpi70LEgvxAeYHy2gbinV03stvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760982506; a=rsa-sha256; cv=none; b=uuNeIfjFxI6BAvxNM8HeyMnZAdIglU/7+ej5X+9Zx1F0BK7SI2HUtitq1s7ouh/ADvX35K WW/F2CSgzz2ygkgbWwwvnCVp1dA76GW4gKeUbTrTCI5KRjHdCmiU/4njBmu+qq5vEx2yau NLphHI6uA+ynhUEJmvvJnD1XbGNgsxIVueV58ONnIxCkez4Mg167iU1pylKLgktSTxLk9S DGzZ6j2xqQL3lyqT92cKUmc+6HjgWtPYUkCe/D4kGxWhrlxCuwMimMMAztm3EXDHoNu5PT C/3n2laJmzvS6Htw3mW35SYWR+b1WBwZcSAOGL7VfmhbSukMyso0FrcWX2C73A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr2wB1TvRz7QL; Mon, 20 Oct 2025 17:48: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 59KHmQwS013910; Mon, 20 Oct 2025 17:48:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KHmQre013907; Mon, 20 Oct 2025 17:48:26 GMT (envelope-from git) Date: Mon, 20 Oct 2025 17:48:26 GMT Message-Id: <202510201748.59KHmQre013907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 30b015e2cf7d - releng/15.0 - linprocfs: Add nodes for inotify List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 30b015e2cf7d60ecc73c1c73828ef39c8f939865 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=30b015e2cf7d60ecc73c1c73828ef39c8f939865 commit 30b015e2cf7d60ecc73c1c73828ef39c8f939865 Author: Mark Johnston AuthorDate: 2025-10-17 12:55:56 +0000 Commit: Colin Percival CommitDate: 2025-10-20 17:48:16 +0000 linprocfs: Add nodes for inotify These map directly onto sysctls under vfs.inotify of the same name. Approved by: re (cperciva) Reviewed by: olce, des MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53142 (cherry picked from commit 28c0ef76841bbb322b6e39668e1c8e997c1f8000) --- sys/compat/linprocfs/linprocfs.c | 77 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 5 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 95b212be1306..7ac48786c77b 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2216,6 +2216,67 @@ linprocfs_dosysvipc_shm(PFS_FILL_ARGS) return (0); } +static int +linprocfs_doinotify(const char *sysctl, PFS_FILL_ARGS) +{ + size_t size; + int error, val; + + if (uio->uio_rw == UIO_READ) { + size = sizeof(val); + error = kernel_sysctlbyname(curthread, + __DECONST(void *, sysctl), &val, &size, NULL, 0, 0, 0); + if (error == 0) + sbuf_printf(sb, "%d\n", val); + } else { + char *endp, *newval; + long vall; + + sbuf_trim(sb); + sbuf_finish(sb); + newval = sbuf_data(sb); + vall = strtol(newval, &endp, 10); + if (vall < 0 || vall > INT_MAX || endp == newval || + *endp != '\0') + return (EINVAL); + val = (int)vall; + error = kernel_sysctlbyname(curthread, + __DECONST(void *, sysctl), NULL, NULL, + &val, sizeof(val), 0, 0); + } + return (error); +} + +/* + * Filler function for proc/sys/fs/inotify/max_queued_events + */ +static int +linprocfs_doinotify_max_queued_events(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_queued_events", + PFS_FILL_ARGNAMES)); +} + +/* + * Filler function for proc/sys/fs/inotify/max_user_instances + */ +static int +linprocfs_doinotify_max_user_instances(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_user_instances", + PFS_FILL_ARGNAMES)); +} + +/* + * Filler function for proc/sys/fs/inotify/max_user_watches + */ +static int +linprocfs_doinotify_max_user_watches(PFS_FILL_ARGS) +{ + return (linprocfs_doinotify("vfs.inotify.max_user_watches", + PFS_FILL_ARGNAMES)); +} + /* * Filler function for proc/sys/fs/mqueue/msg_default */ @@ -2313,9 +2374,7 @@ linprocfs_domqueue_queues_max(PFS_FILL_ARGS) static int linprocfs_init(PFS_INIT_ARGS) { - struct pfs_node *root; - struct pfs_node *dir; - struct pfs_node *sys; + struct pfs_node *dir, *fs, *root, *sys; root = pi->pi_root; @@ -2466,10 +2525,18 @@ linprocfs_init(PFS_INIT_ARGS) NULL, PFS_RD); /* /proc/sys/fs/... */ - pfs_create_dir(sys, &dir, "fs", NULL, NULL, NULL, 0); + pfs_create_dir(sys, &fs, "fs", NULL, NULL, NULL, 0); + + pfs_create_dir(fs, &dir, "inotify", NULL, NULL, NULL, 0); + pfs_create_file(dir, NULL, "max_queued_events", + &linprocfs_doinotify_max_queued_events, NULL, NULL, NULL, PFS_RDWR); + pfs_create_file(dir, NULL, "max_user_instances", + &linprocfs_doinotify_max_user_instances, NULL, NULL, NULL, PFS_RDWR); + pfs_create_file(dir, NULL, "max_user_watches", + &linprocfs_doinotify_max_user_watches, NULL, NULL, NULL, PFS_RDWR); /* /proc/sys/fs/mqueue/... */ - pfs_create_dir(dir, &dir, "mqueue", NULL, NULL, NULL, 0); + pfs_create_dir(fs, &dir, "mqueue", NULL, NULL, NULL, 0); pfs_create_file(dir, NULL, "msg_default", &linprocfs_domqueue_msg_default, NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, NULL, "msgsize_default", From nobody Mon Oct 20 17:54:10 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr32q3s9Nz6CrHW; Mon, 20 Oct 2025 17:54: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr32q0wjVz3xSh; Mon, 20 Oct 2025 17:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760982851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtk6RMHAfqah/faIep1iIgdYE0WFxeD5lyFoq9nxRks=; b=a15sJw24PN0zRuzLHE2EjjFLSPLyiVklJqPvdQ/PqvAeSDv43WSVRRGBBvUEe85RDdcSTP VxGo5k7bny0yJvIinqI+WMRdNvRlGErvjqhpwWCkrN1cszXJHmP4P/qqOlyBcr5QkxA7MX MquvmnTBHYze7D9io/zbnoA19rjlsYUYl11HqBmZgRjhT6GZKvpwwr+zAMMC9Dh70oq8Gm EDRH8mUgUiFReNltOfbovKcTSy29sS0tgbzB9Ckw4M4dyHRhTLR4FBu4TGGBXQW48w5oG3 0g45y+u792woTF780hMXM8yB/MYDsZWz3QUzI9B6ZCL8aJE/XM8tVWfXMKrNVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760982851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtk6RMHAfqah/faIep1iIgdYE0WFxeD5lyFoq9nxRks=; b=St7EjMV31AqTejxcSvHiWN+HI9q8qBZIhoEczWRu70KH3ejMVkDusVkNtYaagbjKsM6Ke3 FqJPDvNs2fNMQqtE6su8HnIzoT4UVsZn+5EO9He/XvuyX5qVaL2CbuAFBmdrP3xAq77hpU hsRo0NhKoWwHaoMnVoKTImki4EziXnJjpRzSQsxfKPkidKlZ/71ssHtpjKNYXrf+9iOdo1 C1Vc+XIww/OFUo/49uVegYcllcenEstyukVLUbwtTOSlUXrbwipFDkyN63sdHxEsIITDBF 6xgNGpKtm2y1WPdK6DXIw2yYMJSdhxQGgYNMom2s/8of39j35mj52/fwpiADzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760982851; a=rsa-sha256; cv=none; b=dKbV4Gk1P++lwjvO44ePOvgdXV2M9rC6HPemsfolAiVGtMs04V5NzCsHE9h9l+xd+n0X6b 7rBfRZEiruQoi1+OpDy6nCXm0XLhqvQQ6CMtOC99W4BLgBFlEARthqW7yjxIKFwmAckpZq +Hrd0dwzPlpNGipU1V8GviAYYJfgkSDUb1vzhzOMyjguOMIgJBhhbx5VilvFKXfkwquUbx svhL0t6DxjRzBNMCcrtbW+MOot8/vOkqsoU+l//nVoO9PO65m2qGPJL3P11Dv0EbPw9VAX nHzunJOqZypuXH7f6+9mFQ39SP/felxO/YRInEsW/6/dHPnMFrL+4cmTlUyoQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr32q0T3Vz7mC; Mon, 20 Oct 2025 17:54: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 59KHsAuX030887; Mon, 20 Oct 2025 17:54:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KHsAeR030884; Mon, 20 Oct 2025 17:54:10 GMT (envelope-from git) Date: Mon, 20 Oct 2025 17:54:10 GMT Message-Id: <202510201754.59KHsAeR030884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d7226d1858c1 - stable/15 - vm_domainset: Ensure round-robin works properly List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d7226d1858c188475b12b0c4dff5bc794e42be6d Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d7226d1858c188475b12b0c4dff5bc794e42be6d commit d7226d1858c188475b12b0c4dff5bc794e42be6d Author: Olivier Certner AuthorDate: 2025-09-25 14:40:30 +0000 Commit: Mark Johnston CommitDate: 2025-10-20 16:47:37 +0000 vm_domainset: Ensure round-robin works properly All iterators that rely on an object's 'struct domainset_ref' (field 'domain' on 'struct vm_object'), which is the case for page allocations with objects, are used with the corresponding object locked for writing, so cannot lose concurrent iterator index's increases even if those are made without atomic operations. The only offender was thread stack allocation, which has just been fixed in commit 3b9b64457676 ("vm: Fix iterator usage in vm_thread_stack_create()"). However, the interleaved policy would still reset the iterator index when restarting, losing track of the next domain to allocate from when applying round-robin, which all allocation policies do if allocation from the first domain fails. Fix this last round-robin problem by not resetting the shared index at iterator's phase init on DOMAINSET_POLICY_INTERLEAVE. Add an assertion to check that, when passed, an object is write-locked in order to prevent the problem mentioned in the first paragraph from reappearing. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52733 (cherry picked from commit 7b0fe2d405ae09b1247bccc6fa45a6d2755cbe4c) --- sys/vm/vm_domainset.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_domainset.c b/sys/vm/vm_domainset.c index 9fa17da954f7..c25ed0cc2267 100644 --- a/sys/vm/vm_domainset.c +++ b/sys/vm/vm_domainset.c @@ -113,7 +113,6 @@ vm_domainset_iter_interleave(struct vm_domainset_iter *di, int *domain) int d; d = di->di_offset % di->di_domain->ds_cnt; - *di->di_iter = d; *domain = di->di_domain->ds_order[d]; } @@ -260,9 +259,14 @@ vm_domainset_iter_page_init(struct vm_domainset_iter *di, struct vm_object *obj, * are immutable and unsynchronized. Updates can race but pointer * loads are assumed to be atomic. */ - if (obj != NULL && obj->domain.dr_policy != NULL) + if (obj != NULL && obj->domain.dr_policy != NULL) { + /* + * This write lock protects non-atomic increments of the + * iterator index in vm_domainset_iter_rr(). + */ + VM_OBJECT_ASSERT_WLOCKED(obj); dr = &obj->domain; - else + } else dr = &curthread->td_domain; vm_domainset_iter_init(di, dr->dr_policy, &dr->dr_iter, obj, pindex); From nobody Mon Oct 20 18:02:47 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3Dm1XxZz6Crml; Mon, 20 Oct 2025 18:02: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3Dm15KGz3yng; Mon, 20 Oct 2025 18:02:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760983368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wykpQYwGumJL0xr4j2C2WTn6R8sJLAQmL6D8oaHQLY4=; b=TW5wHXjvuaso8q5sT1do6cV71/SmpiIOmhyrRs4dkQNsn2bW5MYEThB8aVfffxuMHn4wXY /p6CosQSfv1fmAAIjMnNl1KqhzVYhUkU7qpD5er7p9UsnoIm5dHmR3RHlVsyo1U0Bt8QTZ XL0bGoW/JX6oKKpuRmw1+PO4gy6LHUHuetKOo/1wDlgdL4KCMKwta4M+xS+aDspAmAI9n4 3vkWNaEUWqfyG6YrSV9n1GRp1/AXtSNjDRkCUgNqZMW+3bYgwqq6fsJI03OdesP1wAnXHB wpSX6ivFtdoKq+d2pmh/+7ywTKRSOD/Plw/9eUjmI9cubN2OfVQ8940C3rZNmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760983368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wykpQYwGumJL0xr4j2C2WTn6R8sJLAQmL6D8oaHQLY4=; b=h2BCpSKvKUWekh+CcX2Zq48pgAKGe++evoJ04FkyI1St1Bv6OEGfWJFhyq6ug0UDPyxyW2 gN3qC3OzYZZ/h3kobC5zXUKo0yMoV+qjKPBLIDDf3v1YULDhvkQ0CDHfEgQfwZkIYuBrKj M+4w2G1fodoNRmGraCL4ZaEfHKSfT2z7kncwn/CE1cE6Q5FIyDLjLciLN71xU2lrm61sj9 pVgqmuVVGfrYwpyHo8cvrRXsJV9EV8wCMi/XMnaudUq2fELFFhtNKdbVs6Fw+u6S/webbK sR4HBds+OKsOJMd+12fNy8qyEeLiPTcj0r6ipFk6gpfr1dsHOALRvpDPGeBHOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760983368; a=rsa-sha256; cv=none; b=FhJVTNYt9AvURQcE1Gk2F8FC4rv7oNUbzABdpHteR8XwsGG1GRFIN8ozIAq4QpqsO3URP9 Wd47R5OGxVl5qyowVtfnuhFS7hp3tusXqklitscXQ2LdQYV0foBcwIbpM6PXWDSqMDxzhB WH+kT4Tg3eHsQsSn4jJg7QpFB56w0Zj+DTHkKlJweWzbsf8qahQCQHV/RiOZbuHUyf/xRs ra0OsALyQdDHnvbyD7ssc5sqLJnakkXVfk4ULjzUwmtH9IOcHcqx77/9bKYKf9RkI9MMlZ mot3buVfFAjWJOpB1VruGBo8nSWpi5l5gFH7vVp5rIEgbaw3LLWZXwd4ixkjRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3Dm0fsfz8Gx; Mon, 20 Oct 2025 18:02: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 59KI2lDZ049980; Mon, 20 Oct 2025 18:02:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KI2leY049977; Mon, 20 Oct 2025 18:02:47 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:02:47 GMT Message-Id: <202510201802.59KI2leY049977@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 9554bb1249d8 - releng/15.0 - vm: Fix iterator usage in vm_thread_stack_create() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 9554bb1249d830a731fb941cd052ab24653a6938 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9554bb1249d830a731fb941cd052ab24653a6938 commit 9554bb1249d830a731fb941cd052ab24653a6938 Author: Mark Johnston AuthorDate: 2025-10-16 23:12:54 +0000 Commit: Colin Percival CommitDate: 2025-10-20 18:02:26 +0000 vm: Fix iterator usage in vm_thread_stack_create() After commit 7a79d0669761 we no longer hold the VM object lock when initializing or advancing the domainset iterator in vm_thread_stack_create(). We could lift the lock out of vm_thread_stack_back() but that poses complications since we cannot allocate KVA with a VM object lock held. Instead of overridding the object's iterator, just borrow that of the current thread. Kernel stacks are basically always allocated with a DOMAINSET_POLICY_PREFER policy, so it's not very important to maintain a global iterator for round-robin allocation. As a part of this, fix up flag handling: make sure we handle M_NOWAIT/M_WAITOK from the caller. Delete a comment in vm_thread_new() which refers to a non-existent consideration (stack swapping has been removed). I suspect vm_thread_new() can use M_WAITOK but opted not to make that change here. Approved by: re (cperciva) Reported by: olce Reviewed by: olce, alc, kib Fixes: 7a79d0669761 ("vm: improve kstack_object pindex calculation to avoid pindex holes") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52982 (cherry picked from commit 3b9b64457676561b8de2bec7c94c561bbd807b0c) (cherry picked from commit 511311e4f7a6220234bc5bced1e8e0fae96d02a6) --- sys/vm/vm_glue.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index e0f1807a1b32..18d789c59281 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -441,19 +441,16 @@ vm_thread_kstack_arena_release(void *arena, vmem_addr_t addr, vmem_size_t size) * Create the kernel stack for a new thread. */ static vm_offset_t -vm_thread_stack_create(struct domainset *ds, int pages) +vm_thread_stack_create(struct domainset *ds, int pages, int flags) { vm_page_t ma[KSTACK_MAX_PAGES]; struct vm_domainset_iter di; - int req = VM_ALLOC_NORMAL; - vm_object_t obj; + int req; vm_offset_t ks; int domain, i; - obj = vm_thread_kstack_size_to_obj(pages); - if (vm_ndomains > 1) - obj->domain.dr_policy = ds; - vm_domainset_iter_page_init(&di, obj, 0, &domain, &req); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); + req = malloc2vm_flags(flags); do { /* * Get a kernel virtual address for this thread's kstack. @@ -480,7 +477,7 @@ vm_thread_stack_create(struct domainset *ds, int pages) vm_page_valid(ma[i]); pmap_qenter(ks, ma, pages); return (ks); - } while (vm_domainset_iter_page(&di, obj, &domain, NULL) == 0); + } while (vm_domainset_iter_policy(&di, &domain) == 0); return (0); } @@ -532,15 +529,9 @@ vm_thread_new(struct thread *td, int pages) ks = 0; if (pages == kstack_pages && kstack_cache != NULL) ks = (vm_offset_t)uma_zalloc(kstack_cache, M_NOWAIT); - - /* - * Ensure that kstack objects can draw pages from any memory - * domain. Otherwise a local memory shortage can block a process - * swap-in. - */ if (ks == 0) ks = vm_thread_stack_create(DOMAINSET_PREF(PCPU_GET(domain)), - pages); + pages, M_NOWAIT); if (ks == 0) return (0); @@ -660,7 +651,8 @@ kstack_import(void *arg, void **store, int cnt, int domain, int flags) ds = DOMAINSET_PREF(domain); for (i = 0; i < cnt; i++) { - store[i] = (void *)vm_thread_stack_create(ds, kstack_pages); + store[i] = (void *)vm_thread_stack_create(ds, kstack_pages, + flags); if (store[i] == NULL) break; } From nobody Mon Oct 20 18:02:49 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3Dn2BGDz6Cs3C; Mon, 20 Oct 2025 18:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3Dn1jLdz3yvH; Mon, 20 Oct 2025 18:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760983369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ksG/u94TCVnGEWdGgC8AlUKxIoFwWj8issZa0ZoKajU=; b=wPgpX0XQF1QZ6s6R/TgNLWjdzt3Wy2weHA5qFGa9xuq6pnN+xDNLUEn0f5zmlxVChrBV9f Ghrm1tgo7q9FY2+e8gtr4If5FayNxwTfdZ/huyK0/yEHWP9Bm0Z95b0erJaJS2ubR9AoJQ BwRMbuHwwfYBWMG+C/U83sypGWNmiB/VkJRJr59Kq+hyC0jkp6P/KNXKhXNZ/up5cb3wq9 W5M86GuhZ1nSncp2OYOuhfUiPMUWzJuKEUdevS8h2zo743Yo2tmrT3V4tB/KxMai9RFQHt 53bEpTxx76BfFqgAJnLSZXtKyaRLsBJQGeHyRyS55+D0BHSW89YxOeMMoqEyFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760983369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ksG/u94TCVnGEWdGgC8AlUKxIoFwWj8issZa0ZoKajU=; b=dOoXJ70dbgEAWoQWIFhzhxZ/kuoA02aVS/kDXaFZaBXh9q/3fZGI2eGBcD2dd6NuPXxrp+ zgYGcN7CVBQcecg6NBcBNETjSSuUeRVfLe6cOv5D3FvrZrQc4C/oz91BVB9cxcL3b/yx37 YljQrxU9OEkHJqv+DdZ9asA5P6XVaCsnC8rVSz1k7PrDdCPXjM1xhtuPt6oIsvri3KWyZA kLCYmY6zvdeY08amHbE7/LrsXj+q6kgps7x0Fwfop4705gFiajQjEm3AANOvLb7Aq05vx3 zzTCiTamhXwBqDYGgsYgUrq2XOSA8C/3lPFdYTme0bOmqjf6xXpZP2dszi8q9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760983369; a=rsa-sha256; cv=none; b=UIu8JJyERn1/Hfa6nYDYE5sCO3cJuEmMt83p5302DDt61jZlKco+AIGlh8AlgngWY3Fvrf dUN2soLB1gqTN5WqQrGRHXj03NaBFVU8hvld9vdhMPe85vr2740zbj025Kvihpklwd6s/i rVSMH+lA735ViYgbQYWAt0kLjkwUoPXAhoTW5QA+LX+BdFwKbLcxuHKzXdLBYNwWy9T7ld W6njFNO5zteDsCJgtJAfR0jpqIUc5gPetfACyp0P/2I4nhsFbhB03dUG8rugnaUyc7bpQV DqztIyaPMQV4MI8xobpjqb5tm7e1+trSgKVwur/NVhWhjzoIWMPcD1hELpqjqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3Dn1Jn5z8JY; Mon, 20 Oct 2025 18:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59KI2ngQ050014; Mon, 20 Oct 2025 18:02:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KI2n2S050011; Mon, 20 Oct 2025 18:02:49 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:02:49 GMT Message-Id: <202510201802.59KI2n2S050011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: b15ff7214020 - releng/15.0 - vm_domainset: Ensure round-robin works properly List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: b15ff72140204b416f067a75ac9fa189c0387f7d Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b15ff72140204b416f067a75ac9fa189c0387f7d commit b15ff72140204b416f067a75ac9fa189c0387f7d Author: Olivier Certner AuthorDate: 2025-09-25 14:40:30 +0000 Commit: Colin Percival CommitDate: 2025-10-20 18:02:37 +0000 vm_domainset: Ensure round-robin works properly All iterators that rely on an object's 'struct domainset_ref' (field 'domain' on 'struct vm_object'), which is the case for page allocations with objects, are used with the corresponding object locked for writing, so cannot lose concurrent iterator index's increases even if those are made without atomic operations. The only offender was thread stack allocation, which has just been fixed in commit 3b9b64457676 ("vm: Fix iterator usage in vm_thread_stack_create()"). However, the interleaved policy would still reset the iterator index when restarting, losing track of the next domain to allocate from when applying round-robin, which all allocation policies do if allocation from the first domain fails. Fix this last round-robin problem by not resetting the shared index at iterator's phase init on DOMAINSET_POLICY_INTERLEAVE. Add an assertion to check that, when passed, an object is write-locked in order to prevent the problem mentioned in the first paragraph from reappearing. Approved by: re (cperciva) Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52733 (cherry picked from commit 7b0fe2d405ae09b1247bccc6fa45a6d2755cbe4c) (cherry picked from commit d7226d1858c188475b12b0c4dff5bc794e42be6d) --- sys/vm/vm_domainset.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_domainset.c b/sys/vm/vm_domainset.c index 9fa17da954f7..c25ed0cc2267 100644 --- a/sys/vm/vm_domainset.c +++ b/sys/vm/vm_domainset.c @@ -113,7 +113,6 @@ vm_domainset_iter_interleave(struct vm_domainset_iter *di, int *domain) int d; d = di->di_offset % di->di_domain->ds_cnt; - *di->di_iter = d; *domain = di->di_domain->ds_order[d]; } @@ -260,9 +259,14 @@ vm_domainset_iter_page_init(struct vm_domainset_iter *di, struct vm_object *obj, * are immutable and unsynchronized. Updates can race but pointer * loads are assumed to be atomic. */ - if (obj != NULL && obj->domain.dr_policy != NULL) + if (obj != NULL && obj->domain.dr_policy != NULL) { + /* + * This write lock protects non-atomic increments of the + * iterator index in vm_domainset_iter_rr(). + */ + VM_OBJECT_ASSERT_WLOCKED(obj); dr = &obj->domain; - else + } else dr = &curthread->td_domain; vm_domainset_iter_init(di, dr->dr_policy, &dr->dr_iter, obj, pindex); From nobody Mon Oct 20 18:22:52 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3gx2PlQz6CtcP; Mon, 20 Oct 2025 18:22: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3gx0tlZz42dm; Mon, 20 Oct 2025 18:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760984573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ehU1w8kkLG0Ajcf67huzW57snTqx9fS9xtKg77YlNBk=; b=R3k5B8TM0fkdFJ+KZBgFJNyug2Ecr5tn/lQD46j8UB2w/5EN+tNpyds3a2+PyDifkZRWhm GdJ2shC3dDL0ZkPf9ErTnOwBdvSPmvOcyu318HoEiqZnufUcdEhVcqxmzmYf4yCdeLf/AQ q+SRXqIl+BkRYfEyJN7FQucyCwkO8H+6FhrxnCPx7jRrCPkVXn/T2xNnUCzGxzDhkJ1qoU Y4B/26IHqXEK5jsd9bLKy9K+hZ1klB8T7Q+FjiW44X0Ed9+HUb1JaO07lxlGV9dAKfzo9b /eBDt9LFIkJ44GB/SULZgUO6/+17JiGmbZL08e6Vn8JLP0p8Sb6jjX1jt3dpKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760984573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ehU1w8kkLG0Ajcf67huzW57snTqx9fS9xtKg77YlNBk=; b=yR2r1H6NjNL+PsLpq6ElkqNNcEr8IaC60vf3TVbJRdtkvzO/Y8xeHfv5nZEFuovbdhEK8+ qL9ZN8RxJ1rpjFcFvL8dQRgRGIwakYAk79ikLTrA5iqU+XGJ8DXbFWybBqO9I/s1UPRawG 6K84ucEUZwJI+akuhv3lDaZsdsp8ni8LxZx/BRJdu64spJAjoVOOr86BvlTMfCzahIC23i hbDCRDHQilFHiuWupGgLPjfBGlJtOXN5OQx1wNgpWQm4dao8tCPCd1kaLyZgh+bunWMv0c Fkl+MBe1ioUAXacIFPZqeI7CPx9UC3B6DyzVSL+nmqj3cRSdg9/WG0uIKQ91Nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760984573; a=rsa-sha256; cv=none; b=eVA+LlQdfapVp+GEgI7/sWcm+epYAE3aHA2TvVBMoqnNw+sjKbaFw+x5O5FdwthUK/iOre AKSwjBY0Ea7c9pUZRFEV409jY1BvnAbAAKEBmUqmT4gXz/bIiIi6CbyrcZ2mywfMD9DMQL 1BVRvEmfcLYg+tKkf7W8WDI55mmcmzvhfHQLABkprMlLWtxNq9XkbCzd6t2o2eLSey80c8 kSCGDjkYePzTEu05D6/IJYId5HWG9ip48E0ZZRzWF8f2Qg1jdwBJDN7hcSQ2aae9W1wvTs F4z6jge3ei0kcX2tRhtVYfXcAx0r0kqyd9emQYCmrrbaaHzC7im1x48F4TjJUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3gx0HTsz7XQ; Mon, 20 Oct 2025 18:22: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 59KIMq1a088222; Mon, 20 Oct 2025 18:22:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KIMqGS088219; Mon, 20 Oct 2025 18:22:52 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:22:52 GMT Message-Id: <202510201822.59KIMqGS088219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 47ea2e9edf78 - stable/15 - regex/exhaust_test: Skip flaky 'regcomp_too_big' testcase on all archs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 47ea2e9edf787044eff1bda533cb74758631250b Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=47ea2e9edf787044eff1bda533cb74758631250b commit 47ea2e9edf787044eff1bda533cb74758631250b Author: Siva Mahadevan AuthorDate: 2025-10-03 13:56:32 +0000 Commit: Ed Maste CommitDate: 2025-10-20 18:22:37 +0000 regex/exhaust_test: Skip flaky 'regcomp_too_big' testcase on all archs PR: 259971 Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation (cherry picked from commit 1ddff51060ad759e35dcc4716b0bdcdb40255862) --- contrib/netbsd-tests/lib/libc/regex/t_exhaust.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c index dd2e55635653..25bd23c5a025 100644 --- a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c +++ b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c @@ -186,10 +186,8 @@ ATF_TC_BODY(regcomp_too_big, tc) int e; struct rlimit limit; -#if defined(__i386__) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/237450"); -#endif + atf_tc_skip("https://bugs.freebsd.org/259971"); limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024; ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1); From nobody Mon Oct 20 18:22:54 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3gy2M1Qz6Ctfd; Mon, 20 Oct 2025 18:22: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3gy1rkKz42dn; Mon, 20 Oct 2025 18:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760984574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XdKcPa0rRi4uAfdGFW/548jTadskijIlQ5Z7jzBLhwg=; b=dKpA7i2mXQtuB/UvRuQegF1Mk4cvcAnVlqth2KnygnTkV0lX59HX+xxmLpvzmSxbhd5YqG j0LdPpfUmMtIZRqgzwVZ1EYniYrIfn7kgAH5J9MV4paa/yAx+lX1EqlRoWkfPZNdNxxSSS KnC5/6JaQvZgzlnGl62mKWvCJiILO0lAyookXJtPuRxZVj7RqkmUfgSlHhFdJrjmk/Bv7v 0Z2hlyjk0G/CQ87Q3fmvDLFhTo2TwmtqN5ohB5w5LQCq+fxgJr+tFVCAV+LzEKt/8vOTlh bPeXS2vtQUhV6Z2hZbX1Q84cLMWpAkDaAvr0O+UzRUuaqbEmcrwnpgrVvBeZ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760984574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XdKcPa0rRi4uAfdGFW/548jTadskijIlQ5Z7jzBLhwg=; b=bzq44zRatA4OL6T0ddl+ZFhJt0Dg4zqV5NknOfeWfPAuHVT681UJovTGmgCGzyhxvy6mhY 2JXtHkuULEV1lBOOtjblrF9ioZj7yWtbLyyD8VapWrWVIeVjRfhYf9xWeC7AVqWwZGqN6N Wxql2m8ofQLR4Jxzu+xOIoZxYqobKVdJiEQXXr3zTQ4YobocOfh3EdwadC/JKEAy8wiOMN zw+/C0hkyPp1ysbkm7/iBQHh0tA7mA3Mk4ETqHJ1PHrrGN+eb0rQDrsZHaxuYYB/9buSr6 hsMLl10LHsvUOBAn5Gm5qEqd4QhqJWKE+dzgI1hdLx7F3RWZwnOmIhNuVCUz2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760984574; a=rsa-sha256; cv=none; b=ud/QDZWCz6NoNiEIKLY6Hj/lCnw99xj/viEVYx7ZP5yM2tvY2wOG5QA0NcmwpIhbEoY3ob iP/ryMNm78aALi8D4sIjyvIcC3TY5sbCtibmYEfTSWuAQa9hTE372jm0Xtd7CqR3cZRt/u nPR67OnmwSJdWQwYRHQ31B0uvaEmGXL875mHnLbfdTK7d3HQymegNnVG6vIccfAJ1WYg9o 8SwVElx9FGUGOvQXB/CYTVcjuqynF8U4sEKsPW4yn/hwh+Mz6AOqTs/8B9jaKx9NYI5qRT TGkVRNVpRZ5DiEPlHEQxTau1n0Rrap/49dsxn10zmRsWCKE7fqzIwnqzTbtSeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3gy16f8z8L9; Mon, 20 Oct 2025 18:22: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 59KIMsUa088263; Mon, 20 Oct 2025 18:22:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KIMseM088260; Mon, 20 Oct 2025 18:22:54 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:22:54 GMT Message-Id: <202510201822.59KIMseM088260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: da457e5c856d - stable/15 - regex/exhaust_test: Update require.memory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: da457e5c856d26d41e9a30a08d0087937d28a41f Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=da457e5c856d26d41e9a30a08d0087937d28a41f commit da457e5c856d26d41e9a30a08d0087937d28a41f Author: Ed Maste AuthorDate: 2025-10-17 14:43:25 +0000 Commit: Ed Maste CommitDate: 2025-10-20 18:22:37 +0000 regex/exhaust_test: Update require.memory PR: 259971 Obtained from: NetBSD 7753bf0b705a Sponsored by: The FreeBSD Foundation (cherry picked from commit 08345e62a28eb971f65125f45c512a12b39ee2eb) --- contrib/netbsd-tests/lib/libc/regex/t_exhaust.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c index 25bd23c5a025..2f3d1025536b 100644 --- a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c +++ b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $ */ +/* $NetBSD: t_exhaust.c,v 1.10 2019/07/09 13:59:25 gson Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $"); +__RCSID("$NetBSD: t_exhaust.c,v 1.10 2019/07/09 13:59:25 gson Exp $"); #include #include @@ -177,7 +177,7 @@ ATF_TC_HEAD(regcomp_too_big, tc) " crash, but return a proper error code"); // libtre needs it. atf_tc_set_md_var(tc, "timeout", "600"); - atf_tc_set_md_var(tc, "require.memory", "64M"); + atf_tc_set_md_var(tc, "require.memory", "256M"); } ATF_TC_BODY(regcomp_too_big, tc) From nobody Mon Oct 20 18:34:21 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3xB0ZRnz6Ctwy; Mon, 20 Oct 2025 18:34: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3x96wGLz44hT; Mon, 20 Oct 2025 18:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kh25teKZPTxBCudyx7fG6hdRSiPX57hx1f5gIC8dW1k=; b=v2+UWiXbSE6hZoKQQteTRu4jU4wwGYVGzWGKVKvDU8BeeP+urqnR8nGDm33a5mVrww9Qi4 8hUUV+zyN9d7fmFVhekHTiNkXDPPasBoHQg77FaOic/EW/4s1L3tG2ZRku2GBBAWhYcc8k Kq0xUkIxv8Mo0mKIMedPz2wuEn/nY1GQaSDcVr4uJDyaC5bdVejz9nEW7HMzzb7a2DTEzF 8Kd5FfGHmvgvwz60+A8+X5zjowX5kqaD2WOOZ6Agwk09nDcLfzzu1KiM+6Ndma3vh/U3S9 ZADb2fHlPh9Z+sKGiQCbF1LjMOh5Wf0rn81YBU/isoGe6Huy83uqtCHrsz5tRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kh25teKZPTxBCudyx7fG6hdRSiPX57hx1f5gIC8dW1k=; b=UMxZeofbRkQXfkSi8VtqapfND86jEpS/bv573qlo8WVyG6MX/H0lmNlcNIJURT+6z5A9kF 6bqJa3bnpZkfKlOF1YRmWFEhAxiHZvrBHz3wwmko2Y9i5HBJ2xh5++iD79wY2XT87EwHXn 5VEGGd5j0pC+o+5FCJN8gorjyhC+xux+jGd8PJyy8IMXIpGXDHl97NEDaNb/VtOcJGPYGz Lldqogf7QCePJJpPy5k1YoPufjLxqIvk4vJKbVJLQVxCM70y8YSsPY8rxBQ9PsGBJ1n9qr cGbc2K2CE9XKmw7clmBNC5VB0F4bnijZuAcPi/8yCXRXU5oIVC3GsgN8t9/AGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760985262; a=rsa-sha256; cv=none; b=hp6ac5aZ6/F3kPWTxPPBLWf5pOEQB2Fhdzj+2C6PGcZqqfgGmhOWY/r+IoA79gQM/p5OG6 akfHOSB77E2YIdNWoYQgGavKEoRoX6UBCc1eDGKjuhoXWAs4Q6xeEfvFkq6xx07ioDIVFk rVl+WBHxyDo5WrNVM6r/WJcK+9tQbR8yXJUBXdC02LuXHdLmI49lcBLESqD2jzGEjaC4U2 jZFtBgZgGLm0gguvC7L2ul6G6aKKq0emrrKqahXCPacYKtwKhsCul3viQ5HPROjghblwv1 onONO9xmMPPTQ+iGenqFpcMCdbyT/WVIM0CCZYTXhzTy6gc9OM2lnQ2sOMFkYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3x96WkDz8Wc; Mon, 20 Oct 2025 18:34: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 59KIYLd2007465; Mon, 20 Oct 2025 18:34:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KIYLF2007462; Mon, 20 Oct 2025 18:34:21 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:34:21 GMT Message-Id: <202510201834.59KIYLF2007462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 3bd015a1a918 - stable/15 - pci: add quirk to disable Function-Level Reset (FLR) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3bd015a1a918d060dbef556ddfa6e236f5212330 Auto-Submitted: auto-generated The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3bd015a1a918d060dbef556ddfa6e236f5212330 commit 3bd015a1a918d060dbef556ddfa6e236f5212330 Author: Bjoern A. Zeeb AuthorDate: 2025-09-25 12:49:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-20 18:33:08 +0000 pci: add quirk to disable Function-Level Reset (FLR) MediaTek mt76 WiFi cards are advertising FLR support but after issuing a FLR the chipset is gone. Add a quirk so we can disable FLR. The current reset code will automatically fall back to a power reset. This makes the card show up under bhyve where before it would just not be discovered at all. That should make wifibox work for it and will help development for a LinuxKPI based mt76 driver as found in framework laptops as no dedicated machine and constant reboots are needed anymore. We will likely need to add more PCI vendor/device IDs once we can test the other device IDs. After a lot of help from: jhb Really implemented by: jhb (I just typed and tested) GH issue: github.com/pgj/freebsd-wifibox/issues/73 Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D52728 (cherry picked from commit 4c0e53aced2251eb5ac7eca44e13a6b947be8582) --- sys/dev/pci/pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 9e43a4c1909f..cde98cb62cef 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -240,6 +240,7 @@ struct pci_quirk { #define PCI_QUIRK_DISABLE_MSIX 5 /* MSI-X doesn't work */ #define PCI_QUIRK_MSI_INTX_BUG 6 /* PCIM_CMD_INTxDIS disables MSI */ #define PCI_QUIRK_REALLOC_BAR 7 /* Can't allocate memory at the default address */ +#define PCI_QUIRK_DISABLE_FLR 8 /* Function-Level Reset (FLR) not working. */ int arg1; int arg2; }; @@ -319,6 +320,13 @@ static const struct pci_quirk pci_quirks[] = { * expected place. */ { 0x98741002, PCI_QUIRK_REALLOC_BAR, 0, 0 }, + + /* + * With some MediaTek mt76 WiFi FLR does not work despite advertised. + */ + { 0x061614c3, PCI_QUIRK_DISABLE_FLR, 0, 0 }, /* mt76 7922 */ + + /* end of table */ { 0 } }; @@ -6740,6 +6748,8 @@ pcie_flr(device_t dev, u_int max_delay, bool force) if (!(pci_read_config(dev, cap + PCIER_DEVICE_CAP, 4) & PCIEM_CAP_FLR)) return (false); + if (pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_DISABLE_FLR)) + return (false); /* * Disable busmastering to prevent generation of new From nobody Mon Oct 20 18:34:22 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3xC2ZCKz6Cv7Z; Mon, 20 Oct 2025 18:34: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3xC0sNBz44hV; Mon, 20 Oct 2025 18:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CjODkynp29ttJ2rWNkWp7l4u0XjmIjIk/VAHQB5tSsg=; b=L6zHZM+NUYRtkGlAqa+HQt174cj12FQOS5Q5mstvze41p67FUqLwW5ELajonqn+OHbvtD8 j9HokmFT5xeOiLWFmYTKe/jPlKX+QuNwaRo28wyCm42Kuf2ZV9KrramzYisGg+iwxkh0MZ MabKvmrbLUic4/l03IUHqaH9UFYgDKfw7TM4JD6ws6MP4HeUBA3c8nKprMgVj0PD5xbvzk mjY8Js0AlEqDbXPpD98H1qmr4vKBDKgzLd36ntrWWH5G+/7PtcmA2gGuSIa5LrbAOpetST KElM+U6JETHJ/8C6kJZKNTh77yhRJUHsBGSlv9hdH+cKrHSW1KylYy92pPo+BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CjODkynp29ttJ2rWNkWp7l4u0XjmIjIk/VAHQB5tSsg=; b=triaVSHWKIHbYFUhnsGdf+rHSYoMo1iG7DK/nysItzgMGP/2l1mUJ0OD6bBVmhXRdoZFox ely3qAvfiXVivqtm4u3Lcc4IalfOkMNHIcV/EkTtaq2LOfEdebZR1D0fMbVlrsetNwb1ft QDydHXwyr/fvw+0qB1scGGlC2de+KmDUv5FGQ7YpGj2WY7hb1ppOH/AvKdJIVT7wHzQZv6 AFuIaiOrC89GJQvwqWA6UMSGLbnLRvjnCNp2R0bYOWO6DEvZHhMMpmnM5CVYcU0sgNo4LM SQ0//eBrFRvSdGGMezYkELiPB4F2GEIHHquPy5bHAYVCaCrxsG5rDdd1bEQrOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760985263; a=rsa-sha256; cv=none; b=cTw5Y42nJy+LvSokX9W7v8Z8BVgBUc78XESMrXXfSm26DJU3peDsSnclbxnOyApcfXUTt7 md+P+T7OXICEm96eNzl4r0Rs5moXBMpSEVIlehe1m1TLEpnNdPDliNJ6tjO69OGnwkH7Vl KIWx9L5uBU2MjngUnUhTF3J2SY0h2xtJw3LSZT2L0yPYN7M1FtTtzJYlskCGsOhKdsWBJ6 qnX7ojKdPumDzymi+RdbjNWWzuPtA06I1E8audLAu8ukOA11WXzQ7dUooZ2PMFk1GDFG7s BN+D1CnQ7xQzW6s7CEPO35z0qnIOwSqHf1i0WWNG1v5YutV8F/0S73a7ci86ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3xC0MP8z8lv; Mon, 20 Oct 2025 18:34: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 59KIYMBQ007501; Mon, 20 Oct 2025 18:34:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KIYMHp007498; Mon, 20 Oct 2025 18:34:22 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:34:22 GMT Message-Id: <202510201834.59KIYMHp007498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e0487486279b - stable/15 - fwget: pci: mediatek: correct package name List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e0487486279bc0690f65401622deebdbdea6a882 Auto-Submitted: auto-generated The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e0487486279bc0690f65401622deebdbdea6a882 commit e0487486279bc0690f65401622deebdbdea6a882 Author: Bjoern A. Zeeb AuthorDate: 2025-10-13 13:15:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-20 18:33:08 +0000 fwget: pci: mediatek: correct package name The port is called wifi-firmware-mt76-kmod not "mediatek" in the moddle. Reported by: Lars Tunkrans (drsnx60 gmail.com) Reviewed by: emaste, jrm, imp Differential Revision: https://reviews.freebsd.org/D53067 (cherry picked from commit 10d88a7aa670a3cc2bf763e64bd292b4caa3a811) --- usr.sbin/fwget/pci/pci_network_mediatek | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 653c87c410eb..e1e15dcfa2e5 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -38,24 +38,24 @@ pci_network_mediatek_mt76() # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh } ### >>> - 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7611) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7615) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7663) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7920) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x0608) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x0616) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x0717) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7611) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7615) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7663) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7906) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x790a) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7915) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7916) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7920) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7922) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7925) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7961) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7990) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x7991) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x7992) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x799a) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; ### <<< esac From nobody Mon Oct 20 18:34:24 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3xD4nP8z6CvRq; Mon, 20 Oct 2025 18:34: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3xD1pZlz44cg; Mon, 20 Oct 2025 18:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0ArPV6cBUAoF2SufrQhfYysuOBduxHayXSG9ohmCgs=; b=tkaPH+Ws4C2Y2H9AARUK2l4r1UIyuho3WikWYoVgp/6LB/MqYSrDGy81W5wnm3+EsxYsZp S6+9iGcNvK73Z5Wv8Pjh78DwHQ2AK2aWImqGVjACULg3KH45NDlwqdopQ8i1+5626pHZ5w 7MP+jIEbgfKAb7pF1sGuV533+7RJ2dTQb4+LHiJt9VRDafJzr3TfPLEA5HZo4UVrOhjNw6 YheIuOQIW0y9uYoHdEoolc6/pGxFZ9BkhiboEqMyUjM8RfaBl8dywvl03i/2dGPPb9s58D uSok/UKr4dFx0f5dQHffc5eX4IgSD8WTCdw4Vvn8sqICQlvdyIUJm/6cQcNKEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0ArPV6cBUAoF2SufrQhfYysuOBduxHayXSG9ohmCgs=; b=nahkI9cshTqsm03E2akoEnhwBiGh/8cKoNLd1pVFpP6y7p65wViq5aFwgCVG5YcbY4SUG/ C9WyyG/HSkBVOTzCMRRSvcOFfoZCkRkOeKqUruxSw6MNFJmRwiLnlL7u1X1p8eGj+fYtas z4G/M081KGuip8bF2WXQb75lC15PYUFLjR6YGgJfNjIhtVdCMHqhFyoNLIONuc/wBCqKFc 9wniuqV6ZyhsVlqGiFI3B+L6+V3xDzQN+582h5UMbliHkrb3QIoRvLIKCYj9XdDp6UWH+s lK5P7gW3KJcqdpTgwpG2Dt/yYHvfK6BKaUYobRB5xIxAorQSYK+3Z88hWnLt/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760985264; a=rsa-sha256; cv=none; b=p5spZKc2eatnJZ4QHsMTsATDbl8euW0ppXmZvCjmCYHzhHYHroWMkuESW6RFCgcYSIm/XA yb7JT+fbwtzeiNu3DxCASwU0TX1i36eVMP+LtJahkwNv7UvBpiYQzJjFWiKEDn0cjAD34r sy7sIK0oOPf3rirxshTz3//1n0gV8ieL+duV4I5Oyn/PyjRH6K16/RBM1u9yXn71o6nuJA YhV+3raInTuNflrHQoOq68FdBBN60U7VjsGXRBtoOFrWZnCiHEKFw6/wtQdydFr+UhIEr+ MX90nQtFPZM4d+18H0CYjDjgh7KYYAAyhcjGGl/B5wprxrYG8oflA9pVyZCp6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3xD1J0qz90l; Mon, 20 Oct 2025 18:34: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 59KIYOc3007537; Mon, 20 Oct 2025 18:34:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KIYOok007534; Mon, 20 Oct 2025 18:34:24 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:34:24 GMT Message-Id: <202510201834.59KIYOok007534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 10c71151ade7 - stable/15 - dc(4): fix argument to if_foreach_llmaddr() for 21143. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 10c71151ade7b5f021b49b7e117059730a2ddb56 Auto-Submitted: auto-generated The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=10c71151ade7b5f021b49b7e117059730a2ddb56 commit 10c71151ade7b5f021b49b7e117059730a2ddb56 Author: Chris Johns AuthorDate: 2025-10-17 12:38:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-20 18:33:08 +0000 dc(4): fix argument to if_foreach_llmaddr() for 21143. As found on RTEMS the argument to if_foreach_llmaddr() was wrong causing crashes. Fixes: 51e80820552e0 PR: 290314 (cherry picked from commit 33afdf0e356d84ffe5c62c886f84cf12ba147d3e) --- sys/dev/dc/if_dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index bed74c3b6181..5c1d7ff30976 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -999,7 +999,7 @@ dc_setfilt_21143(struct dc_softc *sc) else DC_CLRBIT(sc, DC_NETCFG, DC_NETCFG_RX_ALLMULTI); - if_foreach_llmaddr(ifp, dc_hash_maddr_21143, sp); + if_foreach_llmaddr(ifp, dc_hash_maddr_21143, sc); if (if_getflags(ifp) & IFF_BROADCAST) { h = dc_mchash_le(sc, if_getbroadcastaddr(ifp)); From nobody Mon Oct 20 18:34:25 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3xF5sGmz6Cv0Q; Mon, 20 Oct 2025 18:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3xF2ytDz44d9; Mon, 20 Oct 2025 18:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EUOJz0fyj/miS6JjL2dmC22WNJ9tg8xMhlSHIz5ifEg=; b=sR1h6G1eytcnTri7i6grecCuBQBhTRkOOj47XS+DKoy2cF0b1axh9KpP/cEPNQWO1A9mjd 7LQpO34uIx6U8thsb4l7q3/yonXu4BnLGTqLsN1EW8kJf3gfZATZg9sP2lqE0IL4MTEomz 7PpsqJVvEq+N6hX85ZIqntTG4ys/EnOU8y8YFBqerWVE6xQQRKDzN02hQkYnK+8DGgtH0T AOwjo2MlYROPHzw6+WcA3oShMwxizOe54D9jjOLkdKmnbw+QD7O3pKc7hHssVVLqaFWE9b pJWHmErdoXSduf23J4KmxUnN+XAZxiLr2jD/KjMxqfwAAIF4CkV0C57tqLfb9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EUOJz0fyj/miS6JjL2dmC22WNJ9tg8xMhlSHIz5ifEg=; b=JNfpL5vtQaOr1pDZciIK2vV6/cSkomJoTqWAdk3TVeaQaMgbtVEiyTwP4XGf2NKwUt5UwF lSUq46WRIEkI/HfYS25aKuwRpL0Zz0HnGiS+POpejxZXOdlFVIFb8bzcnJeMbAbuvApXRd NNf+qMrJcv3UbxqQX3PSikg8xVDyBNcmdaLcMP4pOa234hJEgKpBPJvZIAxJtWbqM9zf4b Ae/xU7bJx6OBIh6JuQ1XQZD8wD1cLN2k9N8r+3XyKF4vMql6/YfX2ikeVAVmCRAVJ+Fxz4 Lg4dCBWntDbp1zZo6ylV70Jgi827s84kjCn6J/9L1B2TMyFtrfiQ61JfoYw6Dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760985265; a=rsa-sha256; cv=none; b=Y6iWvD24T22QmAERMW3YynZd5NNBR9ke92U0Yu/mGt9pH4+2C/WJrQi26ay0pSEc/z2rSd eJlZqSvXzXaok3IFL5xQGstI3jkHaTAaoJvV54rMKpGPQdl6AjEpjiOg/O7yRmTS0ufuhA QLit5jbP82daK5ks4pRqbmsSAOPn2ZjodTpUO0yuzGQd6bJ8wCP2Zq04R0TXyMtRvlX+py rdO9vcLcn4PHHUmPBbPXt0VKX8a/ptAQUhVpg/mqWBlJPbnSObHHORNn7BZnztjDM5OzGZ jTEJZAAPUNgQVi6MyUvX7mZAPiaYl+hmWnpAeGBwnLU/Pp9XmCbzC0nvB8WQbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3xF2G3Yz8xM; Mon, 20 Oct 2025 18:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59KIYPB7007573; Mon, 20 Oct 2025 18:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KIYPnb007570; Mon, 20 Oct 2025 18:34:25 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:34:25 GMT Message-Id: <202510201834.59KIYPnb007570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2c345e94ae00 - stable/15 - igc(4): also build module on aarch64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2c345e94ae0048ecec577ab52bc81510365038d0 Auto-Submitted: auto-generated The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2c345e94ae0048ecec577ab52bc81510365038d0 commit 2c345e94ae0048ecec577ab52bc81510365038d0 Author: Bjoern A. Zeeb AuthorDate: 2025-10-17 12:56:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-20 18:33:09 +0000 igc(4): also build module on aarch64 igc(4) seems to work fine on arm64 for as much as I could test with a 2.5Gbit/s interface on a mPCIe card. Enable the module build so it is available. (cherry picked from commit 51fbeadac4ccce6aafe51be9377d4114321295e5) --- sys/modules/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 5315d518afd8..2acf991f1b77 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -576,6 +576,7 @@ _mlx5ib= mlx5ib ${MACHINE_CPUARCH} == "i386" _ena= ena _gve= gve +_igc= igc _iwlwifi= iwlwifi _rtw88= rtw88 _rtw89= rtw89 @@ -743,7 +744,6 @@ _et= et _ftgpio= ftgpio _ftwd= ftwd _exca= exca -_igc= igc _io= io _itwd= itwd _ix= ix From nobody Mon Oct 20 18:34:26 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr3xH1hRKz6CvPN; Mon, 20 Oct 2025 18:34: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr3xG3pwDz44ql; Mon, 20 Oct 2025 18:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9P+Hy1FAU/g7E6qdkhaESY7yIZ2AR+92Mn3OUP1sRJc=; b=g7bgQ6rqqUZV3pLXeBkFihiOEmwOvYCo1U944pts3IQC3sU4aJB6llYW7JL4VpvhZtBTFX TqWf0g6SOUgCBTKmyLVZ5147XAIrim3nYbcfLkTMqTwxxc6IN28LoVZ4+ADVh6U6Qs4Z4m UvHZilhLcdN05bKw+bFW+/MDTRfUxGqQSzodhtV566hWoAs6IVqaNJAFkCnMaTcxSgOmUN IrxjTljjWRuaMRxx39NYX0kpi//BHAGylTSQKk4GknbWXcI0hPehDWYmIsGB44gGS23YCy bJoAEGDxX+QL2eePeeB9atE/3UTfO+FRy8zHIui9hRhwh4mn57cQ3xEkJbEJBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760985266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9P+Hy1FAU/g7E6qdkhaESY7yIZ2AR+92Mn3OUP1sRJc=; b=PV8y0hytWRNj99+Uh3AgED0nvC399ljBmMOpm4XFd+1XBeuW2IP2yJVgOkMDHrQ6/PNMKI ItzFZf/luTqWQgC9F9Z17AzjOzNAKQ3yALTVCbqJXjCJEGAq+JEPC0xrXxQiYiSCRWGL99 xw6i+ljHv4EggV9lzZIAXdVHJDu4WnRO799hu6mJsQKNoxk8/Wf39VO/dMIAW6MLPgu02f Phnb2udKpv7GNnEk0T0SpmP/3Cw9KZfFFtEn+kkJfOWj0tFBKEFPqe/pMwq9sPscQMIzz/ VIYEsJIVjWFJwvrNeYxwzqPDwKhmCX+Ks6SSAexFmOJ66xVQCSBGmxETR311Xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760985266; a=rsa-sha256; cv=none; b=S/be9REUCwnYx7pZRPsiiAA8Ut1XSHcUjHH72WdRGax77zPnkWfu3ZS+DamP6INIm+MEhB CXXoQWJ4Qoc03O008qzQ9JTMdyqRWdF5fFYbJvPYZwMEDN3iZSQ9/1ztJPvoNz3wpFt/6v +iQkoO5Q9HpcgLHcVAvv00lr62kyvVy8VzXg0X/4em202neMwZX4XAY4fLdY2R3LFuxRPc tO4C4mmndBWIfuFgiTnyPwMV2CF79CJ6+gjQs6qqGaMJFaY2pFmqfO60rUM5uuyECVyk0+ whAuR12Jq4I+0P4djaUT4oLNp9TZM52bOXNivP+UOUW6/V6FhmkLX8aqziXxow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr3xG2vjsz8xN; Mon, 20 Oct 2025 18:34: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 59KIYQsF007615; Mon, 20 Oct 2025 18:34:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KIYQt6007612; Mon, 20 Oct 2025 18:34:26 GMT (envelope-from git) Date: Mon, 20 Oct 2025 18:34:26 GMT Message-Id: <202510201834.59KIYQt6007612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: bd62c8d63eae - stable/15 - bluetooth: ng_ubt_rtl/rtlbtfw: remove duplicate entry in device table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bd62c8d63eae78225264d8f4c2190f09cb9e1611 Auto-Submitted: auto-generated The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bd62c8d63eae78225264d8f4c2190f09cb9e1611 commit bd62c8d63eae78225264d8f4c2190f09cb9e1611 Author: Bjoern A. Zeeb AuthorDate: 2025-09-01 18:27:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-20 18:33:09 +0000 bluetooth: ng_ubt_rtl/rtlbtfw: remove duplicate entry in device table Remove the single 8822CU entry in all three places. It seems the only entry referencing a USB device. The same device is listed with the 8822CE devices. Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D52324 (cherry picked from commit 0ee6e36ea9b2dd959b0fb9f04ab98a01f93729fc) --- sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c | 3 --- usr.sbin/bluetooth/rtlbtfw/main.c | 3 --- usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf | 10 ---------- 3 files changed, 16 deletions(-) diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c index 0181a67ac604..f35712cc8f69 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c @@ -81,9 +81,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = { USB_VPI(0x0bda, 0xb00c, 0) }, { USB_VPI(0x0bda, 0xc822, 0) }, - /* Realtek 8822CU Bluetooth devices */ - { USB_VPI(0x13d3, 0x3549, 0) }, - /* Realtek 8851BE Bluetooth devices */ { USB_VPI(0x13d3, 0x3600, 0) }, diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c index e87a98036265..280045a6aa25 100644 --- a/usr.sbin/bluetooth/rtlbtfw/main.c +++ b/usr.sbin/bluetooth/rtlbtfw/main.c @@ -64,9 +64,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x0bda, .product_id = 0xb00c }, { .vendor_id = 0x0bda, .product_id = 0xc822 }, - /* Realtek 8822CU Bluetooth devices */ - { .vendor_id = 0x13d3, .product_id = 0x3549 }, - /* Realtek 8851BE Bluetooth devices */ { .vendor_id = 0x13d3, .product_id = 0x3600 }, diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf index 61ae53db8f39..2ef56d2af93a 100644 --- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf +++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf @@ -36,16 +36,6 @@ notify 100 { action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -# Realtek 8822CU Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x13d3"; - match "product" "0x3549"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; - # Realtek 8851BE Bluetooth devices notify 100 { match "system" "USB"; From nobody Mon Oct 20 21:43:42 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr87g0R02z6DBmr; Mon, 20 Oct 2025 21:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr87f6hmDz3Z5m; Mon, 20 Oct 2025 21:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760996623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Grhon+mfUR232YCSzeO25hdqeAkhNuIVWt5jBwqHsqg=; b=qxy1d66wzHpF5nv59F7D9G6EXmLQGThawbLBjGyKMHTZpEgi3nmblcV+1l+rMqpfHs4/eE qlMBfZg8i5fYZwqLzVQXNnZOC073vqplEkHX+Tz2YBjpkxnZjOLIEKe5EXwdBG4KTKNv2/ vKYsjDv1LC240ljo/gqzKFMar9vSxDFw/aob7NioXzidvkHHcQx+8ouWsX2CID/GXkjJAs iS2UbfDdYmqFeahg9X0Xe/VodzjjoMQtUaBS+sp1jpOK9uL7QvQm0tbL24rATETTEe4Byc kr2ld/BjY8iawteGsrtVDo2qyx6s4zz583gvk5JyAgp7eRMqhdLp1F2RzxuOFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760996623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Grhon+mfUR232YCSzeO25hdqeAkhNuIVWt5jBwqHsqg=; b=oHo37BJl94oKcHbFegEvddNa/1c8qIH1ponJTfxR/KStNdDPuKG9zzSaKChTZFaaYZQ8PC gocUVROUmHwOV1JRKDuVxHlcf50gHPeZ8SqzZjYaHwhzTLYBEjChfAVdLZOrSmxzv0DxLt ZNQEkkp+UcqdDww45awx9m+L/ujV+/o+XRoF23wW41IFaPImvxx+Jg29rYENmQd5dGA+B7 ZxeTTDdBYbc8hRIV7JHF2SePjPfWW4ZsJryQiUAAG6OZTd1qwIxFZxzghq7EkOPBI1bPg0 QQmkKw/pUNfI+GvxdpHT8V++WpGb7OvFwFE1o4ERFbLU+aEieW860dt38FfCoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760996623; a=rsa-sha256; cv=none; b=ZmAp/P2Nw3Qk9+/o7Ep/DCNyW2xyofJfv0pOzkOoeACYecQmyCUpbRbBSYDsHa+CTlE5n8 EVOGAL8zV1rPgj+/ns5odSlKGfE+nE9kFKwfnZ4NfCsxyzladtd7MlkUwRUVXIwg3RJFMP XVyxhjRxrq8kYD/E184GhAMaFKud8D2IDj76W9KHCC6dsgIeLn/Km5uwZMo9VApccEejdt ekus17I8GAaZAoyxMdoRNHKIrkr0kVcfzfu8cPQOM0kx1zKcgbr0uccD/SOpURFTeLV+Dx qdkoULwDiAwkq1yCs4WS033UMiqUcjm7qvSO78CLVuN1d8kgPvZuFxWLwoUxTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cr87f6FQYzWqf; Mon, 20 Oct 2025 21:43: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 59KLhgPf066157; Mon, 20 Oct 2025 21:43:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59KLhgnQ066155; Mon, 20 Oct 2025 21:43:42 GMT (envelope-from git) Date: Mon, 20 Oct 2025 21:43:42 GMT Message-Id: <202510202143.59KLhgnQ066155@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2427ae41b7cf - stable/15 - quot: Make nusers unsigned List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2427ae41b7cf11e75f9a80d6c274a09eeb9ae979 Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2427ae41b7cf11e75f9a80d6c274a09eeb9ae979 commit 2427ae41b7cf11e75f9a80d6c274a09eeb9ae979 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-20 21:41:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-20 21:43:20 +0000 quot: Make nusers unsigned Fixes: 195b00ec45e5 ("quot: Clean up") Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D53224 (cherry picked from commit fa347930f89d4f9d1956573c3bd4b5987127bc12) --- usr.sbin/quot/quot.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 879580f649b9..5dda36ac8499 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -178,20 +178,20 @@ static struct user { daddr_t spc60; daddr_t spc90; } *users; -static int nusers; +static unsigned int nusers; static void inituser(void) { - int i; struct user *usr; + unsigned int i; if (nusers == 0) { nusers = 8; if ((users = calloc(nusers, sizeof(*users))) == NULL) errx(1, "allocate users"); } else { - for (usr = users, i = nusers; --i >= 0; usr++) { + for (usr = users, i = nusers; i-- > 0; usr++) { usr->space = usr->spc30 = usr->spc60 = usr->spc90 = 0; usr->count = 0; } @@ -201,15 +201,15 @@ inituser(void) static void usrrehash(void) { - int i; struct user *usr, *usrn; struct user *svusr; + unsigned int i; svusr = users; nusers *= 2; if ((users = calloc(nusers, sizeof(*users))) == NULL) errx(1, "allocate users"); - for (usr = svusr, i = nusers / 2; --i >= 0; usr++) { + for (usr = svusr, i = nusers / 2; i-- > 0; usr++) { for (usrn = users + usr->uid % nusers; usrn->name; usrn--) { if (usrn <= users) usrn += nusers; @@ -223,10 +223,10 @@ user(uid_t uid) { struct user *usr; struct passwd *pwd; - int i; + unsigned int i; while (1) { - for (usr = users + uid % nusers, i = nusers; --i >= 0; usr--) { + for (usr = users + uid % nusers, i = nusers; i-- > 0; usr--) { if (usr->name == NULL) { usr->uid = uid; if (noname || (pwd = getpwuid(uid)) == NULL) @@ -280,7 +280,7 @@ uses(uid_t uid, daddr_t blks, time_t act) usr->spc30 += blks; } -#define FSZCNT 512 +#define FSZCNT 512U static struct fsizes { struct fsizes *fsz_next; daddr_t fsz_first, fsz_last; @@ -292,10 +292,10 @@ static void initfsizes(void) { struct fsizes *fp; - int i; + unsigned int i; for (fp = fsizes; fp; fp = fp->fsz_next) { - for (i = FSZCNT; --i >= 0;) { + for (i = FSZCNT; i-- > 0;) { fp->fsz_count[i] = 0; fp->fsz_sz[i] = 0; } @@ -309,13 +309,12 @@ dofsizes(int fd, struct fs *super) union dinode *dp; daddr_t sz, ksz; struct fsizes *fp, **fsp; - int i; + unsigned int i; maxino = super->fs_ncg * super->fs_ipg - 1; for (inode = 0; inode < maxino; inode++) { if ((dp = get_inode(fd, super, inode)) != NULL && - !isfree(super, dp) - ) { + !isfree(super, dp)) { sz = DIP(super, dp, di_blocks); ksz = SIZE(sz); for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) { @@ -329,7 +328,7 @@ dofsizes(int fd, struct fs *super) *fsp = fp; fp->fsz_first = rounddown(ksz, FSZCNT); fp->fsz_last = fp->fsz_first + FSZCNT; - for (i = FSZCNT; --i >= 0;) { + for (i = FSZCNT; i-- > 0;) { fp->fsz_count[i] = 0; fp->fsz_sz[i] = 0; } From nobody Tue Oct 21 05:47:45 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4crLt95H4rz6Dt62; Tue, 21 Oct 2025 05:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4crLt93qHkz3ZfR; Tue, 21 Oct 2025 05:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761025665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zno43af1KJwN+fmypQRbBWG02kZ6R9LjQJ1Ik09Y5J8=; b=IfrAPYc6fYF+pmOtS/hmsNBbnEPq2wq9IRWtbCaOAHT0jp8vmxmD6gFUEFOBUy0fxS9pzz P8GH9FZk7zXjLxVRvGNLnAUVBl176ZkVrkwAYUjZNzNwU9fn5imHer92IAYonpk4nBUkUl xmap2ylYalnppjbHmuNI2/dCarj2iDsoNanWy2x5lotRNwMEQvyi99cA2b6h/x/NSys0IO hzc1DChtkx6SrV08Izj+RzoSN2jzQpRz/3fp///KvX7oqY6UONBARGpqd1fmtcVEMX5Z1C pypmtOodaC9olig5i37oQ27DvKKu7VI1Aq5I9TWs5sJmQ/Et8cs1Hdjjq5l6dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761025665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zno43af1KJwN+fmypQRbBWG02kZ6R9LjQJ1Ik09Y5J8=; b=MYkFzytO1nI0bwWgX5YIW83M64gPMHUcpAN71h+chF31xcx6aESI/MiAiAwp1JBeKLLwyA rZf/bk0kI9UO9Bucr7NmQIg3DX1z7VHiuFDy3hG0hua+KzmJolpaJIfaanbsgburkklakZ 91kZBHaoVj+LZVvh0WV7tyhESKJIW/rSMQMXsUmxRrDjp+vZOelmNAK+GHatNRklJGWVML xJDqLUkAHyynPhXyCGfZXhjBVBD6g81I6w2OBI9e7RWJ7Bw3kWAr8G9nvL6FYGX0Hp++C8 vkZ0E4oZNySCA62BIJ04JdekBVum5YzuNiqj0PrqeSIZSx1ifJNZ+lusZgohGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761025665; a=rsa-sha256; cv=none; b=pon3ckwSoimiKZNDFeTr2Pep1wLgff2Fg96+dG71CRtySR0RVHgg6k76n7gmJpGMxHSxJG 1C5TO9zF6UpCd/Gg0T+nQ+qWgYJQIILvlrvoGZpSVGsATCXN5E3rvdaU57yQ6vGf55LVQF tr77cEzSzlqngOumiceceOppCgOgkYtYxT1yaBwL894H1N8fx33KT5k8hqtdIpGQwQGoTl guy8GDZeZQ0I2SrMUggWX76b+T3t1Tx/ZW225jlPfumTBPx189tSzbF0Tnv8BYxbrQRkdE Wr7ePiHIKcFyfQ4wvMbwyZiBw3XybFM5xJ6UCvnSmHuDUaSUyWD2Ftqj01jmnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4crLt93Jfwzn7G; Tue, 21 Oct 2025 05:47: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 59L5ljcs072100; Tue, 21 Oct 2025 05:47:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59L5lja1072097; Tue, 21 Oct 2025 05:47:45 GMT (envelope-from git) Date: Tue, 21 Oct 2025 05:47:45 GMT Message-Id: <202510210547.59L5lja1072097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 07d7f0e07b84 - releng/15.0 - fwget: pci: mediatek: correct package name List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 07d7f0e07b84abd501deebdfa9184762d6526374 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=07d7f0e07b84abd501deebdfa9184762d6526374 commit 07d7f0e07b84abd501deebdfa9184762d6526374 Author: Bjoern A. Zeeb AuthorDate: 2025-10-13 13:15:58 +0000 Commit: Colin Percival CommitDate: 2025-10-21 05:45:01 +0000 fwget: pci: mediatek: correct package name The port is called wifi-firmware-mt76-kmod not "mediatek" in the moddle. Approved by: re (cperciva) Reported by: Lars Tunkrans (drsnx60 gmail.com) Reviewed by: emaste, jrm, imp Differential Revision: https://reviews.freebsd.org/D53067 (cherry picked from commit 10d88a7aa670a3cc2bf763e64bd292b4caa3a811) (cherry picked from commit e0487486279bc0690f65401622deebdbdea6a882) --- usr.sbin/fwget/pci/pci_network_mediatek | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 653c87c410eb..e1e15dcfa2e5 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -38,24 +38,24 @@ pci_network_mediatek_mt76() # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh } ### >>> - 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7611) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7615) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7663) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; - 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; - 0x7920) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; - 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x0608) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x0616) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x0717) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7611) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7615) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7663) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;; + 0x7906) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x790a) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7915) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7916) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;; + 0x7920) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7922) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7925) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7961) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;; + 0x7990) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x7991) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x7992) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; + 0x799a) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;; ### <<< esac From nobody Tue Oct 21 05:47:46 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4crLtC0RP0z6DtWb; Tue, 21 Oct 2025 05:47: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4crLtB4lScz3Zkq; Tue, 21 Oct 2025 05:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761025666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cZGsRm3rECehVb0dLZPwfJR2SMPafAEUK0qOD483inw=; b=uEMdaOXYU8Z2hVc8+X+hzJ7Xi1qH8DqUpmqLByGcJK3DwdLysr7j8uZ4XurLDjl0zfhZYV C8eJh3/W8MgR+pC9KrrdNvVjuPU1ENa0FVJsq12Qts3XFSu78z7TSU4bSt1B+h3aJnIr3Z 2HurK+d6bj/L0hW31f+Y4XehCtSesx9qT1NulZEILZU7Qw1GvG0knr3tqQLqtFCfazovWG t/IMLwSH/7wNYj3iM/O8V78+ibILestA/rpZT1yyU0G6ISW3Fip3qIW37CEKfL9KGFJoJ6 eVkSHoS5n5uNSOoDV+/p2Z+m20abOESfzc4p2d49/zRjPUxMEC2ZFxwolGQWCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761025666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cZGsRm3rECehVb0dLZPwfJR2SMPafAEUK0qOD483inw=; b=vTWZkoKWfdIaSPHRPSPHlteraplSTLhSCC2LSQxGCKcGKWb52h/1HcMn9YlQa2fXNq8akg FB5nIP9ny0E7WkId54sdM64ZJzRG50tEkS2J1qn52HHflbCDvAnqpe78e8twQ5pHIQfqIV cHo8MRPWGrW3nWFHlJw39OYkx8JdDSf4haUwCRIYfxfnasrbmgnuK7QhXURaCIsEDX06MB tp2W7JEOLigYiBrrewAvLyCZ6ufTW6YMjOKOeM1FelLAUuTwni9bi3NsW/rqBufNHjowmM lFNn9LPjENOLvVJdcaEbjpXIO0lYjKTeyEPa/3MlstTAo0tV+hLxHRepCKo+gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761025666; a=rsa-sha256; cv=none; b=dmn02/xM+d1mA5pCIPyzYbzG4qweCcf1stThCBvZUE+zdtsuzog8/8YRt2J3rT5oWdoHz3 Ix7jSLYPfvk/uDw+z+HJDl8dKBCuxgoc8OMfyTr4wlLm/ftoOyPHB/r+OR3+GlBPTVukdw slEXPcZ5lVp3wmBtoh2TXqQ3YovNW+G7+BeetGHxgMnmpvQos1x0GLijNFXqpqHVztIiSx QOJVBFfGBxaodMXJ99szeLf4nciD7WwkLqS9r6KhHX/a3rsJ9mFS7UyK3TqmFYQHOnXk9h QbIdiTkuys++6NEbhNUadyQYPTVaCIK9/tYJTjShKsQWrWSftvhdW1LJIbCP2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4crLtB4Dqhzmnh; Tue, 21 Oct 2025 05:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59L5lkVL072134; Tue, 21 Oct 2025 05:47:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59L5lkAl072131; Tue, 21 Oct 2025 05:47:46 GMT (envelope-from git) Date: Tue, 21 Oct 2025 05:47:46 GMT Message-Id: <202510210547.59L5lkAl072131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 71f065aab558 - releng/15.0 - dc(4): fix argument to if_foreach_llmaddr() for 21143. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 71f065aab558123a35a885b1a9e205380fd551f5 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=71f065aab558123a35a885b1a9e205380fd551f5 commit 71f065aab558123a35a885b1a9e205380fd551f5 Author: Chris Johns AuthorDate: 2025-10-17 12:38:30 +0000 Commit: Colin Percival CommitDate: 2025-10-21 05:45:08 +0000 dc(4): fix argument to if_foreach_llmaddr() for 21143. As found on RTEMS the argument to if_foreach_llmaddr() was wrong causing crashes. Approved by: re (cperciva) Fixes: 51e80820552e0 PR: 290314 (cherry picked from commit 33afdf0e356d84ffe5c62c886f84cf12ba147d3e) (cherry picked from commit 10c71151ade7b5f021b49b7e117059730a2ddb56) --- sys/dev/dc/if_dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index bed74c3b6181..5c1d7ff30976 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -999,7 +999,7 @@ dc_setfilt_21143(struct dc_softc *sc) else DC_CLRBIT(sc, DC_NETCFG, DC_NETCFG_RX_ALLMULTI); - if_foreach_llmaddr(ifp, dc_hash_maddr_21143, sp); + if_foreach_llmaddr(ifp, dc_hash_maddr_21143, sc); if (if_getflags(ifp) & IFF_BROADCAST) { h = dc_mchash_le(sc, if_getbroadcastaddr(ifp)); From nobody Wed Oct 22 06:51:00 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs0Dj1lsfz6Dn6f; Wed, 22 Oct 2025 06:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs0Dj1786z4B19; Wed, 22 Oct 2025 06:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761115861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pyDx+FJGNl7C+I90e4jjHPilLfIp3GyBP8XooyNHfSw=; b=f5iovR3Mw21fWyfAFwYZr5CmpJYPGzTm06EhyoQ/PzZuBOT8An1rSfadqciXH6Pkdg7OWf kZYyDzA1WL6Sh6B3rLDs6C3ZiTNH+YnBcF9JZVMfyt++bt10hMryQkDwuRDsmcPryt6omL IJ2nacnnmaZNe6avfM6x8OiD+MK8apUkTFZU/svPDi9TWfD7wRTicMsA4oCM5MDzytnd/7 PHGNP0ipBBCWV4wiVdEyqFNVmB/lH3ogwVG8psefqJ6IQcYtBnB3Ll3fGW7jkYQwWwFpYs 84ZsPi3wey3zfTVTl/rKjnYHFWg4cVFr+qnYTsO4n2ICzvkzGcuJK7MhaXuhTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761115861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pyDx+FJGNl7C+I90e4jjHPilLfIp3GyBP8XooyNHfSw=; b=flpAeU2rc8dHgL14/0r4iTiULT/0kkTES8pIe+Rf+r8w7hzRc0yxGKcLhmHcyp/4x+yL+x exr+/vk99qGq83u/xhNqGWyCYd6+X/981csOlMqltRXFeDwVSL2GgWnAGvrxoybL2y0rvt WTp2JwGx5jWy3KL4UyM45aOJMhpoYhOkOxjkPNa0q7Oh8QrEJ6aYK62TJ5P59rQmC7c+th HIhmVA7F4v8civhkCZDNAm3/U6KmJtMCHDLdhnUUHRzUqsldZScHYD2dEIXWVy125YvoV4 FqXmtsYDOl/vGlxAtOPunBLcKx+kOhgsOIUCjPPleMfTSb8bhOKJtQsSoRIeag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761115861; a=rsa-sha256; cv=none; b=DVwBeDdv4a213SMXtRzxuKV3IjfTTy0ZHlvWyKnGbN66BxB07bc63+UyNwEkZ3A+CGBexT jcERAqqiT9zFvUbIgdZiOQheI2v/Z3ykw5ETqXi3w1CtiLPXOMNUqGkyysjRn9FbHUwSG9 BYjd5mWn3bB46DWG0TwPMzX0kFZsK0SCf65Yy/ujKOllii/vZFc7ZfyP9PvMGWZsPfhcc+ g3SjlHD/9LUNkiMAPT5IWvkh9Eq4SlBRxIv5teQnVX4WXFhJkx/1sKZ/Z0rSS+VbpgOc2P Gc4LgTVBCj32VkP5QK8WvV6QnxgpSymj6f4fG5U6nzUj4H5N1bt96P8m++Rmdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs0Dj0hFvz34j; Wed, 22 Oct 2025 06:51: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 59M6p07D010169; Wed, 22 Oct 2025 06:51:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59M6p0BY010166; Wed, 22 Oct 2025 06:51:00 GMT (envelope-from git) Date: Wed, 22 Oct 2025 06:51:00 GMT Message-Id: <202510220651.59M6p0BY010166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 962194df8333 - stable/15 - vmimage.subr: Fix when/where we fix up METALOG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 962194df8333124876a25926244864bd5d2d26d7 Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=962194df8333124876a25926244864bd5d2d26d7 commit 962194df8333124876a25926244864bd5d2d26d7 Author: Colin Percival AuthorDate: 2025-10-19 00:27:07 +0000 Commit: Colin Percival CommitDate: 2025-10-22 06:50:48 +0000 vmimage.subr: Fix when/where we fix up METALOG We only need to check for unMETALOGed directories and sort the METALOG file if we're using it, i.e. if we're doing a NO_ROOT build. This non-NO_ROOT builds by no longer bogusly writing to /METALOG*. We only need to add databases (spwd.db etc) to METALOG if we're doing a pkgbase-enabled NO_ROOT build; but we should always do this before creating the filesystem, not only if we installed extra packages (in vm_extra_install_packages, where that code was erroneously placed). This fixes non-cloud VM images, which in 15.0-BETA2 shipped without password databases. Reviewed by: ivy MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53194 (cherry picked from commit 012014403bdcb2b3aa7ed3895079a0059204c35f) --- release/tools/vmimage.subr | 66 ++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 842a808c623e..99e1936296e1 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -213,16 +213,6 @@ vm_extra_install_packages() { install -y -r ${PKG_REPO_NAME} $pkg done metalog_add_data ./var/db/pkg/local.sqlite - - # Add some database files which are created by pkg triggers; - # at some point in the future the tools which create these - # files should probably learn how to record them in METALOG - # (which would simplify no-root installworld as well). - metalog_add_data ./etc/login.conf.db - metalog_add_data ./etc/passwd - metalog_add_data ./etc/pwd.db - metalog_add_data ./etc/spwd.db 600 - metalog_add_data ./var/db/services.db else if [ -n "${WITHOUT_QEMU}" ]; then return 0 @@ -290,28 +280,42 @@ buildfs() { cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG fi - # Check for any directories in the staging tree which weren't - # recorded in METALOG, and record them now. This is a quick hack - # to avoid creating unusable VM images and should go away once - # the bugs which produce such unlogged directories are gone. - grep type=dir ${DESTDIR}/METALOG | - cut -f 1 -d ' ' | - sort -u > ${DESTDIR}/METALOG.dirs - ( cd ${DESTDIR} && find . -type d ) | - sort | - comm -23 - ${DESTDIR}/METALOG.dirs > ${DESTDIR}/METALOG.missingdirs - if [ -s ${DESTDIR}/METALOG.missingdirs ]; then - echo "WARNING: Directories exist but were not in METALOG" - cat ${DESTDIR}/METALOG.missingdirs + if [ -n "${NO_ROOT}" ]; then + # Check for any directories in the staging tree which weren't + # recorded in METALOG, and record them now. This is a quick hack + # to avoid creating unusable VM images and should go away once + # the bugs which produce such unlogged directories are gone. + grep type=dir ${DESTDIR}/METALOG | + cut -f 1 -d ' ' | + sort -u > ${DESTDIR}/METALOG.dirs + ( cd ${DESTDIR} && find . -type d ) | + sort | + comm -23 - ${DESTDIR}/METALOG.dirs > ${DESTDIR}/METALOG.missingdirs + if [ -s ${DESTDIR}/METALOG.missingdirs ]; then + echo "WARNING: Directories exist but were not in METALOG" + cat ${DESTDIR}/METALOG.missingdirs + fi + while read DIR; do + metalog_add_data ${DIR} + done < ${DESTDIR}/METALOG.missingdirs + + if [ -z "${NOPKGBASE}" ]; then + # Add some database files which are created by pkg triggers; + # at some point in the future the tools which create these + # files should probably learn how to record them in METALOG + # (which would simplify no-root installworld as well). + metalog_add_data ./etc/login.conf.db + metalog_add_data ./etc/passwd + metalog_add_data ./etc/pwd.db + metalog_add_data ./etc/spwd.db 600 + metalog_add_data ./var/db/services.db + fi + + # Sort METALOG file; makefs produces directories with 000 permissions + # if their contents are seen before the directories themselves. + env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted + mv ${DESTDIR}/METALOG.sorted ${DESTDIR}/METALOG fi - while read DIR; do - metalog_add_data ${DIR} - done < ${DESTDIR}/METALOG.missingdirs - - # Sort METALOG file; makefs produces directories with 000 permissions - # if their contents are seen before the directories themselves. - env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted - mv ${DESTDIR}/METALOG.sorted ${DESTDIR}/METALOG case "${VMFS}" in ufs) From nobody Wed Oct 22 08:17:10 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs2870hffz6Dtkp; Wed, 22 Oct 2025 08:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs2866v7Tz3LZj; Wed, 22 Oct 2025 08:17:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761121031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8zYRIvAC/MftKel7VOAZD1NwPhQXfCGHBYQBBYjaRfg=; b=iqmDPZZRMhEPBtaO0F4aPR2X2oynSNFdH4jj/YGlVIHNx7pRt3U8+FRGfSa1mg+NEWCCWK R1vxW+FGywj7AwXgc0cpzlr+z6eQR0NG0BZBP99DAdp6W2553Ycd65znMecIpHeHUBFmBY EOVVhJBkI3HgKuf6p/6AkPZ35Xy7wUA6OAGSh+Y7rMUk7TodKymTU0qJiiLG0QYzppHp3m vGq7mza4Ve/MvvW/CtrK4Hwe56VstvjuAo9AuBhFxfAc6r6EvqG+4WDqMHoxZdsrQ2KiT5 RdDjDvRJbLiguo2iNjFxc4qYZb8w5eeoOYyPZQQIfHiP97UqpbttikHIqb9hvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761121031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8zYRIvAC/MftKel7VOAZD1NwPhQXfCGHBYQBBYjaRfg=; b=l3rVjQO51xGoBp2pxMTysL9SCT9XSCwvR3UeYkNgD9XvS2YIOtrcM+xWELP0hOTfJFmknA p8FGC5zdCksTJCF0Y4FCwctIOYyq70EYZ95ji7UuSk/EmtGDEn9QEAiIK2z7chiW5TB4wP +zUtX7CLeEq2jLtgcAXaq4Ph8ZY6ILjW6rWgJBA1MT2zw+O2HF5GUUfrnVIP4lPa1QDkVC HEc10aIjCJW2GIitO6iIcNtM6YmdjXIemSfs4FHsMKGQDnBoraltJYIQVHrjdhpPm3vIau Dh1Oh6XuXVHF46BqfaxJD37Xjkv/SE9CRptamxAuxr6/te+3Z7hTZ5/AeU5spQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761121031; a=rsa-sha256; cv=none; b=Qqx+b1X3cdWEaDgoTJEuLzSvInM//H8nb8RgRkLUiexL+eby18E3JvUE0tDEROmgtrVZdh MB5w5Dzru6hQincoCZNoes3lQZDx/PHYRObGIVEE9LiFwdOp/Hy6ugPAa0IjN8sfg+YeSz mcEIPSaANB63Hm3XpToA3urTN7NAX6ulkFr8C9vxsd4Q1t3pG5m7knpISj4eua/o8Q6fFY Vaxrddvtn9shngIhPGJoK/oBVWGC8h1Aimq0zZA7TY7JdePD68DUimkTu28TDm2XXmQvHg QTfonq0Go8LY99Es7wTs4o6CxkZSwkQyEhojHSCVAYyZAn23x+TqV6G5/In/nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs28667kTz5QK; Wed, 22 Oct 2025 08:17:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59M8HA5S070211; Wed, 22 Oct 2025 08:17:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59M8HA8k070208; Wed, 22 Oct 2025 08:17:10 GMT (envelope-from git) Date: Wed, 22 Oct 2025 08:17:10 GMT Message-Id: <202510220817.59M8HA8k070208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dave Cottlehuber Subject: git: e27e5b6b0177 - releng/15.0 - release: split up Oracle Cloudware tools List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: e27e5b6b017734f65b7be0b503eb6aeac235fbf2 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=e27e5b6b017734f65b7be0b503eb6aeac235fbf2 commit e27e5b6b017734f65b7be0b503eb6aeac235fbf2 Author: Dave Cottlehuber AuthorDate: 2025-10-20 09:35:37 +0000 Commit: Dave Cottlehuber CommitDate: 2025-10-22 08:17:01 +0000 release: split up Oracle Cloudware tools Sometimes one or the other but not both tools are present; this ensures that all cases are correctly handled. Reported by: cperciva Approved by: cperciva (re) Sponsored by: SkunkWerks, GmbH Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53186 MFC after: 2 days (cherry picked from commit 81d807a90611a4980cae843b404d99c27edc1893) --- release/Makefile.oracle | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/release/Makefile.oracle b/release/Makefile.oracle index 3573f29b96c1..6d792cc9fd30 100644 --- a/release/Makefile.oracle +++ b/release/Makefile.oracle @@ -24,21 +24,28 @@ # Syncing to all sites should take 2-3 hours after this final step. ORACLE_BASENAME= ${OSRELEASE}-${BUILDDATE}${GITREV:C/^(.+)/-\1/} -ORACLE_PORTS_LIST= ftp/curl emulators/qemu@tools CLEANFILES+= cw-oracle-portinstall cw-oracle-portinstall: .PHONY -.if !exists(/usr/local/bin/curl) || !exists(/usr/local/bin/qemu-img) -. if !exists(${PORTSDIR}/Makefile) -. if !exists(/usr/local/sbin/pkg-static) +.if (!exists(/usr/local/bin/curl) || !exists(/usr/local/bin/qemu-img)) && !exists(${PORTSDIR}/Makefile) +. if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf -. endif - env ASSUME_ALWAYS_YES=yes pkg install -y ${ORACLE_PORTS_LIST} +. endif +.endif +.if !exists(/usr/local/bin/curl) +. if !exists(${PORTSDIR}/Makefile) + env ASSUME_ALWAYS_YES=yes pkg install -y ftp/curl . else env UNAME_r=${UNAME_r} make -C \ ${PORTSDIR}/ftp/curl \ BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \ all install clean +. endif +.endif +.if !exists(/usr/local/bin/qemu-img) +. if !exists(${PORTSDIR}/Makefile) + env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu@tools +. else env UNAME_r=${UNAME_r} FLAVOR=tools make -C \ ${PORTSDIR}/emulators/qemu \ BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \ From nobody Wed Oct 22 08:25:04 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs2KF09vwz6DtwR; Wed, 22 Oct 2025 08:25: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs2KD6mBcz3MrX; Wed, 22 Oct 2025 08:25:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761121505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6cQQOrUY+eihlwBl6pFzDQTx7Dt6WNTjCj6+GPwU6hQ=; b=BMySUqYzEzswMcSXbwGPRqv3JYu7Q059TiBEjPYn18PS2lbKFFThx7E1JlPSxoR4wtvk4W agNNkaWiwT1HRr2N/0I+1e7sAj+vOE0LUF9UyFnnOgH2dDgNsEdqz1lC73rREk+Oy5ivM1 Ch+PEs0JmncI29EyLWYeupSGOutQUa6/9ABATB1SS/a51h3Al4Ftrm2Oao5/64cTzjqCZ5 FOaO2HR4V9gIUMDKXZXecRN4JXzWJ/uxmbFGCCO5WSL9CNasAzzD9ULA4j1god7lImEpFS 8xutKcYAbV8whGeWPfQi8o86UcOA6gOFbS01wqS9rqmTX98huJ8OOBqoRJoChw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761121504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6cQQOrUY+eihlwBl6pFzDQTx7Dt6WNTjCj6+GPwU6hQ=; b=EtAdcinMVDCC7sy2r7wZPkod36iC1bpjpf45S6QuO+ZEE4pWYjVQ4LSRZZiOvOFXIgM41O fAFORWZJJUZDEUgtz6VnGqD7NYNzLn1QrDW1fIaJqA+XHQG21vonmw6SVLhSg2MjBxl3g2 b5MK5Ry4KodOehKV7fDNx5bYIRbaHeWTgurp9p/zLDU1YFogDki2jM/QEx6gJ5HSEu1bKX oqOMpL5hXW2WD5Rogl0KVZewDJbrHDP5CY9jTud8MyqYtw9H0cm7VQbZ7lhKqsNov9plG8 gbCQoSU5+2O1w4TNj6m6cniXnr/1RECQ6mY7IRSc9eKfuWTXzKPJki/30sdqfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761121504; a=rsa-sha256; cv=none; b=qMXbtzWiZqJzR9cLyam+E2hhATPEKGXBLtYT7tLA9/Rq+thUeTIjRZ+3EI5nRkRqWYCTyB 3eshAy2MKYzLGxl5rtYx7e6TMpjFuzZCvW5WW2vKAqkDxq++h5F1tYnbsdy+9NB5aiBQh5 aoLPpZJ6Fxtb8zh2NSm6Y01FXBedGrHqvJKsb95ooEX3Nsr0m9EY/SgCdd0nkYj5eBHAPY QwUkyhXn/FuS2nv6jRtL0ZrYNZKR6Xy8+RIzg0OVG5ZUhMEYmEV+7/vtPisIJTFn+S5NmK hX2WKC1z4VNwu3b07ymQKNXSSJ6jh/lhz0NbmT4DMmW40DULeDq/HnmjyyN2Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs2KD6N7Xz5kG; Wed, 22 Oct 2025 08:25: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 59M8P4Qp088326; Wed, 22 Oct 2025 08:25:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59M8P4dC088323; Wed, 22 Oct 2025 08:25:04 GMT (envelope-from git) Date: Wed, 22 Oct 2025 08:25:04 GMT Message-Id: <202510220825.59M8P4dC088323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dave Cottlehuber Subject: git: b6cde3ca5dbf - stable/15 - release: split up Oracle Cloudware tools List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b6cde3ca5dbfe6168f41ffb1cf4f90fb38961b3d Auto-Submitted: auto-generated The branch stable/15 has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=b6cde3ca5dbfe6168f41ffb1cf4f90fb38961b3d commit b6cde3ca5dbfe6168f41ffb1cf4f90fb38961b3d Author: Dave Cottlehuber AuthorDate: 2025-10-20 09:35:37 +0000 Commit: Dave Cottlehuber CommitDate: 2025-10-22 08:17:48 +0000 release: split up Oracle Cloudware tools Sometimes one or the other but not both tools are present; this ensures that all cases are correctly handled. Reported by: cperciva Approved by: cperciva (re) Sponsored by: SkunkWerks, GmbH Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D53186 MFC after: 2 days (cherry picked from commit 81d807a90611a4980cae843b404d99c27edc1893) --- release/Makefile.oracle | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/release/Makefile.oracle b/release/Makefile.oracle index 3573f29b96c1..6d792cc9fd30 100644 --- a/release/Makefile.oracle +++ b/release/Makefile.oracle @@ -24,21 +24,28 @@ # Syncing to all sites should take 2-3 hours after this final step. ORACLE_BASENAME= ${OSRELEASE}-${BUILDDATE}${GITREV:C/^(.+)/-\1/} -ORACLE_PORTS_LIST= ftp/curl emulators/qemu@tools CLEANFILES+= cw-oracle-portinstall cw-oracle-portinstall: .PHONY -.if !exists(/usr/local/bin/curl) || !exists(/usr/local/bin/qemu-img) -. if !exists(${PORTSDIR}/Makefile) -. if !exists(/usr/local/sbin/pkg-static) +.if (!exists(/usr/local/bin/curl) || !exists(/usr/local/bin/qemu-img)) && !exists(${PORTSDIR}/Makefile) +. if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf -. endif - env ASSUME_ALWAYS_YES=yes pkg install -y ${ORACLE_PORTS_LIST} +. endif +.endif +.if !exists(/usr/local/bin/curl) +. if !exists(${PORTSDIR}/Makefile) + env ASSUME_ALWAYS_YES=yes pkg install -y ftp/curl . else env UNAME_r=${UNAME_r} make -C \ ${PORTSDIR}/ftp/curl \ BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \ all install clean +. endif +.endif +.if !exists(/usr/local/bin/qemu-img) +. if !exists(${PORTSDIR}/Makefile) + env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu@tools +. else env UNAME_r=${UNAME_r} FLAVOR=tools make -C \ ${PORTSDIR}/emulators/qemu \ BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \ From nobody Wed Oct 22 12:40:52 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs80N6TBBz6FDJT; Wed, 22 Oct 2025 12:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs80N55n2z3l8c; Wed, 22 Oct 2025 12:40:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761136852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fy2yPKjquDRF+xx0FqLuZLtAyIHdQjGxnun4RdO3W10=; b=pO4yMt1gx4DbozNJdnCBQ66MZCpRwtX1yZmwhV+yBy6I+2jnckj1ocLhWs4D1PLY71gReC qqqHdlR0w+6lcfwEdvuWMPAQgcQWKsBCHmjZ/0e6ohPH/moPnFzH0Bc1nYOZPq0yzyUnbH eyspuG1qLJlNi4brrPwJHxXgoDfbrucJo8Cok0jKxKtKZKivKNU4UYq8amLPPdKpflaO+W dInrZpGsUTOS+rzvZ8YImrgQCbrQJSLLZwF3QHnYNSJLNxImoZ8+FQbWVFgUZP9F35Vxyz ib0nouCbvxAEQoW3YsBX64QIaF7aQ+YHllOZJ9wXBnyDO7RzTPO26DSZiI4ThA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761136852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fy2yPKjquDRF+xx0FqLuZLtAyIHdQjGxnun4RdO3W10=; b=arbhUFS+apgoetrLPitlMypYCpI2MxdPMIOiq6Tvf0Xf5Oq8zPT4p2V7jv/PyCvrOF8hj9 Y9O6LDOPPln1MdV2bHqyp7Xamwbo42jLERufBPWFp2m/GUL62sMHu+PLG/96rwSzZr/f0t Ekht3TCUQxYUDcj7cOO4J5JJ421hUVqy5BGL2ziIJ3zVPPO0Yke925QwIdGT1xW2yU+LsN owlNnzcePNmttibVQQHEEwczq4h5cL0SW/iTmMYz1f5SBC0b7NYzu0/lEsM5f9ka82WpQr 1QLyHnrwwe2XTmj/NvMUzeT9mOspxE19+eNfoGxxiFiWycoa+fGs+45Ml4EUYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761136852; a=rsa-sha256; cv=none; b=iQC28sRlwtuF3Eis5wJuKu88ZgcmW4YfjrIQcvf26CHgOGP/JjSq6tDbPd3YajpcywwdbU PAZmkWfZ0yR0crLujFbxfuOksgutH+ew4NbHrX6SteuzITxFqeTzgUYAqUfrou01R62+J3 yB/G3uuFLSXs1QPq26W9QkmJOtSeS7tmImTu2BMMa0u8dEaq5llOQCqyExgCg8mDNw6eI9 9AiNOGe27YjVwsWocIS71hx69t14ADk/fnkBxQxkaHN9ro+SGJzi6v9A9xpwerNdQojd7I wDETSLIVBVjsqcZ8WPkxTI1MVOEUKts3LzoStUTxxZpWOdar49JRVd8V0FbWJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs80N4f0GzDWb; Wed, 22 Oct 2025 12:40: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 59MCeqaJ070161; Wed, 22 Oct 2025 12:40:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MCeqvT070158; Wed, 22 Oct 2025 12:40:52 GMT (envelope-from git) Date: Wed, 22 Oct 2025 12:40:52 GMT Message-Id: <202510221240.59MCeqvT070158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 604b6458f3f3 - stable/15 - bsdinstall: Use pkgbase release URL for BETA/RC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 604b6458f3f327206a56da7ba80c2df7965a0761 Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=604b6458f3f327206a56da7ba80c2df7965a0761 commit 604b6458f3f327206a56da7ba80c2df7965a0761 Author: Ed Maste AuthorDate: 2025-10-20 12:38:03 +0000 Commit: Ed Maste CommitDate: 2025-10-22 12:40:21 +0000 bsdinstall: Use pkgbase release URL for BETA/RC PR: 290238 Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53214 --- usr.sbin/bsdinstall/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index e5bb3197fa05..5d7be97ed7cf 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -22,7 +22,8 @@ REVISION?= ${_REVISION} .if ${BRANCH} == CURRENT || ${BRANCH} == STABLE SUBURL= base_latest -.elif ${BRANCH} == RELEASE +.elif ${BRANCH} == RELEASE || ${BRANCH:C/[0-9]+$//} == BETA || \ + ${BRANCH:C/[0-9]+$//} == RC SUBURL= base_release_${REVISION:C/[0-9]+\.//} .else .warning Invalid branch "${BRANCH}" From nobody Wed Oct 22 12:52:36 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Fw4dlFz6FDpc; Wed, 22 Oct 2025 12:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Fw452Dz3mfl; Wed, 22 Oct 2025 12:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9hdKUQFdFS1dBlVj1Oti5redms8qxaX93qXGLRI90M=; b=iLWQUWPE0ROAIwu1j33Kr1Mvdzyz8nCDp8Sf1ULqCmgYZQ7KPRSnH7uZg0sKavxT1M+am7 c5fxAIc89bKwShbU/4/zbSLlW/XUFpgurtbKP7lfDKF4eNsIBKxvhdPRmzYJpYDjtWXmBP nJ70kMhp8Q//lBBXbRWdeqxF1JzuWlz38fH5iRNTKmiVdbgEHe5K9wtG5wKJiuvAIZT8Rc kZxCtjKbjK5mGb6n7kM8pfOCJ8lATG7tvumCCQjifOuFCTW5qoxjN08lV4jbfwD7z1lbaI LDA00yiBlo783rnZ7QfEGirgJ42HUmn3F747AvxoMOcajuBiEhujFB5ucZEk6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9hdKUQFdFS1dBlVj1Oti5redms8qxaX93qXGLRI90M=; b=UflIEL/dyyvyChkbM8/DHoEAKYl3Kmh/cBcgrXFiy1+CYs+lmk/BV6SdkhTFuomUDGh6U7 r0vyRMoqCMS91ERpz2lSOfw+HaM4ooVzCjDsTidMGYVZ5DqEBt0vAqGwCuWogHx55TKNzt 8VX35LxPA8iH7TUoJdbNrk6XPqkP5U543QvRvWan/E7uWyHyKIBjPI+FXwPPLqb+Z3r3vA 5bq7yJrJy0yF5+YJDjeGWk4Xng1K0KRERCuvqEWFA4EoQpLDV9PjVe3qnKQ2g2uhIgxbaX 5uJGCu6PveJ79gH/9VfGmbP5gYy1Zq8DAiLdfZ5ReU7kVSj6kyHmlrN8Io6xYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761137556; a=rsa-sha256; cv=none; b=ROENQUTlu0jbE+uwiEPgUsvFq86x4usFvIr8K+ol0SOYIktVWXOxypEYPeOlR1wgQcvzgI AXS6V3vXTK/fs5LPcQUozB0y17w7iMV7PRiE6qf2T+5nuuEGf4+QnXpSupk95+wpYBgH9/ eUCs1/5f7Xal18FCnP8VXnY2ibBWSATGPs6fKFk6iJrja9u3RoqKv6oJKSihymb5fh4try 5Z37d28A/8+lEimD2rqaXajLNmbx93LYlcHL1tYjf3HWZ4Aat4W5jHz7MTWI3564k1BD3J 4/Zw/RUrVQr2nT4SmmkUyh0vA88vI1NLdVI2lKD4ev4aAbFR9A/AJfaNqEgT6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Fw3R1rzTkc; Wed, 22 Oct 2025 12:52: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 59MCqa7k096102; Wed, 22 Oct 2025 12:52:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MCqak8096099; Wed, 22 Oct 2025 12:52:36 GMT (envelope-from git) Date: Wed, 22 Oct 2025 12:52:36 GMT Message-Id: <202510221252.59MCqak8096099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6a5f0dc705c4 - stable/15 - exec: Check for errors when mapping the shared object List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6a5f0dc705c4401454d4fcd61e7301b992bfea13 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6a5f0dc705c4401454d4fcd61e7301b992bfea13 commit 6a5f0dc705c4401454d4fcd61e7301b992bfea13 Author: Mark Johnston AuthorDate: 2025-10-14 13:33:33 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:51:59 +0000 exec: Check for errors when mapping the shared object In the non-ASLR case, there is no check for an error from vm_map_fixed(). Restore it, it was dropped in commit 939f0b6323e0a. This bug could result in a refcount leak of the object used to map the VDSO page. Reviewed by: kib Reported by: Ilja Van Sprundel MFC after: 1 week Fixes: 939f0b6323e0 ("Implement shared page address randomization") Differential Revision: https://reviews.freebsd.org/D53065 (cherry picked from commit 7117c86fcb7ebee4483097cefa9b143de8d78ee0) --- sys/kern/kern_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 0fc2d0e7f1bc..b2c09b47f103 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1314,7 +1314,7 @@ exec_map_stack(struct image_params *imgp) MAP_INHERIT_SHARE | MAP_ACC_NO_CHARGE); } else { sharedpage_addr = sv->sv_shared_page_base; - vm_map_fixed(map, obj, 0, + error = vm_map_fixed(map, obj, 0, sharedpage_addr, sv->sv_shared_page_len, VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_READ | VM_PROT_EXECUTE, From nobody Wed Oct 22 12:52:37 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Fx5Jmqz6FF9G; Wed, 22 Oct 2025 12:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Fx4cPrz3mWR; Wed, 22 Oct 2025 12:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bV8UONL7KChXBoUYt6hvtZU5LzZO5RNNaLkGyHO9HOk=; b=bXTrN0jr/LAvXU0y+RhUEC2ss2qIhSrPUBbYdojzgxVnF5bWghFMH5+2BVKn1Y0BTmoNHg OjwTAXLFA/rETTvyWHctEVqx5xqfR2Y0qlmBIpg9HiauhSuXCyqd14Os0feX3cbVdkPyk3 rCnIAmujh8z1IP2AcRTcmKS/KpldpFps9E/DjATdQmm55zmdtMfYDgPmARsRIG8CT5AiN7 WbwHlP/r9GwZtWmzhC2fK9BQasSAzZ9j/2ohOkEGdyn1mca6MfTdcbjPDZY4sPVglCJCpW JvY19t3Yc6W7XNd5L3PL4u9H7z88f5o/1N10LXThWkcPpwb2ftwSuj1rRSMrJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bV8UONL7KChXBoUYt6hvtZU5LzZO5RNNaLkGyHO9HOk=; b=mb9No9hVX/v9Ak5H94OnDdFIn0Uxwdk0+YsyX3GOkdlb85Z+Y1Oci93f4YXVQ+AzzzDvGQ 3YThiCzjo6mOqMprZvFmU55wU2Xz1zd9eb8ZlqtHzTwLamQUdSV4v2GhcoiGl1Kt6bASUj bABqGUDxrfgpYoN10seUZcceryI3Ey2jYzPmJSSsy3uGycwHZzgJ03plkQ0074cBS96LGz lDfvTmQrTi5fFc1xTzQSELZrxUP5L5qN/o1B3GSZEFavNAhh6f9jhc88+qoIUNdvTMR0vC XCNM5NrD+EOZpWUMLR97Quy79zUXQicsbLQpJOZRko9NfZeCMrUp/EVXlsIS8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761137557; a=rsa-sha256; cv=none; b=uX3oXWQQxJEmykqGAal5Da/542P5aOWVM9gi8AZX1e2TMcL6hzuG8nA85dBOsXTFRO/axS tncWwY8HCgMyn4mZ6ZAO6kqd8VFnGsbpQ/cbokE2va8PlekBGad6PAYwYFCKD3gHj5YzWl zYzHavuWOjH2IqGNbn/2kfl09YP/0MBhn5WIyV6PXRcV3dCaMxTW7kOQfiFeqHRDN8Tnb+ 5w1o3O8EYLn8SHbTLyZC9xcE9Isw9mp5hHwCPN3o+TqWGg+a5pmOqzvzs0nGAysDw+jpTl 1hRH6XHfgtOGj07qhIupM4FSJUHnfgpULt/JaIhMPGDXieezDOqVSFMxaPo9tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Fx48HYzTb8; Wed, 22 Oct 2025 12:52: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 59MCqb92096136; Wed, 22 Oct 2025 12:52:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MCqbBu096133; Wed, 22 Oct 2025 12:52:37 GMT (envelope-from git) Date: Wed, 22 Oct 2025 12:52:37 GMT Message-Id: <202510221252.59MCqbBu096133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 302c4c540e44 - stable/15 - ipfw: Check for errors from sooptcopyin() and sooptcopyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 302c4c540e449e3fec02e27742f7572039347f66 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=302c4c540e449e3fec02e27742f7572039347f66 commit 302c4c540e449e3fec02e27742f7572039347f66 Author: Mark Johnston AuthorDate: 2025-10-14 13:33:13 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:51:59 +0000 ipfw: Check for errors from sooptcopyin() and sooptcopyout() Note, it looks like this code may be unused since commit 4a77657cbc01 ("ipfw: migrate ipfw to 32-bit size rule numbers"). In particular, it looks like the ipfw_nat_*_ptr pointers are unused now. Reviewed by: ae MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53068 (cherry picked from commit 2df39ce5d4a8836ef5fd3c2666f48041042eff42) --- sys/netpfil/ipfw/ip_fw_nat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 1e2ff1bca290..19393d5b8444 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -999,9 +999,11 @@ ipfw_nat_del(struct sockopt *sopt) { struct cfg_nat *ptr; struct ip_fw_chain *chain = &V_layer3_chain; - int i; + int error, i; - sooptcopyin(sopt, &i, sizeof i, sizeof i); + error = sooptcopyin(sopt, &i, sizeof i, sizeof i); + if (error != 0) + return (error); /* XXX validate i */ IPFW_UH_WLOCK(chain); ptr = lookup_nat(&chain->nat, i); @@ -1104,7 +1106,7 @@ ipfw_nat_get_log(struct sockopt *sopt) { uint8_t *data; struct cfg_nat *ptr; - int i, size; + int error, i, size; struct ip_fw_chain *chain; IPFW_RLOCK_TRACKER; @@ -1134,9 +1136,9 @@ ipfw_nat_get_log(struct sockopt *sopt) i += LIBALIAS_BUF_SIZE; } IPFW_RUNLOCK(chain); - sooptcopyout(sopt, data, size); + error = sooptcopyout(sopt, data, size); free(data, M_IPFW); - return(0); + return (error); } static int From nobody Wed Oct 22 12:52:38 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Fy6hC8z6FDg5; Wed, 22 Oct 2025 12:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Fy5YSRz3mr3; Wed, 22 Oct 2025 12:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtAGSMD3Fn5NhL23rcQ+akC8w2uoVHj1fIarn3u65iY=; b=TEiVLnVjjO7Ap16W4TmCIOHP4RYdqH3uogG6AaT2xgdC7ZSnMGQkbjysgpTmEc7vN4IxUL /LMmysTXka4eT/Zop7m2QJQFUVuNC4YIVCoebL9SISk4HKnZVB+Eic6AVPw8Gj/mYsrPB/ hLq/Fv6xZdZDDq5Jt7KkdWeBriHVAgJyT/9gEbyusS142yUKEZH/Ow0wacDMooBoPmlCJC 1gRydCRneDE7f6CgAtTvQ28Tk32MMly3W87D5VNx/5zR52qU83ZlS5lIC7var6ztnlggKB vcUfIFe573PXx34msEK7pOoAw2gVH61EI5tVdtj42EGeyXX7YlQA2sFFle7iSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtAGSMD3Fn5NhL23rcQ+akC8w2uoVHj1fIarn3u65iY=; b=hyW8r9F8bYUAostiAHGDg/RHzGWESLOb9/e8IDHe2zTdZAQCEzUZz+gffVsE4Retb1B/VK 9duqJKSdWog10yqg1iFnrqwUz6Db3ORU6QOGzIW9kJ7SmUGEPHb72d79UOM9tZTvNKErSh k5R+gl4jHfVwmM2pXfeJT6+nR1eXYSwnCMVM1YtZbiJ8IOixTXkZfsIGRAJQSNUxXr1v45 +up8oqsvt6Q3xvUYkfpx8W2OGJ8A8r2ucZrRN17ayY3xAp0PGr3Flq7z4d8x5XQnDHCS57 7Bbmjl7xPpfCuT8Y33D/W4qVCVTojwBzsVZa65ye3s7ngJu+VuSqAsenEtHsXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761137558; a=rsa-sha256; cv=none; b=FV9OQp2CTyWwRgA9mcLxkMaTmNkrhp2AhvQW6lJTActhJqcV0if9T+CSPwgS4s9nZ/ogHY LAg4t67gxm7Cp1bSU3vYXMStKgth201mVYzX0bYXG/tn87TJlnISWotsqOCqPg5bbuHeEC PUPfTug3pC1sbWRGsoTg9Y1NhrMwsdDBtfLvRsxchvC+FSz0tg4DCDFzV+5SeeXrsGd8k+ v7BQ2S7TL2Zs97epQuoo0JkOpOeMAn98nA/ObkAM6d6oRjj9lEQ33naDBxbZjyerkkL0X8 MG5talJfbvMi31Elh4JxCWr8sNfSTKG7ub0iSyC2u7NwNq7CrR9ab6iPYhyvuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Fy4t1JzTh6; Wed, 22 Oct 2025 12:52: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 59MCqcQf096170; Wed, 22 Oct 2025 12:52:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MCqc6l096167; Wed, 22 Oct 2025 12:52:38 GMT (envelope-from git) Date: Wed, 22 Oct 2025 12:52:38 GMT Message-Id: <202510221252.59MCqc6l096167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c47f9af4771b - stable/15 - libnv: Fix a length check in nvpair_unpack_string_array() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c47f9af4771bc7de2ebed4c91628c1f9a7f86a2c Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c47f9af4771bc7de2ebed4c91628c1f9a7f86a2c commit c47f9af4771bc7de2ebed4c91628c1f9a7f86a2c Author: Mark Johnston AuthorDate: 2025-10-15 20:15:08 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:51:59 +0000 libnv: Fix a length check in nvpair_unpack_string_array() A string array is represented by a set of nul-terminated strings concatenated together. For each string, we check to see if there's a nul terminator at the end, taking care to avoid going past the end of the buffer. However, the code fails to handle the possibility that size == 0 at the end of an iteration, leading to underflow. Fix the length check. Reported by: Ilja van Sprundel Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53069 (cherry picked from commit 937693fc9e4ff4045cc674a14902f0d53e84ec98) --- sys/contrib/libnv/bsd_nvpair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/libnv/bsd_nvpair.c b/sys/contrib/libnv/bsd_nvpair.c index c73bc2189121..b884dd260b84 100644 --- a/sys/contrib/libnv/bsd_nvpair.c +++ b/sys/contrib/libnv/bsd_nvpair.c @@ -985,13 +985,13 @@ nvpair_unpack_string_array(bool isbe __unused, nvpair_t *nvp, size = nvp->nvp_datasize; tmp = (const char *)ptr; for (ii = 0; ii < nvp->nvp_nitems; ii++) { - len = strnlen(tmp, size - 1) + 1; - size -= len; - if (tmp[len - 1] != '\0') { + if (size <= 0) { ERRNO_SET(EINVAL); return (NULL); } - if (size < 0) { + len = strnlen(tmp, size - 1) + 1; + size -= len; + if (tmp[len - 1] != '\0') { ERRNO_SET(EINVAL); return (NULL); } From nobody Wed Oct 22 12:52:39 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8G014fnz6FDrQ; Wed, 22 Oct 2025 12:52: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Fz5tGJz3n2Q; Wed, 22 Oct 2025 12:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VlK1BEKRylYWHKORZjsYRFQFZGd1AQIv4RvHGkh3D2Q=; b=D7dNgGsx1KOC0A6sF7igGxmxINUEH4zkiNrsklCosKBTlRCykxuj+v1H6v9H7cFfYR+2eK 5XuNzNuq8TAahY8R1Wp18EoZFby/Lj3kdvJURNOAe4Hr4GIZigq7OtVGfKlbIMX4sv+l3P RoDcxVl/40/57L2Bqkl8R5hfpOiP5Gmtj1QcrT0xcXO2sSau9n2zUwAuPs58SS4ghcsRU/ 7b6LBWVQDwwMTv8JoSJM107jPT4iQZqzckE0Hwsx+qa176DW8/R8SMPLXASZ/qdVoXjT02 X8tStyYDrMEsM2p8L687L//+7uv87zur4DnLWe8pL+Zm0csI8kx5zLfXpE3dLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VlK1BEKRylYWHKORZjsYRFQFZGd1AQIv4RvHGkh3D2Q=; b=WEBghRKB3GAwaAB/f/WptDsR5L8sy9vmzMFaxrsAFdRxyMJrInjWubs4eC17OypdrNzHxb Nz8qCBoiSJpqg+l0UnI2dp1y8YlecKpt5EvTEkIm7/T1EiFUx03yBazSkfL31U70vbIReR 4m1Rhcu4hcjHK8AOYyCcfWl8sddk++Cdw/fhsVx2Fn/i9B4WFaZPM4apsg/i1LN35PklF1 BIt7oYZYZH1782UkLgPRK+xReZiaBi1HIem6QTpSjixUY4pc2wCHyju3bKx+4tlfijqKK+ 80KzkHvwTYqQJqG5Se9vHK7XZWiX4FcThirekF/j+1XdxUebwNJEzJUnx0gxZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761137559; a=rsa-sha256; cv=none; b=RTyiFroJpHyBs0BqcUEvsIrg+tG4ZlS8l2k73VL6o6CxC3BH/uBR+S+/kaDSj/gEeAt6Dq jCbVSiF3UzbThY1qI8LjZlSf+jXWBpNnj+7yjiNW4jS0H3HEGQXXCuoIsN75BuECVqhFSR CjG3G5gp5LWIFQOt2E85S0s4ua4ebvVs3p9xfcXujMa/+RGeRmd7F+caakjxQ5foXh3grv p0XRwEFuukPkEfRLm2gDsew8UeLSfxigrdUJ2pEa9bY0KsbSbmRS/bAP9irYoj8DslDHtw cOOily9vLpZRshUumCq1UmMVt4Iu5D814ofKAl1gqtKyvF3AEACSIFEwLFGigw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Fz5PgCzVF6; Wed, 22 Oct 2025 12:52: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 59MCqdsS096204; Wed, 22 Oct 2025 12:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MCqd3L096201; Wed, 22 Oct 2025 12:52:39 GMT (envelope-from git) Date: Wed, 22 Oct 2025 12:52:39 GMT Message-Id: <202510221252.59MCqd3L096201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 09ae918e1f00 - stable/15 - imgact_elf: Check note body sizes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 09ae918e1f00572f9045283c281cf2d210ece491 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=09ae918e1f00572f9045283c281cf2d210ece491 commit 09ae918e1f00572f9045283c281cf2d210ece491 Author: Mark Johnston AuthorDate: 2025-10-15 20:14:36 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:52:00 +0000 imgact_elf: Check note body sizes In parse_notes we validate that the note name fits within the note buffer, but we do not do the same for the note data, so there is some potential for an OOB read in the note handler. Add a bounds check. Reported by: Ilja Van Sprundel Reviewed by: kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53063 (cherry picked from commit c86af2cc4cd12fb0174843b22d737c3b5b5d55d0) --- sys/kern/imgact_elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 1bc2491a1a12..bc4fcad6c61b 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2831,7 +2831,7 @@ __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, } if ((const char *)note_end - (const char *)note < sizeof(Elf_Note)) { - uprintf("ELF note to short\n"); + uprintf("ELF note too short\n"); goto retf; } if (note->n_namesz != checknote->n_namesz || @@ -2839,9 +2839,9 @@ __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, note->n_type != checknote->n_type) goto nextnote; note_name = (const char *)(note + 1); - if (note_name + checknote->n_namesz >= - (const char *)note_end || strncmp(note_vendor, - note_name, checknote->n_namesz) != 0) + if (note_name + roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + + note->n_descsz >= (const char *)note_end || + strncmp(note_vendor, note_name, checknote->n_namesz) != 0) goto nextnote; if (cb(note, cb_arg, &res)) From nobody Wed Oct 22 12:52:40 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8G1308Cz6FFGD; Wed, 22 Oct 2025 12:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8G06ym1z3n4j; Wed, 22 Oct 2025 12:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JWsSzGKlCm90ydSBIIXzVTW/3LkEV1PqW3LY48dUSI8=; b=QTpO8VjdX+C5hSwupJlWKv6Ros3XC+mks4tz373c0NY7nDgEekSZD5MSqVoji6hMMkLD0u RtkZJSSO4nbbYSws7C8Vin04pUqp4OVUsPL0eg6q06Do2k0cz26iNBeXC6Kb2X5kTRMqyr Q3JIT8vQWkpCMb7uROmItsHCLJ+fZWf94E7h/RKvR1k0FYdOYduwgPLchEe3ttvGZ/HPnI 5avrlJYjuetKiFJUXA/szuijn+CyNaA4Q/YeaYQbeucFC+EIg9JQ3Fxir8Drz/vhn3AOH6 iR2/TLawWR1CciQ6rBnziGiDwJnvX7lHbd3L+2o0iK42ygcQQUXgqBuswrczcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761137561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JWsSzGKlCm90ydSBIIXzVTW/3LkEV1PqW3LY48dUSI8=; b=cbHB9/H6cBxVj6y4ZkNA7HClrsVzc1Pr+DbaevtiKgYts4DVDvIQHpPSFRas9DOiWUv141 v7Xg09o0wl8o6IMXGA11VH9A8vjWmiKuj3gTGBovXsq/maFxHrIDuUkXARTHbk3Fr7c8Zu fTuzXgyotfBXXQS8bSnqiHWlKOa+YxoCRuyBYCEHN1VpX143EljZAiNWLGJp4GrjVdScTL o41lXT4PXJK7f8skdoVK9HLmuahpQpqolHRjAAOG6TxYYrKDZWTS3kDTtmx7po/6F9trRl p/nQxj8GkjtqkDbiMH9um01DvH/4MJLi1GiV5v2mEI35ss6IzH37RoNIb7gVPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761137561; a=rsa-sha256; cv=none; b=lEEiq7XPzarQFlqfcAgRoDGhJHM8cFUY3IcZPLzm0ovgrjX0GjqEy7YgNeaeMgeU6Mx881 V1nDV6eyw2+ZFqI9Xs/4ZC3Q0TlB177E7LeKBgMIyXGd8NNW1aVVEd0Q8IA59am+ktXIYK cTTGV3sfH7QpU4nnuw3GX0Jk+WCXjKy06bh3e25LMIoRJVUzrhakLZRj6TPPNYE6qN7VYF 1XQU0OK4rpA38EDCpbZ98i19ymDia8LYWc7IDxiBmMEmNVlOZx0okgommJ0f6SksRyS+H3 AF0iZrSOMxBkb4gZX3HOzeDUB4TQm+Cer1xlFBmE3OWzod9xp9/eV5g3sHAlKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8G06QBwzTh7; Wed, 22 Oct 2025 12:52: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 59MCqeB9096238; Wed, 22 Oct 2025 12:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MCqe1j096235; Wed, 22 Oct 2025 12:52:40 GMT (envelope-from git) Date: Wed, 22 Oct 2025 12:52:40 GMT Message-Id: <202510221252.59MCqe1j096235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8028cb0b3cf5 - stable/15 - rc tests: Add a test to check for warnings from rcorder List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8028cb0b3cf586236240d4941337bc27b6950ec9 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8028cb0b3cf586236240d4941337bc27b6950ec9 commit 8028cb0b3cf586236240d4941337bc27b6950ec9 Author: Mark Johnston AuthorDate: 2025-10-08 12:51:16 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:52:00 +0000 rc tests: Add a test to check for warnings from rcorder Reviewed by: des MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52954 (cherry picked from commit 04d47c7cde54cc325cca3f47113976f5500dc58f) --- libexec/rc/tests/rc_subr_test.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libexec/rc/tests/rc_subr_test.sh b/libexec/rc/tests/rc_subr_test.sh index fe6d3b8264c9..9ddd13b61a7c 100644 --- a/libexec/rc/tests/rc_subr_test.sh +++ b/libexec/rc/tests/rc_subr_test.sh @@ -26,6 +26,17 @@ # SUCH DAMAGE. # +atf_test_case no_cycles +no_cycles_head() +{ + atf_set "descr" "Verify that /etc/rc.d/* contains no cycles" +} + +no_cycles_body() +{ + atf_check -e empty -o ignore rcorder /etc/rc.d/* +} + atf_test_case oomprotect_all oomprotect_all_head() { @@ -130,6 +141,7 @@ EOF atf_init_test_cases() { + atf_add_test_case no_cycles atf_add_test_case oomprotect_all atf_add_test_case oomprotect_yes atf_add_test_case wait_for_pids_progress From nobody Wed Oct 22 13:01:13 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Rt34x1z6FFwr; Wed, 22 Oct 2025 13:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Rt0Nqdz3pnp; Wed, 22 Oct 2025 13:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUzY5O6PL74p8npIh2p3xKAdm9RPiwMbsUssAJUW/Wk=; b=Mk6ZRTfbyElOdZI/eH8Le0zZtBvEdC9MNxrR/m6f+ElzzFFNNJhuhb5DQuam6tTplpDLGd wY6KHf/nLtu6oMxkAy3VykAKzT8lsXemsBtv4H/FNwuS2qYZNNkMIDjsF8ApBXNkxL/V4z 7WJRHeXMqEYkGsOsRrEHKN165q1lNZkPvXf8sCsf+FB06/65GVCU3khRfQGB0Ccpc/9Cl5 UiEl5i97EkYw6jXj64Hwu9ioNqHQyFY8PypWQ3gOz2dfKmZLer9V28b50XczVJU3V8zWKx uV+qOYzUq+chTB5SEeq2N6i9Gn+VZn+iMDdRGTCvM9lbmLFiaIUylljpesN+Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUzY5O6PL74p8npIh2p3xKAdm9RPiwMbsUssAJUW/Wk=; b=chBp1m4a4VCgvGB1OdyyViQSXabiOj3sTAdd5uKNJMNIJanMtlZIKNm9xuSqlOH5uMDEBz JHkVudzTwOolKCc+S593+kVbe56EI1AW1uDnOQ15xNjKJU8Ci2nzizMxuqwn7jiAI0mSF1 /Cvinh4moX6VfQA5b1tBgt+FVhl410zUAa6EdNdGaSQfV1JPX0ZsxviCYoBItAZr6rfZfn 9Is59ICdjS056DfR62xdyf2hANQ9v1wAwcBR6ZNwdz7R/Pgq1BHZ4L8dOut1JvzEEmQWf8 vciccGJ7jwLUDKjkUA8SK2tEjcq9qUhA+jgudepvlTMxuYnGLM1Nu/MBntbWNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761138074; a=rsa-sha256; cv=none; b=A4BEgLKRbnE7NA0P6Ys40v9OapO7GEvFbwuiPdGfma58TZAGZQGiiRs5YsWxLFYEYzQajI eafZJZ6qJxgpPODzFFLAb47azDP22E7mzRudaPaP2Pno7S4w+V7uSfgNjfk8NkB+Srait/ xHxh6SiG9n7xXiuF52aRR+D1RCgW5mMJnN+ITYkhOrXXW0NmAq+nm5FS7ctMs9Gxwdt6Di n4mMaybmWIdZJHCoqoSy09KnrAT+e7Nu8VTeN4rw6rPAh7BMfN+0H3Fywl0S9D0Mw6sVIr en9JwTZmuCneKIkg9pUOp4HU5bnUX91u8raHHn+mBrDEIZK2nVr7XxO2iY0Hxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Rs6wC1zTbK; Wed, 22 Oct 2025 13:01: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 59MD1DsA009729; Wed, 22 Oct 2025 13:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MD1D0A009726; Wed, 22 Oct 2025 13:01:13 GMT (envelope-from git) Date: Wed, 22 Oct 2025 13:01:13 GMT Message-Id: <202510221301.59MD1D0A009726@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2078f67215e9 - stable/14 - exec: Check for errors when mapping the shared object List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2078f67215e934cb9c43b93586ba79fd6fbcee8e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2078f67215e934cb9c43b93586ba79fd6fbcee8e commit 2078f67215e934cb9c43b93586ba79fd6fbcee8e Author: Mark Johnston AuthorDate: 2025-10-14 13:33:33 +0000 Commit: Mark Johnston CommitDate: 2025-10-21 13:12:16 +0000 exec: Check for errors when mapping the shared object In the non-ASLR case, there is no check for an error from vm_map_fixed(). Restore it, it was dropped in commit 939f0b6323e0a. This bug could result in a refcount leak of the object used to map the VDSO page. Reviewed by: kib Reported by: Ilja Van Sprundel MFC after: 1 week Fixes: 939f0b6323e0 ("Implement shared page address randomization") Differential Revision: https://reviews.freebsd.org/D53065 (cherry picked from commit 7117c86fcb7ebee4483097cefa9b143de8d78ee0) --- sys/kern/kern_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index f4197609a700..7f6d9a85c6bc 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1284,7 +1284,7 @@ exec_map_stack(struct image_params *imgp) MAP_INHERIT_SHARE | MAP_ACC_NO_CHARGE); } else { sharedpage_addr = sv->sv_shared_page_base; - vm_map_fixed(map, obj, 0, + error = vm_map_fixed(map, obj, 0, sharedpage_addr, sv->sv_shared_page_len, VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_READ | VM_PROT_EXECUTE, From nobody Wed Oct 22 13:01:15 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Rv3J9lz6FFXt; Wed, 22 Oct 2025 13:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Rv1Zn0z3phk; Wed, 22 Oct 2025 13:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=seOPkIW8JICEHkXShF6BLopBVC0up58gXJ5NHh8NeaY=; b=Z+wwP+LiK80UNe4i4PPsVPmgiWvya5pbISrJtNIw8ir48v0BrwFFMQfbEQTgTrrxOdklqG sqQ95cXIg70CoFfa0qtekktIn+gH97s6giA74dv8O0FrkPuwApAfeKJXc3lA1Xd3IH6rXE UZb+xpdBp1cwBx8dWxdI0GxU+hmD/8b1B0jJF6cTxckoNSEbKg7ovVfFroqT4J0Na9oDmZ a7pmgBblaE4RYWVcIypEvN/hnjaAYFfMHdhKPfR97Eaqgl3p9V3HXm2iSBgqLsp8S/MuAR 8lHZLtCM7nhKD28WfK0ukBTAL6fp7CqqDb72L14XEXJdyNQ7HZhsEdN7Jffo9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=seOPkIW8JICEHkXShF6BLopBVC0up58gXJ5NHh8NeaY=; b=qbOd0qFjCgs9u3BzfBs3Cx9Gp3JeoLD0jiL1Hhx7dWrFp79UQAVveYgrI1pQwiVkjG2yvf Pzn8oetOfolHUjD4wkrS/QJuwIeajf24qFLGwSgB/Tj4Rk1vJNo8tT74sv2+TZNob6L/iJ MvUw5rJapkEbsUOi6boJS+XQgK71rJtmPUcMwSwXv3w5OGK2qXTLi/EFKLKW9pJTQRNTjk 6pdQDhLWhil4HX08kDb8vuPNJhpJFu5DDi+70gE5WX5NwT4GY4jUTP8o2fTqaPuS9N70V0 YYbcYBkwswPhCTyvWuvyKH49tenfx27gj1ABqffQJ6GpC/PkVI3xrjDjStKlyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761138075; a=rsa-sha256; cv=none; b=mpC/06hlQoZIT6OQtAMGQqG8/AkaMrUxI74AzCQ3Lb17uAPco+G3w6kOEcySJKTDtwcVFO LoW8iOXBPQ4Q/jl53xN9IRGciBEXrL41XMxmxUezLwVqXTHmf1eIk7o7VWEjHoAUBZHGqo ydMxZyTELvgvRbUggzOtOz4kwTiNNgJ2T8eQyWEfKsfs4tKysO1ajrlJAqBRoPHFLMEqiD 3oCLf81qcu3hq48oPzXuSvk9gbXa2EcpyGZE6nUj3a4/Epc8/3rVa4MF8vcHJg3W7XiBcq 9uxRBFsGVoaI4MZRegV/SnneLv0X2yVBMtv83gtiPaMlKIUsbxGSyQl+0Ff+Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Rv10vxzTbL; Wed, 22 Oct 2025 13:01: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 59MD1Fdk009764; Wed, 22 Oct 2025 13:01:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MD1Flf009761; Wed, 22 Oct 2025 13:01:15 GMT (envelope-from git) Date: Wed, 22 Oct 2025 13:01:15 GMT Message-Id: <202510221301.59MD1Flf009761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6dfca589ea75 - stable/14 - ipfw: Check for errors from sooptcopyin() and sooptcopyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6dfca589ea75b9350af783c0b58eb632b0c752b5 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6dfca589ea75b9350af783c0b58eb632b0c752b5 commit 6dfca589ea75b9350af783c0b58eb632b0c752b5 Author: Mark Johnston AuthorDate: 2025-10-14 13:33:13 +0000 Commit: Mark Johnston CommitDate: 2025-10-21 13:12:57 +0000 ipfw: Check for errors from sooptcopyin() and sooptcopyout() Note, it looks like this code may be unused since commit 4a77657cbc01 ("ipfw: migrate ipfw to 32-bit size rule numbers"). In particular, it looks like the ipfw_nat_*_ptr pointers are unused now. Reviewed by: ae MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53068 (cherry picked from commit 2df39ce5d4a8836ef5fd3c2666f48041042eff42) --- sys/netpfil/ipfw/ip_fw_nat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 4c83c91cf918..c97bf4bf80a9 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -1000,9 +1000,11 @@ ipfw_nat_del(struct sockopt *sopt) { struct cfg_nat *ptr; struct ip_fw_chain *chain = &V_layer3_chain; - int i; + int error, i; - sooptcopyin(sopt, &i, sizeof i, sizeof i); + error = sooptcopyin(sopt, &i, sizeof i, sizeof i); + if (error != 0) + return (error); /* XXX validate i */ IPFW_UH_WLOCK(chain); ptr = lookup_nat(&chain->nat, i); @@ -1105,7 +1107,7 @@ ipfw_nat_get_log(struct sockopt *sopt) { uint8_t *data; struct cfg_nat *ptr; - int i, size; + int error, i, size; struct ip_fw_chain *chain; IPFW_RLOCK_TRACKER; @@ -1135,9 +1137,9 @@ ipfw_nat_get_log(struct sockopt *sopt) i += LIBALIAS_BUF_SIZE; } IPFW_RUNLOCK(chain); - sooptcopyout(sopt, data, size); + error = sooptcopyout(sopt, data, size); free(data, M_IPFW); - return(0); + return (error); } static int From nobody Wed Oct 22 13:01:16 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Rw5j7fz6FFgm; Wed, 22 Oct 2025 13:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Rw237sz3pfc; Wed, 22 Oct 2025 13:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TPKh9w+ivQO0iGicrojntFJSDavKBKP/BVEsaNc6wB8=; b=X/Ou6Crfe1QyQQUc8009mpVssxvzGC5CnPbbqc4SosUDT7or4y4GTXALJ+c0e/tegHisPd dajuaINzP9txzOkDZw5ixTKdWk8Ij32Q1Wrfk7yX7c/xc/M9lAZd6yF+Tb3JWgL6PIoxjr Uf4nS+koHgkysJakVfuDujxiK4jlCp+d+oCSQXMnTJXl7b4esyVbVqYE5G5AOjmeiXtc2v ZCp27ZYj2MkZaFjVs5MCUOrX3noefSc6f7WXKULGiFD24LHbNbM2CTx2Yw2rBmOd0aIhL4 pVobfl6pLDrIHZueryjilsZ2U4xgGJso/FvdvCjblKcU+Lxbh0XFwPq2UOPzpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TPKh9w+ivQO0iGicrojntFJSDavKBKP/BVEsaNc6wB8=; b=hAOSE5ZUD6Wm0MYQX5z1erx+QhKPY7NChQBmoS7EQLFNXEgXc1BDOQ4Y95qGJvCAfCfJ7r lq3T0kmLkEwtQeu44fhWq4lHM1b0NhQpFXiYNBmoeup0rMlcLbkRMplf7ls6QwijP9Do/f ZC767s2aDWGOFnuM5EQThHXPS+fTyAS2m6p3wWrVvG+9brwwF2+9wsF3inmPnalOEHYkXq up3nXgan4eQAFhIDVYpgw70tbKwBVBpo5DyepM7rgv2PcNk9RVtY1fks3P6OfQGisiV6Us mngeEdZTNq8uoxKXn+GFKEaBxUdRzezvdnBGxjxoAeX+EowyGtU9y4k+EQALbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761138076; a=rsa-sha256; cv=none; b=uR/FcXjEaSG6D2BmWgH7PaXW5rr9ZgVNZOKODoe3LKfskBfWGMjvonHQTPpI8C1H01U7S1 ni0JNs7eDVeKPHyDFitvQRvAic3mK/xc4DNiC/6jfQCa26DnnAQlAQY/avkwlFPVtYT9Lw fZyjDPmrRLppo4gpO8+F6ZNQnKATB91RxiG1mRkn2zbOFyw+/kWHgoXAlKL3PKuihMJgTH ymH+NGh89ueiLQjewEOEYc4ETz+m+MkVKtOI27NWc7GR3ApXqaNAg0ztQf5ktop2WwQDzF cagZvQWSK/r2DHvMUcG3ivjfFqjjpCVDut3l6cUVtAPI/VJ5dp/SjPdFZJPeqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Rw1g00zThQ; Wed, 22 Oct 2025 13:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59MD1Gi6009796; Wed, 22 Oct 2025 13:01:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MD1Gc3009793; Wed, 22 Oct 2025 13:01:16 GMT (envelope-from git) Date: Wed, 22 Oct 2025 13:01:16 GMT Message-Id: <202510221301.59MD1Gc3009793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b951c7fd7799 - stable/14 - libnv: Fix a length check in nvpair_unpack_string_array() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b951c7fd7799710141cde2066f2ed4d36e093a22 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b951c7fd7799710141cde2066f2ed4d36e093a22 commit b951c7fd7799710141cde2066f2ed4d36e093a22 Author: Mark Johnston AuthorDate: 2025-10-15 20:15:08 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:33:44 +0000 libnv: Fix a length check in nvpair_unpack_string_array() A string array is represented by a set of nul-terminated strings concatenated together. For each string, we check to see if there's a nul terminator at the end, taking care to avoid going past the end of the buffer. However, the code fails to handle the possibility that size == 0 at the end of an iteration, leading to underflow. Fix the length check. Reported by: Ilja van Sprundel Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53069 (cherry picked from commit 937693fc9e4ff4045cc674a14902f0d53e84ec98) --- sys/contrib/libnv/bsd_nvpair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/libnv/bsd_nvpair.c b/sys/contrib/libnv/bsd_nvpair.c index a977d7941aa3..f6686a66affa 100644 --- a/sys/contrib/libnv/bsd_nvpair.c +++ b/sys/contrib/libnv/bsd_nvpair.c @@ -986,13 +986,13 @@ nvpair_unpack_string_array(bool isbe __unused, nvpair_t *nvp, size = nvp->nvp_datasize; tmp = (const char *)ptr; for (ii = 0; ii < nvp->nvp_nitems; ii++) { - len = strnlen(tmp, size - 1) + 1; - size -= len; - if (tmp[len - 1] != '\0') { + if (size <= 0) { ERRNO_SET(EINVAL); return (NULL); } - if (size < 0) { + len = strnlen(tmp, size - 1) + 1; + size -= len; + if (tmp[len - 1] != '\0') { ERRNO_SET(EINVAL); return (NULL); } From nobody Wed Oct 22 13:01:17 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Rx6n0Fz6FFgp; Wed, 22 Oct 2025 13:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Rx3G8rz3pX2; Wed, 22 Oct 2025 13:01:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U6RhGAdh923eMPNbxf4bfS78rSWDdD/JiNJG+uwrfso=; b=OkIS/RqnM6fMpJWyMt66rKpxPBYX0Ex8HPrWov7ZRbfkfoztpVz+uP/Gz4ErjQgZXeW8kk iS5AHmc9lekXyfMtcVTEFDAGHVb04V+Mdj4SyJXtcNkKdjfseVLncEpxnTMm2OIBny/1rg EJ6TKusi4Nil0v48zk7nz0wnzxIVuHm8AQz8xsUwDbS7rduSj+CWC04yxb51Br5bdfYh+k gRzM2iLMjnU78OONygfNabrXoCHy0fMDN4ALmLkT+ycQcY2wA0Ko4ImYDNP4+Kgo1KRacX IL2L51SyXnJBPt0pn4ZnMKqOfVBkijBIKGsqTtGmELotl8UcbCT4uIu+HY4hpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U6RhGAdh923eMPNbxf4bfS78rSWDdD/JiNJG+uwrfso=; b=rCEL92RCEl+uMnoPUk6qbvEExTsuzZh71bZjmNF+7h8POmMHhirOCwLmJ9CvzCkLiIxl41 swb+zqmkUT8MLnmEBcyf35EgTL6+UbTICJ5gD+HTO1q6woAiudZXgixck0dIaVvC4Tx0Q1 akDjCaIoBc1AlDy6W3FIqgEHg/cYvBuqxUdvInI6CWZweCJA/OGlqWsmLl0gPSStsV/Vog o5WXrvFqu9tn1v8eNVLv1j1BtTghmJj8U0AsiWosJbEKH+h1YzXD+hJ18wnLMrgiKtx+M2 0m/dQyL3LcPkqcHUtd3XdWuTGFwOLOTiGsq2dyHRgd3zYja5BMSNqv6T6/cdDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761138077; a=rsa-sha256; cv=none; b=PU5QNTvFW05xNNfUREgEUp679+FWeSH1EcJSXhWqNUlaJR9eZsQKNnx7V1ADWHFVBMUN0g lROfgVSMzqSBglo/5Y/ZZIWnASpwM27AONfAeaJFOJil0VznYfEwO9XowYE7hMN0Ope/a0 OfFT+WcAWwhadvJxeBx7C0AY2Lx4ITcWa/HROUfgdzVbPQhKq8IOEEEE5oJvRRHL53v0Yd ROega3HbiJPLUxyPeJPzZADF5EmdRxfup7qUYvN4WLzhBxqiGl7FF+IDzOPlavpGV5z0Zl L8fofmFPiFumj7G1m2Wu8rO/WmcffwDAEm+2ME0TYg1EEP97zWpvI5epJwO9RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Rx2ZnqzTkt; Wed, 22 Oct 2025 13:01: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 59MD1HY9009828; Wed, 22 Oct 2025 13:01:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MD1HPp009825; Wed, 22 Oct 2025 13:01:17 GMT (envelope-from git) Date: Wed, 22 Oct 2025 13:01:17 GMT Message-Id: <202510221301.59MD1HPp009825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1508441e71f1 - stable/14 - imgact_elf: Check note body sizes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1508441e71f13b3d66c854677216a4a8c8ca5e03 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1508441e71f13b3d66c854677216a4a8c8ca5e03 commit 1508441e71f13b3d66c854677216a4a8c8ca5e03 Author: Mark Johnston AuthorDate: 2025-10-15 20:14:36 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:34:04 +0000 imgact_elf: Check note body sizes In parse_notes we validate that the note name fits within the note buffer, but we do not do the same for the note data, so there is some potential for an OOB read in the note handler. Add a bounds check. Reported by: Ilja Van Sprundel Reviewed by: kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53063 (cherry picked from commit c86af2cc4cd12fb0174843b22d737c3b5b5d55d0) --- sys/kern/imgact_elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 0a09bb9e3891..f73fd997594d 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2802,7 +2802,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, } if ((const char *)note_end - (const char *)note < sizeof(Elf_Note)) { - uprintf("ELF note to short\n"); + uprintf("ELF note too short\n"); goto retf; } if (note->n_namesz != checknote->n_namesz || @@ -2810,9 +2810,9 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, note->n_type != checknote->n_type) goto nextnote; note_name = (const char *)(note + 1); - if (note_name + checknote->n_namesz >= - (const char *)note_end || strncmp(note_vendor, - note_name, checknote->n_namesz) != 0) + if (note_name + roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + + note->n_descsz >= (const char *)note_end || + strncmp(note_vendor, note_name, checknote->n_namesz) != 0) goto nextnote; if (cb(note, cb_arg, &res)) From nobody Wed Oct 22 13:01:18 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Ry56JZz6FFSF; Wed, 22 Oct 2025 13:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Ry3tWqz3pXK; Wed, 22 Oct 2025 13:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b6MqZBKHbRnvxIh8zWy1ZTE46IfQyg0eQeQKdGyGhag=; b=bBZ9KCSyNDZ8vINPagdnfJXl8hegWR5kY5LZaaKQ7yV12EpGH+jcGpEeeBu4KL2zW9lMfV f0LGrThY/WAPFm9AZBC1IcGKzU0+YMgeZ/HGfESfCJwx8+pDjkFt+sux2Cz6nhKJxvHOe/ NxpqTZFJ43UioMKsmqaxkqshbEmUH4FyAOtHhyIx4W+4b5bNbF4KVjioxmd49KCW0i5A/n NgpxCP6+/Cl9G+NY8qYwLmu+WY94MLxDoFqhMaF3zJ//scfY+r1FiNumASGty+OiSbJoft HaMG8B8f3cEnSNvx0RUFhUDtFlJbJQvqMY25RdHtacRe4D5Cfd1ettRPal6/FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b6MqZBKHbRnvxIh8zWy1ZTE46IfQyg0eQeQKdGyGhag=; b=K+4x9TNyH0GGIciG6CKD4jgAQ6JMmkpy48Js5s4oR9w9sfqvKq9eiQwbiE+89NXxn7/JBg qCT9GCBEUUoxZu9G4mYfYocv1jh0n/cF6AEK7EThA9s8RI/r2mHZjCAejJzmnVHARu/dfS VLSlqVGDUrvE3HK5wJ3VhSwnpvrzQqEdWw0DZdPJk2CW4063xBzDU+XXLtcPHdr8hQ/c8Z LpXtXTi17/qd5375VA1IpYXjHX8Ld7AUdeFj9PYJ25PPeEzPd8TKUaguKfuWulbZGI0Van I7OAZ9rcKjDbH3Mt4JoMe4IH70HPqQk7+QXUR4l+XpsW/UZqCBqNL4N+0lgIoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761138078; a=rsa-sha256; cv=none; b=McLJLieTX1NbJgC8/SdHYki51V+YFeyyasPBFvOngfKkoTxTy2RcsB+3OxjrjeuQ0Oo0tt 8J9/YncR9+w+VZcnUURPq1TktoXbgcD5yhloscGzdwP5CtrVS5iSp64X8n7pQZM61AiaBH 8JUGLPNwdCHim2y2/OvGqDJB/W2ooCZJblzeXuR92UYW3TRM5rwQmrdJcvuQ2hrjFLwis3 ETtreZeD8B+Z5aHRW4Ue5x0ceS4YkApPITv97J4TP/cd5/pgzK2I7mkP8BbfGpO+ao3VZD 3oxvCw08M9NcTn2jlcvSZ164VThxDzp4BZHfGvYs0JIjYrBYG1Eai0fk6xUrPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Ry3Q13zTbM; Wed, 22 Oct 2025 13:01: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 59MD1IZb009863; Wed, 22 Oct 2025 13:01:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MD1IPE009860; Wed, 22 Oct 2025 13:01:18 GMT (envelope-from git) Date: Wed, 22 Oct 2025 13:01:18 GMT Message-Id: <202510221301.59MD1IPE009860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2f744885ea09 - stable/14 - rc tests: Add a test to check for warnings from rcorder List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2f744885ea09b7d44c7955aaaf740cb024e4312e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2f744885ea09b7d44c7955aaaf740cb024e4312e commit 2f744885ea09b7d44c7955aaaf740cb024e4312e Author: Mark Johnston AuthorDate: 2025-10-08 12:51:16 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:34:24 +0000 rc tests: Add a test to check for warnings from rcorder Reviewed by: des MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52954 (cherry picked from commit 04d47c7cde54cc325cca3f47113976f5500dc58f) --- libexec/rc/tests/rc_subr_test.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libexec/rc/tests/rc_subr_test.sh b/libexec/rc/tests/rc_subr_test.sh index e8398c8d9b12..d453338a7ea3 100644 --- a/libexec/rc/tests/rc_subr_test.sh +++ b/libexec/rc/tests/rc_subr_test.sh @@ -28,6 +28,17 @@ # SUCH DAMAGE. # +atf_test_case no_cycles +no_cycles_head() +{ + atf_set "descr" "Verify that /etc/rc.d/* contains no cycles" +} + +no_cycles_body() +{ + atf_check -e empty -o ignore rcorder /etc/rc.d/* +} + atf_test_case oomprotect_all oomprotect_all_head() { @@ -132,6 +143,7 @@ EOF atf_init_test_cases() { + atf_add_test_case no_cycles atf_add_test_case oomprotect_all atf_add_test_case oomprotect_yes atf_add_test_case wait_for_pids_progress From nobody Wed Oct 22 13:02:00 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Sm4Z5dz6FFYD; Wed, 22 Oct 2025 13:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Sm33lzz3r7N; Wed, 22 Oct 2025 13:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WPa3/2sT6GY/M92rib61Bo+Of1N4KxF0rlO4OLHBhkk=; b=FZxqdiM+1iglvif6Bx8vBLhoHNso6NgQowJSTRGdpJKjtwVe4ohp8NhZ1LSXxqqf+nxJA8 lLPXZqeuN5W0giDNNeImc0PLwgyb9m2ZEOnCf+1FdXLgKYyQ8C6QmXh8eeQmhbEc9aTMbM //ZiyC9/CBlHuVA6egkmj+lbP00kMZa+CTmY+1BMBXmsXlHnWEEFtkGHLeFw3EPmlK4A1b dbAL/DI+nCUYsKdxJcDL+q8cXr567mnNKRlM8h/y3dzh9VJ2DRYRFzikN4vkstUodYd9ro rXnTaBFaChP1KTRxjcOyyxG3qjs1kZTn6LuZpctFarXY9cYyk01KAKtPP1B4jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WPa3/2sT6GY/M92rib61Bo+Of1N4KxF0rlO4OLHBhkk=; b=EsSi8Ex9uZ6zTYKQ525apOlkStup/O86L1z1ZoAxHGOUbbvxWLVv0xwEEdJ5fKYyt9xHtu aJ6jaX3XBGYNWG7GC5tTLYohtEw9MZHv8+6777baMg2oE0GvyDvTVxu3ogIzERXbNZlfym uiRLphDiNGkD4QJDlX0j21KOSeglCqyZzXU3Rh6yK1RgTVNegIM0o2VYcd6pXDnOBPAoaY CtB9dJvIvFVnl0mQ7xebbFjzqJ4x/snOQ+hU0l2Gmfk/lchZsrFcwP1lQElT7wY2bq7ZQm 5L+yXQM0FmSCmKrYKUDyWWvvfKhQzETLxuPyY/AHI6EAXwT41mqK08J547iZbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761138120; a=rsa-sha256; cv=none; b=CMGHa02RSmoYCLpWgRkUTDJp+ULXboO36KV528OJP5GR5dRXH0kHsXqhHfoDdxZyzkpi/E 0cxmCxiBR3koin436E6IC0thx9TG0eWUDXeydWwyr7nWA5Mx0IVMpsfCrrX90QYl3kaXPK mQrXcc9MjttHIcpzmXoMTM0ahFyxt+ikTxFYysM1YUXZ0ias+5crkLeXX4TJ4VPHQbKiJ+ je1UVkxAk7laH784MdZbMLJSL64LPHzgfl/rwQ+/FIlZfZQh5kRkJ+xRhxppj7Im44dU/T LjIa5mDcE/Rbjzvghg0yTfm7FtsgE25nmCydLxG9zWjQnlwfxl/E+VZU1sKHCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Sm2Xq5zVTF; Wed, 22 Oct 2025 13:02: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 59MD20de011290; Wed, 22 Oct 2025 13:02:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MD20Bx011287; Wed, 22 Oct 2025 13:02:00 GMT (envelope-from git) Date: Wed, 22 Oct 2025 13:02:00 GMT Message-Id: <202510221302.59MD20Bx011287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c839eecec5e2 - stable/13 - ipfw: Check for errors from sooptcopyin() and sooptcopyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c839eecec5e25c7a998a274107ab073444fc5d6a Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c839eecec5e25c7a998a274107ab073444fc5d6a commit c839eecec5e25c7a998a274107ab073444fc5d6a Author: Mark Johnston AuthorDate: 2025-10-14 13:33:13 +0000 Commit: Mark Johnston CommitDate: 2025-10-21 13:13:03 +0000 ipfw: Check for errors from sooptcopyin() and sooptcopyout() Note, it looks like this code may be unused since commit 4a77657cbc01 ("ipfw: migrate ipfw to 32-bit size rule numbers"). In particular, it looks like the ipfw_nat_*_ptr pointers are unused now. Reviewed by: ae MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53068 (cherry picked from commit 2df39ce5d4a8836ef5fd3c2666f48041042eff42) --- sys/netpfil/ipfw/ip_fw_nat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 8920e8d3e713..bd33d73ed013 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -999,9 +999,11 @@ ipfw_nat_del(struct sockopt *sopt) { struct cfg_nat *ptr; struct ip_fw_chain *chain = &V_layer3_chain; - int i; + int error, i; - sooptcopyin(sopt, &i, sizeof i, sizeof i); + error = sooptcopyin(sopt, &i, sizeof i, sizeof i); + if (error != 0) + return (error); /* XXX validate i */ IPFW_UH_WLOCK(chain); ptr = lookup_nat(&chain->nat, i); @@ -1104,7 +1106,7 @@ ipfw_nat_get_log(struct sockopt *sopt) { uint8_t *data; struct cfg_nat *ptr; - int i, size; + int error, i, size; struct ip_fw_chain *chain; IPFW_RLOCK_TRACKER; @@ -1134,9 +1136,9 @@ ipfw_nat_get_log(struct sockopt *sopt) i += LIBALIAS_BUF_SIZE; } IPFW_RUNLOCK(chain); - sooptcopyout(sopt, data, size); + error = sooptcopyout(sopt, data, size); free(data, M_IPFW); - return(0); + return (error); } static int From nobody Wed Oct 22 13:02:01 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Sn3MMjz6FFkC; Wed, 22 Oct 2025 13:02: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Sn2fDCz3r1N; Wed, 22 Oct 2025 13:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djgK8BwR6Sb5zAoaXEkXANhEKiz+L9XJJeD/qEaCc0w=; b=A+8xSlW8g2W8iZsrVkfh2BVDOs7LuLB33m3fpJ8dlZYbLoJ5xQtVEeYnZ2m7MzqDcE6WZN ro7nNCwUPgGyuis1Ux3U4N28PdFlZuW99iiq+xiE7NYBEpI0UfskPrTUZyNhcCkJLV4vD7 SFC0rsjdWeF2fvnBkTQxUGEaTpkXeXH41EBIf2FGO41H/J6ffcOiwoARWYVfpYG1hWvk7g KsVwtvIHNWBb9j+2aeHqjjVWcyqSjfliEWbcCkax8Jn1ue6WNWs2R94IecE0qKNTS5kl+H UAZLYjE1zcjnhhiavKSME5Uy3eIoPd0/MW3AizFOwIdgGX2iZq9HUi4tn7AW1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djgK8BwR6Sb5zAoaXEkXANhEKiz+L9XJJeD/qEaCc0w=; b=A837Z9icUddFTFnvc2O2SBNU322Fh0nexlYOwDPlOJwdfAxfOJoinD75u2sPrWmjH/8PXO b0lE9KmP+b3/IFN0TKlu0RBDDnSQsrIvTkxzB9DJFRY3ZyOvhQpEgZNj/yRXj4injFBNL6 /uKhcD9VbFT5apDf33cjrP9zVwkFp8vZZX2nfrEG568F4JMJlD3raqWjjvVha6e75XwtLq jH1xcNWiGgOHSyKRZpj2Jn0cGLWtl+uTRy+QCJJsNd2Df5yuZkJevyhwfelLnbnpDqo9wj Kv53YbPjbVY/KuvoesUWOZ4qTZdpRsfkeYwgT9duQFfSBQ163W+8qgrQrt7ExA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761138121; a=rsa-sha256; cv=none; b=OfVDl0oFtRe5l+3/8lokhK/mN0U2qw4QmUdTT4R6mcq+XJlbqTbbWKZdFvi0H3gUhlcQHM o+zJ7pFE+7HJ8/edAzmNqLNkUdE6q4J0eb0AkdOxOGHqHllVobWGjWZLg34Q85XOaaNuaX iGyMwsa3EhGLV3hp2vFqkCMM5UeUnjVe7teXRHbdrY5RpRq6SzL+7vFqdg8rThb5fifu37 EQ0khAnJ+49nzJZ7lzNKK/JolJyIoWC5cIVxzqFAhY046KlC58IUKNnXiINRcDngQwzEjt zQ2NGVedzXN1YgmC39MUylcrO8aiLckg+w8eBPU85dZFS8ZBy8wj4Tdsat8zmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Sn21fnzVTY; Wed, 22 Oct 2025 13:02: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 59MD21KD011324; Wed, 22 Oct 2025 13:02:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MD215q011321; Wed, 22 Oct 2025 13:02:01 GMT (envelope-from git) Date: Wed, 22 Oct 2025 13:02:01 GMT Message-Id: <202510221302.59MD215q011321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 43bf0f4cd2c8 - stable/13 - libnv: Fix a length check in nvpair_unpack_string_array() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 43bf0f4cd2c81c2ffc72bf69e895dfcc9f03e32a Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=43bf0f4cd2c81c2ffc72bf69e895dfcc9f03e32a commit 43bf0f4cd2c81c2ffc72bf69e895dfcc9f03e32a Author: Mark Johnston AuthorDate: 2025-10-15 20:15:08 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:33:48 +0000 libnv: Fix a length check in nvpair_unpack_string_array() A string array is represented by a set of nul-terminated strings concatenated together. For each string, we check to see if there's a nul terminator at the end, taking care to avoid going past the end of the buffer. However, the code fails to handle the possibility that size == 0 at the end of an iteration, leading to underflow. Fix the length check. Reported by: Ilja van Sprundel Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53069 (cherry picked from commit 937693fc9e4ff4045cc674a14902f0d53e84ec98) --- sys/contrib/libnv/bsd_nvpair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/libnv/bsd_nvpair.c b/sys/contrib/libnv/bsd_nvpair.c index cfe168c38026..826b1c35cd26 100644 --- a/sys/contrib/libnv/bsd_nvpair.c +++ b/sys/contrib/libnv/bsd_nvpair.c @@ -984,13 +984,13 @@ nvpair_unpack_string_array(bool isbe __unused, nvpair_t *nvp, size = nvp->nvp_datasize; tmp = (const char *)ptr; for (ii = 0; ii < nvp->nvp_nitems; ii++) { - len = strnlen(tmp, size - 1) + 1; - size -= len; - if (tmp[len - 1] != '\0') { + if (size <= 0) { ERRNO_SET(EINVAL); return (NULL); } - if (size < 0) { + len = strnlen(tmp, size - 1) + 1; + size -= len; + if (tmp[len - 1] != '\0') { ERRNO_SET(EINVAL); return (NULL); } From nobody Wed Oct 22 13:02:02 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cs8Sp4Mvqz6FFmm; Wed, 22 Oct 2025 13:02: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cs8Sp3Bqwz3r7B; Wed, 22 Oct 2025 13:02:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qs52kzNeZDDKAwsSFrtsz81CtovvMoQDjz66+NG26Ts=; b=CWLMEpiE+kGGn4DO+KNdjcL/RT8MW6fcuNwMh3EIyYu6/mjDISd2wFJ6Lic+Je6bhCb74n fDI3Hn7HbOAac8YZqPydWQXycElFhXcI3l67CWm1FXQtZuVNPahvJTP1Vqm9qoVyuhQs3e wdcn5HbQxwbajuCBh5BgCFPj6z4xnRT8E62b7+mr1OM0EgJicZqYgWrj7u6oWtGyoAdsdq ttLd+K707BRyLu3ZwtA9NMkqCcSTyMFA7I4EKDpDcSQ06cNVfvLbtoVS8s2zHpaFMvbtFP QHMfxdakUevfEoIvJLt3KuTbMBwvjiahXYNFT+SG40PpKol6Jt75Cj0WUaJebA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761138122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qs52kzNeZDDKAwsSFrtsz81CtovvMoQDjz66+NG26Ts=; b=vVUq3T0ILCrmxXv7QuZj6AjstLho4AOlRjh/siQINGyjxCnRKahTsig9Ich63oBuNMLPLw dgoDXHwvN1r3wM5AkSmhwsukftxXoLO3WMv7LbXRxrnmSsBzLEHFfbWvOlgDygp4mzOQx2 mrjd/P3WXmbKTb+IhkcGBy7rH62Ofp7LS/nhoBdvOkwMkaeZjTkbNa9WPv5eJeoFZ1P7pd HOxqY3e65VJIrP33WHrP7Sa7evCf3yax1fcuUIKjTdGMvbeXuE4mHfwzZdpRJ4u83CV0Af /ENBCIKq6pJg8bsdqSDOwsAHGJzchUI3qJspq7aeJDA0GyqkUHnLJq8cjeECkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761138122; a=rsa-sha256; cv=none; b=fg6zEcPKLWn/lBmEo+DtSkjqAVZls+HDRFMTrE0W3zaW2AQlEz4vzCAOodwD4MDWdBjc2j qJvn3rbUUDZA8IL5hqQ/7SQ7iSPIVW8bsSti+nq1FKN2tY+Dg0IK5i8XNwqrAcvCDn+cCn 9gJDBWder2s8rsUCYD7PakDJafraY5H1S89X8vYx9LPItH2K7bJ+Gn6VLm8BxB7/T7NsPZ nlcgDY2NUygQryx4N4Ajcqfjyt53nuz5Lrz+Q/u2mzY0KMhnlq5WRtVKsraQKHUCC/CBvz 3iSpps0VHpLPXpDUI+bPh/lHOg1JR1EKJnfULjnymGaHTWODnG/MtbSSqgx05A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cs8Sp2fMszVTN; Wed, 22 Oct 2025 13:02: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 59MD22Ja011362; Wed, 22 Oct 2025 13:02:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MD226S011359; Wed, 22 Oct 2025 13:02:02 GMT (envelope-from git) Date: Wed, 22 Oct 2025 13:02:02 GMT Message-Id: <202510221302.59MD226S011359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6e4767672a21 - stable/13 - imgact_elf: Check note body sizes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6e4767672a21f89c070d351d62a8d75629fd077d Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6e4767672a21f89c070d351d62a8d75629fd077d commit 6e4767672a21f89c070d351d62a8d75629fd077d Author: Mark Johnston AuthorDate: 2025-10-15 20:14:36 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 12:34:07 +0000 imgact_elf: Check note body sizes In parse_notes we validate that the note name fits within the note buffer, but we do not do the same for the note data, so there is some potential for an OOB read in the note handler. Add a bounds check. Reported by: Ilja Van Sprundel Reviewed by: kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53063 (cherry picked from commit c86af2cc4cd12fb0174843b22d737c3b5b5d55d0) --- sys/kern/imgact_elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index b27129a555c4..cda86cf48001 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2750,7 +2750,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, } if ((const char *)note_end - (const char *)note < sizeof(Elf_Note)) { - uprintf("ELF note to short\n"); + uprintf("ELF note too short\n"); goto retf; } if (note->n_namesz != checknote->n_namesz || @@ -2758,9 +2758,9 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, note->n_type != checknote->n_type) goto nextnote; note_name = (const char *)(note + 1); - if (note_name + checknote->n_namesz >= - (const char *)note_end || strncmp(note_vendor, - note_name, checknote->n_namesz) != 0) + if (note_name + roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + + note->n_descsz >= (const char *)note_end || + strncmp(note_vendor, note_name, checknote->n_namesz) != 0) goto nextnote; if (cb(note, cb_arg, &res)) From nobody Wed Oct 22 15:48:25 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csD8n30fXz6Clj2; Wed, 22 Oct 2025 15:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csD8n2QPNz3Pn0; Wed, 22 Oct 2025 15:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QYW/6/sxcxEqwp56cxRjWBpV06U1P/46E5QCWFu1wfY=; b=HjBdPkl4Ojx4espMYY5Xb2uvjvCvth8Jt/ntvM3eV3ixaK4aljFkAgaqmzgRvkCYJq4SFE g/sdq48q9bTggzyyZLlbAcCvDOA7zFp8D6d9Bt4KV5AuI3mRCryBddMGd3lAWmKBGjEl0c wj2WrVLHrMYXLd3rS4lKB5kwyDv3w5tPHuoeTyyHtMoAlfUAlT9BGn9d+pc2fl/IeJs9xq VgrmJB5+I/j3YKwUT5kHtefhnVabSkLTb7meey23zw/+10FYCy2LFTzsKxsBC8jA5bB6PC kraznTcEmaNi0+UETQJCm4PdX96b9PeyY50FESzHfJXA71iOphOQ8tH9Efe2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QYW/6/sxcxEqwp56cxRjWBpV06U1P/46E5QCWFu1wfY=; b=LIc8JZ/LMQtBjXedCD1TKNO85Byx0quQM5g19mXsVumwg0NpsbK4pg23Vh6xxGowcwjyD0 Q1dIVxgtve/zg6nY6mU4FRvcnOZG+C6+K5EH90hOoBTJ2HJOQjERhADeuXXLSMAJ8xbuj8 hqttC/gRIcKpHNY7iWGwJUuKycpGmWQy5nX2utpdrJsh83iKsEWIVNX6QjpcSnNhDmHvQl ta0M6trpgYoZPPqlH3SJAZrx44jme6FvGIGBQdbeD3zi8jqomg7ZDPgWnG7GUu8b+++k9e ejuDBmVsj6Eskvtjh0ykeVv5CJ3OGs8UdKVCD+19TU3qgN4EYl2zYpka/B60IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148105; a=rsa-sha256; cv=none; b=q7a1c6vWE3LL+FA9o5ABaY0eLpHyBafyZmJskM6u4Q4A3tGKLdOx+rvUksDrdSbj9oiyfG 8gzlKrpexzT8W4VsbuQCP0LT6bocTA/Mkec9u1nQUPPK0HuR6kyB9INh/Nl9G60gpphJET ttM5JPOcf2elrf0AatAAfWFIsN7p/249dkC0yOlSFv5gKpqlfo9VvHQMet4thPLmlPLUtf FFVzj++FNwRnPOduLFPg6VVakL55YdXWiOk/oARCgO4TJOpY6yrKAYTNAlpoFcTKBNDDwE PrqBelgEaHjP8R1LIe61J2XWfsfpKt2D465dMACOsyEsfiTw5Z9ELM9gzA+ZPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csD8n1rdTzcD1; Wed, 22 Oct 2025 15:48: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 59MFmP2f022169; Wed, 22 Oct 2025 15:48:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFmPtk022166; Wed, 22 Oct 2025 15:48:25 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:48:25 GMT Message-Id: <202510221548.59MFmPtk022166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ef159100ec2b - stable/15 - inpcb: Ignore SO_REUSEPORT_LB on connected sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ef159100ec2b73c22caccc00555bae4c3cbc0ea1 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ef159100ec2b73c22caccc00555bae4c3cbc0ea1 commit ef159100ec2b73c22caccc00555bae4c3cbc0ea1 Author: Mark Johnston AuthorDate: 2025-10-06 13:37:47 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:48:01 +0000 inpcb: Ignore SO_REUSEPORT_LB on connected sockets While TCP disallows connect()ing a socket with SO_REUSEPORT_LB, UDP does not. As a result, a connected UDP socket can be placed in the lbgroup hash and thus receive datagrams from sources other than the connected host. Reported by: Amit Klein Reported by: Omer Ben Simhon Reviewed by: glebius Approved by: so Security: FreeBSD-SA-25:09.netinet Security: CVE-2025-24934 (cherry picked from commit 320ad3dec5ff1b37f6907a47961c18b9d77e6a53) --- sys/netinet/in_pcb.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index dbe48242381d..712ff28768dc 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2665,10 +2665,13 @@ in_pcbinshash(struct inpcb *inp) INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; /* - * Add entry to load balance group. - * Only do this if SO_REUSEPORT_LB is set. + * Ignore SO_REUSEPORT_LB if the socket is connected. Really this case + * should be an error, but for UDP sockets it is not, and some + * applications erroneously set it on connected UDP sockets, so we can't + * change this without breaking compatibility. */ - if ((inp->inp_socket->so_options & SO_REUSEPORT_LB) != 0) { + if (!connected && + (inp->inp_socket->so_options & SO_REUSEPORT_LB) != 0) { int error = in_pcbinslbgrouphash(inp, M_NODOM); if (error != 0) return (error); @@ -2770,6 +2773,10 @@ in_pcbrehash(struct inpcb *inp) connected = !in_nullhost(inp->inp_faddr); } + /* See the comment in in_pcbinshash(). */ + if (connected && (inp->inp_flags & INP_INLBGROUP) != 0) + in_pcbremlbgrouphash(inp); + /* * When rehashing, the caller must ensure that either the new or the old * foreign address was unspecified. From nobody Wed Oct 22 15:48:26 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csD8p4dWyz6Clqt; Wed, 22 Oct 2025 15:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csD8p2pVlz3PnB; Wed, 22 Oct 2025 15:48:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZx5vxzL5gidKhI3ObHWOnXV2w3W+t13B1Z8BMdHh8E=; b=US3CTlUMXE/ULro8IxwV/kRp7JL64Vb0SVyuCmwPXDvhjJK/goKEppuxDhr4Lq4jiHwwXx nupcDdJYY3vD000VgwywolI4wpqO0J+Y+6rc5bGmZW1dWAGPbYNaETXteLWVzKUbUnRwMc a9X5EwCEijBD4hmfKriBSteoBz9FuS3P9le8xJxHDms8F677mzSBVG/EWmkm+XJNWpU4dJ Z8vaBnYv13uJOgLtDNmss4jdgSS7AhNaX0sz0ksaXiIbFqnvXCb9l8Z8erqP9LYN5nK6n0 q1YavwBqBWh2SzdoCpT2oZMxw82PrF9x+QVydtaJdf9A287ZVB5bqY1JrnNiaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZx5vxzL5gidKhI3ObHWOnXV2w3W+t13B1Z8BMdHh8E=; b=FJTl6kgLIUNfnn8eT/t8/6H2gBs77F5xBPkb7066bwXji+wfr0vGMmBwCRdmr8Qur5YpEN P6rJc5t9TmouES3KRA9XXszMHcdeS2TaAG01PrXS05vPzvmhYozndQ2HJa3Dv7mGy31TC2 o+4+Pkpuodtu8OOofjEDpQHeGdQvpUIlXEmcTTxy4N+SGT4f4Ta/YKxaBuzUlGGZqX9DAE HLexgVzhd1FcJP7pCHkVqCFLXWaGuJTQ8IVAuMAk83EwAQ7Hr/0zgz9d6exYXD3odDTwWz aqtVqiEt/R+jK1GsZklDpPEhLfel8R3UX1pP7HI1NK5qTwVS1FyoZcByyB0sdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148106; a=rsa-sha256; cv=none; b=uIKg9loiKZmn0Wz8xMCFDzGGTjmYppowaQcqvZY+ROksoiyPKP0xIcNXz9xmiJiNiPDGJs jUhO8bCaBapHPXMQIJ0J5QoTiZeNfnhDffUaeehG7FvFQIIqT7CoZsWp58uxo5LiQKaSft W/pkB+b4MUtRdbYtQqZxerNRlYetqqxsPCWZug7dchm0RvXPTNe/f+b1vuR1BgcafnSrmG UkibyqtDQBPnMdCCyUNdlqheUDgxlk6qaADeHkxdGnq29EfZlgZKGzL3eVXSOZfuMsmjvY jWu4MC8OgcmuOm0WYOn4kfkSDoFkoS4A6yeEnMpxMHqY1jXhomnKrV3UvYUKew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csD8p2MQYzbnJ; Wed, 22 Oct 2025 15:48: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 59MFmQ8g022205; Wed, 22 Oct 2025 15:48:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFmQ7U022202; Wed, 22 Oct 2025 15:48:26 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:48:26 GMT Message-Id: <202510221548.59MFmQ7U022202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 25e065774302 - stable/15 - so_reuseport_lb_test: Add a test case for connected UDP sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 25e065774302591b43a263a78362a816f799f715 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=25e065774302591b43a263a78362a816f799f715 commit 25e065774302591b43a263a78362a816f799f715 Author: Mark Johnston AuthorDate: 2025-10-22 14:53:28 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:48:08 +0000 so_reuseport_lb_test: Add a test case for connected UDP sockets Approved by: so (cherry picked from commit 1dd66c6ac2c146f540b2ff825fbee442354aeee5) --- tests/sys/netinet/so_reuseport_lb_test.c | 148 +++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/tests/sys/netinet/so_reuseport_lb_test.c b/tests/sys/netinet/so_reuseport_lb_test.c index fa9d6e425884..31d20160cb5a 100644 --- a/tests/sys/netinet/so_reuseport_lb_test.c +++ b/tests/sys/netinet/so_reuseport_lb_test.c @@ -29,6 +29,8 @@ #include #include +#include +#include #include #include @@ -551,6 +553,150 @@ ATF_TC_BODY(connect_bound, tc) close(s); } +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp); +ATF_TC_BODY(connect_udp, tc) +{ + struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + .sin_addr = { htonl(INADDR_LOOPBACK) }, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 1, "expected data available"); +} + +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp6); +ATF_TC_BODY(connect_udp6, tc) +{ + struct sockaddr_in6 sin6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(sin6), + .sin6_addr = IN6ADDR_LOOPBACK_INIT, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 1, "expected data available"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic_ipv4); @@ -561,6 +707,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, bind_without_listen); ATF_TP_ADD_TC(tp, connect_not_bound); ATF_TP_ADD_TC(tp, connect_bound); + ATF_TP_ADD_TC(tp, connect_udp); + ATF_TP_ADD_TC(tp, connect_udp6); return (atf_no_error()); } From nobody Wed Oct 22 15:48:51 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csD9H4wP0z6Clsw; Wed, 22 Oct 2025 15:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csD9H4F30z3Q3N; Wed, 22 Oct 2025 15:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ESWHPGti5hrGUyHJegxggkZu89qJViHg286e+0eC2PU=; b=Q1OJqTUQiGhmmAn305VIH3mkfjqoqjHW5GJdx0o6LhcHu+SYJ+/dXfPT6OTe62OaErHusV A6D5ZuxvDoWarCBiUNQXBRDb3sRxupjHRGuDmiCRFZvs31Lh3N+LQkxTUoeNQCpvUEyS7E KJcU+K7axW0v0tOcQT6lHyTIwxOoLs7KqUMHyzU4YKAWL+6ZEuTRGAo3YS3a5mIxUo702t 0VR7Hr8hRpk6QCug0pczmg7saTm0d6zQOHzYklfNCCa+deiSAurxw5fmR9zQoJFz1/yuZS rdZtLoG+zh212hTwE3o/Elt7N+JBwbWFT/vvUUgrltUmVQ4CKPzpqOCmoHstLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ESWHPGti5hrGUyHJegxggkZu89qJViHg286e+0eC2PU=; b=baANrjX13QcnwaOLPylznu6E+4HSN+jIH0x884l584baIHVg7zrLWYPz7B6mDjn/qyKDU2 pD0rydVfBT/679yO8NKdCcZ56eMuz6NDTnWJL0PC7tlPQ9Hur9GxDR9JCUsuFcUMn4WB8H nwslgVD2rOgei94yL2Z1pKD6TpFfhXJbtDjn7txYY6LEzIV29ty90EvZsUI/FgnoO+O8yC zn20BTjSoqUB3sSdjji1vhimXKnNSKsVT8zWg+MCnG/uN2+5C69QgGSCovGRjDl3+c17J/ adxhDws6mski+W5exY/J24tfUldBtVCqzgCOrOyfkBay8MPPu16jHsXquuhaTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148131; a=rsa-sha256; cv=none; b=xhtYk+bXsJZf1QRS/ryz1Otj8fIkXlti0lh4m+xryDNvXBcOyvzERFKc1TluVTKEwZU0I+ XHPJMD5hRFF+n9oEl/JbVbWY8lWRh1WRVQp3BcpPZyrdBPCwXHAO1fx9fTo+BWBjmJPrdl c7o3peBAoTjOLScSKgIHBQxRxbdAs4t4KN1MxvQMLlZDTgr4gRW2dnWxy8nalZTz2eohDl tGI16voEL6hld/hvhrX5DBzulxmXYSVQ1NYGm01hM+dzR5uBTVVd3PDaM0pVpxvy638K4m Hr1oJczB7rNgWXuZ40EsXaQzR6PcjQwIFUyIXoMGK9y1Vb1IW7mSwBe17NET5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csD9H3Zy9zbll; Wed, 22 Oct 2025 15:48: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 59MFmpuQ022456; Wed, 22 Oct 2025 15:48:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFmp7a022453; Wed, 22 Oct 2025 15:48:51 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:48:51 GMT Message-Id: <202510221548.59MFmp7a022453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e276759b3687 - stable/14 - inpcb: Ignore SO_REUSEPORT_LB on connected sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e276759b368701a49e543c45d5d6ea08ed4fbc38 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e276759b368701a49e543c45d5d6ea08ed4fbc38 commit e276759b368701a49e543c45d5d6ea08ed4fbc38 Author: Mark Johnston AuthorDate: 2025-10-06 13:37:47 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:48:32 +0000 inpcb: Ignore SO_REUSEPORT_LB on connected sockets While TCP disallows connect()ing a socket with SO_REUSEPORT_LB, UDP does not. As a result, a connected UDP socket can be placed in the lbgroup hash and thus receive datagrams from sources other than the connected host. Reported by: Amit Klein Reported by: Omer Ben Simhon Reviewed by: glebius Approved by: so Security: FreeBSD-SA-25:09.netinet Security: CVE-2025-24934 (cherry picked from commit 320ad3dec5ff1b37f6907a47961c18b9d77e6a53) --- sys/netinet/in_pcb.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 89000a521bff..7d665c7d2a73 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2702,10 +2702,13 @@ in_pcbinshash(struct inpcb *inp) INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; /* - * Add entry to load balance group. - * Only do this if SO_REUSEPORT_LB is set. + * Ignore SO_REUSEPORT_LB if the socket is connected. Really this case + * should be an error, but for UDP sockets it is not, and some + * applications erroneously set it on connected UDP sockets, so we can't + * change this without breaking compatibility. */ - if ((inp->inp_socket->so_options & SO_REUSEPORT_LB) != 0) { + if (!connected && + (inp->inp_socket->so_options & SO_REUSEPORT_LB) != 0) { int error = in_pcbinslbgrouphash(inp, M_NODOM); if (error != 0) return (error); @@ -2836,6 +2839,10 @@ in_pcbrehash(struct inpcb *inp) connected = !in_nullhost(inp->inp_faddr); } + /* See the comment in in_pcbinshash(). */ + if (connected && (inp->inp_flags & INP_INLBGROUP) != 0) + in_pcbremlbgrouphash(inp); + /* * When rehashing, the caller must ensure that either the new or the old * foreign address was unspecified. From nobody Wed Oct 22 15:48:52 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csD9J6G1Zz6Cm1p; Wed, 22 Oct 2025 15:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csD9J5L8Xz3QBs; Wed, 22 Oct 2025 15:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iXwZ4izHC6QF25ppT30x9uwkKH25e5WRVRSbabYwlWM=; b=o6JeaP/ztU8QovCeKBKWr4CY2dlcPYdu1NuaXORWbBKQoi9pidhEpC9XDh4Waup0xne9iv 3qWJyjl81nAjcNVn3IVgOScYNwnSaQxiBJu0q7KUbrt6gAE9s+tLD3zIH/0+QI8bUNH9FE 8+0366XUEc0hfAqgP1Yy/OAXfi9ljH+ojutmTiC/LXHD4bGccwdYUk2Rpwv0cNd4u7J+/Z ti5FFS5xCNCnXOiLFulPjG3TnRYommyLDOovxfg8D/ec5zO/DOawawPalL6wYyIn8tVGgU GTYvzrAb79Z5OE6IhG5fH/Yu5Sj8p+iyIm/KRnBqkhyNoAW9K1kmMwTgRHQQKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iXwZ4izHC6QF25ppT30x9uwkKH25e5WRVRSbabYwlWM=; b=aA2hSdCaNsw5m0HEAyjvLVncqXDczklEBlNcYxHczTDyAY5Qitp6+k9z7mWLopgn0HH+K3 P1Ggsv0CrvRZ7A3UZ12CbD5YTGPouIrisDcf32Uem51KDl1kEN6WmrisMlMPcAX8+wDJE7 NceMLbi6nStaxdQNNzeyFvMi9UICjbNiyjXlu3f4J05sSWJBSLmofInSPp42P4TlYFmiS1 QFkZWZsAhxVWC9UOqIBi7bYFHCD0aZJvCVre3cii83GkYHkuXtUt7pAIwupTdSuuKBn+dl 00ZS289bty3Ul9taV34V/l4F798vpPM6OD9NIz080TfHGlIwSJXZZV62ta53RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148132; a=rsa-sha256; cv=none; b=YsEndMSblfYXyxqQkZBcEmJIivd5kfm0X7boePuKrv2A6xEw/ip08QdTaQWwEMoJI/xDjL Rj82RlkJiWmQ++zKwlBtJHFbyG9Ht9GI1iWp+n+5DTe4gIaagu7JJMEOe3N5eYo0gtG3HP rWTa0Ux6ZpqCO2H+5a/B67B5f5z4d8Q4XG+64sGz2mD5pji4x2tCdacnpLmXb0Mt4Ed2yE IQeq6qKZTFSzL0IpDzPC5QOQGYLvi2TAIfzQ+uUr/vWSM0b3bKHPAWaG2VSBzeTbfOp6H7 y196GMK2VlHWZGDO3Eiy2vRGY7XiDRt4LWc2wKSOM9BwYh2hEN3NQXestP6ufw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csD9J4tGbzcD2; Wed, 22 Oct 2025 15:48: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 59MFmqS3022494; Wed, 22 Oct 2025 15:48:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFmq3w022491; Wed, 22 Oct 2025 15:48:52 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:48:52 GMT Message-Id: <202510221548.59MFmq3w022491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7272e2d029c2 - stable/14 - so_reuseport_lb_test: Add a test case for connected UDP sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7272e2d029c20c3144d7aa49500dc86d70344030 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7272e2d029c20c3144d7aa49500dc86d70344030 commit 7272e2d029c20c3144d7aa49500dc86d70344030 Author: Mark Johnston AuthorDate: 2025-10-22 15:04:02 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:48:39 +0000 so_reuseport_lb_test: Add a test case for connected UDP sockets Approved by: so (cherry picked from commit 1dd66c6ac2c146f540b2ff825fbee442354aeee5) --- tests/sys/netinet/so_reuseport_lb_test.c | 148 +++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/tests/sys/netinet/so_reuseport_lb_test.c b/tests/sys/netinet/so_reuseport_lb_test.c index 5d3b2ab03af8..6c345c84f452 100644 --- a/tests/sys/netinet/so_reuseport_lb_test.c +++ b/tests/sys/netinet/so_reuseport_lb_test.c @@ -29,6 +29,8 @@ #include #include +#include +#include #include #include @@ -236,10 +238,156 @@ ATF_TC_BODY(basic_ipv6, tc) } } +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp); +ATF_TC_BODY(connect_udp, tc) +{ + struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + .sin_addr = { htonl(INADDR_LOOPBACK) }, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 1, "unexpected data available"); +} + +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp6); +ATF_TC_BODY(connect_udp6, tc) +{ + struct sockaddr_in6 sin6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(sin6), + .sin6_addr = IN6ADDR_LOOPBACK_INIT, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 1, "unexpected data available"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic_ipv4); ATF_TP_ADD_TC(tp, basic_ipv6); + ATF_TP_ADD_TC(tp, connect_udp); + ATF_TP_ADD_TC(tp, connect_udp6); return (atf_no_error()); } From nobody Wed Oct 22 15:49:32 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDB462B1z6Cllk; Wed, 22 Oct 2025 15:49: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDB45NZ0z3QS1; Wed, 22 Oct 2025 15:49:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+F9TxegMvF53ro+fHc9DzA6jXMTiUmMqh47cIhUEe9w=; b=RlOU4Q4fQqSf0P2akPSEjG36DwTVwBa0o5u9lBjiZQd4ayfqMUV/dIyHXCH+T6gmRkO2Ba n2KnwjAzyMHpFwpW/7ouuiBjggHPY9KmPAgWsCLXZS1WwR04jCKAIwf+5o3IafzduTyxb2 XE5XXuYUvCNxsx2ZxZXJ9GyblcoZECfuPUoRhtconfx/SVM9IBCSwoLrGojMBxlcnnATMY ultkFqsPs0Meb7HVn0YzRbsfVbn1mWwiCZ33wp9JZXfUX0CznB+lvfYNnkaOqE1FyP1FFK 2uFf6exeg2pKqyPgcPlMBJluAK4lFwxz0TKinT/sbEj7NZGFMRRHse7d35RpUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+F9TxegMvF53ro+fHc9DzA6jXMTiUmMqh47cIhUEe9w=; b=eKI9EKaQC8Lf6G/0aTYDMh+tbjHxBaZB/ggi4JuF9rv8mWXUGwuRZqvm5JCRVmm7Fib+MS Dz9fZyWbQoDnghmjYZCU2uzXR3JhO7UD3suE65YKbokCz5IpvCx41bxM6WQIT5N3xof/Ya 0aQBLtlyOXtOGzIto5vYSSHL9KKkfXrtpqsUYEoZo6O6crkwYo03V6TqQba4xUucAXvPTV 5M0q0TTo1Ub2Rch68tJKxFQOtx35sdgfFk4+dzVPIE0u5LdApmUKBEtNqoF2E/y0Xo3JK6 l0dSI0bgYHWQUkDJJomH2Hlb94B5r0F6eoTb6aQC6UlnHsZx3rWK7h3XINHn1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148172; a=rsa-sha256; cv=none; b=QKkozGX+WoAIbbqFSUXYIH5+4B2AV9Yl5rKzzhotgoHmnhit3XjnV8BtT6KHzmImTRuJFY zDd8alD9wBLowZTJg4JIl2Zd+3aGK1tGzeFiLU9MzPjtPrNipeBX/dHwHCEIb+LeMlzFH4 SA6e9CFgE6+py8C0IrTsv6wjUV3F7VfZ9UWEbsIEGwVcB03a9bQdLRUk+x5+G1pNfz9vbV HosUYdX9cNHDblzn5lXBde3ZCJNFD2h/U3SfNkMHHzZaggx2PTOXTVYjbEWP1T8RaN4S1b na0hMekSGXs9oi63LI9v0/pGYRRq1WV829vnu6LWjxU+yWFDZ90c8Te6k8m6Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDB44qxTzbjV; Wed, 22 Oct 2025 15:49: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 59MFnWiZ022809; Wed, 22 Oct 2025 15:49:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFnWP1022806; Wed, 22 Oct 2025 15:49:32 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:49:32 GMT Message-Id: <202510221549.59MFnWP1022806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: df888c8f41f6 - stable/13 - inpcb: Ignore SO_REUSEPORT_LB on connected sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: df888c8f41f633be3aacecdd357ebaad62aa11bd Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df888c8f41f633be3aacecdd357ebaad62aa11bd commit df888c8f41f633be3aacecdd357ebaad62aa11bd Author: Mark Johnston AuthorDate: 2025-10-22 14:49:25 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:49:11 +0000 inpcb: Ignore SO_REUSEPORT_LB on connected sockets While TCP disallows connect()ing a socket with SO_REUSEPORT_LB, UDP does not. As a result, a connected UDP socket can be placed in the lbgroup hash and thus receive datagrams from sources other than the connected host. Reported by: Amit Klein Reported by: Omer Ben Simhon Reviewed by: glebius Approved by: so Security: FreeBSD-SA-25:09.netinet Security: CVE-2025-24934 (cherry picked from commit 320ad3dec5ff1b37f6907a47961c18b9d77e6a53) --- sys/netinet/in_pcb.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 03315344a455..a6fd5feddf9e 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2668,6 +2668,7 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct inpcbport *phd; u_int32_t hashkey_faddr; + bool connected; INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); @@ -2676,11 +2677,15 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) ("in_pcbinshash: INP_INHASHLIST")); #ifdef INET6 - if (inp->inp_vflag & INP_IPV6) + if (inp->inp_vflag & INP_IPV6) { hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr); - else + connected = !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr); + } else #endif - hashkey_faddr = inp->inp_faddr.s_addr; + { + hashkey_faddr = inp->inp_faddr.s_addr; + connected = inp->inp_faddr.s_addr != INADDR_ANY; + } pcbhash = &pcbinfo->ipi_hashbase[INP_PCBHASH(hashkey_faddr, inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)]; @@ -2689,10 +2694,12 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; /* - * Add entry to load balance group. - * Only do this if SO_REUSEPORT_LB is set. + * Ignore SO_REUSEPORT_LB if the socket is connected. Really this case + * should be an error, but for UDP sockets it is not, and some + * applications erroneously set it on connected UDP sockets, so we can't + * change this without breaking compatibility. */ - if ((inp->inp_flags2 & INP_REUSEPORT_LB) != 0) { + if (!connected && (inp->inp_flags2 & INP_REUSEPORT_LB) != 0) { int error = in_pcbinslbgrouphash(inp, M_NODOM); if (error != 0) return (error); @@ -2761,6 +2768,7 @@ in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m) struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct inpcbhead *head; u_int32_t hashkey_faddr; + bool connected; INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); @@ -2769,11 +2777,19 @@ in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m) ("in_pcbrehash: !INP_INHASHLIST")); #ifdef INET6 - if (inp->inp_vflag & INP_IPV6) + if (inp->inp_vflag & INP_IPV6) { hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr); - else + connected = !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr); + } else #endif - hashkey_faddr = inp->inp_faddr.s_addr; + { + hashkey_faddr = inp->inp_faddr.s_addr; + connected = inp->inp_faddr.s_addr != INADDR_ANY; + } + + /* See the comment in in_pcbinshash(). */ + if (connected && (inp->inp_flags2 & INP_REUSEPORT_LB) != 0) + in_pcbremlbgrouphash(inp); head = &pcbinfo->ipi_hashbase[INP_PCBHASH(hashkey_faddr, inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)]; From nobody Wed Oct 22 15:49:33 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDB61b79z6Cm2G; Wed, 22 Oct 2025 15:49: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDB56FGVz3QdR; Wed, 22 Oct 2025 15:49:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GvNlacqHsbaixV3EhFUzeMIL+JyLkRnCn0j0kNFU5GA=; b=NPPoXQapTtWz3LXqv+NiLg2ZNmV+Cpz5CWkvS6wi/+2m09ytHC6eDBaQgMbRwazXZzJz7B lyDeHMcUFzbKWLYvWnyzIBiKpgCzLenZUPv1vVbm3uYc0C82nQ1sjeA/TQI2T9RZ41rgRi 43XeAAxUaWLaAQ1QqSluqYG6UMXEg4Zx6RwUZEYKZZBaHcBU0YuLbDFztxq7x1qP8+mX07 dTegWjFL2jRerOdoRAZfAnbpyQgkgUp6luiMHY/T3+opn2trN/5B9wM54LeNpZee3XfTOS Tqf1jWMSxwrX75yFXgrvia9FDFJJyaFXdHtuYcUKj2zdiCAN4tRDF1mTUjKMWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GvNlacqHsbaixV3EhFUzeMIL+JyLkRnCn0j0kNFU5GA=; b=cSlNJuaLIfD40TKevMrJfT3V70cOiP6a8w4sS+ZZJoeYFlHgROS/1TZu52fgOhrg5ELJ2N ey2vpgsBbNnBqZU3hXlI8J9jOtOX78hM3SifPBsgYs4AFcZ/H60qGupC4Q04coXkcJNu/D pcq9dMfSiSULHsFx17oIG3UOWOc7gN30aFTtzgztO3VUtI2rfc26Iyz+JSvUMvybLtXbgy LPZglQ2/vHVzOjyHreyrIQBPn0BMfPo23KZoWnuB6E32Z5JdNJve/VDUeUsgkJFTeRdQPC SX9G8AJjUUQoUtRmfmcdCFlDmL4Gql2aUQODYK/yXPRCxfy05ELSEVYIQO0icw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148173; a=rsa-sha256; cv=none; b=DncRGoy0bQqEWpZyR3aBIY1kO5ljfK1bPUAMT2PK8crun8XF0EigThR72go1Q0DY1apkQi pjZqq8s9sqzD7GG2b5aV0qpOquyySfxO0TCEgZ6zHed3sE/1kkITL/+gnH5gV/H1/13LE2 TIF3gSSfn52m7+CqqGUDIUopqNGRae4ay7gYMN0JGNJMVCz1zHYKNbY4qFVpBcb0TdqZ34 oy0IApKTSBshRDIzkfm8OBLuxmTdeGv+xPZkvGsWmDKZNvirhBIVvQRiCYj+pzmePIl9bN YXxtYc1PiRtcTlzpWwoPjjlUYp9kJxqDhrOO0BmIP9I1XxAaAasvH00lVef2Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDB55nVXzbjW; Wed, 22 Oct 2025 15:49: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 59MFnXro022843; Wed, 22 Oct 2025 15:49:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFnXdZ022840; Wed, 22 Oct 2025 15:49:33 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:49:33 GMT Message-Id: <202510221549.59MFnXdZ022840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8e999e63c356 - stable/13 - so_reuseport_lb_test: Add a test case for connected UDP sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8e999e63c356839fa60cf964e33e0054b63c7c87 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8e999e63c356839fa60cf964e33e0054b63c7c87 commit 8e999e63c356839fa60cf964e33e0054b63c7c87 Author: Mark Johnston AuthorDate: 2025-10-22 15:04:35 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:49:17 +0000 so_reuseport_lb_test: Add a test case for connected UDP sockets Approved by: so (cherry picked from commit 1dd66c6ac2c146f540b2ff825fbee442354aeee5) --- tests/sys/netinet/so_reuseport_lb_test.c | 148 +++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/tests/sys/netinet/so_reuseport_lb_test.c b/tests/sys/netinet/so_reuseport_lb_test.c index 5d3b2ab03af8..ff9ba3142f03 100644 --- a/tests/sys/netinet/so_reuseport_lb_test.c +++ b/tests/sys/netinet/so_reuseport_lb_test.c @@ -29,6 +29,8 @@ #include #include +#include +#include #include #include @@ -236,10 +238,156 @@ ATF_TC_BODY(basic_ipv6, tc) } } +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp); +ATF_TC_BODY(connect_udp, tc) +{ + struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + .sin_addr = { htonl(INADDR_LOOPBACK) }, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len >= 1, "expected data available"); +} + +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp6); +ATF_TC_BODY(connect_udp6, tc) +{ + struct sockaddr_in6 sin6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(sin6), + .sin6_addr = IN6ADDR_LOOPBACK_INIT, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len >= 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len >= 1, "expected data available"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic_ipv4); ATF_TP_ADD_TC(tp, basic_ipv6); + ATF_TP_ADD_TC(tp, connect_udp); + ATF_TP_ADD_TC(tp, connect_udp6); return (atf_no_error()); } From nobody Wed Oct 22 15:50:30 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDCB4DLWz6Cm2j; Wed, 22 Oct 2025 15:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDCB3cscz3RWs; Wed, 22 Oct 2025 15:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OXGfezyHMyg+YomCkiVHE+OZhTL9Zh2+0zNms3O8nlE=; b=Im1HWDqFYMOSzPGIIHFA3nnhf9djPdG/FFvZG/oEgaei1XIFtBdEKFCNrqJBbCT3blS2eo umZzvM8Cso2IgZAiKss6hDLBL0Bu9PQv3nFcJXwL53mK5fHOMcOouVzvSb1ttx/K3pPnkQ rniZ1+yVFsq96O6o4y062EcB4f8Xr6Xw8++rd25LSqqGFxLkgd/weur6v155CnKT6bxhxD SMHqVNu5OzhvRzX+g/NxGxiHQvhcD0qLAjXnTzk9oZhVtLLXJqWZk6Th2HQfZaHLZ4nNzg pqKWhFZDbZrf4PBw4n66JB5sQRnln1pyAGfL+Y3QODuFnOH8UCwsT/FYNW93Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OXGfezyHMyg+YomCkiVHE+OZhTL9Zh2+0zNms3O8nlE=; b=X68fuUTXCNNQt7CVbgTRh3CKh/eL75qJi2d304DN7CrPr2au5zC8+MXOu1m0XwdRAN+5yH o0Wv/crb2GPKbHqGJE48BF6N7s/rpxCCwl0npJVLOK6TYcDeY0/FEyaoZn1jYZsZoQbFDM Fxx+UraeNJJsDy1adonKZIzE/rFCaf5AAVgGlWyPVdLarJT5tOhj2LHNRkYJtOBJ3KRiuq M/zfBDk7+4HrtZSCHz3M3TCxW5A8xh8jDiUBHmSJ3MJi7nJRfJXXYMk+3Ef7kaSZfmjSwm dfTf6WLYW7N6mriJrKUECu+Lb/BbhJ0X61deSI/Q2pkNDM8uXJ2Ngn69NnYKDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148230; a=rsa-sha256; cv=none; b=sq3zXCGSALuchcez4usZNeB4DPVqOSy5ZBGdkm0bt5azGF+juKqUa1aJtaXw/ZJRB5z1Az I/YSALXl/mXu/HIgrAt7cTmJBmfDpt6dIHzYTS4nHSyBhwdGZ2s9J79WdBCrwz1r694MrO Rd6D4tT08kZIaWNUh64HjbW+W1MRuY0c330nbbr99QkLixpXLEoEJkKuLHoV3I74d5nCcz PpJ1cNLug5kNsvizleJYYxY+J7nED4iA8DbmochnX3UFxKUOcyks8ZCc7wk2jFcFN9otqC wxAAToELwhDhhn9kyktiJd6/q0uHcVlS/OXKFoLbu+nFx8p6QnIhika4Ue7O/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDCB3DMRzbnM; Wed, 22 Oct 2025 15:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59MFoUFo031952; Wed, 22 Oct 2025 15:50:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFoUjD031949; Wed, 22 Oct 2025 15:50:30 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:50:30 GMT Message-Id: <202510221550.59MFoUjD031949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 98c539667881 - releng/15.0 - inpcb: Ignore SO_REUSEPORT_LB on connected sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 98c539667881d7a3291261fdc754b30820731234 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=98c539667881d7a3291261fdc754b30820731234 commit 98c539667881d7a3291261fdc754b30820731234 Author: Mark Johnston AuthorDate: 2025-10-06 13:37:47 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:49:44 +0000 inpcb: Ignore SO_REUSEPORT_LB on connected sockets While TCP disallows connect()ing a socket with SO_REUSEPORT_LB, UDP does not. As a result, a connected UDP socket can be placed in the lbgroup hash and thus receive datagrams from sources other than the connected host. Reported by: Amit Klein Reported by: Omer Ben Simhon Reviewed by: glebius Approved by: so Approved by: re (cperciva) Security: FreeBSD-SA-25:09.netinet Security: CVE-2025-24934 (cherry picked from commit 320ad3dec5ff1b37f6907a47961c18b9d77e6a53) (cherry picked from commit ef159100ec2b73c22caccc00555bae4c3cbc0ea1) --- sys/netinet/in_pcb.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index dbe48242381d..712ff28768dc 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2665,10 +2665,13 @@ in_pcbinshash(struct inpcb *inp) INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; /* - * Add entry to load balance group. - * Only do this if SO_REUSEPORT_LB is set. + * Ignore SO_REUSEPORT_LB if the socket is connected. Really this case + * should be an error, but for UDP sockets it is not, and some + * applications erroneously set it on connected UDP sockets, so we can't + * change this without breaking compatibility. */ - if ((inp->inp_socket->so_options & SO_REUSEPORT_LB) != 0) { + if (!connected && + (inp->inp_socket->so_options & SO_REUSEPORT_LB) != 0) { int error = in_pcbinslbgrouphash(inp, M_NODOM); if (error != 0) return (error); @@ -2770,6 +2773,10 @@ in_pcbrehash(struct inpcb *inp) connected = !in_nullhost(inp->inp_faddr); } + /* See the comment in in_pcbinshash(). */ + if (connected && (inp->inp_flags & INP_INLBGROUP) != 0) + in_pcbremlbgrouphash(inp); + /* * When rehashing, the caller must ensure that either the new or the old * foreign address was unspecified. From nobody Wed Oct 22 15:50:31 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDCC5F2zz6Clx7; Wed, 22 Oct 2025 15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDCC4Glpz3RcD; Wed, 22 Oct 2025 15: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=1761148231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtH1otAm19hlnl7cE9cm/EtRClOVPzuK/FYJnpcwk+k=; b=j27i77wf62bm3bTWkn3XAjw57BwkF+VSeMsw6OzjaolDmIRLMmSr8cRy1HGW3gFuWY1W0Q +zrBU1t4IRnsw3WJJfHCWGwJaLCNTFKmdGJUao/VujVxMPjbu0+zKkN+Pd3Y1go9ygxIvf 1RPEDe2k0DFMVTzHwSTJ8Itpn+gGyzDP1HMJahzKJfr5eVQmwu1aKZWgbmpoydTB7R2/Wo A0S+QwmG2PRnDxQ0qmSdbOpHrWpIfgMdJbsKMiCbowmW+Cj9mCNcdpc/5+t4PtIyqcN9PO qImVzpG2VUsfCgA7xTGPguecH1vPs54Bquc/eGqkK0AhdJlAyCIR0m5LFqQzTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtH1otAm19hlnl7cE9cm/EtRClOVPzuK/FYJnpcwk+k=; b=qg7JfepgDWlBPzuJlbnflE90ylxPdu9fPB+qlcuWANThgHSLtiuU5ZJH5jpq2s3QQyfy0V 2wGn88SY/GcS5F9H3JtLZGSkl8/wQISB/gBysun4aF90vyVdXmTtvcMVm3o2ReLlFsmmVo F7JG/TBFKt+eAljPG/vYk87GseJgBDDkgYhlNuP+w8SydaZ4a1NWLX5R7KROuKyXfUa9l4 W86MUfmSeRbSVh5C7YQmPmTltnKKv89rOcBRLyCaRMCY1Czm1v5DY633SxtFnh7tesKzfd faRNu1VP5rA4Bz3VyeWPyfIfYq9kLU8cc+Pb9ACu+FhBzNOpb+hauSnI4OVbbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148231; a=rsa-sha256; cv=none; b=BXBwM3z1fye3vX4JvX61ec7unuM/4l3I0UmuYh+4L6Y5SX9o+Spxkv6XSJINl3EC/9Bg9b g0toeqmun/wzFnn7R5ayPaAoUurQLHfXbUqaQrqdbgTTE5NynaEhce0B8wTCfwaiburTDC gz8QQcQJfTslozUIN1VqZeHE1zuikNamx9pJpZC9Gwi7HvZbAMKTbHY8zgyUlLy8BFfrbp Kk38RdEs+rdkrp6FvTETjpS/Km0MoiZAijO82YcCY0cCSDSlUtgfwuU45sHCSM160uaHWf LEuG570i3L7Ng1liTuZTpVzzvptmDYQCke17Cdw/tyeCU8hMb07rZu6gO5+ejw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDCC3trVzbnN; Wed, 22 Oct 2025 15: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 59MFoVjT031987; Wed, 22 Oct 2025 15: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 59MFoVsX031984; Wed, 22 Oct 2025 15:50:31 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:50:31 GMT Message-Id: <202510221550.59MFoVsX031984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: aaf04147bd3a - releng/15.0 - so_reuseport_lb_test: Add a test case for connected UDP sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/15.0 X-Git-Reftype: branch X-Git-Commit: aaf04147bd3a236c3896033d68f81de6b3d43792 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aaf04147bd3a236c3896033d68f81de6b3d43792 commit aaf04147bd3a236c3896033d68f81de6b3d43792 Author: Mark Johnston AuthorDate: 2025-10-22 14:53:28 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:50:01 +0000 so_reuseport_lb_test: Add a test case for connected UDP sockets Approved by: so Approved by: re (cperciva) (cherry picked from commit 1dd66c6ac2c146f540b2ff825fbee442354aeee5) (cherry picked from commit 25e065774302591b43a263a78362a816f799f715) --- tests/sys/netinet/so_reuseport_lb_test.c | 148 +++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/tests/sys/netinet/so_reuseport_lb_test.c b/tests/sys/netinet/so_reuseport_lb_test.c index fa9d6e425884..31d20160cb5a 100644 --- a/tests/sys/netinet/so_reuseport_lb_test.c +++ b/tests/sys/netinet/so_reuseport_lb_test.c @@ -29,6 +29,8 @@ #include #include +#include +#include #include #include @@ -551,6 +553,150 @@ ATF_TC_BODY(connect_bound, tc) close(s); } +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp); +ATF_TC_BODY(connect_udp, tc) +{ + struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + .sin_addr = { htonl(INADDR_LOOPBACK) }, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 1, "expected data available"); +} + +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp6); +ATF_TC_BODY(connect_udp6, tc) +{ + struct sockaddr_in6 sin6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(sin6), + .sin6_addr = IN6ADDR_LOOPBACK_INIT, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 1, "expected data available"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic_ipv4); @@ -561,6 +707,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, bind_without_listen); ATF_TP_ADD_TC(tp, connect_not_bound); ATF_TP_ADD_TC(tp, connect_bound); + ATF_TP_ADD_TC(tp, connect_udp); + ATF_TP_ADD_TC(tp, connect_udp6); return (atf_no_error()); } From nobody Wed Oct 22 15:50:32 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDCD6nRYz6ClrT; Wed, 22 Oct 2025 15:50:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDCD559fz3Rj7; Wed, 22 Oct 2025 15:50:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=euSlVo16mBGl424F7QZr5ynXgUnCblzivHqX0oqck8g=; b=sGInOVA/lmBEvfgcrlXSSF8YuzPM3VaRdkC2D1r8XZ3tTccHl0CD4Ppw7AdxUVk09W7R2X WEy1ZboMZYwtBPxzgELeUGvDeJYSC9KFmE8gMm0iPL78e6pgl/wlcDemyfdHTWXF6K8EwR iD3pEIiLgQoawX8WN6qyJyxw/38ral6pObPGoEAQd8AQGwup6HMv21MnbUK5ego6D07929 lFk9G10b76g6pEqFO6RJ5O+QGCK0d2vPg9aytBLCyDI1fDfuX9PZN7lWJMqzjmta4yQw6t CduLRwPC9Th3F56x7aFFOteW3chMeyBiWtVnq2YYjtQ8cc84UjMC1WZO6xqpkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=euSlVo16mBGl424F7QZr5ynXgUnCblzivHqX0oqck8g=; b=iMTiMCeni8v1SDKRAGw/nafs+YTAdSGczJ+GrHP78ZMHH2UzJtYaRwieXvX7mVsksGJefW BvfFsUOpoCZRpRml6OQgKREqhNBwaD4d8n/kk70q1w22ocqUKLuz0VKBMK9SHefhAOkkTo fDcKyTbyVtAqUzYJETQ54DWgNQ1LkebqF/DNjpqaT1FWLr8rwl0DcRaQ1J2+j54RiFTj5z tsqe0sUtD5b31Bo+7rgkjMTuofU36EhODgkU9quVcXmi73m3tbUVUFywLulBND8fyNComy TvisOSmnwzfeqF8ZdubBW+6Pk8FuT8Sg6wbqywhPAqtwN2GyAO9eZtP5T79mtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148232; a=rsa-sha256; cv=none; b=oWV73dMZ0WvN9zTri2EeximRp+N17ieg99iBnChDIktsFFlr21cTC+sm/idlbVlQ8MHFCa ZYYU2yB/teUO/s3hX90O8l59dg07+o0+r+iDRhbSD57crl4FZ6/QGXisuUie/t1ZSSTY7c OQ3CADHyi7pFhAzOY55uEbrsavv/3D+pV5vIL205xg/AXXFEy9KXskVsTDV7KkAxq6HZgU Lxvs4cUp44ICh6jaVnet+HYyxBnchHaH84PJhfPK6+AXf5oqQsEjATZ3IziLCCzeZI6vb9 Gakq0YR6rpBbQeDj/ENquhyUJrzi0J8tPdDU7Uj/QP4tTiYWCfIU2utLvRt5yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDCD4WVfzcGX; Wed, 22 Oct 2025 15:50: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 59MFoW6w032026; Wed, 22 Oct 2025 15:50:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFoWQA032023; Wed, 22 Oct 2025 15:50:32 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:50:32 GMT Message-Id: <202510221550.59MFoWQA032023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c43777cd7187 - releng/15.0 - Add UPDATING entries and bump version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/15.0 X-Git-Reftype: branch X-Git-Commit: c43777cd7187fba7b337770b66ed876f56241697 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c43777cd7187fba7b337770b66ed876f56241697 commit c43777cd7187fba7b337770b66ed876f56241697 Author: Mark Johnston AuthorDate: 2025-10-22 15:14:57 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:50:12 +0000 Add UPDATING entries and bump version Approved by: so Approved by: re (cperciva) --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index d18aaeb2fd46..2227d1f8acf1 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20251022: + 15.0-BETA2-p1 SA-25:09.netinet + + SO_REUSEPORT_LB breaks connect(2) for UDP sockets. [SA-25:09.netinet] + 20251015: The "FreeBSD-unbound" package is renamed to "FreeBSD-local-unbound". If you have set-optional or set-base installed, the new package will diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 746b799a908d..7b00e796561b 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.0" -BRANCH="BETA2" +BRANCH="BETA2-p1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Oct 22 15:51:57 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDDs2th8z6CmKL; Wed, 22 Oct 2025 15:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDDs2L2Pz3SRl; Wed, 22 Oct 2025 15:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DWIJt8gisl1KjFgTcJlxHxQ3iHEDpLF7gtuhBzo2UAw=; b=xaZ4afHCGSn2KjvMk07Xe/Ae7wzfIYLYd/8DQAy9D8/N6YCpbI4vk+oTQ8aAzVk+L74Gbs iy1RlQtAGBVXD5q3y1+7M8e7BeOx8mo8NE21R/ivR9To2fBJr7Mtu0I0gompDfmnaZgcqt PyZz5KLg9Z57+Vn/izB3zWyrO8vmfZjL3HkYiDJK/P4GDH9TjH+wqiTmNwLV1JEu6ZS946 GMBw+H1ggCpqwbyLj8rO8Qa+sna8AG7cIgAOMdzpKOWZ3J0ACh6cbVTGzlcvI0Wu3ikZbu rMOsqgXaYKOPbkQ2yKPjPVK92FvnSj5knd1EvofiwnPaXNLea93VvHdGNXJyjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DWIJt8gisl1KjFgTcJlxHxQ3iHEDpLF7gtuhBzo2UAw=; b=AI1sdTL8V1PkOBz5kZarSPunt+CLKCl+0CY6Jz9qsBpAOqErg+nfhYqX2cIAwjTZ61Tp2r 0ZAuxp+1MkUmqJadRXFRciVMTVgysZushz5nN7E5DNnbuy7oA3rxro9JgJT2qwV8JTPMis KIciBGm84Sx/0YtZbs11yUoWEdaH9KKf/1ZGr1lvX10qCGajwHKzdtOKny5Y6y68z1SzcU jvnEDyJvwu3KbZTFn7WsHqHTwi8zW6KnJpSVd22c9Y71oBVZd1wTUPRRyRy0jqwNr/9op5 YuftYhrmM5oqBuQS1b1fsjiUfSnCg1awwxSNktdIUz4W2fvCdEeDOgHCS6cBDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148317; a=rsa-sha256; cv=none; b=MfziGgvaXw/0aJcCq5LfaUkyXCnlYhhBGJWM9lwcStvqdhNBxg18KN8gDS69P89kSs160g gHZcC6CjdRS4/9lEBk2iwpI4duR0a4DBc02dwuWyXX8hY5sGpFhM/aGgTbG4eD4A2TTocm toXHG7SnpVdUDAsUJR/GyZE0cGNBhjZCYmTjtp6/qnEXeFkpvqSsFedqOfoDFRZeX1LHM4 PXpFlpEQCDxB1GODq24ZLQlGMfdT6dyb3HvNrbL2pDKXS59sxDGfjkmPGJfBfDpor1xu2R uCwcJG+kpjCkwqGh0nodDmPYY/YmWzzzXnLOdJMR30hIf+gALbW8hSz7Cp2XEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDDs1hVCzbmF; Wed, 22 Oct 2025 15:51: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 59MFpv17037104; Wed, 22 Oct 2025 15:51:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFpvNr037101; Wed, 22 Oct 2025 15:51:57 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:51:57 GMT Message-Id: <202510221551.59MFpvNr037101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 058bcb57cd4b - releng/14.3 - inpcb: Ignore SO_REUSEPORT_LB on connected sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 058bcb57cd4b7e855cd596316541aff0adc5ddcf Auto-Submitted: auto-generated The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=058bcb57cd4b7e855cd596316541aff0adc5ddcf commit 058bcb57cd4b7e855cd596316541aff0adc5ddcf Author: Mark Johnston AuthorDate: 2025-10-06 13:37:47 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:50:47 +0000 inpcb: Ignore SO_REUSEPORT_LB on connected sockets While TCP disallows connect()ing a socket with SO_REUSEPORT_LB, UDP does not. As a result, a connected UDP socket can be placed in the lbgroup hash and thus receive datagrams from sources other than the connected host. Reported by: Amit Klein Reported by: Omer Ben Simhon Reviewed by: glebius Approved by: so Security: FreeBSD-SA-25:09.netinet Security: CVE-2025-24934 (cherry picked from commit 320ad3dec5ff1b37f6907a47961c18b9d77e6a53) (cherry picked from commit e276759b368701a49e543c45d5d6ea08ed4fbc38) --- sys/netinet/in_pcb.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 89000a521bff..7d665c7d2a73 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2702,10 +2702,13 @@ in_pcbinshash(struct inpcb *inp) INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; /* - * Add entry to load balance group. - * Only do this if SO_REUSEPORT_LB is set. + * Ignore SO_REUSEPORT_LB if the socket is connected. Really this case + * should be an error, but for UDP sockets it is not, and some + * applications erroneously set it on connected UDP sockets, so we can't + * change this without breaking compatibility. */ - if ((inp->inp_socket->so_options & SO_REUSEPORT_LB) != 0) { + if (!connected && + (inp->inp_socket->so_options & SO_REUSEPORT_LB) != 0) { int error = in_pcbinslbgrouphash(inp, M_NODOM); if (error != 0) return (error); @@ -2836,6 +2839,10 @@ in_pcbrehash(struct inpcb *inp) connected = !in_nullhost(inp->inp_faddr); } + /* See the comment in in_pcbinshash(). */ + if (connected && (inp->inp_flags & INP_INLBGROUP) != 0) + in_pcbremlbgrouphash(inp); + /* * When rehashing, the caller must ensure that either the new or the old * foreign address was unspecified. From nobody Wed Oct 22 15:51:58 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDDt3l5rz6CmQH; Wed, 22 Oct 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDDt2sY2z3Sb1; Wed, 22 Oct 2025 15:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1pSJipPG+8ssjJFwf8FceQy1T09dHflPiSAp4SifA0=; b=pX/4236qXegMYezxpUfBm8O/PegA/rqf2bJsTEJgSInkh0BY4BPeu5ym00hq2mpipT9Nxe ngtKJWzbnI5E8lTjCS1MTWI6hRD4JvxK10eh4TjZ8JINrcxIi6hFwOZHbFGre5BDMxGdO6 KgjkNaLYbEEn2Eip+69FFRhYrFUBmkuZZ0ZrRPqKD7hOXyHFMkaqZhqb9jIwXwKRyIDY5Y P9S4aAWnERJnnDMZepxlDCx7N1BQE9lNfgx1PBOrlcS3iorpVJsAaMTbD9RsN4reyfeWHz 4F1F0EMA1VFmZ6ZW9CfM83yqa5Y5QUdFgn9yWt535kb5l5tjouxkBqEJDenxqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1pSJipPG+8ssjJFwf8FceQy1T09dHflPiSAp4SifA0=; b=pJOBu2uQn2BfuCRXPoQ7Sp/hIJX3rdaySS2A0FmcDzguv7dwHkZWRiaUzkExT+rqUg/X0A TExTjoZoDqoY3qHFqvHGlVjW/MRukIgafEvPpaelza68LPst90WegzfjV5FKMDeQQX63Ac eNLRLwXmDbfy15sEyyxIUJkzmNH6Aj1SU0She878X9hWs0SuYrLmEXD68l9FA1YegtKPzj BR1PEDouFay8yrWu9UPc3AEAsglw+FXrv/WzYNpTz38ulGETIWLLtBAzx5gwnWKf13h6/t +t3FKQ4KfXX1gXWxDqWGnazR+Y2pF9s7WAqf/Dzp7AZ0yA7R5MkvYWpUHAj89g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148318; a=rsa-sha256; cv=none; b=vMnAHfdSuhWrhr3VFndnk3zyP6A+h9I/OYXevVlkIvaUSy/zoCUYZA5B4WCJAQrSCPTxMf 5p6ROUsChKW4b9bb3HKVqA9ewf8M2pxaesoTpKbyLBdHCNszyyCdmanbyXIqiODjFQ1IM4 liJOJkR5FUloKO29DK1X3ebYLBZP4e6v6mUS+dPkgnHHnkZdjX0nVZ0WD4FTaTF51A9Uuy XwGKSQJT+P3uY/q2c0Jr7exHocilZLsvvDWS6DJNExgCyNOQmNdskKBE46hy9Ohz87GMSP d30951GpKYnRSRlumrhlbAx8pcTcNAeiiKA9AGma5E1sqfOQTWOrmL5xRzMmHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDDt2HyGzbmG; Wed, 22 Oct 2025 15:51: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 59MFpwbB037142; Wed, 22 Oct 2025 15:51:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFpwBB037139; Wed, 22 Oct 2025 15:51:58 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:51:58 GMT Message-Id: <202510221551.59MFpwBB037139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 65f6f823c5a5 - releng/14.3 - so_reuseport_lb_test: Add a test case for connected UDP sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 65f6f823c5a5ab1f0517a9652720f458b569a7f3 Auto-Submitted: auto-generated The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=65f6f823c5a5ab1f0517a9652720f458b569a7f3 commit 65f6f823c5a5ab1f0517a9652720f458b569a7f3 Author: Mark Johnston AuthorDate: 2025-10-22 15:04:02 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:51:38 +0000 so_reuseport_lb_test: Add a test case for connected UDP sockets Approved by: so (cherry picked from commit 1dd66c6ac2c146f540b2ff825fbee442354aeee5) (cherry picked from commit 7272e2d029c20c3144d7aa49500dc86d70344030) --- tests/sys/netinet/so_reuseport_lb_test.c | 148 +++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/tests/sys/netinet/so_reuseport_lb_test.c b/tests/sys/netinet/so_reuseport_lb_test.c index 5d3b2ab03af8..6c345c84f452 100644 --- a/tests/sys/netinet/so_reuseport_lb_test.c +++ b/tests/sys/netinet/so_reuseport_lb_test.c @@ -29,6 +29,8 @@ #include #include +#include +#include #include #include @@ -236,10 +238,156 @@ ATF_TC_BODY(basic_ipv6, tc) } } +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp); +ATF_TC_BODY(connect_udp, tc) +{ + struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + .sin_addr = { htonl(INADDR_LOOPBACK) }, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 1, "unexpected data available"); +} + +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp6); +ATF_TC_BODY(connect_udp6, tc) +{ + struct sockaddr_in6 sin6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(sin6), + .sin6_addr = IN6ADDR_LOOPBACK_INIT, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 1, "unexpected data available"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic_ipv4); ATF_TP_ADD_TC(tp, basic_ipv6); + ATF_TP_ADD_TC(tp, connect_udp); + ATF_TP_ADD_TC(tp, connect_udp6); return (atf_no_error()); } From nobody Wed Oct 22 15:51:59 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDDv6l57z6Cm7p; Wed, 22 Oct 2025 15:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDDv4t2Kz3SPc; Wed, 22 Oct 2025 15:51:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EkcFVtjJRKzTYTtRDTqi8rX9oNuACptaq5OMWnSxysg=; b=m2MtXLnQFYKqRlNFqr4Cqhqp6YsAMIls6FJmW+Tze6cyfaGGjSTONw+k7H8Yr8vtX3nqSy U4ErAeR3Dd1X4p2ij8foNejaDY/08L5ukQ96KjmVcROjWHGRS5bntpLtnjrNdUyhn7oVXD dGB8MpwWdcaT34M6/VE4HbF3wrV1Swjq9nXrDnlavB7J+b7TwV5/ckG7G39FcLO/FmeKi3 n4W80kOyrfi3reznuV1v6Hw1YQYr9431dl7sNikM3UwHD/5wFYt5bbKtfO1hEcUIUVpF21 skX10Aioiof6Nj1gm4v1J9+ODsJmSo7s0oGu+whcy9ik6cKgOryzZRDiaWMDdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EkcFVtjJRKzTYTtRDTqi8rX9oNuACptaq5OMWnSxysg=; b=df9A5RGJRGeIzprZN4lkHfJH2BL8f1J6ezH3aecL7fLz442kJxQh45XupyFyiOCFXymet0 d2jYtA7Y6DIIhaU/xt0X1ssLxPyoMQj/IjA/hb7PgFxAyJQhPj3ACdc3M2d+9FqtiJrL5H jA/GfPDNANemfuCcnh2Pn6N5YbF8dkRpejLenmbCFe7F3wgwBu2VPpXXkz3/6hYa/WjaVL w6WE+T7SY0ZIQnvB+ckg34Lq/4Y2ec11Rta9xftyUnqVPUnxGsZixLz0fL97noTUQuRJ8D sjysRYPs07uDZw/dkhkD9wDJCwiKCroP8XUIwWRj305vsu77tuXdqCP10NE//g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148319; a=rsa-sha256; cv=none; b=SxCLxmPzoiBFUZUl2WDV38bjwYcBq/5qJFbAylC13R7tflHzgKqyVQzoyxZ1tM8abxpiwU W7EQ07clVNfA5shz9vY5CtaCGX/LWZCfiw2csumrKQfViZb4rf+ekcGI7R2noNKcUvNzg7 Sxm/BoTNtNLIHAmB82zfpmKeJsKLq0QH9GBVFFSYEpYK8pzogDas4nsOBxwGVA7ckNXHQ8 BbxMakdIBrq8RCgeoC3eMVL59vDuNVx9qn2wzz0Eu2e5T2/yiqOZFTQ5BWYic2k0M9NzR9 vL5UsK7fzaU6hTvq391hJgADtY+YVQJbS0nH/rdgt15mHAZAr5oKL2jB7+wauQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDDv3WWmzbmH; Wed, 22 Oct 2025 15:51: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 59MFpxRr037180; Wed, 22 Oct 2025 15:51:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFpx1T037177; Wed, 22 Oct 2025 15:51:59 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:51:59 GMT Message-Id: <202510221551.59MFpx1T037177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 382f54740ee4 - releng/14.3 - Add UPDATING entries and bump version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 382f54740ee421cc0808d70fe79acab1f3d3e836 Auto-Submitted: auto-generated The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=382f54740ee421cc0808d70fe79acab1f3d3e836 commit 382f54740ee421cc0808d70fe79acab1f3d3e836 Author: Mark Johnston AuthorDate: 2025-10-22 15:19:02 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:51:48 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 9987252e8b2c..6af1b31f0b57 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20251022: + 14.3-RELEASE-p5 SA-25:09.netinet + + SO_REUSEPORT_LB breaks connect(2) for UDP sockets. [SA-25:09.netinet] + 20250930: 14.3-RELEASE-p4 EN-25:18.freebsd-update SA-25:08.openssl diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 8cc1fac788e5..99c29d44db02 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.3" -BRANCH="RELEASE-p4" +BRANCH="RELEASE-p5" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Oct 22 15:53:35 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDGl6f9Tz6CmQZ; Wed, 22 Oct 2025 15:53: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDGl66sNz3Tq0; Wed, 22 Oct 2025 15:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZgjNn9eq6Kly7O+g+x7IjNYqdvOqdV+xmHbqS8/gVBU=; b=QvVwPmnIaDfelW0TbjixQjt0cuiURxZE1Q9wAP0JGE+URirMLvBEPzaks1sULuHPpHT/gJ VVDxtSHa+TZhV6xjTXbB+y6wvT2UqzhQzwHSEr/8qxKaHjPQakwlajOCfOqDr3tu2hE7tL Slzl/ZFxb2d8nMMCbUHmdrJwNj4sR0SNBS/oAC2nxC97Jf1Rg4cpvhvtz6rn8OqV9rTCub 3eXzgx8+fv/Fp1Ebq/t1YfD35v4t6i+/zpP0gj7EkgZaJriD2rkDFS+k7nM5eTjWN+a6+v s6Q/imposmMa6cYSaUjk9C3Si0H7Y7EDJxPC4KxTh0868IRd7+oxFquEp7XckQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZgjNn9eq6Kly7O+g+x7IjNYqdvOqdV+xmHbqS8/gVBU=; b=lv9jJAD8WvLGpSs3gS4pqhQlw3/mciNha6vLyvIw9Cky9/gmIfIrXPMAlDe3JySF0eh0RQ 7FQm6yycsNoud1YabkKvPJK3LynYQtpCLscJscmRHO+3ffhTQE2IDg7HJPCZi84xYqRXPU Xaxpux0hMqPfZuhB+sdJykTsYNORzFzagjE/A3ZSfIS3XX/js0O0fMxWycVe33Mc58ny/X iufYQCxKhHefq8nbxf1gQqWbyb9cjpxFHd1eXZnwkqhHbWoKI61aR+gv4EAStQbdI0NsOl GMsTfqJn+KOrP9bubJwMeeh7Y/C8vrLeRVsTsZrhSPC6RewXywDvG4H6kVMyuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148415; a=rsa-sha256; cv=none; b=eZoQ8GJJd3hOTn3y18M57WTcEdHonCSsfc6jiB7ZHMYhue4W40Dyyuh/MXHtr2jvbILl2o ZWS1JakBDxkyruEnyl00NTxsM6SaIvKVLmtLMzNT8/wDZ25MZa1dF4BU/MSipMCCzI7j9H 0BT6AYKp575vgazb+DYZzceNlYBKfXWE7vSj/QcebMUzh3J9Z8HX9KfFcho3HSWi2Yla+D BDnbF9OoISqiZhoM1UCSOyM3hsaXAiXDIDMTedLjFJ0cwmY9epwY/5i0gjGns1C6GUYCTn ftB68xu0VnA/uCMtmgD+kD/vwQLb1nb0baGC5bbnekauwePm6Al50jm+kC0weQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDGl5YHNzc0S; Wed, 22 Oct 2025 15:53: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 59MFrZ9t039865; Wed, 22 Oct 2025 15:53:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFrZ5R039862; Wed, 22 Oct 2025 15:53:35 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:53:35 GMT Message-Id: <202510221553.59MFrZ5R039862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 90e14aa082d3 - releng/13.5 - inpcb: Ignore SO_REUSEPORT_LB on connected sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 90e14aa082d3f90c8a805dc0394e1db851859835 Auto-Submitted: auto-generated The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=90e14aa082d3f90c8a805dc0394e1db851859835 commit 90e14aa082d3f90c8a805dc0394e1db851859835 Author: Mark Johnston AuthorDate: 2025-10-22 14:49:25 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:52:57 +0000 inpcb: Ignore SO_REUSEPORT_LB on connected sockets While TCP disallows connect()ing a socket with SO_REUSEPORT_LB, UDP does not. As a result, a connected UDP socket can be placed in the lbgroup hash and thus receive datagrams from sources other than the connected host. Reported by: Amit Klein Reported by: Omer Ben Simhon Reviewed by: glebius Approved by: so Security: FreeBSD-SA-25:09.netinet Security: CVE-2025-24934 (cherry picked from commit 320ad3dec5ff1b37f6907a47961c18b9d77e6a53) (cherry picked from commit df888c8f41f633be3aacecdd357ebaad62aa11bd) --- sys/netinet/in_pcb.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 03315344a455..a6fd5feddf9e 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2668,6 +2668,7 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct inpcbport *phd; u_int32_t hashkey_faddr; + bool connected; INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); @@ -2676,11 +2677,15 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) ("in_pcbinshash: INP_INHASHLIST")); #ifdef INET6 - if (inp->inp_vflag & INP_IPV6) + if (inp->inp_vflag & INP_IPV6) { hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr); - else + connected = !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr); + } else #endif - hashkey_faddr = inp->inp_faddr.s_addr; + { + hashkey_faddr = inp->inp_faddr.s_addr; + connected = inp->inp_faddr.s_addr != INADDR_ANY; + } pcbhash = &pcbinfo->ipi_hashbase[INP_PCBHASH(hashkey_faddr, inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)]; @@ -2689,10 +2694,12 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; /* - * Add entry to load balance group. - * Only do this if SO_REUSEPORT_LB is set. + * Ignore SO_REUSEPORT_LB if the socket is connected. Really this case + * should be an error, but for UDP sockets it is not, and some + * applications erroneously set it on connected UDP sockets, so we can't + * change this without breaking compatibility. */ - if ((inp->inp_flags2 & INP_REUSEPORT_LB) != 0) { + if (!connected && (inp->inp_flags2 & INP_REUSEPORT_LB) != 0) { int error = in_pcbinslbgrouphash(inp, M_NODOM); if (error != 0) return (error); @@ -2761,6 +2768,7 @@ in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m) struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct inpcbhead *head; u_int32_t hashkey_faddr; + bool connected; INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); @@ -2769,11 +2777,19 @@ in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m) ("in_pcbrehash: !INP_INHASHLIST")); #ifdef INET6 - if (inp->inp_vflag & INP_IPV6) + if (inp->inp_vflag & INP_IPV6) { hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr); - else + connected = !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr); + } else #endif - hashkey_faddr = inp->inp_faddr.s_addr; + { + hashkey_faddr = inp->inp_faddr.s_addr; + connected = inp->inp_faddr.s_addr != INADDR_ANY; + } + + /* See the comment in in_pcbinshash(). */ + if (connected && (inp->inp_flags2 & INP_REUSEPORT_LB) != 0) + in_pcbremlbgrouphash(inp); head = &pcbinfo->ipi_hashbase[INP_PCBHASH(hashkey_faddr, inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)]; From nobody Wed Oct 22 15:53:36 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDGn0M7Dz6CmN2; Wed, 22 Oct 2025 15:53: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDGm6kypz3Th7; Wed, 22 Oct 2025 15:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mFosOxcTy8Al3WV6gLlN8BUThHZ0q9VCG0fp8SoBC/c=; b=kADt8svggKYepMLKlXd2soMrHB7szrQRhXwM207Gbq+HNIWCDG4bPyONXLHucSBQPiWJqh WU0BtkmojCxYwFBNm1lh5etiYfoSWq4jRngUz384pu9pvxrn7MEY9W+iltY3+47nTypeLE rzRW3W/F6GQ/AAvbub5q1iCn7bfIQos0hmX2pS8LXb6VRtQq14/mj7YUkAJovNfJJe82Mp YE9okKVfdGYKTFgSDzO34POqnzQkUdczYPMkzBhkDT7DMIjXig/M4Tlv4WRHspDBvk7dpL i8ywTTlBV11T1QS2bje3MjLrElTKS0ObRzjNX/tjCOS3H0u1uT2tsEDlAuW2Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mFosOxcTy8Al3WV6gLlN8BUThHZ0q9VCG0fp8SoBC/c=; b=lM6ZD/HfkO0D7tln6jGXV8y7JLzZnPLfWw29yjOgG5qbKOxpoj+yEjhVDqJC5EUsHGv2Ps 7Lxcfx964NS4aGMR6GWEKeH6GYCWV6RnyA2QJY4KqQfR7/YSspdA8cHX8pK9maXK1A3cZ1 lZJNPvDEDSIPClWk4Rb3hHHWAv3HpL3he9pEH1sLejVS2fW10pMEIg0Sum+bOB15eGwdic Wd6E2SAIZVP33x4eGXYgLjr9GX4wiZ9+BTCTlCyjsMmGoH8cQs30UKYu+8QQz1RnTSJSHS ZL+M/H6lziIkUz6vbPPWa/Vb00FqMAaKZuA1Iv64TEoTdhTp0b+eQHPh/wEk2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148417; a=rsa-sha256; cv=none; b=olxeTKmOhE7EjPRYPg959FFCj6owD+uJRJL05d/c4AD/gE/Yy/auTDH19POoU29TT1n13r cYanDdn7cL2t6S7+Da94vZZ45XN9L2DhABJngPWarJ8/OwroscG2NBpjgIDpHGON8wa8WN C/EfFUuYa8/K5WoZrMC+K1o0lEA8wANO33mHaO30iGW+amAwPSCn9l3AsmIrC9KTDBVZei AlChOAjm7Y0ImxfpVGIlq90mXNi5FXjaPYEicEK/PK2oXEqOlpElrJ5beUojak6HShwJak sXL2lUQWRxZ0xPyNUYCm1xhdPT15wKTi8ZAegQUoeh4EvUq5cdsfZsNquc2HTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDGm69q5zcS0; Wed, 22 Oct 2025 15:53: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 59MFraMA039906; Wed, 22 Oct 2025 15:53:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFraS6039903; Wed, 22 Oct 2025 15:53:36 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:53:36 GMT Message-Id: <202510221553.59MFraS6039903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8a7adde307a4 - releng/13.5 - so_reuseport_lb_test: Add a test case for connected UDP sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 8a7adde307a4379a06f49c241d68f4314515836b Auto-Submitted: auto-generated The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a7adde307a4379a06f49c241d68f4314515836b commit 8a7adde307a4379a06f49c241d68f4314515836b Author: Mark Johnston AuthorDate: 2025-10-22 15:04:35 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:53:11 +0000 so_reuseport_lb_test: Add a test case for connected UDP sockets Approved by: so (cherry picked from commit 1dd66c6ac2c146f540b2ff825fbee442354aeee5) (cherry picked from commit 8e999e63c356839fa60cf964e33e0054b63c7c87) --- tests/sys/netinet/so_reuseport_lb_test.c | 148 +++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/tests/sys/netinet/so_reuseport_lb_test.c b/tests/sys/netinet/so_reuseport_lb_test.c index 5d3b2ab03af8..ff9ba3142f03 100644 --- a/tests/sys/netinet/so_reuseport_lb_test.c +++ b/tests/sys/netinet/so_reuseport_lb_test.c @@ -29,6 +29,8 @@ #include #include +#include +#include #include #include @@ -236,10 +238,156 @@ ATF_TC_BODY(basic_ipv6, tc) } } +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp); +ATF_TC_BODY(connect_udp, tc) +{ + struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + .sin_addr = { htonl(INADDR_LOOPBACK) }, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin, + (socklen_t[]){sizeof(sin)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len == 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin, + sizeof(sin)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len >= 1, "expected data available"); +} + +/* + * The kernel erroneously permits calling connect() on a UDP socket with + * SO_REUSEPORT_LB set. Verify that packets sent to the bound address are + * dropped unless they come from the connected address. + */ +ATF_TC_WITHOUT_HEAD(connect_udp6); +ATF_TC_BODY(connect_udp6, tc) +{ + struct sockaddr_in6 sin6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(sin6), + .sin6_addr = IN6ADDR_LOOPBACK_INIT, + }; + ssize_t n; + int error, len, s1, s2, s3; + char ch; + + s1 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s1 >= 0); + s2 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s2 >= 0); + s3 = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s3 >= 0); + + error = setsockopt(s1, SOL_SOCKET, SO_REUSEPORT_LB, (int[]){1}, + sizeof(int)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(SO_REUSEPORT_LB) failed: %s", strerror(errno)); + error = bind(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s2, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + error = bind(s3, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "bind() failed: %s", strerror(errno)); + + /* Connect to an address not owned by s2. */ + error = getsockname(s3, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + error = connect(s1, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(error == 0, "connect() failed: %s", strerror(errno)); + + /* Try to send a packet to s1 from s2. */ + error = getsockname(s1, (struct sockaddr *)&sin6, + (socklen_t[]){sizeof(sin6)}); + ATF_REQUIRE(error == 0); + + ch = 42; + n = sendto(s2, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + + /* Give the packet some time to arrive. */ + usleep(100000); + + /* s1 is connected to s3 and shouldn't receive from s2. */ + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len >= 0, "unexpected data available"); + + /* ... but s3 can of course send to s1. */ + n = sendto(s3, &ch, sizeof(ch), 0, (struct sockaddr *)&sin6, + sizeof(sin6)); + ATF_REQUIRE(n == 1); + usleep(100000); + error = ioctl(s1, FIONREAD, &len); + ATF_REQUIRE(error == 0); + ATF_REQUIRE_MSG(len >= 1, "expected data available"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic_ipv4); ATF_TP_ADD_TC(tp, basic_ipv6); + ATF_TP_ADD_TC(tp, connect_udp); + ATF_TP_ADD_TC(tp, connect_udp6); return (atf_no_error()); } From nobody Wed Oct 22 15:53:37 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csDGp1XgKz6CmQd; Wed, 22 Oct 2025 15:53: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csDGp0Bq7z3Tf5; Wed, 22 Oct 2025 15:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TVJh9WgO9O5SPkflHdTYcI8wNUl0o6NKtsNf7tFZxSQ=; b=OXEJ2qFPDEEavIVp88hwvAdSvcLsEd6rcW4jL1BhzmB2FEieIit73ESmlppnLH4AYi71QQ THum6MYMhz1t6pnC8K3MquqoHWLolF/r4BefXZ8O3CMs9Uf+vHmTW/wSzzyOgzX6F/K+Hx tnl7wHLn0v6+E8vPniieB7jmKffD8L+akkpvx5Y2TuWC0Did+Q7U2Zt8v6e8N9b7A9VpMP Ei1ldmNA8WD8m54ShXF/QtoGwg10nkZpVNSASFyOkEDlr2Yc/dNoSwi+2OainypU1u8LPf fUgXrvP5XzSz5G/jrcONr94HgWsaH6ygF/k9gkv+hhfkZ+c1noxLpbBywfZtCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761148418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TVJh9WgO9O5SPkflHdTYcI8wNUl0o6NKtsNf7tFZxSQ=; b=t2913XT2bX74RRVls5iJHC/CcjUvKvm1kDpVAuZvTlLq2OG0oQnfJlLsBA6MPuknBWHULi fMccva0eU839Edqo/DUhsf+/gODstpOsqREM/YimHhXT148a57abXAKOOth24aRFLweIMy oBTd9KelWio5Kt6QJCrgZUkb4JOkYb/dkzXJCUTkciMSSMtAp70eHdehNRoO5GbvKkccFm FwFk1YtJskBfy/tvEzuvidbapjEvIsN1dBtb4v9JTI7rfO9t7oE5lvzdNAMV94yKFkN9Lz AsCBFE7vqSsHtMA7k4n1RUq6vcmF96CJ2AB7n0YG1S5hUdKn35ZhSxrOyTweGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761148418; a=rsa-sha256; cv=none; b=LcQR+Lh3qgi19WvhZIoY1vTdX8d5R0ujb6ZbHoVlep7DAgOt15d0m0AqXlWo2C55CEGdRM Ui/wov1v5QLJPvEbIRKfsUcXNR+BT1avSYEieIvT9n67rwDwsXUWY3Ew2WcqRrgKemnsem nLoVrOqFj3E23MirIh8LtIMkZTZEdr78BJbhgBSBgzdXFBSj3hXPWlqL2YMZ8h5rJLhYf4 /VbTxeI/v8B73HQSZ66QCksaNqtNMVnPkISFUu2ptu4rn77qWLJsBZUj1csMadue87+bAc NsnQEFoB8fUK0rc3MyYcfwtmAb9RtKLDLBlwls2gNViPuF75F/R5PIlnAEi/SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csDGn6qKdzc0T; Wed, 22 Oct 2025 15:53: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 59MFrbEo039943; Wed, 22 Oct 2025 15:53:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MFrbJG039940; Wed, 22 Oct 2025 15:53:37 GMT (envelope-from git) Date: Wed, 22 Oct 2025 15:53:37 GMT Message-Id: <202510221553.59MFrbJG039940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c4530d6e5f36 - releng/13.5 - Add UPDATING entries and bump version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/13.5 X-Git-Reftype: branch X-Git-Commit: c4530d6e5f368592b6048a0c63892626c05f433f Auto-Submitted: auto-generated The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c4530d6e5f368592b6048a0c63892626c05f433f commit c4530d6e5f368592b6048a0c63892626c05f433f Author: Mark Johnston AuthorDate: 2025-10-22 15:52:29 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:53:22 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index e74c2509c715..55c65b3afd6b 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20251022: + 13.5-RELEASE-p6 SA-25:09.netinet + + SO_REUSEPORT_LB breaks connect(2) for UDP sockets. [SA-25:09.netinet] + 20250930: 13.5-RELEASE-p5 EN-25:18.freebsd-update SA-25:08.openssl diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 57b4721a1bfa..add7f72dcaa9 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.5" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Oct 22 17:14:02 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csG3Z5xThz6Cv9L; Wed, 22 Oct 2025 17:14: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csG3Z5TDKz3pcQ; Wed, 22 Oct 2025 17:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761153242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cQ1ufgBekvHG6TH48LPMcBWKQyvWiH2NaAynLEG+RP4=; b=C8aJufgKblzM3ncKcvXIPvADyZxHF6n8wip8tHIiVY8faC3zcCYDBzqhDZYOOkvuV0KQU3 HuR8gpok6u5mZspElrY7yzw2UzqMnuG9w1AfCreTAj70SQG4nUXQZWQc/I4w7uG0A2g0VO egGAduK/7SKtVO/bqBfHWMvjTbDeTyE92biHAkoCF2FQJIaDdktlm78UfAhKevC+p8mOiW Br9BZ/+fN8msV6y5RaTHpQ8rB9Z5KzxGv14sGIMP6cMZfcujxNUA76jeSkXk/lMlnW24Ty yFUAIWYB+Oqg/zo9+cuZZehXi0a0Yjccxex7BL3Iyg6UDH/wEXiuUdN55FG6/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761153242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cQ1ufgBekvHG6TH48LPMcBWKQyvWiH2NaAynLEG+RP4=; b=ilt3o9z42QEkkW4lBRql8omtjuzWSMCn8qp6xm2aJPl+UCKr8jn94pnM83l0pYPpB0Ya9n 5xnOSo8jM8rCYtyRbP118A0wgLyQVbUSbhVGj6bpdxPpmF8UJ5AbEmhJ8ZP52EvcE2yLAY wCEzze175nMVnqmJ2mjfVZotn7TmPsltmJrjaO8UE5wCIiP8worXI37I6LopHYuRfw68ip zm1+0cPtxOmJk4eQssDkR3WrmIgxNUE6DLZvyM6qkOfllOhGpFKU24Oqz036eKGClGMpWP lzuPGRZwLOIfcomCUxx8yGANaYc9XoKmKPoLNFhrkdBqKq5GPT0+TSKNmAXmIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761153242; a=rsa-sha256; cv=none; b=VzJTtdzQEn98Zoafawd2qV5yTCaA2gBveklYEjLGYb7P/1V4WH9BjbRpWq/l8IF2THCrt6 4HBOgdULti6g/YiOztkKEmml5YVyHG/Svd3XTAoc8w8cScYE5GkEat5Kr+KhVU6MLlVDPe ZBu4j8z3rFsFhj7rDkjz0PG3InG3xi2CYlB4LUL/+fFlOq4DkMthcvhIHWxusjQOLIlw5/ Rztn6kKfjWdi2WbqQfEIfFe6k/Dl4ZE/KcuA8y5ydSuT0dUqSHxh3tR4EHacfS0UKAPQjK BJ/DJVJzh++u/4QrFbUdQuqZoDjx4o0Xh7dBc5a6q4a9Y45cEUM8L/GphaO97Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csG3Z52JyzfVr; Wed, 22 Oct 2025 17:14: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 59MHE2Cd091424; Wed, 22 Oct 2025 17:14:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MHE2j6091421; Wed, 22 Oct 2025 17:14:02 GMT (envelope-from git) Date: Wed, 22 Oct 2025 17:14:02 GMT Message-Id: <202510221714.59MHE2j6091421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a12857f5a80c - stable/15 - moused: fix GCC build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a12857f5a80c634b31a2599e4c127c0ee3b01ff7 Auto-Submitted: auto-generated The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a12857f5a80c634b31a2599e4c127c0ee3b01ff7 commit a12857f5a80c634b31a2599e4c127c0ee3b01ff7 Author: Ahmad Khalifa AuthorDate: 2025-09-09 03:54:24 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 17:05:30 +0000 moused: fix GCC build error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] (cherry picked from commit 54cc3da443da7e4a8a483d1fe46071382ff06ed0) --- usr.sbin/moused/moused/moused.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/moused/moused/moused.c b/usr.sbin/moused/moused/moused.c index fa3bfbbf2b3e..36cb8cc27eab 100644 --- a/usr.sbin/moused/moused/moused.c +++ b/usr.sbin/moused/moused/moused.c @@ -1168,7 +1168,7 @@ pause_mouse(__unused int sig) static int connect_devd(void) { - const static struct sockaddr_un sa = { + static const struct sockaddr_un sa = { .sun_family = AF_UNIX, .sun_path = "/var/run/devd.seqpacket.pipe", }; From nobody Wed Oct 22 17:52:31 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csGvz43fbz6D0VM; Wed, 22 Oct 2025 17:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csGvz303xz3w6k; Wed, 22 Oct 2025 17:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761155551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GEkhlkx7MHWJwRuVGMunUoegRtHTWY0yv2t+IHvK5i4=; b=Z25MT8m5JHqQYLrZyH8rQiZ8C5pKTy6KrH9ZyICNfIaEevlKoznr+4FtAbzUvDuVY57BYJ OHcAKXimASooYnQJMGW4cq4rwYjWGoLiEOGT3FG/GjGCgGowxkOueeY2N4iDIWdvbvBiTX O6AOeeOCHWYIxP3xSIKPM55H3oVMbpMLd+crW5KxX1LJ7WzvH9O2CnqBMUheNnW/Ie2AYb Q7nc+ycJjHVi9W92kDnvh7MFRY8ioV2WU/BCiXwwSN5KniVqCEtqzSvPewrfUfq4Ch9tGf YCosp2E/EfwaRxLIfvnNOTGr0KBxnM7FUb8uNEOOu/7icYjgm5ohvycgD+Hzrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761155551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GEkhlkx7MHWJwRuVGMunUoegRtHTWY0yv2t+IHvK5i4=; b=k2mbFH2UqKSMyFV+2BdfCpOrhzL/hbGOUH7S0aUUHVEag9ulOLX8/jGaHdDPSr71IYhkID bGt41RmZuYwlglzrKlEUSfH6M2PllmWwI64wbB4YMtuv/Q1wydROB6HfdKHmdDvwLh2sJw TBWCErsai3f2KBToGgrzLrroI/fvCPZSdMrD9nPMBA030LdVcA5adfXbbyOUxoeuFZvsow wE0Ss1MtLmFEz/++K8s5xfrw17dsqN6igUycG/Rzax+JKOkqxH9KFvckxsnyzn4XmxwD7C HGoi5UhIp/USlNMwWPxvUx6SvV0XECFpKp0fmc9asPrYa+k5kpIZrCMbd3HcjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761155551; a=rsa-sha256; cv=none; b=BiCsYr6+K9mzyw/VeYm3GRVbNWN38nlBVlmr83jq9iHoZe7EUDyT5KYN/tVJGeqgubW5Vo eG6dY+J9+W8jLFgBURqsVPbSWqblzgX5UAfeitE8wlVKM6qpM1KzHLj8eoLCaZ+pAZJ7wG zaup/WWAOSsxA4bz7oATk2Izn3JpDOeef694vw/xBWexv9XDUdCzrVjiCPPIbu5caCAsEn QVqEHIp2m4zZ8NbY4YGDSH9Hf2MJc3EaoOpw8om1xKZownAtmLE5lyuhJ2rcIrs/TXsqso LHRKpdYgrrZ99TXl4Eh9Cbk+tTvsGUwN+f4pISlKQu39WCKIsMmRPzgGtNlptQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csGvz2QLPzgBY; Wed, 22 Oct 2025 17:52: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 59MHqVP0065933; Wed, 22 Oct 2025 17:52:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MHqVr6065930; Wed, 22 Oct 2025 17:52:31 GMT (envelope-from git) Date: Wed, 22 Oct 2025 17:52:31 GMT Message-Id: <202510221752.59MHqVr6065930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 3d368c699b73 - stable/15 - libc: Add "Z" as TZ designator for strptime. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3d368c699b73cc1dff3ca27d29d19666741d9ff8 Auto-Submitted: auto-generated The branch stable/15 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=3d368c699b73cc1dff3ca27d29d19666741d9ff8 commit 3d368c699b73cc1dff3ca27d29d19666741d9ff8 Author: Gordon Tetlow AuthorDate: 2025-10-15 22:24:06 +0000 Commit: Gordon Tetlow CommitDate: 2025-10-22 17:52:15 +0000 libc: Add "Z" as TZ designator for strptime. ISO 8601 allows use of "Z" as the time zone designator. Update the strptime parser to allow this usage. While we are at it, update the manpage to reflect that both UTC and Z are now valid options. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53083 (cherry picked from commit 79e57ea662d92ffcbe7d65854a284aefac6a332d) --- lib/libc/stdtime/strptime.3 | 2 +- lib/libc/stdtime/strptime.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3 index 7df73d2d080a..9456fa757b85 100644 --- a/lib/libc/stdtime/strptime.3 +++ b/lib/libc/stdtime/strptime.3 @@ -171,7 +171,7 @@ is taken as noon. The .Fa %Z format specifier only accepts time zone abbreviations of the local time zone, -or the value "GMT". +and the values "GMT", "UTC", or "Z". This limitation is because of ambiguity due to of the over loading of time zone abbreviations. One such example is diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index 5f1293c7a267..375e49146639 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -546,7 +546,8 @@ label: zonestr[cp - buf] = '\0'; tzset(); if (0 == strcmp(zonestr, "GMT") || - 0 == strcmp(zonestr, "UTC")) { + 0 == strcmp(zonestr, "UTC") || + 0 == strcmp(zonestr, "Z")) { *GMTp = 1; } else if (0 == strcmp(zonestr, tzname[0])) { tm->tm_isdst = 0; From nobody Wed Oct 22 17:52:46 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csGwG5PPjz6D0qN; Wed, 22 Oct 2025 17:52: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csGwG4Hkfz3wBl; Wed, 22 Oct 2025 17:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761155566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6+SMJk8MMIlIsbNUmdZrYld3JdSSThy0Nb0XwGRxL8=; b=gwVrNrcuQ5WKKYePe580u1JkVdxux0GrjvFAjFGN+Noc+rS/LTRnJm5kXyftvrstpEWDHZ tHdhVgJPvaPnAC0DbT9hiyeeHfuxEPy5RAT1FamaMnrVk5LkqUzGgxU0HJKdsln7MGEPAV lgKjEszghenxbY6B0SQlFbStpBTvJXN1bRGVUpsmzCqmM56UegF9MV/YZf8DM87E6LvS8Z XvoLMFTSPVrKf0ai/iNsO9f9r/x2JwSaUc3zSsckrb0pfTFVfbi5Z+rLOPKY8W+Hyda7YD y+r2AGI7xnJ9X+3Ar1+CLhKLQzD3nq6+IBuvP6aFgUFEJCAPL7z5PVCEk+alYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761155566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6+SMJk8MMIlIsbNUmdZrYld3JdSSThy0Nb0XwGRxL8=; b=fTg8QRKPDoC+axEJLZVXaYfoM53018QoQfIf7s5qzB5L4mSuJzRxMnyqWuTr7Y2CSpt2y8 0wXXoPRVgHH2ogzCcE3hyvKM7Yph4zAv+tFgoOv0x1tXevl+BDG46BUKdcuAswl8ckNQNl 8T4a8hCVID3DNIS0A+7In+66mlmz4kpm7B3txSekjf5WWjpE2UY2vMC8w+EmsWSZhr1hv8 oejtDcRrN/vAC1Rnrty1iiEg+gPKH07zS4I2H+BBbRMwNlDo8CLg+/YmpW1i/XxgphosJc ajBZ1le60fBeOr3Kwob9l2XrJARy5+bAOPyQD7AR0BGhVzuQvvKsDPqdaiCK8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761155566; a=rsa-sha256; cv=none; b=l3bcnZe2sWkGpnwpYTd8a3WWsTaqY40TeoswZ+JtL2levmdHYm6ip+JCDLQOCi1Hhxqw8y km6kTnAj0gKteNWLdX0gsu/GCjD8UxdQwrSgmG69biUv6tVa2ZTnjIl6Cfa/9fbBz1/IOc GO9+s323Yjc8li3PqIOey0QVNXGlwdTj4cIxMzl08z1ejlMLFjCpHsBam10qYdzZk+f/X9 B437qvrsDAQPHuDndSl7COtcyCrLK86aQGo6JCLfK6z6Uy3gyQkJs7m+AqvZksa51MC9bu MjLcyrBdfu4+lEfm44cEKIiyCyU3/djPLrSO4jr0LYiOvgot7Bs+BKY2txRblQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csGwG3mvvzgYW; Wed, 22 Oct 2025 17:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59MHqkpf066133; Wed, 22 Oct 2025 17:52:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MHqkbS066130; Wed, 22 Oct 2025 17:52:46 GMT (envelope-from git) Date: Wed, 22 Oct 2025 17:52:46 GMT Message-Id: <202510221752.59MHqkbS066130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 3b9b7e09e359 - stable/14 - libc: Add "Z" as TZ designator for strptime. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3b9b7e09e359ac20f83d4dd972271ff950b62da6 Auto-Submitted: auto-generated The branch stable/14 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=3b9b7e09e359ac20f83d4dd972271ff950b62da6 commit 3b9b7e09e359ac20f83d4dd972271ff950b62da6 Author: Gordon Tetlow AuthorDate: 2025-10-15 22:24:06 +0000 Commit: Gordon Tetlow CommitDate: 2025-10-22 17:52:36 +0000 libc: Add "Z" as TZ designator for strptime. ISO 8601 allows use of "Z" as the time zone designator. Update the strptime parser to allow this usage. While we are at it, update the manpage to reflect that both UTC and Z are now valid options. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53083 (cherry picked from commit 79e57ea662d92ffcbe7d65854a284aefac6a332d) --- lib/libc/stdtime/strptime.3 | 2 +- lib/libc/stdtime/strptime.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3 index 7df73d2d080a..9456fa757b85 100644 --- a/lib/libc/stdtime/strptime.3 +++ b/lib/libc/stdtime/strptime.3 @@ -171,7 +171,7 @@ is taken as noon. The .Fa %Z format specifier only accepts time zone abbreviations of the local time zone, -or the value "GMT". +and the values "GMT", "UTC", or "Z". This limitation is because of ambiguity due to of the over loading of time zone abbreviations. One such example is diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index e9ffe7180916..b89e140aa8d5 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -554,7 +554,8 @@ label: zonestr[cp - buf] = '\0'; tzset(); if (0 == strcmp(zonestr, "GMT") || - 0 == strcmp(zonestr, "UTC")) { + 0 == strcmp(zonestr, "UTC") || + 0 == strcmp(zonestr, "Z")) { *GMTp = 1; } else if (0 == strcmp(zonestr, tzname[0])) { tm->tm_isdst = 0; From nobody Wed Oct 22 17:53:41 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csGxL1JNxz6D0kQ; Wed, 22 Oct 2025 17:53: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csGxL0kpFz3wJ7; Wed, 22 Oct 2025 17:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761155622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aVsBKCJQUd82ZmHuYfVxCqaH7+X0nCFuQFe3TjYEbA4=; b=f5IBtqai/HA4BUozoyWj2Dm4btX5QPXQqWhgcHRn19mDSjJtcedfCC2gc/I7uL8NJzAGu/ Bvxnfsn+s4OIOQ3c6TQCpilQD4e2p48U/6sAs5K4B88wQaLeI16FvkY7Svo+2M7PXlWEsQ oc531ZRCqKK4kB7weq/blyY7t2P8Fy+h+fjoou3CPd9hSqVisKUUdrZgkAD0zyT9HLq/Ld 2tBtISci+arUayKe+oApSLclA9pGs5uX7am2ll3ivJMBaTsNcfxid6WTAOAoFHTKEZEFtx JmYsHpr2ZIqgYpYGDCpjcbtXa6DvD/337IQdXNbXGXC7mmxcjWGoFXSMhQN4Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761155622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aVsBKCJQUd82ZmHuYfVxCqaH7+X0nCFuQFe3TjYEbA4=; b=tXy8bqnRuPym5yMVhVhnblzkDj9hF0A4QN3/fKyeW1SB1DoL8r0UumY9Uwhzmywr3YQQME nf9wMChdawbtvAyyrxs+jhBVkIMbbgI95JlkyMQZJnkNplOFZddq6xe1VUKMGyneem2Uxp NwMjCZbtJpXxOWHn4COicJQ4gdDnv9EknGROcTjLqSs5h93NjUZumFacbxKjglYJJY5+ln 0KjDUJ9sudJqI1L1tkjyy3Xz9Kls6kedg9n7m9t010fuE2yGG65XKsVk8dbY1QLZjPLmF7 2Jo0rxFqx6hK+P7EWv4Aesmv2R47EIS/WILcqhHB8qe/qDKSNY0NlRvJYD+TcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761155622; a=rsa-sha256; cv=none; b=Hq20FOUf5Ymk2xN4yY7Aobb5AWoXATXFcASpjlyWhPkgufQfZnxXDz6R+uqjQkKhz8cLga A1Ykq0gL3MFbPhwl8aVJxctIjVHF3vsXCcyv91+Yb/iL6h/y9mYS7GsRkyfaLIGi6Jftsa GY0ltP+I1hy8JN0IFD5nSIziYHjqgNcUVwSOZ4lfL546VKh2evXNlLGyE0Mw3zxLGHAaF7 HXRbXE5gl346C7rYMr+umKVvSGaZvRAoyzdzZcujSHPgRBRgX8MqtahDyeMn89X3mbZ63l 1JOc9hom6ulR0ophW2Li8KkKjBBrX0roU9SCYurGZ471LILLz7zFwGQlQCUeIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csGxL0Jk0zgYX; Wed, 22 Oct 2025 17:53: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 59MHrfu4066532; Wed, 22 Oct 2025 17:53:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MHrf6D066529; Wed, 22 Oct 2025 17:53:41 GMT (envelope-from git) Date: Wed, 22 Oct 2025 17:53:41 GMT Message-Id: <202510221753.59MHrf6D066529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 2564a21f9774 - stable/13 - libc: Add "Z" as TZ designator for strptime. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2564a21f9774c177abcaf64f89d65954ec78b037 Auto-Submitted: auto-generated The branch stable/13 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=2564a21f9774c177abcaf64f89d65954ec78b037 commit 2564a21f9774c177abcaf64f89d65954ec78b037 Author: Gordon Tetlow AuthorDate: 2025-10-15 22:24:06 +0000 Commit: Gordon Tetlow CommitDate: 2025-10-22 17:53:28 +0000 libc: Add "Z" as TZ designator for strptime. ISO 8601 allows use of "Z" as the time zone designator. Update the strptime parser to allow this usage. While we are at it, update the manpage to reflect that both UTC and Z are now valid options. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D53083 (cherry picked from commit 79e57ea662d92ffcbe7d65854a284aefac6a332d) --- lib/libc/stdtime/strptime.3 | 2 +- lib/libc/stdtime/strptime.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3 index 7df73d2d080a..9456fa757b85 100644 --- a/lib/libc/stdtime/strptime.3 +++ b/lib/libc/stdtime/strptime.3 @@ -171,7 +171,7 @@ is taken as noon. The .Fa %Z format specifier only accepts time zone abbreviations of the local time zone, -or the value "GMT". +and the values "GMT", "UTC", or "Z". This limitation is because of ambiguity due to of the over loading of time zone abbreviations. One such example is diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index e9ffe7180916..b89e140aa8d5 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -554,7 +554,8 @@ label: zonestr[cp - buf] = '\0'; tzset(); if (0 == strcmp(zonestr, "GMT") || - 0 == strcmp(zonestr, "UTC")) { + 0 == strcmp(zonestr, "UTC") || + 0 == strcmp(zonestr, "Z")) { *GMTp = 1; } else if (0 == strcmp(zonestr, tzname[0])) { tm->tm_isdst = 0; From nobody Wed Oct 22 18:21:16 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csHY92LGcz6D40w; Wed, 22 Oct 2025 18:21: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csHY90Zkfz41LS; Wed, 22 Oct 2025 18:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761157277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3EOCsdJyq9rKGV7DGRvbH8C9pavRA8qgGSRHstV7eo=; b=Mbt6K2exkWJBiIYj3IJpXveHk0/Q8aqA+/868fUeT1vG1jiP6wCjlu305siEo8vKJHqtDC uEQOwMT15AX4Bf1A8LWOOasovLCj/Qm8IWGAkETgtem1TO8clhEcVR8IfBcjwpryydpqS8 e1NhxlxgP02ZGMhEDejZPniU9a0kJ365Vga+wzLUyLxKvE7tt4dE+PNzKaMUlf5xDYUMa0 djlDixb3yA1kK9drHlisneYJfMQ/5RMwyqerpbnWZdx2OuuvQ7i8y66aolIYLdjFJb2NVF 698Wa4Wg9KFMuqzdG6bGr6aWwbSdyAiT1fyDR2lIdJXpF/bp+aQEf0d6CYUlSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761157277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3EOCsdJyq9rKGV7DGRvbH8C9pavRA8qgGSRHstV7eo=; b=o6LpDUi4ntsEhfSun7OFZDzQcQg4GOU4/5a/RlVIJQgRAck+I6XgBy3GWM24L8K1ULG9EL RzPXCQ/x4cV98DNjq2WB6oEh+P7/Hyv0QGxvsfPuXpKVzwRXr/JfLFqn+a2m62x4RxBY0+ /M///Dv3qgEwd7o1qQ3p6LRmMgrIkfrmgz2dJrM+SPSqfMnGk9E6YdnFHiWtXnFWI7YaGI R1z249wyiHoPR2T/U0e4asREdq91dui/jhVtaJX2O8pu4oBB01o9KmgzIB3FAMgsVePGq2 WSknltWMZex+l+I9yhEBgVpnJ1pLlFdpFkSjUdXWbeNneR4OVAy8E+Jb8GQ2nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761157277; a=rsa-sha256; cv=none; b=qOQC/Y4hT76HozSeDOMBt8Im/egWcciwjqlUeAGOPefqs5DmAJ2aD2zwzw5OzmgrvFQx5R 3tyVsFkvxqnZkDq/NijHsTwA+i/6p7MmrMAJvI4LvjXYzBpEvMwFNIWJrZFB47LjYuhnzt AX0D3cgWO86EaFsYlM2KIdqfqc9zhujFQY9HoipHMPLtpEP8g6nRN5jXtAnhQB1ZHPVwq1 9voJzRIl4HDXrQXs1VcctqeXGFhOkk1Ep0eW04lh72hOsSYLhOMeWfC+TYIbby5kqvQHID m8c72EEAmv+gyf9/kUugQpWsHrxMwz2dmeT5rezloT+OnWIajMA4xnmISQG9aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csHY872zvzgdd; Wed, 22 Oct 2025 18:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59MILGa3018398; Wed, 22 Oct 2025 18:21:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MILGgJ018395; Wed, 22 Oct 2025 18:21:16 GMT (envelope-from git) Date: Wed, 22 Oct 2025 18:21:16 GMT Message-Id: <202510221821.59MILGgJ018395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 52ea1ca18a06 - stable/15 - release: Add pkg .conf to METALOG on dvd List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 52ea1ca18a0674e5085d6d0ddbc3c13bf0850429 Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=52ea1ca18a0674e5085d6d0ddbc3c13bf0850429 commit 52ea1ca18a0674e5085d6d0ddbc3c13bf0850429 Author: Colin Percival AuthorDate: 2025-10-19 16:59:08 +0000 Commit: Colin Percival CommitDate: 2025-10-22 18:21:00 +0000 release: Add pkg .conf to METALOG on dvd We're correctly recording all of the packages in the dvd METALOG file, but if we don't record ./packages/repos/FreeBSD_install_cdrom.conf then users won't be able to install them very easily. Reviewed by: markj Reported by: Lars Tunkrans MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53199 (cherry picked from commit 2b5c62494df95cdb844b5f6f852412f2178f66dd) --- release/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/Makefile b/release/Makefile index 6b5b0c1b975c..c142bc35a45c 100644 --- a/release/Makefile +++ b/release/Makefile @@ -427,6 +427,8 @@ pkg-stage: dvd mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ ${.OBJDIR}/dvd/packages/repos/ + echo "./packages/repos type=dir uname=root gname=wheel mode=0755" >> dvd/METALOG + echo "./packages/repos/FreeBSD_install_cdrom.conf type=file uname=root gname=wheel mode=0644" >> dvd/METALOG .endif touch ${.TARGET} From nobody Wed Oct 22 18:32:38 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csHpG5rfPz6D5KZ; Wed, 22 Oct 2025 18: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csHpG5CpSz43Vs; Wed, 22 Oct 2025 18: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=1761157958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R0NadJWgtbZi/WPFEJImMNTYVNREUOMqq03xk58r9ZQ=; b=EqR3ri9jqyKI7PajynBXXjwt9i/CubEPXfpLyzH8dqVMZrOtxymVYHOqsjZXgBoFYUx1JW v1mcbtCvnFiNCdrE33mw2vxhYClqAmpPRlfpSP4TSG4rlrGkU/p4iX2DRbJupanM2AVzI4 HbP7DIZ3UU9ZBiCDA6VOvOJ91YPfnPyS4cHl467L/tV0wHKcVv5wbEbJuLun4AHbberU9Z a6WwYY5VSXGx8zAT2KwpYem23ZRBes3obTOa/Tinu20+QKiZxaPXvTzWxIr8F/pNmKmM8S 6B0kJojhQ7fMPQFip+d4OWYBfH6NcZEIO2hFYXPsa44zTI/oSY5iJXu1Yw3D2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761157958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R0NadJWgtbZi/WPFEJImMNTYVNREUOMqq03xk58r9ZQ=; b=Ht2l4kxBb51CMWkc/Bdp9tRor19oIkzeMHu8VihXYtB7JeIPbz6mQ9LJBVln0XUOI2F59S eG5x9IKrTUSKzImR3pGDe/u7EtC8/OoEzGelIOKHjdFoLKHZcLrbBDCKe8fzzdkzNrpBtO BK1NeYo7BHMgqldtyAKr8LweAf3MzsfAPQZ+Xm1RPoxW7OVPNPSNIjSjEsvJRszEwmB87s amNzmMABdA1Jr0DDt1veQED2XcTWbw0dFwNPY1IZNTHOpshFGHb4Ca0mkDm7HoLERqnRsI /vGPysm5xCLQIMiMT6/OnfP6KFxh+3LIFvu1c7Wpfm6uKtbHb+RPl2GBhEtUpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761157958; a=rsa-sha256; cv=none; b=bYnBug1Af6gPIN6ZTFZoPqqREuIvbUAtd7P4QpIHUGQyEEn8Mc47kaat3F2iqP8Ebjgzdu fwS50itWn4Y31AMq2/gD24SaLumBZiiQTZIcPhKsKCABPq1etKjg/3++mr0ra1tNwXyHeo 4TXWtlZE9eOgLmaR8RE9R5feM7HLqCMVqlh1iSyGLkt9b9epVhU7/HSY2LtWADuNI0+exR FE4Z/rNAdvqWevFJu/YfqkVs+xuiKTBykQCxFEipXYg1rUxSfKXWl3+sxqEBMMWWy10kLP 9iDzBdriPa5nm2h+cj3YhazjqOxGzGyG/lOpjghluJNF1WXGGIqrg82kRz2UiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csHpG4ft0zgwB; Wed, 22 Oct 2025 18: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 59MIWctx043385; Wed, 22 Oct 2025 18: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 59MIWcR6043382; Wed, 22 Oct 2025 18:32:38 GMT (envelope-from git) Date: Wed, 22 Oct 2025 18:32:38 GMT Message-Id: <202510221832.59MIWcR6043382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 06e48a8d7a4b - releng/15.0 - vmimage.subr: Fix when/where we fix up METALOG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 06e48a8d7a4bd0299a537fb70968beec9bb5be14 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=06e48a8d7a4bd0299a537fb70968beec9bb5be14 commit 06e48a8d7a4bd0299a537fb70968beec9bb5be14 Author: Colin Percival AuthorDate: 2025-10-19 00:27:07 +0000 Commit: Colin Percival CommitDate: 2025-10-22 18:32:18 +0000 vmimage.subr: Fix when/where we fix up METALOG We only need to check for unMETALOGed directories and sort the METALOG file if we're using it, i.e. if we're doing a NO_ROOT build. This non-NO_ROOT builds by no longer bogusly writing to /METALOG*. We only need to add databases (spwd.db etc) to METALOG if we're doing a pkgbase-enabled NO_ROOT build; but we should always do this before creating the filesystem, not only if we installed extra packages (in vm_extra_install_packages, where that code was erroneously placed). This fixes non-cloud VM images, which in 15.0-BETA2 shipped without password databases. Approved by: re (cperciva) Reviewed by: ivy MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53194 (cherry picked from commit 012014403bdcb2b3aa7ed3895079a0059204c35f) (cherry picked from commit 962194df8333124876a25926244864bd5d2d26d7) --- release/tools/vmimage.subr | 66 ++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 842a808c623e..99e1936296e1 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -213,16 +213,6 @@ vm_extra_install_packages() { install -y -r ${PKG_REPO_NAME} $pkg done metalog_add_data ./var/db/pkg/local.sqlite - - # Add some database files which are created by pkg triggers; - # at some point in the future the tools which create these - # files should probably learn how to record them in METALOG - # (which would simplify no-root installworld as well). - metalog_add_data ./etc/login.conf.db - metalog_add_data ./etc/passwd - metalog_add_data ./etc/pwd.db - metalog_add_data ./etc/spwd.db 600 - metalog_add_data ./var/db/services.db else if [ -n "${WITHOUT_QEMU}" ]; then return 0 @@ -290,28 +280,42 @@ buildfs() { cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG fi - # Check for any directories in the staging tree which weren't - # recorded in METALOG, and record them now. This is a quick hack - # to avoid creating unusable VM images and should go away once - # the bugs which produce such unlogged directories are gone. - grep type=dir ${DESTDIR}/METALOG | - cut -f 1 -d ' ' | - sort -u > ${DESTDIR}/METALOG.dirs - ( cd ${DESTDIR} && find . -type d ) | - sort | - comm -23 - ${DESTDIR}/METALOG.dirs > ${DESTDIR}/METALOG.missingdirs - if [ -s ${DESTDIR}/METALOG.missingdirs ]; then - echo "WARNING: Directories exist but were not in METALOG" - cat ${DESTDIR}/METALOG.missingdirs + if [ -n "${NO_ROOT}" ]; then + # Check for any directories in the staging tree which weren't + # recorded in METALOG, and record them now. This is a quick hack + # to avoid creating unusable VM images and should go away once + # the bugs which produce such unlogged directories are gone. + grep type=dir ${DESTDIR}/METALOG | + cut -f 1 -d ' ' | + sort -u > ${DESTDIR}/METALOG.dirs + ( cd ${DESTDIR} && find . -type d ) | + sort | + comm -23 - ${DESTDIR}/METALOG.dirs > ${DESTDIR}/METALOG.missingdirs + if [ -s ${DESTDIR}/METALOG.missingdirs ]; then + echo "WARNING: Directories exist but were not in METALOG" + cat ${DESTDIR}/METALOG.missingdirs + fi + while read DIR; do + metalog_add_data ${DIR} + done < ${DESTDIR}/METALOG.missingdirs + + if [ -z "${NOPKGBASE}" ]; then + # Add some database files which are created by pkg triggers; + # at some point in the future the tools which create these + # files should probably learn how to record them in METALOG + # (which would simplify no-root installworld as well). + metalog_add_data ./etc/login.conf.db + metalog_add_data ./etc/passwd + metalog_add_data ./etc/pwd.db + metalog_add_data ./etc/spwd.db 600 + metalog_add_data ./var/db/services.db + fi + + # Sort METALOG file; makefs produces directories with 000 permissions + # if their contents are seen before the directories themselves. + env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted + mv ${DESTDIR}/METALOG.sorted ${DESTDIR}/METALOG fi - while read DIR; do - metalog_add_data ${DIR} - done < ${DESTDIR}/METALOG.missingdirs - - # Sort METALOG file; makefs produces directories with 000 permissions - # if their contents are seen before the directories themselves. - env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted - mv ${DESTDIR}/METALOG.sorted ${DESTDIR}/METALOG case "${VMFS}" in ufs) From nobody Wed Oct 22 18:32:39 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csHpJ1RTSz6D5HD; Wed, 22 Oct 2025 18: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csHpH60Pnz4367; Wed, 22 Oct 2025 18: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=1761157959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9fUk9LHcuZNxkx4jJKu9WMPEkOhPNgvn1FBTwGB67q0=; b=emgsyFOrvmo5D1W61Lke2pSPCN0PvTQJ3wya/SD5R72I769HQfgnTdKwdmjxa0H2m+hiUD ir6aiiOQhYMJ2iI47WVVhTWFcVKn4Bf23Pc6cCIeTwlF9FkfUHpD71pQnlo49x2Tbsd8RM 6u3O43Ir5tPgrJ7m6PF9oUSO8oufeO1nSBfleqMaYHBIDl/06oNTX1lC7bhFedQpiqeLVO yZqmP6u2w8RwYJ9rRdyjC18hX/0fXXMAZvy2zYV5ic6Xl90vz7kBvaKerDm+SZvppdWKFk bncLUc8WuukR2ULHXswAXd2jluE2+kpUGK3dy/fNNuyvIEFwXfyyUyWU6tZKbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761157959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9fUk9LHcuZNxkx4jJKu9WMPEkOhPNgvn1FBTwGB67q0=; b=GR7LZUubwcgWWLZbhuirt2R/IivYS2RaeYyqd573yqTCevIbwE1NRrQCw4PU/ja7Tm5Gf0 pCgiEA3ZRwFuR6CKd5MH5knoCR9L1XGgf04QZ5aMT0f2chfoik9SLZVeEcKQRLu11HZjpr zAT5O98ob9sv21ixIN4v0rNKMLdx/Y0hO+do9Znp2OQ/WcEC6VLGGi4PwV8j76Xydo1Cca meJar9C3QADrVTXC4HJqjZcb0FCP9+Oy5fmzIHnFOO6aokVfCocMYqhg2WthcGtN6gvPh+ MYrfXsQqF+tY0YEljRMqs2JWo9JMJqPCMaxqeFEgEw5C9TO8NPYPLjvb8i4oFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761157959; a=rsa-sha256; cv=none; b=Dg0YOgjobYHE5fLbD6hL6IDdAgzhzmbNAy/gnIQVJzBEuL6LL/39hncIYgnpj9d3G32jIX +UMbIrjXs5e8AC0Cst82GCQ8v01Zffq3qqsu/8XK1jka8ooVnX9jQjI8dJ+S21RF/nbBRI 5XYv0Zdr9e9koFW3Oec1e+T6vWV8rCXbZh9FExHPuYPId5OHTNg/9LHQxxa8wmjPXRRJ8Q aqWo94FOs+ke8aT85a/tbBTh19x116g4G3ucVbPvmHx8fVSbx2lGhtXRv6r3Hz1KJ7zNjU RHmHyVo5UBlqZ7Kn5r/6LdNSzvO6F2HF5H5Aw2v3ImDgAw5f92rhTWBe31onhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csHpH5bxMzhVV; Wed, 22 Oct 2025 18: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 59MIWdHr043422; Wed, 22 Oct 2025 18: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 59MIWdm0043419; Wed, 22 Oct 2025 18:32:39 GMT (envelope-from git) Date: Wed, 22 Oct 2025 18:32:39 GMT Message-Id: <202510221832.59MIWdm0043419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 6f1622df13ba - releng/15.0 - Revert "release: Switch back to latest packages for now" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 6f1622df13ba4af003ce6633ba1a680abe7e38fd Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6f1622df13ba4af003ce6633ba1a680abe7e38fd commit 6f1622df13ba4af003ce6633ba1a680abe7e38fd Author: Colin Percival AuthorDate: 2025-10-22 18:18:56 +0000 Commit: Colin Percival CommitDate: 2025-10-22 18:32:26 +0000 Revert "release: Switch back to latest packages for now" We now have 15.x quarterly package sets for both amd64 and arm64. This reverts commit dc5aae134a44d18921e179355e9b93a7eff534ed. Approved by: re (cperciva) --- release/pkg_repos/release-dvd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/pkg_repos/release-dvd.conf b/release/pkg_repos/release-dvd.conf index c2e64c43a56f..600c309d5979 100644 --- a/release/pkg_repos/release-dvd.conf +++ b/release/pkg_repos/release-dvd.conf @@ -1,5 +1,5 @@ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From nobody Wed Oct 22 18:32:40 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csHpK1ySWz6D5Mt; Wed, 22 Oct 2025 18:32: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csHpJ6cTjz431B; Wed, 22 Oct 2025 18:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761157960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zagh9nynv1ScdEfQck4DHVdpj1nCGzee7un2RA2pz6I=; b=CVj9qPku/YB7bvMKKvOE8ojD0lxE9GAJFydXkRU7XcYF3kkO0w8b2UaQ0jiTwdUW5t7ub7 CTQUfChcG8dhEhbylBDG3ds3XFbZQ2FXpu5XdVsj6oqfU7amHfsCnhaxOvss6MKt6npjkz 5dYVJUUOgnQrshN1FQg4VsD3o4c3bJqiP38Q+6y4wBRezcfO+4phJDwvmBAnzbDl3jVxov 9GO7QWMj3PRVli4GIiHl+xgxZdKi6P2vS7Jc+7H7dZxjL7HFuaz82Ry84O1K+PJ9rIUoVB VCFYlvJ+jU3K+JZfG746w3xYsuicrutqb3We3PK+1i77pFFEc4hMB/+A0Sluzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761157960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zagh9nynv1ScdEfQck4DHVdpj1nCGzee7un2RA2pz6I=; b=O6wbQZRBV8byElkY2zSkEAXOBv3jzJRpVn8nqbaUlY0W9Qb7N2f/eIH5NVNFJxIipcpkC8 zh8WgwhSQR145m0BZrJYKWaBkHgKlqbx88U8KG/geIWyo/DJv+OAseAfcpWz9fvZpy4Qnl eoOJVhyaRSA7ulDRGD80vbh8kSaqbr5pEm76esivEJbm8H6UsAqVBszfPwqe24TYxNFJeN +1FFLeBeQq5RD+x0Y2dSKqFgGtgfxuJEa4lI8Tu74gkhd0KDik8Zj2vtwg0n1furWkQAHb RmjTTLTz6hhpIpezabj3K+KQZbocqlOhX/vJNqjzt2UvouTWlz9JXuUAJ71YFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761157960; a=rsa-sha256; cv=none; b=G8UFYPpdLJsupBb5z9U0Hg9ZubgS9CFeAV69XT82PdaJP5D1biG3C9Ihtc+WS/jDcvun2t zyfX2Sww87DUn4cOFR3jEyWy4OBNrnuQQyCl+wvtwEngNSpxy3XfxCjdC9xAp/HqqejxnT iAfEQy74Y6bPSIANDuff9YhMBGrqY1ppFYSP2cOnpcv9oVnNtEfmqOHSCP3QlZm71PIBtq rJDiUTNb1v+h8tE4VdOnTw5ubApkp7uAvRNVKpodWxcpcgS+8Es7R7kRKQg5pJd7+svwqF rxBmanK9Ljrb2jzPQdBFgDS4j26i+/KqsG4VIr5Jky09CqC0NhAR+vF3YOGXbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csHpJ66LmzhVX; Wed, 22 Oct 2025 18:32: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 59MIWeT3043471; Wed, 22 Oct 2025 18:32:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MIWe34043468; Wed, 22 Oct 2025 18:32:40 GMT (envelope-from git) Date: Wed, 22 Oct 2025 18:32:40 GMT Message-Id: <202510221832.59MIWe34043468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 74cd979bcbac - releng/15.0 - release: Add pkg .conf to METALOG on dvd List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 74cd979bcbaccd8a606704ccdad5bb040e4e5795 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=74cd979bcbaccd8a606704ccdad5bb040e4e5795 commit 74cd979bcbaccd8a606704ccdad5bb040e4e5795 Author: Colin Percival AuthorDate: 2025-10-19 16:59:08 +0000 Commit: Colin Percival CommitDate: 2025-10-22 18:32:29 +0000 release: Add pkg .conf to METALOG on dvd We're correctly recording all of the packages in the dvd METALOG file, but if we don't record ./packages/repos/FreeBSD_install_cdrom.conf then users won't be able to install them very easily. Approved by: re (cperciva) Reviewed by: markj Reported by: Lars Tunkrans MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53199 (cherry picked from commit 2b5c62494df95cdb844b5f6f852412f2178f66dd) (cherry picked from commit 52ea1ca18a0674e5085d6d0ddbc3c13bf0850429) --- release/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/Makefile b/release/Makefile index 6b5b0c1b975c..c142bc35a45c 100644 --- a/release/Makefile +++ b/release/Makefile @@ -427,6 +427,8 @@ pkg-stage: dvd mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ ${.OBJDIR}/dvd/packages/repos/ + echo "./packages/repos type=dir uname=root gname=wheel mode=0755" >> dvd/METALOG + echo "./packages/repos/FreeBSD_install_cdrom.conf type=file uname=root gname=wheel mode=0644" >> dvd/METALOG .endif touch ${.TARGET} From nobody Wed Oct 22 18:32:41 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csHpK4XNXz6D5Mv; Wed, 22 Oct 2025 18:32: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csHpK26Z8z43PF; Wed, 22 Oct 2025 18:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761157961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aIL4M/rX7m5c/3eN8hx+UCrq1wZeLeAUgDrOykjhmxE=; b=OCyLfrKlvr2nvrew9Ta0SrfMeaDAi6kM4E0yPDyIyXDKo4Dt1c7XNCXBRZrzrDLMQmwEam qyTtwQnqlhRjyOOTMw2MSUgAiLNzRy5P6/eymeLXd8oS13F+eP0hozHyduH14B+Nn5s3Dp JCQvgtAsIFpRzWTrF96JA5YCvqa0ypV/m7/dpMYDS8vqh8XA6bw1QKvNzD/6VpNZEtTM7w 7tN85YC2MXaxr5rvLss/Ggl8kejmyxq/TwQRoOaAhH6KGYhJATDafZRNrREz1VN5McZEMO A9cGt4+uwMhMeH88rezqh5sx5QtkC3v/MMDLwa4AhztIDNruYr2PjpwAvKORdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761157961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aIL4M/rX7m5c/3eN8hx+UCrq1wZeLeAUgDrOykjhmxE=; b=wDfmhqIl/mLlWbrHO6EfIm2uk/RGJJnbb3O1U1h6MG8RIZCr6lzJ+FpQyldS3Q9GR6j/au 08YRxJSz278XwD92odCQQqAGeJryvOCoRo0j6aGwVjtNgxGDRT+PIZCxjcBHYDFsMXs4xd KyYviBNw2JGuMSeFluvX4YA3BmESgC/xUWC7cKpFI17V1J/WBMuryJbNmWD1AR9cNE00Bd XhMWaUPq1d1wvlzcTMbkyqKYfd00RsAnYZU8C9C+xv8NKgTYABCEEnHJCpuMuELeo6FoI7 6o/Q/csaq9wSymHpp3AEp3D3zkyqZAdBz8l+Qd6WAtICPW/kAkwOtxDao6SYAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761157961; a=rsa-sha256; cv=none; b=KaxXUr+jya5zKbamojidYN4MvkmkxnkfRI+vYiI0K/IvfNplx20jGvixuFrh2Drkrxd4P1 Ub5bh+ANbGUkad18K8a975rneyl/PosGR5sKUv4WxVlr0FNNX65QiM2DsCXVs+e6JdntL2 BQct+d3gcUtWWO0h8XOT2LkX1Xl3vJWafJBSeiMza2HSyZzFeh1z6OTM29AeTQMwR1G1x2 iy6xiy+TRw6biRv55WbWxdv4LsOUWfREEwYBVOLtuGX2t4cKt0fwSo8IANAZ8X1kcWLn7z MnYevw1eue++B2hX9GlrDYyYVcp8OoClpXJRIv7p1sFivs/HEV3Y9gPcDzij8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csHpK1WPDzhVY; Wed, 22 Oct 2025 18:32: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 59MIWfEW043553; Wed, 22 Oct 2025 18:32:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MIWfus043550; Wed, 22 Oct 2025 18:32:41 GMT (envelope-from git) Date: Wed, 22 Oct 2025 18:32:41 GMT Message-Id: <202510221832.59MIWfus043550@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 34943c3c2a3b - stable/14 - src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 34943c3c2a3bbc68fabe99367e24d2fe28eb2472 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=34943c3c2a3bbc68fabe99367e24d2fe28eb2472 commit 34943c3c2a3bbc68fabe99367e24d2fe28eb2472 Author: Mark Johnston AuthorDate: 2025-09-07 15:44:53 +0000 Commit: Ed Maste CommitDate: 2025-10-22 18:13:01 +0000 src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list It was added to the list in bsd.opts.mk in commit 4f81c42fbd76, so should have been removed here. Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. (cherry picked from commit b2f5dc591ef2547ee2e9b68e58a263cd34948db1) (cherry picked from commit 7626ba028089b97b5bb204b5203ee8fa24f63c48) PR: 290427 --- share/mk/bsd.opts.mk | 2 +- share/mk/src.opts.mk | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index b56afb89a44d..dfbcab89b7fd 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -65,6 +65,7 @@ __DEFAULT_YES_OPTIONS = \ NLS \ OPENSSH \ RELRO \ + REPRODUCIBLE_BUILD \ SSP \ TESTS \ TOOLCHAIN \ @@ -80,7 +81,6 @@ __DEFAULT_NO_OPTIONS = \ INIT_ALL_ZERO \ INSTALL_AS_USER \ PROFILE \ - REPRODUCIBLE_BUILD \ RETPOLINE \ STALE_STAGED \ UBSAN diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 0bc3d64806c9..0c8eb737fa05 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -166,7 +166,6 @@ __DEFAULT_YES_OPTIONS = \ QUOTAS \ RADIUS_SUPPORT \ RBOOTD \ - REPRODUCIBLE_BUILD \ RESCUE \ ROUTED \ SENDMAIL \ From nobody Wed Oct 22 18:39:28 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csHy90Kplz6D65s; Wed, 22 Oct 2025 18: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csHy86qxQz45DW; Wed, 22 Oct 2025 18:39:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761158369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ND12Gd1VK/ojx6XmUOYgCdVWX4d37sPD2vbhAtCBTMc=; b=Ntg4gJqiLs9jzI4bLOpYYtb/dCGOU45WOTlHmjXHkkmdoeXgHYrpODV+pkHXZfEfUNRrAp nRlNR7aMfRB8oMWBPbVV7FmJ4umjwZRXa5eRHTB7VcC7WzmhjA30l8LuBpE/pkV+vUNfG3 d7+lIAeZAIp4Jd5JKJE0GZooMPPSHuAUeYOlLGS9hzied+pxDl111AfJwf9wP8RWg31m5I CqmNpJBvovZ8vdo4C6R9qPLHVx3U84guGYYF/w1sLmWwac/qKu9bcNZ0rEqOOMN282u+jE yClq/qTqpmq3I9I3/IO4XktDBHPr2/qVDKus+yznQ9uzsjbCwrwBuIjgxWZ1vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761158369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ND12Gd1VK/ojx6XmUOYgCdVWX4d37sPD2vbhAtCBTMc=; b=Ls7u+f3VmynoHt2XF0tjWU8ErXrIWgPbJoRfh4Y2WcuMeug2Uz6JvN/YSeJI0uOfxLxDr6 7ADoanjoXeWsQZesxkYU4GB6tKXRoby4xWxcdXygIlgmua0aJ/ED+s/Z2e6vAGBo87cqdD TV6sHf6e5LM9QL4hvwbaBurDwor2iMZbzNO+0IEvnwFxO++92pu6+H+gDCdHoDpusIpZg3 fyD8hfiJk1XYa58L6uhY3Y8LuPGBQkAweyLPr5MOElMV+O8iueoGvnHPulK2UUKxQqf2LF KgC4NsALO2OW+d0tcb+WKaMk5zP05joLElWQ/bS/Rx1PA6fbvsKWJY7m8lYkKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761158369; a=rsa-sha256; cv=none; b=KTUVFyMj29lUVHgXFM6sgVQID2Y+4njuix/8UJP9JeFLdFcAwR7KkMGRd2SJcmC6lNdX9n bN0VZW/908iP6f15N/8vWA78pAbfCu4hGDYue+y7D6dMVCyOEHRdOk1Erx9fDsVDD3MpSE LDVkUYdyRP2WjlX07QKbgox9InvIOu53GTt6vWU3gOBNaWvDXG7mSM9pfF/LexyKbBK8BB fqRLOPoEWeFKXURtjHYmEJdERn5ci+pUwvAudP3R05WcQPnsu2u70orxhTMLxylu2LCrhM 50BWGjaYNlpRkymatjHVsVhZwtF0Aue7OlHb/gBhg+RVK9FjtkoUzP1sxFQbtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csHy86LwczhVf; Wed, 22 Oct 2025 18:39: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 59MIdSNh046197; Wed, 22 Oct 2025 18: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 59MIdSEU046194; Wed, 22 Oct 2025 18:39:28 GMT (envelope-from git) Date: Wed, 22 Oct 2025 18:39:28 GMT Message-Id: <202510221839.59MIdSEU046194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c10884484342 - stable/14 - src.conf.5: Regen List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c108844843423bffeed0317b722b5c3277d8dccf Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c108844843423bffeed0317b722b5c3277d8dccf commit c108844843423bffeed0317b722b5c3277d8dccf Author: Ed Maste AuthorDate: 2025-10-20 18:10:20 +0000 Commit: Ed Maste CommitDate: 2025-10-22 18:39:05 +0000 src.conf.5: Regen after recent MFCs: 9d0b660e6949 ("jemalloc: Fix activating debug on WITHOUT_MALLOC_PRODUCTION") ac5378d93ce0 ("Add build option for the ia32 loader") Sponsored by: The FreeBSD Foundation --- share/man/man5/src.conf.5 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 24d041d055a4..f7e523ea70bb 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 September 16, 2025 +.Dd October 22, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1046,6 +1046,16 @@ Build GELI bootloader support. .Pp This is a default setting on amd64/amd64, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. +.It Va WITHOUT_LOADER_IA32 +Do not build the 32-bit UEFI loader. +.Pp +This is a default setting on +arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. +.It Va WITH_LOADER_IA32 +Build the 32-bit UEFI loader. +.Pp +This is a default setting on +amd64/amd64. .It Va WITHOUT_LOADER_KBOOT Do not build kboot, a linuxboot environment loader .Pp @@ -1187,15 +1197,15 @@ if executed as an unprivileged user. See .Xr tests 7 for more details. -.It Va WITH_MALLOC_PRODUCTION -Disable assertions and statistics gathering in +.It Va WITHOUT_MALLOC_PRODUCTION +Enable assertions and statistics gathering in .Xr malloc 3 . The run-time options .Dv opt.abort , .Dv opt.abort_conf , and .Dv opt.junk -also default to false. +also default to true. .It Va WITHOUT_MAN Do not build manual pages. When set, these options are also in effect: From nobody Wed Oct 22 19:07:58 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csJb2744Wz6D9Dy; Wed, 22 Oct 2025 19:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csJb26MlFz47lK; Wed, 22 Oct 2025 19:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761160078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vxINWvVY5nJ4xl/tDW1ibfOmd8Ff3ZcFLk6t6xZgUs=; b=wF5fetjH1ucMgpAeF8AXXA3tBk4pm5YP2Ra7kD7VK29C4Qniyh2urnFVd2CXgjlTOy/xWY 7CjwzvZHCiI1CKAkZyYDgcVDyL2G8lmQD9Rm1mhyvUp1GxvdmjEdAqIyDfn0mhvNoiUiKk GDVrdqKZibDTK4zu5yxGeXeDtC8hWGs7a3kp0qMzSpnfICq+ETgPzK9FX4+o0qvdCd3kjV siwFplP7Mv5tu9Nkflp+4lNymqA22rz4Zlu2HFiqas2B0Io/1qjQUXiQQ3o+PBEtn7TfSi FQIuQyNvsNKXwYgz+9Og1WqyBnsFJm2T+g3KDqTm7fWkQ9RH2ZKVx5UiCKRrzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761160078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vxINWvVY5nJ4xl/tDW1ibfOmd8Ff3ZcFLk6t6xZgUs=; b=D7g9yaJrNijr3Y9NtSFdbEqgshpTVL0KxH/n8NudMyk4ISqxqupfhZIPFIOHirUAiQ8+yg LotozHRaq8ucyGPfarR2MVut8PMlKh1bNEMC5aUSecA8gwr5+WstK38FT2RYLVFmrcxu+z UWDi+yfWzxLyKZN/Gl0m4dZUmknFNoiedH+WY6VgtwW2xxZU+CcDji3Sks+TyHvaApCef9 ZZ3yx0cuSv/YZx8iLNHGfVFbjm/m1wKO6tf+03S53eRIfe3wXSkNlT3oLmJrf0JH5efu26 qW7T03z+WMB17wdt49Z5vSo9MDIpBYBy4JuWzBWfvWD6B0nEKMfyuOnfsGxtqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761160078; a=rsa-sha256; cv=none; b=QayS41qBCnnqHrvN0TXdMj/5PnmYqC7cL4Ik1fq3mpnaiVlH0uBWxAIy1JHkHAlgXfWSkk jSJw4w/lA8MSA/wyRACFGMnPJUY+TveSltgpoljITzSdZNvU3P1aaLmDUm/faBKUGwIqPi //SlsGd1PlLucEPFTYUCdlkAboQtzZJlzaKinoWyVnAgwx9rmaJgd7HeJkJCBHXJZvZuPt Jlmd1tWdf91N5dN0glQzzuI5xX9WPGgzXKrf9niVBb/+Dh6midduB0kGJZDeqDJC/NqL7i SZ0Pgv5JmgKtomr0CdtybosEiWdAr9YZrZr9rdTfmk0VtQo79zib8sZ4E2edqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csJb25hkTzgxR; Wed, 22 Oct 2025 19:07: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 59MJ7wOJ001984; Wed, 22 Oct 2025 19:07:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MJ7w6N001981; Wed, 22 Oct 2025 19:07:58 GMT (envelope-from git) Date: Wed, 22 Oct 2025 19:07:58 GMT Message-Id: <202510221907.59MJ7w6N001981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 536b07512c4b - stable/15 - pf: fix 'no rdr' List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 536b07512c4b931b9d0d3d609c3ac925f55e3ec9 Auto-Submitted: auto-generated The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=536b07512c4b931b9d0d3d609c3ac925f55e3ec9 commit 536b07512c4b931b9d0d3d609c3ac925f55e3ec9 Author: Kristof Provost AuthorDate: 2025-10-18 15:47:47 +0000 Commit: Kristof Provost CommitDate: 2025-10-22 19:02:14 +0000 pf: fix 'no rdr' Ensure we always have a non-NULL rule pointer (ctx.rm). It might have gotten set to NULL by pf_get_translation(). While here also restore the previous rdr behaviour be re-adding the incorrectly removed 'break' in pf_match_translation_rule. PR: 290177 MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D53191 (cherry picked from commit cb36bfee25b71d1223b8fb1237fcf823d514b50e) --- sys/netpfil/pf/pf.c | 1 + sys/netpfil/pf/pf_lb.c | 1 + tests/sys/netpfil/pf/rdr.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8d3d72148815..af0629397ea0 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5939,6 +5939,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, ctx.nat_pool = &(ctx.nr->rdr); } + *ctx.rm = &V_pf_default_rule; if (ctx.nr && ctx.nr->natpass) { r = ctx.nr; ruleset = *ctx.rsm; diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index b8b5157c9b15..29d7a32e0bdc 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -216,6 +216,7 @@ pf_match_translation_rule(int rs_num, struct pf_test_ctx *ctx, struct pf_krulese */ ctx->arsm = ctx->aruleset; } + break; } else { ctx->a = r; /* remember anchor */ ctx->aruleset = ruleset; /* and its ruleset */ diff --git a/tests/sys/netpfil/pf/rdr.sh b/tests/sys/netpfil/pf/rdr.sh index 24b95b2047f4..b0f0e6d13d0f 100644 --- a/tests/sys/netpfil/pf/rdr.sh +++ b/tests/sys/netpfil/pf/rdr.sh @@ -338,6 +338,56 @@ natpass_cleanup() pft_cleanup } +atf_test_case "pr290177" "cleanup" +pr290177_head() +{ + atf_set descr 'Test PR290177' + atf_set require.user root +} + +pr290177_body() +{ + pft_init + + epair=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.2/24 up + ifconfig ${epair}a inet alias 192.0.2.3/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.1/24 up + jexec alcatraz ifconfig lo0 127.0.0.1/8 up + + # Sanity check + atf_check -s exit:0 -o ignore \ + ping -c 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "table { 192.0.2.2 }" \ + "no rdr inet proto tcp from to any port 25" \ + "rdr pass inet proto tcp from any to any port 25 -> 127.0.0.1 port 2500" + + echo foo | jexec alcatraz nc -N -l 2500 & + sleep 1 + + reply=$(nc -w 3 -s 192.0.2.2 192.0.2.1 25) + if [ "${reply}" == "foo" ] + then + atf_fail "no rdr rule failed" + fi + reply=$(nc -w 3 -s 192.0.2.3 192.0.2.1 25) + if [ "${reply}" != "foo" ] + then + atf_fail "rdr rule failed" + fi +} + +pr290177_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "natpass" @@ -345,4 +395,5 @@ atf_init_test_cases() atf_add_test_case "tcp_v6_pass" atf_add_test_case "srcport_compat" atf_add_test_case "srcport_pass" + atf_add_test_case "pr290177" } From nobody Wed Oct 22 20:15:22 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csL4p6Klmz6DJ5m; Wed, 22 Oct 2025 20:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csL4p5mzdz4J0Q; Wed, 22 Oct 2025 20:15:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NnLV/DxwQ6WT0zhxaAiNwajp95dY7SqGQe8L6Ho7zPM=; b=Xi87owYPS+Ejv6IwHvQgjZ8uOTFQIfYNp8X1WLjb9otG1LbTo0RRu1ZmeA/lUWVUNjWSks h9sqheM2G4GjgdMgarXbfBY3UA2rdYqkZnSL+j7EJYE8IBfdvlk5OjWMUA1H7ImeEpVjX8 L3jrBuVa1HT+uwJGDdths66ZPbByvIZjC87gS7xgjBo1iZwb2diV8aRBgvBs7uAbsd6PSV 8eZ8ZUSzVQx4ggK8OmWNTfbnCy81+UCD4GHburPwAo2fyNiBMbrPWOJWk0kPZBWi2Tt0JO qPYUbjD0hHsYJW4MIV/8ajEStMV55xvkg3aW0FNiCpIiCD9Q+jse+3I8nkJkVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NnLV/DxwQ6WT0zhxaAiNwajp95dY7SqGQe8L6Ho7zPM=; b=rDphOy2XFT9RHyQGRXcwDFb6EWnXKd3ubIg23jLQXiN0KnBivPR0tircwU/MvP4jtPYwpM ax1HI8fEVkNJsfGWjYuEPufaaoM0pfzojfrtFNAccAgLwEKYb/vAutCyGOQbSfCMZsvy84 sFYpHT2AvPkH25gf3nV/XQagrUGbXfKOVC1hOnvgJ+ohKFvIeTR90SiP8CejsVgeMVyBPq EaZu2oocAR2r3XwD2/552w9d6hfTh3i4Pa2E/5d3QssF4HhBWFsKOZNzcz88fVgIYophFx yxLnQhA0Kt4IUN1OHyFFOa6zq0RvfkbFRHJudExFUyWCeLM03JSw4I8NQd0Eug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761164122; a=rsa-sha256; cv=none; b=m9bgPAWCrh0FzQ8oY7Flw7ejVn2UqId0aswQlG/o+SFN11YbTXGp5he42F2XNVlqzNmSG+ P1+KORJVsrcJYVc2upjVtGr7ndIyUwLK7pyxZJgFMDSTWAGZWoNv6e23UTOPhSlm9fw3Ik HmTZtV1hkQaaA6LOV8mGNXglJS0Bo5aplNLqfshQFNtT5kiwviA9NbEwGNqZLo5RYcpgor Yy1XlWtkkN1r0lEcMppjvODBsRkLPOxyNawIR18O6muUGP+o1dFvGNgoEMKFHG0XRD4x8F YSBGyEFVkiMJ2foB86cFIJS9/KxB08O65DYp36XNTm4MuAyrBJHW/g5AqNYc/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csL4p5NLdzkqW; Wed, 22 Oct 2025 20:15: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 59MKFMj4032982; Wed, 22 Oct 2025 20:15:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MKFMxh032979; Wed, 22 Oct 2025 20:15:22 GMT (envelope-from git) Date: Wed, 22 Oct 2025 20:15:22 GMT Message-Id: <202510222015.59MKFMxh032979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 90cbdfa9dda1 - releng/15.0 - bsdinstall: Use pkgbase release URL for BETA/RC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 90cbdfa9dda1d66d12220dac392a7e49e304abd2 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=90cbdfa9dda1d66d12220dac392a7e49e304abd2 commit 90cbdfa9dda1d66d12220dac392a7e49e304abd2 Author: Ed Maste AuthorDate: 2025-10-20 12:38:03 +0000 Commit: Colin Percival CommitDate: 2025-10-22 20:12:15 +0000 bsdinstall: Use pkgbase release URL for BETA/RC Approved by: re (cperciva) PR: 290238 Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53214 (cherry picked from commit 604b6458f3f327206a56da7ba80c2df7965a0761) --- usr.sbin/bsdinstall/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index e5bb3197fa05..5d7be97ed7cf 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -22,7 +22,8 @@ REVISION?= ${_REVISION} .if ${BRANCH} == CURRENT || ${BRANCH} == STABLE SUBURL= base_latest -.elif ${BRANCH} == RELEASE +.elif ${BRANCH} == RELEASE || ${BRANCH:C/[0-9]+$//} == BETA || \ + ${BRANCH:C/[0-9]+$//} == RC SUBURL= base_release_${REVISION:C/[0-9]+\.//} .else .warning Invalid branch "${BRANCH}" From nobody Wed Oct 22 20:15:23 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csL4r0ktVz6DHqB; Wed, 22 Oct 2025 20:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csL4q73KKz4JGd; Wed, 22 Oct 2025 20:15:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jQUTV0LrKU4MYq3gBp4GEN/oJWfaLUIVG9TLqbQAWuQ=; b=DRk/8ZQ4fZV2PPLljLhbNoMmPi4IrsbxowgU6dq1QKKtwzCXUXZrA7/l2LUziy7Ha2IS8h kTV2kBjFIcywCoRwsvSdHu+tJzWHr0zMkI7CBrmmGQNMzfFlbk4HHbRW1KfpPBUOelOCHe L8TW4R4RZtlMXEJ/2stgoy+jVtDtGr4AYuIrzxxwXe3qs9N9MxQ/W1y0G9eTv+es1fNXLP gGX45iHM92MscjRZENtPa+qopwjXLO3QqEfwJU+Qfr+CsrcmZjYrcXZ91gpEb5HvGPD8xp sl0dX6/sAUSwtMmxJlt8wXoczHe8dPqJU2ehSsEMLCVZB8et9d1LY2iOrj2IWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jQUTV0LrKU4MYq3gBp4GEN/oJWfaLUIVG9TLqbQAWuQ=; b=Fs7aIyLZ824PNQ4l9oGSfWUV/L39peqnbjqnu0b2MHNG3Kx1F/gapxItxUW51Ly00jKGVV yI/KePkAI+By/1RoWmbTwVZtt919SzdxefsNBvXcR9HtpBKL37eJSIhRylBlwt0XpuBSud a3qFmVx8uLxwH8H3bHiR6Ofqi6Bbr/CxRlGrwWbkLlELUxcMcVKOYU+G3Cb+FDAWPfF/F1 O+4pMTxnFfjUWhpCDGrsmmZqa7Z7maFuX6oT+WmwEDcPk2NWalIQvMPSZhm0zEb7dG3Q/q 5PqPIpVK9o3ynMyy4HtbbFUlBx3+MuYUi+5kc2Y3tzbG6mz3gZlUyJmCYVEZyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761164124; a=rsa-sha256; cv=none; b=fJoA5EXw3qyL++ew/jKRB9/55PNU5yNJ23hMNp5/WtLy1aCVPb+ce4KQGKO3e/UGnpSobD E16FWJLsvJhgwGtznbRBFZppkceAW+37RBFzKFHgSE6YQLjqptTvYyZlSLiozILuFktilU 1kTQ998KILEEKpOeKVXQYtlHB6WsUtBjHAkXHV3G9b+ubvjWNRvVf2lzv6jQEQPNiMvBlS c4bPppzTPOYSCdiXuoqCcBm7gla3ctuRwv70t7SNqkXpesCdQrcw2S4CimJzcV2+Y+a60t BMrpsADK2oWITFEWoXaFevdkcdslqxbEmTPRQQPNpt5gEkkyhd7WTtrOvHswDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csL4q6ZH1zl48; Wed, 22 Oct 2025 20:15: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 59MKFNX6033015; Wed, 22 Oct 2025 20:15:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MKFNgK033012; Wed, 22 Oct 2025 20:15:23 GMT (envelope-from git) Date: Wed, 22 Oct 2025 20:15:23 GMT Message-Id: <202510222015.59MKFNgK033012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 945500c6ddc5 - releng/15.0 - exec: Check for errors when mapping the shared object List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 945500c6ddc5f670c76e9fe390d8919c897fa8de Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=945500c6ddc5f670c76e9fe390d8919c897fa8de commit 945500c6ddc5f670c76e9fe390d8919c897fa8de Author: Mark Johnston AuthorDate: 2025-10-14 13:33:33 +0000 Commit: Colin Percival CommitDate: 2025-10-22 20:12:18 +0000 exec: Check for errors when mapping the shared object In the non-ASLR case, there is no check for an error from vm_map_fixed(). Restore it, it was dropped in commit 939f0b6323e0a. This bug could result in a refcount leak of the object used to map the VDSO page. Approved by: re (cperciva) Reviewed by: kib Reported by: Ilja Van Sprundel MFC after: 1 week Fixes: 939f0b6323e0 ("Implement shared page address randomization") Differential Revision: https://reviews.freebsd.org/D53065 (cherry picked from commit 7117c86fcb7ebee4483097cefa9b143de8d78ee0) (cherry picked from commit 6a5f0dc705c4401454d4fcd61e7301b992bfea13) --- sys/kern/kern_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 0fc2d0e7f1bc..b2c09b47f103 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1314,7 +1314,7 @@ exec_map_stack(struct image_params *imgp) MAP_INHERIT_SHARE | MAP_ACC_NO_CHARGE); } else { sharedpage_addr = sv->sv_shared_page_base; - vm_map_fixed(map, obj, 0, + error = vm_map_fixed(map, obj, 0, sharedpage_addr, sv->sv_shared_page_len, VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_READ | VM_PROT_EXECUTE, From nobody Wed Oct 22 20:15:24 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csL4s2dNPz6DJ1F; Wed, 22 Oct 2025 20:15:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csL4s08Tkz4JM5; Wed, 22 Oct 2025 20:15:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MHO9g3jL64D+Q38LMVnj+CD+9EEonm6f/dvEocG4ZDg=; b=vGJkT36/+8TcUPJ18NMAyTXllMQ87pmiKNujp9Zp4mSasUlXWF83Rsvsp6KM6WkpUqH4RY VRbnkfCGseCXG6lMU2maFzhg4rd76DZTZQRyuB1mqQniPP7mEFohc66efxrVq69SwlXcZa BULKl9UcFktj18r0FQtw9A4wyKgjSiHGK8A6OeNwWFTrJOkIoa0eIDL9A4aBvrXAXF67Ld vX6vL+DYzGLlFq18xh1yHy/Bf3on+BoQIwvDiO3188ivuFFBZ07Ce1ZvQfQ1CtN6kpG2gY 4+wO4Pk7ydScNNRJaz/iC9bjRfKQzrKNHJ8KttE3NOcOhxqLzIbUd+63YcJjfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MHO9g3jL64D+Q38LMVnj+CD+9EEonm6f/dvEocG4ZDg=; b=X13cJeBr7pTQtKc+3Cbs3kFgF4bhyMB82S7KaPwBz9ALxsNcLR0SQQa/GyuwStgvoOH2+N rJFpGaTwuqxFsC1scjmTENKj/bmQGNu4DIjEkTovytOji4oc4JL3ax7p4nvNYIujTorvbV ygMzcG++6A5NcH2vIrVWmWyq5SkfKOdBBtx0nOG4Zh5Uzsx8oo3qJLisHF3h0gGmNb+eTM H2vjzVAiUAlORJsSzYV4AMtu9mB9CCiP8LrO50z8oUohJeFUwputVndi0pF6nXpOLhhg2s MCr6jSrLHeaL0BHpg5JnV2Z3tSRkuUGd83J5Rmdk13fNsoNb/UMJq6Hkt9sKAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761164125; a=rsa-sha256; cv=none; b=nV0m//keFtCfBSYN6fovkAw/bysxxSCTcOBlm3viOKycdlspj7MCyOoCYAp+UYipQQ9zs0 AHY08Ya3pos6ay8EcxxSyzxUcmFEpg6bwQOvNVEiR+BdmXKaepl9+l9Hywa7MTtJlLo9wB 8zqHMrFJW+4D0QKg761VUFIbOQt5D/hZyO2u8TAOSedSPlyPK8G+yiAPHljC1jbhxPStp8 ZnUmdeakJwK7+mq2kBM7khQvG+8QhMOpFi4595tQTTNcv5u2hrZbuEBSo7+BjJoORh5FAH ZAFAPghX0M3Ex/Op7InVsQDuqFoVbvKG9Roaa0+tLgdgjm0BFVDT8yf/mgHptA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csL4r6qx5zl28; Wed, 22 Oct 2025 20:15: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 59MKFO36033048; Wed, 22 Oct 2025 20:15:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MKFONJ033045; Wed, 22 Oct 2025 20:15:24 GMT (envelope-from git) Date: Wed, 22 Oct 2025 20:15:24 GMT Message-Id: <202510222015.59MKFONJ033045@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: eaafcf841ce8 - releng/15.0 - ipfw: Check for errors from sooptcopyin() and sooptcopyout() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: eaafcf841ce87f68756fabfa86e0abdaf0863e0a Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=eaafcf841ce87f68756fabfa86e0abdaf0863e0a commit eaafcf841ce87f68756fabfa86e0abdaf0863e0a Author: Mark Johnston AuthorDate: 2025-10-14 13:33:13 +0000 Commit: Colin Percival CommitDate: 2025-10-22 20:12:21 +0000 ipfw: Check for errors from sooptcopyin() and sooptcopyout() Note, it looks like this code may be unused since commit 4a77657cbc01 ("ipfw: migrate ipfw to 32-bit size rule numbers"). In particular, it looks like the ipfw_nat_*_ptr pointers are unused now. Approved by: re (cperciva) Reviewed by: ae MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53068 (cherry picked from commit 2df39ce5d4a8836ef5fd3c2666f48041042eff42) (cherry picked from commit 302c4c540e449e3fec02e27742f7572039347f66) --- sys/netpfil/ipfw/ip_fw_nat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 1e2ff1bca290..19393d5b8444 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -999,9 +999,11 @@ ipfw_nat_del(struct sockopt *sopt) { struct cfg_nat *ptr; struct ip_fw_chain *chain = &V_layer3_chain; - int i; + int error, i; - sooptcopyin(sopt, &i, sizeof i, sizeof i); + error = sooptcopyin(sopt, &i, sizeof i, sizeof i); + if (error != 0) + return (error); /* XXX validate i */ IPFW_UH_WLOCK(chain); ptr = lookup_nat(&chain->nat, i); @@ -1104,7 +1106,7 @@ ipfw_nat_get_log(struct sockopt *sopt) { uint8_t *data; struct cfg_nat *ptr; - int i, size; + int error, i, size; struct ip_fw_chain *chain; IPFW_RLOCK_TRACKER; @@ -1134,9 +1136,9 @@ ipfw_nat_get_log(struct sockopt *sopt) i += LIBALIAS_BUF_SIZE; } IPFW_RUNLOCK(chain); - sooptcopyout(sopt, data, size); + error = sooptcopyout(sopt, data, size); free(data, M_IPFW); - return(0); + return (error); } static int From nobody Wed Oct 22 20:15:26 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csL4t3pk0z6DJ1J; Wed, 22 Oct 2025 20:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csL4t1bYXz4JBY; Wed, 22 Oct 2025 20:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eg/2lPMcOk8W/K4vj5QO+A1Ilfo0/FLwtA7+Lm9bTE4=; b=HpFLk+UyRh1x9anZoYWs0f54WuwVygi0P9d37WeFQK3trKHajXjWdLHA6LG3rnmrk7DgBr fyLvv7+m9C3IwDFZ/P1i8WMHJBWQyVlmyagk1aBHSalM1+riR3sSxlI5dw1LUH/dHy/xnN BJlajLkzocC8UwivS+i7ajhcCHo5TgV4f6OWFFRECFNq5rnd24dp68rEpI0MEiy9soW0Cf NQgojSgmXsK+9cqnixHCZvABfqiO1YS55baAt3j9C19/vWv6WIl15e2CARgdlrUwHuCN2o yWW/dqlLW6USQaa5LfuoKvoFG8WJ0iSdDEe+Yo6ElG/wKdx5aDZxBNFJhtaggQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eg/2lPMcOk8W/K4vj5QO+A1Ilfo0/FLwtA7+Lm9bTE4=; b=b4Awhmh9vQgkLKzxihMFg2aqwMVjqRAzK2T8uz9qDWPgjV1ZBEKxw1dwy+ajPEoeYApcum 9q8+xmPAPp9GvpYd3VzCus9iKtubwLCuT/pwEKacBE2Sj4ZRYP061Rpvzp/W+m2qOzGGqP O2VtNgpnYq4IjHEUPv4dh6I0FmoR+TnVr4n1CMDcWCrtftsxeHGN1hJXCrOgckZO3nPQdx Eg9ZVwgRhL4EQ0BjqiGvFqIh+hpiaWJ9hZEW8OIH12Ft3dNnyXx+5LnlHUPqqwTWa88+bo B1egkIZ2VasRKZ1PXIaXkpIeYkKJPSHdIPEpVmfDIbOCLLQtVBgbi7NawV1Y9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761164126; a=rsa-sha256; cv=none; b=nBpn0KgqICC32NGFiZqdkHCZOv/BMmvEq8d8Gqh27E5ABEfX7s9ET+NTI94xXuMP/HjkYe 7AXMAcVDefHh0Agnc/yFc48SxupKD30PeJijF/j3LmFAvDafkgF0LfQA+MoBdcq68vOk5w iDgveu4FxKj0JU0vMg5todmuTseAToNFzi+lWtpLxQDGDmin1GzX+gs6zE8wi06n/SPVdC SlUos/FPrdpnOVq27+NcMRN5hlF5zR/4uuWcd+nx72WmC2CVDfa03RjXjk6S9ki9WtBiw/ e3yYDbN3Oa5XI4uz2lEvCkSDk4eopGelBLdhnUq872rGqdzkdD19x3sBPFHIQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csL4t0zl7zl49; Wed, 22 Oct 2025 20:15: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 59MKFQQt033081; Wed, 22 Oct 2025 20:15:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MKFQ0k033078; Wed, 22 Oct 2025 20:15:26 GMT (envelope-from git) Date: Wed, 22 Oct 2025 20:15:26 GMT Message-Id: <202510222015.59MKFQ0k033078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 95f60a34dd1a - releng/15.0 - libnv: Fix a length check in nvpair_unpack_string_array() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 95f60a34dd1a0518368154150b18d1063d4c5cce Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=95f60a34dd1a0518368154150b18d1063d4c5cce commit 95f60a34dd1a0518368154150b18d1063d4c5cce Author: Mark Johnston AuthorDate: 2025-10-15 20:15:08 +0000 Commit: Colin Percival CommitDate: 2025-10-22 20:12:23 +0000 libnv: Fix a length check in nvpair_unpack_string_array() A string array is represented by a set of nul-terminated strings concatenated together. For each string, we check to see if there's a nul terminator at the end, taking care to avoid going past the end of the buffer. However, the code fails to handle the possibility that size == 0 at the end of an iteration, leading to underflow. Fix the length check. Approved by: re (cperciva) Reported by: Ilja van Sprundel Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53069 (cherry picked from commit 937693fc9e4ff4045cc674a14902f0d53e84ec98) (cherry picked from commit c47f9af4771bc7de2ebed4c91628c1f9a7f86a2c) --- sys/contrib/libnv/bsd_nvpair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/libnv/bsd_nvpair.c b/sys/contrib/libnv/bsd_nvpair.c index c73bc2189121..b884dd260b84 100644 --- a/sys/contrib/libnv/bsd_nvpair.c +++ b/sys/contrib/libnv/bsd_nvpair.c @@ -985,13 +985,13 @@ nvpair_unpack_string_array(bool isbe __unused, nvpair_t *nvp, size = nvp->nvp_datasize; tmp = (const char *)ptr; for (ii = 0; ii < nvp->nvp_nitems; ii++) { - len = strnlen(tmp, size - 1) + 1; - size -= len; - if (tmp[len - 1] != '\0') { + if (size <= 0) { ERRNO_SET(EINVAL); return (NULL); } - if (size < 0) { + len = strnlen(tmp, size - 1) + 1; + size -= len; + if (tmp[len - 1] != '\0') { ERRNO_SET(EINVAL); return (NULL); } From nobody Wed Oct 22 20:15:27 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csL4v3ldpz6DJ1K; Wed, 22 Oct 2025 20:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csL4v2KGMz4JHR; Wed, 22 Oct 2025 20:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bVUcjx2+yEcXijAg2/u6yBdpqdcaUBowXC9R7kyXvfY=; b=g6r5invuxNhV5IH8YIF7Y+PYYoNvdZyR0Ql2ZDxJtDwzWanT3s0Er5uvtL81mhauz01Yv1 rFnMZYlYiYz/ExC6DONbrVdfBwBEAr81VDE/BTrEWPi1XYjysKtXcMGUYmQK8PoxrLeP/H lGLPtGvaeMiD82LFc8roG4WyXSb47uUeWuBh0dXZo2LJYXdVVWUepGDGOCJk9GEUQ+l9Uf aZbnuv5Aozg2iPG/UQz55Kvkf4mRXyO/2U3D/RcqUO5HYO0NNkhD1v1Yo5t2i3Q9HjOhTe 9aQzp2PjIpG6crT3QLvkcWV2xNqo6rculVQ6PBuu5peeCSrwIHBDhLb35Ol4jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bVUcjx2+yEcXijAg2/u6yBdpqdcaUBowXC9R7kyXvfY=; b=KWcWrkbg01P91TXqx/bl/07XDYCXyvan5N46CNUWYH2WR2g3OW2WI1rmK86XvCbt+nVoeD Ch53GDo/Y1cXHzcRj2N4Ob3yrB6NFxvbJHwJyV2345H7skeR0Kn1tJCDSNDqJZcCIP7mpp p+pYX9L+7EntuByzP5GLUCWi8z6QULkb4f5VuBU3c3NhhFNgg6OHc6lq9Ppoq3089Fz8xB /CTir/qeSqSlj3R8vCX56xk5iXDx2TrXoyuA4Vd/6LeitfdEopdibAQ66jf2nAlRFyp07S GEXYzU3v6HoIOWx+1KMsqHhUyBAuYMcsPJuYb4m8MgiYE6E+TG6gNBfdDAVtYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761164127; a=rsa-sha256; cv=none; b=wnIQGriag+1PRR6a1885dUhb5ZCitLRtxVcO/tphRA6ht9DjiWXPaV1x8JcGlIRC3wCphI hcpABd4V1NMhhjcv0ACS3faDqScfaAYf0YPQd60ZDIHaS1qfuV6+sgbcvJ6GgTEbQjjUmW XWrP2gvNnqE+BykKKy7OVpXCc19V3fT3IfsQ2rjj5WBvo5h9cvYxM2q9eGPSkIXK+l1+u2 WiLT/kfk68x7ZkaT+xSgS9Eala2Gm6qazAHkfJE111ekAIHB6w/wIHHYdb0zpQuYxPu16B 6JttO9PHjjVJuKTwg78i1sOiFBoQM0jod9dKA8+IYt+MVwVimVCaue5yRtWZFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csL4v1tN2zkqX; Wed, 22 Oct 2025 20:15: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 59MKFRap033120; Wed, 22 Oct 2025 20:15:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MKFR5U033117; Wed, 22 Oct 2025 20:15:27 GMT (envelope-from git) Date: Wed, 22 Oct 2025 20:15:27 GMT Message-Id: <202510222015.59MKFR5U033117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: b1faa50c18e8 - releng/15.0 - imgact_elf: Check note body sizes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: b1faa50c18e8f65a43c7fb4c4170a9ff47706805 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b1faa50c18e8f65a43c7fb4c4170a9ff47706805 commit b1faa50c18e8f65a43c7fb4c4170a9ff47706805 Author: Mark Johnston AuthorDate: 2025-10-15 20:14:36 +0000 Commit: Colin Percival CommitDate: 2025-10-22 20:12:27 +0000 imgact_elf: Check note body sizes In parse_notes we validate that the note name fits within the note buffer, but we do not do the same for the note data, so there is some potential for an OOB read in the note handler. Add a bounds check. Approved by: re (cperciva) Reported by: Ilja Van Sprundel Reviewed by: kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53063 (cherry picked from commit c86af2cc4cd12fb0174843b22d737c3b5b5d55d0) (cherry picked from commit 09ae918e1f00572f9045283c281cf2d210ece491) --- sys/kern/imgact_elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 1bc2491a1a12..bc4fcad6c61b 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2831,7 +2831,7 @@ __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, } if ((const char *)note_end - (const char *)note < sizeof(Elf_Note)) { - uprintf("ELF note to short\n"); + uprintf("ELF note too short\n"); goto retf; } if (note->n_namesz != checknote->n_namesz || @@ -2839,9 +2839,9 @@ __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, note->n_type != checknote->n_type) goto nextnote; note_name = (const char *)(note + 1); - if (note_name + checknote->n_namesz >= - (const char *)note_end || strncmp(note_vendor, - note_name, checknote->n_namesz) != 0) + if (note_name + roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + + note->n_descsz >= (const char *)note_end || + strncmp(note_vendor, note_name, checknote->n_namesz) != 0) goto nextnote; if (cb(note, cb_arg, &res)) From nobody Wed Oct 22 20:15:28 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csL4w4S6vz6DHqH; Wed, 22 Oct 2025 20:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csL4w3GZ1z4JVY; Wed, 22 Oct 2025 20:15:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/l7Mbnqv/EiOtyUZQxhTEHilWVi+KzXStrvgxLb7To4=; b=HeM7bI9/bKWIEYdz5wPzzdf3uDDws8rUaIrtsf0JZ/tuVo48+7c0RCaBbfMpE9CW6jr4dn 9JrHT4RylRxw4GI02pHaV3aRNT21STa7Zkb27WX+uPcWqanrbgKRHbX37iv6sprHp3V3TR h4q1nJgoSBok/AHOHJRs3OhkDayVNFWs/qW302gXNsc6vR5wpz1AE1kLK6GF/zPsxd78IO r07jfopsoiy+fS85mM1xiB0PHtHf5xEf34kkDiAiW7NmQaZkYyHW0CmM3hd8mStE+DjjX1 2eFwIhb8WPivUqLTr/VgDcYCi6ZauQQBnX21gmNcF4QL489RHXxAGalP7OPQ0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/l7Mbnqv/EiOtyUZQxhTEHilWVi+KzXStrvgxLb7To4=; b=vtiXGWMjy/W2AS0Q0c3hkpbOSVqv3K1IMtlivxiMKslztfPpN9WBKbnALCQSW42hCm5ZrW g+xkqPLsFQENqGhVr3q4FY6hZGfHQvj+5q6RYXS+0xKy47RYZpggVX3YrrZUdPGg14RqY5 8RfE/Il4nPc7zhStC82Abj2Ul4c/nK5IvYRJnTLp1vdP2bBTFy+IKkGiB4bFyrxOPbOxxL 7GzsqiFWx+04mN1JZTmy6keOMhcVE+WOeOTBRQHpRad3V6GI7FIsvWIvaubdSPVR2WK8IB StX01bL88Ryy1X5uwMtuqWjWzoRjpk5Wuc8nLhtHaEHRgpAbCAf2KM/YFh9u4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761164128; a=rsa-sha256; cv=none; b=xrobZyfnrs1NLjW5Vtkmh7BkAKx+4K+5MdBQ+pG9NaZ66MXK0rueZBZNzuf33t3oj09PJN 4OJQuCJTj2ZrAX7ouJ/JMZ2B001fDIY2RcMXhmQWA/oTlOz56Nd7YqTHBOWWdgwDKe+Up6 8gPOTBaCU5Y5UNTbxTOX6X1v39nux8kcjNrKGdblBSxa8oVBMxEA6lyJz9Z00jP50CcKGf y7NZ/C6wsybYtil4vFZFuGfuUnf5UQZEKTMqvGIvmr+p0YdpnTVHU0MNyNcfZFT7ed0G1Y ky0FNR6Uxh3OxP1Dp+l6DFW8bjD8mNjrUZmanbWmHerx05ae3ddg3sstay28uQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csL4w2nmwzlCJ; Wed, 22 Oct 2025 20:15: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 59MKFSI2033157; Wed, 22 Oct 2025 20:15:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MKFSJd033154; Wed, 22 Oct 2025 20:15:28 GMT (envelope-from git) Date: Wed, 22 Oct 2025 20:15:28 GMT Message-Id: <202510222015.59MKFSJd033154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 0948c4d4a330 - releng/15.0 - libc: Add "Z" as TZ designator for strptime. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 0948c4d4a3308737879342d87efc311913ee4335 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0948c4d4a3308737879342d87efc311913ee4335 commit 0948c4d4a3308737879342d87efc311913ee4335 Author: Gordon Tetlow AuthorDate: 2025-10-15 22:24:06 +0000 Commit: Colin Percival CommitDate: 2025-10-22 20:12:30 +0000 libc: Add "Z" as TZ designator for strptime. ISO 8601 allows use of "Z" as the time zone designator. Update the strptime parser to allow this usage. While we are at it, update the manpage to reflect that both UTC and Z are now valid options. Approved by: re (cperciva) Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53083 (cherry picked from commit 79e57ea662d92ffcbe7d65854a284aefac6a332d) (cherry picked from commit 3d368c699b73cc1dff3ca27d29d19666741d9ff8) --- lib/libc/stdtime/strptime.3 | 2 +- lib/libc/stdtime/strptime.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3 index 7df73d2d080a..9456fa757b85 100644 --- a/lib/libc/stdtime/strptime.3 +++ b/lib/libc/stdtime/strptime.3 @@ -171,7 +171,7 @@ is taken as noon. The .Fa %Z format specifier only accepts time zone abbreviations of the local time zone, -or the value "GMT". +and the values "GMT", "UTC", or "Z". This limitation is because of ambiguity due to of the over loading of time zone abbreviations. One such example is diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index 5f1293c7a267..375e49146639 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -546,7 +546,8 @@ label: zonestr[cp - buf] = '\0'; tzset(); if (0 == strcmp(zonestr, "GMT") || - 0 == strcmp(zonestr, "UTC")) { + 0 == strcmp(zonestr, "UTC") || + 0 == strcmp(zonestr, "Z")) { *GMTp = 1; } else if (0 == strcmp(zonestr, tzname[0])) { tm->tm_isdst = 0; From nobody Wed Oct 22 20:15:29 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csL4y0vHzz6DHqL; Wed, 22 Oct 2025 20:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csL4x4J2Tz4JXy; Wed, 22 Oct 2025 20:15:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tD2UoBsWPLPNKcsFSQrCsr4pDe2/GnGUr660nHKj6l8=; b=LocCRgzA2Bp42ExNdU7r43wQm9yGUwL9HNwMUUkKabyxAyZxSjkemF2R6/QreWkM+jaD1y wkobH7GI1GiIzquwSbPuGdgwvQqYEhRjSoOhND2pDasM1gTOlUvflgCTXKwozTIsbLlvan lGCutDmjWz3mie37GyM9z74d1D/2fQwUwXZNMEwSiPvp/nnAQ9+Sncp7AIOgL3VQP1J2Tn SClXWXuPSNepNvCFbwO2gXh6QGPjIGieTXSaksdude3u9DNoCeC+HQXCnWDMgLA4P6owFx Gt3T5r8SbbGYu8wYsj0YOeG9Bafkue31G31NrbQ0efuPc6U1y7EQEnYVKM2Rbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761164129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tD2UoBsWPLPNKcsFSQrCsr4pDe2/GnGUr660nHKj6l8=; b=tIgNHbj81HwpBabMhE3i/iqm+CP+/Q8FEj1BuKgOxXoVh9pggBrTv9AF7em64t5GWbd6vJ nOobH5n3tZv8tez0COrPBFkTwMBboDPQNLvNbeo/rGWjsJbY1vN9VoFb17jpxs4GqV0qQL e0dSr9ZVGJOAt9fvCWPRTC63BY5ph0Ahpa0/taZdlLOSGLEDHKt1Nuh/dhUoKTaXfD/D9e pxOH53zFJF4IMflrBmmSD+5Z4sF1+itRJSe23QSbj8GC+TMNdTA1PnyJSoohlcSXSNJnDb prbq1wh47cCXLwBFUCJC6CZ1a1LU7S42uLR60Na975gDOTH00NTHpgYI5efRMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761164129; a=rsa-sha256; cv=none; b=Lu8ZRz9YV2l1o4AvEf2vaEmahK2+zsI5VCs7MKLz+3je8HrY8UO02meVCmthBEz/7kZ8DU o/8w6T3itZtyHO+p5TiWc54yjecFvwXHmRi5qj6L0Eo1Cyk9COxLgkt2Zgf6niYkQWSGiE 3dvGH5xd8qFz+IzaiNLIvx/oC64z7x9YRhwnpTLVAAbpfoKGD8gqVxf1wmq3vZL4UMcUG4 zBSV4MCU0iOgKIygqnI7EDg1UFQnIC7Ro3AeeOGARyH/b3CeeJZK0xj0HgaK27eJK12t7/ S9TvaDpKtLBEwO7wZ78PT7iw/6uZoLh1Hjqye0oTIQtY/7hkROXMryr9uOVJ4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csL4x3rHmzlCK; Wed, 22 Oct 2025 20:15: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 59MKFTfR033190; Wed, 22 Oct 2025 20:15:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MKFToC033187; Wed, 22 Oct 2025 20:15:29 GMT (envelope-from git) Date: Wed, 22 Oct 2025 20:15:29 GMT Message-Id: <202510222015.59MKFToC033187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f138688ea41a - releng/15.0 - pf: fix 'no rdr' List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: f138688ea41a1a2ecd0d08d02575542f31f1ceb5 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f138688ea41a1a2ecd0d08d02575542f31f1ceb5 commit f138688ea41a1a2ecd0d08d02575542f31f1ceb5 Author: Kristof Provost AuthorDate: 2025-10-18 15:47:47 +0000 Commit: Colin Percival CommitDate: 2025-10-22 20:12:34 +0000 pf: fix 'no rdr' Ensure we always have a non-NULL rule pointer (ctx.rm). It might have gotten set to NULL by pf_get_translation(). While here also restore the previous rdr behaviour be re-adding the incorrectly removed 'break' in pf_match_translation_rule. Approved by: re (cperciva) PR: 290177 MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D53191 (cherry picked from commit cb36bfee25b71d1223b8fb1237fcf823d514b50e) (cherry picked from commit 536b07512c4b931b9d0d3d609c3ac925f55e3ec9) --- sys/netpfil/pf/pf.c | 1 + sys/netpfil/pf/pf_lb.c | 1 + tests/sys/netpfil/pf/rdr.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8d3d72148815..af0629397ea0 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5939,6 +5939,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, ctx.nat_pool = &(ctx.nr->rdr); } + *ctx.rm = &V_pf_default_rule; if (ctx.nr && ctx.nr->natpass) { r = ctx.nr; ruleset = *ctx.rsm; diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index b8b5157c9b15..29d7a32e0bdc 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -216,6 +216,7 @@ pf_match_translation_rule(int rs_num, struct pf_test_ctx *ctx, struct pf_krulese */ ctx->arsm = ctx->aruleset; } + break; } else { ctx->a = r; /* remember anchor */ ctx->aruleset = ruleset; /* and its ruleset */ diff --git a/tests/sys/netpfil/pf/rdr.sh b/tests/sys/netpfil/pf/rdr.sh index 24b95b2047f4..b0f0e6d13d0f 100644 --- a/tests/sys/netpfil/pf/rdr.sh +++ b/tests/sys/netpfil/pf/rdr.sh @@ -338,6 +338,56 @@ natpass_cleanup() pft_cleanup } +atf_test_case "pr290177" "cleanup" +pr290177_head() +{ + atf_set descr 'Test PR290177' + atf_set require.user root +} + +pr290177_body() +{ + pft_init + + epair=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.2/24 up + ifconfig ${epair}a inet alias 192.0.2.3/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.1/24 up + jexec alcatraz ifconfig lo0 127.0.0.1/8 up + + # Sanity check + atf_check -s exit:0 -o ignore \ + ping -c 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "table { 192.0.2.2 }" \ + "no rdr inet proto tcp from to any port 25" \ + "rdr pass inet proto tcp from any to any port 25 -> 127.0.0.1 port 2500" + + echo foo | jexec alcatraz nc -N -l 2500 & + sleep 1 + + reply=$(nc -w 3 -s 192.0.2.2 192.0.2.1 25) + if [ "${reply}" == "foo" ] + then + atf_fail "no rdr rule failed" + fi + reply=$(nc -w 3 -s 192.0.2.3 192.0.2.1 25) + if [ "${reply}" != "foo" ] + then + atf_fail "rdr rule failed" + fi +} + +pr290177_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "natpass" @@ -345,4 +395,5 @@ atf_init_test_cases() atf_add_test_case "tcp_v6_pass" atf_add_test_case "srcport_compat" atf_add_test_case "srcport_pass" + atf_add_test_case "pr290177" } From nobody Wed Oct 22 23:12:54 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csQ1f6Ftxz6Ddg6; Wed, 22 Oct 2025 23:12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csQ1f5Ynpz3QwH; Wed, 22 Oct 2025 23:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761174774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5rwWXX935C4Liiy7n79/DQJIVCdoksJBOJcgjsV9RtM=; b=tZTKhC95z+8VqdqGeHLKCUHqJ8MdCTnYN31ESrEHfHVB4bQgTOjDImbaz2nfBsiJhmDZJK N8TsvabnW8v+ww8Fxl/K2tGz+E4S0tj8Kwo2MiJRo72duUYfDz2/H2/K9MXxZKrbiqSANi dkIiLf/tcTm9V8tvecAdKyMUuIgnU6jfpqMjjaKlzDix+qXpZHxC3U4V9hCntNNbeuhSZs DGei9/sjVsF7H5+VIerl+xHDdhH5fcBFx79RJFu/RmB4P3rl5dHXIZ6JcVWuw65yhjrMhL xJRhKGdv3+PjxpUDvBXlnFO/o1poFm3w04jjAQpFRlt5yIpV/PKMDaOlDq+QFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761174774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5rwWXX935C4Liiy7n79/DQJIVCdoksJBOJcgjsV9RtM=; b=b40lPSJfoNuZMCi5LU8rzpBjUBU4dIqwaGeKLeHpCHFduerIWe/5NnZkVWEqbmYhzXxMqj HS3VVGQnVCtU0JdhXk+uSx5zEjfU0geNDxXUIeirYFEoXYLDh7qLmirWU81l3f1Rglo6HO KIKN7SVZfiY00YA0B78FSqsoXcoB0819y7V2L+E0M+QwzUGmx2gqwOKIJSbZ0xpacl4TE0 b+yK4w2C1Gj2cnzJQz8m5ALcdqgSwZeQZpXb0atvK5KzlC59ZVVV1Pm2+9nEAxchcK5B0Y TRH8bz1Rha+etA9DqTudCH2dXNMJExPv2FC2RtatzPSHJ0OC20vVObYeFtl6fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761174774; a=rsa-sha256; cv=none; b=HUuYPsXDgV7RvllFXeegIS30vjlKHAX767XOcCcxfI0+aIpui5K/IPnyWna9xr0ukKe3X/ I+a0SL7snidJwNk58GdcEURU3RD8qFzWE8obTIuK0dPWUAZlDMJAja0kTAL7Wr5BHsWQFE VNdtg5Mix68XvEbdupgsN6SKN5Y0VzjcqBa9kx1j3dEodBjP2x+f+ySdK2d98AlhZPWGF0 q0JAw7k00t5m7ppzmo/2CW5GuC+8Rz4DBzUtDU2FMbEyLEbjGhwaUqypQ+wJHdcBLwQ43o PW//zBM2vj2MfcMwtdApbgCIyx1iXpXcoC2s7YsHAmdN63VZMx0RAkSwWNTHHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csQ1f54dZzq4K; Wed, 22 Oct 2025 23:12: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 59MNCsXH072111; Wed, 22 Oct 2025 23:12:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MNCs3q072110; Wed, 22 Oct 2025 23:12:54 GMT (envelope-from git) Date: Wed, 22 Oct 2025 23:12:54 GMT Message-Id: <202510222312.59MNCs3q072110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: c1a24d29cf24 - Create tag release/13.5.0-p6 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/tags/release/13.5.0-p6 X-Git-Reftype: annotated tag X-Git-Commit: c1a24d29cf240cc6dda1b69017be8257ae4f5bca Auto-Submitted: auto-generated The annotated tag release/13.5.0-p6 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/13.5.0-p6 tag release/13.5.0-p6 Tagger: Philip Paeps TaggerDate: 2025-10-22 23:11:43 +0000 Tag FreeBSD 13.5-RELEASE-p6 commit c4530d6e5f368592b6048a0c63892626c05f433f Author: Mark Johnston AuthorDate: 2025-10-22 15:52:29 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:53:22 +0000 Add UPDATING entries and bump version Approved by: so From nobody Wed Oct 22 23:13:41 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csQ2Y3QZDz6Ddd0; Wed, 22 Oct 2025 23:13: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csQ2Y2wKbz3R9T; Wed, 22 Oct 2025 23:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761174821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/8kI0GoNfdhegFEBLvLZSXaHmkSvgaJV3PZDdlaoxbU=; b=nyc0kYEnk5gcu5VveSFlmNqCzbxpCYSV5hP6aLNfhol3gZgD4IglDGJj6CeLJkLkvv4XCo u0Gj8ZamtKIm0LN412Pox58Gufvkcup9UT+J2ySNgeH8t4+pplxGgTAcBlMSXMC5k1g22P /8dyhU1suTtxYxMOEWlWIS6exaUffVT0IeVjztsL7NdBWZF+RVBrJzM276dEqK8PASdeGe XteF43i0C6FphXTBqdWGSmhc2bXeGGxt/H9MVrsbnZNIc+1/BR5Jh8i/xq3n2SlXs9avVZ SHGS3MdjNLXc/T48CeHUYkTC6y6xGKzWnn5SiUf4uH0C+PH1HTrwtg/kLP2Kog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761174821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/8kI0GoNfdhegFEBLvLZSXaHmkSvgaJV3PZDdlaoxbU=; b=DTCXoy7klXwGAa6pwKXxljOUzx0zfksoo4zhtxGdAWIvK4u9p6Bhi9BcXGZEMv67HiR7Bf gWBK9vgoBwDlIepzrnNX4FTvbSV1c4b7GUuNt7DEmhe7lDKmfrF2VXgU9GX1RJ2ygM67p9 gcFhsR6GVm2sbivccYdpstxvnishgROYHW73AGjM4sSDhdgQyiaDrMsBxl31xbHmJQZDPe vGe4j+lFMdMpGad9gkpYQNoBn9bGhzz7LkTK/Wk0knpTr/9dSloavYr+DW+4s7QcZj8qjK Odx+vWVhEOzHWz5QYKhrOTsNOCb+kxb/wfw51cpu5F4RAw2R7VbI3IHDgKke+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761174821; a=rsa-sha256; cv=none; b=MsydGkfXGLhSZ/FtberuNrrJd9cCKj9R9KTZbi6P+hCXmB+opFZ2hDePVphfg6O8CqKjMt pP7Y85S9d6of6jLsnjX+8fS83bPWjJA3ldt1XLgxrxOmb3HP/NKR00tmVkwWyVpaznl/PW 7u6Yl9aQm3E0QpRzsDfTIkQS8mfpa1rMyBDWFSxyHgABMP1AU22YYARbeKWX7W1fCRGamy vWmkLC7BkOglaZcHfVFye7uUAZK69r+4Qdigf0W60++gI7owJN75cFVoTmHz4BCmFRjNAp 4twhnk9EyfF95G0ZIrTOsv4h6wV/ro8+npWIPqG2Osr2V3l1uTrHqQI2YJ4FJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csQ2Y2WJZzqG7; Wed, 22 Oct 2025 23:13: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 59MNDfWY072411; Wed, 22 Oct 2025 23:13:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MNDfqr072410; Wed, 22 Oct 2025 23:13:41 GMT (envelope-from git) Date: Wed, 22 Oct 2025 23:13:41 GMT Message-Id: <202510222313.59MNDfqr072410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 5a508d60dc11 - Create tag release/14.3.0-p5 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/tags/release/14.3.0-p5 X-Git-Reftype: annotated tag X-Git-Commit: 5a508d60dc11f501c1b51cc497dcb9ab2699010f Auto-Submitted: auto-generated The annotated tag release/14.3.0-p5 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.3.0-p5 tag release/14.3.0-p5 Tagger: Philip Paeps TaggerDate: 2025-10-22 23:12:42 +0000 Tag FreeBSD 14.3-RELEASE-p5 commit 382f54740ee421cc0808d70fe79acab1f3d3e836 Author: Mark Johnston AuthorDate: 2025-10-22 15:19:02 +0000 Commit: Mark Johnston CommitDate: 2025-10-22 15:51:48 +0000 Add UPDATING entries and bump version Approved by: so From nobody Thu Oct 23 00:37:46 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csRvZ4KRBz6Cbdy; Thu, 23 Oct 2025 00:37: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csRvZ34dxz3bbR; Thu, 23 Oct 2025 00:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJgNtnf25MVTYBfxtH4QP2wZinE6o+K3mil3hLjRpsE=; b=SLzdkq9UC46TFL7vq2rn7BRelJTRayNXjmmu+BkIi6p4/kvqWPxkXph3qARWPopL84fAhU LtwFMj7LgpixpEhovEiav7kk7XGNgPuSPxbL+PiJqwGQhyQdoPqjJqi6TfGhXffpYLxb/Q /LjWBfjQlVOoF9UB1/qCZrx8tIByHgsbb0apMEx8ekdr1l0Z6Evj6KcL0S0Lde9zsiVjja E9+Zxmvehjt0wq/hn4s/AWzUAkpRMk7E0bIVHoYwtvhd1tChVqshIyZ9D5NgF3kJG+zlBo 52S0gfs3M2vGzGiARVcNAQwNfQCfnERReW/VRsalbV3me73ACu9Ktqlk/fnf+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJgNtnf25MVTYBfxtH4QP2wZinE6o+K3mil3hLjRpsE=; b=klACr4r9iY6ZgWun4lUwBk/S1bGvKEA+RAwYrafEADfRguHAqsVSPFlS6Er9asC5iyqFTL rdrNu4lTDrhOAsThGGgZgqXDfcGB1ggkmxL0mkprLlQk9KTZOUgE35/lqro8zm59OPDYZJ yoyRInM1U0gV9xR7qlYFSBh5NmEaVPFu4dIGVXATYjkLRpHv2PRKx9pVulBYQgAyr0a/+E K/P70DcjNaCgmcgHn7e+Dy0ow98kiHm6swOxwE97WX3wR7/FJ0FOEdSek6fyZalD3ZKzNh Z9n9JWHgVHrL9v6a4s31jeC/LMJMWhGfuFCXnclkAFgSq673D86m6yMJW0zfwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761179866; a=rsa-sha256; cv=none; b=JKtNt3mwXB85UCiXfzppYcTokY9wqnULgfWmY0zsu/I4NHhe/ayUsRnOD0Lhq1Uv0f3mYl mRItHxWSN34NWUNanG3IV5HdCyXAPVEAbZuCBnn8fpG5W/I+5y+UbZpMmL/iYkX0uEXMRA H0S9rBzVp9o3ubL6At16LDBmakK09dds01t8pbYFDKl5/At5yYogoDejJZSR0KCEtPB8/R Mz74f9LDA0qwqA5q2zDIFwzGvjFzDHByV8L6Xj7WjSbePUGBv+M0KcWSddXJ6I7eit6iQ2 Tx7J1M4BCXhKYKOjjOY2V5A89tdX3+l+3IMNMdxPi2/iD3im0KUi8ohmhRvYtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csRvZ2cP8zsQ8; Thu, 23 Oct 2025 00:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59N0bkDk023384; Thu, 23 Oct 2025 00: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 59N0bkAR023381; Thu, 23 Oct 2025 00:37:46 GMT (envelope-from git) Date: Thu, 23 Oct 2025 00:37:46 GMT Message-Id: <202510230037.59N0bkAR023381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: da0e0f755e7b - stable/15 - bsd.man.mk: Support MANGROUPS.yes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: da0e0f755e7b1e904dab8d70a46debce5f5dd5f8 Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=da0e0f755e7b1e904dab8d70a46debce5f5dd5f8 commit da0e0f755e7b1e904dab8d70a46debce5f5dd5f8 Author: Lexi Winter AuthorDate: 2025-10-17 10:40:39 +0000 Commit: Colin Percival CommitDate: 2025-10-23 00:36:50 +0000 bsd.man.mk: Support MANGROUPS.yes Similar to SUBDIR and CONFGROUPS, this allows the use of MANGROUPS.${MK_FOO}, simplifying Makefile logic for optional manpages. MFC after: 3 seconds Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53126 (cherry picked from commit e757a92282fcd064c82cf2685dde4730743fc425) --- share/mk/bsd.man.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 0a3594e05d94..1591a3e0905e 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -97,6 +97,14 @@ manlinksinstall: .PHONY all-man: +# Take groups from both MANGROUPS and MANGROUPS.yes, to allow syntax like +# MANGROUPS.${MK_FOO}=FOO. Sort and uniq the list of groups in case of +# duplicates. +.if defined(MANGROUPS) || defined(MANGROUPS.yes) +MANGROUPS:=${MANGROUPS} ${MANGROUPS.yes} +MANGROUPS:=${MANGROUPS:O:u} +.endif + .for __group in ${MANGROUPS} realmaninstall: realmaninstall-${__group} From nobody Thu Oct 23 00:37:47 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csRvb5k3dz6Cbx9; Thu, 23 Oct 2025 00: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csRvb3x53z3bMp; Thu, 23 Oct 2025 00: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=1761179867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hxGq2nYhIb8BSHmZuBzOMJt5Km0tXyeK406KjJpCj60=; b=AGTsa/g3yqVCH+GjQThy31Awi+TduKCezaOSqQSfsI1chBK8d/OQDWhC3NxZXjTgKfmeyV ngC/xlSV9JwkDDohePPc5yjaJS9TxMpOJ3ZInDbl5owTTnWRvKyvlRNi0Xxb1Qhe1BZC36 xB276Ck2aJP65Rvo8IzjAzYSKOEtgP5WpzUdp/FDy4JXxDuYBza1JYGZx1U9izIcgdE3fj GqBps4pRzDj9vjMnim+rc5VhZ+RF6mkkbp4+4MNnGuwYnBhwHu7itIr+v4ccBJlXSQgfud hJkmo78skmr0j2MNqihmDOTga1jg5FTrvwmDU45gfZ5Jc54WYiFUIqE1lMjtkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hxGq2nYhIb8BSHmZuBzOMJt5Km0tXyeK406KjJpCj60=; b=MGj9xKM5mvHErwlNeBuUgM6G51YTQChHqJxK5JjdQzYN9JTsoGhT2UuP8ugtL8ZZsTcomv OvbZUjqohr2Y0iAAxkDGyNBUwuXhmU86YwYsQpgNhvk+SB8c1g/yO1h5BSd3F7uq08RRWF GuK3wSGeCqUO1/YHOuh65LgRf9kodpNCjUCLxiLFRJOeFC/oUh57H9zCUQc6iIOWCsdAqt MmKFRdXl76fiF4wVrxBI8Cy2m32vp3S3M2T1wlY3w9jFveSUChuI17vc7lVRwllE1CQa0N LVPDtrgKHbh5xlY5AD20lbx88HQEj+Hm/4R2Ltbe8Dm9YrMA3yacSo9bU4NigQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761179867; a=rsa-sha256; cv=none; b=dM2nzVil99GkYR5Tvl3fzyLux/WDMS7S2M6acNxZPnZRRY1QaNzivAVH8YjBcRpZ7fHdLF 6KfITyAPhw9qOVDhC1jwOB3PbLKpnaLvxWvZU1y258TFmGprbA8JC83a8NHDrFxaKPSXdg aSw0Crb45sUIWDSw9/M88+6S2F70Ye2OPjUVcdiEdtBTVi4DJnQk6EuYyqrEgJaUjy3xsG 6vufo+cVa8eRkpdLQ1H3UQFY8IRitSzZE9ql9bXBmbmrmCCDo0KbTSxbHnFt/fS2UM5FU+ 3WEAKm/RlPRn2G5RFJJcizSMAs9ZqJVzDI9V8mlvDB0rWR3CjR6/6r0zmjkoGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csRvb3XSTzsL9; Thu, 23 Oct 2025 00: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 59N0blrs023417; Thu, 23 Oct 2025 00:37:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59N0blSr023414; Thu, 23 Oct 2025 00:37:47 GMT (envelope-from git) Date: Thu, 23 Oct 2025 00:37:47 GMT Message-Id: <202510230037.59N0blSr023414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: c6a19aed6916 - stable/15 - tar: Move to the utilities package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c6a19aed69168d2fdf5ab3d77470b5cf91152eae Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=c6a19aed69168d2fdf5ab3d77470b5cf91152eae commit c6a19aed69168d2fdf5ab3d77470b5cf91152eae Author: Lexi Winter AuthorDate: 2025-10-17 10:42:03 +0000 Commit: Colin Percival CommitDate: 2025-10-23 00:36:50 +0000 tar: Move to the utilities package tar(1) is not a core runtime utility; in particular, nothing in /etc/rc.d/* requires it. Move it to utilities, which is also where cpio(1) lives. This removes the dependency from runtime to libarchive. MFC after: 3 days Reviewed by: manu, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53059 (cherry picked from commit c0f17d637a4ab1e5dcae6b931623b7b0ee5bece2) --- usr.bin/tar/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index 9260315fb30b..d3d29e03fd35 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -2,7 +2,6 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive -PACKAGE= runtime PROG= bsdtar BSDTAR_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ ${_LIBARCHIVEDIR}/libarchive/archive.h From nobody Thu Oct 23 00:37:48 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csRvd0FPJz6CbqF; Thu, 23 Oct 2025 00:37: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csRvc51lkz3bq7; Thu, 23 Oct 2025 00:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iH4VU6P15vo3v/G5QigcF1P2Z0/aWQYRrHWwIyqhbQI=; b=tc+QU0XPMKPW6PH68uXCOdPOyPL7PFM916pHNLSbO2kjP05fJiTCxAalxeRKXyPtn/USfG BHdAdoh3CdoUu26KVvYgw2WXNRNrvIC2KZ7tacjxpNEQh/mdHxYojAmg59TxsjrsxjHJH+ H0XEpyo8ovS+TmVFtgeecutk+rNMA53ivT12Ct+gt7mAMuB7iPvxAJAhUan6rtcqXMnP7C SHlOVlB5balyQ3Fbm9lWFYyRUTkTSFYMUxYPJdgLwb3IGB3CzoxirafhtnYLFBC81DlmDO Y8hSOHbqxNigN7EKw7U8rj1RQOAIVf5qf/0ZT9O5I2cWJz+K1SuN1plB1YmA5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iH4VU6P15vo3v/G5QigcF1P2Z0/aWQYRrHWwIyqhbQI=; b=F9+Rfiq18F41ZtipVssCM5bejppL13Wda+misr7sSSMj8MlYoGA4+fwMHF9RwlL6c+LcYE zMyBttpjwqGbCENf8JaX2I8w4LJnADPbjY/8mSblOrInlxXazCmA0DTZn0yUMiRNuV9klA +jdQ9j2Rdwc7wSqs93kt57gpIMn1n3VyDEhejSK8m44c2MIXUJm37/iYlI6ZJwOi3jCKGO MffBT/vUUW66QC2jZur5Znt7BSYtB5JV/WWRRlvcLzC30DSCZXVMaq494ewBi2tpnhLohs sTiN7/rygEqdl9+WaH+tSkK826zMfdJiy5FbAx4LJCj5fdjKhhzU+JDmJpE9EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761179868; a=rsa-sha256; cv=none; b=I/h+NE+3qitEdPOwH/UGb7C4lix2wraFkhM59qs8/6J+NLtMGrwtyft7RI5pFQGdxfwjKQ u93YqgEbTEARckN0F4pfigBASXC5LZxDfotVUn+V+jntJO2isE8ydNnuL8gix7bJFH9nNh wX++lHAwiO8w9ByaatUWsK1VYHgzZmeG+n06eFJ/0jfW6Q9z3XfOl7O+Ro1AvwxW3oTFzs dFm3dx1wbbv29cyYf9C02EMPOnWB7WxZXVD1pJFwuw851aptv07rxqCaLnMwnNEoRbSHiy JF5czN2WOxWNXcG/begZIic4hfs9t0xAG3WZ7D9Pq4y9Oqix7aJddxzXj089Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csRvc4VWbzsLB; Thu, 23 Oct 2025 00:37: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 59N0bm8c023450; Thu, 23 Oct 2025 00:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59N0bm3d023447; Thu, 23 Oct 2025 00:37:48 GMT (envelope-from git) Date: Thu, 23 Oct 2025 00:37:48 GMT Message-Id: <202510230037.59N0bm3d023447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 68897925cad0 - stable/15 - ncurses: Move utilities to the ncurses package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 68897925cad092db1479145abb60e1304c6ccede Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=68897925cad092db1479145abb60e1304c6ccede commit 68897925cad092db1479145abb60e1304c6ccede Author: Lexi Winter AuthorDate: 2025-10-17 18:41:09 +0000 Commit: Colin Percival CommitDate: 2025-10-23 00:36:50 +0000 ncurses: Move utilities to the ncurses package MFC after: 3 days Reviewed by: manu, kevans Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53163 (cherry picked from commit 09a49cd49b4fecfb31b2b6677a938ef847289055) --- usr.bin/ncurses/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/ncurses/Makefile b/usr.bin/ncurses/Makefile index 33001e6ab568..1ed8a2d9a915 100644 --- a/usr.bin/ncurses/Makefile +++ b/usr.bin/ncurses/Makefile @@ -1,4 +1,4 @@ -PACKAGE= runtime +PACKAGE= ncurses .include .include "${SRCTOP}/lib/ncurses/config.mk" From nobody Thu Oct 23 00:37:49 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csRvf0Q5dz6Cbms; Thu, 23 Oct 2025 00:37: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csRvd5sjsz3bh9; Thu, 23 Oct 2025 00:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSu3uQ9bbwKV8zHEvvqxKscsZN2Ptsj0CLfWdRp6rwg=; b=dWECBOUYmeFXX5pNS3NitgM7DS4oavXlDpRtPkPyHT/4lJ30IDepydNsjn7S6RZ5lQUMQY 2MYUP6ee/FjIEh+UlJ0n5lUjhaHrHwbgUIb+Nr/OLJd2Au4MN3FtGk10okGbzvl+8bXg/r QMvVfQ2hSO/jJLkTSxE0fL5TJSsrWKQ/L/4lXH9rMwruiYEhiUSXPH2UN9lGg+bW8Tc0Xo mKIya+06USDNlQwkq/eD1j/R9CHHOTuTq885mf9Ei3rOmz105msnDYb2J/7qkUmN0lPZ0+ y07L124uVOxMeAO5Ysx8R5D6BzIlZKhCLpaIR1ZbI+2TrJX/hOZdxb2Bujpcjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSu3uQ9bbwKV8zHEvvqxKscsZN2Ptsj0CLfWdRp6rwg=; b=VXwhBJGgDxal10DQcPqr/5sdk2dVzz/on1YD+8VBYne+DNm8Ar05XDeQk6aboDGT8PO4Lq 31Q4wGg/ocUy7aY879Mn5XA9ONxnpl94XwtsoOmI7By8tlMk7daGvqZzTg3q4oNPH8pVfZ DT5xxdyhRMqZ/tJTLPesTOTevL8Cy5U2cs6ytF+h84izPvnFos88kpl5nKErnNSr12cQCK w3V2YBoK6Iqf9pA8oDSA9TVkZrfkREiH58foCdWS+Nykv8Sxjh2SvL9vHS70g9IOrkHLws Tep+QzqYfdkyoYbwKnQBGE9RHn8JtR7EU82QYFd9mOOwLdn8L5a9lwdA2mpkNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761179869; a=rsa-sha256; cv=none; b=gTQ8EWL0q34sffLXGJPXf4Ui/+C2eYABZMvdkZcuBtJIAmgv6/aop7ZRsE+IE9AneisWZ7 VOs826P1PFv1HyXV4Z8AkgAjFyxjrmivXzrmrWe37orMAlgaYGFDeDMWSb+z899GlPMX0R W9daTpO8xdvIAyDL0/toNU86fx5KNtzXCuEGCfS4c1MZs9gWRSW4TO2F29m/4ZklQ04VzM Cj2fdFDoEzakUc7Zy9GlMRW/cQcYUVYag3RcwubgaxtXdcLHAD6JlPJGlX6e1xzr47qmMA 5HOgxRdMKSblPIhhst3K4pQJlPISjXVXzhdwMlLDQiQAgGMt7L6KFOiNDjeUtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csRvd5SZyzsLC; Thu, 23 Oct 2025 00:37: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 59N0bnZf023483; Thu, 23 Oct 2025 00:37:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59N0bnsN023480; Thu, 23 Oct 2025 00:37:49 GMT (envelope-from git) Date: Thu, 23 Oct 2025 00:37:49 GMT Message-Id: <202510230037.59N0bnsN023480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: ef82bdc864c5 - stable/15 - Makefile: Don't allow install{world,kernel} with pkgbase List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ef82bdc864c5750c6c42a45696aa35c1a1cff10a Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ef82bdc864c5750c6c42a45696aa35c1a1cff10a commit ef82bdc864c5750c6c42a45696aa35c1a1cff10a Author: Lexi Winter AuthorDate: 2025-10-17 19:06:17 +0000 Commit: Colin Percival CommitDate: 2025-10-23 00:36:50 +0000 Makefile: Don't allow install{world,kernel} with pkgbase Using these targets on a pkgbase system will cause the installed system to become out of sync with the package database, which is almost certain to cause issues the next time pkg(8) is used. To prevent users doing this accidentally, disallow install* if we detect that FreeBSD-runtime is installed in the target. The check can be overridden with DESTDIR=/ for users who are sure they want to do this. MFC after: 3 days Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52879 (cherry picked from commit 74a6bb524e5b9ad654a9acc5da5c195f406717b5) --- Makefile.inc1 | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 21adf215c0aa..dcd4fd23c087 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -600,7 +600,16 @@ PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif .endif # !defined(_MKSHOWCONFIG) +PKG_NAME_PREFIX?= FreeBSD +PKG_MAINTAINER?= re@FreeBSD.org +PKG_WWW?= https://www.FreeBSD.org +PKG_WORKERS_COUNT?= 1 + .if make(*package*) +.export PKG_NAME_PREFIX +.export PKG_MAINTAINER +.export PKG_WWW + .if !defined(PKG_TIMESTAMP) .if !empty(GIT_CMD) && exists(${GIT_CMD}) && exists(${SRCDIR}/.git) SOURCE_DATE_EPOCH!= ${GIT_CMD} -C ${SRCDIR} show -s --format=%ct HEAD @@ -611,14 +620,6 @@ SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} .else SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} .endif -PKG_WORKERS_COUNT?= 1 - -PKG_NAME_PREFIX?= FreeBSD -PKG_MAINTAINER?= re@FreeBSD.org -PKG_WWW?= https://www.FreeBSD.org -.export PKG_NAME_PREFIX -.export PKG_MAINTAINER -.export PKG_WWW .endif .if !defined(_MKSHOWCONFIG) @@ -1366,6 +1367,28 @@ __installcheck_DESTDIR: .PHONY .endif .endif +# +# Don't allow installworld or installkernel on a pkgbase system. This avoids +# accidentally updating a pkgbase system with install{world,kernel}, causing +# the installed system to become out of date with the package database. +# +# Skip the check if DESTDIR is defined on the assumption the user knows what +# they're doing. This means the check can be disabled for the running system +# using DESTDIR=/. +# +.if !make(distributeworld) && !defined(DESTDIR) +_installcheck_world: __installcheck_PKG +_installcheck_kernel: __installcheck_PKG +__installcheck_PKG: .PHONY +.if exists(${LOCALBASE}/sbin/pkg-static) + @if ${LOCALBASE}/sbin/pkg-static info -e ${PKG_NAME_PREFIX}-runtime; then \ + echo >&2 "ERROR: This target should not be used on a system installed from packages." ; \ + echo >&2 " To override this check, set DESTDIR=/."; \ + false; \ + fi +.endif +.endif + .if !defined(DB_FROM_SRC) # # Check for missing UIDs/GIDs. From nobody Thu Oct 23 00:37:50 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csRvg1Ygtz6CbkW; Thu, 23 Oct 2025 00:37: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csRvf6RC2z3bcD; Thu, 23 Oct 2025 00:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179870; h=from:from:reply-to:subject:subject: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/wWO3p/skuR3t2tSIrumwa6iNH9sy9DqqwhjwB5yb0=; b=a6wFuwEz3H0Z8p0lUIs+DwzEi+Fcl5sCdDy5uBCvj+wit6BnI5wRWqjUc86GGA6mpcIlZv KL768YovpsZvBiMQxZbnuiqFsSAs7ZcENFZM7pwexZ4RBUAeDPHnpkoLLIGm1KTye6AWf/ jQW5VAx7EELVKGauPY4tCPp23XSmuhgl8/VWkivfr27WnqO5HAS1LCRbWN6HQbQnBPOxjD J+si8AqIG9fuCZHU0Hwk9jyb4tupCB+DFpBIKl7dsYodpWs9khFbJl3ow6sftc+eWawtgL yEyNDHpgEtYpSn161cUHBK993JdTb3fp4c62Woa9s8YUmP4G02Mh+RtsOgKRzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761179870; h=from:from:reply-to:subject:subject: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/wWO3p/skuR3t2tSIrumwa6iNH9sy9DqqwhjwB5yb0=; b=w7l6OUDM8YJUzIIaQ84sW3y3Hk6pE5Rt1gVCryOMNlFvRPxlCVTzLk/ReVp2kpS2EKdsTn nx6z7oL7QOv3yLR+sb+P1fYZzituTXFgAb7ISkAuCU5MnvI/MTob+V9pU6YWcdQdI3Jseb auTO9wQteeCQn0rR2Df1NxoYj736SKueuHbS8nea6k1V3KlbUan3PL9sDgWsBmEX2pcozU BOCgNiKy28CXGfErcG44ucQRxH1fdJ0yKiHaOdNfY27xQy1/smNManH8hs7FlnyGJkM7y4 lPiHoWylFrElkPmEiuYCIeBh3X855VUpERHBeSMdD+DmfYRW6EF5BR0TOCrxdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761179870; a=rsa-sha256; cv=none; b=W0MmhD7Orz4WeX5FSzru8Ar9+rlT8I37rVqEYUmJvhZfpBA6ZRvGdqxf1YRWyqozNeiRpH EvvKyCduOxm9s05khu3aztBYY+SwLoVvYBJhCMktkg02lOFZkxBO7LZvDDT21lhPlJEvzR KZXONCDuA30zrMZtVXNbjsMj3mIDRR8c8kIKzvGDQ01ktFcrj7bgKBK2LiJ4wUDDE7ZZR0 IfthUAEwysYeszSrE+Gxf0j3FtQIoX5Sa3+93au6ORqRoz8t3bx7id+NkOyhUVEskQ5uB5 Y0l1ohDluIhXX6mZfxoZoFZz32+t5wbrIfKwWOJxTfLZtmvsW6aDynEi4CU3og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csRvf5mQlzsPK; Thu, 23 Oct 2025 00:37: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 59N0boLZ023525; Thu, 23 Oct 2025 00:37:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59N0bojx023522; Thu, 23 Oct 2025 00:37:50 GMT (envelope-from git) Date: Thu, 23 Oct 2025 00:37:50 GMT Message-Id: <202510230037.59N0bojx023522@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: ff7a10d0e1d1 - stable/15 - libc: Import OpenBSD's inet_net_{ntop,pton} List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ff7a10d0e1d1498724c6a1e02a70926944a71590 Auto-Submitted: auto-generated The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ff7a10d0e1d1498724c6a1e02a70926944a71590 commit ff7a10d0e1d1498724c6a1e02a70926944a71590 Author: Lexi Winter AuthorDate: 2025-10-18 14:18:40 +0000 Commit: Colin Percival CommitDate: 2025-10-23 00:36:51 +0000 libc: Import OpenBSD's inet_net_{ntop,pton} Our versions of these functions (originally taken from BIND) simply don't work correctly for AF_INET6. These were removed from BIND itself quite a while ago, but OpenBSD has made several fixes in the mean time, so import their code. Add tests for both functions. PR: 289198 Reported by: Nico Sonack MFC after: 1 week Reviewed by: des Obtained from: OpenBSD (lib/libc/net) Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52629 (cherry picked from commit 8f4a0d2f7b96099001dbc51e06114df1a0e6d291) --- lib/libc/inet/inet_net_ntop.c | 206 ++++++-------------- lib/libc/inet/inet_net_pton.c | 363 +++++++++++------------------------- lib/libc/tests/net/Makefile | 2 + lib/libc/tests/net/inet_net_test.cc | 333 +++++++++++++++++++++++++++++++++ 4 files changed, 492 insertions(+), 412 deletions(-) diff --git a/lib/libc/inet/inet_net_ntop.c b/lib/libc/inet/inet_net_ntop.c index 9d98dbb5ca99..30dd5c0571f2 100644 --- a/lib/libc/inet/inet_net_ntop.c +++ b/lib/libc/inet/inet_net_ntop.c @@ -1,20 +1,23 @@ -/*- - * SPDX-License-Identifier: ISC +/* $OpenBSD: inet_net_ntop.c,v 1.9 2019/07/03 03:24:04 deraadt Exp $ */ + +/* + * Copyright (c) 2012 by Gilles Chehade + * Copyright (c) 1996 by Internet Software Consortium. * - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1996,1999 by Internet Software Consortium. + * SPDX-License-Identifier: ISC * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. */ #include "port_before.h" @@ -31,18 +34,10 @@ #include "port_after.h" -#ifdef SPRINTF_CHAR -# define SPRINTF(x) strlen(sprintf/**/x) -#else -# define SPRINTF(x) ((size_t)sprintf x) -#endif - -static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, - size_t size); -static char * inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, - size_t size); +static char *inet_net_ntop_ipv4(const u_char *, int, char *, size_t); +static char *inet_net_ntop_ipv6(const u_char *, int, char *, size_t); -/*% +/* * char * * inet_net_ntop(af, src, bits, dst, size) * convert network number from network to presentation format. @@ -66,7 +61,7 @@ inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size) } } -/*% +/* * static char * * inet_net_ntop_ipv4(src, bits, dst, size) * convert IPv4 network number from network to presentation format. @@ -83,53 +78,63 @@ static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) { char *odst = dst; - char *t; u_int m; int b; + char *ep; + int advance; + + ep = dst + size; + if (ep <= dst) + goto emsgsize; if (bits < 0 || bits > 32) { errno = EINVAL; return (NULL); } - if (bits == 0) { - if (size < sizeof "0") + if (ep - dst < sizeof "0") goto emsgsize; *dst++ = '0'; - size--; *dst = '\0'; } /* Format whole octets. */ for (b = bits / 8; b > 0; b--) { - if (size <= sizeof "255.") + if (ep - dst < sizeof "255.") + goto emsgsize; + advance = snprintf(dst, ep - dst, "%u", *src++); + if (advance <= 0 || advance >= ep - dst) goto emsgsize; - t = dst; - dst += SPRINTF((dst, "%u", *src++)); + dst += advance; if (b > 1) { + if (dst + 1 >= ep) + goto emsgsize; *dst++ = '.'; *dst = '\0'; } - size -= (size_t)(dst - t); } /* Format partial octet. */ b = bits % 8; if (b > 0) { - if (size <= sizeof ".255") + if (ep - dst < sizeof ".255") goto emsgsize; - t = dst; if (dst != odst) *dst++ = '.'; m = ((1 << b) - 1) << (8 - b); - dst += SPRINTF((dst, "%u", *src & m)); - size -= (size_t)(dst - t); + advance = snprintf(dst, ep - dst, "%u", *src & m); + if (advance <= 0 || advance >= ep - dst) + goto emsgsize; + dst += advance; } /* Format CIDR /width. */ - if (size <= sizeof "/32") + if (ep - dst < sizeof "/32") + goto emsgsize; + advance = snprintf(dst, ep - dst, "/%u", bits); + if (advance <= 0 || advance >= ep - dst) goto emsgsize; - dst += SPRINTF((dst, "/%u", bits)); + dst += advance; return (odst); emsgsize: @@ -137,132 +142,27 @@ inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) return (NULL); } -/*% - * static char * - * inet_net_ntop_ipv6(src, bits, fakebits, dst, size) - * convert IPv6 network number from network to presentation format. - * generates CIDR style result always. Picks the shortest representation - * unless the IP is really IPv4. - * always prints specified number of bits (bits). - * return: - * pointer to dst, or NULL if an error occurred (check errno). - * note: - * network byte order assumed. this means 192.5.5.240/28 has - * 0b11110000 in its fourth octet. - * author: - * Vadim Kogan (UCB), June 2001 - * Original version (IPv4) by Paul Vixie (ISC), July 1996 - */ - static char * -inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) { - u_int m; - int b; - int p; - int zero_s, zero_l, tmp_zero_s, tmp_zero_l; - int i; - int is_ipv4 = 0; - unsigned char inbuf[16]; - char outbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128")]; - char *cp; - int words; - u_char *s; +inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) +{ + int ret; + char buf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255:255:255:255/128")]; if (bits < 0 || bits > 128) { errno = EINVAL; return (NULL); } - cp = outbuf; - - if (bits == 0) { - *cp++ = ':'; - *cp++ = ':'; - *cp = '\0'; - } else { - /* Copy src to private buffer. Zero host part. */ - p = (bits + 7) / 8; - memcpy(inbuf, src, p); - memset(inbuf + p, 0, 16 - p); - b = bits % 8; - if (b != 0) { - m = ~0 << (8 - b); - inbuf[p-1] &= m; - } - - s = inbuf; - - /* how many words need to be displayed in output */ - words = (bits + 15) / 16; - if (words == 1) - words = 2; - - /* Find the longest substring of zero's */ - zero_s = zero_l = tmp_zero_s = tmp_zero_l = 0; - for (i = 0; i < (words * 2); i += 2) { - if ((s[i] | s[i+1]) == 0) { - if (tmp_zero_l == 0) - tmp_zero_s = i / 2; - tmp_zero_l++; - } else { - if (tmp_zero_l && zero_l < tmp_zero_l) { - zero_s = tmp_zero_s; - zero_l = tmp_zero_l; - tmp_zero_l = 0; - } - } - } - - if (tmp_zero_l && zero_l < tmp_zero_l) { - zero_s = tmp_zero_s; - zero_l = tmp_zero_l; - } - - if (zero_l != words && zero_s == 0 && ((zero_l == 6) || - ((zero_l == 5 && s[10] == 0xff && s[11] == 0xff) || - ((zero_l == 7 && s[14] != 0 && s[15] != 1))))) - is_ipv4 = 1; - - /* Format whole words. */ - for (p = 0; p < words; p++) { - if (zero_l != 0 && p >= zero_s && p < zero_s + zero_l) { - /* Time to skip some zeros */ - if (p == zero_s) - *cp++ = ':'; - if (p == words - 1) - *cp++ = ':'; - s++; - s++; - continue; - } + if (inet_ntop(AF_INET6, src, buf, size) == NULL) + return (NULL); - if (is_ipv4 && p > 5 ) { - *cp++ = (p == 6) ? ':' : '.'; - cp += SPRINTF((cp, "%u", *s++)); - /* we can potentially drop the last octet */ - if (p != 7 || bits > 120) { - *cp++ = '.'; - cp += SPRINTF((cp, "%u", *s++)); - } - } else { - if (cp != outbuf) - *cp++ = ':'; - cp += SPRINTF((cp, "%x", *s * 256 + s[1])); - s += 2; - } - } + ret = snprintf(dst, size, "%s/%d", buf, bits); + if (ret < 0 || ret >= size) { + errno = EMSGSIZE; + return (NULL); } - /* Format CIDR /width. */ - sprintf(cp, "/%u", bits); - if (strlen(outbuf) + 1 > size) - goto emsgsize; - strcpy(dst, outbuf); return (dst); - -emsgsize: - errno = EMSGSIZE; - return (NULL); } /* @@ -271,5 +171,3 @@ emsgsize: */ #undef inet_net_ntop __weak_reference(__inet_net_ntop, inet_net_ntop); - -/*! \file */ diff --git a/lib/libc/inet/inet_net_pton.c b/lib/libc/inet/inet_net_pton.c index d566a0e1d3c3..14c88eb72014 100644 --- a/lib/libc/inet/inet_net_pton.c +++ b/lib/libc/inet/inet_net_pton.c @@ -1,20 +1,23 @@ -/*- - * SPDX-License-Identifier: ISC +/* $OpenBSD: inet_net_pton.c,v 1.14 2022/12/27 17:10:06 jmc Exp $ */ + +/* + * Copyright (c) 2012 by Gilles Chehade + * Copyright (c) 1996,1999 by Internet Software Consortium. * - * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") - * Copyright (C) 1996, 1998, 1999, 2001, 2003 Internet Software Consortium. + * SPDX-License-Identifier: ISC * - * Permission to use, copy, modify, and/or distribute this software for any + * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. */ #include "port_before.h" @@ -22,7 +25,6 @@ #include #include #include -#include #include #include @@ -34,13 +36,37 @@ #include "port_after.h" -#ifdef SPRINTF_CHAR -# define SPRINTF(x) strlen(sprintf/**/x) -#else -# define SPRINTF(x) ((size_t)sprintf x) -#endif +static int inet_net_pton_ipv4(const char *, u_char *, size_t); +static int inet_net_pton_ipv6(const char *, u_char *, size_t); -/*% +/* + * static int + * inet_net_pton(af, src, dst, size) + * convert network number from presentation to network format. + * accepts hex octets, hex strings, decimal octets, and /CIDR. + * "size" is in bytes and describes "dst". + * return: + * number of bits, either imputed classfully or specified with /CIDR, + * or -1 if some failure occurred (check errno). ENOENT means it was + * not a valid network specification. + * author: + * Paul Vixie (ISC), June 1996 + */ +int +inet_net_pton(int af, const char *src, void *dst, size_t size) +{ + switch (af) { + case AF_INET: + return (inet_net_pton_ipv4(src, dst, size)); + case AF_INET6: + return (inet_net_pton_ipv6(src, dst, size)); + default: + errno = EAFNOSUPPORT; + return (-1); + } +} + +/* * static int * inet_net_pton_ipv4(src, dst, size) * convert IPv4 network number from presentation to network format. @@ -57,22 +83,24 @@ * Paul Vixie (ISC), June 1996 */ static int -inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { - static const char xdigits[] = "0123456789abcdef"; - static const char digits[] = "0123456789"; - int n, ch, tmp = 0, dirty, bits; +inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) +{ + static const char + xdigits[] = "0123456789abcdef", + digits[] = "0123456789"; + int n, ch, tmp, dirty, bits; const u_char *odst = dst; - ch = *src++; + ch = (unsigned char)*src++; if (ch == '0' && (src[0] == 'x' || src[0] == 'X') - && isascii((unsigned char)(src[1])) - && isxdigit((unsigned char)(src[1]))) { + && isascii((unsigned char)src[1]) && isxdigit((unsigned char)src[1])) { /* Hexadecimal: Eat nybble string. */ - if (size <= 0U) + if (size == 0) goto emsgsize; - dirty = 0; - src++; /*%< skip x or X. */ - while ((ch = *src++) != '\0' && isascii(ch) && isxdigit(ch)) { + tmp = 0, dirty = 0; + src++; /* skip x or X. */ + while ((ch = (unsigned char)*src++) != '\0' && + isascii(ch) && isxdigit(ch)) { if (isupper(ch)) ch = tolower(ch); n = strchr(xdigits, ch) - xdigits; @@ -82,14 +110,14 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { else tmp = (tmp << 4) | n; if (++dirty == 2) { - if (size-- <= 0U) + if (size-- == 0) goto emsgsize; *dst++ = (u_char) tmp; dirty = 0; } } - if (dirty) { /*%< Odd trailing nybble? */ - if (size-- <= 0U) + if (dirty) { /* Odd trailing nybble? */ + if (size-- == 0) goto emsgsize; *dst++ = (u_char) (tmp << 4); } @@ -104,16 +132,16 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { tmp += n; if (tmp > 255) goto enoent; - } while ((ch = *src++) != '\0' && + } while ((ch = (unsigned char)*src++) != '\0' && isascii(ch) && isdigit(ch)); - if (size-- <= 0U) + if (size-- == 0) goto emsgsize; *dst++ = (u_char) tmp; if (ch == '\0' || ch == '/') break; if (ch != '.') goto enoent; - ch = *src++; + ch = (unsigned char)*src++; if (!isascii(ch) || !isdigit(ch)) goto enoent; } @@ -121,10 +149,10 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { goto enoent; bits = -1; - if (ch == '/' && isascii((unsigned char)(src[0])) && - isdigit((unsigned char)(src[0])) && dst > odst) { + if (ch == '/' && isascii((unsigned char)src[0]) && + isdigit((unsigned char)src[0]) && dst > odst) { /* CIDR width specifier. Nothing can follow it. */ - ch = *src++; /*%< Skip over the /. */ + ch = (unsigned char)*src++; /* Skip over the /. */ bits = 0; do { n = strchr(digits, ch) - digits; @@ -132,8 +160,9 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { bits *= 10; bits += n; if (bits > 32) - goto enoent; - } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch)); + goto emsgsize; + } while ((ch = (unsigned char)*src++) != '\0' && + isascii(ch) && isdigit(ch)); if (ch != '\0') goto enoent; } @@ -147,29 +176,23 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { goto enoent; /* If no CIDR spec was given, infer width from net class. */ if (bits == -1) { - if (*odst >= 240) /*%< Class E */ + if (*odst >= 240) /* Class E */ bits = 32; - else if (*odst >= 224) /*%< Class D */ - bits = 8; - else if (*odst >= 192) /*%< Class C */ + else if (*odst >= 224) /* Class D */ + bits = 4; + else if (*odst >= 192) /* Class C */ bits = 24; - else if (*odst >= 128) /*%< Class B */ + else if (*odst >= 128) /* Class B */ bits = 16; - else /*%< Class A */ + else /* Class A */ bits = 8; /* If imputed mask is narrower than specified octets, widen. */ if (bits < ((dst - odst) * 8)) bits = (dst - odst) * 8; - /* - * If there are no additional bits specified for a class D - * address adjust bits to 4. - */ - if (bits == 8 && *odst == 224) - bits = 4; } /* Extend network to cover the actual mask. */ while (bits > ((dst - odst) * 8)) { - if (size-- <= 0U) + if (size-- == 0) goto emsgsize; *dst++ = '\0'; } @@ -184,222 +207,48 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { return (-1); } -static int -getbits(const char *src, int *bitsp) { - static const char digits[] = "0123456789"; - int n; - int val; - char ch; - - val = 0; - n = 0; - while ((ch = *src++) != '\0') { - const char *pch; - - pch = strchr(digits, ch); - if (pch != NULL) { - if (n++ != 0 && val == 0) /*%< no leading zeros */ - return (0); - val *= 10; - val += (pch - digits); - if (val > 128) /*%< range */ - return (0); - continue; - } - return (0); - } - if (n == 0) - return (0); - *bitsp = val; - return (1); -} static int -getv4(const char *src, u_char *dst, int *bitsp) { - static const char digits[] = "0123456789"; - u_char *odst = dst; - int n; - u_int val; - char ch; - - val = 0; - n = 0; - while ((ch = *src++) != '\0') { - const char *pch; +inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) +{ + struct in6_addr in6; + int ret; + int bits; + size_t bytes; + char buf[INET6_ADDRSTRLEN + sizeof("/128")]; + char *sep; + const char *errstr; - pch = strchr(digits, ch); - if (pch != NULL) { - if (n++ != 0 && val == 0) /*%< no leading zeros */ - return (0); - val *= 10; - val += (pch - digits); - if (val > 255) /*%< range */ - return (0); - continue; - } - if (ch == '.' || ch == '/') { - if (dst - odst > 3) /*%< too many octets? */ - return (0); - *dst++ = val; - if (ch == '/') - return (getbits(src, bitsp)); - val = 0; - n = 0; - continue; - } - return (0); + if (strlcpy(buf, src, sizeof buf) >= sizeof buf) { + errno = EMSGSIZE; + return (-1); } - if (n == 0) - return (0); - if (dst - odst > 3) /*%< too many octets? */ - return (0); - *dst++ = val; - return (1); -} -static int -inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) { - static const char xdigits_l[] = "0123456789abcdef", - xdigits_u[] = "0123456789ABCDEF"; - u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; - const char *xdigits, *curtok; - int ch, saw_xdigit; - u_int val; - int digits; - int bits; - size_t bytes; - int words; - int ipv4; + sep = strchr(buf, '/'); + if (sep != NULL) + *sep++ = '\0'; - memset((tp = tmp), '\0', NS_IN6ADDRSZ); - endp = tp + NS_IN6ADDRSZ; - colonp = NULL; - /* Leading :: requires some special handling. */ - if (*src == ':') - if (*++src != ':') - goto enoent; - curtok = src; - saw_xdigit = 0; - val = 0; - digits = 0; - bits = -1; - ipv4 = 0; - while ((ch = *src++) != '\0') { - const char *pch; + ret = inet_pton(AF_INET6, buf, &in6); + if (ret != 1) + return (-1); - if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) - pch = strchr((xdigits = xdigits_u), ch); - if (pch != NULL) { - val <<= 4; - val |= (pch - xdigits); - if (++digits > 4) - goto enoent; - saw_xdigit = 1; - continue; - } - if (ch == ':') { - curtok = src; - if (!saw_xdigit) { - if (colonp) - goto enoent; - colonp = tp; - continue; - } else if (*src == '\0') - goto enoent; - if (tp + NS_INT16SZ > endp) - return (0); - *tp++ = (u_char) (val >> 8) & 0xff; - *tp++ = (u_char) val & 0xff; - saw_xdigit = 0; - digits = 0; - val = 0; - continue; - } - if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && - getv4(curtok, tp, &bits) > 0) { - tp += NS_INADDRSZ; - saw_xdigit = 0; - ipv4 = 1; - break; /*%< '\\0' was seen by inet_pton4(). */ - } - if (ch == '/' && getbits(src, &bits) > 0) - break; - goto enoent; - } - if (saw_xdigit) { - if (tp + NS_INT16SZ > endp) - goto enoent; - *tp++ = (u_char) (val >> 8) & 0xff; - *tp++ = (u_char) val & 0xff; - } - if (bits == -1) + if (sep == NULL) bits = 128; - - words = (bits + 15) / 16; - if (words < 2) - words = 2; - if (ipv4) - words = 8; - endp = tmp + 2 * words; - - if (colonp != NULL) { - /* - * Since some memmove()'s erroneously fail to handle - * overlapping regions, we'll do the shift by hand. - */ - const int n = tp - colonp; - int i; - - if (tp == endp) - goto enoent; - for (i = 1; i <= n; i++) { - endp[- i] = colonp[n - i]; - colonp[n - i] = 0; + else { + bits = strtonum(sep, 0, 128, &errstr); + if (errstr) { + errno = EINVAL; + return (-1); } - tp = endp; } - if (tp != endp) - goto enoent; bytes = (bits + 7) / 8; - if (bytes > size) - goto emsgsize; - memcpy(dst, tmp, bytes); - return (bits); - - enoent: - errno = ENOENT; - return (-1); - - emsgsize: - errno = EMSGSIZE; - return (-1); -} - -/*% - * int - * inet_net_pton(af, src, dst, size) - * convert network number from presentation to network format. - * accepts hex octets, hex strings, decimal octets, and /CIDR. - * "size" is in bytes and describes "dst". - * return: - * number of bits, either imputed classfully or specified with /CIDR, - * or -1 if some failure occurred (check errno). ENOENT means it was - * not a valid network specification. - * author: - * Paul Vixie (ISC), June 1996 - */ -int -inet_net_pton(int af, const char *src, void *dst, size_t size) { - switch (af) { - case AF_INET: - return (inet_net_pton_ipv4(src, dst, size)); - case AF_INET6: - return (inet_net_pton_ipv6(src, dst, size)); - default: - errno = EAFNOSUPPORT; + if (bytes > size) { + errno = EMSGSIZE; return (-1); } + memcpy(dst, &in6.s6_addr, bytes); + return (bits); } /* @@ -408,5 +257,3 @@ inet_net_pton(int af, const char *src, void *dst, size_t size) { */ #undef inet_net_pton __weak_reference(__inet_net_pton, inet_net_pton); - -/*! \file */ diff --git a/lib/libc/tests/net/Makefile b/lib/libc/tests/net/Makefile index 24cff61e8d24..ec0668633508 100644 --- a/lib/libc/tests/net/Makefile +++ b/lib/libc/tests/net/Makefile @@ -4,8 +4,10 @@ ATF_TESTS_C+= ether_test ATF_TESTS_C+= eui64_aton_test ATF_TESTS_C+= eui64_ntoa_test ATF_TESTS_CXX+= link_addr_test +ATF_TESTS_CXX+= inet_net_test CXXSTD.link_addr_test= c++20 +CXXSTD.inet_net_test= c++20 CFLAGS+= -I${.CURDIR} diff --git a/lib/libc/tests/net/inet_net_test.cc b/lib/libc/tests/net/inet_net_test.cc new file mode 100644 index 000000000000..4ecf5a3de492 --- /dev/null +++ b/lib/libc/tests/net/inet_net_test.cc @@ -0,0 +1,333 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Tests for inet_net_pton() and inet_net_ntop(). + */ + +#include +#include + +#include +#include + +#include +#include +#include + +#include + +using namespace std::literals; + +/* + * inet_net_ntop() and inet_net_pton() for IPv4. + */ +ATF_TEST_CASE_WITHOUT_HEAD(inet_net_inet4) +ATF_TEST_CASE_BODY(inet_net_inet4) +{ + /* + * Define a list of addresses we want to check. Each address is passed + * to inet_net_pton() to convert it to an in_addr, then we convert the + * in_addr back to a string and compare it with the expected value. We + * want to test over-long prefixes here (such as 10.0.0.1/8), so we also + * specify what the result is expected to be. + */ + + struct test_addr { + std::string input; + unsigned bits; + std::string output; + }; + + auto test_addrs = std::vector{ + // Simple prefixes that fall on octet boundaries. + { "10.0.0.0/8", 8, "10/8" }, + { "10.1.0.0/16", 16, "10.1/16" }, + { "10.1.2.0/24", 24, "10.1.2/24" }, + { "10.1.2.3/32", 32, "10.1.2.3/32" }, + + // Simple prefixes with the short-form address. + { "10/8", 8, "10/8" }, + { "10.1/16", 16, "10.1/16" }, + { "10.1.2/24", 24, "10.1.2/24" }, + + // A prefix that doesn't fall on an octet boundary. + { "10.1.64/18", 18, "10.1.64/18" }, + + // An overlong prefix with bits that aren't part of the prefix. + { "10.0.0.1/8", 8, "10/8" }, + }; + + for (auto const &addr: test_addrs) { + /* + * Convert the input string to an in_addr + bits, and make + * sure the result produces the number of bits we expected. + */ + + auto in = in_addr{}; + auto bits = inet_net_pton(AF_INET, addr.input.c_str(), + &in, sizeof(in)); + ATF_REQUIRE(bits != -1); + ATF_REQUIRE_EQ(bits, addr.bits); + + /* + * Convert the in_addr back to a string + */ + + /* + * XXX: Should there be a constant for the size of the result + * buffer? For now, use ADDRSTRLEN + 3 ("/32") + 1 (NUL). + * + * Fill the buffer with 'Z', so we can check the result was + * properly terminated. + */ + auto strbuf = std::vector(INET_ADDRSTRLEN + 3 + 1, 'Z'); + auto ret = inet_net_ntop(AF_INET, &in, bits, + strbuf.data(), strbuf.size()); + ATF_REQUIRE(ret != NULL); + ATF_REQUIRE_EQ(ret, strbuf.data()); + + /* Make sure the result was NUL-terminated and find the NUL */ + ATF_REQUIRE(strbuf.size() >= 1); + auto end = std::ranges::find(strbuf, '\0'); + ATF_REQUIRE(end != strbuf.end()); + + /* + * Check the result matches what we expect. Use a temporary + * string here instead of std::ranges::equal because this + * means ATF can print the mismatch. + */ + auto str = std::string(std::ranges::begin(strbuf), end); + ATF_REQUIRE_EQ(str, addr.output); + } +} + +/* + * inet_net_ntop() and inet_net_pton() for IPv6. + */ +ATF_TEST_CASE_WITHOUT_HEAD(inet_net_inet6) +ATF_TEST_CASE_BODY(inet_net_inet6) +{ + /* + * Define a list of addresses we want to check. Each address is + * passed to inet_net_pton() to convert it to an in6_addr, then we + * convert the in6_addr back to a string and compare it with the + * expected value. We want to test over-long prefixes here (such + * as 2001:db8::1/32), so we also specify what the result is + * expected to be. + */ + + struct test_addr { + std::string input; + unsigned bits; + std::string output; + }; + + auto test_addrs = std::vector{ + // A prefix with a trailing :: + { "2001:db8::/32", 32, "2001:db8::/32" }, + + // A prefix with a leading ::. Note that the output is + // different from the input because inet_ntop() renders + // this prefix with an IPv4 suffix for legacy reasons. *** 186 LINES SKIPPED *** From nobody Thu Oct 23 01:55:29 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4csTdF2DHPz6DHdp; Thu, 23 Oct 2025 01:55: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4csTdF1g9fz3lJs; Thu, 23 Oct 2025 01:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761184529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3f/OStGhkqGlBSaXrEPEiUOvQ8IT2xZR8p3ef5CVCA=; b=iJAzWowyif+q+14ytkI9DDv1XEbZ4Z1eG5NlOrLQESPNUVo7glRtZPP6UEHm1EOqc/c5q3 sJUmNKhgipSjDdRsXUdKAMiLmyNhGaFeW6x/OcGNRQJf1VNOzaxYmfEIM8E83weOBGZ0Zf o/sEkfZ4WAcrHXjcrvQ6LChXFBFTp/SqJHyutiUnpSGFUd9cNpyH3kZIVMGj0M0fw1q6fx vfjSFB6fMpN8Y5vwKCNcX5cI/X9N4hWMBwG6Oz4XMGEJx5YdTSVPRl6TIdmrqpM8VOziMg a85OopiJV1olOYzy7FE37z4NjB2coufU+XvPpCAx3j+bcOOmvdqyNUd/eq3dhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761184529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3f/OStGhkqGlBSaXrEPEiUOvQ8IT2xZR8p3ef5CVCA=; b=Os9JeHMfHxWuAZSL9MyqBfL9Ru5JhSCKD5NIUhXFHO4ifI76txw5+48IZkN0txQaAlxXI5 tWwHlrVeUEwgludD4XmotPeO6cfNLvb6jI2LiIo+GCsm7HhqBGJ7kyEPuS8UecUlCVyoK1 LLhq9rzFJPlPsvh2NePMRSXNptH7NECp5Xw439JdgNCc6sgnJaOBgxYwx8o4Gi3id12l66 AsIVFvNhINrbmLak7On4qHqGbGrh24Vxr6mNRwGFyGyPDFWf3GXx/b0lzuAizt1WoEYqCo sHlf1QL3hxqUCzNVz5sO/CZPVAfWL0VRrfDnlxHyPBy/dhW6hlX+RI23Qfxsnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761184529; a=rsa-sha256; cv=none; b=qJ4K4tlO+egyR6lUrgwZXbAPtoXVYxSPqWcAFINaaf8ofK5Q5f3DfX8eppP3PaEHHkPRDT CW5UoYYU9xutXiWq3EA4jEUml8xL/VnRsua96re5/VG2dAAFV0mbaNMDSucpnO8o1bClDf Ce23IlfjtOkpck0tcE3RwkoROK1TLEgw4k5Rx8iEE9tfAgBgQO8dTXgp4HLyhgAEKOw0yY 8SKoZvP+yJ/0580E9ENcyFVGLScuSYDUprOhh8MoxbYZTz/SJ37vEn5p2OvSVu0aXJUcBC qbNe+9oud4U9GTroXPe7cxf8HuqlEswwNyg1nfGqvEvFZO0hJQFsHdo/xTHBqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4csTdF1BXRztxn; Thu, 23 Oct 2025 01:55: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 59N1tT4N072663; Thu, 23 Oct 2025 01:55:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59N1tT2G072660; Thu, 23 Oct 2025 01:55:29 GMT (envelope-from git) Date: Thu, 23 Oct 2025 01:55:29 GMT Message-Id: <202510230155.59N1tT2G072660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brad Davis Subject: git: 6cfe0bcf7fbf - stable/15 - mkimg: Add a -h option and improve usage output to be more expressive List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6cfe0bcf7fbf3faec6892beb15febc6bab91eb21 Auto-Submitted: auto-generated The branch stable/15 has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=6cfe0bcf7fbf3faec6892beb15febc6bab91eb21 commit 6cfe0bcf7fbf3faec6892beb15febc6bab91eb21 Author: Brad Davis AuthorDate: 2025-10-03 21:57:06 +0000 Commit: Brad Davis CommitDate: 2025-10-23 01:55:20 +0000 mkimg: Add a -h option and improve usage output to be more expressive Reviewed by: imp, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52906 (cherry picked from commit 6fa18fe74461497f9a557af806552d246159272e) --- usr.bin/mkimg/mkimg.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/usr.bin/mkimg/mkimg.c b/usr.bin/mkimg/mkimg.c index a7409b686560..27b79b82ca02 100644 --- a/usr.bin/mkimg/mkimg.c +++ b/usr.bin/mkimg/mkimg.c @@ -142,8 +142,10 @@ static void usage(const char *why) { - warnx("error: %s", why); - fputc('\n', stderr); + if (why != NULL) { + warnx("error: %s", why); + fputc('\n', stderr); + } fprintf(stderr, "usage: %s \n", getprogname()); fprintf(stderr, " options:\n"); @@ -171,19 +173,19 @@ usage(const char *why) print_schemes(1); fputc('\n', stderr); fprintf(stderr, " partition specification:\n"); - fprintf(stderr, "\t[/]::[:[+]]\t- " + fprintf(stderr, "\t[/